converting to a jquery UI based datepicker.
This commit is contained in:
parent
7230b3ef58
commit
9b45b9dc72
7 changed files with 2197 additions and 64 deletions
|
@ -55,7 +55,7 @@ class PlayouthistoryController extends Zend_Controller_Action
|
||||||
$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.fnSetFilteringDelay.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools-2.1.5/js/ZeroClipboard.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools-2.1.5/js/ZeroClipboard.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools-2.1.5/js/TableTools.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'js/datatables/plugin/TableTools-2.1.5/js/TableTools.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
$this->view->headScript()->appendFile($baseUrl.'js/bootstrap-datetime/bootstrap-datetimepicker.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'js/timepicker/jquery-ui-timepicker-addon.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
|
||||||
|
|
||||||
$offset = date("Z") * -1;
|
$offset = date("Z") * -1;
|
||||||
$this->view->headScript()->appendScript("var serverTimezoneOffset = {$offset}; //in seconds");
|
$this->view->headScript()->appendScript("var serverTimezoneOffset = {$offset}; //in seconds");
|
||||||
|
@ -67,7 +67,8 @@ class PlayouthistoryController extends Zend_Controller_Action
|
||||||
$this->view->headLink()->appendStylesheet($baseUrl.'js/datatables/plugin/TableTools-2.1.5/css/TableTools.css?'.$CC_CONFIG['airtime_version']);
|
$this->view->headLink()->appendStylesheet($baseUrl.'js/datatables/plugin/TableTools-2.1.5/css/TableTools.css?'.$CC_CONFIG['airtime_version']);
|
||||||
$this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']);
|
$this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']);
|
||||||
$this->view->headLink()->appendStylesheet($baseUrl.'css/playouthistory.css?'.$CC_CONFIG['airtime_version']);
|
$this->view->headLink()->appendStylesheet($baseUrl.'css/playouthistory.css?'.$CC_CONFIG['airtime_version']);
|
||||||
$this->view->headLink()->appendStylesheet($baseUrl.'css/bootstrap-datetimepicker.min.css?'.$CC_CONFIG['airtime_version']);
|
$this->view->headLink()->appendStylesheet($baseUrl.'css/jquery-ui-timepicker-addon.css?'.$CC_CONFIG['airtime_version']);
|
||||||
|
|
||||||
|
|
||||||
//set datatables columns for display of data.
|
//set datatables columns for display of data.
|
||||||
$historyService = new Application_Service_HistoryService();
|
$historyService = new Application_Service_HistoryService();
|
||||||
|
|
|
@ -17,7 +17,7 @@ class Application_Form_EditHistoryItem extends Application_Form_EditHistory
|
||||||
$starts->setValidators(array(
|
$starts->setValidators(array(
|
||||||
new Zend_Validate_Date(self::VALIDATE_DATETIME_FORMAT)
|
new Zend_Validate_Date(self::VALIDATE_DATETIME_FORMAT)
|
||||||
));
|
));
|
||||||
$starts->setAttrib('class', self::TEXT_INPUT_CLASS);
|
$starts->setAttrib('class', self::TEXT_INPUT_CLASS." datepicker");
|
||||||
$starts->setAttrib('data-format', self::TIMEPICKER_DATETIME_FORMAT);
|
$starts->setAttrib('data-format', self::TIMEPICKER_DATETIME_FORMAT);
|
||||||
$starts->addFilter('StringTrim');
|
$starts->addFilter('StringTrim');
|
||||||
$starts->setLabel(_('Start Time'));
|
$starts->setLabel(_('Start Time'));
|
||||||
|
@ -29,7 +29,7 @@ class Application_Form_EditHistoryItem extends Application_Form_EditHistory
|
||||||
$ends->setValidators(array(
|
$ends->setValidators(array(
|
||||||
new Zend_Validate_Date(self::VALIDATE_DATETIME_FORMAT)
|
new Zend_Validate_Date(self::VALIDATE_DATETIME_FORMAT)
|
||||||
));
|
));
|
||||||
$ends->setAttrib('class', self::TEXT_INPUT_CLASS);
|
$ends->setAttrib('class', self::TEXT_INPUT_CLASS." datepicker");
|
||||||
$ends->setAttrib('data-format', self::TIMEPICKER_DATETIME_FORMAT);
|
$ends->setAttrib('data-format', self::TIMEPICKER_DATETIME_FORMAT);
|
||||||
$ends->addFilter('StringTrim');
|
$ends->addFilter('StringTrim');
|
||||||
$ends->setLabel(_('End Time'));
|
$ends->setLabel(_('End Time'));
|
||||||
|
|
|
@ -13,14 +13,9 @@
|
||||||
<label for="<?php echo $name;?>"><?php echo $form->getElement($name)->getLabel() ?></label>
|
<label for="<?php echo $name;?>"><?php echo $form->getElement($name)->getLabel() ?></label>
|
||||||
</dt>
|
</dt>
|
||||||
<dd id="<?php echo $name;?>-element">
|
<dd id="<?php echo $name;?>-element">
|
||||||
<div class="well">
|
|
||||||
<div id="<?php echo $name;?>_datetimepicker" class="input-append date">
|
|
||||||
<?php echo $form->getElement($name) ?>
|
<?php echo $form->getElement($name) ?>
|
||||||
<span class="add-on">
|
|
||||||
<i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php if ($form->getElement($name)->hasErrors()) : ?>
|
<?php if ($form->getElement($name)->hasErrors()) : ?>
|
||||||
<ul class='errors'>
|
<ul class='errors'>
|
||||||
<?php foreach ($form->getElement($name)->getMessages() as $error): ?>
|
<?php foreach ($form->getElement($name)->getMessages() as $error): ?>
|
||||||
|
|
10
airtime_mvc/public/css/jquery-ui-timepicker-addon.css
Normal file
10
airtime_mvc/public/css/jquery-ui-timepicker-addon.css
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
|
||||||
|
.ui-timepicker-div dl { text-align: left; }
|
||||||
|
.ui-timepicker-div dl dt { height: 25px; margin-bottom: -25px; }
|
||||||
|
.ui-timepicker-div dl dd { margin: 0 10px 10px 65px; }
|
||||||
|
.ui-timepicker-div td { font-size: 90%; }
|
||||||
|
.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
|
||||||
|
|
||||||
|
.ui-timepicker-rtl{ direction: rtl; }
|
||||||
|
.ui-timepicker-rtl dl { text-align: right; }
|
||||||
|
.ui-timepicker-rtl dl dd { margin: 0 65px 10px 10px; }
|
|
@ -1552,9 +1552,6 @@ button, input {
|
||||||
background-image:url(redmond/images/ui-icons_ff5d1a_256x240.png);
|
background-image:url(redmond/images/ui-icons_ff5d1a_256x240.png);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ui-datepicker-div { z-index: 10 !important }
|
|
||||||
|
|
||||||
.button-bar-top {
|
.button-bar-top {
|
||||||
text-align:right;
|
text-align:right;
|
||||||
height:38px;
|
height:38px;
|
||||||
|
|
|
@ -220,11 +220,13 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
|
|
||||||
$hisDialogEl.dialog({
|
$hisDialogEl.dialog({
|
||||||
title: $.i18n._("Edit History Record"),
|
title: $.i18n._("Edit History Record"),
|
||||||
modal: true,
|
modal: false,
|
||||||
open: function( event, ui ) {
|
open: function( event, ui ) {
|
||||||
$hisDialogEl.find('.date').datetimepicker({
|
$hisDialogEl.find('.datepicker').datetimepicker({
|
||||||
"pick12HourFormat": false
|
dateFormat: 'yy-mm-dd',
|
||||||
});
|
timeFormat: 'HH:mm:ss'
|
||||||
|
})
|
||||||
|
.blur();
|
||||||
},
|
},
|
||||||
close: function() {
|
close: function() {
|
||||||
removeHistoryDialog();
|
removeHistoryDialog();
|
||||||
|
|
2128
airtime_mvc/public/js/timepicker/jquery-ui-timepicker-addon.js
vendored
Normal file
2128
airtime_mvc/public/js/timepicker/jquery-ui-timepicker-addon.js
vendored
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue