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
$("div.content").css({"position":"fixed", "bottom": "0px",\n
"left": "0px", "right": "0px"});\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
}\n
}\n
......@@ -234,20 +243,25 @@ $(document).ready(function(){\n
});\n
$("div#preference_dialog").dialog({\n
autoOpen: false,\n
height: 436,\n
height: 487,\n
width: 330,\n
buttons: {\n
"Save": function(){\n
var ungPreferenceArgument = $("form#ung_preference").serialize();\n
var erp5PreferenceArgument = $("form#erp5_preference").serialize();\n
$.ajax({\n
url: ungPreferencePath + "/Base_edit",\n
data: ungPreferenceArgument + "&form_id=Preference_viewHtmlStyle",\n
data: erp5PreferenceArgument + "&form_id=Preference_viewHtmlStyle",\n
});\n
var systemPreferenceArgument = $("form#system_preference").serialize();\n
$.ajax({\n
url: systemPreferencePath + "/Base_edit",\n
data: systemPreferenceArgument + "&form_id=SystemPreference_view",\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
},\n
Cancel: function() {\n
......@@ -332,7 +346,7 @@ $(document).ready(function(){\n
systemPreferencePath = data.system_preference;\n
if ($("div#preference_dialog").html() == "") {\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
$(data).find(\'fieldset.center.editable\').html() +\n
"</fieldset></form>");\n
......@@ -343,6 +357,12 @@ $(document).ready(function(){\n
$(data).find(\'fieldset.right.editable\').html() +\n
"</fieldset></form>");\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
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
* Implemented javascript code to be possible save all changes on enabled preferences.
* Clean up the code to remove some global variables
......
146
\ No newline at end of file
147
\ 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