From 3a0907b93ba496c1c8f0121e58491a0c858d3587 Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Thu, 13 Sep 2012 16:47:45 -0400 Subject: [PATCH 1/6] CC-4428: Make sure to remove *_datatable column on upgrade from cc_pref -fixed --- install_minimal/upgrades/airtime-2.2.0/data/upgrade.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install_minimal/upgrades/airtime-2.2.0/data/upgrade.sql b/install_minimal/upgrades/airtime-2.2.0/data/upgrade.sql index ab129de75..71f59a40d 100644 --- a/install_minimal/upgrades/airtime-2.2.0/data/upgrade.sql +++ b/install_minimal/upgrades/airtime-2.2.0/data/upgrade.sql @@ -1,6 +1,9 @@ DELETE FROM cc_pref WHERE keystr = 'system_version'; INSERT INTO cc_pref (keystr, valstr) VALUES ('system_version', '2.2.0'); +--DELETE user column order prefs, since the number of columns has increased in 2.2 +DELETE FROM cc_pref where keystr = 'library_datatable'; +DELETE FROM cc_pref where keystr = 'timeline_datatable'; INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s1_name', 'Airtime!', 'string'); INSERT INTO cc_stream_setting (keyname, value, type) VALUES ('s2_name', '', 'string'); From 0b917f385e9fda24c5df0fc4ce054740e6f6928a Mon Sep 17 00:00:00 2001 From: James Date: Thu, 13 Sep 2012 17:05:40 -0400 Subject: [PATCH 2/6] CC-4430: Block: Please don't count the removed files in when calculating how many files meet the criteria - fixed --- airtime_mvc/application/models/Block.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/airtime_mvc/application/models/Block.php b/airtime_mvc/application/models/Block.php index 93ada2b34..c40785d57 100644 --- a/airtime_mvc/application/models/Block.php +++ b/airtime_mvc/application/models/Block.php @@ -1297,6 +1297,9 @@ SQL; $i++; } } + + // check if file exists + $qry->add("file_exists", "true", Criteria::EQUAL); $qry->addAscendingOrderByColumn('random()'); } // construct limit restriction From 43503475fd8b29b1a4f6bcf51343674f1d01235a Mon Sep 17 00:00:00 2001 From: James Date: Thu, 13 Sep 2012 17:06:44 -0400 Subject: [PATCH 3/6] CC-4430: Block: Please don't count the removed files in when calculating how many files meet the criteria - CRLF fix --- airtime_mvc/application/models/Block.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/models/Block.php b/airtime_mvc/application/models/Block.php index c40785d57..0c349d9f4 100644 --- a/airtime_mvc/application/models/Block.php +++ b/airtime_mvc/application/models/Block.php @@ -1297,8 +1297,8 @@ SQL; $i++; } } - - // check if file exists + + // check if file exists $qry->add("file_exists", "true", Criteria::EQUAL); $qry->addAscendingOrderByColumn('random()'); } From d93fcec490067e8c49140511c726fb8c867a3b96 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 13 Sep 2012 17:09:10 -0400 Subject: [PATCH 4/6] CC-4424: Clicking "edit" on playlist allows you to preview tracks that should be disabled - fixed --- airtime_mvc/public/js/airtime/library/spl.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/public/js/airtime/library/spl.js b/airtime_mvc/public/js/airtime/library/spl.js index 4cc478f6a..11d5221c6 100644 --- a/airtime_mvc/public/js/airtime/library/spl.js +++ b/airtime_mvc/public/js/airtime/library/spl.js @@ -307,6 +307,7 @@ var AIRTIME = (function(AIRTIME){ setCueEvents(); setFadeEvents(); setModified(json.modified); + AIRTIME.playlist.validatePlaylistElements(); redrawLib(); } @@ -409,8 +410,6 @@ var AIRTIME = (function(AIRTIME){ $pl.delegate(".spl_cue", {"click": openCueEditor}); - - mod.validatePlaylistElements(); $pl.delegate(".spl_block_expand", {"click": function(ev){ @@ -773,6 +772,7 @@ var AIRTIME = (function(AIRTIME){ }()); $pl.find("#spl_sortable").sortable(sortableConf); + AIRTIME.playlist.validatePlaylistElements(); } mod.fnNew = function() { From 8f48544bb7a5862c359596df78f3096fb2ecd653 Mon Sep 17 00:00:00 2001 From: denise Date: Thu, 13 Sep 2012 17:10:38 -0400 Subject: [PATCH 5/6] -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 = $("