From 94535d4adc3a4960795d22e3b229a8375de10b74 Mon Sep 17 00:00:00 2001 From: supriya Date: Wed, 26 Sep 2012 15:49:52 +0530 Subject: all modules integrated --- .../js/orgitdown/orgitdown/jquery.orgitdown.js | 0 .../js/orgitdown/orgitdown/sets/savedata.js | 33 +++++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) mode change 100755 => 100644 objectapp/static/objectapp/js/orgitdown/orgitdown/jquery.orgitdown.js (limited to 'objectapp/static') diff --git a/objectapp/static/objectapp/js/orgitdown/orgitdown/jquery.orgitdown.js b/objectapp/static/objectapp/js/orgitdown/orgitdown/jquery.orgitdown.js old mode 100755 new mode 100644 diff --git a/objectapp/static/objectapp/js/orgitdown/orgitdown/sets/savedata.js b/objectapp/static/objectapp/js/orgitdown/orgitdown/sets/savedata.js index eaf728c3..2fb78ed0 100644 --- a/objectapp/static/objectapp/js/orgitdown/orgitdown/sets/savedata.js +++ b/objectapp/static/objectapp/js/orgitdown/orgitdown/sets/savedata.js @@ -6,8 +6,39 @@ document.getElementById('gnoweditor').style.visibility="visible"; $("#gnoweditor").orgitdown(mySettings); $("#gnoweditor").val(orgdata); + $("#editdata").hide(); + $("#savecontent").show(); }); - + $("#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) { + $.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();} + }); + } + }); + } + }); + + } + }); + + }); }); -- cgit v1.2.3-70-g09d2