diff options
author | supriya <supriya@dragbox.(none)> | 2012-07-12 12:03:28 +0530 |
---|---|---|
committer | supriya <supriya@dragbox.(none)> | 2012-07-12 12:03:28 +0530 |
commit | 06f170eae6261d894b9651e549d42abdfcecf46c (patch) | |
tree | eeeb2be8a207110613129e4a1c0e3148390acd73 /objectapp/static/objectapp/js/orgitdown/orgitdown/jquery.orgitdown.js | |
parent | be4ded863eaf69cf6080f39ede26c8b343e0fecf (diff) | |
download | gnowsys-06f170eae6261d894b9651e549d42abdfcecf46c.tar.gz |
orgitdown with save functionality
Diffstat (limited to 'objectapp/static/objectapp/js/orgitdown/orgitdown/jquery.orgitdown.js')
-rwxr-xr-x | objectapp/static/objectapp/js/orgitdown/orgitdown/jquery.orgitdown.js | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/objectapp/static/objectapp/js/orgitdown/orgitdown/jquery.orgitdown.js b/objectapp/static/objectapp/js/orgitdown/orgitdown/jquery.orgitdown.js index fe3a487..c766300 100755 --- a/objectapp/static/objectapp/js/orgitdown/orgitdown/jquery.orgitdown.js +++ b/objectapp/static/objectapp/js/orgitdown/orgitdown/jquery.orgitdown.js @@ -438,7 +438,34 @@ } return selection; } - + function save() { + var org_data = $("#gnoweditor").val(); + var id = document.getElementById("objectid").value + document.getElementById("orgcontent").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();} + }); + } + }); + } + }); + + } + });} // open preview window function preview() { if (typeof options.previewHandler === 'function') { |