diff options
author | supriya <supriya@dragbox.(none)> | 2012-08-07 11:41:01 +0530 |
---|---|---|
committer | supriya <supriya@dragbox.(none)> | 2012-08-07 11:41:01 +0530 |
commit | a97d8967426bda55381e0f235b26e51777228f5a (patch) | |
tree | 532dda45192f6b7dc03b716f21174702c880966a /gstudio/static/gstudio/js/addcontent.js | |
parent | e08547938d44b756fd1af529429f208214c36522 (diff) | |
download | gnowsys-a97d8967426bda55381e0f235b26e51777228f5a.tar.gz |
Wikipage added to gstudio
Diffstat (limited to 'gstudio/static/gstudio/js/addcontent.js')
-rw-r--r-- | gstudio/static/gstudio/js/addcontent.js | 232 |
1 files changed, 232 insertions, 0 deletions
diff --git a/gstudio/static/gstudio/js/addcontent.js b/gstudio/static/gstudio/js/addcontent.js new file mode 100644 index 00000000..9581aeb6 --- /dev/null +++ b/gstudio/static/gstudio/js/addcontent.js @@ -0,0 +1,232 @@ + $.noConflict(); + + jQuery(document).ready(function($) { + $("#addcontent").one("click",function(){ + //var abc = document.getElementById('pageid1').value; + //window.location.replace('sectionadd1/'+abc); + $("#chart").hide(); + // var orgdata = document.getElementById('orgcontent').value; + 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); + }); + + $("#pagecontent1").one("click",function() { + $("#chart").hide(); + document.getElementById('gnoweditor').style.visibility="visible"; + $("#gnoweditor").orgitdown(mySettings); + }); + $("#save").one("click",function() { + var org_data = $("#gnoweditor").val(); + document.getElementById("orgpage1").value = org_data; + var encode_data = encodeURIComponent(org_data); + }); + $("#editseccontent").one("click",function(){ + $("#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(){ + $("#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();} + }); + } + }); + } + }); + + } + }); + + + + + + + }); + + $("#editpagecontent").one("click",function(){ + //var abc = document.getElementById('pageid1').value; + //window.location.replace('sectionadd1/'+abc); + $("#chart").hide(); + // var orgdata = document.getElementById('orgcontent').value; + document.getElementById('gnoweditor').style.visibility="visible"; + + $("#gnoweditor").orgitdown(mySettings); + + // var org_data = $("#gnoweditor").val(); + + var a = document.getElementById('pageorg').value; + $("#gnoweditor").val(a); + var screenTop = $(document).scrollTop(); + $(".orgitdownContainer").css({ + "margin-top":screenTop,}); + + + }); + $("#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();} + }); + } + }); + } + }); + + } + }); + + + }); + + + $("#createsubsection").one("click",function(){ + $("#chart").hide(); + document.getElementById('gnoweditor').style.visibility="visible"; + $("#gnoweditor").orgitdown(mySettings); + $("#gnoweditor").val(''); + 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); + alert(org_data);}); + + $("#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); + + $.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();} + }); + } + }); + } + }); + + } + }); + + }); + }); + + + |