Fix some issues with the users page

This commit is contained in:
Duncan Sommerville 2015-09-09 17:25:40 -04:00
parent 03e23daba0
commit fb1ee2e284
4 changed files with 30 additions and 21 deletions

View File

@ -673,6 +673,9 @@ th.library_checkbox {
text-align: center !important; text-align: center !important;
} }
.ui-draggable {
-ms-touch-action: none;
}
/* This is so dragged items show up above the layout */ /* This is so dragged items show up above the layout */

View File

@ -1772,17 +1772,20 @@ button, input {
} }
.user-management { .user-management {
width:910px; min-width: 910px;
min-height: 410px; min-height: 410px;
} }
.user-management-expanded { .user-management-expanded {
width:910px; width: 910px;
} }
.user-data { .user-data {
float:right; float:right;
width:420px; width:420px;
margin-left:10px; margin-left:10px;
} }
.user-list-wrapper { .user-list-wrapper {
float:left; float:left;
width:480px; width:480px;
@ -1792,14 +1795,7 @@ button, input {
} }
#users_datatable { #users_datatable {
border: 0px; border: 0;
}
#users_datatable_wrapper > div.fg-toolbar.ui-toolbar.ui-widget-header.ui-corner-bl.ui-corner-br.ui-helper-clearfix {
position: absolute;
left: 0;
right: 0;
bottom: 0;
} }
#users_datatable_wrapper td { #users_datatable_wrapper td {
@ -1808,7 +1804,7 @@ button, input {
.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;
border-width: 0 0 1px; border-width: 0;
color: #444444; color: #444444;
font-weight: bold; font-weight: bold;
} }
@ -3887,9 +3883,19 @@ li .ui-state-hover {
flex: 1; flex: 1;
} }
#user_list_inner_wrapper {
height: 272px;
overflow: auto;
}
#users_datatable_wrapper { #users_datatable_wrapper {
/*position: absolute;*/ display: -webkit-box;
min-height: 300px; display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-flex-flow: column;
flex-flow: column;
} }
#users_datatable { #users_datatable {

View File

@ -103,7 +103,7 @@ var AIRTIME = (function(AIRTIME) {
} }
if ($("#show_builder_table").is(":visible")) { if ($("#show_builder_table").is(":visible")) {
$('#library_display tr.lib-audio, tr.lib-pl, tr.lib-stream') $('#library_display tr[class*="lib-"]')
.draggable( .draggable(
{ {
helper: function () { helper: function () {
@ -142,7 +142,7 @@ var AIRTIME = (function(AIRTIME) {
connectToSortable: '#show_builder_table' connectToSortable: '#show_builder_table'
}); });
} else { } else {
$('#library_display tr.lib-audio, tr.lib-stream, tr.lib-pl, tr.lib-block') $('#library_display tr[class*="lib-"]')
.draggable( .draggable(
{ {
helper: function () { helper: function () {

View File

@ -85,7 +85,8 @@ function rowCallback( nRow, aData, iDisplayIndex ){
} }
function populateUserTable() { function populateUserTable() {
$('#users_datatable').dataTable( { var dt = $('#users_datatable');
dt.dataTable( {
"bProcessing": true, "bProcessing": true,
"bServerSide": true, "bServerSide": true,
"sAjaxSource": baseUrl+"User/get-user-data-table-info/format/json", "sAjaxSource": baseUrl+"User/get-user-data-table-info/format/json",
@ -118,7 +119,7 @@ function populateUserTable() {
"sInfoEmpty": $.i18n._("Showing 0 to 0 of 0 users"), "sInfoEmpty": $.i18n._("Showing 0 to 0 of 0 users"),
"sInfoFiltered": $.i18n._("(filtered from _MAX_ total users)"), "sInfoFiltered": $.i18n._("(filtered from _MAX_ total users)"),
}), }),
"sDom": '<"H"lf<"dt-process-rel"r>>t<"F"ip>', "sDom": '<"H"lf<"dt-process-rel"r>><"#user_list_inner_wrapper"t><"F"ip>'
}); });
} }
@ -187,7 +188,7 @@ function assignUserRightsToUserTypes() {
}); });
} }
function init() { function initUserData() {
var type = $('#type'); var type = $('#type');
type.live("change", function(){ type.live("change", function(){
@ -230,7 +231,7 @@ function init() {
$(document).ready(function() { $(document).ready(function() {
populateUserTable(); populateUserTable();
assignUserRightsToUserTypes(); assignUserRightsToUserTypes();
init(); initUserData();
$('#save_user').live('click', function(){ $('#save_user').live('click', function(){
var data = $('#user_form').serialize(); var data = $('#user_form').serialize();
@ -254,5 +255,4 @@ $(document).ready(function() {
}); });
sizeFormElements(); sizeFormElements();
}); });