From b8ca0ef740534de751e54b1fbf39ff1a75ca7704 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Mon, 5 Mar 2012 15:39:18 +0100 Subject: [PATCH] CC-3174 : showbuidler fixing width of search input so it will work on smaller screens. --- airtime_mvc/public/css/showbuilder.css | 2 +- airtime_mvc/public/css/styles.css | 2 +- .../public/js/airtime/schedule/schedule.js | 20 +++++++++++++------ 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/airtime_mvc/public/css/showbuilder.css b/airtime_mvc/public/css/showbuilder.css index c17319817..3aac1fc05 100644 --- a/airtime_mvc/public/css/showbuilder.css +++ b/airtime_mvc/public/css/showbuilder.css @@ -62,7 +62,7 @@ tr.cursor-selected-row .marker { } .ui-dialog .padded { - padding: 8px 10px 8px 8px; + padding: 5px 10px 5px 8px; } .ui-dialog .ui-buttonset { diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css index 5215c675e..16f737681 100644 --- a/airtime_mvc/public/css/styles.css +++ b/airtime_mvc/public/css/styles.css @@ -623,7 +623,7 @@ dl.inline-list dd { width: 55%; border: 1px solid #5B5B5B; margin-left: -8px; - padding: 4px 3px 4px 25px; + padding: 5px 3px 4px 25px; } .dataTables_length select { background-color: #DDDDDD; diff --git a/airtime_mvc/public/js/airtime/schedule/schedule.js b/airtime_mvc/public/js/airtime/schedule/schedule.js index 192a64488..2b613d307 100644 --- a/airtime_mvc/public/js/airtime/schedule/schedule.js +++ b/airtime_mvc/public/js/airtime/schedule/schedule.js @@ -106,16 +106,17 @@ function buildScheduleDialog (json) { //subtract padding in pixels widgetWidth = width - 50, libWidth = Math.floor(widgetWidth * 0.5), - builderWidth = Math.floor(widgetWidth * 0.5); - - + builderWidth = Math.floor(widgetWidth * 0.5), + libLength, + libType, + libFilter; dialog.find("#library_content") - .height(height - 125) + .height(height - 110) .width(libWidth); dialog.find("#show_builder") - .height(height - 125) + .height(height - 110) .width(builderWidth); dialog.dialog({ @@ -132,7 +133,7 @@ function buildScheduleDialog (json) { $("#schedule_calendar").fullCalendar( 'refetchEvents' ); }} }); - + //set the start end times so the builder datatables knows its time range. fnServer.start = json.start; fnServer.end = json.end; @@ -141,6 +142,13 @@ function buildScheduleDialog (json) { AIRTIME.showbuilder.builderDataTable(); dialog.dialog('open'); + + //calculate dynamically width fo the library search input. + libLength = dialog.find("#library_display_length"); + libType = dialog.find("#library_display_type"); + libFilter = dialog.find("#library_display_filter"); + + libFilter.find("input").width(libFilter.width() - libType.width() - libLength.width() - 80); } function buildContentDialog (json){