Commit eb95dbfc authored by Gabriel Monnerat's avatar Gabriel Monnerat

- fix identation

- refactor javascript code to don't load UNG preferences when it is not used

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42537 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ae3782f4
...@@ -86,7 +86,7 @@ function checkConversion(){\n ...@@ -86,7 +86,7 @@ function checkConversion(){\n
clearTimeout();\n clearTimeout();\n
setTimeout(updateWebPage(), 1000);\n setTimeout(updateWebPage(), 1000);\n
}\n }\n
});\n });\n
}\n }\n
\n \n
function setObjectPropertyValue(method_name, value, parameter){\n function setObjectPropertyValue(method_name, value, parameter){\n
...@@ -178,6 +178,31 @@ $().ready(function(){\n ...@@ -178,6 +178,31 @@ $().ready(function(){\n
}\n }\n
if ($("div.listbox-navigation").text() == "null")\n if ($("div.listbox-navigation").text() == "null")\n
$("div.listbox-navigation").hide();\n $("div.listbox-navigation").hide();\n
$.getJSON("WebSection_getGadgetPathList", function(data){\n
gadgetList = jQuery(data);\n
gadgetList.each(function(){\n
$("div.gadget-listbox table#gadget-table")\n
.append($(\'<tr>\')\n
.append($(\'<td>\')\n
.append($(\'<input>\')\n
.attr(\'type\', \'checkbox\')\n
.attr(\'id\', this.id)\n
) \n
)\n
.append($(\'<td>\')\n
.append($(\'<a>\')\n
.text(this.title)\n
)\n
)\n
.append($(\'<td>\')\n
.append($(\'<img>\')\n
.attr(\'src\', this.image_url)\n
.text(this.title)\n
)\n
)\n
);\n
});\n
});\n
}\n }\n
else {\n else {\n
$("div.action_menu ul li a").click(function(event){\n $("div.action_menu ul li a").click(function(event){\n
...@@ -204,8 +229,7 @@ $().ready(function(){\n ...@@ -204,8 +229,7 @@ $().ready(function(){\n
location.reload();\n location.reload();\n
});\n });\n
};\n };\n
$("div.action_menu li ul").css("height",\n $("div.action_menu li ul").css("height", $("div.action_menu li ul li").length * 25.3 + "px");\n
$("div.action_menu li ul li").length * 25.3 + "px");\n
if ($("a[name=\'document_state\']").text() == "Shared"){\n if ($("a[name=\'document_state\']").text() == "Shared"){\n
reference = $.ajax({\n reference = $.ajax({\n
url: \'getReference\',\n url: \'getReference\',\n
...@@ -337,6 +361,30 @@ $().ready(function(){\n ...@@ -337,6 +361,30 @@ $().ready(function(){\n
$("a#settings")\n $("a#settings")\n
.click(function(event){\n .click(function(event){\n
event.preventDefault();\n event.preventDefault();\n
$.getJSON("Base_getPreferencePathList", function(data){\n
ungPreferencePath = data.preference;\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=\'erp5_preference\'>" + \n
"<fieldset class=\'center editable\'>" + \n
$(data).find(\'fieldset.center.editable\').html() +\n
"</fieldset></form>");\n
});\n
$.get(systemPreferencePath + \'/SystemPreference_view?editable_mode:int=1\', function(data){\n
$("div#preference_dialog").append("<form id=\'system_preference\'>" + \n
"<fieldset class=\'right editable\'>" + \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
$("div#preference_dialog").dialog("open");\n $("div#preference_dialog").dialog("open");\n
});\n });\n
$("button.ui-button, span.ui-icon").click(function(){$("p#hide_properties").click()});\n $("button.ui-button, span.ui-icon").click(function(){$("p#hide_properties").click()});\n
...@@ -383,55 +431,6 @@ $().ready(function(){\n ...@@ -383,55 +431,6 @@ $().ready(function(){\n
event.preventDefault();\n event.preventDefault();\n
changeCheckBoxValue(false);\n changeCheckBoxValue(false);\n
});\n });\n
$.getJSON("Base_getPreferencePathList", function(data){\n
ungPreferencePath = data.preference;\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=\'erp5_preference\'>" + \n
"<fieldset class=\'center editable\'>" + \n
$(data).find(\'fieldset.center.editable\').html() +\n
"</fieldset></form>");\n
});\n
$.get(systemPreferencePath + \'/SystemPreference_view?editable_mode:int=1\', function(data){\n
$("div#preference_dialog").append("<form id=\'system_preference\'>" + \n
"<fieldset class=\'right editable\'>" + \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
$.getJSON("WebSection_getGadgetPathList", function(data){\n
gadgetList = jQuery(data);\n
gadgetList.each(function(){\n
$("div.gadget-listbox table#gadget-table")\n
.append($(\'<tr>\')\n
.append($(\'<td>\')\n
.append($(\'<input>\')\n
.attr(\'type\', \'checkbox\')\n
.attr(\'id\', this.id)\n
)\n
)\n
.append($(\'<td>\')\n
.append($(\'<a>\')\n
.text(this.title)\n
)\n
)\n
.append($(\'<td>\')\n
.append($(\'<img>\')\n
.attr(\'src\', this.image_url)\n
.text(this.title)\n
)\n
)\n
);\n
});\n
});\n
$("span#knowledge_pad_module_8_titlean").text("1");\n $("span#knowledge_pad_module_8_titlean").text("1");\n
if ($("#tab-list-container #tabs ul li").length > 2) {\n if ($("#tab-list-container #tabs ul li").length > 2) {\n
$("li#add_new_tab_dialog_link.tab").hide()\n $("li#add_new_tab_dialog_link.tab").hide()\n
......
...@@ -883,6 +883,7 @@ span#ui-dialog-title-preference_dialog {\n ...@@ -883,6 +883,7 @@ span#ui-dialog-title-preference_dialog {\n
margin-top: -3px;\n margin-top: -3px;\n
margin-left: -10px;\n margin-left: -10px;\n
font-size: 17px;\n font-size: 17px;\n
color: #222222 !important;\n
}\n }\n
\n \n
div#preference_dialog div.field {\n div#preference_dialog div.field {\n
......
178 179
\ 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