From 84baef199636f87b713283684f1aac0dae1c5d79 Mon Sep 17 00:00:00 2001 From: Duncan Sommerville Date: Tue, 25 Aug 2015 17:09:05 -0400 Subject: [PATCH] CC-6097, CC-6091, CC-6080, CC-6066 - css fixes and more work on add/remove content screen --- .../controllers/LibraryController.php | 179 +++++++++--------- .../controllers/ScheduleController.php | 2 +- .../controllers/ShowbuilderController.php | 2 +- .../controllers/SystemstatusController.php | 22 --- airtime_mvc/application/forms/EditAudioMD.php | 2 +- .../application/layouts/scripts/layout.phtml | 4 +- .../layouts/scripts/showbuilder.phtml | 172 ----------------- airtime_mvc/application/models/StoredFile.php | 1 + .../scripts/showbuilder/builderDialog.phtml | 17 +- .../views/scripts/showbuilder/index.phtml | 2 +- .../css/{_showbuilder.css => dashboard.css} | 0 airtime_mvc/public/css/showbuilder.css | 2 +- airtime_mvc/public/css/styles.css | 35 +++- .../public/js/airtime/library/library.js | 5 +- .../public/js/airtime/schedule/schedule.js | 13 +- .../public/js/airtime/showbuilder/builder.js | 12 +- .../js/airtime/showbuilder/main_builder.js | 17 +- 17 files changed, 169 insertions(+), 318 deletions(-) delete mode 100644 airtime_mvc/application/controllers/SystemstatusController.php delete mode 100644 airtime_mvc/application/layouts/scripts/showbuilder.phtml rename airtime_mvc/public/css/{_showbuilder.css => dashboard.css} (100%) diff --git a/airtime_mvc/application/controllers/LibraryController.php b/airtime_mvc/application/controllers/LibraryController.php index 82faa4b89..8ae173d98 100644 --- a/airtime_mvc/application/controllers/LibraryController.php +++ b/airtime_mvc/application/controllers/LibraryController.php @@ -23,95 +23,96 @@ class LibraryController extends Zend_Controller_Action public function indexAction() { - $CC_CONFIG = Config::getConfig(); - - $request = $this->getRequest(); - $baseUrl = Application_Common_OsPath::getBaseDir(); - - $this->view->headScript()->appendFile($baseUrl.'js/blockui/jquery.blockUI.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/contextmenu/jquery.contextMenu.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/datatables/js/jquery.dataTables.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.pluginAPI.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.fnSetFilteringDelay.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.ColVis.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.colReorder.min.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.FixedColumns.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.columnFilter.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - - $this->view->headScript()->appendFile($baseUrl.'js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/airtime/utilities/utilities.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/airtime/library/library.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/airtime/library/events/library_playlistbuilder.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - - $this->view->headLink()->appendStylesheet($baseUrl.'css/media_library.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.contextMenu.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'css/datatables/css/ColVis.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'css/datatables/css/dataTables.colReorder.min.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'css/waveform.css?'.$CC_CONFIG['airtime_version']); - - $this->view->headScript()->appendFile($baseUrl.'js/airtime/library/spl.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/airtime/playlist/smart_blockbuilder.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - - $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/observer/observer.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/config.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/curves.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/fades.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/local_storage.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/controls.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/playout.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/track_render.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/track.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/time_scale.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/playlist.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); - - //arbitrary attributes need to be allowed to set an id for the templates. - $this->view->headScript()->setAllowArbitraryAttributes(true); - //$this->view->headScript()->appendScript(file_get_contents(APPLICATION_PATH.'/../public/js/waveformplaylist/templates/bottombar.tpl'), - // 'text/template', array('id' => 'tpl_playlist_cues', 'noescape' => true)); - - $this->view->headLink()->appendStylesheet($baseUrl.'css/playlist_builder.css?'.$CC_CONFIG['airtime_version']); - - try { - - $obj_sess = new Zend_Session_Namespace(UI_PLAYLISTCONTROLLER_OBJ_SESSNAME); - if (isset($obj_sess->id)) { - $objInfo = Application_Model_Library::getObjInfo($obj_sess->type); - $obj = new $objInfo['className']($obj_sess->id); - $userInfo = Zend_Auth::getInstance()->getStorage()->read(); - $user = new Application_Model_User($userInfo->id); - $isAdminOrPM = $user->isUserType(array(UTYPE_SUPERADMIN, UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER)); - - if ($isAdminOrPM || $obj->getCreatorId() == $userInfo->id) { - $this->view->obj = $obj; - if ($obj_sess->type == "block") { - $form = new Application_Form_SmartBlockCriteria(); - $form->startForm($obj_sess->id); - $this->view->form = $form; - } - } - - $formatter = new LengthFormatter($obj->getLength()); - $this->view->length = $formatter->format(); - $this->view->type = $obj_sess->type; - } - - //get user settings and determine if we need to hide - // or show the playlist editor - $showPlaylist = false; - $data = Application_Model_Preference::getLibraryScreenSettings(); - if (!is_null($data)) { - if ($data["playlist"] == "true") { - $showPlaylist = true; - } - } - $this->view->showPlaylist = $showPlaylist; - } catch (PlaylistNotFoundException $e) { - $this->playlistNotFound($obj_sess->type); - } catch (Exception $e) { - $this->playlistNotFound($obj_sess->type); - Logging::info($e->getMessage()); - //$this->playlistUnknownError($e); - } + $this->_redirect("showbuilder"); +// $CC_CONFIG = Config::getConfig(); +// +// $request = $this->getRequest(); +// $baseUrl = Application_Common_OsPath::getBaseDir(); +// +// $this->view->headScript()->appendFile($baseUrl.'js/blockui/jquery.blockUI.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); +// $this->view->headScript()->appendFile($baseUrl.'js/contextmenu/jquery.contextMenu.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); +// $this->view->headScript()->appendFile($baseUrl.'js/datatables/js/jquery.dataTables.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); +// $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.pluginAPI.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); +// $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.fnSetFilteringDelay.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); +// $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.ColVis.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); +// $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.colReorder.min.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); +// $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.FixedColumns.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); +// $this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/dataTables.columnFilter.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); +// +// $this->view->headScript()->appendFile($baseUrl.'js/airtime/buttons/buttons.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); +// $this->view->headScript()->appendFile($baseUrl.'js/airtime/utilities/utilities.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); +// $this->view->headScript()->appendFile($baseUrl.'js/airtime/library/library.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); +// $this->view->headScript()->appendFile($baseUrl.'js/airtime/library/events/library_playlistbuilder.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); +// +// $this->view->headLink()->appendStylesheet($baseUrl.'css/media_library.css?'.$CC_CONFIG['airtime_version']); +// $this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.contextMenu.css?'.$CC_CONFIG['airtime_version']); +// $this->view->headLink()->appendStylesheet($baseUrl.'css/datatables/css/ColVis.css?'.$CC_CONFIG['airtime_version']); +// $this->view->headLink()->appendStylesheet($baseUrl.'css/datatables/css/dataTables.colReorder.min.css?'.$CC_CONFIG['airtime_version']); +// $this->view->headLink()->appendStylesheet($baseUrl.'css/waveform.css?'.$CC_CONFIG['airtime_version']); +// +// $this->view->headScript()->appendFile($baseUrl.'js/airtime/library/spl.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); +// $this->view->headScript()->appendFile($baseUrl.'js/airtime/playlist/smart_blockbuilder.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); +// +// $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/observer/observer.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); +// $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/config.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); +// $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/curves.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); +// $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/fades.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); +// $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/local_storage.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); +// $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/controls.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); +// $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/playout.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); +// $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/track_render.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); +// $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/track.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); +// $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/time_scale.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); +// $this->view->headScript()->appendFile($baseUrl.'js/waveformplaylist/playlist.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); +// +// //arbitrary attributes need to be allowed to set an id for the templates. +// $this->view->headScript()->setAllowArbitraryAttributes(true); +// //$this->view->headScript()->appendScript(file_get_contents(APPLICATION_PATH.'/../public/js/waveformplaylist/templates/bottombar.tpl'), +// // 'text/template', array('id' => 'tpl_playlist_cues', 'noescape' => true)); +// +// $this->view->headLink()->appendStylesheet($baseUrl.'css/playlist_builder.css?'.$CC_CONFIG['airtime_version']); +// +// try { +// +// $obj_sess = new Zend_Session_Namespace(UI_PLAYLISTCONTROLLER_OBJ_SESSNAME); +// if (isset($obj_sess->id)) { +// $objInfo = Application_Model_Library::getObjInfo($obj_sess->type); +// $obj = new $objInfo['className']($obj_sess->id); +// $userInfo = Zend_Auth::getInstance()->getStorage()->read(); +// $user = new Application_Model_User($userInfo->id); +// $isAdminOrPM = $user->isUserType(array(UTYPE_SUPERADMIN, UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER)); +// +// if ($isAdminOrPM || $obj->getCreatorId() == $userInfo->id) { +// $this->view->obj = $obj; +// if ($obj_sess->type == "block") { +// $form = new Application_Form_SmartBlockCriteria(); +// $form->startForm($obj_sess->id); +// $this->view->form = $form; +// } +// } +// +// $formatter = new LengthFormatter($obj->getLength()); +// $this->view->length = $formatter->format(); +// $this->view->type = $obj_sess->type; +// } +// +// //get user settings and determine if we need to hide +// // or show the playlist editor +// $showPlaylist = false; +// $data = Application_Model_Preference::getLibraryScreenSettings(); +// if (!is_null($data)) { +// if ($data["playlist"] == "true") { +// $showPlaylist = true; +// } +// } +// $this->view->showPlaylist = $showPlaylist; +// } catch (PlaylistNotFoundException $e) { +// $this->playlistNotFound($obj_sess->type); +// } catch (Exception $e) { +// $this->playlistNotFound($obj_sess->type); +// Logging::info($e->getMessage()); +// //$this->playlistUnknownError($e); +// } } protected function playlistNotFound($p_type) diff --git a/airtime_mvc/application/controllers/ScheduleController.php b/airtime_mvc/application/controllers/ScheduleController.php index 3993364da..7082a86f0 100644 --- a/airtime_mvc/application/controllers/ScheduleController.php +++ b/airtime_mvc/application/controllers/ScheduleController.php @@ -112,7 +112,7 @@ class ScheduleController extends Zend_Controller_Action $this->view->headLink()->appendStylesheet($baseUrl.'css/datatables/css/ColVis.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/datatables/css/dataTables.colReorder.min.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/showbuilder.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'css/_showbuilder.css?'.$CC_CONFIG['airtime_version']); + $this->view->headLink()->appendStylesheet($baseUrl.'css/dashboard.css?'.$CC_CONFIG['airtime_version']); //End Show builder JS/CSS requirements $this->createShowFormAction(true); diff --git a/airtime_mvc/application/controllers/ShowbuilderController.php b/airtime_mvc/application/controllers/ShowbuilderController.php index 5e28d37bf..df3d01294 100644 --- a/airtime_mvc/application/controllers/ShowbuilderController.php +++ b/airtime_mvc/application/controllers/ShowbuilderController.php @@ -66,7 +66,7 @@ class ShowbuilderController extends Zend_Controller_Action $this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']); $this->view->headLink()->appendStylesheet($baseUrl.'css/showbuilder.css?'.$CC_CONFIG['airtime_version']); - $this->view->headLink()->appendStylesheet($baseUrl.'css/_showbuilder.css?'.$CC_CONFIG['airtime_version']); // TODO + $this->view->headLink()->appendStylesheet($baseUrl.'css/dashboard.css?'.$CC_CONFIG['airtime_version']); // TODO $csrf_namespace = new Zend_Session_Namespace('csrf_namespace'); $csrf_element = new Zend_Form_Element_Hidden('csrf'); diff --git a/airtime_mvc/application/controllers/SystemstatusController.php b/airtime_mvc/application/controllers/SystemstatusController.php deleted file mode 100644 index 2f651db52..000000000 --- a/airtime_mvc/application/controllers/SystemstatusController.php +++ /dev/null @@ -1,22 +0,0 @@ -view->headScript()->appendFile($baseUrl.'js/airtime/status/status.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); - */ - } - - public function indexAction() - { - $partitions = Application_Model_Systemstatus::GetDiskInfo(); - - $this->view->status = new StdClass; - $this->view->status->partitions = $partitions; - } -} diff --git a/airtime_mvc/application/forms/EditAudioMD.php b/airtime_mvc/application/forms/EditAudioMD.php index f49b55bac..96611520f 100644 --- a/airtime_mvc/application/forms/EditAudioMD.php +++ b/airtime_mvc/application/forms/EditAudioMD.php @@ -189,7 +189,7 @@ class Application_Form_EditAudioMD extends Zend_Form ) )); - $this->addDisplayGroup(array('editmdsave', 'editmdcancel'), 'submitButtons', array( + $this->addDisplayGroup(array('editmdcancel', 'editmdsave'), 'submitButtons', array( 'decorators' => array( 'FormElements', 'DtDdWrapper' diff --git a/airtime_mvc/application/layouts/scripts/layout.phtml b/airtime_mvc/application/layouts/scripts/layout.phtml index be6b38087..d05efdf54 100644 --- a/airtime_mvc/application/layouts/scripts/layout.phtml +++ b/airtime_mvc/application/layouts/scripts/layout.phtml @@ -73,10 +73,10 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= -
+
-
+
diff --git a/airtime_mvc/application/layouts/scripts/showbuilder.phtml b/airtime_mvc/application/layouts/scripts/showbuilder.phtml deleted file mode 100644 index 631510d65..000000000 --- a/airtime_mvc/application/layouts/scripts/showbuilder.phtml +++ /dev/null @@ -1,172 +0,0 @@ - - - - - -doctype() ?> - - - - headTitle() ?> - headLink() ?> - headScript() ?> - google_analytics)?$this->google_analytics:"" ?> - - - - - - - - -partial('partialviews/trialBox.phtml', array("is_trial"=>$this->isTrial(), "trial_remain"=> $this->trialRemaining())) ?> - -
- suspended) : ?> - partial('partialviews/suspended.phtml'); ?> - - - versionNotify(); - $sss = $this->SourceSwitchStatus(); - $scs = $this->SourceConnectionStatus(); - ?> - partial('partialviews/header.phtml', array("live_dj_switch"=>$sss['live_dj'], "live_dj_connection"=>$scs['live_dj'], "master_dj_switch"=>$sss['master_dj'], "master_dj_connection"=>$scs['master_dj'], - "scheduled_play_switch"=>$sss['scheduled_play'], "baseUrl"=>$baseUrl)) ?> -navigation()->menu()->setPartial($partial); ?> - - - - - - -
- -
-
- - -
-
-
-
-
-
-
-
-
-
-
- - -
- -
- -
>
- - layout()->content ?> -
- - - - - - diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index 7c3a242a3..3cffe1fcb 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -899,6 +899,7 @@ SQL; // any data from the db for these and datatables will complain $row['checkbox'] = ""; $row['image'] = ""; + $row['options'] = ""; $type = substr($row['ftype'], 0, 2); $row['tr_id'] = "{$type}_{$row['id']}"; diff --git a/airtime_mvc/application/views/scripts/showbuilder/builderDialog.phtml b/airtime_mvc/application/views/scripts/showbuilder/builderDialog.phtml index b97c2ba17..fb346cc94 100644 --- a/airtime_mvc/application/views/scripts/showbuilder/builderDialog.phtml +++ b/airtime_mvc/application/views/scripts/showbuilder/builderDialog.phtml @@ -1,29 +1,28 @@ -
- +
-
+ @@ -31,7 +30,7 @@
-

Library

+

diff --git a/airtime_mvc/application/views/scripts/showbuilder/index.phtml b/airtime_mvc/application/views/scripts/showbuilder/index.phtml index 292271455..0aeb53a83 100644 --- a/airtime_mvc/application/views/scripts/showbuilder/index.phtml +++ b/airtime_mvc/application/views/scripts/showbuilder/index.phtml @@ -2,7 +2,7 @@
-

Library

+

diff --git a/airtime_mvc/public/css/_showbuilder.css b/airtime_mvc/public/css/dashboard.css similarity index 100% rename from airtime_mvc/public/css/_showbuilder.css rename to airtime_mvc/public/css/dashboard.css diff --git a/airtime_mvc/public/css/showbuilder.css b/airtime_mvc/public/css/showbuilder.css index 6e2b1eaf5..624475c9f 100644 --- a/airtime_mvc/public/css/showbuilder.css +++ b/airtime_mvc/public/css/showbuilder.css @@ -262,7 +262,7 @@ table.datatable tr.sb-header.odd:hover td, table.datatable tr.sb-header.even:hov .ui-dialog .wrapper { margin: 0; - padding: 10px 0 0 0; + padding: 10px 0 40px; overflow: hidden; top: 0; left: 0; diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css index 9f626521c..45f3604bd 100644 --- a/airtime_mvc/public/css/styles.css +++ b/airtime_mvc/public/css/styles.css @@ -36,7 +36,7 @@ html, body { h2 { color: #efefef; - font-size: 2.1em; + font-size: 20px; font-weight: normal; margin: 0; padding: 0 0 10px; @@ -3498,8 +3498,6 @@ button.btn-icon-text > i.icon-white { font-size: 16px; font-weight: 400; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); - /*margin: 20px 20px 0 5px;*/ - /*padding: 10px 0px 10px 0px;*/ padding: 0; -webkit-transition: color 0.1s linear; @@ -3508,14 +3506,43 @@ button.btn-icon-text > i.icon-white { transition: color 0.1s linear; } +#media_selector_wrapper { + flex: 0 0 100%; + display: -webkit-box; + display: -moz-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-flow: row wrap; + flex-flow: row wrap; +} + +.ui-dialog-content .media_type_selector { + padding-left: 0; + flex: 1 auto; +} + +.ui-dialog-content .media_type_selector.selected, +.ui-dialog-content .media_type_selector.selected a { + border: none; + border-bottom: 1px solid #FF5D1A; +} + #nav i, .media_type_selector i { margin-right: 10px; } +.media_type_selector.highlight, +.media_type_selector.highlight a { + color: #fff; + background-color: #444; + border-right: 1px solid #FF5D1A; +} + .media_type_selector.selected, .media_type_selector.selected a { color: #fff; background-color: #444; - border-right: 1px solid #FF5D1A; + border-right: 1px solid #1ADEFF; -webkit-transition: color 0.1s linear; -moz-transition: color 0.1s linear; -o-transition: color 0.1s linear; diff --git a/airtime_mvc/public/js/airtime/library/library.js b/airtime_mvc/public/js/airtime/library/library.js index 3b3104f59..d0f85d76a 100644 --- a/airtime_mvc/public/js/airtime/library/library.js +++ b/airtime_mvc/public/js/airtime/library/library.js @@ -361,7 +361,7 @@ var AIRTIME = (function(AIRTIME) { */ mod.deselectCurrentPage = function() { var $trs = $libTable.find("tr"); - mod.selectAll($trs); + mod.deselectAll($trs); }; mod.selectNone = function() { @@ -599,7 +599,7 @@ var AIRTIME = (function(AIRTIME) { /* Upload Time */ { "sTitle" : $.i18n._("Uploaded") , "mDataProp" : "utime" , "bVisible" : false , "sClass" : "library_upload_time" , "sWidth" : "155px" }, /* Website */ { "sTitle" : $.i18n._("Website") , "mDataProp" : "info_url" , "bVisible" : false , "sClass" : "library_url" , "sWidth" : "150px" }, /* Year */ { "sTitle" : $.i18n._("Year") , "mDataProp" : "year" , "bVisible" : false , "sClass" : "library_year" , "sWidth" : "60px" }, - /* Context Menu */ { "sTitle" : "" , "mData" : null , "bSortable" : false , "sClass" : "library_actions" , "bSearchable" : false , "sWidth" : "16px" } + /* Context Menu */ { "sTitle" : "" , "mDataProp" : "options" , "bSortable" : false , "bSearchable" : false , "sWidth" : "16px", "sClass" : "library_actions" } ], "bProcessing": true, @@ -678,6 +678,7 @@ var AIRTIME = (function(AIRTIME) { */ var advSearchFields = $("div#advanced_search").children(':visible'); var advSearchValid = validateAdvancedSearch(advSearchFields); + advSearchFields.val("TEST"); var type; aoData.push( { name: "format", value: "json"} ); aoData.push( { name: "advSearch", value: advSearchValid} ); diff --git a/airtime_mvc/public/js/airtime/schedule/schedule.js b/airtime_mvc/public/js/airtime/schedule/schedule.js index 7769fbd61..ab2f45c16 100644 --- a/airtime_mvc/public/js/airtime/schedule/schedule.js +++ b/airtime_mvc/public/js/airtime/schedule/schedule.js @@ -121,10 +121,15 @@ function findViewportDimensions() { } function highlightMediaTypeSelector(dialog) { + var selected; if (location.hash === "") { - dialog.find("a[href$='#files']").parent().addClass("selected"); + selected = dialog.find("a[href$='#tracks']"); + } else { + selected = dialog.find("a[href$='"+location.hash+"']") } - dialog.find("a[href$='"+location.hash+"']").parent().addClass("selected"); + + selected.parent().addClass("selected"); + $("#library_filter").text(selected.text()); // Slightly hacky way of triggering the click event when it's outside of the anchor text dialog.find(".media_type_selector").on("click", function() { @@ -133,11 +138,13 @@ function highlightMediaTypeSelector(dialog) { }); $(window).on('hashchange', function() { + var selected = dialog.find("a[href$='"+location.hash+"']"); AIRTIME.library.selectNone(); dialog.find(".media_type_selector").each(function () { $(this).removeClass("selected"); }); - dialog.find("a[href$='"+location.hash+"']").parent().addClass("selected"); + $("#library_filter").text(selected.text()); + selected.parent().addClass("selected"); oTable.fnDraw(); }); } diff --git a/airtime_mvc/public/js/airtime/showbuilder/builder.js b/airtime_mvc/public/js/airtime/showbuilder/builder.js index 97fcea3ad..9dedb1f5a 100644 --- a/airtime_mvc/public/js/airtime/showbuilder/builder.js +++ b/airtime_mvc/public/js/airtime/showbuilder/builder.js @@ -198,7 +198,6 @@ var AIRTIME = (function(AIRTIME){ }; mod.checkToolBarIcons = function() { - //library may not be on the page. if (AIRTIME.library !== undefined) { AIRTIME.library.checkAddButton(); @@ -332,7 +331,6 @@ var AIRTIME = (function(AIRTIME){ }; mod.fnMove = function(aSelect, aAfter) { - mod.disableUI(); $.post(baseUrl+"showbuilder/schedule-move", @@ -757,6 +755,7 @@ var AIRTIME = (function(AIRTIME){ tr.addClass(SB_SELECTED_CLASS); tr.find("input[type='checkbox']").prop("checked", true); }); + mod.checkToolBarIcons(); } }, @@ -874,11 +873,12 @@ var AIRTIME = (function(AIRTIME){ $previouslySelected = undefined; tr.removeClass(SB_SELECTED_CLASS); tr.find(".sb-checkbox > input").prop('checked', false); - mod.checkToolBarIcons(); } else { + tr.addClass(SB_SELECTED_CLASS); tr.find(".sb-checkbox > input").prop('checked', true); - mod.checkToolBarIcons(); } + + mod.checkToolBarIcons(); selectedRows = $("." + SB_SELECTED_CLASS); }); @@ -889,14 +889,14 @@ var AIRTIME = (function(AIRTIME){ $previouslySelected = undefined; tr.removeClass(SB_SELECTED_CLASS); tr.find(".sb-checkbox > input").prop('checked', false); - mod.checkToolBarIcons(); } else if (!(e.shiftKey || e.ctrlKey)) { mod.selectNone(); tr.addClass(SB_SELECTED_CLASS); tr.find(".sb-checkbox > input").prop('checked', true); $previouslySelected = tr; - mod.checkToolBarIcons(); } + + mod.checkToolBarIcons(); selectedRows = $("." + SB_SELECTED_CLASS); }); diff --git a/airtime_mvc/public/js/airtime/showbuilder/main_builder.js b/airtime_mvc/public/js/airtime/showbuilder/main_builder.js index c633bc637..8dc45ea05 100644 --- a/airtime_mvc/public/js/airtime/showbuilder/main_builder.js +++ b/airtime_mvc/public/js/airtime/showbuilder/main_builder.js @@ -118,10 +118,16 @@ AIRTIME = (function(AIRTIME) { function highlightMediaTypeSelector() { + $(".media_type_selector:first").addClass("highlight"); + var selected; if (location.hash === "") { - $("a[href$='#files']").parent().addClass("selected"); + selected = $("a[href$='#tracks']"); + } else { + selected = $("a[href$='"+location.hash+"']"); } - $("a[href$='"+location.hash+"']").parent().addClass("selected"); + + selected.parent().addClass("selected"); + $("#library_filter").text(selected.text()); // Slightly hacky way of triggering the click event when it's outside of the anchor text $(".media_type_selector").on("click", function() { @@ -130,7 +136,7 @@ AIRTIME = (function(AIRTIME) { }); $(window).on('hashchange', function() { - + var selected = $("a[href$='"+location.hash+"']"); // If we click Dashboard from one of the media views, do nothing if (!location.hash) { return; @@ -139,8 +145,11 @@ AIRTIME = (function(AIRTIME) { $(".media_type_selector").each(function () { $(this).removeClass("selected"); }); - $("a[href$='"+location.hash+"']").parent().addClass("selected"); + selected.parent().addClass("selected"); oTable.fnDraw(); + $("#library_filter").text(selected.text()); + // Highlight the dashboard link + $(".media_type_selector:first").addClass("highlight"); }); }