diff --git a/airtime_mvc/application/configs/navigation.php b/airtime_mvc/application/configs/navigation.php index 42de99fe8..23004134e 100644 --- a/airtime_mvc/application/configs/navigation.php +++ b/airtime_mvc/application/configs/navigation.php @@ -34,6 +34,12 @@ $pages = array( 'module' => 'default', 'controller' => 'Preference' ), + array( + 'label' => _('My Profile'), + 'controller' => 'user', + 'action' => 'edit-user', + 'resource' => 'user' + ), array( 'label' => _('Users'), 'module' => 'default', @@ -83,7 +89,21 @@ $pages = array( 'label' => _('Widgets'), 'module' => 'default', 'controller' => 'embeddablewidgets', - 'action' => 'index' + 'action' => 'player', + 'pages' => array( + array( + 'label' => _('Player'), + 'module' => 'default', + 'controller' => 'embeddablewidgets', + 'action' => 'player', + ), + array( + 'label' => _('Weekly Schedule'), + 'module' => 'default', + 'controller' => 'embeddablewidgets', + 'action' => 'schedule', + ) + ) ), array( 'label' => _('Help'), diff --git a/airtime_mvc/application/controllers/EmbeddablewidgetsController.php b/airtime_mvc/application/controllers/EmbeddablewidgetsController.php index 7685d5c94..4fc7c4023 100644 --- a/airtime_mvc/application/controllers/EmbeddablewidgetsController.php +++ b/airtime_mvc/application/controllers/EmbeddablewidgetsController.php @@ -8,8 +8,11 @@ class EmbeddableWidgetsController extends Zend_Controller_Action } - public function indexAction() + public function playerAction() { + $this->_helper->layout->setLayout("page-sub-menu"); + Zend_Layout::getMvcInstance()->assign('parent_page', 'Widgets'); + $CC_CONFIG = Config::getConfig(); $baseUrl = Application_Common_OsPath::getBaseDir(); $this->view->headLink()->appendStylesheet($baseUrl.'css/player-form.css?'.$CC_CONFIG['airtime_version']); @@ -27,6 +30,14 @@ class EmbeddableWidgetsController extends Zend_Controller_Action 1. Enable at least one MP3, AAC, or OGG stream under System -> Streams
2. Enable the Public Airtime API under System -> Preferences"); } + } + + public function scheduleAction() + { + $this->_helper->layout->setLayout("page-sub-menu"); + Zend_Layout::getMvcInstance()->assign('parent_page', 'Widgets'); + + $apiEnabled = Application_Model_Preference::GetAllow3rdPartyApi(); if (!$apiEnabled) { $this->view->weekly_schedule_error_msg = _("To use the embeddable weekly schedule widget you must:

diff --git a/airtime_mvc/application/controllers/UserController.php b/airtime_mvc/application/controllers/UserController.php index 8212a6efe..321b45be4 100644 --- a/airtime_mvc/application/controllers/UserController.php +++ b/airtime_mvc/application/controllers/UserController.php @@ -125,6 +125,9 @@ class UserController extends Zend_Controller_Action public function editUserAction() { + $this->_helper->layout->setLayout("page-sub-menu"); + Zend_Layout::getMvcInstance()->assign('parent_page', 'Settings'); + session_start(); //Reopen session for writing. $request = $this->getRequest(); $form = new Application_Form_EditUser(); diff --git a/airtime_mvc/application/forms/EditAudioMD.php b/airtime_mvc/application/forms/EditAudioMD.php index b58d56201..f49b55bac 100644 --- a/airtime_mvc/application/forms/EditAudioMD.php +++ b/airtime_mvc/application/forms/EditAudioMD.php @@ -172,7 +172,7 @@ class Application_Form_EditAudioMD extends Zend_Form // Add the submit button $this->addElement('button', 'editmdsave', array( 'ignore' => true, - 'class' => 'btn btn-small md-save', + 'class' => 'btn md-save right-floated', 'label' => _('Save'), 'decorators' => array( 'ViewHelper' @@ -182,7 +182,7 @@ class Application_Form_EditAudioMD extends Zend_Form // Add the submit button $this->addElement('button', 'editmdcancel', array( 'ignore' => true, - 'class' => 'btn btn-small md-cancel', + 'class' => 'btn md-cancel right-floated', 'label' => _('Cancel'), 'decorators' => array( 'ViewHelper' @@ -190,10 +190,10 @@ class Application_Form_EditAudioMD extends Zend_Form )); $this->addDisplayGroup(array('editmdsave', 'editmdcancel'), 'submitButtons', array( - 'decorators' => array( - 'FormElements', - 'DtDdWrapper' - ) + 'decorators' => array( + 'FormElements', + 'DtDdWrapper' + ) )); } diff --git a/airtime_mvc/application/layouts/scripts/page-sub-menu.phtml b/airtime_mvc/application/layouts/scripts/page-sub-menu.phtml index f28bcac3c..2318fe873 100644 --- a/airtime_mvc/application/layouts/scripts/page-sub-menu.phtml +++ b/airtime_mvc/application/layouts/scripts/page-sub-menu.phtml @@ -120,10 +120,11 @@
diff --git a/airtime_mvc/application/views/scripts/embeddablewidgets/index.phtml b/airtime_mvc/application/views/scripts/embeddablewidgets/index.phtml deleted file mode 100644 index 9d0ba2ae9..000000000 --- a/airtime_mvc/application/views/scripts/embeddablewidgets/index.phtml +++ /dev/null @@ -1,47 +0,0 @@ -
-

- Player - Weekly Schedule -
- -
- - - -
-

-
- player_error_msg; ?> - player_form; ?> - -
-
-
- -
- - - -

-
- -
- weekly_schedule_error_msg; ?> -
- -
-
weekly_schedule_error_msg)) echo "style=display:none"; ?>> - -
- -
- -
- - - Copy this code and paste it into your website's HTML to embed the weekly schedule in your site. - Adjust the height and width attributes to your desired size. -
-
-
diff --git a/airtime_mvc/application/views/scripts/embeddablewidgets/player.phtml b/airtime_mvc/application/views/scripts/embeddablewidgets/player.phtml new file mode 100644 index 000000000..e7af772ff --- /dev/null +++ b/airtime_mvc/application/views/scripts/embeddablewidgets/player.phtml @@ -0,0 +1,12 @@ +
+ + + +
+

+
+ player_error_msg; ?> + player_form; ?> + +
+
diff --git a/airtime_mvc/application/views/scripts/embeddablewidgets/schedule.phtml b/airtime_mvc/application/views/scripts/embeddablewidgets/schedule.phtml new file mode 100644 index 000000000..4f7ffbc87 --- /dev/null +++ b/airtime_mvc/application/views/scripts/embeddablewidgets/schedule.phtml @@ -0,0 +1,29 @@ +
+ + + +

+
+ +
+ weekly_schedule_error_msg; ?> +
+ +
+
weekly_schedule_error_msg)) echo "style=display:none"; ?>> + +
+ +
+ +
+ + +
+ Copy this code and paste it into your website's HTML to embed the weekly schedule in your site. + Adjust the height and width attributes to your desired size. +
+
+
+
diff --git a/airtime_mvc/application/views/scripts/playlist/_playlist.phtml b/airtime_mvc/application/views/scripts/playlist/_playlist.phtml index ebaa94fc6..9eab3d802 100644 --- a/airtime_mvc/application/views/scripts/playlist/_playlist.phtml +++ b/airtime_mvc/application/views/scripts/playlist/_playlist.phtml @@ -58,8 +58,11 @@ if (isset($this->obj)) { echo $this->render('playlist/update.phtml') ?>
+
+ +
- +
diff --git a/airtime_mvc/application/views/scripts/playlist/_smart-block.phtml b/airtime_mvc/application/views/scripts/playlist/_smart-block.phtml index 1a31f7784..017c2e656 100644 --- a/airtime_mvc/application/views/scripts/playlist/_smart-block.phtml +++ b/airtime_mvc/application/views/scripts/playlist/_smart-block.phtml @@ -59,8 +59,11 @@ if (isset($this->obj)) { echo $this->render('playlist/update.phtml') ?>
+
+ +
- +
diff --git a/airtime_mvc/application/views/scripts/webstream/_webstream.phtml b/airtime_mvc/application/views/scripts/webstream/_webstream.phtml index c84026040..0d4288668 100644 --- a/airtime_mvc/application/views/scripts/webstream/_webstream.phtml +++ b/airtime_mvc/application/views/scripts/webstream/_webstream.phtml @@ -35,7 +35,10 @@
- + +
+
+
diff --git a/airtime_mvc/public/css/_showbuilder.css b/airtime_mvc/public/css/_showbuilder.css index 6dd184227..b62688186 100644 --- a/airtime_mvc/public/css/_showbuilder.css +++ b/airtime_mvc/public/css/_showbuilder.css @@ -567,23 +567,27 @@ li.ui-state-default { padding: 4px; } -#save_button, #webstream_save { - background: #ff5d1a; - color: #fff; - border-radius: 4px; - font-size: 16px; - height: 38px; - width: 120px; -} +/*#save_button, #webstream_save {*/ + /*background: #ff5d1a;*/ + /*color: #fff;*/ + /*border-radius: 4px;*/ + /*font-size: 16px;*/ + /*height: 38px;*/ + /*width: 120px;*/ +/*}*/ -#save_button:active, #webstream_save { - color: #fff !important; -} +/*#save_button:active, #webstream_save {*/ + /*color: #fff !important;*/ +/*}*/ #save_button:focus, #webstream_save { outline-width: 0; } +#edit-md-dialog .zend_form dd:last-child { + width: 160px; +} + /* Smart Block Editor */ .btn-toolbar { diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css index a4b4521a2..ca84a1238 100644 --- a/airtime_mvc/public/css/styles.css +++ b/airtime_mvc/public/css/styles.css @@ -3387,7 +3387,7 @@ dd .stream-status { #weekly-schedule-widget { margin: 0 auto; margin-bottom: 20px; - width: 50%; + width: 60%; } #widget-menu { @@ -3632,4 +3632,4 @@ button.btn-icon-text > i.icon-white { #his_submit { height: 19px; margin-top: -2px; -} \ No newline at end of file +} diff --git a/airtime_mvc/public/js/airtime/library/_spl.js b/airtime_mvc/public/js/airtime/library/_spl.js index 47329dded..b39bb11a5 100644 --- a/airtime_mvc/public/js/airtime/library/_spl.js +++ b/airtime_mvc/public/js/airtime/library/_spl.js @@ -904,6 +904,11 @@ var AIRTIME = (function(AIRTIME){ }); + $pl.find("#webstream_cancel, #cancel_button").on("click", function() { + var tabId = $pl.attr("tab-id"); + $("li[tab-id=" + tabId + "] .lib_pl_close").click(); + }); + $lib.on("click", "#pl_edit", function() { openPlaylistPanel(); $.ajax({ @@ -1154,7 +1159,7 @@ var AIRTIME = (function(AIRTIME){ mod.fnDelete = function(plid, tabId) { - var url, id, lastMod, type, pl = (tabId === undefined) ? $pl : $('#pl-tab-content' + tabId); + var url, id, lastMod, type, pl = (tabId === undefined) ? $pl : $('#pl-tab-content-' + tabId); stopAudioPreview(); id = (plid === undefined) ? getId() : plid;