summaryrefslogtreecommitdiff
path: root/gstudio/static/gstudio/js
diff options
context:
space:
mode:
authorgnowgi <nagarjun@gnowledge.org>2012-09-26 08:46:47 -0700
committergnowgi <nagarjun@gnowledge.org>2012-09-26 08:46:47 -0700
commit3ba6b57c6d605262ef9e1f7bba8d62ea20aacc36 (patch)
tree8d77de86b443495d67360dcd40786f2b8208d334 /gstudio/static/gstudio/js
parentcad11e2f7ed848cdfd7779451bb0f4f931e062c3 (diff)
parent94535d4adc3a4960795d22e3b229a8375de10b74 (diff)
downloadgnowsys-3ba6b57c6d605262ef9e1f7bba8d62ea20aacc36.tar.gz
Merge pull request #85 from supriyasawant/master
All modules, wiki, loom, image, document and video libraries integrated.
Diffstat (limited to 'gstudio/static/gstudio/js')
-rw-r--r--gstudio/static/gstudio/js/addcontent.js363
-rw-r--r--gstudio/static/gstudio/js/loomscripts.js201
-rw-r--r--[-rwxr-xr-x]gstudio/static/gstudio/js/orgitdown/orgitdown/jquery.orgitdown.js44
-rw-r--r--gstudio/static/gstudio/js/orgitdown/orgitdown/sets/org/images/close.jpegbin0 -> 418 bytes
-rw-r--r--gstudio/static/gstudio/js/orgitdown/orgitdown/sets/org/set.js13
-rw-r--r--gstudio/static/gstudio/js/orgitdown/orgitdown/sets/savedata.js4
6 files changed, 448 insertions, 177 deletions
diff --git a/gstudio/static/gstudio/js/addcontent.js b/gstudio/static/gstudio/js/addcontent.js
index 655e2f5..5c0c4bc 100644
--- a/gstudio/static/gstudio/js/addcontent.js
+++ b/gstudio/static/gstudio/js/addcontent.js
@@ -1,34 +1,52 @@
+
$.noConflict();
+ var isWikipage=false;
+ var editWikipage=false;
+ var objid;
+ var isSection=false;
+ var editSection=false;
+ var isSubsection=false;
+ var editSubsection=false;
+ var isNode=false;
+ function subsecsave(objid){
+ var org_data = $("#gnoweditor").val();
+ var encode_data = encodeURIComponent(org_data);
+ var decode_data = decodeURIComponent(encode_data.replace(/\+/g, " "));
+ $("#sectionreply"+objid).val(decode_data);
+ $("#subsecsubmit"+objid).trigger('click');
+ $(".savesubsec1").hide();
+
+ }
+
jQuery(document).ready(function($) {
$("#addcontent").one("click",function(){
- //var abc = document.getElementById('pageid1').value;
- //window.location.replace('sectionadd1/'+abc);
- $("#save").show();
- $("#chart").hide();
- // var orgdata = document.getElementById('orgcontent').value;
- document.getElementById('gnoweditor').style.visibility="visible";
-
- $("#gnoweditor").orgitdown(mySettings);
-
- var orgtext = $("#gnoweditor").val();
+ isSection=true;
+ $("#addcontent").hide();
+ //$("#save").show();
+ $("#chart").hide();
+ $("#content").css({"width":"300px",})
+ document.getElementById('gnoweditor').style.visibility="visible";
+ $("#gnoweditor").orgitdown(mySettings);
+ var orgtext = $("#gnoweditor").val();
- // });
- // });
});
$("#save").one("click",function() {
var org_data = $("#gnoweditor").val();
document.getElementById("orgpage").value = org_data;
var encode_data = encodeURIComponent(org_data);
$('#submitsec').trigger('click');
-
+ $("#save").hide();
});
$("#pagecontent1").one("click",function() {
+ isWikipage=true;
$("#chart").hide();
document.getElementById('gnoweditor').style.visibility="visible";
$("#gnoweditor").orgitdown(mySettings);
- $("#save1").show();
+ //$("#save1").show();
+ $("#pagecontent1").hide();
+ $("#content").css({"width":"300px",})
});
$("#save1").one("click",function() {
var org_data = $("#gnoweditor").val();
@@ -36,157 +54,155 @@
var encode_data = encodeURIComponent(org_data);
$('#submitpage').trigger('click');
- });
- $("#editseccontent").one("click",function(){
- $("#saveseccontent").show();
-
- $("#chart").hide();
- document.getElementById('gnoweditor').style.visibility="visible";
- $("#gnoweditor").orgitdown(mySettings);
- var a = document.getElementById('sectionorg').value;
- $("#gnoweditor").val(a);
- var screenTop = $(document).scrollTop();
- $(".orgitdownContainer").css({
- "margin-top":screenTop,});
- });
- $("#saveseccontent").one("click",function(){
- var org_data = $("#gnoweditor").val();
- var id = document.getElementById("sectionid").value
- document.getElementById("sectionorg").value = org_data;
- var encode_data = encodeURIComponent(org_data);
-
- $.ajax({
- url: '/nodetypes/ajax/contentorgadd/?id=' + id + '&contentorg=' + encode_data,
- success: function(data) {
- $.ajax({
- url: '/nodetypes/ajax/ajaxcreatefile/?id=' +id+ '&content_org=' +encode_data,
- success: function(data) {
- $.ajax({
- url: '/nodetypes/ajax/ajaxcreatehtml/',
- success: function(data) {
- $.ajax({
- url: '/nodetypes/ajax/contentadd/?id=' +id,
- success: function(data) {
- //alert("Data Saved");
- location.reload();}
- });
- }
- });
- }
- });
-
- }
- });
-
-
-
-
-
-
- });
- $("#editsubsec").one("click",function(){
- $("#savesubsec1").show();
-
- $("#chart").hide();
- document.getElementById('gnoweditor').style.visibility="visible";
- $("#gnoweditor").orgitdown(mySettings);
- var a = document.getElementById('subsecorg').value;
- $("#gnoweditor").val(a);
- var screenTop = $(document).scrollTop();
- $(".orgitdownContainer").css({
- "margin-top":screenTop,});
-
- });
- $("#savesubsec1").one("click",function(){
- var org_data = $("#gnoweditor").val();
- var id = document.getElementById("subsecid").value
- document.getElementById("subsecorg").value = org_data;
- var encode_data = encodeURIComponent(org_data);
-
- $.ajax({
- url: '/nodetypes/ajax/contentorgadd/?id=' + id + '&contentorg=' + encode_data,
- success: function(data) {
- $.ajax({
- url: '/nodetypes/ajax/ajaxcreatefile/?id=' +id+ '&content_org=' +encode_data,
- success: function(data) {
- $.ajax({
- url: '/nodetypes/ajax/ajaxcreatehtml/',
- success: function(data) {
- $.ajax({
- url: '/nodetypes/ajax/contentadd/?id=' +id,
- success: function(data) {
- //alert("Data Saved");
- location.reload();}
- });
- }
- });
- }
- });
-
- }
- });
-
-
-
-
+ });
+ $(".editseccontent").one("click",function(){
+ editSection=true;
+ // $(".saveseccontent").show();
+ $("#content img").css({"max-width":"600px",})
+ $("#content").css({"width":"600px",})
+ $("#chart").hide();
+ document.getElementById('gnoweditor').style.visibility="visible";
+ $("#gnoweditor").orgitdown(mySettings);
+ var a = this.name;
+ $("#gnoweditor").val(a);
+ var elmts = document.getElementsByClassName("editval");
+ for (var i = 0; i < elmts.length; i++){
+ elmts[i].setAttribute("value","edited");}
+ var screenTop = $(document).scrollTop();
+ $(".orgitdownContainer").css({
+ "margin-top":screenTop,});
+ $("#newsection1").hide();
+ $(".editseccontent").hide();
+ $(".createsubsection").hide();
+ $("#rating").hide();
+ $(".chkbox").hide();
+ $(".deletesec").hide();
+ $(".tag").hide();
+ $(".tagtext").hide();
+ $(".editpagecontent").hide();
+ $(".editsubsec").hide();
+ });
+ $(".saveseccontent").one("click",function(){
+ var org_data = $("#gnoweditor").val();
+ var elmts = document.getElementsByClassName("reptext");
+ var encode_data = encodeURIComponent(org_data);
+ var decode_data = decodeURIComponent(encode_data.replace(/\+/g, " "));
+ for (var i = 0; i < elmts.length; i++){
+ elmts[i].setAttribute("value",decode_data);}
+ $(".submitresponse").trigger('click');
+ $(".saveseccontent").hide();
+
+ });
-
- });
-
- $("#editpagecontent").one("click",function(){
- $("#chart").hide();
- $("#savepagecontent").show();
- document.getElementById('gnoweditor').style.visibility="visible";
+ $(".editsubsec").one("click",function(){
+ editSubsection=true;
+ var each_id=$(this).attr("id");
+ $("#chart").hide();
+ $("#content img").css({"max-width":"600px",})
+
+ $("#content").css({"width":"600px",})
+ document.getElementById('gnoweditor').style.visibility="visible";
+ $("#gnoweditor").orgitdown(mySettings);
+ var org_data=$("#subsec"+each_id).val();
+ $("#edit"+each_id).val("edited");
+ $("#sectionreply"+each_id).val(org_data);
+ $("#gnoweditor").val(org_data);
+ var screenTop = $(document).scrollTop();
+ $(".orgitdownContainer").css({
+ "margin-top":screenTop,});
+ //$("#save"+each_id).show();
+ objid=each_id;
+ $(".editsubsec").hide();
+ $(".submitsubsec1").hide();
+ $(".tag").hide();
+ $(".tagtext").hide();
+ $(".editpagecontent").hide();
+ $("#newsection1").hide();
+ $(".editseccontent").hide();
+ $(".createsubsection").hide();
+ $("#rating").hide();
+ $(".chkbox").hide();
+ $(".deletesec").hide();
+ });
+ $(".editpagecontent").one("click",function(){
+ editWikipage=true;
+ $("#chart").hide();
+ $(".editpagecontent").hide();
+ // $(".savepagecontent").show();
+ $("#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 elmts = document.getElementsByClassName("editval");
+ for (var i = 0; i < elmts.length; i++){
+ elmts[i].setAttribute("value","edited");}
+ var screenTop = $(document).scrollTop();
+ $(".orgitdownContainer").css({
+ "margin-top":screenTop,});
+ $(".tag").hide();
+ $(".tagtext").hide();
+ $("#newsection1").hide();
+ $(".createsubsection").hide();
+ $("#rating").hide();
+ $(".chkbox").hide();
+ $(".deletesec").hide();
+ $(".editseccontent").hide();
+ $(".editsubsec").hide();
+
- $("#gnoweditor").orgitdown(mySettings);
- var a = document.getElementById('pageorg').value;
- $("#gnoweditor").val(a);
- var screenTop = $(document).scrollTop();
- $(".orgitdownContainer").css({
- "margin-top":screenTop,});
+ });
+ $(".savepagecontent").one("click",function(){
+ var org_data = $("#gnoweditor").val();
+ var elmts = document.getElementsByClassName("reptext");
+ var encode_data = encodeURIComponent(org_data);
+ var decode_data = decodeURIComponent(encode_data.replace(/\+/g, " "));
+ for (var i = 0; i < elmts.length; i++){
+ elmts[i].setAttribute("value",decode_data);}
+ $(".pagedit").trigger('click');
+ $(".savepagecontent").hide();
+
+ });
+ $("#editnodecontent").one("click",function(){
+ isNode=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();
+ $("#nodedit").hide();
- });
- $("#savepagecontent").one("click",function(){
- // var org = $("#gnoweditor").val();
- // $("#sectionorg").val(org);
- // var test = $("#sectionorg").val();
- // alert(test);
- var org_data = $("#gnoweditor").val();
- var id = document.getElementById("pageid").value
- document.getElementById("pageorg").value = org_data;
- var encode_data = encodeURIComponent(org_data);
- //$("#gnoweditor").val(org_data);
-
- $.ajax({
- url: '/nodetypes/ajax/contentorgadd/?id=' + id + '&contentorg=' + encode_data,
- success: function(data) {
- $.ajax({
- url: '/nodetypes/ajax/ajaxcreatefile/?id=' +id+ '&content_org=' +encode_data,
- success: function(data) {
- $.ajax({
- url: '/nodetypes/ajax/ajaxcreatehtml/',
- success: function(data) {
- $.ajax({
- url: '/nodetypes/ajax/contentadd/?id=' +id,
- success: function(data) {
- //alert("Data Saved");
- location.reload();}
- });
- }
- });
- }
- });
-
- }
- });
+ });
+ $("#savenodecontent").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);
+ $("#nodedit").trigger('click');
+ $("#nodedit").hide();
+
+ });
+ $(".createsubsection").one("click",function(){
+ isSubsection=true;
+ //$(".savesubsec").show();
+ //$(".submitsubsec").show();
+ $(".createsubsection").hide();
- });
-
-
- $("#createsubsection").one("click",function(){
- $("#savesubsec").show();
-
+ $("#content img").css({"max-width":"600px",})
+ $("#content").css({"width":"600px",})
$("#chart").hide();
document.getElementById('gnoweditor').style.visibility="visible";
$("#gnoweditor").orgitdown(mySettings);
@@ -194,20 +210,25 @@
var screenTop = $(document).scrollTop();
$(".orgitdownContainer").css({
"margin-top":screenTop,});
-
+
});
- $("#savesubsec").one("click",function() {
- var org_data = $("#gnoweditor").val();
- document.getElementById("sectionreply").value = org_data;
- var encode_data = encodeURIComponent(org_data);
- $('#submitsubsec').trigger('click');});
+ $(".savesubsec").one("click",function() {
+ var org_data = $("#gnoweditor").val();
+ var elmts = document.getElementsByClassName("reptext");
+ var encode_data = encodeURIComponent(org_data);
+ var decode_data = decodeURIComponent(encode_data.replace(/\+/g, " "));
+ for (var i = 0; i < elmts.length; i++){
+ elmts[i].setAttribute("value",decode_data);}
+ $(".savesubsec").hide();
+ $(".submitsubsec").trigger('click');
+ });
$("#savecontent").one("click",function() {
var org_data = $("#gnoweditor").val();
var id = document.getElementById("objectid").value
document.getElementById("orgcontent").value = org_data;
var encode_data = encodeURIComponent(org_data);
-
+ $("#savecontent").hide();
$.ajax({
url: '/nodetypes/ajax/contentorgadd/?id=' + id + '&contentorg=' + encode_data,
success: function(data) {
@@ -228,11 +249,11 @@
}
});
- }
- });
+ }
+ });
- });
});
+ });
-
+
diff --git a/gstudio/static/gstudio/js/loomscripts.js b/gstudio/static/gstudio/js/loomscripts.js
new file mode 100644
index 0000000..45d7f37
--- /dev/null
+++ b/gstudio/static/gstudio/js/loomscripts.js
@@ -0,0 +1,201 @@
+ $.noConflict();
+var isThread=false;
+var editThread=false;
+var isTwist=false;
+var editTwist=false;
+var isResponse=false;
+var objid;
+var twistid;
+var responseid;
+function saveclick(objid){
+ $("#add"+objid).show();
+ var org_data = $("#gnoweditor").val();
+ var encode_data = encodeURIComponent(org_data);
+ var decode_data = decodeURIComponent(encode_data.replace(/\+/g, " "));
+ $("#text"+objid).val(decode_data);
+ $("#submit"+objid).trigger('click');
+ $(".commenteditor").hide();
+ $(".editcontent").hide();
+}//closing saveclick
+
+
+
+
+jQuery(document).ready(function($) {
+ $(".commenteditor").one("click",function() {
+ var a=$(this).attr("id");
+ $("#chart").hide();
+ $("#content img").css({"max-width": "600px",})
+ $("#content").css({"width": "600px",})
+
+ document.getElementById('gnoweditor').style.visibility="visible";
+ $("#gnoweditor").orgitdown(mySettings);
+ var screentop=$(document).scrollTop();
+ $(".orgitdownContainer").css({"margin-top":screentop,});
+ $("#save"+a).show();
+ $(".commenteditor").hide();
+ $(".chkdel").hide();
+ $(".submitdelete").hide();
+ $(".rating").hide();
+ $(".editor").hide();
+ $(".topicchk").hide();
+ $(".topicdelete").hide();
+ $(".editcontent").hide();
+
+ });
+
+});
+function topicsaveclick(objid){
+ var org_data = $("#gnoweditor").val();
+ var encode_data = encodeURIComponent(org_data);
+ var decode_data = decodeURIComponent(encode_data.replace(/\+/g, " "));
+ $("#topictext"+objid).val(decode_data);
+ $("#topicsubmit"+objid).trigger('click');
+ $(".editor").hide();
+ $(".editcontent").hide();
+}//closing saveclick
+ jQuery(document).ready(function($) {
+ $(".editor").one("click",function() {
+ isResponse=true;
+ var a=$(this).attr("id");
+ $("#chart").hide();
+ $("#content img").css({"max-width": "600px",})
+
+ $("#content").css({"width": "600px",})
+ document.getElementById('gnoweditor').style.visibility="visible";
+ $("#gnoweditor").orgitdown(mySettings);
+ var screentop=$(document).scrollTop();
+ $(".orgitdownContainer").css({"margin-top":screentop,});
+ responseid=a;
+ //$("#save"+a).show();
+ $(".editor").hide();
+ $(".topicchk").hide();
+ $(".topicdelete").hide();
+ $(".editcontent").hide();
+ $(".commenteditor").hide();
+ $(".chkdel").hide();
+ $(".submitdelete").hide();
+ $(".rating").hide();
+ });
+
+});
+
+
+jQuery(document).ready(function($) {
+ $(".editcontent").one("click",function() {
+ editTwist=true;
+ var each_id = $(this).attr("id");
+ $("#chart").hide();
+ $("#content img").css({"max-width": "600px",})
+
+ $("#content").css({"width": "600px",})
+ document.getElementById('gnoweditor').style.visibility="visible";
+ $("#gnoweditor").orgitdown(mySettings);
+ var org_data=$("#commentdata"+each_id).val();
+ $("#edit"+each_id).val("edited");
+ $("#topictext"+each_id).val(org_data);
+ var screentop=$(document).scrollTop();
+ $(".orgitdownContainer").css({"margin-top":screentop,});
+ $("#gnoweditor").val(org_data);
+ twistid=each_id;
+ //$("#save"+each_id).show();
+ $(".editcontent").hide();
+ $(".editor").hide();
+ $(".submitdelete").hide();
+ $(".commenteditor").hide();
+ $(".rating").hide();
+ $(".topicdelete").hide();
+ $(".chkdel").hide();
+ $(".topicchk").hide();
+ });
+
+
+ });
+
+ $.noConflict();
+ jQuery(document).ready(function($) {
+ $("#topicaddcontent").one("click",function() {
+ isTwist=true;
+ $("#chart").hide();
+ $("#content img").css({"max-width": "600px",})
+
+ $("#content").css({"width": "600px",})
+ document.getElementById('gnoweditor').style.visibility="visible";
+ $("#gnoweditor").orgitdown(mySettings);
+ var screentop=$(document).scrollTop();
+ $(".orgitdownContainer").css({"margin-top":screentop,});
+ // $("#topicaddsave").show();
+ });
+
+ $("#topicaddsave").one("click",function(){
+ var org_data = $("#gnoweditor").val();
+ var encode_data = encodeURIComponent(org_data);
+ var decode_data = decodeURIComponent(encode_data.replace(/\+/g, " "));
+ $("#contenttext").val(decode_data);
+ $('#topicsubmit').trigger('click');
+ $("#topicaddsave").hide();
+ });
+
+ $("#addthreadcontent").one("click",function() {
+ isThread=true;
+ $("#chart").hide();
+ $("#content img").css({"max-width": "600px",})
+
+ $("#content").css({"width": "600px",})
+ document.getElementById('gnoweditor').style.visibility="visible";
+ $("#gnoweditor").orgitdown(mySettings);
+ var screentop=$(document).scrollTop();
+ $(".orgitdownContainer").css({"margin-top":screentop,});
+ $("#addthreadcontent").hide();
+ // $("#threadsave").show();
+ });
+
+ $("#threadsave").one("click",function(){
+ var org_data = $("#gnoweditor").val();
+ var encode_data = encodeURIComponent(org_data);
+ var decode_data = decodeURIComponent(encode_data.replace(/\+/g, " "));
+ $("#threadcontent").val(decode_data);
+ $('.orgitdownContainer').hide();
+ $("#threadsave").hide();
+ $("#addthreadcontent").show();
+ });
+
+ });
+jQuery(document).ready(function($) {
+ $("#threadedit").one("click",function() {
+ editThread=true;
+ $("#chart").hide();
+ $("#content img").css({"max-width": "600px",})
+
+ $("#content").css({"width": "600px",})
+ document.getElementById('gnoweditor').style.visibility="visible";
+ $("#gnoweditor").orgitdown(mySettings);
+
+
+ var screentop=$(document).scrollTop();
+ $(".orgitdownContainer").css({"margin-top":screentop,});
+ var id=document.getElementById("threadid").value;
+ var org_data=document.getElementById("threadcontent"+id).value;
+ $("#gnoweditor").val(org_data);
+ $("#threadedit").hide();
+ $(".editor").hide();
+ $(".editcontent").hide();
+ $("#addthreadcontent").hide();
+ $("#twistaddbtn").hide();
+ $("#Release *").hide();
+ //$("#editthreadsave").show();
+ });
+
+ $("#editthreadsave").one("click",function() {
+ var id=document.getElementById("threadid").value;
+ var org_data=$("#gnoweditor").val();
+ $("#threadcontent"+id).val(org_data);
+ $('.orgitdownContainer').hide();
+ $("#threadsave").hide();
+ $("#threadedit"+id).val("editthread");
+ $(".commenteditor").hide();
+ $(".editcontent").hide();
+ $("#subeditresp").trigger('click');
+ });
+});
+
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
new file mode 100644
index 0000000..5c5297c
--- /dev/null
+++ b/gstudio/static/gstudio/js/orgitdown/orgitdown/sets/org/images/close.jpeg
Binary files differ
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();
+
});
+
});