From fb1ee2e284e5fa4c300feeb533994fe241f49aa6 Mon Sep 17 00:00:00 2001 From: Duncan Sommerville Date: Wed, 9 Sep 2015 17:25:40 -0400 Subject: [PATCH] Fix some issues with the users page --- airtime_mvc/public/css/dashboard.css | 3 ++ airtime_mvc/public/css/styles.css | 32 +++++++++++-------- .../library/events/library_showbuilder.js | 4 +-- airtime_mvc/public/js/airtime/user/user.js | 12 +++---- 4 files changed, 30 insertions(+), 21 deletions(-) diff --git a/airtime_mvc/public/css/dashboard.css b/airtime_mvc/public/css/dashboard.css index bbed8ad01..8a877a58e 100644 --- a/airtime_mvc/public/css/dashboard.css +++ b/airtime_mvc/public/css/dashboard.css @@ -673,6 +673,9 @@ th.library_checkbox { text-align: center !important; } +.ui-draggable { + -ms-touch-action: none; +} /* This is so dragged items show up above the layout */ diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css index 3b3ce0298..add500fc7 100644 --- a/airtime_mvc/public/css/styles.css +++ b/airtime_mvc/public/css/styles.css @@ -1772,17 +1772,20 @@ button, input { } .user-management { - width:910px; + min-width: 910px; min-height: 410px; } + .user-management-expanded { - width:910px; + width: 910px; } + .user-data { float:right; width:420px; margin-left:10px; } + .user-list-wrapper { float:left; width:480px; @@ -1792,14 +1795,7 @@ button, input { } #users_datatable { - border: 0px; -} - -#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; + border: 0; } #users_datatable_wrapper td { @@ -1808,7 +1804,7 @@ button, input { .user-management div.user-list-wrapper .ui-widget-header:first-child { background: none repeat scroll 0 0 transparent; - border-width: 0 0 1px; + border-width: 0; color: #444444; font-weight: bold; } @@ -3887,9 +3883,19 @@ li .ui-state-hover { flex: 1; } +#user_list_inner_wrapper { + height: 272px; + overflow: auto; +} + #users_datatable_wrapper { - /*position: absolute;*/ - min-height: 300px; + display: -webkit-box; + display: -moz-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-flow: column; + flex-flow: column; } #users_datatable { diff --git a/airtime_mvc/public/js/airtime/library/events/library_showbuilder.js b/airtime_mvc/public/js/airtime/library/events/library_showbuilder.js index 333b312cd..76f31270d 100644 --- a/airtime_mvc/public/js/airtime/library/events/library_showbuilder.js +++ b/airtime_mvc/public/js/airtime/library/events/library_showbuilder.js @@ -103,7 +103,7 @@ var AIRTIME = (function(AIRTIME) { } if ($("#show_builder_table").is(":visible")) { - $('#library_display tr.lib-audio, tr.lib-pl, tr.lib-stream') + $('#library_display tr[class*="lib-"]') .draggable( { helper: function () { @@ -142,7 +142,7 @@ var AIRTIME = (function(AIRTIME) { connectToSortable: '#show_builder_table' }); } else { - $('#library_display tr.lib-audio, tr.lib-stream, tr.lib-pl, tr.lib-block') + $('#library_display tr[class*="lib-"]') .draggable( { helper: function () { diff --git a/airtime_mvc/public/js/airtime/user/user.js b/airtime_mvc/public/js/airtime/user/user.js index 921369546..7a7480062 100644 --- a/airtime_mvc/public/js/airtime/user/user.js +++ b/airtime_mvc/public/js/airtime/user/user.js @@ -85,7 +85,8 @@ function rowCallback( nRow, aData, iDisplayIndex ){ } function populateUserTable() { - $('#users_datatable').dataTable( { + var dt = $('#users_datatable'); + dt.dataTable( { "bProcessing": true, "bServerSide": true, "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"), "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'); type.live("change", function(){ @@ -230,12 +231,12 @@ function init() { $(document).ready(function() { populateUserTable(); assignUserRightsToUserTypes(); - init(); + initUserData(); $('#save_user').live('click', function(){ var data = $('#user_form').serialize(); var url = baseUrl+'User/add-user'; - + $.post(url, {format: "json", data: data}, function(json){ if (json.valid === "true") { $('#content').empty().append(json.html); @@ -254,5 +255,4 @@ $(document).ready(function() { }); sizeFormElements(); - });