diff --git a/application/Bootstrap.php b/application/Bootstrap.php index 813a9739a..bb5be4c15 100644 --- a/application/Bootstrap.php +++ b/application/Bootstrap.php @@ -54,9 +54,9 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap $view->headScript()->appendFile('/js/libs/jquery-1.4.4.min.js','text/javascript'); $view->headScript()->appendFile('/js/libs/jquery-ui-1.8.8.custom.min.js','text/javascript'); $view->headScript()->appendFile('/js/libs/stuHover.js','text/javascript'); - $view->headScript()->appendFile('/js/playlist/helperfunctions.js','text/javascript'); - $view->headScript()->appendFile('/js/playlist/playlist.js','text/javascript'); - } + //TODO: Find better place to put this in. + $view->addHelperPath('views/helpers', 'Airtime_View_Helper'); + } } diff --git a/application/controllers/LibraryController.php b/application/controllers/LibraryController.php index 297ddbe31..481dc3313 100644 --- a/application/controllers/LibraryController.php +++ b/application/controllers/LibraryController.php @@ -32,6 +32,9 @@ class LibraryController extends Zend_Controller_Action { $this->view->headScript()->appendFile('/js/airtime/onready/library.js','text/javascript'); $this->view->headScript()->appendFile('/js/contextmenu/jjmenu.js','text/javascript'); + $this->view->headScript()->appendFile('/js/playlist/helperfunctions.js','text/javascript'); + $this->view->headScript()->appendFile('/js/playlist/playlist.js','text/javascript'); + $this->view->headLink()->appendStylesheet('/css/contextmenu.css'); $this->view->headLink()->appendStylesheet('/css/pro_dropdown_3.css'); $this->view->headLink()->appendStylesheet('/css/styles.css'); diff --git a/application/controllers/LoginController.php b/application/controllers/LoginController.php index fc2e847bf..42a7e6ba8 100644 --- a/application/controllers/LoginController.php +++ b/application/controllers/LoginController.php @@ -23,7 +23,7 @@ class LoginController extends Zend_Controller_Action $request = $this->getRequest(); $form = new Application_Form_Login(); - $errorMessage = ""; + $message = "Please enter your user name and password"; if($request->isPost()) { @@ -56,12 +56,12 @@ class LoginController extends Zend_Controller_Action } else { - $errorMessage = "Wrong username or password provided. Please try again."; + $message = "Wrong username or password provided. Please try again."; } } } - $this->view->errorMessage = $errorMessage; + $this->view->message = $message; $this->view->form = $form; } diff --git a/application/controllers/NowplayingController.php b/application/controllers/NowplayingController.php index 201379945..bde206e6f 100644 --- a/application/controllers/NowplayingController.php +++ b/application/controllers/NowplayingController.php @@ -13,12 +13,11 @@ class NowplayingController extends Zend_Controller_Action { $this->view->headScript()->appendFile('/js/datatables/js/jquery.dataTables.min.js','text/javascript'); $this->view->headScript()->appendFile('/js/playlist/nowplayingdatagrid.js','text/javascript'); - $this->view->headLink()->appendStylesheet('/css/pro_dropdown_3.css'); + $this->view->headScript()->appendFile('/js/playlist/helperfunctions.js','text/javascript'); + $this->view->headScript()->appendFile('/js/playlist/playlist.js','text/javascript'); + + $this->view->headLink()->appendStylesheet('/css/pro_dropdown_3.css'); $this->view->headLink()->appendStylesheet('/css/styles.css'); - //$this->view->headLink()->appendStylesheet('/css/datatables/demo_page.css'); - //$this->view->headLink()->appendStylesheet('/css/datatables/demo_table.css'); - //$this->view->headLink()->appendStylesheet('/css/datatables/demo_table_jui.css'); - //$this->view->headLink()->appendStylesheet('/css/styles.css'); } public function getDataGridDataAction() diff --git a/application/controllers/PluploadController.php b/application/controllers/PluploadController.php index 2939ba517..10749b550 100644 --- a/application/controllers/PluploadController.php +++ b/application/controllers/PluploadController.php @@ -160,16 +160,16 @@ class PluploadController extends Zend_Controller_Action } public function pluploadAction() - { - $view = $this->view; - - $view->headScript()->appendFile('/js/plupload/plupload.full.min.js','text/javascript'); - $view->headScript()->appendFile('/js/plupload/jquery.plupload.queue.min.js','text/javascript'); - $view->headScript()->appendFile('/js/airtime/library/plupload.js','text/javascript'); + { + $this->view->headScript()->appendFile('/js/plupload/plupload.full.min.js','text/javascript'); + $this->view->headScript()->appendFile('/js/plupload/jquery.plupload.queue.min.js','text/javascript'); + $this->view->headScript()->appendFile('/js/airtime/library/plupload.js','text/javascript'); + $this->view->headScript()->appendFile('/js/playlist/helperfunctions.js','text/javascript'); + $this->view->headScript()->appendFile('/js/playlist/playlist.js','text/javascript'); - $view->headLink()->appendStylesheet('/css/plupload.queue.css'); - $view->headLink()->appendStylesheet('/css/pro_dropdown_3.css'); - $view->headLink()->appendStylesheet('/css/styles.css'); + $this->view->headLink()->appendStylesheet('/css/plupload.queue.css'); + $this->view->headLink()->appendStylesheet('/css/pro_dropdown_3.css'); + $this->view->headLink()->appendStylesheet('/css/styles.css'); } diff --git a/application/controllers/ScheduleController.php b/application/controllers/ScheduleController.php index f03fb0e32..83b532783 100644 --- a/application/controllers/ScheduleController.php +++ b/application/controllers/ScheduleController.php @@ -35,9 +35,10 @@ class ScheduleController extends Zend_Controller_Action $this->view->headScript()->appendFile('/js/fullcalendar/fullcalendar.min.js','text/javascript'); $this->view->headScript()->appendFile('/js/contextmenu/jquery.contextMenu.js','text/javascript'); $this->view->headScript()->appendFile('/js/datatables/js/jquery.dataTables.js','text/javascript'); - //$this->view->headScript()->appendFile('/js/qtip/jquery.qtip-1.0.0.min.js','text/javascript'); $this->view->headScript()->appendFile('/js/airtime/schedule/full-calendar-functions.js','text/javascript'); $this->view->headScript()->appendFile('/js/airtime/schedule/schedule.js','text/javascript'); + $this->view->headScript()->appendFile('/js/playlist/helperfunctions.js','text/javascript'); + $this->view->headScript()->appendFile('/js/playlist/playlist.js','text/javascript'); $this->view->headLink()->appendStylesheet('/css/jquery.contextMenu.css'); $this->view->headLink()->appendStylesheet('/css/fullcalendar.css'); @@ -81,6 +82,8 @@ class ScheduleController extends Zend_Controller_Action $this->view->headScript()->appendFile('/js/colorpicker/js/colorpicker.js','text/javascript'); $this->view->headScript()->appendFile('/js/airtime/schedule/full-calendar-functions.js','text/javascript'); $this->view->headScript()->appendFile('/js/airtime/schedule/add-show.js','text/javascript'); + $this->view->headScript()->appendFile('/js/playlist/helperfunctions.js','text/javascript'); + $this->view->headScript()->appendFile('/js/playlist/playlist.js','text/javascript'); $this->view->headLink()->appendStylesheet('/css/jquery-ui-timepicker.css.css'); $this->view->headLink()->appendStylesheet('/css/fullcalendar.css'); @@ -294,6 +297,7 @@ class ScheduleController extends Zend_Controller_Action unset($this->view->showContent); } + /* Commented out for the 1.6 RC1 release. public function showListAction() { $this->view->headScript()->appendFile('/js/datatables/js/jquery.dataTables.min.js','text/javascript'); @@ -317,6 +321,7 @@ class ScheduleController extends Zend_Controller_Action unset($this->view->showContent); } + */ } diff --git a/application/controllers/UserController.php b/application/controllers/UserController.php index 164c51887..d30b59e87 100644 --- a/application/controllers/UserController.php +++ b/application/controllers/UserController.php @@ -17,6 +17,10 @@ class UserController extends Zend_Controller_Action public function addUserAction() { + + $this->view->headScript()->appendFile('/js/playlist/helperfunctions.js','text/javascript'); + $this->view->headScript()->appendFile('/js/playlist/playlist.js','text/javascript'); + $this->view->headLink()->appendStylesheet('/css/pro_dropdown_3.css'); $this->view->headLink()->appendStylesheet('/css/styles.css'); diff --git a/application/layouts/scripts/layout.phtml b/application/layouts/scripts/layout.phtml index 7734dbb3d..450353b1e 100644 --- a/application/layouts/scripts/layout.phtml +++ b/application/layouts/scripts/layout.phtml @@ -3,13 +3,14 @@ - Airtime!! + Airtime headScript() ?> headLink() ?> +loggedInAs() ?> -
partial('partialviews/header.phtml') ?>
+
partial('partialviews/header.phtml', array("user" => "martin")); ?>
-layout()->content ?> +
layout()->content ?>
diff --git a/application/views/helpers/LoggedInAs.php b/application/views/helpers/LoggedInAs.php new file mode 100644 index 000000000..0307fe17d --- /dev/null +++ b/application/views/helpers/LoggedInAs.php @@ -0,0 +1,19 @@ +hasIdentity()) { + $username = $auth->getIdentity()->username; + } + */ + return "test"; + } +} + +?> diff --git a/application/views/scripts/login/index.phtml b/application/views/scripts/login/index.phtml index 2e8ebc6b4..d56817a40 100644 --- a/application/views/scripts/login/index.phtml +++ b/application/views/scripts/login/index.phtml @@ -1,16 +1,11 @@ -errorMessage; -?> -
 

Login

-
diff --git a/application/views/scripts/partialviews/header.phtml b/application/views/scripts/partialviews/header.phtml index e2011330d..9a0d5b556 100644 --- a/application/views/scripts/partialviews/header.phtml +++ b/application/views/scripts/partialviews/header.phtml @@ -29,7 +29,7 @@
diff --git a/public/js/playlist/helperfunctions.js b/public/js/playlist/helperfunctions.js index 818f8f312..3e432c77a 100644 --- a/public/js/playlist/helperfunctions.js +++ b/public/js/playlist/helperfunctions.js @@ -24,7 +24,7 @@ function convertToHHMMSS(timeInMS){ if (hours == "00") return minutes + ":" + seconds; else - return "" + hours + ":" + minutes + ":" + seconds; + return hours + ":" + minutes + ":" + seconds; } function convertToHHMMSSmm(timeInMS){ @@ -63,7 +63,7 @@ function convertToHHMMSSmm(timeInMS){ if (hours == "00") return minutes + ":" + seconds + "." + ms; else - return "" + hours + ":" + minutes + ":" + seconds+ "." + ms; + return hours + ":" + minutes + ":" + seconds+ "." + ms; } function convertDateToHHMMSS(epochTime){ @@ -72,6 +72,9 @@ function convertDateToHHMMSS(epochTime){ var hours = d.getUTCHours().toString(); var minutes = d.getUTCMinutes().toString(); var seconds = d.getUTCSeconds().toString(); + + //if (hours == "NaN") + //alert("epochTime: " + epochTime); if (hours.length == 1) hours = "0" + hours; @@ -79,7 +82,7 @@ function convertDateToHHMMSS(epochTime){ minutes = "0" + minutes; if (seconds.length == 1) seconds = "0" + seconds; - return "" + hours + ":" + minutes + ":" + seconds; + return hours + ":" + minutes + ":" + seconds; } function convertDateToPosixTime(s){ @@ -117,8 +120,8 @@ function audioPreview(e, uri){ var myAudio = spl.children('audio')[0]; var canPlayMp3 = !!myAudio.canPlayType && "" != myAudio.canPlayType('audio/mpeg'); var canPlayOgg = !!myAudio.canPlayType && "" != myAudio.canPlayType('audio/ogg; codecs="vorbis"'); - alert(canPlayMp3); - alert(canPlayOgg); + //alert(canPlayMp3); + //alert(canPlayOgg); } else { if (spl.children('audio').attr('data-playlist-id') == $(s).attr("id")){ spl.children("audio").remove(); diff --git a/public/js/playlist/playlist.js b/public/js/playlist/playlist.js index 2a6b352f0..62d5a6ba6 100644 --- a/public/js/playlist/playlist.js +++ b/public/js/playlist/playlist.js @@ -209,7 +209,7 @@ function getScheduleFromServer(){ setTimeout(getScheduleFromServer, serverUpdateInterval); } -function init(elemID) { +function init() { //begin producer "thread" getScheduleFromServer(); @@ -231,5 +231,5 @@ function popup(mylink){ $(document).ready(function() { //initialize the playlist bar in the included playlist.js - init("nowplayingbar"); + init(); });