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
\n
div#preference_dialog {\n
display:none;\n
width: 308px !important;\n
font-size: 14px;\n
white-space: nowrap;\n
}\n
\n
fieldset.center.editable, fieldset.right.editable {\n
......
......@@ -400,9 +400,10 @@ $().ready(function(){\n
});\n
$("div#preference_dialog").dialog({\n
autoOpen: false,\n
height: 215,\n
width: 319,\n
height: \'auto\',\n
width: \'auto\',\n
modal:true,\n
show: \'drop\',\n
buttons: {\n
"Save": function(){\n
var erp5PreferenceArgument = $("form#erp5_preference").serialize();\n
......@@ -454,20 +455,35 @@ $().ready(function(){\n
.click(function(event){\n
event.preventDefault();\n
if ($("div#preference_dialog").html() == ""){\n
$.getJSON("Base_getPreferencePathList", function(data){\n
ungPreferencePath = data.preference;\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(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
$.ajax({\n
url: "Base_getPreferencePathList",\n
async: false,\n
dataType: \'json\',\n
success: function(data){\n
ungPreferencePath = data.preference;\n
$.ajax({\n
url: ungPreferencePath + \'/Preference_viewHtmlStyle?editable_mode:int=1\',\n
async: false,\n
method: \'get\',\n
success: 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
});\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
$("div#preference_dialog").dialog("open");\n
......
2011-09-21 gabriel.oliveira
* Fix preference dialog layout
2011-09-21 gabriel.oliveira
* 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