Commit 58211155 authored by Gabriel Monnerat's avatar Gabriel Monnerat

2010-12-28 gabriel

* Added javascript code to be possible choose the theme to Spreadsheet editor and save it

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41836 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 736a4382
...@@ -122,6 +122,15 @@ $(document).ready(function(){\n ...@@ -122,6 +122,15 @@ $(document).ready(function(){\n
$("div.content").css({"position":"fixed", "bottom": "0px",\n $("div.content").css({"position":"fixed", "bottom": "0px",\n
"left": "0px", "right": "0px"});\n "left": "0px", "right": "0px"});\n
$("div.content").css({"top": "6em"});\n $("div.content").css({"top": "6em"});\n
$.getJSON("Base_getPreferencePathList", function(data){\n
var ungPreferencePath = data.preference;\n
$.get(ungPreferencePath + \'/getPreferredThemeSheetEditor\', function(data){\n
link = $("<link>");\n
link.attr("id", "dynamic_css");\n
link.attr({type: \'text/css\', rel:\'stylesheet\', href:data});\n
$("head").append(link);\n
});\n
}); \n
break;\n break;\n
}\n }\n
}\n }\n
...@@ -234,20 +243,25 @@ $(document).ready(function(){\n ...@@ -234,20 +243,25 @@ $(document).ready(function(){\n
});\n });\n
$("div#preference_dialog").dialog({\n $("div#preference_dialog").dialog({\n
autoOpen: false,\n autoOpen: false,\n
height: 436,\n height: 487,\n
width: 330,\n width: 330,\n
buttons: {\n buttons: {\n
"Save": function(){\n "Save": function(){\n
var ungPreferenceArgument = $("form#ung_preference").serialize();\n var erp5PreferenceArgument = $("form#erp5_preference").serialize();\n
$.ajax({\n $.ajax({\n
url: ungPreferencePath + "/Base_edit",\n url: ungPreferencePath + "/Base_edit",\n
data: ungPreferenceArgument + "&form_id=Preference_viewHtmlStyle",\n data: erp5PreferenceArgument + "&form_id=Preference_viewHtmlStyle",\n
});\n });\n
var systemPreferenceArgument = $("form#system_preference").serialize();\n var systemPreferenceArgument = $("form#system_preference").serialize();\n
$.ajax({\n $.ajax({\n
url: systemPreferencePath + "/Base_edit",\n url: systemPreferencePath + "/Base_edit",\n
data: systemPreferenceArgument + "&form_id=SystemPreference_view",\n data: systemPreferenceArgument + "&form_id=SystemPreference_view",\n
});\n });\n
var ungPreferenceArgument = $("form#ung_preference").serialize();\n
$.ajax({\n
url: ungPreferencePath + "/Base_edit",\n
data: ungPreferenceArgument + "&form_id=UNGPreference_view",\n
});\n
location.reload();\n location.reload();\n
},\n },\n
Cancel: function() {\n Cancel: function() {\n
...@@ -332,7 +346,7 @@ $(document).ready(function(){\n ...@@ -332,7 +346,7 @@ $(document).ready(function(){\n
systemPreferencePath = data.system_preference;\n systemPreferencePath = data.system_preference;\n
if ($("div#preference_dialog").html() == "") {\n if ($("div#preference_dialog").html() == "") {\n
$.get(ungPreferencePath + \'/Preference_viewHtmlStyle?editable_mode:int=1\', function(data){\n $.get(ungPreferencePath + \'/Preference_viewHtmlStyle?editable_mode:int=1\', function(data){\n
$("div#preference_dialog").append("<form id=\'ung_preference\'>" + \n $("div#preference_dialog").append("<form id=\'erp5_preference\'>" + \n
"<fieldset class=\'center editable\'>" + \n "<fieldset class=\'center editable\'>" + \n
$(data).find(\'fieldset.center.editable\').html() +\n $(data).find(\'fieldset.center.editable\').html() +\n
"</fieldset></form>");\n "</fieldset></form>");\n
...@@ -343,6 +357,12 @@ $(document).ready(function(){\n ...@@ -343,6 +357,12 @@ $(document).ready(function(){\n
$(data).find(\'fieldset.right.editable\').html() +\n $(data).find(\'fieldset.right.editable\').html() +\n
"</fieldset></form>");\n "</fieldset></form>");\n
});\n });\n
$.get(ungPreferencePath + \'/UNGPreference_view?editable_mode:int=1\', function(data){\n
$("div#preference_dialog").append("<form id=\'ung_preference\'>" + \n
"<fieldset class=\'center editable\'>" + \n
$(data).find(\'fieldset.center.editable\').html() +\n
"</fieldset></form>");\n
});\n
}\n }\n
});\n });\n
return false;\n return false;\n
......
2010-12-28 gabriel
* Added javascript code to be possible choose the theme to Spreadsheet editor and save it
2010-12-27 gabriel 2010-12-27 gabriel
* Implemented javascript code to be possible save all changes on enabled preferences. * Implemented javascript code to be possible save all changes on enabled preferences.
* Clean up the code to remove some global variables * Clean up the code to remove some global variables
......
146 147
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment