CC-6121 - Fix up user settings page

This commit is contained in:
Duncan Sommerville 2015-08-31 15:25:17 -04:00
parent 109a336504
commit f21e53b12e
4 changed files with 30 additions and 15 deletions

View file

@ -105,7 +105,7 @@ class Application_Form_AddUser extends Zend_Form
$this->addElement($select); $this->addElement($select);
$saveBtn = new Zend_Form_Element_Button('save_user'); $saveBtn = new Zend_Form_Element_Button('save_user');
$saveBtn->setAttrib('class', 'btn btn-small right-floated'); $saveBtn->setAttrib('class', 'btn right-floated');
$saveBtn->setIgnore(true); $saveBtn->setIgnore(true);
$saveBtn->setLabel(_('Save')); $saveBtn->setLabel(_('Save'));
$this->addElement($saveBtn); $this->addElement($saveBtn);

View file

@ -221,6 +221,11 @@
height: 16px; height: 16px;
background-image: url(images/ui-icons_ffffff_256x240.png); background-image: url(images/ui-icons_ffffff_256x240.png);
} }
.selected .ui-icon {
width: 16px;
height: 16px;
background-image: url(images/ui-icons_454545_256x240.png);
}
.ui-widget-content .ui-icon { .ui-widget-content .ui-icon {
background-image: url(images/ui-icons_ffffff_256x240.png); background-image: url(images/ui-icons_ffffff_256x240.png);
} }

View file

@ -1793,14 +1793,16 @@ button, input {
border: 0px; border: 0px;
} }
#users_datatable_wrapper > div.fg-toolbar.ui-toolbar.ui-widget-header.ui-corner-bl.ui-corner-br.ui-helper-clearfix #users_datatable_wrapper > div.fg-toolbar.ui-toolbar.ui-widget-header.ui-corner-bl.ui-corner-br.ui-helper-clearfix {
{
position: absolute; position: absolute;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
} }
#users_datatable_wrapper td {
vertical-align: middle;
}
.user-management div.user-list-wrapper .ui-widget-header:first-child { .user-management div.user-list-wrapper .ui-widget-header:first-child {
background: none repeat scroll 0 0 transparent; background: none repeat scroll 0 0 transparent;
@ -1816,7 +1818,8 @@ button, input {
padding-bottom: 12px; padding-bottom: 12px;
} }
.user-management .dataTables_filter input { .user-management .dataTables_filter input {
width: 93.8%; width: 100%;
box-sizing: border-box;
margin-bottom:8px; margin-bottom:8px;
} }
.user-data.simple-formblock dd { .user-data.simple-formblock dd {
@ -3843,7 +3846,7 @@ li .ui-state-hover {
} }
#users_datatable_wrapper { #users_datatable_wrapper {
position: absolute; /*position: absolute;*/
min-height: 300px; min-height: 300px;
} }

View file

@ -180,17 +180,17 @@ function assignUserRightsToUserTypes() {
} }
}); });
} }
$(document).ready(function() {
populateUserTable();
assignUserRightsToUserTypes();
$('#type').live("change", function(){ function init() {
var type = $('#type');
type.live("change", function(){
//when the title changes on live tipsy tooltips the changes take //when the title changes on live tipsy tooltips the changes take
//affect the next time tipsy is shown so we need to hide and re-show it //affect the next time tipsy is shown so we need to hide and re-show it
$(this).tipsy('hide').tipsy('show'); $(this).tipsy('hide').tipsy('show');
}); });
$('#type').tipsy({ type.tipsy({
gravity: 'w', gravity: 'w',
html: true, html: true,
opacity: 0.9, opacity: 0.9,
@ -211,15 +211,21 @@ $(document).ready(function() {
table.row('.selected').remove().draw( false ); table.row('.selected').remove().draw( false );
} ); } );
$('#type').tipsy('show'); type.tipsy('show');
var newUser = {login:"", first_name:"", last_name:"", type:"G", id:""}; var newUser = {login:"", first_name:"", last_name:"", type:"G", id:""};
$('#add_user_button').live('click', function(){ $('#add_user_button').live('click', function(){
populateForm(newUser); populateForm(newUser);
$("#user_details").css("visibility", "visible"); $("#user_details").css("visibility", "visible");
}); });
}
$(document).ready(function() {
populateUserTable();
assignUserRightsToUserTypes();
init();
$('#save_user').live('click', function(){ $('#save_user').live('click', function(){
var data = $('#user_form').serialize(); var data = $('#user_form').serialize();
var url = baseUrl+'User/add-user'; var url = baseUrl+'User/add-user';
@ -229,6 +235,7 @@ $(document).ready(function() {
$('#content').empty().append(json.html); $('#content').empty().append(json.html);
populateUserTable(); populateUserTable();
assignUserRightsToUserTypes(); assignUserRightsToUserTypes();
init(); // Reinitialize
} else { } else {
//if form is invalid we only need to redraw the form //if form is invalid we only need to redraw the form
$('#user_form').empty().append($(json.html).find('#user_form').children()); $('#user_form').empty().append($(json.html).find('#user_form').children());