From 8f48544bb7a5862c359596df78f3096fb2ecd653 Mon Sep 17 00:00:00 2001 From: denise Date: Thu, 13 Sep 2012 17:10:38 -0400 Subject: [PATCH] -implemented UI changes for Now Playing page --- .../views/scripts/form/showbuilder.phtml | 6 +- .../views/scripts/showbuilder/index.phtml | 6 +- airtime_mvc/public/css/media_library.css | 2 +- .../public/js/airtime/buttons/buttons.js | 80 +- .../public/js/airtime/showbuilder/builder.js | 93 +- .../js/airtime/showbuilder/main_builder.js | 2 +- .../js/datatables/plugin/dataTables.ColVis.js | 1743 +++++++++-------- .../plugin/dataTables.ColVis_orig.js | 995 ++++++++++ 8 files changed, 1969 insertions(+), 958 deletions(-) create mode 100644 airtime_mvc/public/js/datatables/plugin/dataTables.ColVis_orig.js diff --git a/airtime_mvc/application/views/scripts/form/showbuilder.phtml b/airtime_mvc/application/views/scripts/form/showbuilder.phtml index ddca06770..877f28849 100644 --- a/airtime_mvc/application/views/scripts/form/showbuilder.phtml +++ b/airtime_mvc/application/views/scripts/form/showbuilder.phtml @@ -2,9 +2,9 @@ element->getElement('sb_time_start'); ?> element->getElement('sb_date_end'); ?> element->getElement('sb_time_end'); ?> -
- -
+ + + Find Shows
diff --git a/airtime_mvc/application/views/scripts/showbuilder/index.phtml b/airtime_mvc/application/views/scripts/showbuilder/index.phtml index 6e708004c..f159ba99b 100644 --- a/airtime_mvc/application/views/scripts/showbuilder/index.phtml +++ b/airtime_mvc/application/views/scripts/showbuilder/index.phtml @@ -11,9 +11,9 @@
disableLib && !$this->showLib):?> -
- -
+ + Schedule files + sb_form; ?>
diff --git a/airtime_mvc/public/css/media_library.css b/airtime_mvc/public/css/media_library.css index 3b0db5046..06120698d 100644 --- a/airtime_mvc/public/css/media_library.css +++ b/airtime_mvc/public/css/media_library.css @@ -146,7 +146,7 @@ td.library_bitrate { } -.fg-toolbar .btn-toolbar {margin: 6px 5px 6px 2px;} +.fg-toolbar .btn-toolbar {margin: 6px 5px -6px 5px;} /* ///////////////////// ADVANCED SEARCH ///////////////////// */ diff --git a/airtime_mvc/public/js/airtime/buttons/buttons.js b/airtime_mvc/public/js/airtime/buttons/buttons.js index 7af88e352..23a904001 100644 --- a/airtime_mvc/public/js/airtime/buttons/buttons.js +++ b/airtime_mvc/public/js/airtime/buttons/buttons.js @@ -1,39 +1,45 @@ -var AIRTIME = (function(AIRTIME){ - var mod, - DEFAULT_CLASS = 'ui-button ui-state-default', - DISABLED_CLASS = 'ui-state-disabled'; - - if (AIRTIME.button === undefined) { - AIRTIME.button = {}; - } - mod = AIRTIME.button; - - mod.isDisabled = function(c) { - var button = $("."+c); - - if (button.hasClass(DISABLED_CLASS)) { - return true; - } - - return false; - }; - - mod.enableButton = function(c) { - var button = $("."+c); - - if (button.hasClass(DISABLED_CLASS)) { - button.removeClass(DISABLED_CLASS); - } - }; +var AIRTIME = (function(AIRTIME) { + var mod, DEFAULT_CLASS = 'ui-button ui-state-default', DISABLED_CLASS = 'ui-state-disabled'; + + if (AIRTIME.button === undefined) { + AIRTIME.button = {}; + } + mod = AIRTIME.button; + + mod.isDisabled = function(c) { + var button = $("." + c); + + if (button.hasClass(DISABLED_CLASS)) { + return true; + } + + return false; + }; + + mod.enableButton = function(c, useParent) { + if (useParent) { + var button = $("." + c).parent(); + } else { + var button = $("." + c); + } + + if (button.hasClass(DISABLED_CLASS)) { + button.removeClass(DISABLED_CLASS); + } + }; + + mod.disableButton = function(c, useParent) { + if (useParent) { + var button = $("." + c).parent(); + } else { + var button = $("." + c); + } + + if (!button.hasClass(DISABLED_CLASS)) { + button.addClass(DISABLED_CLASS); + } + }; + + return AIRTIME; - mod.disableButton = function(c) { - var button = $("."+c); - - if (!button.hasClass(DISABLED_CLASS)) { - button.addClass(DISABLED_CLASS); - } - }; - - return AIRTIME; - }(AIRTIME || {})); \ No newline at end of file diff --git a/airtime_mvc/public/js/airtime/showbuilder/builder.js b/airtime_mvc/public/js/airtime/showbuilder/builder.js index 8af595775..942bfbf0d 100644 --- a/airtime_mvc/public/js/airtime/showbuilder/builder.js +++ b/airtime_mvc/public/js/airtime/showbuilder/builder.js @@ -66,10 +66,10 @@ var AIRTIME = (function(AIRTIME){ var $selectable = $sbTable.find("tbody").find("input:checkbox"); if ($selectable.length !== 0) { - AIRTIME.button.enableButton("sb-button-select"); + AIRTIME.button.enableButton("btn-group #timeline-select", true); } else { - AIRTIME.button.disableButton("sb-button-select"); + AIRTIME.button.disableButton("btn-group #timeline-select", true); } }; @@ -77,10 +77,10 @@ var AIRTIME = (function(AIRTIME){ var $over = $sbTable.find(".sb-over.sb-allowed"); if ($over.length !== 0) { - AIRTIME.button.enableButton("sb-button-trim"); + AIRTIME.button.enableButton("icon-cut", true); } else { - AIRTIME.button.disableButton("sb-button-trim"); + AIRTIME.button.disableButton("icon-cut", true); } }; @@ -88,10 +88,10 @@ var AIRTIME = (function(AIRTIME){ var $selected = $sbTable.find("tbody").find("input:checkbox").filter(":checked"); if ($selected.length !== 0) { - AIRTIME.button.enableButton("sb-button-delete"); + AIRTIME.button.enableButton("icon-trash", true); } else { - AIRTIME.button.disableButton("sb-button-delete"); + AIRTIME.button.disableButton("icon-trash", true); } }; @@ -99,10 +99,10 @@ var AIRTIME = (function(AIRTIME){ var $current = $sbTable.find("."+NOW_PLAYING_CLASS); if ($current.length !== 0) { - AIRTIME.button.enableButton("sb-button-current"); + AIRTIME.button.enableButton("icon-step-forward", true); } else { - AIRTIME.button.disableButton("sb-button-current"); + AIRTIME.button.disableButton("icon-step-forward", true); } }; @@ -113,10 +113,10 @@ var AIRTIME = (function(AIRTIME){ userType = localStorage.getItem('user-type'); if ($current.length !== 0 && (userType === 'A' || userType === 'P')) { - AIRTIME.button.enableButton("sb-button-cancel"); + AIRTIME.button.enableButton("icon-ban-circle", true); } else { - AIRTIME.button.disableButton("sb-button-cancel"); + AIRTIME.button.disableButton("icon-ban-circle", true); } }; @@ -333,15 +333,15 @@ var AIRTIME = (function(AIRTIME){ /* * Icon hover states in the toolbar. */ - $sbContent.on("mouseenter", ".fg-toolbar ul li", function(ev) { + $sbContent.on("mouseenter", "#timeline-select .dropdown-toggle", function(ev) { $el = $(this); if (!$el.hasClass("ui-state-disabled")) { $el.addClass("ui-state-hover"); - $("#show_builder .ui-icon-document-b").contextMenu(true); + $("#timeline-select .caret").contextMenu(true); } else { - $("#show_builder .ui-icon-document-b").contextMenu(false); + $("#timeline-select .caret").contextMenu(false); } }); $sbContent.on("mouseleave", ".fg-toolbar ul li", function(ev) { @@ -958,37 +958,44 @@ var AIRTIME = (function(AIRTIME){ //start setup of the builder toolbar. $toolbar = $(".sb-content .fg-toolbar"); + + $menu = $("
"); + $menu.append("
" + + "" + + "" + + "
") + .append("
" + + "
") + .append("
" + + "
") + .append("
" + + "
") + .append("
" + + "
"); + + $toolbar.append($menu); + $menu = undefined; - $ul = $("