diff options
Diffstat (limited to 'gstudio/static/gstudio/js/orgitdown')
-rw-r--r--[-rwxr-xr-x] | gstudio/static/gstudio/js/orgitdown/orgitdown/jquery.orgitdown.js | 44 | ||||
-rw-r--r-- | gstudio/static/gstudio/js/orgitdown/orgitdown/sets/org/images/close.jpeg | bin | 0 -> 418 bytes | |||
-rw-r--r-- | gstudio/static/gstudio/js/orgitdown/orgitdown/sets/org/set.js | 13 | ||||
-rw-r--r-- | gstudio/static/gstudio/js/orgitdown/orgitdown/sets/savedata.js | 4 |
4 files changed, 55 insertions, 6 deletions
diff --git a/gstudio/static/gstudio/js/orgitdown/orgitdown/jquery.orgitdown.js b/gstudio/static/gstudio/js/orgitdown/orgitdown/jquery.orgitdown.js index c766300..6e207a0 100755..100644 --- a/gstudio/static/gstudio/js/orgitdown/orgitdown/jquery.orgitdown.js +++ b/gstudio/static/gstudio/js/orgitdown/orgitdown/jquery.orgitdown.js @@ -438,7 +438,7 @@ } return selection; } - function save() { + function save1() { var org_data = $("#gnoweditor").val(); var id = document.getElementById("objectid").value document.getElementById("orgcontent").value = org_data; @@ -466,6 +466,48 @@ } });} + function close() { + $(".orgitdownContainer").hide(); + location.reload();} + function save() { + if (isWikipage){ + $("#save1").trigger('click');} + if (isNode){ + $("#savenodecontent").trigger('click');} + + if (editWikipage){ + $(".savepagecontent").trigger('click');} + if (isSection){ + $("#save").trigger('click');} + if (editSection){ + $(".saveseccontent").trigger('click');} + if (editSubsection){ + subsecsave(objid);} + if (isSubsection){ + $(".savesubsec").trigger('click');} + + if (isThread){ + $("#threadsave").trigger('click');} + if (editThread){ + $("#editthreadsave").trigger('click');} + if (isTwist){ + $("#topicaddsave").trigger('click');} + if (editTwist){ + topicsaveclick(twistid);} + if (isResponse){ + topicsaveclick(responseid);} + + if (editImage){ + $("#save").trigger('click');} + if (isImage){ + $("#save").trigger('click'); + $("#descriptionsave").trigger('click'); + $("#save"+objid).trigger('click');} + if (isVideotitle){ + $("#titlesave").trigger('click');} + + } + // open preview window function preview() { if (typeof options.previewHandler === 'function') { diff --git a/gstudio/static/gstudio/js/orgitdown/orgitdown/sets/org/images/close.jpeg b/gstudio/static/gstudio/js/orgitdown/orgitdown/sets/org/images/close.jpeg Binary files differnew file mode 100644 index 0000000..5c5297c --- /dev/null +++ b/gstudio/static/gstudio/js/orgitdown/orgitdown/sets/org/images/close.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 25b118e..17121d7 100644 --- a/gstudio/static/gstudio/js/orgitdown/orgitdown/sets/org/set.js +++ b/gstudio/static/gstudio/js/orgitdown/orgitdown/sets/org/set.js @@ -14,7 +14,8 @@ var mySettings = { onAltEnter: {keepDefault:false, replaceWith:'\n* '}, onAltrightArrow: {keepDefault:false, replaceWith:'*'}, markupSet: [ - {name:'Save', key:'S',call:'save' }, + {name:'Save',call:'save' }, + {separator:'---------------' }, {name:'Bold', key:'B', openWith:'*', closeWith:'*' }, {name:'Italic', key:'I', openWith:'/', closeWith:'/' }, {name:'Stroke through', key:'S', openWith:'+', closeWith:'+' }, @@ -22,10 +23,12 @@ var mySettings = { {name:'Bulleted List', openWith:' - ', closeWith:'', multiline:true, openBlockWith:'\n', closeBlockWith:'\n'}, {name:'Numeric List', openWith:' 1. ', closeWith:'', multiline:true, openBlockWith:'\n', closeBlockWith:'\n'}, {separator:'---------------' }, - {name:'Picture', key:'P', replaceWith:'[[http:fileName.jpg]]' }, + {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:'Clean', className:'clean', replaceWith:function(orgitdown) { return orgitdown.selection.replace(/<(.*?)>/g, "") } }, - {name:'Preview', className:'preview', call:'preview'} + {separator:'---------------' }, + {name:'Close',call:'close' } + + //{name:'Clean', className:'clean', replaceWith:function(orgitdown) { return orgitdown.selection.replace(/<(.*?)>/g, "") } } + //{name:'Preview', className:'preview', call:'preview'} ] } diff --git a/gstudio/static/gstudio/js/orgitdown/orgitdown/sets/savedata.js b/gstudio/static/gstudio/js/orgitdown/orgitdown/sets/savedata.js index eaf728c..7b3d5cd 100644 --- a/gstudio/static/gstudio/js/orgitdown/orgitdown/sets/savedata.js +++ b/gstudio/static/gstudio/js/orgitdown/orgitdown/sets/savedata.js @@ -6,8 +6,12 @@ document.getElementById('gnoweditor').style.visibility="visible"; $("#gnoweditor").orgitdown(mySettings); $("#gnoweditor").val(orgdata); + $("#editdata").hide(); + $("#savecontent").show(); + }); + }); |