From 06f170eae6261d894b9651e549d42abdfcecf46c Mon Sep 17 00:00:00 2001 From: supriya Date: Thu, 12 Jul 2012 12:03:28 +0530 Subject: orgitdown with save functionality --- .../static/gstudio/js/orgitdown/orgitdown/sets/org/set.js | 3 ++- .../static/gstudio/js/orgitdown/orgitdown/sets/savedata.js | 12 +++++------- 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'gstudio/static/gstudio/js/orgitdown/orgitdown/sets') 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 5eed850..25b118e 100644 --- a/gstudio/static/gstudio/js/orgitdown/orgitdown/sets/org/set.js +++ b/gstudio/static/gstudio/js/orgitdown/orgitdown/sets/org/set.js @@ -14,6 +14,7 @@ var mySettings = { onAltEnter: {keepDefault:false, replaceWith:'\n* '}, onAltrightArrow: {keepDefault:false, replaceWith:'*'}, markupSet: [ + {name:'Save', key:'S',call:'save' }, {name:'Bold', key:'B', openWith:'*', closeWith:'*' }, {name:'Italic', key:'I', openWith:'/', closeWith:'/' }, {name:'Stroke through', key:'S', openWith:'+', closeWith:'+' }, @@ -21,7 +22,7 @@ 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:'[[file:fileName.jpg]]' }, + {name:'Picture', key:'P', replaceWith:'[[http:fileName.jpg]]' }, {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, "") } }, diff --git a/gstudio/static/gstudio/js/orgitdown/orgitdown/sets/savedata.js b/gstudio/static/gstudio/js/orgitdown/orgitdown/sets/savedata.js index f407075..eaf728c 100644 --- a/gstudio/static/gstudio/js/orgitdown/orgitdown/sets/savedata.js +++ b/gstudio/static/gstudio/js/orgitdown/orgitdown/sets/savedata.js @@ -1,15 +1,13 @@ $.noConflict(); jQuery(document).ready(function($) { - // Code that uses jQuery's $ can follow here. - $("#editdata").click(function(){ - // $("html").css({"margin":"0","padding": "0","overflow":"hidden","height": "100%"}); + $("#editdata").one("click",function() { $("#chart").hide(); + var orgdata = document.getElementById('orgcontent').value; document.getElementById('gnoweditor').style.visibility="visible"; - //$("#gnoweditor").show(); - $("#gnoweditor").orgitdown(mySettings); - // alert($("#gnoweditor").val()); + $("#gnoweditor").orgitdown(mySettings); + $("#gnoweditor").val(orgdata); - }); + }); }); -- cgit v1.1