diff options
author | gnowgi <nagarjun@gnowledge.org> | 2012-12-19 07:49:01 -0800 |
---|---|---|
committer | gnowgi <nagarjun@gnowledge.org> | 2012-12-19 07:49:01 -0800 |
commit | 09ceb4b84ef4b56db42d24ba60e4c58bb9e0a951 (patch) | |
tree | e78056bee2300fab25cf675ccd989e46e103497a /gstudio/static | |
parent | 3ba6b57c6d605262ef9e1f7bba8d62ea20aacc36 (diff) | |
parent | fb6d7b562bf6e2fad92a49061489af1abb92f2f6 (diff) | |
download | gnowsys-09ceb4b84ef4b56db42d24ba60e4c58bb9e0a951.tar.gz |
this commit, includes several unlisted features.
Diffstat (limited to 'gstudio/static')
-rw-r--r-- | gstudio/static/gstudio/js/addcontent.js | 54 | ||||
-rw-r--r-- | gstudio/static/gstudio/js/orgitdown/orgitdown/jquery.orgitdown.js | 6 | ||||
-rw-r--r-- | gstudio/static/gstudio/js/orgitdown/orgitdown/sets/org/images/video.jpeg | bin | 0 -> 440 bytes | |||
-rw-r--r-- | gstudio/static/gstudio/js/orgitdown/orgitdown/sets/org/set.js | 1 |
4 files changed, 50 insertions, 11 deletions
diff --git a/gstudio/static/gstudio/js/addcontent.js b/gstudio/static/gstudio/js/addcontent.js index 5c0c4bc2..54be47a3 100644 --- a/gstudio/static/gstudio/js/addcontent.js +++ b/gstudio/static/gstudio/js/addcontent.js @@ -8,6 +8,7 @@ var isSubsection=false; var editSubsection=false; var isNode=false; + var isObject=false; function subsecsave(objid){ var org_data = $("#gnoweditor").val(); var encode_data = encodeURIComponent(org_data); @@ -40,13 +41,15 @@ }); $("#pagecontent1").one("click",function() { + $(this).replaceWith('<textarea id="gnoweditor" style="visibility:hidden;width:450px"></textarea>'); isWikipage=true; - $("#chart").hide(); - document.getElementById('gnoweditor').style.visibility="visible"; - $("#gnoweditor").orgitdown(mySettings); + $("#chart").hide(); + document.getElementById('gnoweditor').style.visibility="visible"; + $("#gnoweditor").orgitdown(mySettings); + $(".orgitdownContainer").css({"margin-top":"0px","margin-left":"10px"}); //$("#save1").show(); - $("#pagecontent1").hide(); - $("#content").css({"width":"300px",}) + $("#pagecontent1").hide(); + $("#content").css({"width":"300px",}) }); $("#save1").one("click",function() { var org_data = $("#gnoweditor").val(); @@ -125,6 +128,7 @@ $(".deletesec").hide(); }); $(".editpagecontent").one("click",function(){ + $(this).replaceWith('<textarea id="gnoweditor" style="visibility:hidden;width:450px"></textarea>'); editWikipage=true; $("#chart").hide(); $(".editpagecontent").hide(); @@ -139,11 +143,11 @@ var elmts = document.getElementsByClassName("editval"); for (var i = 0; i < elmts.length; i++){ elmts[i].setAttribute("value","edited");} - var screenTop = $(document).scrollTop(); + // var screenTop = $(document).scrollTop(); $(".orgitdownContainer").css({ - "margin-top":screenTop,}); - $(".tag").hide(); - $(".tagtext").hide(); + "margin-top":"0px","margin-left":"10px"}); + //$(".tag").hide(); + //$(".tagtext").hide(); $("#newsection1").hide(); $(".createsubsection").hide(); $("#rating").hide(); @@ -163,6 +167,7 @@ elmts[i].setAttribute("value",decode_data);} $(".pagedit").trigger('click'); $(".savepagecontent").hide(); + $(".orgitdownContainer").hide(); }); $("#editnodecontent").one("click",function(){ @@ -194,6 +199,37 @@ $("#nodedit").hide(); }); + + $("#editobjectcontent").one("click",function(){ + isObject=true; + $("#chart").hide(); + $("#content img").css({"max-width":"600px",}) + + $("#content").css({"width":"600px",}) + document.getElementById('gnoweditor').style.visibility="visible"; + $("#gnoweditor").orgitdown(mySettings); + var a = this.name; + + $("#gnoweditor").val(a); + var screenTop = $(document).scrollTop(); + $(".orgitdownContainer").css({ + "margin-top":screenTop,}); + $("#editnodecontent").hide(); + //$("#savenodecontent").show(); + $("#objectedit").hide(); + + }); + $("#saveobjectcontent").one("click",function(){ + var org_data = $("#gnoweditor").val(); + var encode_data = encodeURIComponent(org_data); + + var decode_data = decodeURIComponent(encode_data.replace(/\+/g, " ")); + $("#reptext").val(decode_data); + $("#objectedit").trigger('click'); + $("#objectedit").hide(); + + }); + $(".createsubsection").one("click",function(){ isSubsection=true; diff --git a/gstudio/static/gstudio/js/orgitdown/orgitdown/jquery.orgitdown.js b/gstudio/static/gstudio/js/orgitdown/orgitdown/jquery.orgitdown.js index 6e207a0d..78974fd8 100644 --- a/gstudio/static/gstudio/js/orgitdown/orgitdown/jquery.orgitdown.js +++ b/gstudio/static/gstudio/js/orgitdown/orgitdown/jquery.orgitdown.js @@ -474,7 +474,8 @@ $("#save1").trigger('click');} if (isNode){ $("#savenodecontent").trigger('click');} - + if (isObject){ + $("#saveobjectcontent").trigger('click');} if (editWikipage){ $(".savepagecontent").trigger('click');} if (isSection){ @@ -505,7 +506,8 @@ $("#save"+objid).trigger('click');} if (isVideotitle){ $("#titlesave").trigger('click');} - + if(isSubResponse){ + saveclick(objid);} } // open preview window diff --git a/gstudio/static/gstudio/js/orgitdown/orgitdown/sets/org/images/video.jpeg b/gstudio/static/gstudio/js/orgitdown/orgitdown/sets/org/images/video.jpeg Binary files differnew file mode 100644 index 00000000..8edf9d6c --- /dev/null +++ b/gstudio/static/gstudio/js/orgitdown/orgitdown/sets/org/images/video.jpeg diff --git a/gstudio/static/gstudio/js/orgitdown/orgitdown/sets/org/set.js b/gstudio/static/gstudio/js/orgitdown/orgitdown/sets/org/set.js index 17121d78..3ed79ff1 100644 --- a/gstudio/static/gstudio/js/orgitdown/orgitdown/sets/org/set.js +++ b/gstudio/static/gstudio/js/orgitdown/orgitdown/sets/org/set.js @@ -26,6 +26,7 @@ var mySettings = { {name:'Picture', key:'P', replaceWith:'\n#+CAPTION: \n#+ATTR_HTML: width="600" \n[[http:fileName.jpg]]\n' }, {name:'Link', key:'L', openWith:'[[http://your.address.com here/][Your visible link text here]]', closeWith:'', placeHolder:'' }, {separator:'---------------' }, + {name:'Insert Embed Html',replaceWith:'\n#+BEGIN_HTML \n#+END_HTML\n' }, {name:'Close',call:'close' } //{name:'Clean', className:'clean', replaceWith:function(orgitdown) { return orgitdown.selection.replace(/<(.*?)>/g, "") } } |