Commit 7cc63904 authored by Gabriel L. Oliveira's avatar Gabriel L. Oliveira

Fix preference dialog layout

* Dynamize its 'width', so that it can show more options without
  breaking layout
* Add show effect when its opening
* Make it work synchronously, first getting user information
parent ecbbdd13
...@@ -892,8 +892,8 @@ div#login-box input.submit {\n ...@@ -892,8 +892,8 @@ div#login-box input.submit {\n
\n \n
div#preference_dialog {\n div#preference_dialog {\n
display:none;\n display:none;\n
width: 308px !important;\n
font-size: 14px;\n font-size: 14px;\n
white-space: nowrap;\n
}\n }\n
\n \n
fieldset.center.editable, fieldset.right.editable {\n fieldset.center.editable, fieldset.right.editable {\n
......
...@@ -400,9 +400,10 @@ $().ready(function(){\n ...@@ -400,9 +400,10 @@ $().ready(function(){\n
});\n });\n
$("div#preference_dialog").dialog({\n $("div#preference_dialog").dialog({\n
autoOpen: false,\n autoOpen: false,\n
height: 215,\n height: \'auto\',\n
width: 319,\n width: \'auto\',\n
modal:true,\n modal:true,\n
show: \'drop\',\n
buttons: {\n buttons: {\n
"Save": function(){\n "Save": function(){\n
var erp5PreferenceArgument = $("form#erp5_preference").serialize();\n var erp5PreferenceArgument = $("form#erp5_preference").serialize();\n
...@@ -454,20 +455,35 @@ $().ready(function(){\n ...@@ -454,20 +455,35 @@ $().ready(function(){\n
.click(function(event){\n .click(function(event){\n
event.preventDefault();\n event.preventDefault();\n
if ($("div#preference_dialog").html() == ""){\n if ($("div#preference_dialog").html() == ""){\n
$.getJSON("Base_getPreferencePathList", function(data){\n $.ajax({\n
ungPreferencePath = data.preference;\n url: "Base_getPreferencePathList",\n
$.get(ungPreferencePath + \'/Preference_viewHtmlStyle?editable_mode:int=1\', function(data){\n async: false,\n
$("div#preference_dialog").append("<form id=\'erp5_preference\'>" +\n dataType: \'json\',\n
"<fieldset class=\'center editable\'>" +\n success: function(data){\n
$(data).find(\'fieldset.center.editable\').html() +\n ungPreferencePath = data.preference;\n
"</fieldset></form>");\n $.ajax({\n
});\n url: ungPreferencePath + \'/Preference_viewHtmlStyle?editable_mode:int=1\',\n
$.get(ungPreferencePath + \'/UNGPreference_view?editable_mode:int=1\', function(data){\n async: false,\n
$("div#preference_dialog").append("<form id=\'ung_preference\'>" +\n method: \'get\',\n
"<fieldset class=\'center editable\'>" +\n success: function(data){\n
$(data).find(\'fieldset.center.editable\').html() +\n $("div#preference_dialog").append("<form id=\'erp5_preference\'>" +\n
"</fieldset></form>");\n "<fieldset class=\'center editable\'>" +\n
});\n $(data).find(\'fieldset.center.editable\').html() +\n
"</fieldset></form>");\n
}\n
});\n
$.ajax({\n
url: ungPreferencePath + \'/UNGPreference_view?editable_mode:int=1\',\n
async: false,\n
method: \'get\',\n
success: 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
}\n }\n
$("div#preference_dialog").dialog("open");\n $("div#preference_dialog").dialog("open");\n
......
2011-09-21 gabriel.oliveira
* Fix preference dialog layout
2011-09-21 gabriel.oliveira 2011-09-21 gabriel.oliveira
* Display document title only when necessary * Display document title only when necessary
......
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