needed to update jquery, fullcalendar needed updating for the new JS.

working on configuring a template.
This commit is contained in:
Naomi Aro 2013-07-29 08:57:31 -04:00
parent 46ecdf393d
commit 7183396da5
19 changed files with 8013 additions and 1533 deletions

View file

@ -43,14 +43,14 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
$view = $this->getResource('view'); $view = $this->getResource('view');
$view->doctype('XHTML1_STRICT'); $view->doctype('XHTML1_STRICT');
} }
protected function _initGlobals() protected function _initGlobals()
{ {
$view = $this->getResource('view'); $view = $this->getResource('view');
$baseUrl = Application_Common_OsPath::getBaseDir(); $baseUrl = Application_Common_OsPath::getBaseDir();
$view->headScript()->appendScript("var baseUrl = '$baseUrl'"); $view->headScript()->appendScript("var baseUrl = '$baseUrl'");
$user = Application_Model_User::GetCurrentUser(); $user = Application_Model_User::GetCurrentUser();
if (!is_null($user)){ if (!is_null($user)){
$userType = $user->getType(); $userType = $user->getType();
@ -58,7 +58,7 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
$userType = ""; $userType = "";
} }
$view->headScript()->appendScript("var userType = '$userType';"); $view->headScript()->appendScript("var userType = '$userType';");
} }
protected function _initHeadLink() protected function _initHeadLink()
@ -68,7 +68,7 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
$view = $this->getResource('view'); $view = $this->getResource('view');
$baseUrl = Application_Common_OsPath::getBaseDir(); $baseUrl = Application_Common_OsPath::getBaseDir();
$view->headLink()->appendStylesheet($baseUrl.'css/redmond/jquery-ui-1.8.8.custom.css?'.$CC_CONFIG['airtime_version']); $view->headLink()->appendStylesheet($baseUrl.'css/redmond/jquery-ui-1.8.8.custom.css?'.$CC_CONFIG['airtime_version']);
$view->headLink()->appendStylesheet($baseUrl.'css/pro_dropdown_3.css?'.$CC_CONFIG['airtime_version']); $view->headLink()->appendStylesheet($baseUrl.'css/pro_dropdown_3.css?'.$CC_CONFIG['airtime_version']);
$view->headLink()->appendStylesheet($baseUrl.'css/qtip/jquery.qtip.min.css?'.$CC_CONFIG['airtime_version']); $view->headLink()->appendStylesheet($baseUrl.'css/qtip/jquery.qtip.min.css?'.$CC_CONFIG['airtime_version']);
@ -83,16 +83,16 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
$CC_CONFIG = Config::getConfig(); $CC_CONFIG = Config::getConfig();
$view = $this->getResource('view'); $view = $this->getResource('view');
$baseUrl = Application_Common_OsPath::getBaseDir(); $baseUrl = Application_Common_OsPath::getBaseDir();
//$view->headScript()->appendFile($baseUrl.'js/libs/jquery-1.7.2.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); //$view->headScript()->appendFile($baseUrl.'js/libs/jquery-1.7.2.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$view->headScript()->appendFile('http://code.jquery.com/jquery-1.10.1.min.js','text/javascript'); $view->headScript()->appendFile('http://code.jquery.com/jquery-1.10.1.min.js','text/javascript');
$view->headScript()->appendFile('http://code.jquery.com/jquery-migrate-1.2.1.min.js','text/javascript'); $view->headScript()->appendFile('http://code.jquery.com/jquery-migrate-1.2.1.min.js','text/javascript');
//$view->headScript()->appendFile($baseUrl.'js/libs/jquery-ui-1.8.18.custom.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); //$view->headScript()->appendFile($baseUrl.'js/libs/jquery-ui-1.8.18.custom.min.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$view->headScript()->appendFile('http://code.jquery.com/ui/1.10.3/jquery-ui.js','text/javascript'); $view->headScript()->appendFile('http://code.jquery.com/ui/1.10.3/jquery-ui.js','text/javascript');
$view->headScript()->appendFile($baseUrl.'js/libs/jquery.stickyPanel.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $view->headScript()->appendFile($baseUrl.'js/libs/jquery.stickyPanel.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$view->headScript()->appendFile($baseUrl.'js/qtip/jquery.qtip.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $view->headScript()->appendFile($baseUrl.'js/qtip/jquery.qtip.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$view->headScript()->appendFile($baseUrl.'js/jplayer/jquery.jplayer.min.js?'.$CC_CONFIG['airtime_version'], 'text/javascript'); $view->headScript()->appendFile($baseUrl.'js/jplayer/jquery.jplayer.min.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
@ -104,7 +104,7 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
$view->headScript()->appendFile($baseUrl.'locale/datatables-translation-table?'.$CC_CONFIG['airtime_version'],'text/javascript'); $view->headScript()->appendFile($baseUrl.'locale/datatables-translation-table?'.$CC_CONFIG['airtime_version'],'text/javascript');
$view->headScript()->appendScript("$.i18n.setDictionary(general_dict)"); $view->headScript()->appendScript("$.i18n.setDictionary(general_dict)");
$view->headScript()->appendScript("var baseUrl='$baseUrl'"); $view->headScript()->appendScript("var baseUrl='$baseUrl'");
//scripts for now playing bar //scripts for now playing bar
$view->headScript()->appendFile($baseUrl.'js/airtime/airtime_bootstrap.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $view->headScript()->appendFile($baseUrl.'js/airtime/airtime_bootstrap.js?'.$CC_CONFIG['airtime_version'],'text/javascript');
$view->headScript()->appendFile($baseUrl.'js/airtime/dashboard/helperfunctions.js?'.$CC_CONFIG['airtime_version'],'text/javascript'); $view->headScript()->appendFile($baseUrl.'js/airtime/dashboard/helperfunctions.js?'.$CC_CONFIG['airtime_version'],'text/javascript');

View file

@ -150,24 +150,24 @@ class PlayouthistoryController extends Zend_Controller_Action
unset($this->view->form); unset($this->view->form);
} }
public function deleteListItemAction() public function deleteListItemAction()
{ {
$history_id = $this->_getParam('id'); $history_id = $this->_getParam('id');
$historyService = new Application_Service_HistoryService(); $historyService = new Application_Service_HistoryService();
$historyService->deletePlayedItem($history_id); $historyService->deletePlayedItem($history_id);
} }
public function updateListItemAction() public function updateListItemAction()
{ {
$request = $this->getRequest(); $request = $this->getRequest();
$params = $request->getPost(); $params = $request->getPost();
Logging::info($params); Logging::info($params);
$historyService = new Application_Service_HistoryService(); $historyService = new Application_Service_HistoryService();
$json = $historyService->editPlayedItem($params); $json = $historyService->editPlayedItem($params);
$this->view->data = $json; $this->view->data = $json;
} }
@ -182,34 +182,42 @@ class PlayouthistoryController extends Zend_Controller_Action
$this->view->data = $json; $this->view->data = $json;
} }
public function templateAction() public function templateAction()
{ {
} }
public function configureItemTemplateAction() {
$historyService = new Application_Service_HistoryService();
$mandatoryFields = $historyService->mandatoryItemTemplate();
$this->view->required = $mandatoryFields;
}
public function createTemplateAction() public function createTemplateAction()
{ {
} }
public function editTemplateAction() public function editTemplateAction()
{ {
} }
public function deleteTemplateAction() public function deleteTemplateAction()
{ {
} }
public function createTemplateFieldAction() public function createTemplateFieldAction()
{ {
} }
public function deleteTemplateFieldAction() public function deleteTemplateFieldAction()
{ {
} }
} }

View file

@ -3,17 +3,20 @@
class Application_Form_EditHistoryItem extends Zend_Form class Application_Form_EditHistoryItem extends Zend_Form
{ {
const VALIDATE_DATETIME_FORMAT = 'yyyy-MM-dd HH:mm:ss'; const VALIDATE_DATETIME_FORMAT = 'yyyy-MM-dd HH:mm:ss';
//this is used by the javascript widget, unfortunately h/H is opposite from Zend.
const TIMEPICKER_DATETIME_FORMAT = 'yyyy-MM-dd hh:mm:ss';
const VALIDATE_DATE_FORMAT = 'yyyy-MM-dd'; const VALIDATE_DATE_FORMAT = 'yyyy-MM-dd';
const VALIDATE_TIME_FORMAT = 'HH:mm:ss'; const VALIDATE_TIME_FORMAT = 'HH:mm:ss';
const ID_PREFIX = "his_item_"; const ID_PREFIX = "his_item_";
const ITEM_TYPE = "type"; const ITEM_TYPE = "type";
const ITEM_CLASS = "class"; const ITEM_CLASS = "class";
const ITEM_ID_SUFFIX = "name"; const ITEM_ID_SUFFIX = "name";
const TEXT_INPUT_CLASS = "input_text"; const TEXT_INPUT_CLASS = "input_text";
private $formElTypes = array( private $formElTypes = array(
TEMPLATE_DATE => array( TEMPLATE_DATE => array(
"class" => "Zend_Form_Element_Text", "class" => "Zend_Form_Element_Text",
@ -105,11 +108,11 @@ class Application_Form_EditHistoryItem extends Zend_Form
"class" => "Zend_Validate_Float", "class" => "Zend_Validate_Float",
) )
) )
), ),
); );
public function init() { public function init() {
$this->setDecorators(array( $this->setDecorators(array(
'PrepareElements', 'PrepareElements',
array('ViewScript', array('viewScript' => 'form/edit-history-item.phtml')) array('ViewScript', array('viewScript' => 'form/edit-history-item.phtml'))
@ -121,32 +124,34 @@ class Application_Form_EditHistoryItem extends Zend_Form
)); ));
$history_id->setDecorators(array('ViewHelper')); $history_id->setDecorators(array('ViewHelper'));
$this->addElement($history_id); $this->addElement($history_id);
$starts = new Zend_Form_Element_Text(self::ID_PREFIX.'starts'); $starts = new Zend_Form_Element_Text(self::ID_PREFIX.'starts');
$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);
$starts->setAttrib('data-format', self::VALIDATE_DATETIME_FORMAT); $starts->setAttrib('data-format', self::TIMEPICKER_DATETIME_FORMAT);
$starts->addFilter('StringTrim'); $starts->addFilter('StringTrim');
$starts->setLabel(_('Start Time')); $starts->setLabel(_('Start Time'));
$starts->setDecorators(array('ViewHelper')); $starts->setDecorators(array('ViewHelper'));
$starts->setRequired(true);
$this->addElement($starts); $this->addElement($starts);
$ends = new Zend_Form_Element_Text(self::ID_PREFIX.'ends'); $ends = new Zend_Form_Element_Text(self::ID_PREFIX.'ends');
$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);
$ends->setAttrib('data-format', self::VALIDATE_DATETIME_FORMAT); $ends->setAttrib('data-format', self::TIMEPICKER_DATETIME_FORMAT);
$ends->addFilter('StringTrim'); $ends->addFilter('StringTrim');
$ends->setLabel(_('End Time')); $ends->setLabel(_('End Time'));
$ends->setDecorators(array('ViewHelper')); $ends->setDecorators(array('ViewHelper'));
$ends->setRequired(true);
$this->addElement($ends); $this->addElement($ends);
$dynamic_attrs = new Zend_Form_SubForm(); $dynamic_attrs = new Zend_Form_SubForm();
$this->addSubForm($dynamic_attrs, self::ID_PREFIX.'template'); $this->addSubForm($dynamic_attrs, self::ID_PREFIX.'template');
// Add the submit button // Add the submit button
$this->addElement('button', 'his_item_save', array( $this->addElement('button', 'his_item_save', array(
'ignore' => true, 'ignore' => true,
@ -156,7 +161,7 @@ class Application_Form_EditHistoryItem extends Zend_Form
'ViewHelper' 'ViewHelper'
) )
)); ));
// Add the cancel button // Add the cancel button
$this->addElement('button', 'his_item_cancel', array( $this->addElement('button', 'his_item_cancel', array(
'ignore' => true, 'ignore' => true,
@ -167,66 +172,66 @@ class Application_Form_EditHistoryItem extends Zend_Form
) )
)); ));
} }
public function createFromTemplate($template) { public function createFromTemplate($template) {
$templateSubForm = $this->getSubForm(self::ID_PREFIX.'template'); $templateSubForm = $this->getSubForm(self::ID_PREFIX.'template');
for ($i = 0, $len = count($template); $i < $len; $i++) { for ($i = 0, $len = count($template); $i < $len; $i++) {
$item = $template[$i]; $item = $template[$i];
$formElType = $this->formElTypes[$item[self::ITEM_TYPE]]; $formElType = $this->formElTypes[$item[self::ITEM_TYPE]];
$label = $item[self::ITEM_ID_SUFFIX]; $label = $item[self::ITEM_ID_SUFFIX];
$id = self::ID_PREFIX.$label; $id = self::ID_PREFIX.$label;
$el = new $formElType[self::ITEM_CLASS]($id); $el = new $formElType[self::ITEM_CLASS]($id);
//cleaning up presentation of tag name for labels. //cleaning up presentation of tag name for labels.
$label = implode(" ", explode("_", $label)); $label = implode(" ", explode("_", $label));
$label = ucwords($label); $label = ucwords($label);
$el->setLabel(_($label)); $el->setLabel(_($label));
if (isset($formElType["attrs"])) { if (isset($formElType["attrs"])) {
$attrs = $formElType["filters"]; $attrs = $formElType["filters"];
foreach ($attrs as $key => $value) { foreach ($attrs as $key => $value) {
$el->setAttrib($key, $value); $el->setAttrib($key, $value);
} }
} }
if (isset($formElType["filters"])) { if (isset($formElType["filters"])) {
$filters = $formElType["filters"]; $filters = $formElType["filters"];
foreach ($filters as $filter) { foreach ($filters as $filter) {
$el->addFilter($filter); $el->addFilter($filter);
} }
} }
if (isset($formElType["validators"])) { if (isset($formElType["validators"])) {
$validators = $formElType["validators"]; $validators = $formElType["validators"];
foreach ($validators as $index => $arr) { foreach ($validators as $index => $arr) {
$validator = new $arr[self::ITEM_CLASS](); $validator = new $arr[self::ITEM_CLASS]();
//extra validator info //extra validator info
if (isset($arr["params"])) { if (isset($arr["params"])) {
foreach ($arr["params"] as $key => $value) { foreach ($arr["params"] as $key => $value) {
$method = "set".ucfirst($key); $method = "set".ucfirst($key);
$validator->$method($value); $validator->$method($value);
} }
} }
$el->addValidator($validator); $el->addValidator($validator);
} }
} }
$el->setDecorators(array('ViewHelper')); $el->setDecorators(array('ViewHelper'));
$templateSubForm->addElement($el); $templateSubForm->addElement($el);
} }
} }
} }

View file

@ -212,22 +212,68 @@ class Application_Service_HistoryService
public function populateTemplateItem($values) { public function populateTemplateItem($values) {
$this->con->beginTransaction(); $this->con->beginTransaction();
try { try {
$template = $this->getItemTemplate(); $template = $this->getItemTemplate();
$prefix = Application_Form_EditHistoryItem::ID_PREFIX;
$historyRecord = new CcPlayoutHistory(); $historyRecord = new CcPlayoutHistory();
$timezoneUTC = new DateTimeZone("UTC"); $timezoneUTC = new DateTimeZone("UTC");
$timezoneLocal = new DateTimeZone($this->timezone); $timezoneLocal = new DateTimeZone($this->timezone);
$dateTime = new DateTime($values["starts"], $timezoneLocal); $dateTime = new DateTime($values[$prefix."starts"], $timezoneLocal);
$dateTime->setTimezone($timezoneLocal); $dateTime->setTimezone($timezoneUTC);
$historyRecord->setDbStarts($dateTime->format("Y-m-d H:i:s")); $historyRecord->setDbStarts($dateTime->format("Y-m-d H:i:s"));
$dateTime = new DateTime($result["ends"], $timezoneUTC); $dateTime = new DateTime($values[$prefix."ends"], $timezoneLocal);
$dateTime->setTimezone($timezoneUTC); $dateTime->setTimezone($timezoneUTC);
$historyRecord->setDbEnds($dateTime->format("Y-m-d H:i:s")); $historyRecord->setDbEnds($dateTime->format("Y-m-d H:i:s"));
$templateValues = $values[$prefix."template"];
$file = $historyRecord->getCcFiles();
$metadata = array();
for ($i = 0, $len = count($template); $i < $len; $i++) {
$item = $template[$i];
$key = $item["name"];
$isFileMd = $item["isFileMd"];
$entry = $templateValues[$prefix.$key];
if (!$isFileMd) {
Logging::info("adding metadata");
}
else if ($isFileMd && isset($file)) {
Logging::info("adding file metadata associated to a file");
}
else if ($isFileMd && empty($file)) {
Logging::info("adding file metadata NOT associated to a file");
$metadata[$key] = $entry;
}
else {
Logging::info("doing something else");
}
}
if (count($metadata) > 0) {
$meta = new CcPlayoutHistoryMetaData();
}
foreach ($metadata as $key => $val) {
$meta->setDbKey($key);
$meta->setDbValue($val);
$historyRecord->addCcPlayoutHistoryMetaData($meta);
}
$historyRecord->save($this->con);
$this->con->commit(); $this->con->commit();
} }
catch (Exception $e) { catch (Exception $e) {
@ -250,6 +296,8 @@ class Application_Service_HistoryService
Logging::info("created list item"); Logging::info("created list item");
Logging::info($values); Logging::info($values);
$this->populateTemplateItem($values);
} }
else { else {
Logging::info("created list item NOT VALID"); Logging::info("created list item NOT VALID");
@ -350,14 +398,37 @@ class Application_Service_HistoryService
//---------------- Following code is for History Templates --------------------------// //---------------- Following code is for History Templates --------------------------//
public function getFieldTypes() {
$fields = array(
TEMPLATE_DATE,
TEMPLATE_TIME,
TEMPLATE_DATETIME,
TEMPLATE_STRING,
TEMPLATE_BOOLEAN,
TEMPLATE_INT,
TEMPLATE_FLOAT,
);
return $fields;
}
public function mandatoryItemTemplate() {
$fields = array();
$fields[] = array("name" => "starts", "type" => TEMPLATE_DATETIME, "isFileMd" => false);
$fields[] = array("name" => "ends", "type" => TEMPLATE_DATETIME, "isFileMd" => false);
return $fields;
}
private function defaultItemTemplate() { private function defaultItemTemplate() {
$fields = array(); $fields = array();
//array index is the position of the item in the history template table. $fields[] = array("name" => "starts", "type" => TEMPLATE_DATETIME, "isFileMd" => false);
//$fields[] = array("name" => "starts", "type" => TEMPLATE_DATETIME, "isFileMd" => false); $fields[] = array("name" => "ends", "type" => TEMPLATE_DATETIME, "isFileMd" => false);
//$fields[] = array("name" => "ends", "type" => TEMPLATE_DATETIME, "isFileMd" => false);
$fields[] = array("name" => MDATA_KEY_TITLE, "type" => TEMPLATE_STRING, "isFileMd" => true); //these fields can be populated from an associated file. $fields[] = array("name" => MDATA_KEY_TITLE, "type" => TEMPLATE_STRING, "isFileMd" => true); //these fields can be populated from an associated file.
$fields[] = array("name" => MDATA_KEY_CREATOR, "type" => TEMPLATE_STRING, "isFileMd" => true); $fields[] = array("name" => MDATA_KEY_CREATOR, "type" => TEMPLATE_STRING, "isFileMd" => true);

View file

@ -0,0 +1,7 @@
<div id="configure_item_template" class="ui-widget ui-widget-content block-shadow alpha-block padded">
<?php foreach ($this->required as $field): ?>
<div><?php echo $field["name"]?></div>
<?php endforeach; ?>
</div>

View file

@ -1,3 +1,4 @@
<div id="history_template" class="ui-widget ui-widget-content block-shadow alpha-block padded"> <div id="history_template" class="ui-widget ui-widget-content block-shadow alpha-block padded">
<a href="<?php echo $this->baseUrl("Playouthistory/configure-item-template"); ?>">Configure Item Template</a>
</div> </div>

View file

@ -0,0 +1,627 @@
/*
* FullCalendar v1.5.3 Stylesheet
*
* Copyright (c) 2011 Adam Shaw
* Dual licensed under the MIT and GPL licenses, located in
* MIT-LICENSE.txt and GPL-LICENSE.txt respectively.
*
* Date: Mon Feb 6 22:40:40 2012 -0800
*
*/
.fc {
direction: ltr;
text-align: left;
}
.fc table {
border-collapse: collapse;
border-spacing: 0;
}
html .fc,
.fc table {
font-size: 1em;
}
.fc td,
.fc th {
padding: 0;
vertical-align: top;
}
/* Header
------------------------------------------------------------------------*/
.fc-header td {
white-space: nowrap;
}
.fc-header-left {
width: 25%;
text-align: left;
}
.fc-header-center {
text-align: center;
}
.fc-header-right {
width: 25%;
text-align: right;
}
.fc-header-title {
display: inline-block;
vertical-align: top;
}
.fc-header-title h2 {
margin-top: 0;
white-space: nowrap;
}
.fc .fc-header-space {
padding-left: 10px;
}
.fc-header .fc-button {
margin-bottom: 1em;
vertical-align: top;
}
/* buttons edges butting together */
.fc-header .fc-button {
margin-right: -1px;
}
.fc-header .fc-corner-right {
margin-right: 1px; /* back to normal */
}
.fc-header .ui-corner-right {
margin-right: 0; /* back to normal */
}
/* button layering (for border precedence) */
.fc-header .fc-state-hover,
.fc-header .ui-state-hover {
z-index: 2;
}
.fc-header .fc-state-down {
z-index: 3;
}
.fc-header .fc-state-active,
.fc-header .ui-state-active {
z-index: 4;
}
/* Content
------------------------------------------------------------------------*/
.fc table.fc-agenda-days thead,
.fc table.fc-agenda-days thead tr{
height: 25px;
}
.fc table.fc-agenda-days thead th{
vertical-align: middle;
}
.fc-content {
clear: both;
}
.fc-view {
width: 100%; /* needed for view switching (when view is absolute) */
overflow: hidden;
}
/* Cell Styles
------------------------------------------------------------------------*/
.fc-widget-header, /* <th>, usually */
.fc-widget-content { /* <td>, usually */
border: 1px solid #ccc;
}
.fc-state-highlight { /* <td> today cell */ /* TODO: add .fc-today to <th> */
background: #ffc;
}
.fc-cell-overlay { /* semi-transparent rectangle while dragging */
background: #9cf;
opacity: .2;
filter: alpha(opacity=20); /* for IE */
}
/* Buttons
------------------------------------------------------------------------*/
.fc-button {
position: relative;
display: inline-block;
cursor: pointer;
}
.fc-state-default { /* non-theme */
border-style: solid;
border-width: 1px 0;
}
.fc-button-inner {
position: relative;
float: left;
overflow: hidden;
}
.fc-state-default .fc-button-inner { /* non-theme */
border-style: solid;
border-width: 0 1px;
}
.fc-button-content {
position: relative;
float: left;
height: 1.9em;
line-height: 1.9em;
padding: 0 .6em;
white-space: nowrap;
}
/* icon (for jquery ui) */
.fc-button-content .fc-icon-wrap {
position: relative;
float: left;
top: 50%;
}
.fc-button-content .ui-icon {
position: relative;
float: left;
margin-top: -50%;
*margin-top: 0;
*top: -50%;
}
/* gloss effect */
.fc-state-default .fc-button-effect {
position: absolute;
top: 50%;
left: 0;
}
.fc-state-default .fc-button-effect span {
position: absolute;
top: -100px;
left: 0;
width: 500px;
height: 100px;
border-width: 100px 0 0 1px;
border-style: solid;
border-color: #fff;
background: #444;
opacity: .09;
filter: alpha(opacity=9);
}
/* button states (determines colors) */
.fc-state-default,
.fc-state-default .fc-button-inner {
border-style: solid;
border-color: #ccc #bbb #aaa;
background: #F3F3F3;
color: #000;
}
.fc-state-hover,
.fc-state-hover .fc-button-inner {
border-color: #999;
}
.fc-state-down,
.fc-state-down .fc-button-inner {
border-color: #555;
background: #777;
}
.fc-state-active,
.fc-state-active .fc-button-inner {
border-color: #555;
background: #777;
color: #fff;
}
.fc-state-disabled,
.fc-state-disabled .fc-button-inner {
color: #999;
border-color: #ddd;
}
.fc-state-disabled {
cursor: default;
}
.fc-state-disabled .fc-button-effect {
display: none;
}
/* Global Event Styles
------------------------------------------------------------------------*/
.fc-event {
border-style: solid;
border-width: 0;
font-size: .85em;
cursor: default;
}
a.fc-event,
.fc-event-draggable {
cursor: pointer;
}
a.fc-event {
text-decoration: none;
}
.fc-rtl .fc-event {
text-align: right;
}
.fc-event-skin {
border-color: #36c; /* default BORDER color */
background-color: #36c; /* default BACKGROUND color */
color: #fff; /* default TEXT color */
}
.fc-event-inner {
position: relative;
width: 100%;
height: 100%;
border-style: solid;
border-width: 0;
overflow: hidden;
}
.fc-event-time,
.fc-event-title {
padding: 0 1px;
}
.fc .ui-resizable-handle { /*** TODO: don't use ui-resizable anymore, change class ***/
display: block;
position: absolute;
z-index: 99999;
overflow: hidden; /* hacky spaces (IE6/7) */
font-size: 300%; /* */
line-height: 50%; /* */
}
/* Horizontal Events
------------------------------------------------------------------------*/
.fc-event-hori {
border-width: 1px 0;
margin-bottom: 1px;
}
/* resizable */
.fc-event-hori .ui-resizable-e {
top: 0 !important; /* importants override pre jquery ui 1.7 styles */
right: -3px !important;
width: 7px !important;
height: 100% !important;
cursor: e-resize;
}
.fc-event-hori .ui-resizable-w {
top: 0 !important;
left: -3px !important;
width: 7px !important;
height: 100% !important;
cursor: w-resize;
}
.fc-event-hori .ui-resizable-handle {
_padding-bottom: 14px; /* IE6 had 0 height */
}
/* Fake Rounded Corners (for buttons and events)
------------------------------------------------------------*/
.fc-corner-left {
margin-left: 1px;
}
.fc-corner-left .fc-button-inner,
.fc-corner-left .fc-event-inner {
margin-left: -1px;
}
.fc-corner-right {
margin-right: 1px;
}
.fc-corner-right .fc-button-inner,
.fc-corner-right .fc-event-inner {
margin-right: -1px;
}
.fc-corner-top {
margin-top: 1px;
}
.fc-corner-top .fc-event-inner {
margin-top: -1px;
}
.fc-corner-bottom {
margin-bottom: 1px;
}
.fc-corner-bottom .fc-event-inner {
margin-bottom: -1px;
}
/* Fake Rounded Corners SPECIFICALLY FOR EVENTS
-----------------------------------------------------------------*/
.fc-corner-left .fc-event-inner {
border-left-width: 1px;
}
.fc-corner-right .fc-event-inner {
border-right-width: 1px;
}
.fc-corner-top .fc-event-inner {
border-top-width: 1px;
}
.fc-corner-bottom .fc-event-inner {
border-bottom-width: 1px;
}
/* Reusable Separate-border Table
------------------------------------------------------------*/
table.fc-border-separate {
border-collapse: separate;
}
.fc-border-separate th,
.fc-border-separate td {
border-width: 1px 0 0 1px;
}
.fc-border-separate th.fc-last,
.fc-border-separate td.fc-last {
border-right-width: 1px;
}
.fc-border-separate tr.fc-last th,
.fc-border-separate tr.fc-last td {
border-bottom-width: 1px;
}
.fc-border-separate tbody tr.fc-first td,
.fc-border-separate tbody tr.fc-first th {
border-top-width: 0;
}
/* Month View, Basic Week View, Basic Day View
------------------------------------------------------------------------*/
.fc-grid th {
text-align: center;
}
.fc-grid .fc-day-number {
float: right;
padding: 0 2px;
}
.fc-grid .fc-other-month .fc-day-number {
opacity: 0.3;
filter: alpha(opacity=30); /* for IE */
/* opacity with small font can sometimes look too faded
might want to set the 'color' property instead
making day-numbers bold also fixes the problem */
}
.fc-grid .fc-day-content {
clear: both;
padding: 2px 2px 1px; /* distance between events and day edges */
}
/* event styles */
.fc-grid .fc-event-time {
font-weight: bold;
}
/* right-to-left */
.fc-rtl .fc-grid .fc-day-number {
float: left;
}
.fc-rtl .fc-grid .fc-event-time {
float: right;
}
/* Agenda Week View, Agenda Day View
------------------------------------------------------------------------*/
.fc-agenda table {
border-collapse: separate;
}
.fc-agenda-days th {
text-align: center;
}
.fc-agenda .fc-agenda-axis {
width: 50px;
padding: 0 4px;
vertical-align: middle;
text-align: right;
white-space: nowrap;
font-weight: normal;
}
.fc-agenda .fc-day-content {
padding: 2px 2px 1px;
}
/* make axis border take precedence */
.fc-agenda-days .fc-agenda-axis {
border-right-width: 1px;
}
.fc-agenda-days .fc-col0 {
border-left-width: 0;
}
/* all-day area */
.fc-agenda-allday th {
border-width: 0 1px;
}
.fc-agenda-allday .fc-day-content {
min-height: 34px; /* TODO: doesnt work well in quirksmode */
_height: 34px;
}
/* divider (between all-day and slots) */
.fc-agenda-divider-inner {
height: 2px;
overflow: hidden;
}
.fc-widget-header .fc-agenda-divider-inner {
background: #eee;
}
/* slot rows */
.fc-agenda-slots th {
border-width: 1px 1px 0;
}
.fc-agenda-slots td {
border-width: 1px 0 0;
background: none;
}
.fc-agenda-slots td div {
height: 20px;
}
.fc-agenda-slots tr.fc-slot0 th,
.fc-agenda-slots tr.fc-slot0 td {
border-top-width: 0;
}
.fc-agenda-slots tr.fc-minor th,
.fc-agenda-slots tr.fc-minor td {
border-top-style: dotted;
}
.fc-agenda-slots tr.fc-minor th.ui-widget-header {
*border-top-style: solid; /* doesn't work with background in IE6/7 */
}
/* Vertical Events
------------------------------------------------------------------------*/
.fc-event-vert {
border-width: 0 1px;
}
.fc-event-vert .fc-event-head,
.fc-event-vert .fc-event-content {
position: relative;
z-index: 2;
width: 100%;
overflow: hidden;
}
.fc-event-vert .fc-event-time {
white-space: nowrap;
font-size: 10px;
}
.fc-event-vert .fc-event-bg { /* makes the event lighter w/ a semi-transparent overlay */
position: absolute;
z-index: 1;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #fff;
opacity: .3;
filter: alpha(opacity=30);
}
.fc .ui-draggable-dragging .fc-event-bg, /* TODO: something nicer like .fc-opacity */
.fc-select-helper .fc-event-bg {
display: none\9; /* for IE6/7/8. nested opacity filters while dragging don't work */
}
/* resizable */
.fc-event-vert .ui-resizable-s {
bottom: 0 !important; /* importants override pre jquery ui 1.7 styles */
width: 100% !important;
height: 8px !important;
overflow: hidden !important;
line-height: 8px !important;
font-size: 11px !important;
font-family: monospace;
text-align: center;
cursor: s-resize;
}
.fc-agenda .ui-resizable-resizing { /* TODO: better selector */
_overflow: hidden;
}

View file

@ -1,12 +1,7 @@
/* /*!
* FullCalendar v1.5.3 Stylesheet * FullCalendar v1.6.2 Stylesheet
* * Docs & License: http://arshaw.com/fullcalendar/
* Copyright (c) 2011 Adam Shaw * (c) 2013 Adam Shaw
* Dual licensed under the MIT and GPL licenses, located in
* MIT-LICENSE.txt and GPL-LICENSE.txt respectively.
*
* Date: Mon Feb 6 22:40:40 2012 -0800
*
*/ */
@ -79,11 +74,8 @@ html .fc,
margin-right: -1px; margin-right: -1px;
} }
.fc-header .fc-corner-right { .fc-header .fc-corner-right, /* non-theme */
margin-right: 1px; /* back to normal */ .fc-header .ui-corner-right { /* theme */
}
.fc-header .ui-corner-right {
margin-right: 0; /* back to normal */ margin-right: 0; /* back to normal */
} }
@ -107,15 +99,6 @@ html .fc,
/* Content /* Content
------------------------------------------------------------------------*/ ------------------------------------------------------------------------*/
.fc table.fc-agenda-days thead,
.fc table.fc-agenda-days thead tr{
height: 25px;
}
.fc table.fc-agenda-days thead th{
vertical-align: middle;
}
.fc-content { .fc-content {
clear: both; clear: both;
@ -133,17 +116,17 @@ html .fc,
.fc-widget-header, /* <th>, usually */ .fc-widget-header, /* <th>, usually */
.fc-widget-content { /* <td>, usually */ .fc-widget-content { /* <td>, usually */
border: 1px solid #ccc; border: 1px solid #ddd;
} }
.fc-state-highlight { /* <td> today cell */ /* TODO: add .fc-today to <th> */ .fc-state-highlight { /* <td> today cell */ /* TODO: add .fc-today to <th> */
background: #ffc; background: #fcf8e3;
} }
.fc-cell-overlay { /* semi-transparent rectangle while dragging */ .fc-cell-overlay { /* semi-transparent rectangle while dragging */
background: #9cf; background: #bce8f1;
opacity: .2; opacity: .3;
filter: alpha(opacity=20); /* for IE */ filter: alpha(opacity=30); /* for IE */
} }
@ -154,43 +137,54 @@ html .fc,
.fc-button { .fc-button {
position: relative; position: relative;
display: inline-block; display: inline-block;
padding: 0 .6em;
overflow: hidden;
height: 1.9em;
line-height: 1.9em;
white-space: nowrap;
cursor: pointer; cursor: pointer;
} }
.fc-state-default { /* non-theme */ .fc-state-default { /* non-theme */
border-style: solid; border: 1px solid;
border-width: 1px 0;
} }
.fc-button-inner { .fc-state-default.fc-corner-left { /* non-theme */
position: relative; border-top-left-radius: 4px;
float: left; border-bottom-left-radius: 4px;
overflow: hidden;
} }
.fc-state-default .fc-button-inner { /* non-theme */ .fc-state-default.fc-corner-right { /* non-theme */
border-style: solid; border-top-right-radius: 4px;
border-width: 0 1px; border-bottom-right-radius: 4px;
} }
.fc-button-content { /*
position: relative; Our default prev/next buttons use HTML entities like &lsaquo; &rsaquo; &laquo; &raquo;
float: left; and we'll try to make them look good cross-browser.
height: 1.9em; */
line-height: 1.9em;
padding: 0 .6em; .fc-text-arrow {
white-space: nowrap; margin: 0 .1em;
font-size: 2em;
font-family: "Courier New", Courier, monospace;
vertical-align: baseline; /* for IE7 */
}
.fc-button-prev .fc-text-arrow,
.fc-button-next .fc-text-arrow { /* for &lsaquo; &rsaquo; */
font-weight: bold;
} }
/* icon (for jquery ui) */ /* icon (for jquery ui) */
.fc-button-content .fc-icon-wrap { .fc-button .fc-icon-wrap {
position: relative; position: relative;
float: left; float: left;
top: 50%; top: 50%;
} }
.fc-button-content .ui-icon { .fc-button .ui-icon {
position: relative; position: relative;
float: left; float: left;
margin-top: -50%; margin-top: -50%;
@ -198,107 +192,89 @@ html .fc,
*top: -50%; *top: -50%;
} }
/* gloss effect */ /*
button states
.fc-state-default .fc-button-effect { borrowed from twitter bootstrap (http://twitter.github.com/bootstrap/)
position: absolute; */
top: 50%;
left: 0; .fc-state-default {
background-color: #f5f5f5;
background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
background-repeat: repeat-x;
border-color: #e6e6e6 #e6e6e6 #bfbfbf;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
color: #333;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
} }
.fc-state-default .fc-button-effect span {
position: absolute;
top: -100px;
left: 0;
width: 500px;
height: 100px;
border-width: 100px 0 0 1px;
border-style: solid;
border-color: #fff;
background: #444;
opacity: .09;
filter: alpha(opacity=9);
}
/* button states (determines colors) */
.fc-state-default,
.fc-state-default .fc-button-inner {
border-style: solid;
border-color: #ccc #bbb #aaa;
background: #F3F3F3;
color: #000;
}
.fc-state-hover, .fc-state-hover,
.fc-state-hover .fc-button-inner {
border-color: #999;
}
.fc-state-down, .fc-state-down,
.fc-state-down .fc-button-inner {
border-color: #555;
background: #777;
}
.fc-state-active, .fc-state-active,
.fc-state-active .fc-button-inner { .fc-state-disabled {
border-color: #555; color: #333333;
background: #777; background-color: #e6e6e6;
color: #fff;
} }
.fc-state-disabled, .fc-state-hover {
.fc-state-disabled .fc-button-inner { color: #333333;
color: #999; text-decoration: none;
border-color: #ddd; background-position: 0 -15px;
-webkit-transition: background-position 0.1s linear;
-moz-transition: background-position 0.1s linear;
-o-transition: background-position 0.1s linear;
transition: background-position 0.1s linear;
} }
.fc-state-down,
.fc-state-active {
background-color: #cccccc;
background-image: none;
outline: 0;
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
}
.fc-state-disabled { .fc-state-disabled {
cursor: default; cursor: default;
background-image: none;
opacity: 0.65;
filter: alpha(opacity=65);
box-shadow: none;
} }
.fc-state-disabled .fc-button-effect {
display: none;
}
/* Global Event Styles /* Global Event Styles
------------------------------------------------------------------------*/ ------------------------------------------------------------------------*/
.fc-event { .fc-event {
border-style: solid; border: 1px solid #3a87ad; /* default BORDER color */
border-width: 0; background-color: #3a87ad; /* default BACKGROUND color */
color: #fff; /* default TEXT color */
font-size: .85em; font-size: .85em;
cursor: default; cursor: default;
} }
a.fc-event {
text-decoration: none;
}
a.fc-event, a.fc-event,
.fc-event-draggable { .fc-event-draggable {
cursor: pointer; cursor: pointer;
} }
a.fc-event {
text-decoration: none;
}
.fc-rtl .fc-event { .fc-rtl .fc-event {
text-align: right; text-align: right;
} }
.fc-event-skin {
border-color: #36c; /* default BORDER color */
background-color: #36c; /* default BACKGROUND color */
color: #fff; /* default TEXT color */
}
.fc-event-inner { .fc-event-inner {
position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
border-style: solid;
border-width: 0;
overflow: hidden; overflow: hidden;
} }
@ -307,7 +283,7 @@ a.fc-event {
padding: 0 1px; padding: 0 1px;
} }
.fc .ui-resizable-handle { /*** TODO: don't use ui-resizable anymore, change class ***/ .fc .ui-resizable-handle {
display: block; display: block;
position: absolute; position: absolute;
z-index: 99999; z-index: 99999;
@ -325,6 +301,20 @@ a.fc-event {
border-width: 1px 0; border-width: 1px 0;
margin-bottom: 1px; margin-bottom: 1px;
} }
.fc-ltr .fc-event-hori.fc-event-start,
.fc-rtl .fc-event-hori.fc-event-end {
border-left-width: 1px;
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
}
.fc-ltr .fc-event-hori.fc-event-end,
.fc-rtl .fc-event-hori.fc-event-start {
border-right-width: 1px;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
/* resizable */ /* resizable */
@ -350,66 +340,6 @@ a.fc-event {
/* Fake Rounded Corners (for buttons and events)
------------------------------------------------------------*/
.fc-corner-left {
margin-left: 1px;
}
.fc-corner-left .fc-button-inner,
.fc-corner-left .fc-event-inner {
margin-left: -1px;
}
.fc-corner-right {
margin-right: 1px;
}
.fc-corner-right .fc-button-inner,
.fc-corner-right .fc-event-inner {
margin-right: -1px;
}
.fc-corner-top {
margin-top: 1px;
}
.fc-corner-top .fc-event-inner {
margin-top: -1px;
}
.fc-corner-bottom {
margin-bottom: 1px;
}
.fc-corner-bottom .fc-event-inner {
margin-bottom: -1px;
}
/* Fake Rounded Corners SPECIFICALLY FOR EVENTS
-----------------------------------------------------------------*/
.fc-corner-left .fc-event-inner {
border-left-width: 1px;
}
.fc-corner-right .fc-event-inner {
border-right-width: 1px;
}
.fc-corner-top .fc-event-inner {
border-top-width: 1px;
}
.fc-corner-bottom .fc-event-inner {
border-bottom-width: 1px;
}
/* Reusable Separate-border Table /* Reusable Separate-border Table
------------------------------------------------------------*/ ------------------------------------------------------------*/
@ -445,6 +375,15 @@ table.fc-border-separate {
.fc-grid th { .fc-grid th {
text-align: center; text-align: center;
} }
.fc .fc-week-number {
width: 22px;
text-align: center;
}
.fc .fc-week-number div {
padding: 0 2px;
}
.fc-grid .fc-day-number { .fc-grid .fc-day-number {
float: right; float: right;
@ -501,6 +440,10 @@ table.fc-border-separate {
white-space: nowrap; white-space: nowrap;
font-weight: normal; font-weight: normal;
} }
.fc-agenda .fc-week-number {
font-weight: bold;
}
.fc-agenda .fc-day-content { .fc-agenda .fc-day-content {
padding: 2px 2px 1px; padding: 2px 2px 1px;
@ -575,19 +518,28 @@ table.fc-border-separate {
.fc-event-vert { .fc-event-vert {
border-width: 0 1px; border-width: 0 1px;
} }
.fc-event-vert .fc-event-head, .fc-event-vert.fc-event-start {
.fc-event-vert .fc-event-content { border-top-width: 1px;
position: relative; border-top-left-radius: 3px;
z-index: 2; border-top-right-radius: 3px;
width: 100%; }
overflow: hidden;
.fc-event-vert.fc-event-end {
border-bottom-width: 1px;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
} }
.fc-event-vert .fc-event-time { .fc-event-vert .fc-event-time {
white-space: nowrap; white-space: nowrap;
font-size: 10px; font-size: 10px;
} }
.fc-event-vert .fc-event-inner {
position: relative;
z-index: 2;
}
.fc-event-vert .fc-event-bg { /* makes the event lighter w/ a semi-transparent overlay */ .fc-event-vert .fc-event-bg { /* makes the event lighter w/ a semi-transparent overlay */
position: absolute; position: absolute;
@ -597,8 +549,8 @@ table.fc-border-separate {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: #fff; background: #fff;
opacity: .3; opacity: .25;
filter: alpha(opacity=30); filter: alpha(opacity=25);
} }
.fc .ui-draggable-dragging .fc-event-bg, /* TODO: something nicer like .fc-opacity */ .fc .ui-draggable-dragging .fc-event-bg, /* TODO: something nicer like .fc-opacity */

View file

@ -1,61 +0,0 @@
/*
* FullCalendar v1.5.3 Print Stylesheet
*
* Include this stylesheet on your page to get a more printer-friendly calendar.
* When including this stylesheet, use the media='print' attribute of the <link> tag.
* Make sure to include this stylesheet IN ADDITION to the regular fullcalendar.css.
*
* Copyright (c) 2011 Adam Shaw
* Dual licensed under the MIT and GPL licenses, located in
* MIT-LICENSE.txt and GPL-LICENSE.txt respectively.
*
* Date: Mon Feb 6 22:40:40 2012 -0800
*
*/
/* Events
-----------------------------------------------------*/
.fc-event-skin {
background: none !important;
color: #000 !important;
}
/* horizontal events */
.fc-event-hori {
border-width: 0 0 1px 0 !important;
border-bottom-style: dotted !important;
border-bottom-color: #000 !important;
padding: 1px 0 0 0 !important;
}
.fc-event-hori .fc-event-inner {
border-width: 0 !important;
padding: 0 1px !important;
}
/* vertical events */
.fc-event-vert {
border-width: 0 0 0 1px !important;
border-left-style: dotted !important;
border-left-color: #000 !important;
padding: 0 1px 0 0 !important;
}
.fc-event-vert .fc-event-inner {
border-width: 0 !important;
padding: 1px 0 !important;
}
.fc-event-bg {
display: none !important;
}
.fc-event .ui-resizable-handle {
display: none !important;
}

View file

@ -206,7 +206,9 @@ var AIRTIME = (function(AIRTIME) {
title: $.i18n._("Edit History Record"), title: $.i18n._("Edit History Record"),
modal: true, modal: true,
open: function( event, ui ) { open: function( event, ui ) {
$hisDialogEl.find('.date').datetimepicker(); $hisDialogEl.find('.date').datetimepicker({
"pick12HourFormat": false
});
}, },
close: function() { close: function() {
removeHistoryDialog(); removeHistoryDialog();

View file

@ -14,10 +14,12 @@
;(function($) { ;(function($) {
/*
if (/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery) || /^1.1/.test($.fn.jquery)) { if (/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery) || /^1.1/.test($.fn.jquery)) {
alert('blockUI requires jQuery v1.2.3 or later! You are using v' + $.fn.jquery); alert('blockUI requires jQuery v1.2.3 or later! You are using v' + $.fn.jquery);
return; return;
} }
*/
$.fn._fadeIn = $.fn.fadeIn; $.fn._fadeIn = $.fn.fadeIn;

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long