Merge branch 'CC-3174' into devel
Conflicts: airtime_mvc/application/Bootstrap.php airtime_mvc/application/controllers/LibraryController.php airtime_mvc/application/controllers/PlaylistController.php airtime_mvc/application/controllers/ScheduleController.php airtime_mvc/application/models/Playlist.php airtime_mvc/application/models/StoredFile.php airtime_mvc/public/js/airtime/library/spl.js
|
@ -33,11 +33,11 @@ date_default_timezone_set(Application_Model_Preference::GetTimezone());
|
|||
Zend_Validate::setDefaultNamespaces("Zend");
|
||||
|
||||
$front = Zend_Controller_Front::getInstance();
|
||||
$front->registerPlugin(new RabbitMqPlugin());
|
||||
$front->registerPlugin(new RabbitMqPlugin());
|
||||
|
||||
Logging::debug($_SERVER['REQUEST_URI']);
|
||||
|
||||
/* The bootstrap class should only be used to initialize actions that return a view.
|
||||
/* The bootstrap class should only be used to initialize actions that return a view.
|
||||
Actions that return JSON will not use the bootstrap class! */
|
||||
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
{
|
||||
|
@ -56,23 +56,25 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||
|
||||
$view->headLink()->appendStylesheet($baseUrl.'/css/redmond/jquery-ui-1.8.8.custom.css?'.filemtime($baseDir.'/css/redmond/jquery-ui-1.8.8.custom.css'));
|
||||
$view->headLink()->appendStylesheet($baseUrl.'/css/pro_dropdown_3.css?'.filemtime($baseDir.'/css/pro_dropdown_3.css'));
|
||||
$view->headLink()->appendStylesheet($baseUrl.'/css/qtip/jquery.qtip.min.css?'.filemtime($baseDir.'/css/qtip/jquery.qtip.min.css'));
|
||||
$view->headLink()->appendStylesheet($baseUrl.'/css/qtip/jquery.qtip.css?'.filemtime($baseDir.'/css/qtip/jquery.qtip.min.css'));
|
||||
$view->headLink()->appendStylesheet($baseUrl.'/css/styles.css?'.filemtime($baseDir.'/css/styles.css'));
|
||||
|
||||
}
|
||||
|
||||
protected function _initHeadScript()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
|
||||
|
||||
$view = $this->getResource('view');
|
||||
$baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();
|
||||
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']);
|
||||
|
||||
$view->headScript()->appendFile($baseUrl.'/js/libs/jquery-1.5.2.min.js?'.filemtime($baseDir.'/js/libs/jquery-1.5.2.min.js'),'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl.'/js/libs/jquery-ui-1.8.11.custom.min.js?'.filemtime($baseDir.'/js/libs/jquery-ui-1.8.11.custom.min.js'),'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl.'/js/libs/jquery-1.7.1.min.js?'.filemtime($baseDir.'/js/libs/jquery-1.7.1.min.js'),'text/javascript');
|
||||
$view->headScript()->appendFile('https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js');
|
||||
$view->headScript()->appendFile($baseUrl.'/js/libs/jquery.stickyPanel.js?'.filemtime($baseDir.'/js/libs/jquery.stickyPanel.js'),'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl.'/js/qtip/jquery.qtip2.min.js?'.filemtime($baseDir.'/js/qtip/jquery.qtip2.min.js'),'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl.'/js/qtip/jquery.qtip.min.js?'.filemtime($baseDir.'/js/qtip/jquery.qtip2.min.js'),'text/javascript');
|
||||
$view->headScript()->appendFile($baseUrl.'/js/jplayer/jquery.jplayer.min.js?'.filemtime($baseDir.'/js/jplayer/jquery.jplayer.min.js'));
|
||||
|
||||
$view->headScript()->appendScript("var baseUrl='$baseUrl/'");
|
||||
|
||||
//scripts for now playing bar
|
||||
|
@ -81,7 +83,7 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||
$view->headScript()->appendFile($baseUrl.'/js/airtime/dashboard/versiontooltip.js?'.filemtime($baseDir.'/js/airtime/dashboard/versiontooltip.js'),'text/javascript');
|
||||
|
||||
$view->headScript()->appendFile($baseUrl.'/js/airtime/common/common.js?'.filemtime($baseDir.'/js/airtime/common/common.js'),'text/javascript');
|
||||
|
||||
|
||||
if (Application_Model_Preference::GetPlanLevel() != "disabled"
|
||||
&& $_SERVER['REQUEST_URI'] != '/Dashboard/stream-player') {
|
||||
$client_id = Application_Model_Preference::GetClientId();
|
||||
|
@ -109,12 +111,12 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||
{
|
||||
if (APPLICATION_ENV == "development"){
|
||||
global $CC_DBC;
|
||||
|
||||
|
||||
$autoloader = Zend_Loader_Autoloader::getInstance();
|
||||
$autoloader->registerNamespace('ZFDebug');
|
||||
|
||||
$options = array(
|
||||
'plugins' => array('Variables',
|
||||
'plugins' => array('Variables',
|
||||
'Exception',
|
||||
'Memory',
|
||||
'Time')
|
||||
|
@ -126,12 +128,12 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||
$frontController->registerPlugin($debug);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected function _initRouter()
|
||||
{
|
||||
$front = Zend_Controller_Front::getInstance();
|
||||
$router = $front->getRouter();
|
||||
|
||||
|
||||
$router->addRoute(
|
||||
'password-change',
|
||||
new Zend_Controller_Router_Route('password-change/:user_id/:token', array(
|
||||
|
|
|
@ -24,6 +24,7 @@ $ccAcl->add(new Zend_Acl_Resource('library'))
|
|||
->add(new Zend_Acl_Resource('dashboard'))
|
||||
->add(new Zend_Acl_Resource('preference'))
|
||||
->add(new Zend_Acl_Resource('recorder'))
|
||||
->add(new Zend_Acl_Resource('showbuilder'))
|
||||
->add(new Zend_Acl_Resource('auth'));
|
||||
|
||||
/** Creating permissions */
|
||||
|
@ -42,6 +43,7 @@ $ccAcl->allow('G', 'index')
|
|||
->allow('H', 'library')
|
||||
->allow('H', 'search')
|
||||
->allow('H', 'playlist')
|
||||
->allow('H', 'showbuilder')
|
||||
->allow('A', 'user')
|
||||
->allow('A', 'systemstatus')
|
||||
->allow('A', 'preference');
|
||||
|
|
|
@ -29,6 +29,13 @@ $pages = array(
|
|||
'action' => 'index',
|
||||
'resource' => 'library'
|
||||
),
|
||||
array(
|
||||
'label' => 'Airtimeline',
|
||||
'module' => 'default',
|
||||
'controller' => 'Showbuilder',
|
||||
'action' => 'index',
|
||||
'resource' => 'showbuilder'
|
||||
),
|
||||
array(
|
||||
'label' => 'Calendar',
|
||||
'module' => 'default',
|
||||
|
@ -67,7 +74,7 @@ $pages = array(
|
|||
'action' => 'stream-setting'
|
||||
),
|
||||
array(
|
||||
'label' =>
|
||||
'label' =>
|
||||
Application_Model_Preference::GetPlanLevel() == 'disabled'?'Support Settings':'Station Information Settings',
|
||||
'module' => 'default',
|
||||
'controller' => 'Preference',
|
||||
|
|
|
@ -23,28 +23,40 @@ class LibraryController extends Zend_Controller_Action
|
|||
$this->search_sess = new Zend_Session_Namespace("search");
|
||||
}
|
||||
|
||||
public function indexAction()
|
||||
public function indexAction() {
|
||||
|
||||
$this->_helper->layout->setLayout('library');
|
||||
|
||||
$this->view->headScript()->appendFile($this->view->baseUrl('/js/airtime/library/events/library_playlistbuilder.js'),'text/javascript');
|
||||
|
||||
$this->_helper->actionStack('library', 'library');
|
||||
$this->_helper->actionStack('index', 'playlist');
|
||||
}
|
||||
|
||||
public function libraryAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$baseUrl = $request->getBaseUrl();
|
||||
|
||||
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']);
|
||||
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/contextmenu/jjmenu.js?'.filemtime($baseDir.'/js/contextmenu/jjmenu.js'),'text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/contextmenu/jquery.contextMenu.js?'.filemtime($baseDir.'/js/contextmenu/jquery.contextMenu.js'),'text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.js?'.filemtime($baseDir.'/js/datatables/js/jquery.dataTables.js'),'text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.pluginAPI.js?'.filemtime($baseDir.'/js/datatables/plugin/dataTables.pluginAPI.js'),'text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.fnSetFilteringDelay.js?'.filemtime($baseDir.'/js/datatables/plugin/dataTables.fnSetFilteringDelay.js'),'text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.ColVis.js?'.filemtime($baseDir.'/js/datatables/plugin/dataTables.ColVis.js'),'text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.ColReorder.js?'.filemtime($baseDir.'/js/datatables/plugin/dataTables.ColReorder.js'),'text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.ColReorderResize.js?'.filemtime($baseDir.'/js/datatables/plugin/dataTables.ColReorderResize.js'),'text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.FixedColumns.js?'.filemtime($baseDir.'/js/datatables/plugin/dataTables.FixedColumns.js'),'text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.TableTools.js?'.filemtime($baseDir.'/js/datatables/plugin/dataTables.TableTools.js'),'text/javascript');
|
||||
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/library.js?'.filemtime($baseDir.'/js/airtime/library/library.js'),'text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/library/advancedsearch.js?'.filemtime($baseDir.'/js/airtime/library/advancedsearch.js'),'text/javascript');
|
||||
|
||||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/media_library.css?'.filemtime($baseDir.'/css/media_library.css'));
|
||||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/contextmenu.css?'.filemtime($baseDir.'/css/contextmenu.css'));
|
||||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/jquery.contextMenu.css?'.filemtime($baseDir.'/css/jquery.contextMenu.css'));
|
||||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/datatables/css/ColVis.css?'.filemtime($baseDir.'/css/datatables/css/ColVis.css'));
|
||||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/datatables/css/ColReorder.css?'.filemtime($baseDir.'/css/datatables/css/ColReorder.css'));
|
||||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/TableTools.css?'.filemtime($baseDir.'/css/TableTools.css'));
|
||||
|
||||
$this->_helper->layout->setLayout('library');
|
||||
$this->_helper->viewRenderer->setResponseSegment('library');
|
||||
|
||||
$form = new Application_Form_AdvancedSearch();
|
||||
|
@ -54,8 +66,6 @@ class LibraryController extends Zend_Controller_Action
|
|||
$this->search_sess->next_row[1] = 2;
|
||||
$this->view->form = $form;
|
||||
$this->view->md = $this->search_sess->md;
|
||||
|
||||
$this->_helper->actionStack('index', 'playlist');
|
||||
}
|
||||
|
||||
public function contextMenuAction()
|
||||
|
@ -64,186 +74,137 @@ class LibraryController extends Zend_Controller_Action
|
|||
|
||||
$id = $this->_getParam('id');
|
||||
$type = $this->_getParam('type');
|
||||
//playlist||timeline
|
||||
$screen = $this->_getParam('screen');
|
||||
$request = $this->getRequest();
|
||||
$baseUrl = $request->getBaseUrl();
|
||||
|
||||
$params = '/format/json/id/#id#/type/#type#';
|
||||
|
||||
$paramsPop = str_replace('#id#', $id, $params);
|
||||
$paramsPop = str_replace('#type#', $type, $paramsPop);
|
||||
|
||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
$user = new Application_Model_User($userInfo->id);
|
||||
|
||||
$pl_sess = $this->pl_sess;
|
||||
if ($type === "audioclip") {
|
||||
|
||||
if($type === "au") {
|
||||
$file = Application_Model_StoredFile::Recall($id);
|
||||
|
||||
if(isset($pl_sess->id)) {
|
||||
$menu[] = array('action' => array('type' => 'ajax', 'url' => '/Playlist/add-item'.$params, 'callback' => 'window["setSPLContent"]'),
|
||||
'title' => 'Add to Playlist');
|
||||
$menu["edit"] = array("name"=> "Edit Metadata", "icon" => "edit", "url" => "/library/edit-file-md/id/{$id}");
|
||||
|
||||
if ($user->isAdmin()) {
|
||||
$menu["del"] = array("name"=> "Delete", "icon" => "delete", "url" => "/library/delete");
|
||||
}
|
||||
|
||||
$menu[] = array('action' => array('type' => 'gourl', 'url' => '/Library/edit-file-md/id/#id#'),
|
||||
'title' => 'Edit Metadata');
|
||||
|
||||
// added for downlaod
|
||||
$id = $this->_getParam('id');
|
||||
|
||||
$file_id = $this->_getParam('id', null);
|
||||
$file = Application_Model_StoredFile::Recall($file_id);
|
||||
|
||||
$url = $file->getRelativeFileUrl($baseUrl).'/download/true';
|
||||
$menu[] = array('action' => array('type' => 'gourl', 'url' => $url),
|
||||
'title' => 'Download');
|
||||
$menu["download"] = array("name" => "Download", "url" => $url);
|
||||
|
||||
if (Application_Model_Preference::GetUploadToSoundcloudOption()) {
|
||||
$text = "Upload to SoundCloud";
|
||||
if(!is_null($file->getSoundCloudId())){
|
||||
$text = "Re-upload to SoundCloud";
|
||||
}
|
||||
$menu[] = array('action' => array('type' => 'ajax', 'url' => '/Library/upload-file-soundcloud/id/#id#',
|
||||
'callback'=>"window['addProgressIcon']('$file_id')"),'title' => $text);
|
||||
|
||||
//create a menu separator
|
||||
$menu["sep1"] = "-----------";
|
||||
|
||||
//create a sub menu for Soundcloud actions.
|
||||
$menu["soundcloud"] = array("name" => "Soundcloud", "icon" => "soundcloud", "items" => array());
|
||||
|
||||
$scid = $file->getSoundCloudId();
|
||||
|
||||
if($scid > 0){
|
||||
$link_to_file = $file->getSoundCloudLinkToFile();
|
||||
$menu[] = array('action' => array('type' => 'fn',
|
||||
'callback' => "window['openFileOnSoundCloud']('$link_to_file')"),
|
||||
'title' => 'View on SoundCloud');
|
||||
if (!is_null($scid)){
|
||||
$text = "Re-upload to SoundCloud";
|
||||
}
|
||||
else {
|
||||
$text = "Upload to SoundCloud";
|
||||
}
|
||||
|
||||
$menu["soundcloud"]["items"]["upload"] = array("name" => $text, "url" => "/library/upload-file-soundcloud/id/{$id}");
|
||||
|
||||
if ($scid > 0){
|
||||
$url = $file->getSoundCloudLinkToFile();
|
||||
$menu["soundcloud"]["items"]["view"] = array("name" => "View on Soundcloud", "url" => $url);
|
||||
}
|
||||
}
|
||||
|
||||
if ($user->isAdmin()) {
|
||||
$menu[] = array('action' => array('type' => 'fn',
|
||||
'callback' => "window['confirmDeleteAudioClip']('$paramsPop')"),
|
||||
'title' => 'Delete');
|
||||
}
|
||||
}
|
||||
else if($type === "pl") {
|
||||
else if ($type === "playlist") {
|
||||
|
||||
if(!isset($pl_sess->id) || $pl_sess->id !== $id) {
|
||||
$menu[] = array('action' =>
|
||||
array('type' => 'ajax',
|
||||
'url' => '/Playlist/edit'.$params,
|
||||
'callback' => 'window["openDiffSPL"]'),
|
||||
'title' => 'Edit');
|
||||
}
|
||||
else if(isset($pl_sess->id) && $pl_sess->id === $id) {
|
||||
$menu[] = array('action' =>
|
||||
array('type' => 'ajax',
|
||||
'url' => '/Playlist/close'.$params,
|
||||
'callback' => 'window["noOpenPL"]'),
|
||||
'title' => 'Close');
|
||||
if ($this->pl_sess->id !== $id && $screen == "playlist") {
|
||||
$menu["edit"] = array("name"=> "Edit", "icon" => "edit");
|
||||
}
|
||||
|
||||
$menu[] = array('action' => array('type' => 'fn',
|
||||
'callback' => "window['confirmDeletePlaylist']('$paramsPop')"),
|
||||
'title' => 'Delete');
|
||||
|
||||
$menu["del"] = array("name"=> "Delete", "icon" => "delete", "url" => "/library/delete");
|
||||
}
|
||||
|
||||
//returns format jjmenu is looking for.
|
||||
die(json_encode($menu));
|
||||
$this->view->items = $menu;
|
||||
}
|
||||
|
||||
public function deleteAction()
|
||||
{
|
||||
$id = $this->_getParam('id');
|
||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
$user = new Application_Model_User($userInfo->id);
|
||||
//array containing id and type of media to delete.
|
||||
$mediaItems = $this->_getParam('media', null);
|
||||
|
||||
if ($user->isAdmin()) {
|
||||
$user = Application_Model_User::GetCurrentUser();
|
||||
|
||||
if (!is_null($id)) {
|
||||
$file = Application_Model_StoredFile::Recall($id);
|
||||
$files = array();
|
||||
$playlists = array();
|
||||
|
||||
if (PEAR::isError($file)) {
|
||||
$this->view->message = $file->getMessage();
|
||||
return;
|
||||
}
|
||||
else if(is_null($file)) {
|
||||
$this->view->message = "file doesn't exist";
|
||||
return;
|
||||
}
|
||||
$message = null;
|
||||
|
||||
$res = $file->delete(true);
|
||||
foreach ($mediaItems as $media) {
|
||||
|
||||
if (PEAR::isError($res)) {
|
||||
$this->view->message = $res->getMessage();
|
||||
return;
|
||||
}
|
||||
else {
|
||||
$res = settype($res, "integer");
|
||||
$data = array("filepath" => $file->getFilePath(), "delete" => $res);
|
||||
Application_Model_RabbitMq::SendMessageToMediaMonitor("file_delete", $data);
|
||||
}
|
||||
if ($media["type"] === "audioclip") {
|
||||
$files[] = intval($media["id"]);
|
||||
}
|
||||
else if ($media["type"] === "playlist") {
|
||||
$playlists[] = intval($media["id"]);
|
||||
}
|
||||
|
||||
$this->view->id = $id;
|
||||
}
|
||||
}
|
||||
|
||||
public function deleteGroupAction()
|
||||
{
|
||||
$ids = $this->_getParam('ids');
|
||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
$user = new Application_Model_User($userInfo->id);
|
||||
|
||||
if ($user->isAdmin()) {
|
||||
if (count($playlists)) {
|
||||
Application_Model_Playlist::DeletePlaylists($playlists);
|
||||
}
|
||||
|
||||
if (!is_null($ids)) {
|
||||
foreach ($ids as $key => $id) {
|
||||
$file = Application_Model_StoredFile::Recall($id);
|
||||
if (!$user->isAdmin()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (PEAR::isError($file)) {
|
||||
$this->view->message = $file->getMessage();
|
||||
return;
|
||||
}
|
||||
else if(is_null($file)) {
|
||||
$this->view->message = "file doesn't exist";
|
||||
return;
|
||||
}
|
||||
foreach ($files as $id) {
|
||||
Logging::log("deleting file {$id}");
|
||||
|
||||
$res = $file->delete();
|
||||
$file = Application_Model_StoredFile::Recall($id);
|
||||
|
||||
if (PEAR::isError($res)) {
|
||||
$this->view->message = $res->getMessage();
|
||||
return;
|
||||
}
|
||||
else {
|
||||
$res = settype($res, "integer");
|
||||
$data = array("filepath" => $file->getFilePath(), "delete" => $res);
|
||||
Application_Model_RabbitMq::SendMessageToMediaMonitor("file_delete", $data);
|
||||
}
|
||||
if (isset($file)) {
|
||||
try {
|
||||
$res = $file->delete(true);
|
||||
}
|
||||
//could throw a scheduled in future exception.
|
||||
catch (Exception $e) {
|
||||
$message = "Could not delete some scheduled files.";
|
||||
}
|
||||
|
||||
$this->view->ids = $ids;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($message)) {
|
||||
$this->view->message = $message;
|
||||
}
|
||||
}
|
||||
|
||||
public function contentsAction()
|
||||
{
|
||||
$post = $this->getRequest()->getPost();
|
||||
$datatables = Application_Model_StoredFile::searchFilesForPlaylistBuilder($post);
|
||||
|
||||
//format clip lengh to 1 decimal
|
||||
foreach($datatables["aaData"] as &$data){
|
||||
if($data['ftype'] == 'audioclip'){
|
||||
$params = $this->getRequest()->getParams();
|
||||
$datatables = Application_Model_StoredFile::searchFilesForPlaylistBuilder($params);
|
||||
|
||||
//TODO move this to the datatables row callback.
|
||||
foreach ($datatables["aaData"] as &$data) {
|
||||
|
||||
if ($data['ftype'] == 'audioclip'){
|
||||
$file = Application_Model_StoredFile::Recall($data['id']);
|
||||
$scid = $file->getSoundCloudId();
|
||||
if($scid == "-2"){
|
||||
$data['track_title'] .= '<span id="'.$data['id'].'" class="small-icon progress"></span>';
|
||||
}else if($scid == "-3"){
|
||||
$data['track_title'] .= '<span id="'.$data['id'].'" class="small-icon sc-error"></span>';
|
||||
}else if(!is_null($scid)){
|
||||
$data['track_title'] .= '<span id="'.$data['id'].'" class="small-icon soundcloud"></span>';
|
||||
|
||||
if ($scid == "-2"){
|
||||
$data['track_title'] .= '<span class="small-icon progress"/>';
|
||||
}
|
||||
else if ($scid == "-3"){
|
||||
$data['track_title'] .= '<span class="small-icon sc-error"/>';
|
||||
}
|
||||
else if (!is_null($scid)){
|
||||
$data['track_title'] .= '<span class="small-icon soundcloud"/>';
|
||||
}
|
||||
}
|
||||
$sec = Application_Model_Playlist::playlistTimeToSeconds($data['length']);
|
||||
$data['length'] = Application_Model_Playlist::secondsToPlaylistTime($sec);
|
||||
}
|
||||
|
||||
die(json_encode($datatables));
|
||||
|
@ -284,13 +245,13 @@ class LibraryController extends Zend_Controller_Action
|
|||
$id = $this->_getParam('id');
|
||||
$type = $this->_getParam('type');
|
||||
|
||||
if($type == "au") {
|
||||
if ($type == "audioclip") {
|
||||
$file = Application_Model_StoredFile::Recall($id);
|
||||
$this->view->type = $type;
|
||||
$this->view->md = $file->getMetadata();
|
||||
}
|
||||
else if($type == "pl") {
|
||||
$file = Application_Model_Playlist::Recall($id);
|
||||
else if ($type == "playlist") {
|
||||
$file = new Application_Model_Playlist($id);
|
||||
$this->view->type = $type;
|
||||
$this->view->md = $file->getAllPLMetaData();
|
||||
$this->view->contents = $file->getContents();
|
||||
|
@ -308,13 +269,15 @@ class LibraryController extends Zend_Controller_Action
|
|||
public function getUploadToSoundcloudStatusAction(){
|
||||
$id = $this->_getParam('id');
|
||||
$type = $this->_getParam('type');
|
||||
if($type == "show"){
|
||||
|
||||
if ($type == "show") {
|
||||
$show_instance = new Application_Model_ShowInstance($id);
|
||||
$this->view->sc_id = $show_instance->getSoundCloudFileId();
|
||||
$file = $show_instance->getRecordedFile();
|
||||
$this->view->error_code = $file->getSoundCloudErrorCode();
|
||||
$this->view->error_msg = $file->getSoundCloudErrorMsg();
|
||||
}else{
|
||||
}
|
||||
else if ($type == "file") {
|
||||
$file = Application_Model_StoredFile::Recall($id);
|
||||
$this->view->sc_id = $file->getSoundCloudId();
|
||||
$this->view->error_code = $file->getSoundCloudErrorCode();
|
||||
|
|
|
@ -7,19 +7,16 @@ class PlaylistController extends Zend_Controller_Action
|
|||
public function init()
|
||||
{
|
||||
$ajaxContext = $this->_helper->getHelper('AjaxContext');
|
||||
$ajaxContext->addActionContext('add-item', 'json')
|
||||
->addActionContext('delete-item', 'json')
|
||||
->addActionContext('add-group', 'json')
|
||||
->addActionContext('delete-group', 'json')
|
||||
$ajaxContext->addActionContext('add-items', 'json')
|
||||
->addActionContext('move-items', 'json')
|
||||
->addActionContext('delete-items', 'json')
|
||||
->addActionContext('set-fade', 'json')
|
||||
->addActionContext('set-cue', 'json')
|
||||
->addActionContext('move-item', 'json')
|
||||
->addActionContext('close', 'json')
|
||||
->addActionContext('new', 'json')
|
||||
->addActionContext('edit', 'json')
|
||||
->addActionContext('delete-active', 'json')
|
||||
->addActionContext('delete', 'json')
|
||||
->addActionContext('set-playlist-fades', 'json')
|
||||
->addActionContext('get-playlist-fades', 'json')
|
||||
->addActionContext('set-playlist-name', 'json')
|
||||
->addActionContext('set-playlist-description', 'json')
|
||||
->initContext();
|
||||
|
@ -29,52 +26,41 @@ class PlaylistController extends Zend_Controller_Action
|
|||
|
||||
private function getPlaylist()
|
||||
{
|
||||
$pl_sess = $this->pl_sess;
|
||||
$pl = null;
|
||||
|
||||
if(isset($pl_sess->id)) {
|
||||
|
||||
$pl = Application_Model_Playlist::Recall($pl_sess->id);
|
||||
if($pl === FALSE) {
|
||||
unset($pl_sess->id);
|
||||
return false;
|
||||
}
|
||||
return $pl;
|
||||
}else{
|
||||
return false;
|
||||
if (isset($this->pl_sess->id)) {
|
||||
$pl = new Application_Model_Playlist($this->pl_sess->id);
|
||||
}
|
||||
return $pl;
|
||||
}
|
||||
|
||||
private function changePlaylist($pl_id)
|
||||
{
|
||||
$pl_sess = $this->pl_sess;
|
||||
|
||||
if(isset($pl_sess->id)) {
|
||||
|
||||
$pl = Application_Model_Playlist::Recall($pl_sess->id);
|
||||
if($pl !== FALSE) {
|
||||
$this->closePlaylist($pl);
|
||||
}
|
||||
}
|
||||
|
||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
|
||||
$pl = Application_Model_Playlist::Recall($pl_id);
|
||||
if($pl === FALSE) {
|
||||
return FALSE;
|
||||
}
|
||||
$pl->lock($userInfo->id);
|
||||
$pl_sess->id = $pl_id;
|
||||
$this->pl_sess->id = intval($pl_id);
|
||||
}
|
||||
|
||||
private function closePlaylist($pl)
|
||||
private function createUpdateResponse($pl)
|
||||
{
|
||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
$res = $pl->unlock($userInfo->id);
|
||||
$this->view->pl = $pl;
|
||||
$this->view->html = $this->view->render('playlist/update.phtml');
|
||||
$this->view->name = $pl->getName();
|
||||
$this->view->length = $pl->getLength();
|
||||
$this->view->description = $pl->getDescription();
|
||||
|
||||
$pl_sess = $this->pl_sess;
|
||||
unset($pl_sess->id);
|
||||
unset($this->view->pl);
|
||||
}
|
||||
|
||||
return $res;
|
||||
private function createFullResponse($pl = null)
|
||||
{
|
||||
if (isset($pl)) {
|
||||
$this->view->pl = $pl;
|
||||
$this->view->id = $pl->getId();
|
||||
$this->view->html = $this->view->render('playlist/index.phtml');
|
||||
unset($this->view->pl);
|
||||
}
|
||||
else {
|
||||
$this->view->html = $this->view->render('playlist/index.phtml');
|
||||
}
|
||||
}
|
||||
|
||||
public function indexAction()
|
||||
|
@ -87,10 +73,21 @@ class PlaylistController extends Zend_Controller_Action
|
|||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/playlist_builder.css?'.filemtime($baseDir.'/css/playlist_builder.css'));
|
||||
|
||||
$this->_helper->viewRenderer->setResponseSegment('spl');
|
||||
$pl = $this->getPlaylist();
|
||||
if($pl !== false){
|
||||
$this->view->pl = $pl;
|
||||
}
|
||||
|
||||
try {
|
||||
$pl = $this->getPlaylist();
|
||||
|
||||
if (isset($pl)) {
|
||||
$this->view->pl = $pl;
|
||||
}
|
||||
}
|
||||
catch (PlaylistNotFoundException $e) {
|
||||
Logging::log("Playlist not found");
|
||||
$this->changePlaylist(null);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
Logging::log("{$e->getMessage()}");
|
||||
}
|
||||
}
|
||||
|
||||
public function newAction()
|
||||
|
@ -99,275 +96,223 @@ class PlaylistController extends Zend_Controller_Action
|
|||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
|
||||
$pl = new Application_Model_Playlist();
|
||||
$pl->create("Untitled Playlist");
|
||||
$pl->setPLMetaData('dc:creator', $userInfo->login);
|
||||
$pl->setName("Untitled Playlist");
|
||||
$pl->setPLMetaData('dc:creator', $userInfo->id);
|
||||
|
||||
$this->changePlaylist($pl->getId());
|
||||
|
||||
$this->view->pl = $pl;
|
||||
$this->view->pl_id = $pl->getId();
|
||||
$this->view->html = $this->view->render('playlist/index.phtml');
|
||||
unset($this->view->pl);
|
||||
$this->createFullResponse($pl);
|
||||
}
|
||||
|
||||
public function editAction()
|
||||
{
|
||||
$pl_id = $this->_getParam('id', null);
|
||||
|
||||
if(!is_null($pl_id)) {
|
||||
$this->changePlaylist($pl_id);
|
||||
}
|
||||
|
||||
$pl = $this->getPlaylist();
|
||||
if($pl === false){
|
||||
$this->view->playlist_error = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->view->pl = $pl;
|
||||
$this->view->pl_id = $pl->getId();
|
||||
$this->view->html = $this->view->render('playlist/index.phtml');
|
||||
unset($this->view->pl);
|
||||
}
|
||||
|
||||
public function addItemAction()
|
||||
{
|
||||
$id = $this->_getParam('id');
|
||||
$pos = $this->_getParam('pos', null);
|
||||
$id = $this->_getParam('id', null);
|
||||
Logging::log("editing playlist {$id}");
|
||||
|
||||
if (!is_null($id)) {
|
||||
|
||||
$pl = $this->getPlaylist();
|
||||
if($pl === false){
|
||||
$this->view->playlist_error = true;
|
||||
return false;
|
||||
}
|
||||
$res = $pl->addAudioClip($id, $pos);
|
||||
|
||||
if (PEAR::isError($res)) {
|
||||
$this->view->message = $res->getMessage();
|
||||
}
|
||||
|
||||
$this->view->pl = $pl;
|
||||
$this->view->html = $this->view->render('playlist/update.phtml');
|
||||
$this->view->name = $pl->getName();
|
||||
$this->view->length = $pl->getLength();
|
||||
$this->view->description = $pl->getDescription();
|
||||
|
||||
unset($this->view->pl);
|
||||
return;
|
||||
$this->changePlaylist($id);
|
||||
}
|
||||
$this->view->message = "a file is not chosen";
|
||||
}
|
||||
|
||||
public function moveItemAction()
|
||||
{
|
||||
$oldPos = $this->_getParam('oldPos');
|
||||
$newPos = $this->_getParam('newPos');
|
||||
|
||||
|
||||
$pl = $this->getPlaylist();
|
||||
if($pl === false){
|
||||
$this->view->playlist_error = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
$pl->moveAudioClip($oldPos, $newPos);
|
||||
|
||||
$this->view->pl = $pl;
|
||||
$this->view->html = $this->view->render('playlist/update.phtml');
|
||||
$this->view->name = $pl->getName();
|
||||
$this->view->length = $pl->getLength();
|
||||
$this->view->description = $pl->getDescription();
|
||||
|
||||
unset($this->view->pl);
|
||||
}
|
||||
|
||||
public function deleteItemAction()
|
||||
{
|
||||
$positions = $this->_getParam('pos', array());
|
||||
|
||||
if (!is_array($positions))
|
||||
$positions = array($positions);
|
||||
|
||||
//so the automatic updating of playlist positioning doesn't affect removal.
|
||||
sort($positions);
|
||||
$positions = array_reverse($positions);
|
||||
|
||||
$pl = $this->getPlaylist();
|
||||
if($pl === false){
|
||||
$this->view->playlist_error = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ($positions as $pos) {
|
||||
$pl->delAudioClip($pos);
|
||||
}
|
||||
|
||||
$this->view->pl = $pl;
|
||||
$this->view->html = $this->view->render('playlist/update.phtml');
|
||||
$this->view->name = $pl->getName();
|
||||
$this->view->length = $pl->getLength();
|
||||
$this->view->description = $pl->getDescription();
|
||||
|
||||
unset($this->view->pl);
|
||||
}
|
||||
|
||||
public function addGroupAction()
|
||||
{
|
||||
$ids = $this->_getParam('ids');
|
||||
$pos = $this->_getParam('pos', null);
|
||||
|
||||
if (!is_null($ids)) {
|
||||
try {
|
||||
$pl = $this->getPlaylist();
|
||||
if ($pl === false) {
|
||||
$this->view->playlist_error = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ($ids as $key => $value) {
|
||||
$res = $pl->addAudioClip($value);
|
||||
if (PEAR::isError($res)) {
|
||||
$this->view->message = $res->getMessage();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->pl = $pl;
|
||||
$this->view->html = $this->view->render('playlist/update.phtml');
|
||||
$this->view->name = $pl->getName();
|
||||
$this->view->length = $pl->getLength();
|
||||
$this->view->description = $pl->getDescription();
|
||||
return;
|
||||
}
|
||||
$this->view->message = "a file is not chosen";
|
||||
}
|
||||
|
||||
public function deleteGroupAction()
|
||||
{
|
||||
$ids = $this->_getParam('ids', null);
|
||||
|
||||
foreach ($ids as $key => $id) {
|
||||
$pl = Application_Model_Playlist::Recall($id);
|
||||
|
||||
if ($pl !== FALSE) {
|
||||
Application_Model_Playlist::Delete($id);
|
||||
$pl_sess = $this->pl_sess;
|
||||
if($pl_sess->id === $id){
|
||||
unset($pl_sess->id);
|
||||
}
|
||||
} else {
|
||||
$this->view->playlist_error = true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->ids = $ids;
|
||||
$this->view->html = $this->view->render('playlist/index.phtml');
|
||||
}
|
||||
|
||||
public function setCueAction()
|
||||
{
|
||||
$pos = $this->_getParam('pos');
|
||||
$pl = $this->getPlaylist();
|
||||
if ($pl === false){
|
||||
$this->view->playlist_error = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
$cueIn = $this->_getParam('cueIn', null);
|
||||
$cueOut = $this->_getParam('cueOut', null);
|
||||
|
||||
$response = $pl->changeClipLength($pos, $cueIn, $cueOut);
|
||||
|
||||
$this->view->response = $response;
|
||||
|
||||
if(!isset($response["error"])) {
|
||||
$this->view->pl = $pl;
|
||||
$this->view->html = $this->view->render('playlist/update.phtml');
|
||||
$this->view->name = $pl->getName();
|
||||
$this->view->length = $pl->getLength();
|
||||
$this->view->description = $pl->getDescription();
|
||||
|
||||
unset($this->view->pl);
|
||||
}
|
||||
}
|
||||
catch (PlaylistNotFoundException $e) {
|
||||
Logging::log("Playlist {$id} not found");
|
||||
$this->changePlaylist(null);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
Logging::log("{$e->getFile()}");
|
||||
Logging::log("{$e->getLine()}");
|
||||
Logging::log("{$e->getMessage()}");
|
||||
$this->changePlaylist(null);
|
||||
}
|
||||
|
||||
public function setFadeAction()
|
||||
{
|
||||
$pos = $this->_getParam('pos');
|
||||
$pl = $this->getPlaylist();
|
||||
|
||||
if($pl === false){
|
||||
$this->view->playlist_error = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
$fadeIn = $this->_getParam('fadeIn', null);
|
||||
$fadeOut = $this->_getParam('fadeOut', null);
|
||||
|
||||
$response = $pl->changeFadeInfo($pos, $fadeIn, $fadeOut);
|
||||
$this->view->response = $response;
|
||||
|
||||
if(!isset($response["error"])) {
|
||||
$this->view->pl = $pl;
|
||||
$this->view->html = $this->view->render('playlist/update.phtml');
|
||||
$this->view->name = $pl->getName();
|
||||
$this->view->length = $pl->getLength();
|
||||
$this->view->description = $pl->getDescription();
|
||||
|
||||
unset($this->view->pl);
|
||||
}
|
||||
$this->createFullResponse($pl);
|
||||
}
|
||||
|
||||
public function deleteAction()
|
||||
{
|
||||
$id = $this->_getParam('id', null);
|
||||
$pl = Application_Model_Playlist::Recall($id);
|
||||
$ids = $this->_getParam('ids');
|
||||
$ids = (!is_array($ids)) ? array($ids) : $ids;
|
||||
$pl = null;
|
||||
|
||||
if ($pl !== FALSE) {
|
||||
try {
|
||||
|
||||
Application_Model_Playlist::Delete($id);
|
||||
Logging::log("Currently active playlist {$this->pl_sess->id}");
|
||||
if (in_array($this->pl_sess->id, $ids)) {
|
||||
Logging::log("Deleting currently active playlist");
|
||||
$this->changePlaylist(null);
|
||||
}
|
||||
else {
|
||||
$pl = $this->getPlaylist();
|
||||
Logging::log("Not deleting currently active playlist");
|
||||
}
|
||||
|
||||
$pl_sess = $this->pl_sess;
|
||||
|
||||
if($pl_sess->id === $id){
|
||||
unset($pl_sess->id);
|
||||
}
|
||||
}else{
|
||||
$this->view->playlist_error = true;
|
||||
return false;
|
||||
Application_Model_Playlist::DeletePlaylists($ids);
|
||||
}
|
||||
catch(PlaylistNotFoundException $e) {
|
||||
Logging::log("Playlist not found");
|
||||
$this->changePlaylist(null);
|
||||
$pl = null;
|
||||
}
|
||||
catch(Exception $e) {
|
||||
Logging::log("{$e->getFile()}");
|
||||
Logging::log("{$e->getLine()}");
|
||||
Logging::log("{$e->getMessage()}");
|
||||
}
|
||||
|
||||
$this->view->id = $id;
|
||||
$this->view->html = $this->view->render('playlist/index.phtml');
|
||||
$this->createFullResponse($pl);
|
||||
}
|
||||
|
||||
public function deleteActiveAction()
|
||||
public function addItemsAction()
|
||||
{
|
||||
$pl = $this->getPlaylist();
|
||||
if($pl === false){
|
||||
$this->view->playlist_error = true;
|
||||
return false;
|
||||
$ids = $this->_getParam('ids');
|
||||
$ids = (!is_array($ids)) ? array($ids) : $ids;
|
||||
$afterItem = $this->_getParam('afterItem', null);
|
||||
$addType = $this->_getParam('type', 'after');
|
||||
|
||||
Logging::log("type is ".$addType);
|
||||
|
||||
try {
|
||||
$pl = $this->getPlaylist();
|
||||
$pl->addAudioClips($ids, $afterItem, $addType);
|
||||
}
|
||||
catch (PlaylistNotFoundException $e) {
|
||||
Logging::log("Playlist not found");
|
||||
$this->changePlaylist(null);
|
||||
$this->createFullResponse(null);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
Logging::log("{$e->getFile()}");
|
||||
Logging::log("{$e->getLine()}");
|
||||
Logging::log("{$e->getMessage()}");
|
||||
}
|
||||
Application_Model_Playlist::Delete($pl->getId());
|
||||
|
||||
$pl_sess = $this->pl_sess;
|
||||
unset($pl_sess->id);
|
||||
|
||||
$this->view->html = $this->view->render('playlist/index.phtml');
|
||||
$this->createUpdateResponse($pl);
|
||||
}
|
||||
|
||||
public function closeAction()
|
||||
public function moveItemsAction()
|
||||
{
|
||||
$pl = $this->getPlaylist();
|
||||
if($pl === false){
|
||||
$this->view->playlist_error = true;
|
||||
return false;
|
||||
}
|
||||
$this->closePlaylist($pl);
|
||||
$ids = $this->_getParam('ids');
|
||||
$ids = (!is_array($ids)) ? array($ids) : $ids;
|
||||
$afterItem = $this->_getParam('afterItem', null);
|
||||
|
||||
$this->view->html = $this->view->render('playlist/index.phtml');
|
||||
try {
|
||||
$pl = $this->getPlaylist();
|
||||
$pl->moveAudioClips($ids, $afterItem);
|
||||
}
|
||||
catch (PlaylistNotFoundException $e) {
|
||||
Logging::log("Playlist not found");
|
||||
$this->changePlaylist(null);
|
||||
$this->createFullResponse(null);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
Logging::log("{$e->getFile()}");
|
||||
Logging::log("{$e->getLine()}");
|
||||
Logging::log("{$e->getMessage()}");
|
||||
}
|
||||
|
||||
$this->createUpdateResponse($pl);
|
||||
}
|
||||
|
||||
public function deleteItemsAction()
|
||||
{
|
||||
$ids = $this->_getParam('ids');
|
||||
$ids = (!is_array($ids)) ? array($ids) : $ids;
|
||||
|
||||
try {
|
||||
$pl = $this->getPlaylist();
|
||||
$pl->delAudioClips($ids);
|
||||
}
|
||||
catch (PlaylistNotFoundException $e) {
|
||||
Logging::log("Playlist not found");
|
||||
$this->changePlaylist(null);
|
||||
$this->createFullResponse(null);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
Logging::log("{$e->getFile()}");
|
||||
Logging::log("{$e->getLine()}");
|
||||
Logging::log("{$e->getMessage()}");
|
||||
}
|
||||
|
||||
$this->createUpdateResponse($pl);
|
||||
}
|
||||
|
||||
public function setCueAction()
|
||||
{
|
||||
$id = $this->_getParam('id');
|
||||
$cueIn = $this->_getParam('cueIn', null);
|
||||
$cueOut = $this->_getParam('cueOut', null);
|
||||
|
||||
try {
|
||||
$pl = $this->getPlaylist();
|
||||
$response = $pl->changeClipLength($id, $cueIn, $cueOut);
|
||||
|
||||
$this->view->response = $response;
|
||||
|
||||
if(!isset($response["error"])) {
|
||||
$this->createUpdateResponse($pl);
|
||||
}
|
||||
}
|
||||
catch (PlaylistNotFoundException $e) {
|
||||
Logging::log("Playlist not found");
|
||||
$this->changePlaylist(null);
|
||||
$this->createFullResponse(null);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
Logging::log("{$e->getFile()}");
|
||||
Logging::log("{$e->getLine()}");
|
||||
Logging::log("{$e->getMessage()}");
|
||||
}
|
||||
}
|
||||
|
||||
public function setFadeAction()
|
||||
{
|
||||
$id = $this->_getParam('id');
|
||||
$fadeIn = $this->_getParam('fadeIn', null);
|
||||
$fadeOut = $this->_getParam('fadeOut', null);
|
||||
|
||||
try {
|
||||
$pl = $this->getPlaylist();
|
||||
$response = $pl->changeFadeInfo($id, $fadeIn, $fadeOut);
|
||||
|
||||
$this->view->response = $response;
|
||||
|
||||
if (!isset($response["error"])) {
|
||||
$this->createUpdateResponse($pl);
|
||||
}
|
||||
}
|
||||
catch (PlaylistNotFoundException $e) {
|
||||
Logging::log("Playlist not found");
|
||||
$this->changePlaylist(null);
|
||||
$this->createFullResponse(null);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
Logging::log("{$e->getFile()}");
|
||||
Logging::log("{$e->getLine()}");
|
||||
Logging::log("{$e->getMessage()}");
|
||||
}
|
||||
}
|
||||
|
||||
public function getPlaylistFadesAction()
|
||||
{
|
||||
try {
|
||||
$pl = $this->getPlaylist();
|
||||
$fades = $pl->getFadeInfo(0);
|
||||
$this->view->fadeIn = $fades[0];
|
||||
|
||||
$fades = $pl->getFadeInfo($pl->getSize()-1);
|
||||
$this->view->fadeOut = $fades[1];
|
||||
}
|
||||
catch (PlaylistNotFoundException $e) {
|
||||
Logging::log("Playlist not found");
|
||||
$this->changePlaylist(null);
|
||||
$this->createFullResponse(null);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
Logging::log("{$e->getFile()}");
|
||||
Logging::log("{$e->getLine()}");
|
||||
Logging::log("{$e->getMessage()}");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -377,32 +322,23 @@ class PlaylistController extends Zend_Controller_Action
|
|||
**/
|
||||
public function setPlaylistFadesAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$pl = $this->getPlaylist();
|
||||
if($pl === false){
|
||||
$this->view->playlist_error = true;
|
||||
return false;
|
||||
$fadeIn = $this->_getParam('fadeIn', null);
|
||||
$fadeOut = $this->_getParam('fadeOut', null);
|
||||
|
||||
try {
|
||||
$pl = $this->getPlaylist();
|
||||
$pl->setPlaylistfades($fadeIn, $fadeOut);
|
||||
}
|
||||
catch (PlaylistNotFoundException $e) {
|
||||
Logging::log("Playlist not found");
|
||||
$this->changePlaylist(null);
|
||||
$this->createFullResponse(null);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
Logging::log("{$e->getFile()}");
|
||||
Logging::log("{$e->getLine()}");
|
||||
Logging::log("{$e->getMessage()}");
|
||||
}
|
||||
|
||||
if($request->isPost()) {
|
||||
$fadeIn = $this->_getParam('fadeIn', null);
|
||||
$fadeOut = $this->_getParam('fadeOut', null);
|
||||
|
||||
if($fadeIn)
|
||||
$response = $pl->changeFadeInfo(0, $fadeIn, $fadeOut);
|
||||
else if($fadeOut)
|
||||
$response = $pl->changeFadeInfo($pl->getSize(), $fadeIn, $fadeOut);
|
||||
|
||||
$this->view->response = $response;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$fades = $pl->getFadeInfo(0);
|
||||
$this->view->fadeIn = $fades[0];
|
||||
|
||||
$fades = $pl->getFadeInfo($pl->getSize());
|
||||
$this->view->fadeOut = $fades[1];
|
||||
}
|
||||
|
||||
public function setPlaylistNameAction()
|
||||
|
|
|
@ -45,7 +45,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/js/jquery.dataTables.js?'.filemtime($baseDir.'/js/datatables/js/jquery.dataTables.js'),'text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/datatables/plugin/dataTables.pluginAPI.js?'.filemtime($baseDir.'/js/datatables/plugin/dataTables.pluginAPI.js'),'text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/fullcalendar/fullcalendar.js?'.filemtime($baseDir.'/js/fullcalendar/fullcalendar.js'),'text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/timepicker/jquery.ui.timepicker-0.0.6.js?'.filemtime($baseDir.'/js/timepicker/jquery.ui.timepicker-0.0.6.js'),'text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/timepicker/jquery.ui.timepicker.js?'.filemtime($baseDir.'/js/timepicker/jquery.ui.timepicker.js'),'text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/colorpicker/js/colorpicker.js?'.filemtime($baseDir.'/js/colorpicker/js/colorpicker.js'),'text/javascript');
|
||||
|
||||
//full-calendar-functions.js requires this variable, so that datePicker widget can be offset to server time instead of client time
|
||||
|
@ -68,7 +68,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
$user = new Application_Model_User($userInfo->id);
|
||||
$this->view->isAdmin = $user->isAdmin();
|
||||
$this->view->isProgramManager = $user->isUserType('P');
|
||||
|
||||
|
||||
$this->view->headScript()->appendScript("var weekStart = ".Application_Model_Preference::GetWeekStartDay().";");
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,128 @@
|
|||
<?php
|
||||
|
||||
class ShowbuilderController extends Zend_Controller_Action
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
$ajaxContext = $this->_helper->getHelper('AjaxContext');
|
||||
$ajaxContext->addActionContext('schedule-move', 'json')
|
||||
->addActionContext('schedule-add', 'json')
|
||||
->addActionContext('schedule-remove', 'json')
|
||||
->addActionContext('builder-feed', 'json')
|
||||
->initContext();
|
||||
}
|
||||
|
||||
public function indexAction() {
|
||||
|
||||
$this->_helper->layout->setLayout('builder');
|
||||
|
||||
$this->view->headScript()->appendFile($this->view->baseUrl('/js/airtime/library/events/library_showbuilder.js'),'text/javascript');
|
||||
|
||||
$this->_helper->actionStack('library', 'library');
|
||||
$this->_helper->actionStack('builder', 'showbuilder');
|
||||
}
|
||||
|
||||
public function builderAction() {
|
||||
|
||||
$request = $this->getRequest();
|
||||
$baseUrl = $request->getBaseUrl();
|
||||
|
||||
$this->view->headScript()->appendScript("var serverTimezoneOffset = ".date("Z")."; //in seconds");
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/timepicker/jquery.ui.timepicker.js','text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/showbuilder/builder.js','text/javascript');
|
||||
|
||||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/jquery.ui.timepicker.css');
|
||||
$this->view->headLink()->appendStylesheet($baseUrl.'/css/showbuilder.css');
|
||||
|
||||
$this->_helper->viewRenderer->setResponseSegment('builder');
|
||||
}
|
||||
|
||||
public function builderFeedAction() {
|
||||
|
||||
$request = $this->getRequest();
|
||||
$current_time = time();
|
||||
|
||||
$starts_epoch = $request->getParam("start", $current_time);
|
||||
//default ends is 24 hours after starts.
|
||||
$ends_epoch = $request->getParam("end", $current_time + (60*60*24));
|
||||
|
||||
$startsDT = DateTime::createFromFormat("U", $starts_epoch, new DateTimeZone("UTC"));
|
||||
$endsDT = DateTime::createFromFormat("U", $ends_epoch, new DateTimeZone("UTC"));
|
||||
|
||||
Logging::log("showbuilder starts {$startsDT->format("Y-m-d H:i:s")}");
|
||||
Logging::log("showbuilder ends {$endsDT->format("Y-m-d H:i:s")}");
|
||||
|
||||
$showBuilder = new Application_Model_ShowBuilder($startsDT, $endsDT);
|
||||
|
||||
$this->view->schedule = $showBuilder->GetItems();
|
||||
}
|
||||
|
||||
public function scheduleAddAction() {
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
$mediaItems = $request->getParam("mediaIds", null);
|
||||
$scheduledIds = $request->getParam("schedIds", null);
|
||||
|
||||
$json = array();
|
||||
|
||||
try {
|
||||
$scheduler = new Application_Model_Scheduler();
|
||||
$scheduler->scheduleAfter($scheduledIds, $mediaItems);
|
||||
|
||||
$json["message"]="success... maybe";
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$json["message"]=$e->getMessage();
|
||||
Logging::log($e->getMessage());
|
||||
}
|
||||
|
||||
$this->view->data = $json;
|
||||
}
|
||||
|
||||
public function scheduleRemoveAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
|
||||
$ids = $request->getParam("ids", null);
|
||||
|
||||
$json = array();
|
||||
|
||||
try {
|
||||
$scheduler = new Application_Model_Scheduler();
|
||||
$scheduler->removeItems($ids);
|
||||
|
||||
$json["message"]="success... maybe";
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$json["message"]=$e->getMessage();
|
||||
Logging::log($e->getMessage());
|
||||
}
|
||||
|
||||
$this->view->data = $json;
|
||||
}
|
||||
|
||||
public function scheduleMoveAction() {
|
||||
|
||||
$request = $this->getRequest();
|
||||
|
||||
$selectedItem = $request->getParam("selectedItem");
|
||||
$afterItem = $request->getParam("afterItem");
|
||||
|
||||
$json = array();
|
||||
|
||||
try {
|
||||
$scheduler = new Application_Model_Scheduler();
|
||||
$scheduler->moveItem($selectedItem, $afterItem);
|
||||
|
||||
$json["message"]="success... maybe";
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$json["message"]=$e->getMessage();
|
||||
Logging::log($e->getMessage());
|
||||
}
|
||||
|
||||
$this->view->data = $json;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
<?php echo $this->doctype() ?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<?php echo $this->headTitle() ?>
|
||||
<?php echo $this->headScript() ?>
|
||||
<?php echo $this->headLink() ?>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="Panel">
|
||||
<div class="logo"></div>
|
||||
<?php echo $this->versionNotify() ?>
|
||||
<?php echo $this->partial('partialviews/header.phtml', array("user" => $this->loggedInAs(), "is_trial"=>$this->isTrial(), "trial_remain"=> $this->trialRemaining())) ?>
|
||||
|
||||
<?php $partial = array('menu.phtml', 'default');
|
||||
$this->navigation()->menu()->setPartial($partial); ?>
|
||||
|
||||
<?php echo $this->navigation()->menu() ?>
|
||||
</div>
|
||||
|
||||
<div class="wrapper">
|
||||
<!--Set to z-index 254 to make it lower than the top-panel and the ZFDebug info bar, but higher than the side-playlist-->
|
||||
<div id="library_content" class="tabs ui-widget ui-widget-content block-shadow alpha-block padded" style="z-index:254"><?php echo $this->layout()->library ?></div>
|
||||
<div id="show_builder" style="width:500px;" class="ui-widget ui-widget-content block-shadow omega-block padded"><?php echo $this->layout()->builder ?></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -155,7 +155,7 @@ class Application_Model_Schedule {
|
|||
"nextShow"=>Application_Model_Show::GetNextShows($utcTimeNow, 1),
|
||||
"timezone"=> date("T"),
|
||||
"timezoneOffset"=> date("Z"));
|
||||
|
||||
|
||||
return $range;
|
||||
}
|
||||
|
||||
|
@ -294,6 +294,48 @@ class Application_Model_Schedule {
|
|||
return $rows;
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
* @param DateTime $p_startDateTime
|
||||
*
|
||||
* @param DateTime $p_endDateTime
|
||||
*
|
||||
* @return array $scheduledItems
|
||||
*
|
||||
*/
|
||||
public static function GetScheduleDetailItems($p_startDateTime, $p_endDateTime)
|
||||
{
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
|
||||
$sql = "SELECT DISTINCT
|
||||
|
||||
showt.name AS show_name, showt.color AS show_color,
|
||||
showt.background_color AS show_background_colour, showt.id AS show_id,
|
||||
|
||||
si.starts AS si_starts, si.ends AS si_ends, si.time_filled AS si_time_filled,
|
||||
si.record AS si_record, si.rebroadcast AS si_rebroadcast, si.id AS si_id,
|
||||
|
||||
sched.starts AS sched_starts, sched.ends AS sched_ends, sched.id AS sched_id,
|
||||
|
||||
ft.track_title AS file_track_title, ft.artist_name AS file_artist_name,
|
||||
ft.album_title AS file_album_title, ft.length AS file_length
|
||||
|
||||
FROM
|
||||
((cc_schedule AS sched JOIN cc_files AS ft ON (sched.file_id = ft.id)
|
||||
RIGHT OUTER JOIN cc_show_instances AS si ON (si.id = sched.instance_id))
|
||||
JOIN cc_show AS showt ON (showt.id = si.show_id)
|
||||
)
|
||||
|
||||
WHERE si.starts >= '{$p_startDateTime}' AND si.starts <= '{$p_endDateTime}'
|
||||
|
||||
ORDER BY si.starts, sched.starts;";
|
||||
|
||||
Logging::log($sql);
|
||||
|
||||
$rows = $CC_DBC->GetAll($sql);
|
||||
return $rows;
|
||||
}
|
||||
|
||||
public static function GetShowInstanceItems($instance_id)
|
||||
{
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
|
@ -533,7 +575,7 @@ class Application_Model_Schedule {
|
|||
|
||||
public static function createNewFormSections($p_view){
|
||||
$isSaas = Application_Model_Preference::GetPlanLevel() == 'disabled'?false:true;
|
||||
|
||||
|
||||
$formWhat = new Application_Form_AddShowWhat();
|
||||
$formWho = new Application_Form_AddShowWho();
|
||||
$formWhen = new Application_Form_AddShowWhen();
|
||||
|
@ -560,16 +602,16 @@ class Application_Model_Schedule {
|
|||
'add_show_duration' => '1h'));
|
||||
|
||||
$formRepeats->populate(array('add_show_end_date' => date("Y-m-d")));
|
||||
|
||||
|
||||
if(!$isSaas){
|
||||
$formRecord = new Application_Form_AddShowRR();
|
||||
$formAbsoluteRebroadcast = new Application_Form_AddShowAbsoluteRebroadcastDates();
|
||||
$formRebroadcast = new Application_Form_AddShowRebroadcastDates();
|
||||
|
||||
|
||||
$formRecord->removeDecorator('DtDdWrapper');
|
||||
$formAbsoluteRebroadcast->removeDecorator('DtDdWrapper');
|
||||
$formRebroadcast->removeDecorator('DtDdWrapper');
|
||||
|
||||
|
||||
$p_view->rr = $formRecord;
|
||||
$p_view->absoluteRebroadcast = $formAbsoluteRebroadcast;
|
||||
$p_view->rebroadcast = $formRebroadcast;
|
||||
|
|
|
@ -0,0 +1,352 @@
|
|||
<?php
|
||||
|
||||
class Application_Model_Scheduler {
|
||||
|
||||
private $con;
|
||||
private $fileInfo = array(
|
||||
"id" => "",
|
||||
"cliplength" => "",
|
||||
"cuein" => "00:00:00",
|
||||
"cueout" => "00:00:00",
|
||||
"fadein" => "00:00:00",
|
||||
"fadeout" => "00:00:00",
|
||||
"sched_id" => null,
|
||||
);
|
||||
|
||||
public function __construct($id = null) {
|
||||
|
||||
$this->con = Propel::getConnection(CcSchedulePeer::DATABASE_NAME);
|
||||
}
|
||||
|
||||
/*
|
||||
* @param $id
|
||||
* @param $type
|
||||
*
|
||||
* @return $files
|
||||
*/
|
||||
private function retrieveMediaFiles($id, $type) {
|
||||
|
||||
$files = array();
|
||||
|
||||
if ($type === "audioclip") {
|
||||
$file = CcFilesQuery::create()->findPK($id, $this->con);
|
||||
|
||||
$data = $this->fileInfo;
|
||||
$data["id"] = $id;
|
||||
$data["cliplength"] = $file->getDbLength();
|
||||
|
||||
$files[] = $data;
|
||||
}
|
||||
else if ($type === "playlist") {
|
||||
|
||||
$contents = CcPlaylistcontentsQuery::create()
|
||||
->orderByDbPosition()
|
||||
->filterByDbPlaylistId($id)
|
||||
->find($this->con);
|
||||
|
||||
foreach ($contents as $plItem) {
|
||||
|
||||
$data = $this->fileInfo;
|
||||
$data["id"] = $plItem->getDbFileId();
|
||||
$data["cliplength"] = $plItem->getDbCliplength();
|
||||
$data["cuein"] = $plItem->getDbCuein();
|
||||
$data["cueout"] = $plItem->getDbCueout();
|
||||
$data["fadein"] = $plItem->getDbFadein();
|
||||
$data["fadeout"] = $plItem->getDbFadeout();
|
||||
|
||||
$files[] = $data;
|
||||
}
|
||||
}
|
||||
|
||||
return $files;
|
||||
}
|
||||
|
||||
/*
|
||||
* @param DateTime startDT
|
||||
* @param string duration
|
||||
* in format H:i:s.u (could be more that 24 hours)
|
||||
*/
|
||||
private function findEndTime($startDT, $duration) {
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* @param array $scheduledIds
|
||||
* @param array $fileIds
|
||||
* @param array $playlistIds
|
||||
*/
|
||||
private function insertAfter($scheduleItems, $schedFiles, $adjustSched = true) {
|
||||
|
||||
try {
|
||||
|
||||
//dont want to recalculate times for moved items.
|
||||
$excludeIds = array();
|
||||
foreach ($schedFiles as $file) {
|
||||
if (isset($file["sched_id"])) {
|
||||
$excludeIds[] = intval($file["sched_id"]);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($scheduleItems as $schedule) {
|
||||
$id = intval($schedule["id"]);
|
||||
|
||||
Logging::log("scheduling after scheduled item: ".$id);
|
||||
Logging::log("in show: ".intval($schedule["instance"]));
|
||||
|
||||
if ($id !== 0) {
|
||||
$schedItem = CcScheduleQuery::create()->findPK($id, $this->con);
|
||||
$instance = $schedItem->getDbInstanceId();
|
||||
|
||||
//user has an old copy of the time line opened.
|
||||
if ($instance !== intval($schedule["instance"])) {
|
||||
Logging::log("items have been since updated");
|
||||
return;
|
||||
}
|
||||
|
||||
$nextStartDT = $schedItem->getDbEnds(null);
|
||||
}
|
||||
//selected empty row to add after
|
||||
else {
|
||||
$showInstance = CcShowInstancesQuery::create()->findPK($schedule["instance"], $this->con);
|
||||
$nextStartDT = $showInstance->getDbStarts(null);
|
||||
$instance = intval($schedule["instance"]);
|
||||
}
|
||||
|
||||
Logging::log("finding items >= {$nextStartDT->format("Y-m-d H:i:s.u")}");
|
||||
if ($adjustSched === true) {
|
||||
$followingSchedItems = CcScheduleQuery::create()
|
||||
->filterByDBStarts($nextStartDT->format("Y-m-d H:i:s.u"), Criteria::GREATER_EQUAL)
|
||||
->filterByDbInstanceId($instance)
|
||||
->filterByDbId($excludeIds, Criteria::NOT_IN)
|
||||
->orderByDbStarts()
|
||||
->find($this->con);
|
||||
|
||||
foreach ($excludeIds as $id) {
|
||||
Logging::log("Excluding id {$id}");
|
||||
}
|
||||
}
|
||||
|
||||
foreach($schedFiles as $file) {
|
||||
|
||||
Logging::log("adding file with id: ".$file["id"]);
|
||||
|
||||
$durationDT = new DateTime("1970-01-01 {$file['cliplength']}", new DateTimeZone("UTC"));
|
||||
$endTimeEpoch = $nextStartDT->format("U") + $durationDT->format("U");
|
||||
$endTimeDT = DateTime::createFromFormat("U", $endTimeEpoch, new DateTimeZone("UTC"));
|
||||
|
||||
//item existed previously and is being moved.
|
||||
//need to keep same id for resources if we want REST.
|
||||
if (isset($file['sched_id'])) {
|
||||
$sched = CcScheduleQuery::create()->findPK($file['sched_id'], $this->con);
|
||||
}
|
||||
else {
|
||||
$sched = new CcSchedule();
|
||||
}
|
||||
Logging::log("id {$sched->getDbId()}");
|
||||
Logging::log("start time {$nextStartDT->format("Y-m-d H:i:s.u")}");
|
||||
Logging::log("end time {$endTimeDT->format("Y-m-d H:i:s.u")}");
|
||||
|
||||
$sched->setDbStarts($nextStartDT);
|
||||
$sched->setDbEnds($endTimeDT);
|
||||
$sched->setDbFileId($file['id']);
|
||||
$sched->setDbCueIn($file['cuein']);
|
||||
$sched->setDbCueOut($file['cueout']);
|
||||
$sched->setDbFadeIn($file['fadein']);
|
||||
$sched->setDbFadeOut($file['fadeout']);
|
||||
$sched->setDbClipLength($durationDT->format("H:i:s.u"));
|
||||
$sched->setDbInstanceId($instance);
|
||||
$sched->save($this->con);
|
||||
|
||||
$nextStartDT = $endTimeDT;
|
||||
}
|
||||
|
||||
if ($adjustSched === true) {
|
||||
|
||||
//recalculate the start/end times after the inserted items.
|
||||
foreach($followingSchedItems as $item) {
|
||||
|
||||
Logging::log("adjusting iterm {$item->getDbId()}");
|
||||
|
||||
$durationDT = new DateTime("1970-01-01 {$item->getDbClipLength()}", new DateTimeZone("UTC"));
|
||||
$endTimeEpoch = $nextStartDT->format("U") + $durationDT->format("U");
|
||||
$endTimeDT = DateTime::createFromFormat("U", $endTimeEpoch, new DateTimeZone("UTC"));
|
||||
|
||||
$item->setDbStarts($nextStartDT);
|
||||
$item->setDbEnds($endTimeDT);
|
||||
$item->save($this->con);
|
||||
|
||||
$nextStartDT = $endTimeDT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* @param array $scheduledIds
|
||||
* @param array $fileIds
|
||||
* @param array $playlistIds
|
||||
*/
|
||||
public function scheduleAfter($scheduleItems, $mediaItems, $adjustSched = true) {
|
||||
|
||||
$this->con->beginTransaction();
|
||||
|
||||
$schedFiles = array();
|
||||
|
||||
try {
|
||||
|
||||
foreach($mediaItems as $media) {
|
||||
Logging::log("Media Id ".$media["id"]);
|
||||
Logging::log("Type ".$media["type"]);
|
||||
|
||||
$schedFiles = array_merge($schedFiles, $this->retrieveMediaFiles($media["id"], $media["type"]));
|
||||
}
|
||||
$this->insertAfter($scheduleItems, $schedFiles, $adjustSched);
|
||||
|
||||
$this->con->commit();
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$this->con->rollback();
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* @param array $selectedItem
|
||||
* @param array $afterItem
|
||||
*/
|
||||
public function moveItem($selectedItem, $afterItem, $adjustSched = true) {
|
||||
|
||||
$this->con->beginTransaction();
|
||||
|
||||
try {
|
||||
|
||||
$origSelIns = intval($selectedItem[0]["instance"]);
|
||||
$origAfterIns = intval($afterItem[0]["instance"]);
|
||||
|
||||
Logging::log("Moving item {$selectedItem[0]["id"]}");
|
||||
Logging::log("After {$afterItem[0]["id"]}");
|
||||
|
||||
$selected = CcScheduleQuery::create()->findPk($selectedItem[0]["id"]);
|
||||
$after = CcScheduleQuery::create()->findPk($afterItem[0]["id"]);
|
||||
|
||||
/*
|
||||
if (isset($after) && $origSelIns !== $selected->getDBInstanceId()
|
||||
|| $origAfterIns !== $after->getDBInstanceId()) {
|
||||
|
||||
Logging::log("items have been since updated");
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
$this->removeGaps($origSelIns, $selected->getDbId());
|
||||
|
||||
//moved to another show, remove gaps from original show.
|
||||
if ($adjustSched === true && $origSelIns !== $origAfterIns) {
|
||||
|
||||
}
|
||||
|
||||
$data = $this->fileInfo;
|
||||
$data["id"] = $selected->getDbFileId();
|
||||
$data["cliplength"] = $selected->getDbClipLength();
|
||||
$data["cuein"] = $selected->getDbCueIn();
|
||||
$data["cueout"] = $selected->getDbCueOut();
|
||||
$data["fadein"] = $selected->getDbFadeIn();
|
||||
$data["fadeout"] = $selected->getDbFadeOut();
|
||||
$data["sched_id"] = $selected->getDbId();
|
||||
|
||||
$this->insertAfter($afterItem, array($data), $adjustSched);
|
||||
|
||||
$this->con->commit();
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$this->con->rollback();
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
public function removeItems($scheduledIds, $adjustSched = true) {
|
||||
|
||||
$showInstances = array();
|
||||
$this->con->beginTransaction();
|
||||
|
||||
try {
|
||||
|
||||
$removedItems = CcScheduleQuery::create()->findPks($scheduledIds);
|
||||
$removedItems->delete($this->con);
|
||||
|
||||
if ($adjustSched === true) {
|
||||
//get the show instances of the shows we must adjust times for.
|
||||
foreach ($removedItems as $item) {
|
||||
|
||||
$instance = $item->getDBInstanceId();
|
||||
if (!in_array($instance, $showInstances)) {
|
||||
$showInstances[] = $instance;
|
||||
}
|
||||
}
|
||||
|
||||
foreach($showInstances as $instance) {
|
||||
$this->removeGaps($instance);
|
||||
}
|
||||
}
|
||||
|
||||
$this->con->commit();
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$this->con->rollback();
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* @param int $showInstance
|
||||
* @param array $exclude
|
||||
* ids of sched items to remove from the calulation.
|
||||
*/
|
||||
public function removeGaps($showInstance, $exclude=null) {
|
||||
|
||||
Logging::log("removing gaps from show instance #".$showInstance);
|
||||
|
||||
$instance = CcShowInstancesQuery::create()->findPK($showInstance, $this->con);
|
||||
$itemStartDT = $instance->getDbStarts(null);
|
||||
|
||||
$schedule = CcScheduleQuery::create()
|
||||
->filterByDbInstanceId($showInstance)
|
||||
->filterByDbId($exclude, Criteria::NOT_IN)
|
||||
->orderByDbStarts()
|
||||
->find($this->con);
|
||||
|
||||
|
||||
foreach ($schedule as $item) {
|
||||
|
||||
Logging::log("adjusting item #".$item->getDbId());
|
||||
|
||||
if (!$item->isDeleted()) {
|
||||
Logging::log("item #".$item->getDbId()." is not deleted");
|
||||
|
||||
$durationDT = new DateTime("1970-01-01 {$item->getDbClipLength()}", new DateTimeZone("UTC"));
|
||||
$startEpoch = $itemStartDT->format("U");
|
||||
Logging::log("new start time");
|
||||
Logging::log($itemStartDT->format("Y-m-d H:i:s"));
|
||||
|
||||
Logging::log("duration");
|
||||
Logging::log($durationDT->format("U"). "seconds");
|
||||
|
||||
$endEpoch = $itemStartDT->format("U") + $durationDT->format("U");
|
||||
$itemEndDT = DateTime::createFromFormat("U", $endEpoch, new DateTimeZone("UTC"));
|
||||
Logging::log("new end time");
|
||||
Logging::log($itemEndDT->format("Y-m-d H:i:s"));
|
||||
|
||||
$item->setDbStarts($itemStartDT);
|
||||
$item->setDbEnds($itemEndDT);
|
||||
$item->save($this->con);
|
||||
|
||||
$itemStartDT = $itemEndDT;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,156 @@
|
|||
<?php
|
||||
|
||||
class Application_Model_ShowBuilder {
|
||||
|
||||
private $timezone;
|
||||
private $startDT;
|
||||
private $endDT;
|
||||
private $user;
|
||||
|
||||
private $defaultRowArray = array(
|
||||
"header" => false,
|
||||
"footer" => false,
|
||||
"empty" => false,
|
||||
"checkbox" => false,
|
||||
"id" => 0,
|
||||
"instance" => "",
|
||||
"starts" => "",
|
||||
"startsUnix" => null,
|
||||
"ends" => "",
|
||||
"endsUnix" => null,
|
||||
"runtime" => "",
|
||||
"title" => "",
|
||||
"creator" => "",
|
||||
"album" => ""
|
||||
);
|
||||
|
||||
/*
|
||||
* @param DateTime $p_startsDT
|
||||
* @param DateTime $p_endsDT
|
||||
*/
|
||||
public function __construct($p_startDT, $p_endDT) {
|
||||
|
||||
$this->startDT = $p_startDT;
|
||||
$this->endDT = $p_endDT;
|
||||
$this->timezone = date_default_timezone_get();
|
||||
$this->user = Application_Model_User::GetCurrentUser();
|
||||
}
|
||||
|
||||
/*
|
||||
* @param DateInterval $p_interval
|
||||
*
|
||||
* @return string $runtime
|
||||
*/
|
||||
private function formatDuration($p_interval){
|
||||
|
||||
$hours = $p_interval->format("%h");
|
||||
$mins = $p_interval->format("%i");
|
||||
|
||||
if( $hours == 0) {
|
||||
$runtime = $p_interval->format("%i:%S");
|
||||
}
|
||||
else {
|
||||
$runtime = $p_interval->format("%h:%I:%S");
|
||||
}
|
||||
|
||||
return $runtime;
|
||||
}
|
||||
|
||||
private function makeFooterRow() {
|
||||
|
||||
$row = $this->defaultRowArray;
|
||||
$row["footer"] = true;
|
||||
|
||||
return $row;
|
||||
}
|
||||
|
||||
private function makeHeaderRow($p_item) {
|
||||
|
||||
$row = $this->defaultRowArray;
|
||||
|
||||
$showStartDT = new DateTime($p_item["si_starts"], new DateTimeZone("UTC"));
|
||||
$showStartDT->setTimezone(new DateTimeZone($this->timezone));
|
||||
$showEndDT = new DateTime($p_item["si_ends"], new DateTimeZone("UTC"));
|
||||
$showEndDT->setTimezone(new DateTimeZone($this->timezone));
|
||||
|
||||
//$diff =
|
||||
|
||||
$row["header"] = true;
|
||||
$row["starts"] = $showStartDT->format("Y-m-d H:i");
|
||||
$row["ends"] = $showEndDT->format("Y-m-d H:i");
|
||||
$row["duration"] = $showEndDT->format("U") - $showStartDT->format("U");
|
||||
$row["title"] = $p_item["show_name"];
|
||||
$row["instance"] = intval($p_item["si_id"]);
|
||||
|
||||
return $row;
|
||||
}
|
||||
|
||||
private function makeScheduledItemRow($p_item) {
|
||||
$row = $this->defaultRowArray;
|
||||
|
||||
if (isset($p_item["sched_starts"])) {
|
||||
|
||||
$schedStartDT = new DateTime($p_item["sched_starts"], new DateTimeZone("UTC"));
|
||||
$schedStartDT->setTimezone(new DateTimeZone($this->timezone));
|
||||
$schedEndDT = new DateTime($p_item["sched_ends"], new DateTimeZone("UTC"));
|
||||
$schedEndDT->setTimezone(new DateTimeZone($this->timezone));
|
||||
|
||||
$runtime = $schedStartDT->diff($schedEndDT);
|
||||
|
||||
$row["id"] = intval($p_item["sched_id"]);
|
||||
$row["instance"] = intval($p_item["si_id"]);
|
||||
$row["starts"] = $schedStartDT->format("H:i:s");
|
||||
$row["ends"] = $schedEndDT->format("H:i:s");
|
||||
$row["runtime"] = $this->formatDuration($runtime);
|
||||
$row["title"] = $p_item["file_track_title"];
|
||||
$row["creator"] = $p_item["file_artist_name"];
|
||||
$row["album"] = $p_item["file_album_title"];
|
||||
|
||||
if ($this->user->canSchedule($item["show_id"]) === true) {
|
||||
$row["checkbox"] = true;
|
||||
}
|
||||
}
|
||||
//show is empty
|
||||
else {
|
||||
$row["empty"] = true;
|
||||
$row["id"] = 0 ;
|
||||
$row["instance"] = intval($p_item["si_id"]);
|
||||
}
|
||||
|
||||
return $row;
|
||||
}
|
||||
|
||||
public function GetItems() {
|
||||
|
||||
$current_id = -1;
|
||||
$display_items = array();
|
||||
|
||||
$scheduled_items = Application_Model_Schedule::GetScheduleDetailItems($this->startDT->format("Y-m-d H:i:s"), $this->endDT->format("Y-m-d H:i:s"));
|
||||
|
||||
foreach ($scheduled_items as $item) {
|
||||
|
||||
//make a header row.
|
||||
if ($current_id !== $item["si_id"]) {
|
||||
|
||||
//make a footer row.
|
||||
if ($current_id !== -1) {
|
||||
$display_items[] = $this->makeFooterRow();
|
||||
}
|
||||
|
||||
$display_items[] = $this->makeHeaderRow($item);
|
||||
|
||||
$current_id = $item["si_id"];
|
||||
}
|
||||
|
||||
//make a normal data row.
|
||||
$display_items[] = $this->makeScheduledItemRow($item);
|
||||
}
|
||||
|
||||
//make the last footer if there were any scheduled items.
|
||||
if (count($scheduled_items) > 0) {
|
||||
$display_items[] = $this->makeFooterRow();
|
||||
}
|
||||
|
||||
return $display_items;
|
||||
}
|
||||
}
|
|
@ -90,7 +90,7 @@ class Application_Model_StoredFile {
|
|||
}
|
||||
$this->setDbColMetadata($dbMd);
|
||||
}
|
||||
|
||||
|
||||
$this->_file->setDbMtime(new DateTime("now"), new DateTimeZone("UTC"));
|
||||
$this->_file->save();
|
||||
}
|
||||
|
@ -227,30 +227,6 @@ class Application_Model_StoredFile {
|
|||
return $md;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete and insert media file
|
||||
*
|
||||
* @param string $p_localFilePath
|
||||
* local path
|
||||
* @return TRUE|PEAR_Error
|
||||
*/
|
||||
public function replaceFile($p_localFilePath, $p_copyMedia=TRUE)
|
||||
{
|
||||
// Dont do anything if the source and destination files are
|
||||
// the same.
|
||||
if ($this->name == $p_localFilePath) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if ($this->exists) {
|
||||
$r = $this->deleteFile();
|
||||
if (PEAR::isError($r)) {
|
||||
return $r;
|
||||
}
|
||||
}
|
||||
return $this->addFile($p_localFilePath, $p_copyMedia);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set state of virtual file
|
||||
*
|
||||
|
@ -301,98 +277,30 @@ class Application_Model_StoredFile {
|
|||
*
|
||||
* @param boolean $p_deleteFile
|
||||
*
|
||||
* @return void|PEAR_Error
|
||||
*/
|
||||
public function delete($deleteFromPlaylist=false)
|
||||
{
|
||||
if ($this->exists()) {
|
||||
if ($this->getFormat() == 'audioclip') {
|
||||
$res = $this->deleteFile();
|
||||
if (PEAR::isError($res)) {
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($deleteFromPlaylist){
|
||||
Application_Model_Playlist::DeleteFileFromAllPlaylists($this->getId());
|
||||
}
|
||||
|
||||
// set file_exists falg to false
|
||||
$this->_file->setDbFileExists(false);
|
||||
$this->_file->save();
|
||||
//$this->_file->delete();
|
||||
|
||||
if (isset($res)) {
|
||||
return $res;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete media file from filesystem.
|
||||
* You cant delete a file if it is being accessed.
|
||||
* You cant delete a file if it is scheduled to be played in the future.
|
||||
* The file will be removed from all playlists it is a part of.
|
||||
*
|
||||
* @return boolean|PEAR_Error
|
||||
*/
|
||||
public function deleteFile()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
|
||||
if ($this->isAccessed()) {
|
||||
return PEAR::raiseError('Cannot delete a file that is currently accessed.');
|
||||
}
|
||||
|
||||
// Check if the file is scheduled to be played in the future
|
||||
if (Application_Model_Schedule::IsFileScheduledInTheFuture($this->getId())) {
|
||||
return PEAR::raiseError('Cannot delete a file that is scheduled in the future.');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if media file exists
|
||||
* @return boolean
|
||||
*/
|
||||
public function exists()
|
||||
{
|
||||
if ($this->_file->isDeleted()) {
|
||||
return false;
|
||||
}
|
||||
if ($this->getFormat() == 'audioclip') {
|
||||
return $this->existsFile();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if raw media file exists
|
||||
* @return boolean
|
||||
*/
|
||||
public function existsFile() {
|
||||
|
||||
$filepath = $this->getFilePath();
|
||||
|
||||
if (!isset($filepath) || !file_exists($filepath) || !is_readable($filepath)) {
|
||||
return false;
|
||||
// Check if the file is scheduled to be played in the future
|
||||
if (Application_Model_Schedule::IsFileScheduledInTheFuture($this->getId())) {
|
||||
throw new DeleteScheduledFileException();
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if virtual file is currently in use.<br>
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function isAccessed()
|
||||
{
|
||||
return ($this->_file->getDbCurrentlyaccessing() > 0);
|
||||
if (file_exists($filepath)) {
|
||||
|
||||
$data = array("filepath" => $filepath, "delete" => 1);
|
||||
Application_Model_RabbitMq::SendMessageToMediaMonitor("file_delete", $data);
|
||||
}
|
||||
|
||||
if ($deleteFromPlaylist){
|
||||
Application_Model_Playlist::DeleteFileFromAllPlaylists($this->getId());
|
||||
}
|
||||
|
||||
// set file_exists falg to false
|
||||
$this->_file->setDbFileExists(false);
|
||||
$this->_file->save();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -419,10 +327,10 @@ class Application_Model_StoredFile {
|
|||
* @return string
|
||||
*/
|
||||
public function getFilePath()
|
||||
{
|
||||
{
|
||||
$music_dir = Application_Model_MusicDir::getDirByPK($this->_file->getDbDirectory());
|
||||
$directory = $music_dir->getDirectory();
|
||||
|
||||
|
||||
$filepath = $this->_file->getDbFilepath();
|
||||
|
||||
return $directory.$filepath;
|
||||
|
@ -436,7 +344,7 @@ class Application_Model_StoredFile {
|
|||
public function setFilePath($p_filepath)
|
||||
{
|
||||
$path_info = Application_Model_MusicDir::splitFilePath($p_filepath);
|
||||
|
||||
|
||||
if (is_null($path_info)) {
|
||||
return -1;
|
||||
}
|
||||
|
@ -506,7 +414,7 @@ class Application_Model_StoredFile {
|
|||
$storedFile->_file = $file;
|
||||
|
||||
if(isset($md['MDATA_KEY_FILEPATH'])) {
|
||||
// removed "//" in the path. Always use '/' for path separator
|
||||
// removed "//" in the path. Always use '/' for path separator
|
||||
$filepath = str_replace("//", "/", $md['MDATA_KEY_FILEPATH']);
|
||||
$res = $storedFile->setFilePath($filepath);
|
||||
if ($res === -1) {
|
||||
|
@ -643,6 +551,34 @@ class Application_Model_StoredFile {
|
|||
return $res;
|
||||
}
|
||||
|
||||
/*
|
||||
* @param DateInterval $p_interval
|
||||
*
|
||||
* @return string $runtime
|
||||
*/
|
||||
private static function formatDuration($dt){
|
||||
|
||||
$hours = $dt->format("H");
|
||||
$min = $dt->format("i");
|
||||
$sec = $dt->format("s");
|
||||
|
||||
$time = "PT{$hours}H{$min}M{$sec}S";
|
||||
|
||||
$p_interval = new DateInterval($time);
|
||||
|
||||
$hours = $p_interval->format("%h");
|
||||
$mins = $p_interval->format("%i");
|
||||
|
||||
if( $hours == 0) {
|
||||
$runtime = $p_interval->format("%i:%S");
|
||||
}
|
||||
else {
|
||||
$runtime = $p_interval->format("%h:%I:%S");
|
||||
}
|
||||
|
||||
return $runtime;
|
||||
}
|
||||
|
||||
public static function searchFilesForPlaylistBuilder($datatables)
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
|
@ -660,11 +596,11 @@ class Application_Model_StoredFile {
|
|||
$plSelect .= "'playlist' AS ".$key.", ";
|
||||
$fileSelect .= $key.", ";
|
||||
} else if ($key === "artist_name") {
|
||||
$plSelect .= "creator AS ".$key.", ";
|
||||
$plSelect .= "login AS ".$key.", ";
|
||||
$fileSelect .= $key.", ";
|
||||
} else if ($key === "length") {
|
||||
$plSelect .= $key.", ";
|
||||
$fileSelect .= $key.", ";
|
||||
$fileSelect .= $key."::interval, ";
|
||||
} else if ($key === "year") {
|
||||
$plSelect .= "CAST(utime AS varchar) AS ".$key.", ";
|
||||
$fileSelect .= $key.", ";
|
||||
|
@ -681,13 +617,19 @@ class Application_Model_StoredFile {
|
|||
}
|
||||
|
||||
$fromTable = " ((".$plSelect."PL.id
|
||||
FROM ".$CC_CONFIG["playListTable"]." AS PL
|
||||
LEFT JOIN ".$CC_CONFIG['playListTimeView']." AS PLT USING(id))
|
||||
FROM cc_playlist AS PL LEFT JOIN cc_subjs AS sub ON (sub.id = PL.creator_id))
|
||||
UNION
|
||||
(".$fileSelect."id FROM ".$CC_CONFIG["filesTable"]." AS FILES WHERE file_exists = 'TRUE')) AS RESULTS";
|
||||
|
||||
|
||||
$results = Application_Model_StoredFile::searchFiles($fromTable, $datatables);
|
||||
|
||||
foreach($results['aaData'] as &$row){
|
||||
|
||||
$row['id'] = intval($row['id']);
|
||||
|
||||
$length = new DateTime($row['length']);
|
||||
$row['length'] = self::formatDuration($length);
|
||||
|
||||
// add checkbox row
|
||||
$row['checkbox'] = "<input type='checkbox' name='cb_".$row['id']."'>";
|
||||
|
||||
|
@ -695,7 +637,22 @@ class Application_Model_StoredFile {
|
|||
// split it and grab only the year info
|
||||
$yearSplit = explode('-', $row['year']);
|
||||
$row['year'] = $yearSplit[0];
|
||||
|
||||
$type = substr($row['ftype'], 0, 2);
|
||||
|
||||
$row['tr_id'] = "{$type}_{$row['id']}";
|
||||
|
||||
//TODO url like this to work on both playlist/showbuilder screens.
|
||||
//datatable stuff really needs to be pulled out and generalized within the project
|
||||
//access to zend view methods to access url helpers is needed.
|
||||
if($type == "au") {
|
||||
$row['image'] = '<img src="/css/images/icon_audioclip.png">';
|
||||
}
|
||||
else {
|
||||
$row['image'] = '<img src="/css/images/icon_playlist.png">';
|
||||
}
|
||||
}
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
|
@ -723,7 +680,8 @@ class Application_Model_StoredFile {
|
|||
unset($columnsDisplayed[$key]);
|
||||
}
|
||||
}
|
||||
$selectorRows = "SELECT " . join(',', $columnsDisplayed );
|
||||
//$selectorRows = "SELECT " . join(',', $columnsDisplayed );
|
||||
$selectorRows = "SELECT * ";
|
||||
|
||||
$sql = $selectorCount." FROM ".$fromTable;
|
||||
$totalRows = $CC_DBC->getOne($sql);
|
||||
|
@ -774,9 +732,11 @@ class Application_Model_StoredFile {
|
|||
else {
|
||||
$sql = $selectorRows." FROM ".$fromTable." ORDER BY ".$orderby." OFFSET ".$data["iDisplayStart"]." LIMIT ".$data["iDisplayLength"];
|
||||
}
|
||||
|
||||
|
||||
//Logging::log($sql);
|
||||
|
||||
$results = $CC_DBC->getAll($sql);
|
||||
|
||||
|
||||
if(!isset($totalDisplayRows)) {
|
||||
$totalDisplayRows = $totalRows;
|
||||
}
|
||||
|
@ -905,6 +865,7 @@ class Application_Model_StoredFile {
|
|||
$audio_stor = $stor . DIRECTORY_SEPARATOR . $fileName;
|
||||
|
||||
Logging::log("copyFileToStor: moving file $audio_file to $audio_stor");
|
||||
|
||||
//Martin K.: changed to rename: Much less load + quicker since this is an atomic operation
|
||||
|
||||
$r = @rename($audio_file, $audio_stor);
|
||||
|
@ -927,14 +888,14 @@ class Application_Model_StoredFile {
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* Enter description here ...
|
||||
* @param $dir_id - if this is not provided, it returns all files with full path constructed.
|
||||
* @param $propelObj - if this is true, it returns array of proepl obj
|
||||
*/
|
||||
public static function listAllFiles($dir_id=null, $propelObj=false){
|
||||
global $CC_DBC;
|
||||
|
||||
|
||||
if($propelObj){
|
||||
$sql = "SELECT m.directory || f.filepath as fp"
|
||||
." FROM CC_MUSIC_DIRS m"
|
||||
|
@ -996,12 +957,12 @@ class Application_Model_StoredFile {
|
|||
public function getSoundCloudErrorMsg(){
|
||||
return $this->_file->getDbSoundCloudErrorMsg();
|
||||
}
|
||||
|
||||
|
||||
public function setFileExistsFlag($flag){
|
||||
$this->_file->setDbFileExists($flag)
|
||||
->save();
|
||||
}
|
||||
|
||||
|
||||
public function getFileExistsFlag(){
|
||||
return $this->_file->getDbFileExists();
|
||||
}
|
||||
|
@ -1048,3 +1009,4 @@ class Application_Model_StoredFile {
|
|||
}
|
||||
}
|
||||
|
||||
class DeleteScheduledFileException extends Exception {}
|
||||
|
|
|
@ -11,11 +11,16 @@ class Application_Model_User {
|
|||
|
||||
public function __construct($userId)
|
||||
{
|
||||
if (strlen($userId)==0){
|
||||
if (empty($userId)){
|
||||
$this->_userInstance = $this->createUser();
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$this->_userInstance = CcSubjsQuery::create()->findPK($userId);
|
||||
}
|
||||
|
||||
if (is_null($this->_userInstance)){
|
||||
throw new Exception();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function getId() {
|
||||
|
@ -29,7 +34,20 @@ class Application_Model_User {
|
|||
public function isAdmin() {
|
||||
return $this->isUserType(UTYPE_ADMIN);
|
||||
}
|
||||
|
||||
|
||||
public function canSchedule($p_showId) {
|
||||
$type = $this->getType();
|
||||
|
||||
if ( $type === UTYPE_ADMIN ||
|
||||
$type === UTYPE_PROGRAM_MANAGER ||
|
||||
CcShowHostsQuery::create()->filterByDbShow($p_showId)->filterByDbHost($this->getId())->count() > 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function isUserType($type, $showId=''){
|
||||
if(is_array($type)){
|
||||
$result = false;
|
||||
|
@ -62,99 +80,99 @@ class Application_Model_User {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function setLogin($login){
|
||||
$user = $this->_userInstance;
|
||||
$user->setDbLogin($login);
|
||||
$user->setDbLogin($login);
|
||||
}
|
||||
|
||||
|
||||
public function setPassword($password){
|
||||
$user = $this->_userInstance;
|
||||
$user->setDbPass(md5($password));
|
||||
$user->setDbPass(md5($password));
|
||||
}
|
||||
|
||||
|
||||
public function setFirstName($firstName){
|
||||
$user = $this->_userInstance;
|
||||
$user->setDbFirstName($firstName);
|
||||
$user->setDbFirstName($firstName);
|
||||
}
|
||||
|
||||
|
||||
public function setLastName($lastName){
|
||||
$user = $this->_userInstance;
|
||||
$user->setDbLastName($lastName);
|
||||
$user->setDbLastName($lastName);
|
||||
}
|
||||
|
||||
|
||||
public function setType($type){
|
||||
$user = $this->_userInstance;
|
||||
$user->setDbType($type);
|
||||
$user->setDbType($type);
|
||||
}
|
||||
|
||||
public function setEmail($email){
|
||||
$user = $this->_userInstance;
|
||||
$user->setDbEmail($email);
|
||||
$user->setDbEmail($email);
|
||||
}
|
||||
|
||||
public function setSkype($skype){
|
||||
$user = $this->_userInstance;
|
||||
$user->setDbSkypeContact($skype);
|
||||
$user->setDbSkypeContact($skype);
|
||||
}
|
||||
|
||||
public function setJabber($jabber){
|
||||
$user = $this->_userInstance;
|
||||
$user->setDbJabberContact($jabber);
|
||||
$user->setDbJabberContact($jabber);
|
||||
}
|
||||
|
||||
|
||||
public function getLogin(){
|
||||
$user = $this->_userInstance;
|
||||
return $user->getDbLogin();
|
||||
}
|
||||
|
||||
return $user->getDbLogin();
|
||||
}
|
||||
|
||||
public function getPassword(){
|
||||
$user = $this->_userInstance;
|
||||
return $user->getDbPass();
|
||||
return $user->getDbPass();
|
||||
}
|
||||
|
||||
|
||||
public function getFirstName(){
|
||||
$user = $this->_userInstance;
|
||||
return $user->getDbFirstName();
|
||||
return $user->getDbFirstName();
|
||||
}
|
||||
|
||||
|
||||
public function getLastName(){
|
||||
$user = $this->_userInstance;
|
||||
return $user->getDbLastName();
|
||||
return $user->getDbLastName();
|
||||
}
|
||||
|
||||
|
||||
public function getType(){
|
||||
$user = $this->_userInstance;
|
||||
return $user->getDbType();
|
||||
return $user->getDbType();
|
||||
}
|
||||
|
||||
public function getEmail(){
|
||||
$user = $this->_userInstance;
|
||||
return $user->getDbEmail();
|
||||
return $user->getDbEmail();
|
||||
}
|
||||
|
||||
public function getSkype(){
|
||||
$user = $this->_userInstance;
|
||||
return $user->getDbSkypeContact();
|
||||
return $user->getDbSkypeContact();
|
||||
}
|
||||
|
||||
public function getJabber(){
|
||||
$user = $this->_userInstance;
|
||||
return $user->getDbJabberContact();
|
||||
|
||||
return $user->getDbJabberContact();
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function save(){
|
||||
$this->_userInstance->save();
|
||||
}
|
||||
|
||||
|
||||
public function delete(){
|
||||
if (!$this->_userInstance->isDeleted())
|
||||
$this->_userInstance->delete();
|
||||
}
|
||||
|
||||
private function createUser() {
|
||||
$user = new CcSubjs();
|
||||
$user = new CcSubjs();
|
||||
return $user;
|
||||
}
|
||||
|
||||
|
@ -165,7 +183,7 @@ class Application_Model_User {
|
|||
|
||||
$sql_gen = "SELECT login AS value, login AS label, id as index FROM cc_subjs ";
|
||||
$sql = $sql_gen;
|
||||
|
||||
|
||||
if(is_array($type)) {
|
||||
for($i=0; $i<count($type); $i++) {
|
||||
$type[$i] = "type = '{$type[$i]}'";
|
||||
|
@ -175,9 +193,9 @@ class Application_Model_User {
|
|||
else {
|
||||
$sql_type = "type = {$type}";
|
||||
}
|
||||
|
||||
|
||||
$sql = $sql_gen ." WHERE (". $sql_type.") ";
|
||||
|
||||
|
||||
if(!is_null($search)) {
|
||||
$like = "login ILIKE '%{$search}%'";
|
||||
|
||||
|
@ -185,17 +203,17 @@ class Application_Model_User {
|
|||
}
|
||||
|
||||
$sql = $sql ." ORDER BY login";
|
||||
|
||||
return $CC_DBC->GetAll($sql);
|
||||
|
||||
return $CC_DBC->GetAll($sql);
|
||||
}
|
||||
|
||||
|
||||
public static function getUserCount($type=NULL){
|
||||
global $CC_DBC;
|
||||
|
||||
$sql;
|
||||
|
||||
$sql_gen = "SELECT count(*) AS cnt FROM cc_subjs ";
|
||||
|
||||
|
||||
if(!isset($type)){
|
||||
$sql = $sql_gen;
|
||||
}
|
||||
|
@ -209,21 +227,21 @@ class Application_Model_User {
|
|||
else {
|
||||
$sql_type = "type = {$type}";
|
||||
}
|
||||
|
||||
|
||||
$sql = $sql_gen ." WHERE (". $sql_type.") ";
|
||||
}
|
||||
|
||||
|
||||
return $CC_DBC->GetOne($sql);
|
||||
}
|
||||
|
||||
public static function getHosts($search=NULL) {
|
||||
return Application_Model_User::getUsers(array('H'), $search);
|
||||
}
|
||||
|
||||
|
||||
public static function getUsersDataTablesInfo($datatables_post) {
|
||||
|
||||
$fromTable = "cc_subjs";
|
||||
|
||||
|
||||
// get current user
|
||||
$username = "";
|
||||
$auth = Zend_Auth::getInstance();
|
||||
|
@ -231,9 +249,9 @@ class Application_Model_User {
|
|||
if ($auth->hasIdentity()) {
|
||||
$username = $auth->getIdentity()->login;
|
||||
}
|
||||
|
||||
|
||||
$res = Application_Model_StoredFile::searchFiles($fromTable, $datatables_post);
|
||||
|
||||
|
||||
// mark record which is for the current user
|
||||
foreach($res['aaData'] as &$record){
|
||||
if($record['login'] == $username){
|
||||
|
@ -242,20 +260,20 @@ class Application_Model_User {
|
|||
$record['delete'] = "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
public static function getUserData($id){
|
||||
global $CC_DBC;
|
||||
|
||||
|
||||
$sql = "SELECT login, first_name, last_name, type, id, email, skype_contact, jabber_contact"
|
||||
." FROM cc_subjs"
|
||||
." WHERE id = $id";
|
||||
|
||||
|
||||
return $CC_DBC->GetRow($sql);
|
||||
}
|
||||
|
||||
|
||||
public static function GetUserID($login){
|
||||
$user = CcSubjsQuery::create()->findOneByDbLogin($login);
|
||||
if (is_null($user)){
|
||||
|
@ -265,4 +283,9 @@ class Application_Model_User {
|
|||
}
|
||||
}
|
||||
|
||||
public static function GetCurrentUser() {
|
||||
$userinfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
|
||||
return new self($userinfo->id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_playlist' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
|
@ -15,34 +15,66 @@
|
|||
*/
|
||||
class CcPlaylist extends BaseCcPlaylist {
|
||||
|
||||
|
||||
public function computeLastPosition()
|
||||
/**
|
||||
* Get the [optionally formatted] temporal [utime] column value.
|
||||
*
|
||||
*
|
||||
* @param string $format The date/time format string (either date()-style or strftime()-style).
|
||||
* If format is NULL, then the raw DateTime object will be returned.
|
||||
* @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL
|
||||
* @throws PropelException - if unable to parse/validate the date/time value.
|
||||
*/
|
||||
public function getDbUtime($format = 'Y-m-d H:i:s')
|
||||
{
|
||||
$con = Propel::getConnection(CcPlaylistPeer::DATABASE_NAME);
|
||||
if ($this->utime === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$sql = 'SELECT MAX('.CcPlaylistcontentsPeer::POSITION.') AS pos'
|
||||
. ' FROM ' .CcPlaylistcontentsPeer::TABLE_NAME
|
||||
. ' WHERE ' .CcPlaylistcontentsPeer::PLAYLIST_ID. ' = :p1';
|
||||
try {
|
||||
$dt = new DateTime($this->utime, new DateTimeZone("UTC"));
|
||||
} catch (Exception $x) {
|
||||
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->utime, true), $x);
|
||||
}
|
||||
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p1', $this->getDbId());
|
||||
$stmt->execute();
|
||||
return $stmt->fetchColumn();
|
||||
if ($format === null) {
|
||||
// Because propel.useDateTimeClass is TRUE, we return a DateTime object.
|
||||
return $dt;
|
||||
} elseif (strpos($format, '%') !== false) {
|
||||
return strftime($format, $dt->format('U'));
|
||||
} else {
|
||||
return $dt->format($format);
|
||||
}
|
||||
}
|
||||
|
||||
public function computeLength()
|
||||
/**
|
||||
* Get the [optionally formatted] temporal [mtime] column value.
|
||||
*
|
||||
*
|
||||
* @param string $format The date/time format string (either date()-style or strftime()-style).
|
||||
* If format is NULL, then the raw DateTime object will be returned.
|
||||
* @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL
|
||||
* @throws PropelException - if unable to parse/validate the date/time value.
|
||||
*/
|
||||
public function getDbMtime($format = 'Y-m-d H:i:s')
|
||||
{
|
||||
$con = Propel::getConnection(CcPlaylistPeer::DATABASE_NAME);
|
||||
if ($this->mtime === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$sql = 'SELECT SUM('.CcPlaylistcontentsPeer::CLIPLENGTH.') AS length'
|
||||
. ' FROM ' .CcPlaylistcontentsPeer::TABLE_NAME
|
||||
. ' WHERE ' .CcPlaylistcontentsPeer::PLAYLIST_ID. ' = :p1';
|
||||
try {
|
||||
$dt = new DateTime($this->mtime, new DateTimeZone("UTC"));
|
||||
} catch (Exception $x) {
|
||||
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->mtime, true), $x);
|
||||
}
|
||||
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p1', $this->getDbId());
|
||||
$stmt->execute();
|
||||
return $stmt->fetchColumn();
|
||||
if ($format === null) {
|
||||
// Because propel.useDateTimeClass is TRUE, we return a DateTime object.
|
||||
return $dt;
|
||||
} elseif (strpos($format, '%') !== false) {
|
||||
return strftime($format, $dt->format('U'));
|
||||
} else {
|
||||
return $dt->format($format);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // CcPlaylist
|
||||
|
|
|
@ -5,7 +5,7 @@ require_once('Common.php');
|
|||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_playlistcontents' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
|
@ -15,67 +15,5 @@ require_once('Common.php');
|
|||
*/
|
||||
class CcPlaylistcontents extends BaseCcPlaylistcontents {
|
||||
|
||||
public function getDbFadein()
|
||||
{
|
||||
return $this->fadein;
|
||||
}
|
||||
|
||||
public function setDbFadein($time)
|
||||
{
|
||||
$this->fadein = $time;
|
||||
//$this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEIN;
|
||||
Common::setTimeInSub($this, 'FADEIN', $time);
|
||||
}
|
||||
|
||||
public function getDbFadeout()
|
||||
{
|
||||
return $this->fadeout;
|
||||
}
|
||||
|
||||
public function setDbFadeout($time)
|
||||
{
|
||||
$this->fadeout = $time;
|
||||
//$this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEOUT;
|
||||
Common::setTimeInSub($this, 'FADEOUT', $time);
|
||||
}
|
||||
|
||||
public function getDbCuein()
|
||||
{
|
||||
return $this->cuein;
|
||||
}
|
||||
|
||||
public function setDbCuein($time)
|
||||
{
|
||||
$this->cuein = $time;
|
||||
//$this->modifiedColumns[] = CcPlaylistcontentsPeer::CUEIN;
|
||||
Common::setTimeInSub($this, 'CUEIN', $time);
|
||||
}
|
||||
|
||||
public function getDbCueout()
|
||||
{
|
||||
return $this->cueout;
|
||||
}
|
||||
|
||||
public function setDbCueout($time)
|
||||
{
|
||||
$this->cueout = $time;
|
||||
//$this->modifiedColumns[] = CcPlaylistcontentsPeer::CUEOUT;
|
||||
Common::setTimeInSub($this, 'CUEOUT', $time);
|
||||
}
|
||||
|
||||
public function getDbCliplength()
|
||||
{
|
||||
return $this->cliplength;
|
||||
}
|
||||
|
||||
public function setDbCliplength($time)
|
||||
{
|
||||
$this->cliplength = $time;
|
||||
//$this->modifiedColumns[] = CcPlaylistcontentsPeer::CLIPLENGTH;
|
||||
Common::setTimeInSub($this, 'CLIPLENGTH', $time);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} // CcPlaylistcontents
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_schedule' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
|
@ -15,4 +15,88 @@
|
|||
*/
|
||||
class CcSchedule extends BaseCcSchedule {
|
||||
|
||||
public function getDbClipLength($format = 'H:i:s.u')
|
||||
{
|
||||
if ($this->clip_length === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
$dt = new DateTime($this->clip_length);
|
||||
} catch (Exception $x) {
|
||||
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->clip_length, true), $x);
|
||||
}
|
||||
|
||||
if ($format === null) {
|
||||
// Because propel.useDateTimeClass is TRUE, we return a DateTime object.
|
||||
return $dt;
|
||||
} elseif (strpos($format, '%') !== false) {
|
||||
return strftime($format, $dt->format('U'));
|
||||
} else {
|
||||
return $dt->format($format);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [optionally formatted] temporal [starts] column value.
|
||||
*
|
||||
*
|
||||
* @param string $format The date/time format string (either date()-style or strftime()-style).
|
||||
* If format is NULL, then the raw DateTime object will be returned.
|
||||
* @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL
|
||||
* @throws PropelException - if unable to parse/validate the date/time value.
|
||||
*/
|
||||
public function getDbStarts($format = 'Y-m-d H:i:s')
|
||||
{
|
||||
if ($this->starts === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
$dt = new DateTime($this->starts, new DateTimeZone("UTC"));
|
||||
} catch (Exception $x) {
|
||||
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->starts, true), $x);
|
||||
}
|
||||
|
||||
if ($format === null) {
|
||||
// Because propel.useDateTimeClass is TRUE, we return a DateTime object.
|
||||
return $dt;
|
||||
} elseif (strpos($format, '%') !== false) {
|
||||
return strftime($format, $dt->format('U'));
|
||||
} else {
|
||||
return $dt->format($format);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [optionally formatted] temporal [ends] column value.
|
||||
*
|
||||
*
|
||||
* @param string $format The date/time format string (either date()-style or strftime()-style).
|
||||
* If format is NULL, then the raw DateTime object will be returned.
|
||||
* @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL
|
||||
* @throws PropelException - if unable to parse/validate the date/time value.
|
||||
*/
|
||||
public function getDbEnds($format = 'Y-m-d H:i:s')
|
||||
{
|
||||
if ($this->ends === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
$dt = new DateTime($this->ends, new DateTimeZone("UTC"));
|
||||
} catch (Exception $x) {
|
||||
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->ends, true), $x);
|
||||
}
|
||||
|
||||
if ($format === null) {
|
||||
// Because propel.useDateTimeClass is TRUE, we return a DateTime object.
|
||||
return $dt;
|
||||
} elseif (strpos($format, '%') !== false) {
|
||||
return strftime($format, $dt->format('U'));
|
||||
} else {
|
||||
return $dt->format($format);
|
||||
}
|
||||
}
|
||||
|
||||
} // CcSchedule
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_show_instances' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
|
@ -15,4 +15,65 @@
|
|||
*/
|
||||
class CcShowInstances extends BaseCcShowInstances {
|
||||
|
||||
/**
|
||||
* Get the [optionally formatted] temporal [starts] column value.
|
||||
*
|
||||
*
|
||||
* @param string $format The date/time format string (either date()-style or strftime()-style).
|
||||
* If format is NULL, then the raw DateTime object will be returned.
|
||||
* @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL
|
||||
* @throws PropelException - if unable to parse/validate the date/time value.
|
||||
*/
|
||||
public function getDbStarts($format = 'Y-m-d H:i:s')
|
||||
{
|
||||
if ($this->starts === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
$dt = new DateTime($this->starts, new DateTimeZone("UTC"));
|
||||
} catch (Exception $x) {
|
||||
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->starts, true), $x);
|
||||
}
|
||||
|
||||
if ($format === null) {
|
||||
// Because propel.useDateTimeClass is TRUE, we return a DateTime object.
|
||||
return $dt;
|
||||
} elseif (strpos($format, '%') !== false) {
|
||||
return strftime($format, $dt->format('U'));
|
||||
} else {
|
||||
return $dt->format($format);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [optionally formatted] temporal [ends] column value.
|
||||
*
|
||||
*
|
||||
* @param string $format The date/time format string (either date()-style or strftime()-style).
|
||||
* If format is NULL, then the raw DateTime object will be returned.
|
||||
* @return mixed Formatted date/time value as string or DateTime object (if format is NULL), NULL if column is NULL
|
||||
* @throws PropelException - if unable to parse/validate the date/time value.
|
||||
*/
|
||||
public function getDbEnds($format = 'Y-m-d H:i:s')
|
||||
{
|
||||
if ($this->ends === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
$dt = new DateTime($this->ends, new DateTimeZone("UTC"));
|
||||
} catch (Exception $x) {
|
||||
throw new PropelException("Internally stored date/time/timestamp value could not be converted to DateTime: " . var_export($this->ends, true), $x);
|
||||
}
|
||||
|
||||
if ($format === null) {
|
||||
// Because propel.useDateTimeClass is TRUE, we return a DateTime object.
|
||||
return $dt;
|
||||
} elseif (strpos($format, '%') !== false) {
|
||||
return strftime($format, $dt->format('U'));
|
||||
} else {
|
||||
return $dt->format($format);
|
||||
}
|
||||
}
|
||||
} // CcShowInstances
|
||||
|
|
|
@ -40,14 +40,12 @@ class CcPlaylistTableMap extends TableMap {
|
|||
// columns
|
||||
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
|
||||
$this->addColumn('NAME', 'DbName', 'VARCHAR', true, 255, '');
|
||||
$this->addColumn('STATE', 'DbState', 'VARCHAR', true, 128, 'empty');
|
||||
$this->addColumn('CURRENTLYACCESSING', 'DbCurrentlyaccessing', 'INTEGER', true, null, 0);
|
||||
$this->addForeignKey('EDITEDBY', 'DbEditedby', 'INTEGER', 'cc_subjs', 'ID', false, null, null);
|
||||
$this->addColumn('MTIME', 'DbMtime', 'TIMESTAMP', false, 6, null);
|
||||
$this->addColumn('UTIME', 'DbUtime', 'TIMESTAMP', false, 6, null);
|
||||
$this->addColumn('LPTIME', 'DbLPtime', 'TIMESTAMP', false, 6, null);
|
||||
$this->addColumn('CREATOR', 'DbCreator', 'VARCHAR', false, 32, null);
|
||||
$this->addForeignKey('CREATOR_ID', 'DbCreatorId', 'INTEGER', 'cc_subjs', 'ID', false, null, null);
|
||||
$this->addColumn('DESCRIPTION', 'DbDescription', 'VARCHAR', false, 512, null);
|
||||
$this->addColumn('LENGTH', 'DbLength', 'VARCHAR', false, null, '00:00:00');
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
|
@ -56,8 +54,21 @@ class CcPlaylistTableMap extends TableMap {
|
|||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('editedby' => 'id', ), null, null);
|
||||
$this->addRelation('CcSubjs', 'CcSubjs', RelationMap::MANY_TO_ONE, array('creator_id' => 'id', ), null, null);
|
||||
$this->addRelation('CcPlaylistcontents', 'CcPlaylistcontents', RelationMap::ONE_TO_MANY, array('id' => 'playlist_id', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
/**
|
||||
*
|
||||
* Gets the list of behaviors registered for this table
|
||||
*
|
||||
* @return array Associative array (name => parameters) of behaviors
|
||||
*/
|
||||
public function getBehaviors()
|
||||
{
|
||||
return array(
|
||||
'aggregate_column' => array('name' => 'length', 'expression' => 'SUM(cliplength)', 'foreign_table' => 'cc_playlistcontents', ),
|
||||
);
|
||||
} // getBehaviors()
|
||||
|
||||
} // CcPlaylistTableMap
|
||||
|
|
|
@ -59,4 +59,17 @@ class CcPlaylistcontentsTableMap extends TableMap {
|
|||
$this->addRelation('CcPlaylist', 'CcPlaylist', RelationMap::MANY_TO_ONE, array('playlist_id' => 'id', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
/**
|
||||
*
|
||||
* Gets the list of behaviors registered for this table
|
||||
*
|
||||
* @return array Associative array (name => parameters) of behaviors
|
||||
*/
|
||||
public function getBehaviors()
|
||||
{
|
||||
return array(
|
||||
'aggregate_column_relation' => array('foreign_table' => 'cc_playlist', 'update_method' => 'updateDbLength', ),
|
||||
);
|
||||
} // getBehaviors()
|
||||
|
||||
} // CcPlaylistcontentsTableMap
|
||||
|
|
|
@ -62,7 +62,7 @@ class CcSubjsTableMap extends TableMap {
|
|||
$this->addRelation('CcFiles', 'CcFiles', RelationMap::ONE_TO_MANY, array('id' => 'editedby', ), null, null);
|
||||
$this->addRelation('CcPerms', 'CcPerms', RelationMap::ONE_TO_MANY, array('id' => 'subj', ), 'CASCADE', null);
|
||||
$this->addRelation('CcShowHosts', 'CcShowHosts', RelationMap::ONE_TO_MANY, array('id' => 'subjs_id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcPlaylist', 'CcPlaylist', RelationMap::ONE_TO_MANY, array('id' => 'editedby', ), null, null);
|
||||
$this->addRelation('CcPlaylist', 'CcPlaylist', RelationMap::ONE_TO_MANY, array('id' => 'creator_id', ), null, null);
|
||||
$this->addRelation('CcPref', 'CcPref', RelationMap::ONE_TO_MANY, array('id' => 'subjid', ), 'CASCADE', null);
|
||||
$this->addRelation('CcSess', 'CcSess', RelationMap::ONE_TO_MANY, array('id' => 'userid', ), 'CASCADE', null);
|
||||
$this->addRelation('CcSubjsToken', 'CcSubjsToken', RelationMap::ONE_TO_MANY, array('id' => 'user_id', ), 'CASCADE', null);
|
||||
|
|
|
@ -37,26 +37,6 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
*/
|
||||
protected $name;
|
||||
|
||||
/**
|
||||
* The value for the state field.
|
||||
* Note: this column has a database default value of: 'empty'
|
||||
* @var string
|
||||
*/
|
||||
protected $state;
|
||||
|
||||
/**
|
||||
* The value for the currentlyaccessing field.
|
||||
* Note: this column has a database default value of: 0
|
||||
* @var int
|
||||
*/
|
||||
protected $currentlyaccessing;
|
||||
|
||||
/**
|
||||
* The value for the editedby field.
|
||||
* @var int
|
||||
*/
|
||||
protected $editedby;
|
||||
|
||||
/**
|
||||
* The value for the mtime field.
|
||||
* @var string
|
||||
|
@ -76,10 +56,10 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
protected $lptime;
|
||||
|
||||
/**
|
||||
* The value for the creator field.
|
||||
* @var string
|
||||
* The value for the creator_id field.
|
||||
* @var int
|
||||
*/
|
||||
protected $creator;
|
||||
protected $creator_id;
|
||||
|
||||
/**
|
||||
* The value for the description field.
|
||||
|
@ -87,6 +67,13 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
*/
|
||||
protected $description;
|
||||
|
||||
/**
|
||||
* The value for the length field.
|
||||
* Note: this column has a database default value of: '00:00:00'
|
||||
* @var string
|
||||
*/
|
||||
protected $length;
|
||||
|
||||
/**
|
||||
* @var CcSubjs
|
||||
*/
|
||||
|
@ -120,8 +107,7 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
public function applyDefaultValues()
|
||||
{
|
||||
$this->name = '';
|
||||
$this->state = 'empty';
|
||||
$this->currentlyaccessing = 0;
|
||||
$this->length = '00:00:00';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -154,36 +140,6 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [state] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDbState()
|
||||
{
|
||||
return $this->state;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [currentlyaccessing] column value.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getDbCurrentlyaccessing()
|
||||
{
|
||||
return $this->currentlyaccessing;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [editedby] column value.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getDbEditedby()
|
||||
{
|
||||
return $this->editedby;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [optionally formatted] temporal [mtime] column value.
|
||||
*
|
||||
|
@ -284,13 +240,13 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the [creator] column value.
|
||||
* Get the [creator_id] column value.
|
||||
*
|
||||
* @return string
|
||||
* @return int
|
||||
*/
|
||||
public function getDbCreator()
|
||||
public function getDbCreatorId()
|
||||
{
|
||||
return $this->creator;
|
||||
return $this->creator_id;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -303,6 +259,16 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
return $this->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [length] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDbLength()
|
||||
{
|
||||
return $this->length;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of [id] column.
|
||||
*
|
||||
|
@ -343,70 +309,6 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
return $this;
|
||||
} // setDbName()
|
||||
|
||||
/**
|
||||
* Set the value of [state] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return CcPlaylist The current object (for fluent API support)
|
||||
*/
|
||||
public function setDbState($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->state !== $v || $this->isNew()) {
|
||||
$this->state = $v;
|
||||
$this->modifiedColumns[] = CcPlaylistPeer::STATE;
|
||||
}
|
||||
|
||||
return $this;
|
||||
} // setDbState()
|
||||
|
||||
/**
|
||||
* Set the value of [currentlyaccessing] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return CcPlaylist The current object (for fluent API support)
|
||||
*/
|
||||
public function setDbCurrentlyaccessing($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (int) $v;
|
||||
}
|
||||
|
||||
if ($this->currentlyaccessing !== $v || $this->isNew()) {
|
||||
$this->currentlyaccessing = $v;
|
||||
$this->modifiedColumns[] = CcPlaylistPeer::CURRENTLYACCESSING;
|
||||
}
|
||||
|
||||
return $this;
|
||||
} // setDbCurrentlyaccessing()
|
||||
|
||||
/**
|
||||
* Set the value of [editedby] column.
|
||||
*
|
||||
* @param int $v new value
|
||||
* @return CcPlaylist The current object (for fluent API support)
|
||||
*/
|
||||
public function setDbEditedby($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (int) $v;
|
||||
}
|
||||
|
||||
if ($this->editedby !== $v) {
|
||||
$this->editedby = $v;
|
||||
$this->modifiedColumns[] = CcPlaylistPeer::EDITEDBY;
|
||||
}
|
||||
|
||||
if ($this->aCcSubjs !== null && $this->aCcSubjs->getDbId() !== $v) {
|
||||
$this->aCcSubjs = null;
|
||||
}
|
||||
|
||||
return $this;
|
||||
} // setDbEditedby()
|
||||
|
||||
/**
|
||||
* Sets the value of [mtime] column to a normalized version of the date/time value specified.
|
||||
*
|
||||
|
@ -555,24 +457,28 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
} // setDbLPtime()
|
||||
|
||||
/**
|
||||
* Set the value of [creator] column.
|
||||
* Set the value of [creator_id] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @param int $v new value
|
||||
* @return CcPlaylist The current object (for fluent API support)
|
||||
*/
|
||||
public function setDbCreator($v)
|
||||
public function setDbCreatorId($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
$v = (int) $v;
|
||||
}
|
||||
|
||||
if ($this->creator !== $v) {
|
||||
$this->creator = $v;
|
||||
$this->modifiedColumns[] = CcPlaylistPeer::CREATOR;
|
||||
if ($this->creator_id !== $v) {
|
||||
$this->creator_id = $v;
|
||||
$this->modifiedColumns[] = CcPlaylistPeer::CREATOR_ID;
|
||||
}
|
||||
|
||||
if ($this->aCcSubjs !== null && $this->aCcSubjs->getDbId() !== $v) {
|
||||
$this->aCcSubjs = null;
|
||||
}
|
||||
|
||||
return $this;
|
||||
} // setDbCreator()
|
||||
} // setDbCreatorId()
|
||||
|
||||
/**
|
||||
* Set the value of [description] column.
|
||||
|
@ -594,6 +500,26 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
return $this;
|
||||
} // setDbDescription()
|
||||
|
||||
/**
|
||||
* Set the value of [length] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return CcPlaylist The current object (for fluent API support)
|
||||
*/
|
||||
public function setDbLength($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->length !== $v || $this->isNew()) {
|
||||
$this->length = $v;
|
||||
$this->modifiedColumns[] = CcPlaylistPeer::LENGTH;
|
||||
}
|
||||
|
||||
return $this;
|
||||
} // setDbLength()
|
||||
|
||||
/**
|
||||
* Indicates whether the columns in this object are only set to default values.
|
||||
*
|
||||
|
@ -608,11 +534,7 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
return false;
|
||||
}
|
||||
|
||||
if ($this->state !== 'empty') {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->currentlyaccessing !== 0) {
|
||||
if ($this->length !== '00:00:00') {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -640,14 +562,12 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
|
||||
$this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
|
||||
$this->name = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
|
||||
$this->state = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
|
||||
$this->currentlyaccessing = ($row[$startcol + 3] !== null) ? (int) $row[$startcol + 3] : null;
|
||||
$this->editedby = ($row[$startcol + 4] !== null) ? (int) $row[$startcol + 4] : null;
|
||||
$this->mtime = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;
|
||||
$this->utime = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
|
||||
$this->lptime = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null;
|
||||
$this->creator = ($row[$startcol + 8] !== null) ? (string) $row[$startcol + 8] : null;
|
||||
$this->description = ($row[$startcol + 9] !== null) ? (string) $row[$startcol + 9] : null;
|
||||
$this->mtime = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
|
||||
$this->utime = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null;
|
||||
$this->lptime = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
|
||||
$this->creator_id = ($row[$startcol + 5] !== null) ? (int) $row[$startcol + 5] : null;
|
||||
$this->description = ($row[$startcol + 6] !== null) ? (string) $row[$startcol + 6] : null;
|
||||
$this->length = ($row[$startcol + 7] !== null) ? (string) $row[$startcol + 7] : null;
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
|
@ -656,7 +576,7 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 10; // 10 = CcPlaylistPeer::NUM_COLUMNS - CcPlaylistPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
return $startcol + 8; // 8 = CcPlaylistPeer::NUM_COLUMNS - CcPlaylistPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating CcPlaylist object", $e);
|
||||
|
@ -679,7 +599,7 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
public function ensureConsistency()
|
||||
{
|
||||
|
||||
if ($this->aCcSubjs !== null && $this->editedby !== $this->aCcSubjs->getDbId()) {
|
||||
if ($this->aCcSubjs !== null && $this->creator_id !== $this->aCcSubjs->getDbId()) {
|
||||
$this->aCcSubjs = null;
|
||||
}
|
||||
} // ensureConsistency
|
||||
|
@ -1008,29 +928,23 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
return $this->getDbName();
|
||||
break;
|
||||
case 2:
|
||||
return $this->getDbState();
|
||||
break;
|
||||
case 3:
|
||||
return $this->getDbCurrentlyaccessing();
|
||||
break;
|
||||
case 4:
|
||||
return $this->getDbEditedby();
|
||||
break;
|
||||
case 5:
|
||||
return $this->getDbMtime();
|
||||
break;
|
||||
case 6:
|
||||
case 3:
|
||||
return $this->getDbUtime();
|
||||
break;
|
||||
case 7:
|
||||
case 4:
|
||||
return $this->getDbLPtime();
|
||||
break;
|
||||
case 8:
|
||||
return $this->getDbCreator();
|
||||
case 5:
|
||||
return $this->getDbCreatorId();
|
||||
break;
|
||||
case 9:
|
||||
case 6:
|
||||
return $this->getDbDescription();
|
||||
break;
|
||||
case 7:
|
||||
return $this->getDbLength();
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
break;
|
||||
|
@ -1057,14 +971,12 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
$result = array(
|
||||
$keys[0] => $this->getDbId(),
|
||||
$keys[1] => $this->getDbName(),
|
||||
$keys[2] => $this->getDbState(),
|
||||
$keys[3] => $this->getDbCurrentlyaccessing(),
|
||||
$keys[4] => $this->getDbEditedby(),
|
||||
$keys[5] => $this->getDbMtime(),
|
||||
$keys[6] => $this->getDbUtime(),
|
||||
$keys[7] => $this->getDbLPtime(),
|
||||
$keys[8] => $this->getDbCreator(),
|
||||
$keys[9] => $this->getDbDescription(),
|
||||
$keys[2] => $this->getDbMtime(),
|
||||
$keys[3] => $this->getDbUtime(),
|
||||
$keys[4] => $this->getDbLPtime(),
|
||||
$keys[5] => $this->getDbCreatorId(),
|
||||
$keys[6] => $this->getDbDescription(),
|
||||
$keys[7] => $this->getDbLength(),
|
||||
);
|
||||
if ($includeForeignObjects) {
|
||||
if (null !== $this->aCcSubjs) {
|
||||
|
@ -1108,29 +1020,23 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
$this->setDbName($value);
|
||||
break;
|
||||
case 2:
|
||||
$this->setDbState($value);
|
||||
break;
|
||||
case 3:
|
||||
$this->setDbCurrentlyaccessing($value);
|
||||
break;
|
||||
case 4:
|
||||
$this->setDbEditedby($value);
|
||||
break;
|
||||
case 5:
|
||||
$this->setDbMtime($value);
|
||||
break;
|
||||
case 6:
|
||||
case 3:
|
||||
$this->setDbUtime($value);
|
||||
break;
|
||||
case 7:
|
||||
case 4:
|
||||
$this->setDbLPtime($value);
|
||||
break;
|
||||
case 8:
|
||||
$this->setDbCreator($value);
|
||||
case 5:
|
||||
$this->setDbCreatorId($value);
|
||||
break;
|
||||
case 9:
|
||||
case 6:
|
||||
$this->setDbDescription($value);
|
||||
break;
|
||||
case 7:
|
||||
$this->setDbLength($value);
|
||||
break;
|
||||
} // switch()
|
||||
}
|
||||
|
||||
|
@ -1157,14 +1063,12 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
|
||||
if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]);
|
||||
if (array_key_exists($keys[1], $arr)) $this->setDbName($arr[$keys[1]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setDbState($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setDbCurrentlyaccessing($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setDbEditedby($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setDbMtime($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setDbUtime($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setDbLPtime($arr[$keys[7]]);
|
||||
if (array_key_exists($keys[8], $arr)) $this->setDbCreator($arr[$keys[8]]);
|
||||
if (array_key_exists($keys[9], $arr)) $this->setDbDescription($arr[$keys[9]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setDbMtime($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setDbUtime($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setDbLPtime($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setDbCreatorId($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setDbDescription($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setDbLength($arr[$keys[7]]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1178,14 +1082,12 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
|
||||
if ($this->isColumnModified(CcPlaylistPeer::ID)) $criteria->add(CcPlaylistPeer::ID, $this->id);
|
||||
if ($this->isColumnModified(CcPlaylistPeer::NAME)) $criteria->add(CcPlaylistPeer::NAME, $this->name);
|
||||
if ($this->isColumnModified(CcPlaylistPeer::STATE)) $criteria->add(CcPlaylistPeer::STATE, $this->state);
|
||||
if ($this->isColumnModified(CcPlaylistPeer::CURRENTLYACCESSING)) $criteria->add(CcPlaylistPeer::CURRENTLYACCESSING, $this->currentlyaccessing);
|
||||
if ($this->isColumnModified(CcPlaylistPeer::EDITEDBY)) $criteria->add(CcPlaylistPeer::EDITEDBY, $this->editedby);
|
||||
if ($this->isColumnModified(CcPlaylistPeer::MTIME)) $criteria->add(CcPlaylistPeer::MTIME, $this->mtime);
|
||||
if ($this->isColumnModified(CcPlaylistPeer::UTIME)) $criteria->add(CcPlaylistPeer::UTIME, $this->utime);
|
||||
if ($this->isColumnModified(CcPlaylistPeer::LPTIME)) $criteria->add(CcPlaylistPeer::LPTIME, $this->lptime);
|
||||
if ($this->isColumnModified(CcPlaylistPeer::CREATOR)) $criteria->add(CcPlaylistPeer::CREATOR, $this->creator);
|
||||
if ($this->isColumnModified(CcPlaylistPeer::CREATOR_ID)) $criteria->add(CcPlaylistPeer::CREATOR_ID, $this->creator_id);
|
||||
if ($this->isColumnModified(CcPlaylistPeer::DESCRIPTION)) $criteria->add(CcPlaylistPeer::DESCRIPTION, $this->description);
|
||||
if ($this->isColumnModified(CcPlaylistPeer::LENGTH)) $criteria->add(CcPlaylistPeer::LENGTH, $this->length);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
|
@ -1248,14 +1150,12 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
public function copyInto($copyObj, $deepCopy = false)
|
||||
{
|
||||
$copyObj->setDbName($this->name);
|
||||
$copyObj->setDbState($this->state);
|
||||
$copyObj->setDbCurrentlyaccessing($this->currentlyaccessing);
|
||||
$copyObj->setDbEditedby($this->editedby);
|
||||
$copyObj->setDbMtime($this->mtime);
|
||||
$copyObj->setDbUtime($this->utime);
|
||||
$copyObj->setDbLPtime($this->lptime);
|
||||
$copyObj->setDbCreator($this->creator);
|
||||
$copyObj->setDbCreatorId($this->creator_id);
|
||||
$copyObj->setDbDescription($this->description);
|
||||
$copyObj->setDbLength($this->length);
|
||||
|
||||
if ($deepCopy) {
|
||||
// important: temporarily setNew(false) because this affects the behavior of
|
||||
|
@ -1323,9 +1223,9 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
public function setCcSubjs(CcSubjs $v = null)
|
||||
{
|
||||
if ($v === null) {
|
||||
$this->setDbEditedby(NULL);
|
||||
$this->setDbCreatorId(NULL);
|
||||
} else {
|
||||
$this->setDbEditedby($v->getDbId());
|
||||
$this->setDbCreatorId($v->getDbId());
|
||||
}
|
||||
|
||||
$this->aCcSubjs = $v;
|
||||
|
@ -1349,8 +1249,8 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
*/
|
||||
public function getCcSubjs(PropelPDO $con = null)
|
||||
{
|
||||
if ($this->aCcSubjs === null && ($this->editedby !== null)) {
|
||||
$this->aCcSubjs = CcSubjsQuery::create()->findPk($this->editedby, $con);
|
||||
if ($this->aCcSubjs === null && ($this->creator_id !== null)) {
|
||||
$this->aCcSubjs = CcSubjsQuery::create()->findPk($this->creator_id, $con);
|
||||
/* The following can be used additionally to
|
||||
guarantee the related object contains a reference
|
||||
to this object. This level of coupling may, however, be
|
||||
|
@ -1503,14 +1403,12 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
{
|
||||
$this->id = null;
|
||||
$this->name = null;
|
||||
$this->state = null;
|
||||
$this->currentlyaccessing = null;
|
||||
$this->editedby = null;
|
||||
$this->mtime = null;
|
||||
$this->utime = null;
|
||||
$this->lptime = null;
|
||||
$this->creator = null;
|
||||
$this->creator_id = null;
|
||||
$this->description = null;
|
||||
$this->length = null;
|
||||
$this->alreadyInSave = false;
|
||||
$this->alreadyInValidation = false;
|
||||
$this->clearAllReferences();
|
||||
|
@ -1543,6 +1441,34 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
|
|||
$this->aCcSubjs = null;
|
||||
}
|
||||
|
||||
// aggregate_column behavior
|
||||
|
||||
/**
|
||||
* Computes the value of the aggregate column length
|
||||
*
|
||||
* @param PropelPDO $con A connection object
|
||||
*
|
||||
* @return mixed The scalar result from the aggregate query
|
||||
*/
|
||||
public function computeDbLength(PropelPDO $con)
|
||||
{
|
||||
$stmt = $con->prepare('SELECT SUM(cliplength) FROM "cc_playlistcontents" WHERE cc_playlistcontents.PLAYLIST_ID = :p1');
|
||||
$stmt->bindValue(':p1', $this->getDbId());
|
||||
$stmt->execute();
|
||||
return $stmt->fetchColumn();
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the aggregate column length
|
||||
*
|
||||
* @param PropelPDO $con A connection object
|
||||
*/
|
||||
public function updateDbLength(PropelPDO $con)
|
||||
{
|
||||
$this->setDbLength($this->computeDbLength($con));
|
||||
$this->save($con);
|
||||
}
|
||||
|
||||
/**
|
||||
* Catches calls to virtual methods
|
||||
*/
|
||||
|
|
|
@ -26,7 +26,7 @@ abstract class BaseCcPlaylistPeer {
|
|||
const TM_CLASS = 'CcPlaylistTableMap';
|
||||
|
||||
/** The total number of columns. */
|
||||
const NUM_COLUMNS = 10;
|
||||
const NUM_COLUMNS = 8;
|
||||
|
||||
/** The number of lazy-loaded columns. */
|
||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||
|
@ -37,15 +37,6 @@ abstract class BaseCcPlaylistPeer {
|
|||
/** the column name for the NAME field */
|
||||
const NAME = 'cc_playlist.NAME';
|
||||
|
||||
/** the column name for the STATE field */
|
||||
const STATE = 'cc_playlist.STATE';
|
||||
|
||||
/** the column name for the CURRENTLYACCESSING field */
|
||||
const CURRENTLYACCESSING = 'cc_playlist.CURRENTLYACCESSING';
|
||||
|
||||
/** the column name for the EDITEDBY field */
|
||||
const EDITEDBY = 'cc_playlist.EDITEDBY';
|
||||
|
||||
/** the column name for the MTIME field */
|
||||
const MTIME = 'cc_playlist.MTIME';
|
||||
|
||||
|
@ -55,12 +46,15 @@ abstract class BaseCcPlaylistPeer {
|
|||
/** the column name for the LPTIME field */
|
||||
const LPTIME = 'cc_playlist.LPTIME';
|
||||
|
||||
/** the column name for the CREATOR field */
|
||||
const CREATOR = 'cc_playlist.CREATOR';
|
||||
/** the column name for the CREATOR_ID field */
|
||||
const CREATOR_ID = 'cc_playlist.CREATOR_ID';
|
||||
|
||||
/** the column name for the DESCRIPTION field */
|
||||
const DESCRIPTION = 'cc_playlist.DESCRIPTION';
|
||||
|
||||
/** the column name for the LENGTH field */
|
||||
const LENGTH = 'cc_playlist.LENGTH';
|
||||
|
||||
/**
|
||||
* An identiy map to hold any loaded instances of CcPlaylist objects.
|
||||
* This must be public so that other peer classes can access this when hydrating from JOIN
|
||||
|
@ -77,12 +71,12 @@ abstract class BaseCcPlaylistPeer {
|
|||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
private static $fieldNames = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbState', 'DbCurrentlyaccessing', 'DbEditedby', 'DbMtime', 'DbUtime', 'DbLPtime', 'DbCreator', 'DbDescription', ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbState', 'dbCurrentlyaccessing', 'dbEditedby', 'dbMtime', 'dbUtime', 'dbLPtime', 'dbCreator', 'dbDescription', ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID, self::NAME, self::STATE, self::CURRENTLYACCESSING, self::EDITEDBY, self::MTIME, self::UTIME, self::LPTIME, self::CREATOR, self::DESCRIPTION, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'STATE', 'CURRENTLYACCESSING', 'EDITEDBY', 'MTIME', 'UTIME', 'LPTIME', 'CREATOR', 'DESCRIPTION', ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'state', 'currentlyaccessing', 'editedby', 'mtime', 'utime', 'lptime', 'creator', 'description', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbMtime', 'DbUtime', 'DbLPtime', 'DbCreatorId', 'DbDescription', 'DbLength', ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbMtime', 'dbUtime', 'dbLPtime', 'dbCreatorId', 'dbDescription', 'dbLength', ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID, self::NAME, self::MTIME, self::UTIME, self::LPTIME, self::CREATOR_ID, self::DESCRIPTION, self::LENGTH, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'MTIME', 'UTIME', 'LPTIME', 'CREATOR_ID', 'DESCRIPTION', 'LENGTH', ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'mtime', 'utime', 'lptime', 'creator_id', 'description', 'length', ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -92,12 +86,12 @@ abstract class BaseCcPlaylistPeer {
|
|||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
private static $fieldKeys = array (
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbState' => 2, 'DbCurrentlyaccessing' => 3, 'DbEditedby' => 4, 'DbMtime' => 5, 'DbUtime' => 6, 'DbLPtime' => 7, 'DbCreator' => 8, 'DbDescription' => 9, ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbState' => 2, 'dbCurrentlyaccessing' => 3, 'dbEditedby' => 4, 'dbMtime' => 5, 'dbUtime' => 6, 'dbLPtime' => 7, 'dbCreator' => 8, 'dbDescription' => 9, ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::NAME => 1, self::STATE => 2, self::CURRENTLYACCESSING => 3, self::EDITEDBY => 4, self::MTIME => 5, self::UTIME => 6, self::LPTIME => 7, self::CREATOR => 8, self::DESCRIPTION => 9, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'STATE' => 2, 'CURRENTLYACCESSING' => 3, 'EDITEDBY' => 4, 'MTIME' => 5, 'UTIME' => 6, 'LPTIME' => 7, 'CREATOR' => 8, 'DESCRIPTION' => 9, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'state' => 2, 'currentlyaccessing' => 3, 'editedby' => 4, 'mtime' => 5, 'utime' => 6, 'lptime' => 7, 'creator' => 8, 'description' => 9, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, )
|
||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbMtime' => 2, 'DbUtime' => 3, 'DbLPtime' => 4, 'DbCreatorId' => 5, 'DbDescription' => 6, 'DbLength' => 7, ),
|
||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbMtime' => 2, 'dbUtime' => 3, 'dbLPtime' => 4, 'dbCreatorId' => 5, 'dbDescription' => 6, 'dbLength' => 7, ),
|
||||
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::NAME => 1, self::MTIME => 2, self::UTIME => 3, self::LPTIME => 4, self::CREATOR_ID => 5, self::DESCRIPTION => 6, self::LENGTH => 7, ),
|
||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'MTIME' => 2, 'UTIME' => 3, 'LPTIME' => 4, 'CREATOR_ID' => 5, 'DESCRIPTION' => 6, 'LENGTH' => 7, ),
|
||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'mtime' => 2, 'utime' => 3, 'lptime' => 4, 'creator_id' => 5, 'description' => 6, 'length' => 7, ),
|
||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, )
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -171,25 +165,21 @@ abstract class BaseCcPlaylistPeer {
|
|||
if (null === $alias) {
|
||||
$criteria->addSelectColumn(CcPlaylistPeer::ID);
|
||||
$criteria->addSelectColumn(CcPlaylistPeer::NAME);
|
||||
$criteria->addSelectColumn(CcPlaylistPeer::STATE);
|
||||
$criteria->addSelectColumn(CcPlaylistPeer::CURRENTLYACCESSING);
|
||||
$criteria->addSelectColumn(CcPlaylistPeer::EDITEDBY);
|
||||
$criteria->addSelectColumn(CcPlaylistPeer::MTIME);
|
||||
$criteria->addSelectColumn(CcPlaylistPeer::UTIME);
|
||||
$criteria->addSelectColumn(CcPlaylistPeer::LPTIME);
|
||||
$criteria->addSelectColumn(CcPlaylistPeer::CREATOR);
|
||||
$criteria->addSelectColumn(CcPlaylistPeer::CREATOR_ID);
|
||||
$criteria->addSelectColumn(CcPlaylistPeer::DESCRIPTION);
|
||||
$criteria->addSelectColumn(CcPlaylistPeer::LENGTH);
|
||||
} else {
|
||||
$criteria->addSelectColumn($alias . '.ID');
|
||||
$criteria->addSelectColumn($alias . '.NAME');
|
||||
$criteria->addSelectColumn($alias . '.STATE');
|
||||
$criteria->addSelectColumn($alias . '.CURRENTLYACCESSING');
|
||||
$criteria->addSelectColumn($alias . '.EDITEDBY');
|
||||
$criteria->addSelectColumn($alias . '.MTIME');
|
||||
$criteria->addSelectColumn($alias . '.UTIME');
|
||||
$criteria->addSelectColumn($alias . '.LPTIME');
|
||||
$criteria->addSelectColumn($alias . '.CREATOR');
|
||||
$criteria->addSelectColumn($alias . '.CREATOR_ID');
|
||||
$criteria->addSelectColumn($alias . '.DESCRIPTION');
|
||||
$criteria->addSelectColumn($alias . '.LENGTH');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -514,7 +504,7 @@ abstract class BaseCcPlaylistPeer {
|
|||
$con = Propel::getConnection(CcPlaylistPeer::DATABASE_NAME, Propel::CONNECTION_READ);
|
||||
}
|
||||
|
||||
$criteria->addJoin(CcPlaylistPeer::EDITEDBY, CcSubjsPeer::ID, $join_behavior);
|
||||
$criteria->addJoin(CcPlaylistPeer::CREATOR_ID, CcSubjsPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doCount($criteria, $con);
|
||||
|
||||
|
@ -550,7 +540,7 @@ abstract class BaseCcPlaylistPeer {
|
|||
$startcol = (CcPlaylistPeer::NUM_COLUMNS - CcPlaylistPeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
CcSubjsPeer::addSelectColumns($criteria);
|
||||
|
||||
$criteria->addJoin(CcPlaylistPeer::EDITEDBY, CcSubjsPeer::ID, $join_behavior);
|
||||
$criteria->addJoin(CcPlaylistPeer::CREATOR_ID, CcSubjsPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doSelect($criteria, $con);
|
||||
$results = array();
|
||||
|
@ -630,7 +620,7 @@ abstract class BaseCcPlaylistPeer {
|
|||
$con = Propel::getConnection(CcPlaylistPeer::DATABASE_NAME, Propel::CONNECTION_READ);
|
||||
}
|
||||
|
||||
$criteria->addJoin(CcPlaylistPeer::EDITEDBY, CcSubjsPeer::ID, $join_behavior);
|
||||
$criteria->addJoin(CcPlaylistPeer::CREATOR_ID, CcSubjsPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doCount($criteria, $con);
|
||||
|
||||
|
@ -668,7 +658,7 @@ abstract class BaseCcPlaylistPeer {
|
|||
CcSubjsPeer::addSelectColumns($criteria);
|
||||
$startcol3 = $startcol2 + (CcSubjsPeer::NUM_COLUMNS - CcSubjsPeer::NUM_LAZY_LOAD_COLUMNS);
|
||||
|
||||
$criteria->addJoin(CcPlaylistPeer::EDITEDBY, CcSubjsPeer::ID, $join_behavior);
|
||||
$criteria->addJoin(CcPlaylistPeer::CREATOR_ID, CcSubjsPeer::ID, $join_behavior);
|
||||
|
||||
$stmt = BasePeer::doSelect($criteria, $con);
|
||||
$results = array();
|
||||
|
|
|
@ -8,25 +8,21 @@
|
|||
*
|
||||
* @method CcPlaylistQuery orderByDbId($order = Criteria::ASC) Order by the id column
|
||||
* @method CcPlaylistQuery orderByDbName($order = Criteria::ASC) Order by the name column
|
||||
* @method CcPlaylistQuery orderByDbState($order = Criteria::ASC) Order by the state column
|
||||
* @method CcPlaylistQuery orderByDbCurrentlyaccessing($order = Criteria::ASC) Order by the currentlyaccessing column
|
||||
* @method CcPlaylistQuery orderByDbEditedby($order = Criteria::ASC) Order by the editedby column
|
||||
* @method CcPlaylistQuery orderByDbMtime($order = Criteria::ASC) Order by the mtime column
|
||||
* @method CcPlaylistQuery orderByDbUtime($order = Criteria::ASC) Order by the utime column
|
||||
* @method CcPlaylistQuery orderByDbLPtime($order = Criteria::ASC) Order by the lptime column
|
||||
* @method CcPlaylistQuery orderByDbCreator($order = Criteria::ASC) Order by the creator column
|
||||
* @method CcPlaylistQuery orderByDbCreatorId($order = Criteria::ASC) Order by the creator_id column
|
||||
* @method CcPlaylistQuery orderByDbDescription($order = Criteria::ASC) Order by the description column
|
||||
* @method CcPlaylistQuery orderByDbLength($order = Criteria::ASC) Order by the length column
|
||||
*
|
||||
* @method CcPlaylistQuery groupByDbId() Group by the id column
|
||||
* @method CcPlaylistQuery groupByDbName() Group by the name column
|
||||
* @method CcPlaylistQuery groupByDbState() Group by the state column
|
||||
* @method CcPlaylistQuery groupByDbCurrentlyaccessing() Group by the currentlyaccessing column
|
||||
* @method CcPlaylistQuery groupByDbEditedby() Group by the editedby column
|
||||
* @method CcPlaylistQuery groupByDbMtime() Group by the mtime column
|
||||
* @method CcPlaylistQuery groupByDbUtime() Group by the utime column
|
||||
* @method CcPlaylistQuery groupByDbLPtime() Group by the lptime column
|
||||
* @method CcPlaylistQuery groupByDbCreator() Group by the creator column
|
||||
* @method CcPlaylistQuery groupByDbCreatorId() Group by the creator_id column
|
||||
* @method CcPlaylistQuery groupByDbDescription() Group by the description column
|
||||
* @method CcPlaylistQuery groupByDbLength() Group by the length column
|
||||
*
|
||||
* @method CcPlaylistQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method CcPlaylistQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
|
@ -45,25 +41,21 @@
|
|||
*
|
||||
* @method CcPlaylist findOneByDbId(int $id) Return the first CcPlaylist filtered by the id column
|
||||
* @method CcPlaylist findOneByDbName(string $name) Return the first CcPlaylist filtered by the name column
|
||||
* @method CcPlaylist findOneByDbState(string $state) Return the first CcPlaylist filtered by the state column
|
||||
* @method CcPlaylist findOneByDbCurrentlyaccessing(int $currentlyaccessing) Return the first CcPlaylist filtered by the currentlyaccessing column
|
||||
* @method CcPlaylist findOneByDbEditedby(int $editedby) Return the first CcPlaylist filtered by the editedby column
|
||||
* @method CcPlaylist findOneByDbMtime(string $mtime) Return the first CcPlaylist filtered by the mtime column
|
||||
* @method CcPlaylist findOneByDbUtime(string $utime) Return the first CcPlaylist filtered by the utime column
|
||||
* @method CcPlaylist findOneByDbLPtime(string $lptime) Return the first CcPlaylist filtered by the lptime column
|
||||
* @method CcPlaylist findOneByDbCreator(string $creator) Return the first CcPlaylist filtered by the creator column
|
||||
* @method CcPlaylist findOneByDbCreatorId(int $creator_id) Return the first CcPlaylist filtered by the creator_id column
|
||||
* @method CcPlaylist findOneByDbDescription(string $description) Return the first CcPlaylist filtered by the description column
|
||||
* @method CcPlaylist findOneByDbLength(string $length) Return the first CcPlaylist filtered by the length column
|
||||
*
|
||||
* @method array findByDbId(int $id) Return CcPlaylist objects filtered by the id column
|
||||
* @method array findByDbName(string $name) Return CcPlaylist objects filtered by the name column
|
||||
* @method array findByDbState(string $state) Return CcPlaylist objects filtered by the state column
|
||||
* @method array findByDbCurrentlyaccessing(int $currentlyaccessing) Return CcPlaylist objects filtered by the currentlyaccessing column
|
||||
* @method array findByDbEditedby(int $editedby) Return CcPlaylist objects filtered by the editedby column
|
||||
* @method array findByDbMtime(string $mtime) Return CcPlaylist objects filtered by the mtime column
|
||||
* @method array findByDbUtime(string $utime) Return CcPlaylist objects filtered by the utime column
|
||||
* @method array findByDbLPtime(string $lptime) Return CcPlaylist objects filtered by the lptime column
|
||||
* @method array findByDbCreator(string $creator) Return CcPlaylist objects filtered by the creator column
|
||||
* @method array findByDbCreatorId(int $creator_id) Return CcPlaylist objects filtered by the creator_id column
|
||||
* @method array findByDbDescription(string $description) Return CcPlaylist objects filtered by the description column
|
||||
* @method array findByDbLength(string $length) Return CcPlaylist objects filtered by the length column
|
||||
*
|
||||
* @package propel.generator.airtime.om
|
||||
*/
|
||||
|
@ -212,90 +204,6 @@ abstract class BaseCcPlaylistQuery extends ModelCriteria
|
|||
return $this->addUsingAlias(CcPlaylistPeer::NAME, $dbName, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the state column
|
||||
*
|
||||
* @param string $dbState The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcPlaylistQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbState($dbState = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbState)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbState)) {
|
||||
$dbState = str_replace('*', '%', $dbState);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
return $this->addUsingAlias(CcPlaylistPeer::STATE, $dbState, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the currentlyaccessing column
|
||||
*
|
||||
* @param int|array $dbCurrentlyaccessing The value to use as filter.
|
||||
* Accepts an associative array('min' => $minValue, 'max' => $maxValue)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcPlaylistQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbCurrentlyaccessing($dbCurrentlyaccessing = null, $comparison = null)
|
||||
{
|
||||
if (is_array($dbCurrentlyaccessing)) {
|
||||
$useMinMax = false;
|
||||
if (isset($dbCurrentlyaccessing['min'])) {
|
||||
$this->addUsingAlias(CcPlaylistPeer::CURRENTLYACCESSING, $dbCurrentlyaccessing['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($dbCurrentlyaccessing['max'])) {
|
||||
$this->addUsingAlias(CcPlaylistPeer::CURRENTLYACCESSING, $dbCurrentlyaccessing['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
return $this->addUsingAlias(CcPlaylistPeer::CURRENTLYACCESSING, $dbCurrentlyaccessing, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the editedby column
|
||||
*
|
||||
* @param int|array $dbEditedby The value to use as filter.
|
||||
* Accepts an associative array('min' => $minValue, 'max' => $maxValue)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcPlaylistQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbEditedby($dbEditedby = null, $comparison = null)
|
||||
{
|
||||
if (is_array($dbEditedby)) {
|
||||
$useMinMax = false;
|
||||
if (isset($dbEditedby['min'])) {
|
||||
$this->addUsingAlias(CcPlaylistPeer::EDITEDBY, $dbEditedby['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($dbEditedby['max'])) {
|
||||
$this->addUsingAlias(CcPlaylistPeer::EDITEDBY, $dbEditedby['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
return $this->addUsingAlias(CcPlaylistPeer::EDITEDBY, $dbEditedby, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the mtime column
|
||||
*
|
||||
|
@ -390,25 +298,34 @@ abstract class BaseCcPlaylistQuery extends ModelCriteria
|
|||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the creator column
|
||||
* Filter the query on the creator_id column
|
||||
*
|
||||
* @param string $dbCreator The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param int|array $dbCreatorId The value to use as filter.
|
||||
* Accepts an associative array('min' => $minValue, 'max' => $maxValue)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcPlaylistQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbCreator($dbCreator = null, $comparison = null)
|
||||
public function filterByDbCreatorId($dbCreatorId = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbCreator)) {
|
||||
if (is_array($dbCreatorId)) {
|
||||
$useMinMax = false;
|
||||
if (isset($dbCreatorId['min'])) {
|
||||
$this->addUsingAlias(CcPlaylistPeer::CREATOR_ID, $dbCreatorId['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($dbCreatorId['max'])) {
|
||||
$this->addUsingAlias(CcPlaylistPeer::CREATOR_ID, $dbCreatorId['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbCreator)) {
|
||||
$dbCreator = str_replace('*', '%', $dbCreator);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
return $this->addUsingAlias(CcPlaylistPeer::CREATOR, $dbCreator, $comparison);
|
||||
return $this->addUsingAlias(CcPlaylistPeer::CREATOR_ID, $dbCreatorId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -433,6 +350,28 @@ abstract class BaseCcPlaylistQuery extends ModelCriteria
|
|||
return $this->addUsingAlias(CcPlaylistPeer::DESCRIPTION, $dbDescription, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the length column
|
||||
*
|
||||
* @param string $dbLength The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return CcPlaylistQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDbLength($dbLength = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($dbLength)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $dbLength)) {
|
||||
$dbLength = str_replace('*', '%', $dbLength);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
return $this->addUsingAlias(CcPlaylistPeer::LENGTH, $dbLength, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related CcSubjs object
|
||||
*
|
||||
|
@ -444,7 +383,7 @@ abstract class BaseCcPlaylistQuery extends ModelCriteria
|
|||
public function filterByCcSubjs($ccSubjs, $comparison = null)
|
||||
{
|
||||
return $this
|
||||
->addUsingAlias(CcPlaylistPeer::EDITEDBY, $ccSubjs->getDbId(), $comparison);
|
||||
->addUsingAlias(CcPlaylistPeer::CREATOR_ID, $ccSubjs->getDbId(), $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -107,6 +107,9 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
|
|||
*/
|
||||
protected $alreadyInValidation = false;
|
||||
|
||||
// aggregate_column_relation behavior
|
||||
protected $oldCcPlaylist;
|
||||
|
||||
/**
|
||||
* Applies default values to this object.
|
||||
* This method should be called from the object's constructor (or
|
||||
|
@ -895,6 +898,8 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
|
|||
$this->postUpdate($con);
|
||||
}
|
||||
$this->postSave($con);
|
||||
// aggregate_column_relation behavior
|
||||
$this->updateRelatedCcPlaylist($con);
|
||||
CcPlaylistcontentsPeer::addInstanceToPool($this);
|
||||
} else {
|
||||
$affectedRows = 0;
|
||||
|
@ -1437,6 +1442,10 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
|
|||
*/
|
||||
public function setCcPlaylist(CcPlaylist $v = null)
|
||||
{
|
||||
// aggregate_column_relation behavior
|
||||
if (null !== $this->aCcPlaylist && $v !== $this->aCcPlaylist) {
|
||||
$this->oldCcPlaylist = $this->aCcPlaylist;
|
||||
}
|
||||
if ($v === null) {
|
||||
$this->setDbPlaylistId(NULL);
|
||||
} else {
|
||||
|
@ -1518,6 +1527,24 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
|
|||
$this->aCcPlaylist = null;
|
||||
}
|
||||
|
||||
// aggregate_column_relation behavior
|
||||
|
||||
/**
|
||||
* Update the aggregate column in the related CcPlaylist object
|
||||
*
|
||||
* @param PropelPDO $con A connection object
|
||||
*/
|
||||
protected function updateRelatedCcPlaylist(PropelPDO $con)
|
||||
{
|
||||
if ($ccPlaylist = $this->getCcPlaylist()) {
|
||||
$ccPlaylist->updateDbLength($con);
|
||||
}
|
||||
if ($this->oldCcPlaylist) {
|
||||
$this->oldCcPlaylist->updateDbLength($con);
|
||||
$this->oldCcPlaylist = null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Catches calls to virtual methods
|
||||
*/
|
||||
|
|
|
@ -578,4 +578,90 @@ abstract class BaseCcPlaylistcontentsQuery extends ModelCriteria
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Code to execute before every DELETE statement
|
||||
*
|
||||
* @param PropelPDO $con The connection object used by the query
|
||||
*/
|
||||
protected function basePreDelete(PropelPDO $con)
|
||||
{
|
||||
// aggregate_column_relation behavior
|
||||
$this->findRelatedCcPlaylists($con);
|
||||
|
||||
return $this->preDelete($con);
|
||||
}
|
||||
|
||||
/**
|
||||
* Code to execute after every DELETE statement
|
||||
*
|
||||
* @param int $affectedRows the number of deleted rows
|
||||
* @param PropelPDO $con The connection object used by the query
|
||||
*/
|
||||
protected function basePostDelete($affectedRows, PropelPDO $con)
|
||||
{
|
||||
// aggregate_column_relation behavior
|
||||
$this->updateRelatedCcPlaylists($con);
|
||||
|
||||
return $this->postDelete($affectedRows, $con);
|
||||
}
|
||||
|
||||
/**
|
||||
* Code to execute before every UPDATE statement
|
||||
*
|
||||
* @param array $values The associatiove array of columns and values for the update
|
||||
* @param PropelPDO $con The connection object used by the query
|
||||
* @param boolean $forceIndividualSaves If false (default), the resulting call is a BasePeer::doUpdate(), ortherwise it is a series of save() calls on all the found objects
|
||||
*/
|
||||
protected function basePreUpdate(&$values, PropelPDO $con, $forceIndividualSaves = false)
|
||||
{
|
||||
// aggregate_column_relation behavior
|
||||
$this->findRelatedCcPlaylists($con);
|
||||
|
||||
return $this->preUpdate($values, $con, $forceIndividualSaves);
|
||||
}
|
||||
|
||||
/**
|
||||
* Code to execute after every UPDATE statement
|
||||
*
|
||||
* @param int $affectedRows the number of udated rows
|
||||
* @param PropelPDO $con The connection object used by the query
|
||||
*/
|
||||
protected function basePostUpdate($affectedRows, PropelPDO $con)
|
||||
{
|
||||
// aggregate_column_relation behavior
|
||||
$this->updateRelatedCcPlaylists($con);
|
||||
|
||||
return $this->postUpdate($affectedRows, $con);
|
||||
}
|
||||
|
||||
// aggregate_column_relation behavior
|
||||
|
||||
/**
|
||||
* Finds the related CcPlaylist objects and keep them for later
|
||||
*
|
||||
* @param PropelPDO $con A connection object
|
||||
*/
|
||||
protected function findRelatedCcPlaylists($con)
|
||||
{
|
||||
$criteria = clone $this;
|
||||
if ($this->useAliasInSQL) {
|
||||
$alias = $this->getModelAlias();
|
||||
$criteria->removeAlias($alias);
|
||||
} else {
|
||||
$alias = '';
|
||||
}
|
||||
$this->ccPlaylists = CcPlaylistQuery::create()
|
||||
->joinCcPlaylistcontents($alias)
|
||||
->mergeWith($criteria)
|
||||
->find($con);
|
||||
}
|
||||
|
||||
protected function updateRelatedCcPlaylists($con)
|
||||
{
|
||||
foreach ($this->ccPlaylists as $ccPlaylist) {
|
||||
$ccPlaylist->updateDbLength($con);
|
||||
}
|
||||
$this->ccPlaylists = array();
|
||||
}
|
||||
|
||||
} // BaseCcPlaylistcontentsQuery
|
||||
|
|
|
@ -758,7 +758,7 @@ abstract class BaseCcSubjsQuery extends ModelCriteria
|
|||
public function filterByCcPlaylist($ccPlaylist, $comparison = null)
|
||||
{
|
||||
return $this
|
||||
->addUsingAlias(CcSubjsPeer::ID, $ccPlaylist->getDbEditedby(), $comparison);
|
||||
->addUsingAlias(CcSubjsPeer::ID, $ccPlaylist->getDbCreatorId(), $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php if($this->type == "au") : ?>
|
||||
<?php if($this->type == "audioclip") : ?>
|
||||
<div><span>Title:</span><span><?php echo ($this->md["MDATA_KEY_TITLE"]);?></span></div>
|
||||
<div><span>Artist:</span><span><?php echo ($this->md["MDATA_KEY_CREATOR"]);?></span></div>
|
||||
<div><span>Album:</span><span><?php echo ($this->md["MDATA_KEY_SOURCE"]);?></span></div>
|
||||
|
@ -19,7 +19,7 @@
|
|||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($this->type == "pl") : ?>
|
||||
<?php if($this->type == "playlist") : ?>
|
||||
<div><span>Name:</span><span><?php echo ($this->md["dc:title"]);?></span></div>
|
||||
<div><span>Creator:</span><span><?php echo ($this->md["dc:creator"]);?></span></div>
|
||||
<div><span>Length:</span><span><?php echo ($this->md["dcterms:extent"]);?></span></div>
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
<ul>
|
||||
<li><a href="#simpleSearch">Search</a></li>
|
||||
<!--<li><a href="#advancedSearch">Advanced Search</a></li>-->
|
||||
</ul>
|
||||
<div id="simpleSearch">
|
||||
<div id="import_status" style="visibility:hidden">File import in progress...</div>
|
||||
<table id="library_display" cellpadding="0" cellspacing="0" class="datatable">
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!--
|
||||
<div id="advancedSearch">
|
||||
<div id="search">
|
||||
<?php //echo $this->form; ?>
|
||||
</div>
|
||||
<div><?php //echo var_dump($this->md); ?></div>
|
||||
</div>
|
||||
-->
|
|
@ -0,0 +1,9 @@
|
|||
<ul>
|
||||
<li><a href="#simpleSearch">Search</a></li>
|
||||
</ul>
|
||||
<div id="simpleSearch">
|
||||
<div id="import_status" style="visibility:hidden">File import in progress...</div>
|
||||
<table id="library_display" cellpadding="0" cellspacing="0" class="datatable">
|
||||
|
||||
</table>
|
||||
</div>
|
|
@ -1,12 +1,14 @@
|
|||
<button id="spl_new" class="ui-button" role="button" aria-disabled="false">New</button>
|
||||
<button id="spl_new" class="ui-button ui-widget ui-state-default" role="button" aria-disabled="false">New</button>
|
||||
<?php if (isset($this->pl)) : ?>
|
||||
<button id="spl_delete" class="ui-button" role="button" aria-disabled="false">Delete</button>
|
||||
<button id="spl_delete" class="ui-button ui-widget ui-state-default" role="button" aria-disabled="false">Delete</button>
|
||||
<a href="#" id="spl_crossfade" class="ui-button ui-button-icon-only ui-widget ui-state-default crossfade-main-button">
|
||||
<span class="ui-icon crossfade-main-icon"></span><span class="ui-button-text">Playlist crossfade</span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (isset($this->pl)) : ?>
|
||||
<input id="pl_id" type="hidden" value="<?php echo $this->pl->getId(); ?>"></input>
|
||||
<input id="pl_lastMod" type="hidden" value="<?php echo $this->pl->getLastModified('U'); ?>"></input>
|
||||
<div class="playlist_title">
|
||||
<h3 id="spl_name">
|
||||
<a id="playlist_name_display"><?php echo $this->pl->getName(); ?></a>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<dl id="spl_cue_editor" class="inline-list">
|
||||
<dt>Cue In:</dt>
|
||||
<dd id="spl_cue_in_<?php echo $this->pos; ?>" class="spl_cue_in">
|
||||
<dd id="spl_cue_in_<?php echo $this->id; ?>" class="spl_cue_in">
|
||||
<span contenteditable="true" class="spl_text_input"><?php echo $this->cueIn; ?></span>
|
||||
</dd>
|
||||
<dd class="edit-error"></dd>
|
||||
<dt>Cue Out:</dt>
|
||||
<dd id="spl_cue_out_<?php echo $this->pos; ?>" class="spl_cue_out">
|
||||
<dd id="spl_cue_out_<?php echo $this->id; ?>" class="spl_cue_out">
|
||||
<span contenteditable="true" class="spl_text_input"><?php echo $this->cueOut; ?></span>
|
||||
</dd>
|
||||
<dd class="edit-error"></dd>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<dl id="spl_editor" class="inline-list">
|
||||
<dt>Fade out:</dt>
|
||||
<dd id="spl_fade_out_<?php echo $this->pos; ?>" class="spl_fade_out">
|
||||
<dd id="spl_fade_out_<?php echo $this->item1; ?>" class="spl_fade_out">
|
||||
<span contenteditable="true" class="spl_text_input"><?php echo $this->fadeOut; ?></span>
|
||||
</dd>
|
||||
<dd class="edit-error"></dd>
|
||||
<dt>Fade in:</dt>
|
||||
<dd id="spl_fade_in_<?php echo $this->pos + 1; ?>" class="spl_fade_in">
|
||||
<dd id="spl_fade_in_<?php echo $this->item2; ?>" class="spl_fade_in">
|
||||
<span contenteditable="true" class="spl_text_input"><?php echo $this->fadeIn; ?></span>
|
||||
</dd>
|
||||
<dd class="edit-error"></dd>
|
||||
|
|
|
@ -4,7 +4,7 @@ if (count($items)) : ?>
|
|||
|
||||
<?php $i = 0; ?>
|
||||
<?php foreach($items as $item) : ?>
|
||||
<li class="ui-state-default" id="spl_<?php echo $i ?>" unqid="<?php echo $item["CcFiles"]["gunid"]."_".$i; ?>">
|
||||
<li class="ui-state-default" id="spl_<?php echo $item["id"] ?>" unqid="<?php echo $item["CcFiles"]["gunid"]."_".$i; ?>">
|
||||
<div class="list-item-container">
|
||||
<a href="javascript:void(0);" class="big_play"
|
||||
onclick="audioPreview('<?php echo $item["CcFiles"]["gunid"].".".pathinfo($item["CcFiles"]["filepath"], PATHINFO_EXTENSION);?>',
|
||||
|
@ -25,12 +25,12 @@ if (count($items)) : ?>
|
|||
?>
|
||||
<div id="fade_<?php echo $i ?>" class="spl_fade_control ui-state-default"></div>
|
||||
<?php endif; ?>
|
||||
<span class="ui-icon ui-icon-closethick"></span>
|
||||
<span id="remove_<?php echo $item["id"] ?>" class="ui-icon ui-icon-closethick"></span>
|
||||
</div>
|
||||
|
||||
<div id="cues_<?php echo $i ?>" class="cue-edit clearfix" style="display: none">
|
||||
<?php echo $this->partial('playlist/set-cue.phtml', array(
|
||||
'pos' => $i,
|
||||
'id' => $item["id"],
|
||||
'cueIn' => $item['cuein'],
|
||||
'cueOut' => $item['cueout'],
|
||||
'origLength' => $item["CcFiles"]['length'])); ?>
|
||||
|
@ -43,7 +43,8 @@ if (count($items)) : ?>
|
|||
?>
|
||||
<div id="crossfade_<?php echo $i ?>-<?php echo $i+1 ?>" class="crossfade clearfix" style="display: none">
|
||||
<?php echo $this->partial('playlist/set-fade.phtml', array(
|
||||
'pos' => $i,
|
||||
'item1' => $items[$i]['id'],
|
||||
'item2' => $items[$i+1]['id'],
|
||||
'fadeOut' => $items[$i]['fadeout'],
|
||||
'fadeIn' => $items[$i+1]['fadein'])); ?>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<input type="text" id="show_builder_datepicker_start" class="input_text"></input>
|
||||
<input type="text" id="show_builder_timepicker_start" class="input_text"></input>
|
||||
<input type="text" id="show_builder_datepicker_end" class="input_text"></input>
|
||||
<input type="text" id="show_builder_timepicker_end" class="input_text"></input>
|
||||
<input type="button" id="show_builder_timerange_button" class="ui-button ui-state-default" value="GO"></input>
|
||||
<table id="show_builder_table" cellpadding="0" cellspacing="0" class="datatable"></table>
|
|
@ -1,6 +1,6 @@
|
|||
#Note: project.home is automatically generated by the propel-install script.
|
||||
#Any manual changes to this value will be overwritten.
|
||||
project.home = /home/james/src/airtime/airtime_mvc
|
||||
project.home = /home/naomiaro/airtime/airtime_mvc
|
||||
project.build = ${project.home}/build
|
||||
|
||||
#Database driver
|
||||
|
|
|
@ -216,16 +216,19 @@
|
|||
<table name="cc_playlist" phpName="CcPlaylist">
|
||||
<column name="id" phpName="DbId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
|
||||
<column name="name" phpName="DbName" type="VARCHAR" size="255" required="true" defaultValue=""/>
|
||||
<column name="state" phpName="DbState" type="VARCHAR" size="128" required="true" defaultValue="empty"/>
|
||||
<column name="currentlyaccessing" phpName="DbCurrentlyaccessing" type="INTEGER" required="true" defaultValue="0"/>
|
||||
<column name="editedby" phpName="DbEditedby" type="INTEGER" required="false"/>
|
||||
<column name="mtime" phpName="DbMtime" type="TIMESTAMP" size="6" required="false"/>
|
||||
<column name="utime" phpName="DbUtime" type="TIMESTAMP" size="6" required="false"/>
|
||||
<column name="lptime" phpName="DbLPtime" type="TIMESTAMP" size="6" required="false"/>
|
||||
<column name="creator" phpName="DbCreator" type="VARCHAR" size="32" required="false"/>
|
||||
<column name="creator_id" phpName="DbCreatorId" type="INTEGER" required="false"/>
|
||||
<column name="description" phpName="DbDescription" type="VARCHAR" size="512" required="false"/>
|
||||
<foreign-key foreignTable="cc_subjs" name="cc_playlist_editedby_fkey">
|
||||
<reference local="editedby" foreign="id"/>
|
||||
<column name="length" phpName="DbLength" type="VARCHAR" sqlType="interval" defaultValue="00:00:00"/>
|
||||
<behavior name="aggregate_column">
|
||||
<parameter name="name" value="length" />
|
||||
<parameter name="foreign_table" value="cc_playlistcontents" />
|
||||
<parameter name="expression" value="SUM(cliplength)" />
|
||||
</behavior>
|
||||
<foreign-key foreignTable="cc_subjs" name="cc_playlist_createdby_fkey">
|
||||
<reference local="creator_id" foreign="id"/>
|
||||
</foreign-key>
|
||||
</table>
|
||||
<table name="cc_playlistcontents" phpName="CcPlaylistcontents">
|
||||
|
|
|
@ -288,14 +288,12 @@ CREATE TABLE "cc_playlist"
|
|||
(
|
||||
"id" serial NOT NULL,
|
||||
"name" VARCHAR(255) default '' NOT NULL,
|
||||
"state" VARCHAR(128) default 'empty' NOT NULL,
|
||||
"currentlyaccessing" INTEGER default 0 NOT NULL,
|
||||
"editedby" INTEGER,
|
||||
"mtime" TIMESTAMP(6),
|
||||
"utime" TIMESTAMP(6),
|
||||
"lptime" TIMESTAMP(6),
|
||||
"creator" VARCHAR(32),
|
||||
"creator_id" INTEGER,
|
||||
"description" VARCHAR(512),
|
||||
"length" interval default '00:00:00',
|
||||
PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
|
@ -575,7 +573,7 @@ ALTER TABLE "cc_show_hosts" ADD CONSTRAINT "cc_perm_show_fkey" FOREIGN KEY ("sho
|
|||
|
||||
ALTER TABLE "cc_show_hosts" ADD CONSTRAINT "cc_perm_host_fkey" FOREIGN KEY ("subjs_id") REFERENCES "cc_subjs" ("id") ON DELETE CASCADE;
|
||||
|
||||
ALTER TABLE "cc_playlist" ADD CONSTRAINT "cc_playlist_editedby_fkey" FOREIGN KEY ("editedby") REFERENCES "cc_subjs" ("id");
|
||||
ALTER TABLE "cc_playlist" ADD CONSTRAINT "cc_playlist_createdby_fkey" FOREIGN KEY ("creator_id") REFERENCES "cc_subjs" ("id");
|
||||
|
||||
ALTER TABLE "cc_playlistcontents" ADD CONSTRAINT "cc_playlistcontents_file_id_fkey" FOREIGN KEY ("file_id") REFERENCES "cc_files" ("id") ON DELETE CASCADE;
|
||||
|
||||
|
|
|
@ -3,22 +3,5 @@
|
|||
----------------------------------------------------------------------------------
|
||||
DROP FUNCTION calculate_position() CASCADE;
|
||||
|
||||
CREATE FUNCTION calculate_position() RETURNS trigger AS
|
||||
'
|
||||
BEGIN
|
||||
IF(TG_OP=''INSERT'') THEN
|
||||
UPDATE cc_playlistcontents SET position = (position + 1)
|
||||
WHERE (playlist_id = new.playlist_id AND position >= new.position AND id != new.id);
|
||||
END IF;
|
||||
IF(TG_OP=''DELETE'') THEN
|
||||
UPDATE cc_playlistcontents SET position = (position - 1)
|
||||
WHERE (playlist_id = old.playlist_id AND position > old.position);
|
||||
END IF;
|
||||
RETURN NULL;
|
||||
END;
|
||||
'
|
||||
LANGUAGE 'plpgsql';
|
||||
|
||||
CREATE TRIGGER calculate_position AFTER INSERT OR DELETE ON cc_playlistcontents
|
||||
FOR EACH ROW EXECUTE PROCEDURE calculate_position();
|
||||
--remove this trigger for group adds/delete
|
||||
|
||||
|
|
|
@ -2,10 +2,4 @@
|
|||
---cc_playlisttimes
|
||||
-------------------------------------------------------
|
||||
|
||||
CREATE VIEW cc_playlisttimes AS
|
||||
SELECT pl.id, COALESCE(t.length, '00:00:00'::time without time zone) AS length
|
||||
FROM cc_playlist pl
|
||||
LEFT JOIN ( SELECT cc_playlistcontents.playlist_id AS id,
|
||||
sum(cc_playlistcontents.cliplength::interval)::time without time zone AS length
|
||||
FROM cc_playlistcontents
|
||||
GROUP BY cc_playlistcontents.playlist_id) t ON pl.id = t.id;
|
||||
DROP VIEW cc_playlisttimes;
|
||||
|
|
|
@ -0,0 +1,265 @@
|
|||
/*
|
||||
* File: TableTools.css
|
||||
* Description: Styles for TableTools 2
|
||||
* Author: Allan Jardine (www.sprymedia.co.uk)
|
||||
* Language: Javascript
|
||||
* License: LGPL / 3 point BSD
|
||||
* Project: DataTables
|
||||
*
|
||||
* Copyright 2010 Allan Jardine, all rights reserved.
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* CSS name space:
|
||||
* DTTT DataTables TableTools
|
||||
*
|
||||
* Colour dictionary:
|
||||
* Button border #d0d0d0
|
||||
* Button border hover #999999
|
||||
* Hover background #f0f0f0
|
||||
* Action blue #4b66d9
|
||||
*
|
||||
* Style sheet provides:
|
||||
* CONTAINER TableTools container element and styles applying to all components
|
||||
* BUTTON_STYLES Action specific button styles
|
||||
* SELECTING Row selection styles
|
||||
* COLLECTIONS Drop down list (collection) styles
|
||||
* PRINTING Print display styles
|
||||
* MISC Minor misc styles
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* CONTAINER
|
||||
* TableTools container element and styles applying to all components
|
||||
*/
|
||||
div.DTTT_container {
|
||||
position: relative;
|
||||
float: left;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
button.DTTT_button {
|
||||
position: relative;
|
||||
float: left;
|
||||
height: 30px;
|
||||
margin-right: 3px;
|
||||
padding: 3px 5px;
|
||||
border: 1px solid #d0d0d0;
|
||||
background-color: #fff;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
}
|
||||
|
||||
button.DTTT_button::-moz-focus-inner {
|
||||
border: none !important;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* BUTTON_STYLES
|
||||
* Action specific button styles
|
||||
*/
|
||||
|
||||
button.DTTT_button_csv {
|
||||
padding-right: 30px;
|
||||
background: url(../images/csv.png) no-repeat center right;
|
||||
}
|
||||
|
||||
button.DTTT_button_csv_hover {
|
||||
padding-right: 30px;
|
||||
border: 1px solid #999;
|
||||
background: #f0f0f0 url(../images/csv_hover.png) no-repeat center right;
|
||||
}
|
||||
|
||||
|
||||
button.DTTT_button_xls {
|
||||
padding-right: 30px;
|
||||
background: url(../images/xls.png) no-repeat center right;
|
||||
}
|
||||
|
||||
button.DTTT_button_xls_hover {
|
||||
padding-right: 30px;
|
||||
border: 1px solid #999;
|
||||
background: #f0f0f0 url(../images/xls_hover.png) no-repeat center right;
|
||||
}
|
||||
|
||||
|
||||
button.DTTT_button_copy {
|
||||
padding-right: 30px;
|
||||
background: url(../images/copy.png) no-repeat center right;
|
||||
}
|
||||
|
||||
button.DTTT_button_copy_hover {
|
||||
padding-right: 30px;
|
||||
border: 1px solid #999;
|
||||
background: #f0f0f0 url(../images/copy_hover.png) no-repeat center right;
|
||||
}
|
||||
|
||||
|
||||
button.DTTT_button_pdf {
|
||||
padding-right: 30px;
|
||||
background: url(../images/pdf.png) no-repeat center right;
|
||||
}
|
||||
|
||||
button.DTTT_button_pdf_hover {
|
||||
padding-right: 30px;
|
||||
border: 1px solid #999;
|
||||
background: #f0f0f0 url(../images/pdf_hover.png) no-repeat center right;
|
||||
}
|
||||
|
||||
|
||||
button.DTTT_button_print {
|
||||
padding-right: 30px;
|
||||
background: url(../images/print.png) no-repeat center right;
|
||||
}
|
||||
|
||||
button.DTTT_button_print_hover {
|
||||
padding-right: 30px;
|
||||
border: 1px solid #999;
|
||||
background: #f0f0f0 url(../images/print_hover.png) no-repeat center right;
|
||||
}
|
||||
|
||||
|
||||
button.DTTT_button_text {
|
||||
}
|
||||
|
||||
button.DTTT_button_text_hover {
|
||||
border: 1px solid #999;
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
|
||||
button.DTTT_button_collection {
|
||||
padding-right: 17px;
|
||||
background: url(../images/collection.png) no-repeat center right;
|
||||
}
|
||||
|
||||
button.DTTT_button_collection_hover {
|
||||
padding-right: 17px;
|
||||
border: 1px solid #999;
|
||||
background: #f0f0f0 url(../images/collection_hover.png) no-repeat center right;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* SELECTING
|
||||
* Row selection styles
|
||||
*/
|
||||
table.DTTT_selectable tbody tr {
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
}
|
||||
|
||||
tr.DTTT_selected.odd {
|
||||
background-color: #9FAFD1;
|
||||
}
|
||||
|
||||
tr.DTTT_selected.odd td.sorting_1 {
|
||||
background-color: #9FAFD1;
|
||||
}
|
||||
|
||||
tr.DTTT_selected.odd td.sorting_2 {
|
||||
background-color: #9FAFD1;
|
||||
}
|
||||
|
||||
tr.DTTT_selected.odd td.sorting_3 {
|
||||
background-color: #9FAFD1;
|
||||
}
|
||||
|
||||
|
||||
tr.DTTT_selected.even {
|
||||
background-color: #B0BED9;
|
||||
}
|
||||
|
||||
tr.DTTT_selected.even td.sorting_1 {
|
||||
background-color: #B0BED9;
|
||||
}
|
||||
|
||||
tr.DTTT_selected.even td.sorting_2 {
|
||||
background-color: #B0BED9;
|
||||
}
|
||||
|
||||
tr.DTTT_selected.even td.sorting_3 {
|
||||
background-color: #B0BED9;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* COLLECTIONS
|
||||
* Drop down list (collection) styles
|
||||
*/
|
||||
|
||||
div.DTTT_collection {
|
||||
width: 150px;
|
||||
padding: 3px;
|
||||
border: 1px solid #ccc;
|
||||
background-color: #f3f3f3;
|
||||
overflow: hidden;
|
||||
z-index: 2002;
|
||||
}
|
||||
|
||||
div.DTTT_collection_background {
|
||||
background: transparent url(../images/background.png) repeat top left;
|
||||
z-index: 2001;
|
||||
}
|
||||
|
||||
div.DTTT_collection button.DTTT_button {
|
||||
float: none;
|
||||
width: 100%;
|
||||
margin-bottom: 2px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* PRINTING
|
||||
* Print display styles
|
||||
*/
|
||||
|
||||
.DTTT_print_info {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 400px;
|
||||
height: 150px;
|
||||
margin-left: -200px;
|
||||
margin-top: -75px;
|
||||
text-align: center;
|
||||
background-color: #3f3f3f;
|
||||
color: white;
|
||||
padding: 10px 30px;
|
||||
|
||||
opacity: 0.9;
|
||||
|
||||
border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
|
||||
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
|
||||
-moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
|
||||
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.DTTT_print_info h6 {
|
||||
font-weight: normal;
|
||||
font-size: 28px;
|
||||
line-height: 28px;
|
||||
margin: 1em;
|
||||
}
|
||||
|
||||
.DTTT_print_info p {
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* MISC
|
||||
* Minor misc styles
|
||||
*/
|
||||
|
||||
.DTTT_disabled {
|
||||
color: #999;
|
||||
}
|
|
@ -0,0 +1,183 @@
|
|||
/*
|
||||
* File: TableTools.css
|
||||
* Description: Styles for TableTools 2 with JUI theming
|
||||
* Author: Allan Jardine (www.sprymedia.co.uk)
|
||||
* Language: Javascript
|
||||
* License: LGPL / 3 point BSD
|
||||
* Project: DataTables
|
||||
*
|
||||
* Copyright 2010 Allan Jardine, all rights reserved.
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* Notes:
|
||||
* Generally speaking, please refer to the TableTools.css file - this file contains basic
|
||||
* modifications to that 'master' stylesheet for ThemeRoller.
|
||||
*
|
||||
* CSS name space:
|
||||
* DTTT DataTables TableTools
|
||||
*
|
||||
* Colour dictionary:
|
||||
* Button border #d0d0d0
|
||||
* Button border hover #999999
|
||||
* Hover background #f0f0f0
|
||||
* Action blue #4b66d9
|
||||
*
|
||||
* Style sheet provides:
|
||||
* CONTAINER TableTools container element and styles applying to all components
|
||||
* SELECTING Row selection styles
|
||||
* COLLECTIONS Drop down list (collection) styles
|
||||
* PRINTING Print display styles
|
||||
* MISC Minor misc styles
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* CONTAINER
|
||||
* TableTools container element and styles applying to all components
|
||||
*/
|
||||
div.DTTT_container {
|
||||
position: relative;
|
||||
float: left;
|
||||
}
|
||||
|
||||
button.DTTT_button {
|
||||
position: relative;
|
||||
float: left;
|
||||
height: 24px;
|
||||
margin-right: 3px;
|
||||
padding: 3px 10px;
|
||||
border: 1px solid #d0d0d0;
|
||||
background-color: #fff;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
}
|
||||
|
||||
button.DTTT_button::-moz-focus-inner {
|
||||
border: none !important;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* SELECTING
|
||||
* Row selection styles
|
||||
*/
|
||||
table.DTTT_selectable tbody tr {
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
}
|
||||
|
||||
tr.DTTT_selected.odd {
|
||||
background-color: #9FAFD1;
|
||||
}
|
||||
|
||||
tr.DTTT_selected.odd td.sorting_1 {
|
||||
background-color: #9FAFD1;
|
||||
}
|
||||
|
||||
tr.DTTT_selected.odd td.sorting_2 {
|
||||
background-color: #9FAFD1;
|
||||
}
|
||||
|
||||
tr.DTTT_selected.odd td.sorting_3 {
|
||||
background-color: #9FAFD1;
|
||||
}
|
||||
|
||||
|
||||
tr.DTTT_selected.even {
|
||||
background-color: #B0BED9;
|
||||
}
|
||||
|
||||
tr.DTTT_selected.even td.sorting_1 {
|
||||
background-color: #B0BED9;
|
||||
}
|
||||
|
||||
tr.DTTT_selected.even td.sorting_2 {
|
||||
background-color: #B0BED9;
|
||||
}
|
||||
|
||||
tr.DTTT_selected.even td.sorting_3 {
|
||||
background-color: #B0BED9;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* COLLECTIONS
|
||||
* Drop down list (collection) styles
|
||||
*/
|
||||
|
||||
div.DTTT_collection {
|
||||
width: 150px;
|
||||
background-color: #f3f3f3;
|
||||
overflow: hidden;
|
||||
z-index: 2002;
|
||||
|
||||
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
|
||||
-moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
|
||||
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
div.DTTT_collection_background {
|
||||
background: url(../images/background.png) repeat top left;
|
||||
z-index: 2001;
|
||||
}
|
||||
|
||||
div.DTTT_collection button.DTTT_button {
|
||||
float: none;
|
||||
width: 100%;
|
||||
margin-bottom: -0.1em;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* PRINTING
|
||||
* Print display styles
|
||||
*/
|
||||
|
||||
.DTTT_print_info {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 400px;
|
||||
height: 150px;
|
||||
margin-left: -200px;
|
||||
margin-top: -75px;
|
||||
text-align: center;
|
||||
background-color: #3f3f3f;
|
||||
color: white;
|
||||
padding: 10px 30px;
|
||||
|
||||
opacity: 0.9;
|
||||
|
||||
border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
|
||||
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
|
||||
-moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
|
||||
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.DTTT_print_info h6 {
|
||||
font-weight: normal;
|
||||
font-size: 28px;
|
||||
line-height: 28px;
|
||||
margin: 1em;
|
||||
}
|
||||
|
||||
.DTTT_print_info p {
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* MISC
|
||||
* Minor misc styles
|
||||
*/
|
||||
|
||||
.DTTT_disabled {
|
||||
color: #999;
|
||||
}
|
|
@ -0,0 +1,265 @@
|
|||
/*
|
||||
* File: TableTools.css
|
||||
* Description: Styles for TableTools 2
|
||||
* Author: Allan Jardine (www.sprymedia.co.uk)
|
||||
* Language: Javascript
|
||||
* License: LGPL / 3 point BSD
|
||||
* Project: DataTables
|
||||
*
|
||||
* Copyright 2010 Allan Jardine, all rights reserved.
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* CSS name space:
|
||||
* DTTT DataTables TableTools
|
||||
*
|
||||
* Colour dictionary:
|
||||
* Button border #d0d0d0
|
||||
* Button border hover #999999
|
||||
* Hover background #f0f0f0
|
||||
* Action blue #4b66d9
|
||||
*
|
||||
* Style sheet provides:
|
||||
* CONTAINER TableTools container element and styles applying to all components
|
||||
* BUTTON_STYLES Action specific button styles
|
||||
* SELECTING Row selection styles
|
||||
* COLLECTIONS Drop down list (collection) styles
|
||||
* PRINTING Print display styles
|
||||
* MISC Minor misc styles
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* CONTAINER
|
||||
* TableTools container element and styles applying to all components
|
||||
*/
|
||||
div.DTTT_container {
|
||||
position: relative;
|
||||
float: right;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
button.DTTT_button {
|
||||
position: relative;
|
||||
float: left;
|
||||
height: 30px;
|
||||
margin-right: 3px;
|
||||
padding: 3px 5px;
|
||||
border: 1px solid #d0d0d0;
|
||||
background-color: #fff;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
}
|
||||
|
||||
button.DTTT_button::-moz-focus-inner {
|
||||
border: none !important;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* BUTTON_STYLES
|
||||
* Action specific button styles
|
||||
*/
|
||||
|
||||
button.DTTT_button_csv {
|
||||
padding-right: 30px;
|
||||
background: url(../images/csv.png) no-repeat center right;
|
||||
}
|
||||
|
||||
button.DTTT_button_csv_hover {
|
||||
padding-right: 30px;
|
||||
border: 1px solid #999;
|
||||
background: #f0f0f0 url(../images/csv_hover.png) no-repeat center right;
|
||||
}
|
||||
|
||||
|
||||
button.DTTT_button_xls {
|
||||
padding-right: 30px;
|
||||
background: url(../images/xls.png) no-repeat center right;
|
||||
}
|
||||
|
||||
button.DTTT_button_xls_hover {
|
||||
padding-right: 30px;
|
||||
border: 1px solid #999;
|
||||
background: #f0f0f0 url(../images/xls_hover.png) no-repeat center right;
|
||||
}
|
||||
|
||||
|
||||
button.DTTT_button_copy {
|
||||
padding-right: 30px;
|
||||
background: url(../images/copy.png) no-repeat center right;
|
||||
}
|
||||
|
||||
button.DTTT_button_copy_hover {
|
||||
padding-right: 30px;
|
||||
border: 1px solid #999;
|
||||
background: #f0f0f0 url(../images/copy_hover.png) no-repeat center right;
|
||||
}
|
||||
|
||||
|
||||
button.DTTT_button_pdf {
|
||||
padding-right: 30px;
|
||||
background: url(../images/pdf.png) no-repeat center right;
|
||||
}
|
||||
|
||||
button.DTTT_button_pdf_hover {
|
||||
padding-right: 30px;
|
||||
border: 1px solid #999;
|
||||
background: #f0f0f0 url(../images/pdf_hover.png) no-repeat center right;
|
||||
}
|
||||
|
||||
|
||||
button.DTTT_button_print {
|
||||
padding-right: 30px;
|
||||
background: url(../images/print.png) no-repeat center right;
|
||||
}
|
||||
|
||||
button.DTTT_button_print_hover {
|
||||
padding-right: 30px;
|
||||
border: 1px solid #999;
|
||||
background: #f0f0f0 url(../images/print_hover.png) no-repeat center right;
|
||||
}
|
||||
|
||||
|
||||
button.DTTT_button_text {
|
||||
}
|
||||
|
||||
button.DTTT_button_text_hover {
|
||||
border: 1px solid #999;
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
|
||||
button.DTTT_button_collection {
|
||||
padding-right: 17px;
|
||||
background: url(../images/collection.png) no-repeat center right;
|
||||
}
|
||||
|
||||
button.DTTT_button_collection_hover {
|
||||
padding-right: 17px;
|
||||
border: 1px solid #999;
|
||||
background: #f0f0f0 url(../images/collection_hover.png) no-repeat center right;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* SELECTING
|
||||
* Row selection styles
|
||||
*/
|
||||
table.DTTT_selectable tbody tr {
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
}
|
||||
|
||||
tr.DTTT_selected.odd {
|
||||
background-color: #9FAFD1;
|
||||
}
|
||||
|
||||
tr.DTTT_selected.odd td.sorting_1 {
|
||||
background-color: #9FAFD1;
|
||||
}
|
||||
|
||||
tr.DTTT_selected.odd td.sorting_2 {
|
||||
background-color: #9FAFD1;
|
||||
}
|
||||
|
||||
tr.DTTT_selected.odd td.sorting_3 {
|
||||
background-color: #9FAFD1;
|
||||
}
|
||||
|
||||
|
||||
tr.DTTT_selected.even {
|
||||
background-color: #B0BED9;
|
||||
}
|
||||
|
||||
tr.DTTT_selected.even td.sorting_1 {
|
||||
background-color: #B0BED9;
|
||||
}
|
||||
|
||||
tr.DTTT_selected.even td.sorting_2 {
|
||||
background-color: #B0BED9;
|
||||
}
|
||||
|
||||
tr.DTTT_selected.even td.sorting_3 {
|
||||
background-color: #B0BED9;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* COLLECTIONS
|
||||
* Drop down list (collection) styles
|
||||
*/
|
||||
|
||||
div.DTTT_collection {
|
||||
width: 150px;
|
||||
padding: 3px;
|
||||
border: 1px solid #ccc;
|
||||
background-color: #f3f3f3;
|
||||
overflow: hidden;
|
||||
z-index: 2002;
|
||||
}
|
||||
|
||||
div.DTTT_collection_background {
|
||||
background: transparent url(../images/background.png) repeat top left;
|
||||
z-index: 2001;
|
||||
}
|
||||
|
||||
div.DTTT_collection button.DTTT_button {
|
||||
float: none;
|
||||
width: 100%;
|
||||
margin-bottom: 2px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* PRINTING
|
||||
* Print display styles
|
||||
*/
|
||||
|
||||
.DTTT_print_info {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 400px;
|
||||
height: 150px;
|
||||
margin-left: -200px;
|
||||
margin-top: -75px;
|
||||
text-align: center;
|
||||
background-color: #3f3f3f;
|
||||
color: white;
|
||||
padding: 10px 30px;
|
||||
|
||||
opacity: 0.9;
|
||||
|
||||
border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
|
||||
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
|
||||
-moz-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
|
||||
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.DTTT_print_info h6 {
|
||||
font-weight: normal;
|
||||
font-size: 28px;
|
||||
line-height: 28px;
|
||||
margin: 1em;
|
||||
}
|
||||
|
||||
.DTTT_print_info p {
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* MISC
|
||||
* Minor misc styles
|
||||
*/
|
||||
|
||||
.DTTT_disabled {
|
||||
color: #999;
|
||||
}
|
|
@ -1,92 +0,0 @@
|
|||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* General page setup
|
||||
*/
|
||||
#dt_example {
|
||||
font: 80%/1.45em "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: #333;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
|
||||
#dt_example #container {
|
||||
width: 800px;
|
||||
margin: 30px auto;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
#dt_example #footer {
|
||||
margin: 50px auto 0 auto;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#dt_example #demo {
|
||||
margin: 30px auto 0 auto;
|
||||
}
|
||||
|
||||
#dt_example .demo_jui {
|
||||
margin: 30px auto 0 auto;
|
||||
}
|
||||
|
||||
#dt_example .big {
|
||||
font-size: 1.3em;
|
||||
font-weight: bold;
|
||||
line-height: 1.6em;
|
||||
color: #4E6CA3;
|
||||
}
|
||||
|
||||
#dt_example .spacer {
|
||||
height: 20px;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#dt_example .clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#dt_example pre {
|
||||
padding: 15px;
|
||||
background-color: #F5F5F5;
|
||||
border: 1px solid #CCCCCC;
|
||||
}
|
||||
|
||||
#dt_example h1 {
|
||||
margin-top: 2em;
|
||||
font-size: 1.3em;
|
||||
font-weight: normal;
|
||||
line-height: 1.6em;
|
||||
color: #4E6CA3;
|
||||
border-bottom: 1px solid #B0BED9;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#dt_example h2 {
|
||||
font-size: 1.2em;
|
||||
font-weight: normal;
|
||||
line-height: 1.6em;
|
||||
color: #4E6CA3;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#dt_example a {
|
||||
color: #0063DC;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#dt_example a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#dt_example ul {
|
||||
color: #4E6CA3;
|
||||
}
|
||||
|
||||
.css_right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.css_left {
|
||||
float: left;
|
||||
}
|
|
@ -1,538 +0,0 @@
|
|||
/*
|
||||
* File: demo_table.css
|
||||
* CVS: $Id$
|
||||
* Description: CSS descriptions for DataTables demo pages
|
||||
* Author: Allan Jardine
|
||||
* Created: Tue May 12 06:47:22 BST 2009
|
||||
* Modified: $Date$ by $Author$
|
||||
* Language: CSS
|
||||
* Project: DataTables
|
||||
*
|
||||
* Copyright 2009 Allan Jardine. All Rights Reserved.
|
||||
*
|
||||
* ***************************************************************************
|
||||
* DESCRIPTION
|
||||
*
|
||||
* The styles given here are suitable for the demos that are used with the standard DataTables
|
||||
* distribution (see www.datatables.net). You will most likely wish to modify these styles to
|
||||
* meet the layout requirements of your site.
|
||||
*
|
||||
* Common issues:
|
||||
* 'full_numbers' pagination - I use an extra selector on the body tag to ensure that there is
|
||||
* no conflict between the two pagination types. If you want to use full_numbers pagination
|
||||
* ensure that you either have "example_alt_pagination" as a body class name, or better yet,
|
||||
* modify that selector.
|
||||
* Note that the path used for Images is relative. All images are by default located in
|
||||
* ../images/ - relative to this CSS file.
|
||||
*/
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* DataTables features
|
||||
*/
|
||||
|
||||
.dataTables_wrapper {
|
||||
position: relative;
|
||||
min-height: 302px;
|
||||
clear: both;
|
||||
_height: 302px;
|
||||
zoom: 1; /* Feeling sorry for IE */
|
||||
}
|
||||
|
||||
.dataTables_processing {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 250px;
|
||||
height: 30px;
|
||||
margin-left: -125px;
|
||||
margin-top: -15px;
|
||||
padding: 14px 0 2px 0;
|
||||
border: 1px solid #ddd;
|
||||
text-align: center;
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.dataTables_length {
|
||||
width: 40%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.dataTables_info {
|
||||
width: 60%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.dataTables_paginate {
|
||||
width: 44px;
|
||||
* width: 50px;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* Pagination nested */
|
||||
.paginate_disabled_previous, .paginate_enabled_previous, .paginate_disabled_next, .paginate_enabled_next {
|
||||
height: 19px;
|
||||
width: 19px;
|
||||
margin-left: 3px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.paginate_disabled_previous {
|
||||
background-image: url('../images/back_disabled.jpg');
|
||||
}
|
||||
|
||||
.paginate_enabled_previous {
|
||||
background-image: url('../images/back_enabled.jpg');
|
||||
}
|
||||
|
||||
.paginate_disabled_next {
|
||||
background-image: url('../images/forward_disabled.jpg');
|
||||
}
|
||||
|
||||
.paginate_enabled_next {
|
||||
background-image: url('../images/forward_enabled.jpg');
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* DataTables display
|
||||
*/
|
||||
table.display {
|
||||
margin: 0 auto;
|
||||
clear: both;
|
||||
width: 100%;
|
||||
|
||||
/* Note Firefox 3.5 and before have a bug with border-collapse
|
||||
* ( https://bugzilla.mozilla.org/show%5Fbug.cgi?id=155955 )
|
||||
* border-spacing: 0; is one possible option. Conditional-css.com is
|
||||
* useful for this kind of thing
|
||||
*
|
||||
* Further note IE 6/7 has problems when calculating widths with border width.
|
||||
* It subtracts one px relative to the other browsers from the first column, and
|
||||
* adds one to the end...
|
||||
*
|
||||
* If you want that effect I'd suggest setting a border-top/left on th/td's and
|
||||
* then filling in the gaps with other borders.
|
||||
*/
|
||||
}
|
||||
|
||||
table.display thead th {
|
||||
padding: 3px 18px 3px 10px;
|
||||
border-bottom: 1px solid black;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
* cursor: hand;
|
||||
}
|
||||
|
||||
table.display tfoot th {
|
||||
padding: 3px 18px 3px 10px;
|
||||
border-top: 1px solid black;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
table.display tr.heading2 td {
|
||||
border-bottom: 1px solid #aaa;
|
||||
}
|
||||
|
||||
table.display td {
|
||||
padding: 3px 10px;
|
||||
}
|
||||
|
||||
table.display td.center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* DataTables sorting
|
||||
*/
|
||||
|
||||
.sorting_asc {
|
||||
background: url('../images/sort_asc.png') no-repeat center right;
|
||||
}
|
||||
|
||||
.sorting_desc {
|
||||
background: url('../images/sort_desc.png') no-repeat center right;
|
||||
}
|
||||
|
||||
.sorting {
|
||||
background: url('../images/sort_both.png') no-repeat center right;
|
||||
}
|
||||
|
||||
.sorting_asc_disabled {
|
||||
background: url('../images/sort_asc_disabled.png') no-repeat center right;
|
||||
}
|
||||
|
||||
.sorting_desc_disabled {
|
||||
background: url('../images/sort_desc_disabled.png') no-repeat center right;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* DataTables row classes
|
||||
*/
|
||||
table.display tr.odd.gradeA {
|
||||
background-color: #ddffdd;
|
||||
}
|
||||
|
||||
table.display tr.even.gradeA {
|
||||
background-color: #eeffee;
|
||||
}
|
||||
|
||||
table.display tr.odd.gradeC {
|
||||
background-color: #ddddff;
|
||||
}
|
||||
|
||||
table.display tr.even.gradeC {
|
||||
background-color: #eeeeff;
|
||||
}
|
||||
|
||||
table.display tr.odd.gradeX {
|
||||
background-color: #ffdddd;
|
||||
}
|
||||
|
||||
table.display tr.even.gradeX {
|
||||
background-color: #ffeeee;
|
||||
}
|
||||
|
||||
table.display tr.odd.gradeU {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
table.display tr.even.gradeU {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
|
||||
tr.odd {
|
||||
background-color: #E2E4FF;
|
||||
}
|
||||
|
||||
tr.even {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Misc
|
||||
*/
|
||||
.dataTables_scroll {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody {
|
||||
*margin-top: -1px;
|
||||
}
|
||||
|
||||
.top, .bottom {
|
||||
padding: 15px;
|
||||
background-color: #F5F5F5;
|
||||
border: 1px solid #CCCCCC;
|
||||
}
|
||||
|
||||
.top .dataTables_info {
|
||||
float: none;
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.dataTables_empty {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
tfoot input {
|
||||
margin: 0.5em 0;
|
||||
width: 100%;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
tfoot input.search_init {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
td.group {
|
||||
background-color: #d1cfd0;
|
||||
border-bottom: 2px solid #A19B9E;
|
||||
border-top: 2px solid #A19B9E;
|
||||
}
|
||||
|
||||
td.details {
|
||||
background-color: #d1cfd0;
|
||||
border: 2px solid #A19B9E;
|
||||
}
|
||||
|
||||
|
||||
.example_alt_pagination div.dataTables_info {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.paging_full_numbers {
|
||||
width: 400px;
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.paging_full_numbers span.paginate_button,
|
||||
.paging_full_numbers span.paginate_active {
|
||||
border: 1px solid #aaa;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
padding: 2px 5px;
|
||||
margin: 0 3px;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
}
|
||||
|
||||
.paging_full_numbers span.paginate_button {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.paging_full_numbers span.paginate_button:hover {
|
||||
background-color: #ccc;
|
||||
}
|
||||
|
||||
.paging_full_numbers span.paginate_active {
|
||||
background-color: #99B3FF;
|
||||
}
|
||||
|
||||
table.display tr.even.row_selected td {
|
||||
background-color: #B0BED9;
|
||||
}
|
||||
|
||||
table.display tr.odd.row_selected td {
|
||||
background-color: #9FAFD1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Sorting classes for columns
|
||||
*/
|
||||
/* For the standard odd/even */
|
||||
tr.odd td.sorting_1 {
|
||||
background-color: #D3D6FF;
|
||||
}
|
||||
|
||||
tr.odd td.sorting_2 {
|
||||
background-color: #DADCFF;
|
||||
}
|
||||
|
||||
tr.odd td.sorting_3 {
|
||||
background-color: #E0E2FF;
|
||||
}
|
||||
|
||||
tr.even td.sorting_1 {
|
||||
background-color: #EAEBFF;
|
||||
}
|
||||
|
||||
tr.even td.sorting_2 {
|
||||
background-color: #F2F3FF;
|
||||
}
|
||||
|
||||
tr.even td.sorting_3 {
|
||||
background-color: #F9F9FF;
|
||||
}
|
||||
|
||||
|
||||
/* For the Conditional-CSS grading rows */
|
||||
/*
|
||||
Colour calculations (based off the main row colours)
|
||||
Level 1:
|
||||
dd > c4
|
||||
ee > d5
|
||||
Level 2:
|
||||
dd > d1
|
||||
ee > e2
|
||||
*/
|
||||
tr.odd.gradeA td.sorting_1 {
|
||||
background-color: #c4ffc4;
|
||||
}
|
||||
|
||||
tr.odd.gradeA td.sorting_2 {
|
||||
background-color: #d1ffd1;
|
||||
}
|
||||
|
||||
tr.odd.gradeA td.sorting_3 {
|
||||
background-color: #d1ffd1;
|
||||
}
|
||||
|
||||
tr.even.gradeA td.sorting_1 {
|
||||
background-color: #d5ffd5;
|
||||
}
|
||||
|
||||
tr.even.gradeA td.sorting_2 {
|
||||
background-color: #e2ffe2;
|
||||
}
|
||||
|
||||
tr.even.gradeA td.sorting_3 {
|
||||
background-color: #e2ffe2;
|
||||
}
|
||||
|
||||
tr.odd.gradeC td.sorting_1 {
|
||||
background-color: #c4c4ff;
|
||||
}
|
||||
|
||||
tr.odd.gradeC td.sorting_2 {
|
||||
background-color: #d1d1ff;
|
||||
}
|
||||
|
||||
tr.odd.gradeC td.sorting_3 {
|
||||
background-color: #d1d1ff;
|
||||
}
|
||||
|
||||
tr.even.gradeC td.sorting_1 {
|
||||
background-color: #d5d5ff;
|
||||
}
|
||||
|
||||
tr.even.gradeC td.sorting_2 {
|
||||
background-color: #e2e2ff;
|
||||
}
|
||||
|
||||
tr.even.gradeC td.sorting_3 {
|
||||
background-color: #e2e2ff;
|
||||
}
|
||||
|
||||
tr.odd.gradeX td.sorting_1 {
|
||||
background-color: #ffc4c4;
|
||||
}
|
||||
|
||||
tr.odd.gradeX td.sorting_2 {
|
||||
background-color: #ffd1d1;
|
||||
}
|
||||
|
||||
tr.odd.gradeX td.sorting_3 {
|
||||
background-color: #ffd1d1;
|
||||
}
|
||||
|
||||
tr.even.gradeX td.sorting_1 {
|
||||
background-color: #ffd5d5;
|
||||
}
|
||||
|
||||
tr.even.gradeX td.sorting_2 {
|
||||
background-color: #ffe2e2;
|
||||
}
|
||||
|
||||
tr.even.gradeX td.sorting_3 {
|
||||
background-color: #ffe2e2;
|
||||
}
|
||||
|
||||
tr.odd.gradeU td.sorting_1 {
|
||||
background-color: #c4c4c4;
|
||||
}
|
||||
|
||||
tr.odd.gradeU td.sorting_2 {
|
||||
background-color: #d1d1d1;
|
||||
}
|
||||
|
||||
tr.odd.gradeU td.sorting_3 {
|
||||
background-color: #d1d1d1;
|
||||
}
|
||||
|
||||
tr.even.gradeU td.sorting_1 {
|
||||
background-color: #d5d5d5;
|
||||
}
|
||||
|
||||
tr.even.gradeU td.sorting_2 {
|
||||
background-color: #e2e2e2;
|
||||
}
|
||||
|
||||
tr.even.gradeU td.sorting_3 {
|
||||
background-color: #e2e2e2;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Row highlighting example
|
||||
*/
|
||||
.ex_highlight #example tbody tr.even:hover, #example tbody tr.even td.highlighted {
|
||||
background-color: #ECFFB3;
|
||||
}
|
||||
|
||||
.ex_highlight #example tbody tr.odd:hover, #example tbody tr.odd td.highlighted {
|
||||
background-color: #E6FF99;
|
||||
}
|
||||
|
||||
.ex_highlight_row #example tr.even:hover {
|
||||
background-color: #ECFFB3;
|
||||
}
|
||||
|
||||
.ex_highlight_row #example tr.even:hover td.sorting_1 {
|
||||
background-color: #DDFF75;
|
||||
}
|
||||
|
||||
.ex_highlight_row #example tr.even:hover td.sorting_2 {
|
||||
background-color: #E7FF9E;
|
||||
}
|
||||
|
||||
.ex_highlight_row #example tr.even:hover td.sorting_3 {
|
||||
background-color: #E2FF89;
|
||||
}
|
||||
|
||||
.ex_highlight_row #example tr.odd:hover {
|
||||
background-color: #E6FF99;
|
||||
}
|
||||
|
||||
.ex_highlight_row #example tr.odd:hover td.sorting_1 {
|
||||
background-color: #D6FF5C;
|
||||
}
|
||||
|
||||
.ex_highlight_row #example tr.odd:hover td.sorting_2 {
|
||||
background-color: #E0FF84;
|
||||
}
|
||||
|
||||
.ex_highlight_row #example tr.odd:hover td.sorting_3 {
|
||||
background-color: #DBFF70;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* KeyTable
|
||||
*/
|
||||
table.KeyTable td {
|
||||
border: 3px solid transparent;
|
||||
}
|
||||
|
||||
table.KeyTable td.focus {
|
||||
border: 3px solid #3366FF;
|
||||
}
|
||||
|
||||
table.display tr.gradeA {
|
||||
background-color: #eeffee;
|
||||
}
|
||||
|
||||
table.display tr.gradeC {
|
||||
background-color: #ddddff;
|
||||
}
|
||||
|
||||
table.display tr.gradeX {
|
||||
background-color: #ffdddd;
|
||||
}
|
||||
|
||||
table.display tr.gradeU {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
div.box {
|
||||
height: 100px;
|
||||
padding: 10px;
|
||||
overflow: auto;
|
||||
border: 1px solid #8080FF;
|
||||
background-color: #E5E5FF;
|
||||
}
|
|
@ -1,513 +0,0 @@
|
|||
/*
|
||||
* File: demo_table_jui.css
|
||||
* CVS: $Id$
|
||||
* Description: CSS descriptions for DataTables demo pages
|
||||
* Author: Allan Jardine
|
||||
* Created: Tue May 12 06:47:22 BST 2009
|
||||
* Modified: $Date$ by $Author$
|
||||
* Language: CSS
|
||||
* Project: DataTables
|
||||
*
|
||||
* Copyright 2009 Allan Jardine. All Rights Reserved.
|
||||
*
|
||||
* ***************************************************************************
|
||||
* DESCRIPTION
|
||||
*
|
||||
* The styles given here are suitable for the demos that are used with the standard DataTables
|
||||
* distribution (see www.datatables.net). You will most likely wish to modify these styles to
|
||||
* meet the layout requirements of your site.
|
||||
*
|
||||
* Common issues:
|
||||
* 'full_numbers' pagination - I use an extra selector on the body tag to ensure that there is
|
||||
* no conflict between the two pagination types. If you want to use full_numbers pagination
|
||||
* ensure that you either have "example_alt_pagination" as a body class name, or better yet,
|
||||
* modify that selector.
|
||||
* Note that the path used for Images is relative. All images are by default located in
|
||||
* ../images/ - relative to this CSS file.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* jQuery UI specific styling
|
||||
*/
|
||||
|
||||
.paging_two_button .ui-button {
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
* cursor: hand;
|
||||
}
|
||||
|
||||
.paging_full_numbers .ui-button {
|
||||
padding: 2px 6px;
|
||||
margin: 0;
|
||||
cursor: pointer;
|
||||
* cursor: hand;
|
||||
}
|
||||
|
||||
.ui-buttonset .ui-button {
|
||||
margin-right: -0.1em !important;
|
||||
}
|
||||
|
||||
.paging_full_numbers {
|
||||
width: 350px !important;
|
||||
}
|
||||
|
||||
.ui-toolbar {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.dataTables_paginate {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.dataTables_info {
|
||||
padding-top: 3px;
|
||||
}
|
||||
|
||||
table.display thead th {
|
||||
padding: 3px 0px 3px 10px;
|
||||
cursor: pointer;
|
||||
* cursor: hand;
|
||||
}
|
||||
|
||||
div.dataTables_wrapper .ui-widget-header {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Sort arrow icon positioning
|
||||
*/
|
||||
table.display thead th div.DataTables_sort_wrapper {
|
||||
position: relative;
|
||||
padding-right: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
table.display thead th div.DataTables_sort_wrapper span {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -8px;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* Everything below this line is the same as demo_table.css. This file is
|
||||
* required for 'cleanliness' of the markup
|
||||
*
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* DataTables features
|
||||
*/
|
||||
|
||||
.dataTables_wrapper {
|
||||
position: relative;
|
||||
min-height: 302px;
|
||||
_height: 302px;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.dataTables_processing {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 50%;
|
||||
width: 250px;
|
||||
margin-left: -125px;
|
||||
border: 1px solid #ddd;
|
||||
text-align: center;
|
||||
color: #999;
|
||||
font-size: 11px;
|
||||
padding: 2px 0;
|
||||
}
|
||||
|
||||
.dataTables_length {
|
||||
width: 40%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.dataTables_filter {
|
||||
width: 50%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.dataTables_info {
|
||||
width: 50%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.dataTables_paginate {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* Pagination nested */
|
||||
.paginate_disabled_previous, .paginate_enabled_previous, .paginate_disabled_next, .paginate_enabled_next {
|
||||
height: 19px;
|
||||
width: 19px;
|
||||
margin-left: 3px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.paginate_disabled_previous {
|
||||
background-image: url('../images/back_disabled.jpg');
|
||||
}
|
||||
|
||||
.paginate_enabled_previous {
|
||||
background-image: url('../images/back_enabled.jpg');
|
||||
}
|
||||
|
||||
.paginate_disabled_next {
|
||||
background-image: url('../images/forward_disabled.jpg');
|
||||
}
|
||||
|
||||
.paginate_enabled_next {
|
||||
background-image: url('../images/forward_enabled.jpg');
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* DataTables display
|
||||
*/
|
||||
table.display {
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
clear: both;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table.display tfoot th {
|
||||
padding: 3px 0px 3px 10px;
|
||||
font-weight: bold;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
table.display tr.heading2 td {
|
||||
border-bottom: 1px solid #aaa;
|
||||
}
|
||||
|
||||
table.display td {
|
||||
padding: 3px 10px;
|
||||
}
|
||||
|
||||
table.display td.center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* DataTables sorting
|
||||
*/
|
||||
|
||||
.sorting_asc {
|
||||
background: url('../images/sort_asc.jpg') no-repeat center right;
|
||||
}
|
||||
|
||||
.sorting_desc {
|
||||
background: url('../images/sort_desc.jpg') no-repeat center right;
|
||||
}
|
||||
|
||||
.sorting {
|
||||
background: url('../images/sort_both.jpg') no-repeat center right;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* DataTables row classes
|
||||
*/
|
||||
table.display tr.odd.gradeA {
|
||||
background-color: #ddffdd;
|
||||
}
|
||||
|
||||
table.display tr.even.gradeA {
|
||||
background-color: #eeffee;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
table.display tr.odd.gradeA {
|
||||
background-color: #ddffdd;
|
||||
}
|
||||
|
||||
table.display tr.even.gradeA {
|
||||
background-color: #eeffee;
|
||||
}
|
||||
|
||||
table.display tr.odd.gradeC {
|
||||
background-color: #ddddff;
|
||||
}
|
||||
|
||||
table.display tr.even.gradeC {
|
||||
background-color: #eeeeff;
|
||||
}
|
||||
|
||||
table.display tr.odd.gradeX {
|
||||
background-color: #ffdddd;
|
||||
}
|
||||
|
||||
table.display tr.even.gradeX {
|
||||
background-color: #ffeeee;
|
||||
}
|
||||
|
||||
table.display tr.odd.gradeU {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
table.display tr.even.gradeU {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
|
||||
tr.odd {
|
||||
background-color: #E2E4FF;
|
||||
}
|
||||
|
||||
tr.even {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Misc
|
||||
*/
|
||||
.dataTables_scroll {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.top, .bottom {
|
||||
padding: 15px;
|
||||
background-color: #F5F5F5;
|
||||
border: 1px solid #CCCCCC;
|
||||
}
|
||||
|
||||
.top .dataTables_info {
|
||||
float: none;
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.dataTables_empty {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
tfoot input {
|
||||
margin: 0.5em 0;
|
||||
width: 100%;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
tfoot input.search_init {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
td.group {
|
||||
background-color: #d1cfd0;
|
||||
border-bottom: 2px solid #A19B9E;
|
||||
border-top: 2px solid #A19B9E;
|
||||
}
|
||||
|
||||
td.details {
|
||||
background-color: #d1cfd0;
|
||||
border: 2px solid #A19B9E;
|
||||
}
|
||||
|
||||
|
||||
.example_alt_pagination div.dataTables_info {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.paging_full_numbers span.paginate_button,
|
||||
.paging_full_numbers span.paginate_active {
|
||||
border: 1px solid #aaa;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
padding: 2px 5px;
|
||||
margin: 0 3px;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
}
|
||||
|
||||
.paging_full_numbers span.paginate_button {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.paging_full_numbers span.paginate_button:hover {
|
||||
background-color: #ccc;
|
||||
}
|
||||
|
||||
.paging_full_numbers span.paginate_active {
|
||||
background-color: #99B3FF;
|
||||
}
|
||||
|
||||
table.display tr.even.row_selected td {
|
||||
background-color: #B0BED9;
|
||||
}
|
||||
|
||||
table.display tr.odd.row_selected td {
|
||||
background-color: #9FAFD1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Sorting classes for columns
|
||||
*/
|
||||
/* For the standard odd/even */
|
||||
tr.odd td.sorting_1 {
|
||||
background-color: #D3D6FF;
|
||||
}
|
||||
|
||||
tr.odd td.sorting_2 {
|
||||
background-color: #DADCFF;
|
||||
}
|
||||
|
||||
tr.odd td.sorting_3 {
|
||||
background-color: #E0E2FF;
|
||||
}
|
||||
|
||||
tr.even td.sorting_1 {
|
||||
background-color: #EAEBFF;
|
||||
}
|
||||
|
||||
tr.even td.sorting_2 {
|
||||
background-color: #F2F3FF;
|
||||
}
|
||||
|
||||
tr.even td.sorting_3 {
|
||||
background-color: #F9F9FF;
|
||||
}
|
||||
|
||||
|
||||
/* For the Conditional-CSS grading rows */
|
||||
/*
|
||||
Colour calculations (based off the main row colours)
|
||||
Level 1:
|
||||
dd > c4
|
||||
ee > d5
|
||||
Level 2:
|
||||
dd > d1
|
||||
ee > e2
|
||||
*/
|
||||
tr.odd.gradeA td.sorting_1 {
|
||||
background-color: #c4ffc4;
|
||||
}
|
||||
|
||||
tr.odd.gradeA td.sorting_2 {
|
||||
background-color: #d1ffd1;
|
||||
}
|
||||
|
||||
tr.odd.gradeA td.sorting_3 {
|
||||
background-color: #d1ffd1;
|
||||
}
|
||||
|
||||
tr.even.gradeA td.sorting_1 {
|
||||
background-color: #d5ffd5;
|
||||
}
|
||||
|
||||
tr.even.gradeA td.sorting_2 {
|
||||
background-color: #e2ffe2;
|
||||
}
|
||||
|
||||
tr.even.gradeA td.sorting_3 {
|
||||
background-color: #e2ffe2;
|
||||
}
|
||||
|
||||
tr.odd.gradeC td.sorting_1 {
|
||||
background-color: #c4c4ff;
|
||||
}
|
||||
|
||||
tr.odd.gradeC td.sorting_2 {
|
||||
background-color: #d1d1ff;
|
||||
}
|
||||
|
||||
tr.odd.gradeC td.sorting_3 {
|
||||
background-color: #d1d1ff;
|
||||
}
|
||||
|
||||
tr.even.gradeC td.sorting_1 {
|
||||
background-color: #d5d5ff;
|
||||
}
|
||||
|
||||
tr.even.gradeC td.sorting_2 {
|
||||
background-color: #e2e2ff;
|
||||
}
|
||||
|
||||
tr.even.gradeC td.sorting_3 {
|
||||
background-color: #e2e2ff;
|
||||
}
|
||||
|
||||
tr.odd.gradeX td.sorting_1 {
|
||||
background-color: #ffc4c4;
|
||||
}
|
||||
|
||||
tr.odd.gradeX td.sorting_2 {
|
||||
background-color: #ffd1d1;
|
||||
}
|
||||
|
||||
tr.odd.gradeX td.sorting_3 {
|
||||
background-color: #ffd1d1;
|
||||
}
|
||||
|
||||
tr.even.gradeX td.sorting_1 {
|
||||
background-color: #ffd5d5;
|
||||
}
|
||||
|
||||
tr.even.gradeX td.sorting_2 {
|
||||
background-color: #ffe2e2;
|
||||
}
|
||||
|
||||
tr.even.gradeX td.sorting_3 {
|
||||
background-color: #ffe2e2;
|
||||
}
|
||||
|
||||
tr.odd.gradeU td.sorting_1 {
|
||||
background-color: #c4c4c4;
|
||||
}
|
||||
|
||||
tr.odd.gradeU td.sorting_2 {
|
||||
background-color: #d1d1d1;
|
||||
}
|
||||
|
||||
tr.odd.gradeU td.sorting_3 {
|
||||
background-color: #d1d1d1;
|
||||
}
|
||||
|
||||
tr.even.gradeU td.sorting_1 {
|
||||
background-color: #d5d5d5;
|
||||
}
|
||||
|
||||
tr.even.gradeU td.sorting_2 {
|
||||
background-color: #e2e2e2;
|
||||
}
|
||||
|
||||
tr.even.gradeU td.sorting_3 {
|
||||
background-color: #e2e2e2;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Row highlighting example
|
||||
*/
|
||||
.ex_highlight #example tbody tr.even:hover, #example tbody tr.even td.highlighted {
|
||||
background-color: #ECFFB3;
|
||||
}
|
||||
|
||||
.ex_highlight #example tbody tr.odd:hover, #example tbody tr.odd td.highlighted {
|
||||
background-color: #E6FF99;
|
||||
}
|
|
@ -0,0 +1,219 @@
|
|||
|
||||
/*
|
||||
* Table
|
||||
*/
|
||||
table.dataTable {
|
||||
margin: 0 auto;
|
||||
clear: both;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table.dataTable thead th {
|
||||
padding: 3px 18px 3px 10px;
|
||||
border-bottom: 1px solid black;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
}
|
||||
|
||||
table.dataTable tfoot th {
|
||||
padding: 3px 18px 3px 10px;
|
||||
border-top: 1px solid black;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
table.dataTable td {
|
||||
padding: 3px 10px;
|
||||
}
|
||||
|
||||
table.dataTable td.center,
|
||||
table.dataTable td.dataTables_empty {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
table.dataTable tr.odd { background-color: #E2E4FF; }
|
||||
table.dataTable tr.even { background-color: white; }
|
||||
|
||||
table.dataTable tr.odd td.sorting_1 { background-color: #D3D6FF; }
|
||||
table.dataTable tr.odd td.sorting_2 { background-color: #DADCFF; }
|
||||
table.dataTable tr.odd td.sorting_3 { background-color: #E0E2FF; }
|
||||
table.dataTable tr.even td.sorting_1 { background-color: #EAEBFF; }
|
||||
table.dataTable tr.even td.sorting_2 { background-color: #F2F3FF; }
|
||||
table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; }
|
||||
|
||||
|
||||
/*
|
||||
* Table wrapper
|
||||
*/
|
||||
.dataTables_wrapper {
|
||||
position: relative;
|
||||
clear: both;
|
||||
*zoom: 1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Page length menu
|
||||
*/
|
||||
.dataTables_length {
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Filter
|
||||
*/
|
||||
.dataTables_filter {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Table information
|
||||
*/
|
||||
.dataTables_info {
|
||||
clear: both;
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Pagination
|
||||
*/
|
||||
.dataTables_paginate {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* Two button pagination - previous / next */
|
||||
.paginate_disabled_previous,
|
||||
.paginate_enabled_previous,
|
||||
.paginate_disabled_next,
|
||||
.paginate_enabled_next {
|
||||
height: 19px;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
color: #111 !important;
|
||||
}
|
||||
.paginate_disabled_previous:hover,
|
||||
.paginate_enabled_previous:hover,
|
||||
.paginate_disabled_next:hover,
|
||||
.paginate_enabled_next:hover {
|
||||
text-decoration: none !important;
|
||||
}
|
||||
.paginate_disabled_previous:active,
|
||||
.paginate_enabled_previous:active,
|
||||
.paginate_disabled_next:active,
|
||||
.paginate_enabled_next:active {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.paginate_disabled_previous,
|
||||
.paginate_disabled_next {
|
||||
color: #666 !important;
|
||||
}
|
||||
.paginate_disabled_previous,
|
||||
.paginate_enabled_previous {
|
||||
padding-left: 23px;
|
||||
}
|
||||
.paginate_disabled_next,
|
||||
.paginate_enabled_next {
|
||||
padding-right: 23px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.paginate_enabled_previous { background: url('../images/back_enabled.png') no-repeat top left; }
|
||||
.paginate_enabled_previous:hover { background: url('../images/back_enabled_hover.png') no-repeat top left; }
|
||||
.paginate_disabled_previous { background: url('../images/back_disabled.png') no-repeat top left; }
|
||||
|
||||
.paginate_enabled_next { background: url('../images/forward_enabled.png') no-repeat top right; }
|
||||
.paginate_enabled_next:hover { background: url('../images/forward_enabled_hover.png') no-repeat top right; }
|
||||
.paginate_disabled_next { background: url('../images/forward_disabled.png') no-repeat top right; }
|
||||
|
||||
/* Full number pagination */
|
||||
.paging_full_numbers {
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
}
|
||||
.paging_full_numbers a:active {
|
||||
outline: none
|
||||
}
|
||||
.paging_full_numbers a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.paging_full_numbers a.paginate_button,
|
||||
.paging_full_numbers a.paginate_active {
|
||||
border: 1px solid #aaa;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
padding: 2px 5px;
|
||||
margin: 0 3px;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
color: #333 !important;
|
||||
}
|
||||
|
||||
.paging_full_numbers a.paginate_button {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.paging_full_numbers a.paginate_button:hover {
|
||||
background-color: #ccc;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
.paging_full_numbers a.paginate_active {
|
||||
background-color: #99B3FF;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Processing indicator
|
||||
*/
|
||||
.dataTables_processing {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 250px;
|
||||
height: 30px;
|
||||
margin-left: -125px;
|
||||
margin-top: -15px;
|
||||
padding: 14px 0 2px 0;
|
||||
border: 1px solid #ddd;
|
||||
text-align: center;
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Sorting
|
||||
*/
|
||||
.sorting { background: url('../images/sort_both.png') no-repeat center right; }
|
||||
.sorting_asc { background: url('../images/sort_asc.png') no-repeat center right; }
|
||||
.sorting_desc { background: url('../images/sort_desc.png') no-repeat center right; }
|
||||
|
||||
.sorting_asc_disabled { background: url('../images/sort_asc_disabled.png') no-repeat center right; }
|
||||
.sorting_desc_disabled { background: url('../images/sort_desc_disabled.png') no-repeat center right; }
|
||||
|
||||
table.dataTable th:active {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Scrolling
|
||||
*/
|
||||
.dataTables_scroll {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody {
|
||||
*margin-top: -1px;
|
||||
}
|
||||
|
|
@ -0,0 +1,243 @@
|
|||
|
||||
|
||||
/*
|
||||
* Table
|
||||
*/
|
||||
table.dataTable {
|
||||
margin: 0 auto;
|
||||
clear: both;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table.dataTable thead th {
|
||||
padding: 3px 0px 3px 10px;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
}
|
||||
|
||||
table.dataTable tfoot th {
|
||||
padding: 3px 10px;
|
||||
}
|
||||
|
||||
table.dataTable td {
|
||||
padding: 3px 10px;
|
||||
}
|
||||
|
||||
table.dataTable td.center,
|
||||
table.dataTable td.dataTables_empty {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
table.dataTable tr.odd { background-color: #E2E4FF; }
|
||||
table.dataTable tr.even { background-color: white; }
|
||||
|
||||
table.dataTable tr.odd td.sorting_1 { background-color: #D3D6FF; }
|
||||
table.dataTable tr.odd td.sorting_2 { background-color: #DADCFF; }
|
||||
table.dataTable tr.odd td.sorting_3 { background-color: #E0E2FF; }
|
||||
table.dataTable tr.even td.sorting_1 { background-color: #EAEBFF; }
|
||||
table.dataTable tr.even td.sorting_2 { background-color: #F2F3FF; }
|
||||
table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; }
|
||||
|
||||
|
||||
/*
|
||||
* Table wrapper
|
||||
*/
|
||||
.dataTables_wrapper {
|
||||
position: relative;
|
||||
clear: both;
|
||||
*zoom: 1;
|
||||
}
|
||||
.dataTables_wrapper .ui-widget-header {
|
||||
font-weight: normal;
|
||||
}
|
||||
.dataTables_wrapper .ui-toolbar {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Page length menu
|
||||
*/
|
||||
.dataTables_length {
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Filter
|
||||
*/
|
||||
.dataTables_filter {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Table information
|
||||
*/
|
||||
.dataTables_info {
|
||||
padding-top: 3px;
|
||||
clear: both;
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Pagination
|
||||
*/
|
||||
.dataTables_paginate {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.dataTables_paginate .ui-button {
|
||||
margin-right: -0.1em !important;
|
||||
}
|
||||
|
||||
.paging_two_button .ui-button {
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
* cursor: hand;
|
||||
}
|
||||
|
||||
.paging_full_numbers .ui-button {
|
||||
padding: 2px 6px;
|
||||
margin: 0;
|
||||
cursor: pointer;
|
||||
* cursor: hand;
|
||||
color: #333 !important;
|
||||
}
|
||||
|
||||
/* Two button pagination - previous / next */
|
||||
.paginate_disabled_previous,
|
||||
.paginate_enabled_previous,
|
||||
.paginate_disabled_next,
|
||||
.paginate_enabled_next {
|
||||
height: 19px;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
color: #111 !important;
|
||||
}
|
||||
.paginate_disabled_previous:hover,
|
||||
.paginate_enabled_previous:hover,
|
||||
.paginate_disabled_next:hover,
|
||||
.paginate_enabled_next:hover {
|
||||
text-decoration: none !important;
|
||||
}
|
||||
.paginate_disabled_previous:active,
|
||||
.paginate_enabled_previous:active,
|
||||
.paginate_disabled_next:active,
|
||||
.paginate_enabled_next:active {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.paginate_disabled_previous,
|
||||
.paginate_disabled_next {
|
||||
color: #666 !important;
|
||||
}
|
||||
.paginate_disabled_previous,
|
||||
.paginate_enabled_previous {
|
||||
padding-left: 23px;
|
||||
}
|
||||
.paginate_disabled_next,
|
||||
.paginate_enabled_next {
|
||||
padding-right: 23px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.paginate_enabled_previous { background: url('../images/back_enabled.png') no-repeat top left; }
|
||||
.paginate_enabled_previous:hover { background: url('../images/back_enabled_hover.png') no-repeat top left; }
|
||||
.paginate_disabled_previous { background: url('../images/back_disabled.png') no-repeat top left; }
|
||||
|
||||
.paginate_enabled_next { background: url('../images/forward_enabled.png') no-repeat top right; }
|
||||
.paginate_enabled_next:hover { background: url('../images/forward_enabled_hover.png') no-repeat top right; }
|
||||
.paginate_disabled_next { background: url('../images/forward_disabled.png') no-repeat top right; }
|
||||
|
||||
/* Full number pagination */
|
||||
.paging_full_numbers a:active {
|
||||
outline: none
|
||||
}
|
||||
.paging_full_numbers a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.paging_full_numbers a.paginate_button,
|
||||
.paging_full_numbers a.paginate_active {
|
||||
border: 1px solid #aaa;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
padding: 2px 5px;
|
||||
margin: 0 3px;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
color: #333 !important;
|
||||
}
|
||||
|
||||
.paging_full_numbers a.paginate_button {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.paging_full_numbers a.paginate_button:hover {
|
||||
background-color: #ccc;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
.paging_full_numbers a.paginate_active {
|
||||
background-color: #99B3FF;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Processing indicator
|
||||
*/
|
||||
.dataTables_processing {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 250px;
|
||||
height: 30px;
|
||||
margin-left: -125px;
|
||||
margin-top: -15px;
|
||||
padding: 14px 0 2px 0;
|
||||
border: 1px solid #ddd;
|
||||
text-align: center;
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Sorting
|
||||
*/
|
||||
table.dataTable thead th div.DataTables_sort_wrapper {
|
||||
position: relative;
|
||||
padding-right: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
table.dataTable thead th div.DataTables_sort_wrapper span {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -8px;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
table.dataTable th:active {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Scrolling
|
||||
*/
|
||||
.dataTables_scroll {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody {
|
||||
*margin-top: -1px;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 612 B |
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 807 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 635 B |
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 852 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 263 B After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 252 B After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 282 B After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 251 B After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 309 B |
After Width: | Height: | Size: 648 B |
After Width: | Height: | Size: 536 B |
After Width: | Height: | Size: 412 B |
After Width: | Height: | Size: 618 B |
After Width: | Height: | Size: 620 B |
|
@ -1,28 +0,0 @@
|
|||
/*
|
||||
* Timepicker stylesheet
|
||||
* Highly inspired from datepicker
|
||||
* FG - Nov 2010 - Web3R
|
||||
*
|
||||
* version 0.0.3 : Fixed some settings, more dynamic
|
||||
* version 0.0.4 : Removed width:100% on tables
|
||||
*/
|
||||
|
||||
.ui-timepicker-inline { display: inline }
|
||||
|
||||
#ui-timepicker-div { padding: 0.2em; z-index: 10 !important }
|
||||
.ui-timepicker-table { display: inline-table }
|
||||
.ui-timepicker-table table { margin:0.15em 0 0 0; border-collapse: collapse; }
|
||||
|
||||
.ui-timepicker-hours, .ui-timepicker-minutes { padding: 0.2em; }
|
||||
|
||||
.ui-timepicker-table .ui-timepicker-title { line-height: 1.8em; text-align: center; }
|
||||
.ui-timepicker-table td { padding: 0.1em; width: 2.2em; }
|
||||
.ui-timepicker-table th.periods { padding: 0.1em; width: 2.2em; }
|
||||
.ui-timepicker-table td a {
|
||||
display:block;
|
||||
padding:0.2em 0.3em 0.2em 0.5em;
|
||||
width: 1.2em;
|
||||
|
||||
text-align:right;
|
||||
text-decoration:none;
|
||||
}
|
|
@ -0,0 +1,135 @@
|
|||
/*
|
||||
* jQuery contextMenu - Plugin for simple contextMenu handling
|
||||
*
|
||||
* Version: 1.5.2
|
||||
*
|
||||
* Authors: Rodney Rehm, Addy Osmani (patches for FF)
|
||||
* Web: http://medialize.github.com/jQuery-contextMenu/
|
||||
*
|
||||
* Licensed under
|
||||
* MIT License http://www.opensource.org/licenses/mit-license
|
||||
* GPL v3 http://opensource.org/licenses/GPL-3.0
|
||||
*
|
||||
*/
|
||||
|
||||
.context-menu-list {
|
||||
margin:0;
|
||||
padding:0;
|
||||
|
||||
min-width: 120px;
|
||||
max-width: 250px;
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
list-style-type: none;
|
||||
|
||||
border: 1px solid #DDD;
|
||||
background: #EEE;
|
||||
|
||||
-webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
-moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
-ms-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
-o-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
|
||||
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.context-menu-item {
|
||||
padding: 2px 2px 2px 28px;
|
||||
background-color: #EEE;
|
||||
position: relative;
|
||||
-moz-user-select: -moz-none;
|
||||
}
|
||||
|
||||
.context-menu-separator {
|
||||
padding-bottom:0;
|
||||
border-bottom: 1px solid #DDD;
|
||||
}
|
||||
|
||||
.context-menu-item > label {
|
||||
-moz-user-select: text;
|
||||
}
|
||||
|
||||
.context-menu-item.hover {
|
||||
cursor: pointer;
|
||||
background-color: #39F;
|
||||
}
|
||||
|
||||
.context-menu-item.disabled {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.context-menu-input.hover,
|
||||
.context-menu-item.disabled.hover {
|
||||
cursor: default;
|
||||
background-color: #EEE;
|
||||
}
|
||||
|
||||
.context-menu-submenu:after {
|
||||
content: ">";
|
||||
color: #666;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 3px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
/* icons
|
||||
#protip:
|
||||
In case you want to use sprites for icons (which I would suggest you do) have a look at
|
||||
http://css-tricks.com/13224-pseudo-spriting/ to get an idea of how to implement
|
||||
.context-menu-item.icon:before {}
|
||||
*/
|
||||
.context-menu-item.icon { min-height: 18px; background-repeat: no-repeat; background-position: 4px 2px; }
|
||||
.context-menu-item.icon-edit { background-image: url(images/icon_edit.png); }
|
||||
.context-menu-item.icon-cut { background-image: url(images/icon_cut.png); }
|
||||
.context-menu-item.icon-copy { background-image: url(images/icon_copy.png); }
|
||||
.context-menu-item.icon-paste { background-image: url(images/icon_paste.png); }
|
||||
.context-menu-item.icon-delete { background-image: url(images/icon_delete.png); }
|
||||
.context-menu-item.icon-quit { background-image: url(images/icon_door.png); }
|
||||
.context-menu-item.icon-soundcloud { background-image: url(images/icon_soundcloud.png); }
|
||||
|
||||
/* vertically align inside labels */
|
||||
.context-menu-input > label > * { vertical-align: top; }
|
||||
|
||||
/* position checkboxes and radios as icons */
|
||||
.context-menu-input > label > input[type="checkbox"],
|
||||
.context-menu-input > label > input[type="radio"] {
|
||||
margin-left: -17px;
|
||||
}
|
||||
.context-menu-input > label > span {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.context-menu-input > label,
|
||||
.context-menu-input > label > input[type="text"],
|
||||
.context-menu-input > label > textarea,
|
||||
.context-menu-input > label > select {
|
||||
display: block;
|
||||
width: 100%;
|
||||
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
-o-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.context-menu-input > label > textarea {
|
||||
height: 100px;
|
||||
}
|
||||
.context-menu-item > .context-menu-list {
|
||||
display: none;
|
||||
/* re-positioned by js */
|
||||
right: -5px;
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
.context-menu-item.hover > .context-menu-list {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.context-menu-accesskey {
|
||||
text-decoration: underline;
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* Timepicker stylesheet
|
||||
* Highly inspired from datepicker
|
||||
* FG - Nov 2010 - Web3R
|
||||
*
|
||||
* version 0.0.3 : Fixed some settings, more dynamic
|
||||
* version 0.0.4 : Removed width:100% on tables
|
||||
* version 0.1.1 : set width 0 on tables to fix an ie6 bug
|
||||
*/
|
||||
|
||||
.ui-timepicker-inline { display: inline; }
|
||||
|
||||
#ui-timepicker-div { padding: 0.2em }
|
||||
.ui-timepicker-table { display: inline-table; width: 0; }
|
||||
.ui-timepicker-table table { margin:0.15em 0 0 0; border-collapse: collapse; }
|
||||
|
||||
.ui-timepicker-hours, .ui-timepicker-minutes { padding: 0.2em; }
|
||||
|
||||
.ui-timepicker-table .ui-timepicker-title { line-height: 1.8em; text-align: center; }
|
||||
.ui-timepicker-table td { padding: 0.1em; width: 2.2em; }
|
||||
.ui-timepicker-table th.periods { padding: 0.1em; width: 2.2em; }
|
||||
|
||||
/* span for disabled cells */
|
||||
.ui-timepicker-table td span {
|
||||
display:block;
|
||||
padding:0.2em 0.3em 0.2em 0.5em;
|
||||
width: 1.2em;
|
||||
|
||||
text-align:right;
|
||||
text-decoration:none;
|
||||
}
|
||||
/* anchors for clickable cells */
|
||||
.ui-timepicker-table td a {
|
||||
display:block;
|
||||
padding:0.2em 0.3em 0.2em 0.5em;
|
||||
width: 1.2em;
|
||||
cursor: pointer;
|
||||
text-align:right;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
|
||||
/* buttons and button pane styling */
|
||||
.ui-timepicker .ui-timepicker-buttonpane {
|
||||
background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0;
|
||||
}
|
||||
.ui-timepicker .ui-timepicker-buttonpane button { margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
||||
/* The close button */
|
||||
.ui-timepicker .ui-timepicker-close { float: right }
|
||||
|
||||
/* the now button */
|
||||
.ui-timepicker .ui-timepicker-now { float: left; }
|
||||
|
||||
/* the deselect button */
|
||||
.ui-timepicker .ui-timepicker-deselect { float: left; }
|
||||
|
||||
|
||||
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
||||
.ui-timepicker-cover {
|
||||
display: none; /*sorry for IE5*/
|
||||
display/**/: block; /*sorry for IE5*/
|
||||
position: absolute; /*must have*/
|
||||
z-index: -1; /*must have*/
|
||||
filter: mask(); /*must have*/
|
||||
top: -4px; /*must have*/
|
||||
left: -4px; /*must have*/
|
||||
width: 200px; /*must have*/
|
||||
height: 200px; /*must have*/
|
||||
}
|
|
@ -0,0 +1,557 @@
|
|||
/*
|
||||
* qTip2 - Pretty powerful tooltips
|
||||
* http://craigsworks.com/projects/qtip2/
|
||||
*
|
||||
* Version: nightly
|
||||
* Copyright 2009-2010 Craig Michael Thompson - http://craigsworks.com
|
||||
*
|
||||
* Dual licensed under MIT or GPLv2 licenses
|
||||
* http://en.wikipedia.org/wiki/MIT_License
|
||||
* http://en.wikipedia.org/wiki/GNU_General_Public_License
|
||||
*
|
||||
* Date: Tue Jan 31 10:16:34.0000000000 2012
|
||||
*/
|
||||
|
||||
/* Core qTip styles */
|
||||
.ui-tooltip, .qtip{
|
||||
position: absolute;
|
||||
left: -28000px;
|
||||
top: -28000px;
|
||||
display: none;
|
||||
|
||||
max-width: 600px;
|
||||
min-width: 50px;
|
||||
|
||||
font-size: 10.5px;
|
||||
line-height: 12px;
|
||||
}
|
||||
|
||||
/* Fluid class for determining actual width in IE */
|
||||
.ui-tooltip-fluid{
|
||||
display: block;
|
||||
visibility: hidden;
|
||||
position: static !important;
|
||||
float: left !important;
|
||||
}
|
||||
|
||||
.ui-tooltip-content{
|
||||
position: relative;
|
||||
padding: 5px 9px;
|
||||
overflow: hidden;
|
||||
|
||||
border: 1px solid #000001;
|
||||
|
||||
text-align: left;
|
||||
word-wrap: break-word;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.ui-tooltip-titlebar{
|
||||
position: relative;
|
||||
min-height: 14px;
|
||||
padding: 5px 35px 5px 10px;
|
||||
overflow: hidden;
|
||||
|
||||
border: 1px solid #000001;
|
||||
border-width: 1px 1px 0;
|
||||
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.ui-tooltip-titlebar + .ui-tooltip-content{ border-top-width: 0px !important; }
|
||||
|
||||
/*! Default close button class */
|
||||
.ui-tooltip-titlebar .ui-state-default{
|
||||
position: absolute;
|
||||
right: 4px;
|
||||
top: 50%;
|
||||
margin-top: -9px;
|
||||
|
||||
cursor: pointer;
|
||||
outline: medium none;
|
||||
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
* html .ui-tooltip-titlebar .ui-state-default{ top: 16px; } /* IE fix */
|
||||
|
||||
.ui-tooltip-titlebar .ui-icon,
|
||||
.ui-tooltip-icon .ui-icon{
|
||||
display: block;
|
||||
text-indent: -1000em;
|
||||
}
|
||||
|
||||
.ui-tooltip-icon, .ui-tooltip-icon .ui-icon{
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.ui-tooltip-icon .ui-icon{
|
||||
width: 18px;
|
||||
height: 14px;
|
||||
|
||||
text-align: center;
|
||||
text-indent: 0;
|
||||
font: normal bold 10px/13px Tahoma,sans-serif;
|
||||
|
||||
color: inherit;
|
||||
background: transparent none no-repeat -100em -100em;
|
||||
}
|
||||
|
||||
|
||||
/* Applied to 'focused' tooltips e.g. most recently displayed/interacted with */
|
||||
.ui-tooltip-focus{
|
||||
|
||||
}
|
||||
|
||||
/* Applied on hover of tooltips i.e. added/removed on mouseenter/mouseleave respectively */
|
||||
.ui-tooltip-hover{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*! Default tooltip style */
|
||||
.ui-tooltip-default .ui-tooltip-titlebar,
|
||||
.ui-tooltip-default .ui-tooltip-content{
|
||||
border-color: #F1D031;
|
||||
background-color: #FFFFA3;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.ui-tooltip-default .ui-tooltip-titlebar{
|
||||
background-color: #FFEF93;
|
||||
}
|
||||
|
||||
.ui-tooltip-default .ui-tooltip-icon{
|
||||
border-color: #CCC;
|
||||
background: #F1F1F1;
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.ui-tooltip-default .ui-tooltip-titlebar .ui-state-hover{
|
||||
border-color: #AAA;
|
||||
color: #111;
|
||||
}
|
||||
|
||||
/* Tips plugin */
|
||||
.ui-tooltip .ui-tooltip-tip{
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.ui-tooltip .ui-tooltip-tip,
|
||||
.ui-tooltip .ui-tooltip-tip *{
|
||||
position: absolute;
|
||||
|
||||
line-height: 0.1px !important;
|
||||
font-size: 0.1px !important;
|
||||
color: #123456;
|
||||
|
||||
background: transparent;
|
||||
border: 0px dashed transparent;
|
||||
}
|
||||
|
||||
.ui-tooltip .ui-tooltip-tip canvas{ top: 0; left: 0; }
|
||||
|
||||
|
||||
/* Modal plugin */
|
||||
#qtip-overlay{
|
||||
position: fixed;
|
||||
left: -10000em;
|
||||
top: -10000em;
|
||||
}
|
||||
|
||||
/* Applied to modals with show.modal.blur set to true */
|
||||
#qtip-overlay.blurs{ cursor: pointer; }
|
||||
|
||||
/* Change opacity of overlay here */
|
||||
#qtip-overlay div{
|
||||
position: absolute;
|
||||
left: 0; top: 0;
|
||||
width: 100%; height: 100%;
|
||||
|
||||
background-color: black;
|
||||
|
||||
opacity: 0.7;
|
||||
filter:alpha(opacity=70);
|
||||
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";
|
||||
}
|
||||
|
||||
/*! Light tooltip style */
|
||||
.ui-tooltip-light .ui-tooltip-titlebar,
|
||||
.ui-tooltip-light .ui-tooltip-content{
|
||||
border-color: #E2E2E2;
|
||||
color: #454545;
|
||||
}
|
||||
|
||||
.ui-tooltip-light .ui-tooltip-content{
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.ui-tooltip-light .ui-tooltip-titlebar{
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
|
||||
|
||||
/*! Dark tooltip style */
|
||||
.ui-tooltip-dark .ui-tooltip-titlebar,
|
||||
.ui-tooltip-dark .ui-tooltip-content{
|
||||
border-color: #303030;
|
||||
color: #f3f3f3;
|
||||
}
|
||||
|
||||
.ui-tooltip-dark .ui-tooltip-content{
|
||||
background-color: #505050;
|
||||
}
|
||||
|
||||
.ui-tooltip-dark .ui-tooltip-titlebar{
|
||||
background-color: #404040;
|
||||
}
|
||||
|
||||
.ui-tooltip-dark .ui-tooltip-icon{
|
||||
border-color: #444;
|
||||
}
|
||||
|
||||
.ui-tooltip-dark .ui-tooltip-titlebar .ui-state-hover{
|
||||
border-color: #303030;
|
||||
}
|
||||
|
||||
|
||||
/*! Cream tooltip style */
|
||||
.ui-tooltip-cream .ui-tooltip-titlebar,
|
||||
.ui-tooltip-cream .ui-tooltip-content{
|
||||
border-color: #F9E98E;
|
||||
color: #A27D35;
|
||||
}
|
||||
|
||||
.ui-tooltip-cream .ui-tooltip-content{
|
||||
background-color: #FBF7AA;
|
||||
}
|
||||
|
||||
.ui-tooltip-cream .ui-tooltip-titlebar{
|
||||
background-color: #F0DE7D;
|
||||
}
|
||||
|
||||
.ui-tooltip-cream .ui-state-default .ui-tooltip-icon{
|
||||
background-position: -82px 0;
|
||||
}
|
||||
|
||||
|
||||
/*! Red tooltip style */
|
||||
.ui-tooltip-red .ui-tooltip-titlebar,
|
||||
.ui-tooltip-red .ui-tooltip-content{
|
||||
border-color: #D95252;
|
||||
color: #912323;
|
||||
}
|
||||
|
||||
.ui-tooltip-red .ui-tooltip-content{
|
||||
background-color: #F78B83;
|
||||
}
|
||||
|
||||
.ui-tooltip-red .ui-tooltip-titlebar{
|
||||
background-color: #F06D65;
|
||||
}
|
||||
|
||||
.ui-tooltip-red .ui-state-default .ui-tooltip-icon{
|
||||
background-position: -102px 0;
|
||||
}
|
||||
|
||||
.ui-tooltip-red .ui-tooltip-icon{
|
||||
border-color: #D95252;
|
||||
}
|
||||
|
||||
.ui-tooltip-red .ui-tooltip-titlebar .ui-state-hover{
|
||||
border-color: #D95252;
|
||||
}
|
||||
|
||||
|
||||
/*! Green tooltip style */
|
||||
.ui-tooltip-green .ui-tooltip-titlebar,
|
||||
.ui-tooltip-green .ui-tooltip-content{
|
||||
border-color: #90D93F;
|
||||
color: #3F6219;
|
||||
}
|
||||
|
||||
.ui-tooltip-green .ui-tooltip-content{
|
||||
background-color: #CAED9E;
|
||||
}
|
||||
|
||||
.ui-tooltip-green .ui-tooltip-titlebar{
|
||||
background-color: #B0DE78;
|
||||
}
|
||||
|
||||
.ui-tooltip-green .ui-state-default .ui-tooltip-icon{
|
||||
background-position: -42px 0;
|
||||
}
|
||||
|
||||
|
||||
/*! Blue tooltip style */
|
||||
.ui-tooltip-blue .ui-tooltip-titlebar,
|
||||
.ui-tooltip-blue .ui-tooltip-content{
|
||||
border-color: #ADD9ED;
|
||||
color: #5E99BD;
|
||||
}
|
||||
|
||||
.ui-tooltip-blue .ui-tooltip-content{
|
||||
background-color: #E5F6FE;
|
||||
}
|
||||
|
||||
.ui-tooltip-blue .ui-tooltip-titlebar{
|
||||
background-color: #D0E9F5;
|
||||
}
|
||||
|
||||
.ui-tooltip-blue .ui-state-default .ui-tooltip-icon{
|
||||
background-position: -2px 0;
|
||||
}
|
||||
|
||||
/*! Add shadows to your tooltips in: FF3+, Chrome 2+, Opera 10.6+, IE6+, Safari 2+ */
|
||||
.ui-tooltip-shadow{
|
||||
-webkit-box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
|
||||
-moz-box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
|
||||
box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.ui-tooltip-shadow .ui-tooltip-titlebar,
|
||||
.ui-tooltip-shadow .ui-tooltip-content{
|
||||
filter: progid:DXImageTransform.Microsoft.Shadow(Color='gray', Direction=135, Strength=3);
|
||||
-ms-filter:"progid:DXImageTransform.Microsoft.Shadow(Color='gray', Direction=135, Strength=3)";
|
||||
|
||||
_margin-bottom: -3px; /* IE6 */
|
||||
.margin-bottom: -3px; /* IE7 */
|
||||
}
|
||||
|
||||
|
||||
/*! Add rounded corners to your tooltips in: FF3+, Chrome 2+, Opera 10.6+, IE9+, Safari 2+ */
|
||||
.ui-tooltip-rounded,
|
||||
.ui-tooltip-rounded .ui-tooltip-content,
|
||||
.ui-tooltip-tipsy,
|
||||
.ui-tooltip-tipsy .ui-tooltip-content,
|
||||
.ui-tooltip-youtube,
|
||||
.ui-tooltip-youtube .ui-tooltip-content{
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.ui-tooltip-rounded .ui-tooltip-titlebar,
|
||||
.ui-tooltip-tipsy .ui-tooltip-titlebar,
|
||||
.ui-tooltip-youtube .ui-tooltip-titlebar{
|
||||
-moz-border-radius: 5px 5px 0 0;
|
||||
-webkit-border-radius: 5px 5px 0 0;
|
||||
border-radius: 5px 5px 0 0;
|
||||
}
|
||||
|
||||
.ui-tooltip-rounded .ui-tooltip-titlebar + .ui-tooltip-content,
|
||||
.ui-tooltip-tipsy .ui-tooltip-titlebar + .ui-tooltip-content,
|
||||
.ui-tooltip-youtube .ui-tooltip-titlebar + .ui-tooltip-content{
|
||||
-moz-border-radius: 0 0 5px 5px;
|
||||
-webkit-border-radius: 0 0 5px 5px;
|
||||
border-radius: 0 0 5px 5px;
|
||||
}
|
||||
|
||||
|
||||
/*! Youtube tooltip style */
|
||||
.ui-tooltip-youtube{
|
||||
-webkit-box-shadow: 0 0 3px #333;
|
||||
-moz-box-shadow: 0 0 3px #333;
|
||||
box-shadow: 0 0 3px #333;
|
||||
}
|
||||
|
||||
.ui-tooltip-youtube .ui-tooltip-titlebar,
|
||||
.ui-tooltip-youtube .ui-tooltip-content{
|
||||
_margin-bottom: 0; /* IE6 */
|
||||
.margin-bottom: 0; /* IE7 */
|
||||
|
||||
background: transparent;
|
||||
background: rgba(0, 0, 0, 0.85);
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#D9000000,endColorstr=#D9000000);
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#D9000000,endColorstr=#D9000000)";
|
||||
|
||||
color: white;
|
||||
border-color: #CCCCCC;
|
||||
}
|
||||
|
||||
.ui-tooltip-youtube .ui-tooltip-icon{
|
||||
border-color: #222;
|
||||
}
|
||||
|
||||
.ui-tooltip-youtube .ui-tooltip-titlebar .ui-state-hover{
|
||||
border-color: #303030;
|
||||
}
|
||||
|
||||
|
||||
/* jQuery TOOLS Tooltip style */
|
||||
.ui-tooltip-jtools{
|
||||
background: #232323;
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
background-image: -moz-linear-gradient(top, #717171, #232323);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#717171), to(#232323));
|
||||
|
||||
border: 2px solid #ddd;
|
||||
border: 2px solid rgba(241,241,241,1);
|
||||
|
||||
-moz-border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
|
||||
-webkit-box-shadow: 0 0 12px #333;
|
||||
-moz-box-shadow: 0 0 12px #333;
|
||||
box-shadow: 0 0 12px #333;
|
||||
}
|
||||
|
||||
/* IE Specific */
|
||||
.ui-tooltip-jtools .ui-tooltip-titlebar{
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171,endColorstr=#4A4A4A);
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171,endColorstr=#4A4A4A)";
|
||||
}
|
||||
.ui-tooltip-jtools .ui-tooltip-content{
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A,endColorstr=#232323);
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A,endColorstr=#232323)";
|
||||
}
|
||||
|
||||
.ui-tooltip-jtools .ui-tooltip-titlebar,
|
||||
.ui-tooltip-jtools .ui-tooltip-content{
|
||||
background: transparent;
|
||||
color: white;
|
||||
border: 0 dashed transparent;
|
||||
}
|
||||
|
||||
.ui-tooltip-jtools .ui-tooltip-icon{
|
||||
border-color: #555;
|
||||
}
|
||||
|
||||
.ui-tooltip-jtools .ui-tooltip-titlebar .ui-state-hover{
|
||||
border-color: #333;
|
||||
}
|
||||
|
||||
|
||||
/* Cluetip style */
|
||||
.ui-tooltip-cluetip{
|
||||
-webkit-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
|
||||
-moz-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
|
||||
box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
.ui-tooltip-cluetip .ui-tooltip-titlebar{
|
||||
background-color: #87876A;
|
||||
color: white;
|
||||
border: 0 dashed transparent;
|
||||
}
|
||||
|
||||
.ui-tooltip-cluetip .ui-tooltip-content{
|
||||
background-color: #D9D9C2;
|
||||
color: #111;
|
||||
border: 0 dashed transparent;
|
||||
}
|
||||
|
||||
.ui-tooltip-cluetip .ui-tooltip-icon{
|
||||
border-color: #808064;
|
||||
}
|
||||
|
||||
.ui-tooltip-cluetip .ui-tooltip-titlebar .ui-state-hover{
|
||||
border-color: #696952;
|
||||
color: #696952;
|
||||
}
|
||||
|
||||
|
||||
/* Tipsy style */
|
||||
.ui-tooltip-tipsy{
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.ui-tooltip-tipsy .ui-tooltip-titlebar,
|
||||
.ui-tooltip-tipsy .ui-tooltip-content{
|
||||
_margin-bottom: 0; /* IE6 */
|
||||
.margin-bottom: 0; /* IE7 */
|
||||
|
||||
background: transparent;
|
||||
background: rgba(0, 0, 0, .87);
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#D9000000,endColorstr=#D9000000);
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#D9000000,endColorstr=#D9000000)";
|
||||
|
||||
color: white;
|
||||
border: 0px transparent;
|
||||
|
||||
font-size: 11px;
|
||||
font-family: 'Lucida Grande', sans-serif;
|
||||
font-weight: bold;
|
||||
line-height: 16px;
|
||||
text-shadow: 0 1px black;
|
||||
}
|
||||
|
||||
.ui-tooltip-tipsy .ui-tooltip-titlebar{
|
||||
padding: 6px 35px 0 10;
|
||||
}
|
||||
|
||||
.ui-tooltip-tipsy .ui-tooltip-content{
|
||||
padding: 6px 10;
|
||||
}
|
||||
|
||||
.ui-tooltip-tipsy .ui-tooltip-icon{
|
||||
border-color: #222;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.ui-tooltip-tipsy .ui-tooltip-titlebar .ui-state-hover{
|
||||
border-color: #303030;
|
||||
}
|
||||
|
||||
|
||||
/* Tipped style */
|
||||
.ui-tooltip-tipped{
|
||||
|
||||
}
|
||||
|
||||
.ui-tooltip-tipped .ui-tooltip-titlebar,
|
||||
.ui-tooltip-tipped .ui-tooltip-content{
|
||||
border: 3px solid #959FA9;
|
||||
|
||||
filter: none; -ms-filter: none;
|
||||
}
|
||||
|
||||
.ui-tooltip-tipped .ui-tooltip-titlebar{
|
||||
background: #3A79B8;
|
||||
background-image: -moz-linear-gradient(top, #3A79B8, #2E629D);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#3A79B8), to(#2E629D));
|
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8,endColorstr=#2E629D);
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8,endColorstr=#2E629D)";
|
||||
|
||||
color: white;
|
||||
font-weight: normal;
|
||||
font-family: serif;
|
||||
|
||||
border-bottom-width: 0;
|
||||
-moz-border-radius: 3px 3px 0 0;
|
||||
-webkit-border-radius: 3px 3px 0 0;
|
||||
border-radius: 3px 3px 0 0;
|
||||
}
|
||||
|
||||
.ui-tooltip-tipped .ui-tooltip-content{
|
||||
background-color: #F9F9F9;
|
||||
color: #454545;
|
||||
|
||||
-moz-border-radius: 0 0 3px 3px;
|
||||
-webkit-border-radius: 0 0 3px 3px;
|
||||
border-radius: 0 0 3px 3px;
|
||||
}
|
||||
|
||||
.ui-tooltip-tipped .ui-tooltip-icon{
|
||||
border: 2px solid #285589;
|
||||
background: #285589;
|
||||
}
|
||||
|
||||
.ui-tooltip-tipped .ui-tooltip-icon .ui-icon{
|
||||
background-color: #FBFBFB;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
/* IE9 fix - removes all filters */
|
||||
.ui-tooltip:not(.ie9haxors) div.ui-tooltip-content,
|
||||
.ui-tooltip:not(.ie9haxors) div.ui-tooltip-titlebar{
|
||||
filter: none;
|
||||
-ms-filter: none;
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
@CHARSET "UTF-8";
|
||||
|
||||
#show_builder > input.input_text {
|
||||
width:100px;
|
||||
}
|
|
@ -128,10 +128,10 @@ select {
|
|||
/* Info Tooltip Ends */
|
||||
|
||||
/* Clearfix */
|
||||
.clearfix:after, li:after { content: "."; display: block; height: 0; clear: both; visibility: hidden;}
|
||||
.clearfix, li { display: inline-block; }
|
||||
.clearfix:after, #side_playlist li:after { content: "."; display: block; height: 0; clear: both; visibility: hidden;}
|
||||
.clearfix, #side_playlist li { display: inline-block; }
|
||||
* html .clearfix, * html li { height: 1%;}
|
||||
.clearfix, li { display: block; }
|
||||
.clearfix, #side_playlist li { display: block; }
|
||||
|
||||
|
||||
/* Master Panel */
|
||||
|
@ -523,6 +523,11 @@ dl.inline-list dd {
|
|||
.even {
|
||||
background-color:#c7c7c7;
|
||||
}
|
||||
|
||||
.datatable .show-builder-placeholder {
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.datatable tr.even.selected td {
|
||||
background-color: #abcfe2;
|
||||
}
|
||||
|
|
|
@ -1,66 +0,0 @@
|
|||
function addRemove(el) {
|
||||
var id, span;
|
||||
|
||||
id = $(el).attr("id").split("_").pop();
|
||||
|
||||
span = $('<a href="#" id="search_remove_'+id+'" class="ui-button ui-button-icon-only ui-widget ui-state-default"><span class="ui-icon ui-icon-closethick"></span><span class="ui-button-text">Remove</span></a>').click(function(){
|
||||
$(this).parent().parent().remove();
|
||||
});
|
||||
|
||||
$(el).find("dl input").after(span);
|
||||
}
|
||||
|
||||
function ajaxAddRow() {
|
||||
var group_id;
|
||||
|
||||
group_id = $(this).parent().parent().attr("id").split("_").pop();
|
||||
|
||||
var url = '/Search/newfield/format/json';
|
||||
|
||||
$.post(url, {group: group_id}, function(json) {
|
||||
|
||||
var newRow = $(json.html).find("#fieldset-row_"+json.row);
|
||||
addRemove(newRow);
|
||||
|
||||
$("#fieldset-group_"+group_id+" dl:first").append(newRow);
|
||||
});
|
||||
}
|
||||
|
||||
function removeGroup() {
|
||||
$(this).parent().parent().remove();
|
||||
}
|
||||
|
||||
function ajaxAddGroup() {
|
||||
|
||||
var url = '/Search/newgroup/format/json';
|
||||
|
||||
$.post(url, function(json) {
|
||||
|
||||
var group = $(json.html);
|
||||
addRemove(group);
|
||||
group.find('[id$="search_add_row"]').click(ajaxAddRow);
|
||||
group.find('[id$="search_remove_group"]').click(removeGroup);
|
||||
$(".zend_form").append(group);
|
||||
});
|
||||
}
|
||||
|
||||
function advancedSearchSubmit() {
|
||||
var data = $("#advancedSearch form").serializeArray();
|
||||
|
||||
$.post("/Search/index", {format: "json", data: data}, function(json){
|
||||
var x;
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$("#search_add_group").click(ajaxAddGroup);
|
||||
$("#search_submit").click(advancedSearchSubmit);
|
||||
|
||||
$('[id$="search_add_row"]').click(ajaxAddRow);
|
||||
$('[id$="search_remove_group"]').click(removeGroup);
|
||||
|
||||
$('[id^="fieldset-row_"]').each(function(i, el){
|
||||
addRemove(el);
|
||||
});
|
||||
});
|
|
@ -0,0 +1,86 @@
|
|||
var AIRTIME = (function(AIRTIME){
|
||||
var mod;
|
||||
|
||||
if (AIRTIME.library === undefined) {
|
||||
AIRTIME.library = {}
|
||||
}
|
||||
|
||||
AIRTIME.library.events = {};
|
||||
mod = AIRTIME.library.events;
|
||||
|
||||
mod.fnRowCallback = function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||
var $nRow = $(nRow);
|
||||
|
||||
$nRow.attr("id", aData["tr_id"])
|
||||
.data("aData", aData)
|
||||
.data("screen", "playlist");
|
||||
}
|
||||
|
||||
mod.fnDrawCallback = function() {
|
||||
|
||||
$('#library_display tr[id ^= "au"]').draggable({
|
||||
helper: 'clone',
|
||||
/* customize the helper on dragging to look like a pl item
|
||||
*
|
||||
helper: function(ev) {
|
||||
var data, li;
|
||||
|
||||
data = $(ev.currentTarget).data("aData");
|
||||
|
||||
li = $("<li></li>");
|
||||
li.append(data.track_title);
|
||||
|
||||
return li;
|
||||
},
|
||||
*/
|
||||
cursor: 'pointer',
|
||||
connectToSortable: '#spl_sortable'
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* @param oTable the datatables instance for the library.
|
||||
*/
|
||||
mod.setupLibraryToolbar = function( oLibTable ) {
|
||||
var aButtons,
|
||||
fnResetCol,
|
||||
fnAddSelectedItems;
|
||||
|
||||
fnResetCol = function () {
|
||||
ColReorder.fnReset( oLibTable );
|
||||
return false;
|
||||
};
|
||||
|
||||
fnAddSelectedItems = function() {
|
||||
var oLibTT = TableTools.fnGetInstance('library_display'),
|
||||
aData = oLibTT.fnGetSelectedData(),
|
||||
item,
|
||||
temp,
|
||||
aMediaIds = [];
|
||||
|
||||
//process selected files/playlists.
|
||||
for (item in aData) {
|
||||
temp = aData[item];
|
||||
if (temp !== null && temp.hasOwnProperty('id') && temp.ftype === "audioclip") {
|
||||
aMediaIds.push(temp.id);
|
||||
}
|
||||
}
|
||||
|
||||
AIRTIME.playlist.fnAddItems(aMediaIds, undefined, 'after');
|
||||
};
|
||||
|
||||
//[0] = button text
|
||||
//[1] = id
|
||||
//[2] = enabled
|
||||
//[3] = click event
|
||||
aButtons = [["Reset Order", "library_order_reset", true, fnResetCol],
|
||||
["Delete", "library_group_delete", true, AIRTIME.library.fnDeleteSelectedItems],
|
||||
["Add", "library_group_add", true, fnAddSelectedItems]];
|
||||
|
||||
addToolBarButtonsLibrary(aButtons);
|
||||
}
|
||||
|
||||
|
||||
return AIRTIME;
|
||||
|
||||
}(AIRTIME || {}));
|
|
@ -0,0 +1,92 @@
|
|||
var AIRTIME = (function(AIRTIME){
|
||||
var mod;
|
||||
|
||||
if (AIRTIME.library === undefined) {
|
||||
AIRTIME.library = {}
|
||||
}
|
||||
|
||||
AIRTIME.library.events = {};
|
||||
mod = AIRTIME.library.events;
|
||||
|
||||
mod.fnRowCallback = function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||
var $nRow = $(nRow);
|
||||
|
||||
$nRow.attr("id", aData["tr_id"])
|
||||
.data("aData", aData)
|
||||
.data("screen", "timeline");
|
||||
}
|
||||
|
||||
mod.fnDrawCallback = function() {
|
||||
|
||||
$('#library_display tr:not(:first)').draggable({
|
||||
helper: 'clone',
|
||||
cursor: 'pointer',
|
||||
connectToSortable: '#show_builder_table'
|
||||
});
|
||||
}
|
||||
|
||||
mod.setupLibraryToolbar = function(oLibTable) {
|
||||
var aButtons,
|
||||
fnTest,
|
||||
fnResetCol,
|
||||
fnAddSelectedItems,
|
||||
|
||||
fnTest = function() {
|
||||
alert("hi");
|
||||
};
|
||||
|
||||
fnResetCol = function () {
|
||||
ColReorder.fnReset( oLibTable );
|
||||
return false;
|
||||
};
|
||||
|
||||
fnAddSelectedItems = function() {
|
||||
var oSchedTable = $("#show_builder_table").dataTable(),
|
||||
oLibTT = TableTools.fnGetInstance('library_display'),
|
||||
oSchedTT = TableTools.fnGetInstance('show_builder_table'),
|
||||
aData = oLibTT.fnGetSelectedData(),
|
||||
item,
|
||||
temp,
|
||||
aMediaIds = [],
|
||||
aSchedIds = [];
|
||||
|
||||
//process selected files/playlists.
|
||||
for (item in aData) {
|
||||
temp = aData[item];
|
||||
if (temp !== null && temp.hasOwnProperty('id')) {
|
||||
aMediaIds.push({"id": temp.id, "type": temp.ftype});
|
||||
}
|
||||
}
|
||||
|
||||
aData = oSchedTT.fnGetSelectedData();
|
||||
|
||||
//process selected schedule rows to add media after.
|
||||
for (item in aData) {
|
||||
temp = aData[item];
|
||||
if (temp !== null && temp.hasOwnProperty('id')) {
|
||||
aSchedIds.push({"id": temp.id, "instance": temp.instance});
|
||||
}
|
||||
}
|
||||
|
||||
$.post("/showbuilder/schedule-add",
|
||||
{"format": "json", "mediaIds": aMediaIds, "schedIds": aSchedIds},
|
||||
function(json){
|
||||
oLibTT.fnSelectNone();
|
||||
oSchedTT.fnSelectNone();
|
||||
oSchedTable.fnDraw();
|
||||
});
|
||||
};
|
||||
//[0] = button text
|
||||
//[1] = id
|
||||
//[2] = enabled
|
||||
//[3] = click event
|
||||
aButtons = [["Reset Order", "library_order_reset", true, fnResetCol],
|
||||
["Delete", "library_group_delete", true, AIRTIME.library.fnDeleteSelectedItems],
|
||||
["Add", "library_group_add", true, fnAddSelectedItems]];
|
||||
|
||||
addToolBarButtonsLibrary(aButtons);
|
||||
}
|
||||
|
||||
return AIRTIME;
|
||||
|
||||
}(AIRTIME || {}));
|
|
@ -1,179 +1,141 @@
|
|||
var dTable;
|
||||
var checkedCount = 0;
|
||||
var checkedPLCount = 0;
|
||||
|
||||
//used by jjmenu
|
||||
function getId() {
|
||||
var tr_id = $(this.triggerElement).parent().attr("id");
|
||||
tr_id = tr_id.split("_");
|
||||
|
||||
return tr_id[1];
|
||||
}
|
||||
|
||||
function getType() {
|
||||
var tr_id = $(this.triggerElement).parent().attr("id");
|
||||
tr_id = tr_id.split("_");
|
||||
|
||||
return tr_id[0];
|
||||
}
|
||||
//end functions used by jjmenu
|
||||
|
||||
function deleteItem(type, id) {
|
||||
var tr_id, tr, dt;
|
||||
|
||||
tr_id = type+"_"+id;
|
||||
tr = $("#"+tr_id);
|
||||
|
||||
dt = $("#library_display").dataTable();
|
||||
dt.fnDeleteRow( tr );
|
||||
}
|
||||
|
||||
function deleteAudioClip(json) {
|
||||
if(json.message) {
|
||||
alert(json.message);
|
||||
return;
|
||||
var AIRTIME = (function(AIRTIME){
|
||||
var mod;
|
||||
|
||||
if (AIRTIME.library === undefined) {
|
||||
AIRTIME.library = {}
|
||||
}
|
||||
mod = AIRTIME.library;
|
||||
|
||||
mod.fnDeleteItems = function(aMedia) {
|
||||
var oLibTT = TableTools.fnGetInstance('library_display'),
|
||||
oLibTable = $("#library_display").dataTable();
|
||||
|
||||
$.post("/library/delete",
|
||||
{"format": "json", "media": aMedia},
|
||||
function(json){
|
||||
oLibTT.fnSelectNone();
|
||||
oLibTable.fnDraw();
|
||||
});
|
||||
};
|
||||
|
||||
mod.fnDeleteSelectedItems = function() {
|
||||
var oLibTT = TableTools.fnGetInstance('library_display'),
|
||||
aData = oLibTT.fnGetSelectedData(),
|
||||
item,
|
||||
temp,
|
||||
aMedia = [];
|
||||
|
||||
//process selected files/playlists.
|
||||
for (item in aData) {
|
||||
temp = aData[item];
|
||||
if (temp !== null && temp.hasOwnProperty('id') ) {
|
||||
aMedia.push({"id": temp.id, "type": temp.ftype});
|
||||
}
|
||||
}
|
||||
|
||||
AIRTIME.library.fnDeleteItems(aMedia);
|
||||
};
|
||||
|
||||
return AIRTIME;
|
||||
|
||||
}(AIRTIME || {}));
|
||||
|
||||
if (json.ids != undefined) {
|
||||
for (var i = json.ids.length - 1; i >= 0; i--) {
|
||||
deleteItem("au", json.ids[i]);
|
||||
}
|
||||
} else if (json.id != undefined) {
|
||||
deleteItem("au", json.id);
|
||||
}
|
||||
location.reload(true);
|
||||
}
|
||||
function addToolBarButtonsLibrary(aButtons) {
|
||||
var i,
|
||||
length = aButtons.length,
|
||||
libToolBar,
|
||||
html,
|
||||
buttonClass = '',
|
||||
DEFAULT_CLASS = 'ui-button ui-state-default',
|
||||
DISABLED_CLASS = 'ui-state-disabled';
|
||||
|
||||
libToolBar = $(".library_toolbar");
|
||||
|
||||
for ( i=0; i < length; i+=1 ) {
|
||||
buttonClass = '';
|
||||
|
||||
//add disabled class if not enabled.
|
||||
if (aButtons[i][2] === false) {
|
||||
buttonClass+=DISABLED_CLASS;
|
||||
}
|
||||
|
||||
html = '<div id="'+aButtons[i][1]+'" class="ColVis TableTools"><button class="'+DEFAULT_CLASS+' '+buttonClass+'"><span>'+aButtons[i][0]+'</span></button></div>';
|
||||
libToolBar.append(html);
|
||||
libToolBar.find("#"+aButtons[i][1]).click(aButtons[i][3]);
|
||||
}
|
||||
}
|
||||
|
||||
function confirmDeleteGroup() {
|
||||
if(confirm('Are you sure you want to delete the selected items?')){
|
||||
groupDelete();
|
||||
function enableGroupBtn(btnId, func) {
|
||||
btnId = '#' + btnId;
|
||||
if ($(btnId).hasClass('ui-state-disabled')) {
|
||||
$(btnId).removeClass('ui-state-disabled');
|
||||
}
|
||||
}
|
||||
|
||||
//callbacks called by jjmenu
|
||||
function confirmDeleteAudioClip(params){
|
||||
if(confirm('The file will be deleted from disk, are you sure you want to delete?')){
|
||||
var url = '/Library/delete' + params;
|
||||
$.ajax({
|
||||
url: url,
|
||||
success: deleteAudioClip
|
||||
});
|
||||
function disableGroupBtn(btnId) {
|
||||
btnId = '#' + btnId;
|
||||
if (!$(btnId).hasClass('ui-state-disabled')) {
|
||||
$(btnId).addClass('ui-state-disabled');
|
||||
}
|
||||
}
|
||||
|
||||
//callbacks called by jjmenu
|
||||
function confirmDeletePlaylist(params){
|
||||
if(confirm('Are you sure you want to delete?')){
|
||||
var url = '/Playlist/delete' + params;
|
||||
$.ajax({
|
||||
url: url,
|
||||
success: deletePlaylist
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function openFileOnSoundCloud(link){
|
||||
window.open(link)
|
||||
}
|
||||
|
||||
function checkImportStatus(){
|
||||
$.getJSON('/Preference/is-import-in-progress', function(data){
|
||||
var div = $('#import_status');
|
||||
if(data == true){
|
||||
if (data == true){
|
||||
div.css('visibility', 'visible');
|
||||
}else{
|
||||
div.css('visibility', 'hidden');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function deletePlaylist(json) {
|
||||
if(json.message) {
|
||||
alert(json.message);
|
||||
return;
|
||||
}
|
||||
|
||||
if (json.ids != undefined) {
|
||||
for (var i = json.ids.length - 1; i >= 0; i--) {
|
||||
deleteItem("pl", json.ids[i]);
|
||||
}
|
||||
} else if (json.id != undefined) {
|
||||
deleteItem("pl", json.id);
|
||||
}
|
||||
window.location.reload();
|
||||
}
|
||||
//end callbacks called by jjmenu
|
||||
|
||||
function addLibraryItemEvents() {
|
||||
|
||||
$('#library_display tr[id ^= "au"]')
|
||||
.draggable({
|
||||
helper: 'clone',
|
||||
cursor: 'pointer'
|
||||
});
|
||||
|
||||
$('#library_display tbody tr td').not('[class=library_checkbox]')
|
||||
.jjmenu("click",
|
||||
[{get:"/Library/context-menu/format/json/id/#id#/type/#type#"}],
|
||||
{id: getId, type: getType},
|
||||
{xposition: "mouse", yposition: "mouse"});
|
||||
|
||||
}
|
||||
|
||||
function dtRowCallback( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||
var id, type, once;
|
||||
|
||||
type = aData["ftype"].substring(0,2);
|
||||
id = aData["id"];
|
||||
|
||||
if(type == "au") {
|
||||
$('td.library_type', nRow).html( '<img src="css/images/icon_audioclip.png">' );
|
||||
} else if(type == "pl") {
|
||||
$('td.library_type', nRow).html( '<img src="css/images/icon_playlist.png">' );
|
||||
}
|
||||
|
||||
$(nRow).attr("id", type+'_'+id);
|
||||
|
||||
// insert id on lenth field
|
||||
$('td.library_length', nRow).attr("id", "length");
|
||||
|
||||
return nRow;
|
||||
}
|
||||
|
||||
function dtDrawCallback() {
|
||||
addLibraryItemEvents();
|
||||
addMetadataQtip();
|
||||
saveNumEntriesSetting();
|
||||
setupGroupActions();
|
||||
});
|
||||
}
|
||||
|
||||
function addProgressIcon(id) {
|
||||
if($("#au_"+id).find("td.library_title").find("span").length > 0){
|
||||
$("#au_"+id).find("td.library_title").find("span").removeClass();
|
||||
$("span[id="+id+"]").addClass("small-icon progress");
|
||||
}else{
|
||||
$("#au_"+id).find("td.library_title").append('<span id="'+id+'" class="small-icon progress"></span>')
|
||||
var tr = $("#au_"+id),
|
||||
span;
|
||||
|
||||
span = tr.find("td.library_title").find("span");
|
||||
|
||||
if (span.length > 0){
|
||||
span.removeClass()
|
||||
.addClass("small-icon progress");
|
||||
}
|
||||
else{
|
||||
tr.find("td.library_title")
|
||||
.append('<span class="small-icon progress"></span>');
|
||||
}
|
||||
}
|
||||
|
||||
function checkSCUploadStatus(){
|
||||
var url = '/Library/get-upload-to-soundcloud-status/format/json';
|
||||
|
||||
var url = '/Library/get-upload-to-soundcloud-status';
|
||||
|
||||
$("span[class*=progress]").each(function(){
|
||||
var id = $(this).attr("id");
|
||||
var span, id;
|
||||
|
||||
span = $(this);
|
||||
id = span.parent().parent().data("aData").id;
|
||||
|
||||
$.post(url, {format: "json", id: id, type:"file"}, function(json){
|
||||
if(json.sc_id > 0){
|
||||
$("span[id="+id+"]").removeClass("progress").addClass("soundcloud");
|
||||
}else if(json.sc_id == "-3"){
|
||||
$("span[id="+id+"]").removeClass("progress").addClass("sc-error");
|
||||
if (json.sc_id > 0) {
|
||||
span.removeClass("progress")
|
||||
.addClass("soundcloud");
|
||||
|
||||
}
|
||||
else if (json.sc_id == "-3") {
|
||||
span.removeClass("progress")
|
||||
.addClass("sc-error");
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
function addQtipToSCIcons(){
|
||||
$(".progress, .soundcloud, .sc-error").live('mouseover', function(){
|
||||
var id = $(this).attr("id");
|
||||
if($(this).hasClass("progress")){
|
||||
|
||||
var id = $(this).parent().parent().data("aData").id;
|
||||
|
||||
if ($(this).hasClass("progress")){
|
||||
$(this).qtip({
|
||||
content: {
|
||||
text: "Uploading in progress..."
|
||||
|
@ -190,8 +152,9 @@ function addQtipToSCIcons(){
|
|||
show: {
|
||||
ready: true // Needed to make it show on first mouseover event
|
||||
}
|
||||
})
|
||||
}else if($(this).hasClass("soundcloud")){
|
||||
});
|
||||
}
|
||||
else if($(this).hasClass("soundcloud")){
|
||||
$(this).qtip({
|
||||
content: {
|
||||
text: "Retreiving data from the server...",
|
||||
|
@ -200,7 +163,7 @@ function addQtipToSCIcons(){
|
|||
type: "post",
|
||||
data: ({format: "json", id : id, type: "file"}),
|
||||
success: function(json, status){
|
||||
this.set('content.text', "The soundcloud id for this file is: "+json.sc_id)
|
||||
this.set('content.text', "The soundcloud id for this file is: "+json.sc_id);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -216,7 +179,7 @@ function addQtipToSCIcons(){
|
|||
show: {
|
||||
ready: true // Needed to make it show on first mouseover event
|
||||
}
|
||||
})
|
||||
});
|
||||
}else if($(this).hasClass("sc-error")){
|
||||
$(this).qtip({
|
||||
content: {
|
||||
|
@ -227,7 +190,7 @@ function addQtipToSCIcons(){
|
|||
data: ({format: "json", id : id, type: "file"}),
|
||||
success: function(json, status){
|
||||
this.set('content.text', "There was error while uploading to soundcloud.<br>"+"Error code: "+json.error_code+
|
||||
"<br>"+"Error msg: "+json.error_msg+"<br>")
|
||||
"<br>"+"Error msg: "+json.error_msg+"<br>");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -243,63 +206,56 @@ function addQtipToSCIcons(){
|
|||
show: {
|
||||
ready: true // Needed to make it show on first mouseover event
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function addMetadataQtip(){
|
||||
var tableRow = $('#library_display tbody tr');
|
||||
tableRow.each(function(){
|
||||
var title = $(this).find('td.library_title').html()
|
||||
var info = $(this).attr("id")
|
||||
info = info.split("_");
|
||||
var id = info[1];
|
||||
var type = info[0];
|
||||
$(this).qtip({
|
||||
content: {
|
||||
text: "Loading...",
|
||||
title: {
|
||||
text: title
|
||||
},
|
||||
ajax: {
|
||||
url: "/Library/get-file-meta-data",
|
||||
type: "post",
|
||||
data: ({format: "html", id : id, type: type}),
|
||||
success: function(data, status){
|
||||
this.set('content.text', data)
|
||||
}
|
||||
}
|
||||
},
|
||||
position: {
|
||||
target: 'event',
|
||||
adjust: {
|
||||
resize: true,
|
||||
method: "flip flip"
|
||||
},
|
||||
at: "right center",
|
||||
my: "left top",
|
||||
viewport: $(window)
|
||||
},
|
||||
style: {
|
||||
width: 570,
|
||||
classes: "ui-tooltip-dark"
|
||||
},
|
||||
show: 'mousedown',
|
||||
events: {
|
||||
show: function(event, api) {
|
||||
// Only show the tooltip if it was a right-click
|
||||
if(event.originalEvent.button !== 2) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
tableRow.bind('contextmenu', function(e){
|
||||
return false;
|
||||
})
|
||||
function fnCreatedRow( nRow, aData, iDataIndex ) {
|
||||
|
||||
//call the context menu so we can prevent the event from propagating.
|
||||
$(nRow).find('td:not(.library_checkbox):not(.library_type)').click(function(e){
|
||||
|
||||
$(this).contextMenu();
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
//add a tool tip to appear when the user clicks on the type icon.
|
||||
$(nRow.children[1]).qtip({
|
||||
content: {
|
||||
text: "Loading...",
|
||||
title: {
|
||||
text: aData.track_title
|
||||
},
|
||||
ajax: {
|
||||
url: "/Library/get-file-meta-data",
|
||||
type: "get",
|
||||
data: ({format: "html", id : aData.id, type: aData.ftype}),
|
||||
success: function(data, status) {
|
||||
this.set('content.text', data);
|
||||
}
|
||||
}
|
||||
},
|
||||
position: {
|
||||
my: 'left center',
|
||||
at: 'right center', // Position the tooltip above the link
|
||||
viewport: $(window), // Keep the tooltip on-screen at all times
|
||||
effect: false // Disable positioning animation
|
||||
},
|
||||
style: {
|
||||
classes: "ui-tooltip-dark"
|
||||
},
|
||||
show: {
|
||||
event: 'click',
|
||||
solo: true // Only show one tooltip at a time
|
||||
},
|
||||
hide: 'mouseout',
|
||||
|
||||
}).click(function(event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -316,247 +272,109 @@ function saveNumEntriesSetting() {
|
|||
* Use user preference for number of entries to show
|
||||
*/
|
||||
function getNumEntriesPreference(data) {
|
||||
return parseInt(data.libraryInit.numEntries);
|
||||
}
|
||||
|
||||
function groupAdd() {
|
||||
if (checkedPLCount > 0) {
|
||||
alert("Can't add playlist to another playlist");
|
||||
return;
|
||||
}
|
||||
disableGroupBtn('library_group_add');
|
||||
|
||||
var ids = new Array();
|
||||
var addGroupUrl = '/Playlist/add-group';
|
||||
var newSPLUrl = '/Playlist/new/format/json';
|
||||
var dirty = true;
|
||||
$('#library_display tbody tr').each(function() {
|
||||
var idSplit = $(this).attr('id').split("_");
|
||||
var id = idSplit.pop();
|
||||
var type = idSplit.pop();
|
||||
if (dirty && $(this).find(":checkbox").attr("checked")) {
|
||||
if (type == "au") {
|
||||
ids.push(id);
|
||||
} else if (type == "pl") {
|
||||
alert("Can't add playlist to another playlist");
|
||||
dirty = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (dirty && ids.length > 0) {
|
||||
stopAudioPreview();
|
||||
|
||||
if ($('#spl_sortable').length == 0) {
|
||||
$.post(newSPLUrl, function(json) {
|
||||
openDiffSPL(json);
|
||||
redrawDataTablePage();
|
||||
|
||||
$.post(addGroupUrl, {format: "json", ids: ids}, setSPLContent);
|
||||
});
|
||||
} else {
|
||||
$.post(addGroupUrl, {format: "json", ids: ids}, setSPLContent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function groupDelete() {
|
||||
disableGroupBtn('library_group_delete');
|
||||
|
||||
var auIds = new Array();
|
||||
var plIds = new Array();
|
||||
var auUrl = '/Library/delete-group';
|
||||
var plUrl = '/Playlist/delete-group';
|
||||
var dirty = true;
|
||||
$('#library_display tbody tr').each(function() {
|
||||
var idSplit = $(this).attr('id').split("_");
|
||||
var id = idSplit.pop();
|
||||
var type = idSplit.pop();
|
||||
if (dirty && $(this).find(":checkbox").attr("checked")) {
|
||||
if (type == "au") {
|
||||
auIds.push(id);
|
||||
} else if (type == "pl") {
|
||||
plIds.push(id);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (dirty && (auIds.length > 0 || plIds.length > 0)) {
|
||||
stopAudioPreview();
|
||||
|
||||
if (auIds.length > 0) {
|
||||
$.post(auUrl, {format: "json", ids: auIds}, deleteAudioClip);
|
||||
}
|
||||
if (plIds.length > 0) {
|
||||
$.post(plUrl, {format: "json", ids: plIds}, deletePlaylist);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function toggleAll() {
|
||||
var checked = $(this).attr("checked");
|
||||
$('#library_display tr').each(function() {
|
||||
var idSplit = $(this).attr('id').split("_");
|
||||
var type = idSplit[0];
|
||||
$(this).find(":checkbox").attr("checked", checked);
|
||||
if (checked) {
|
||||
if (type == "pl") {
|
||||
checkedPLCount++;
|
||||
}
|
||||
$(this).addClass('selected');
|
||||
} else {
|
||||
$(this).removeClass('selected');
|
||||
}
|
||||
});
|
||||
|
||||
if (checked) {
|
||||
checkedCount = $('#library_display tbody tr').size();
|
||||
enableGroupBtn('library_group_add', groupAdd);
|
||||
enableGroupBtn('library_group_delete', confirmDeleteGroup);
|
||||
} else {
|
||||
checkedCount = 0;
|
||||
checkedPLCount = 0;
|
||||
disableGroupBtn('library_group_add');
|
||||
disableGroupBtn('library_group_delete');
|
||||
}
|
||||
}
|
||||
|
||||
function enableGroupBtn(btnId, func) {
|
||||
btnId = '#' + btnId;
|
||||
if ($(btnId).hasClass('ui-state-disabled')) {
|
||||
$(btnId).removeClass('ui-state-disabled');
|
||||
$(btnId).unbind("click").click(func);
|
||||
}
|
||||
}
|
||||
|
||||
function disableGroupBtn(btnId) {
|
||||
btnId = '#' + btnId;
|
||||
if (!$(btnId).hasClass('ui-state-disabled')) {
|
||||
$(btnId).addClass('ui-state-disabled');
|
||||
$(btnId).unbind("click");
|
||||
}
|
||||
}
|
||||
|
||||
function checkBoxChanged() {
|
||||
var cbAll = $('#library_display thead').find(":checkbox");
|
||||
var cbAllChecked = cbAll.attr("checked");
|
||||
var checked = $(this).attr("checked");
|
||||
var size = $('#library_display tbody tr').size();
|
||||
var idSplit = $(this).parent().parent().attr('id').split("_");
|
||||
var type = idSplit[0];
|
||||
if (checked) {
|
||||
if (checkedCount < size) {
|
||||
checkedCount++;
|
||||
}
|
||||
if (type == "pl" && checkedPLCount < size) {
|
||||
checkedPLCount++;
|
||||
}
|
||||
enableGroupBtn('library_group_add', groupAdd);
|
||||
enableGroupBtn('library_group_delete', confirmDeleteGroup);
|
||||
$(this).parent().parent().addClass('selected');
|
||||
} else {
|
||||
if (checkedCount > 0) {
|
||||
checkedCount--;
|
||||
}
|
||||
if (type == "pl" && checkedPLCount > 0) {
|
||||
checkedPLCount--;
|
||||
}
|
||||
if (checkedCount == 0) {
|
||||
disableGroupBtn('library_group_add');
|
||||
disableGroupBtn('library_group_delete');
|
||||
}
|
||||
$(this).parent().parent().removeClass('selected');
|
||||
}
|
||||
|
||||
if (cbAllChecked && checkedCount < size) {
|
||||
cbAll.attr("checked", false);
|
||||
} else if (!cbAllChecked && checkedCount == size) {
|
||||
cbAll.attr("checked", true);
|
||||
}
|
||||
}
|
||||
|
||||
function setupGroupActions() {
|
||||
checkedCount = 0;
|
||||
checkedPLCount = 0;
|
||||
$('#library_display tr:nth-child(1)').find(":checkbox").attr("checked", false);
|
||||
$('#library_display thead').find(":checkbox").unbind('change').change(toggleAll);
|
||||
$('#library_display tbody tr').each(function() {
|
||||
$(this).find(":checkbox").unbind('change').change(checkBoxChanged);
|
||||
});
|
||||
|
||||
disableGroupBtn('library_group_add');
|
||||
disableGroupBtn('library_group_delete');
|
||||
}
|
||||
|
||||
function fnShowHide(iCol) {
|
||||
/* Get the DataTables object again - this is not a recreation, just a get of the object */
|
||||
var oTable = dTable;
|
||||
|
||||
var bVis = oTable.fnSettings().aoColumns[iCol].bVisible;
|
||||
oTable.fnSetColumnVis( iCol, bVis ? false : true );
|
||||
return parseInt(data.libraryInit.numEntries, 10);
|
||||
}
|
||||
|
||||
function createDataTable(data) {
|
||||
dTable = $('#library_display').dataTable( {
|
||||
var oTable;
|
||||
|
||||
oTable = $('#library_display').dataTable( {
|
||||
"bProcessing": true,
|
||||
"bServerSide": true,
|
||||
"sAjaxSource": "/Library/contents/format/json",
|
||||
"sAjaxSource": "/Library/contents",
|
||||
"fnServerData": function ( sSource, aoData, testCallback ) {
|
||||
aoData.push( { name: "format", value: "json"} );
|
||||
$.ajax( {
|
||||
"dataType": 'json',
|
||||
"type": "POST",
|
||||
"type": "GET",
|
||||
"url": sSource,
|
||||
"data": aoData,
|
||||
"success": testCallback
|
||||
} );
|
||||
},
|
||||
"fnRowCallback": dtRowCallback,
|
||||
"fnDrawCallback": dtDrawCallback,
|
||||
"fnRowCallback": AIRTIME.library.events.fnRowCallback,
|
||||
"fnCreatedRow": fnCreatedRow,
|
||||
"fnDrawCallback": AIRTIME.library.events.fnDrawCallback,
|
||||
"fnHeaderCallback": function(nHead) {
|
||||
$(nHead).find("input[type=checkbox]").attr("checked", false);
|
||||
},
|
||||
|
||||
"aoColumns": [
|
||||
/* Checkbox */ {"sTitle": "<input type='checkbox' name='cb_all'>", "bSortable": false, "bSearchable": false, "mDataProp": "checkbox", "sWidth": "25px", "sClass": "library_checkbox"},
|
||||
/* Id */ {"sName": "id", "bSearchable": false, "bVisible": false, "mDataProp": "id", "sClass": "library_id"},
|
||||
/* Title */ {"sTitle": "Title", "sName": "track_title", "mDataProp": "track_title", "sClass": "library_title"},
|
||||
/* Creator */ {"sTitle": "Creator", "sName": "artist_name", "mDataProp": "artist_name", "sClass": "library_creator"},
|
||||
/* Album */ {"sTitle": "Album", "sName": "album_title", "mDataProp": "album_title", "sClass": "library_album"},
|
||||
/* Genre */ {"sTitle": "Genre", "sName": "genre", "mDataProp": "genre", "sWidth": "10%", "sClass": "library_genre"},
|
||||
/* Year */ {"sTitle": "Year", "sName": "year", "mDataProp": "year", "sWidth": "8%", "sClass": "library_year"},
|
||||
/* Length */ {"sTitle": "Length", "sName": "length", "mDataProp": "length", "sWidth": "10%", "sClass": "library_length"},
|
||||
/* Type */ {"sTitle": "Type", "sName": "ftype", "bSearchable": false, "mDataProp": "ftype", "sWidth": "9%", "sClass": "library_type"},
|
||||
/* Upload Time */ {"sTitle": "Upload Time", "sName": "utime", "mDataProp": "utime", "sClass": "library_upload_time"},
|
||||
/* Last Modified */ {"sTitle": "Last Modified", "sName": "mtime", "bVisible": false, "mDataProp": "mtime", "sClass": "library_modified_time"},
|
||||
],
|
||||
/* Checkbox */ {"sTitle": "<input type='checkbox' name='pl_cb_all'>", "bSortable": false, "bSearchable": false, "mDataProp": "checkbox", "sWidth": "25px", "sClass": "library_checkbox"},
|
||||
/* Type */ {"sName": "ftype", "bSearchable": false, "mDataProp": "image", "sWidth": "25px", "sClass": "library_type"},
|
||||
/* Title */ {"sTitle": "Title", "sName": "track_title", "mDataProp": "track_title", "sClass": "library_title"},
|
||||
/* Creator */ {"sTitle": "Creator", "sName": "artist_name", "mDataProp": "artist_name", "sClass": "library_creator"},
|
||||
/* Album */ {"sTitle": "Album", "sName": "album_title", "mDataProp": "album_title", "sClass": "library_album"},
|
||||
/* Genre */ {"sTitle": "Genre", "sName": "genre", "mDataProp": "genre", "sClass": "library_genre"},
|
||||
/* Year */ {"sTitle": "Year", "sName": "year", "mDataProp": "year", "sClass": "library_year"},
|
||||
/* Length */ {"sTitle": "Length", "sName": "length", "mDataProp": "length", "sClass": "library_length"},
|
||||
/* Upload Time */ {"sTitle": "Uploaded", "sName": "utime", "mDataProp": "utime", "sClass": "library_upload_time"},
|
||||
/* Last Modified */ {"sTitle": "Last Modified", "sName": "mtime", "bVisible": false, "mDataProp": "mtime", "sClass": "library_modified_time"}
|
||||
],
|
||||
"aaSorting": [[2,'asc']],
|
||||
"sPaginationType": "full_numbers",
|
||||
"bJQueryUI": true,
|
||||
"bAutoWidth": false,
|
||||
"oLanguage": {
|
||||
"sSearch": ""
|
||||
},
|
||||
"iDisplayLength": getNumEntriesPreference(data),
|
||||
"bStateSave": true,
|
||||
// R = ColReorder, C = ColVis, see datatables doc for others
|
||||
"sDom": 'Rlfr<"H"C<"library_toolbar">>t<"F"ip>',
|
||||
"oColVis": {
|
||||
"buttonText": "Show/Hide Columns",
|
||||
"sAlign": "right",
|
||||
"aiExclude": [0, 1, 2],
|
||||
"sSize": "css",
|
||||
"bShowAll": true
|
||||
"oLanguage": {
|
||||
"sSearch": ""
|
||||
},
|
||||
"iDisplayLength": getNumEntriesPreference(data),
|
||||
|
||||
// R = ColReorder, C = ColVis, T = TableTools
|
||||
"sDom": 'Rlfr<"H"T<"library_toolbar"C>>t<"F"ip>',
|
||||
|
||||
"oTableTools": {
|
||||
"sRowSelect": "multi",
|
||||
"aButtons": [],
|
||||
"fnRowSelected": function ( node ) {
|
||||
|
||||
//seems to happen if everything is selected
|
||||
if ( node === null) {
|
||||
oTable.find("input[type=checkbox]").attr("checked", true);
|
||||
}
|
||||
else {
|
||||
$(node).find("input[type=checkbox]").attr("checked", true);
|
||||
}
|
||||
},
|
||||
"fnRowDeselected": function ( node ) {
|
||||
|
||||
//seems to happen if everything is deselected
|
||||
if ( node === null) {
|
||||
oTable.find("input[type=checkbox]").attr("checked", false);
|
||||
}
|
||||
else {
|
||||
$(node).find("input[type=checkbox]").attr("checked", false);
|
||||
}
|
||||
}
|
||||
},
|
||||
"oColReorder": {
|
||||
"aiOrder": [ 0, 2, 3, 4, 5, 6, 7, 8, 9, 10 ] /* code this */,
|
||||
"iFixedColumns": 3
|
||||
|
||||
"oColVis": {
|
||||
"buttonText": "Show/Hide Columns",
|
||||
"sAlign": "right",
|
||||
"aiExclude": [0, 1],
|
||||
"sSize": "css",
|
||||
"bShowAll": true
|
||||
},
|
||||
|
||||
"oColReorder": {
|
||||
"iFixedColumns": 2,
|
||||
"aiOrder": [ 0,1,2,3,4,5,6,7,8,9 ]
|
||||
}
|
||||
|
||||
});
|
||||
dTable.fnSetFilteringDelay(350);
|
||||
oTable.fnSetFilteringDelay(350);
|
||||
|
||||
$("div.library_toolbar").html('<span class="fg-button ui-button ui-state-default" id="library_order_reset">Reset Order</span>' +
|
||||
'<span class="fg-button ui-button ui-state-default ui-state-disabled" id="library_group_delete">Delete</span>' +
|
||||
'<span class="fg-button ui-button ui-state-default ui-state-disabled" id="library_group_add">Add</span>');
|
||||
|
||||
$('#library_order_reset').click(function() {
|
||||
ColReorder.fnReset( dTable );
|
||||
return false;
|
||||
AIRTIME.library.events.setupLibraryToolbar(oTable);
|
||||
|
||||
$('[name="pl_cb_all"]').click(function(){
|
||||
var oTT = TableTools.fnGetInstance('library_display');
|
||||
|
||||
if ($(this).is(":checked")) {
|
||||
oTT.fnSelectAll();
|
||||
}
|
||||
else {
|
||||
oTT.fnSelectNone();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -567,8 +385,133 @@ $(document).ready(function() {
|
|||
error:function(jqXHR, textStatus, errorThrown){}});
|
||||
|
||||
checkImportStatus();
|
||||
setInterval( "checkImportStatus()", 5000 );
|
||||
setInterval( "checkSCUploadStatus()", 5000 );
|
||||
setInterval( checkImportStatus, 5000 );
|
||||
setInterval( checkSCUploadStatus, 5000 );
|
||||
|
||||
addQtipToSCIcons()
|
||||
addQtipToSCIcons();
|
||||
|
||||
$.contextMenu({
|
||||
selector: '#library_display td:not(.library_checkbox):not(.library_type)',
|
||||
trigger: "left",
|
||||
ignoreRightClick: true,
|
||||
|
||||
build: function($el, e) {
|
||||
var x, request, data, screen, items, callback, $tr;
|
||||
|
||||
$tr = $el.parent();
|
||||
data = $tr.data("aData");
|
||||
screen = $tr.data("screen");
|
||||
|
||||
function processMenuItems(oItems) {
|
||||
|
||||
//define an edit callback.
|
||||
if (oItems.edit !== undefined) {
|
||||
|
||||
if (data.ftype === "audioclip") {
|
||||
callback = function() {
|
||||
document.location.href = oItems.edit.url;
|
||||
};
|
||||
}
|
||||
else {
|
||||
callback = function() {
|
||||
AIRTIME.playlist.fnEdit(data.id);
|
||||
};
|
||||
}
|
||||
oItems.edit.callback = callback;
|
||||
}
|
||||
|
||||
//define a delete callback.
|
||||
if (oItems.del !== undefined) {
|
||||
|
||||
//delete through the playlist controller, will reset
|
||||
//playlist screen if this is the currently edited playlist.
|
||||
if (data.ftype === "playlist" && screen === "playlist") {
|
||||
callback = function() {
|
||||
|
||||
if (confirm('Are you sure you want to delete the selected item?')) {
|
||||
AIRTIME.playlist.fnDelete(data.id);
|
||||
}
|
||||
};
|
||||
}
|
||||
else {
|
||||
callback = function() {
|
||||
var media = [];
|
||||
|
||||
if (confirm('Are you sure you want to delete the selected item?')) {
|
||||
|
||||
media.push({"id": data.id, "type": data.ftype});
|
||||
$.post(oItems.del.url, {format: "json", media: media }, function(json){
|
||||
var oTable, tr;
|
||||
|
||||
if (json.message) {
|
||||
alert(json.message);
|
||||
}
|
||||
|
||||
oTable = $("#library_display").dataTable();
|
||||
oTable.fnDeleteRow( $tr[0] );
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
oItems.del.callback = callback;
|
||||
}
|
||||
|
||||
//define a download callback.
|
||||
if (oItems.download !== undefined) {
|
||||
|
||||
callback = function() {
|
||||
document.location.href = oItems.download.url;
|
||||
};
|
||||
oItems.download.callback = callback;
|
||||
}
|
||||
//add callbacks for Soundcloud menu items.
|
||||
if (oItems.soundcloud !== undefined) {
|
||||
var soundcloud = oItems.soundcloud.items;
|
||||
|
||||
//define an upload to soundcloud callback.
|
||||
if (soundcloud.upload !== undefined) {
|
||||
|
||||
callback = function() {
|
||||
$.post(soundcloud.upload.url, function(){
|
||||
addProgressIcon(data.id);
|
||||
});
|
||||
};
|
||||
soundcloud.upload.callback = callback;
|
||||
}
|
||||
|
||||
//define a view on soundcloud callback
|
||||
if (soundcloud.view !== undefined) {
|
||||
|
||||
callback = function() {
|
||||
window.open(soundcloud.view.url);
|
||||
};
|
||||
soundcloud.view.callback = callback;
|
||||
}
|
||||
}
|
||||
|
||||
items = oItems;
|
||||
}
|
||||
|
||||
request = $.ajax({
|
||||
url: "/library/context-menu",
|
||||
type: "GET",
|
||||
data: {id : data.id, type: data.ftype, format: "json", "screen": screen},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json){
|
||||
processMenuItems(json.items);
|
||||
}
|
||||
});
|
||||
|
||||
return {
|
||||
items: items,
|
||||
determinePosition : function($menu, x, y) {
|
||||
$menu.css('display', 'block')
|
||||
.position({ my: "left top", at: "right top", of: this, offset: "-20 10", collision: "fit"})
|
||||
.css('display', 'none');
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -0,0 +1,394 @@
|
|||
$(document).ready(function() {
|
||||
var tableDiv = $('#show_builder_table'),
|
||||
oTable,
|
||||
oBaseDatePickerSettings,
|
||||
oBaseTimePickerSettings,
|
||||
fnAddSelectedItems,
|
||||
fnRemoveSelectedItems;
|
||||
|
||||
oBaseDatePickerSettings = {
|
||||
dateFormat: 'yy-mm-dd',
|
||||
onSelect: function(sDate, oDatePicker) {
|
||||
var oDate,
|
||||
dInput;
|
||||
|
||||
dInput = $(this);
|
||||
oDate = dInput.datepicker( "setDate", sDate );
|
||||
}
|
||||
};
|
||||
|
||||
oBaseTimePickerSettings = {
|
||||
showPeriodLabels: false,
|
||||
showCloseButton: true,
|
||||
showLeadingZero: false,
|
||||
defaultTime: '0:00'
|
||||
};
|
||||
|
||||
/*
|
||||
* Get the schedule range start in unix timestamp form (in seconds).
|
||||
* defaults to NOW if nothing is selected.
|
||||
*
|
||||
* @param String sDatePickerId
|
||||
*
|
||||
* @param String sTimePickerId
|
||||
*
|
||||
* @return Number iTime
|
||||
*/
|
||||
function fnGetUIPickerUnixTimestamp(sDatePickerId, sTimePickerId) {
|
||||
var oDate,
|
||||
oTimePicker = $( sTimePickerId ),
|
||||
iTime,
|
||||
iHour,
|
||||
iMin,
|
||||
iServerOffset,
|
||||
iClientOffset;
|
||||
|
||||
if ($(sDatePickerId).val() === "") {
|
||||
return 0;
|
||||
}
|
||||
|
||||
oDate = $( sDatePickerId ).datepicker( "getDate" );
|
||||
|
||||
//nothing has been selected from this datepicker.
|
||||
if (oDate === null) {
|
||||
oDate = new Date();
|
||||
}
|
||||
else {
|
||||
iHour = oTimePicker.timepicker('getHour');
|
||||
iMin = oTimePicker.timepicker('getMinute');
|
||||
|
||||
oDate.setHours(iHour, iMin);
|
||||
}
|
||||
|
||||
iTime = oDate.getTime(); //value is in millisec.
|
||||
iTime = Math.round(iTime / 1000);
|
||||
iServerOffset = serverTimezoneOffset;
|
||||
iClientOffset = oDate.getTimezoneOffset() * 60;//function returns minutes
|
||||
|
||||
//adjust for the fact the the Date object is
|
||||
iTime = iTime + iServerOffset + iClientOffset;
|
||||
|
||||
return iTime;
|
||||
}
|
||||
/*
|
||||
* Returns an object containing a unix timestamp in seconds for the start/end range
|
||||
*
|
||||
* @return Object {"start", "end", "range"}
|
||||
*/
|
||||
function fnGetScheduleRange() {
|
||||
var iStart,
|
||||
iEnd,
|
||||
iRange,
|
||||
DEFAULT_RANGE = 60*60*24;
|
||||
|
||||
iStart = fnGetUIPickerUnixTimestamp("#show_builder_datepicker_start", "#show_builder_timepicker_start");
|
||||
iEnd = fnGetUIPickerUnixTimestamp("#show_builder_datepicker_end", "#show_builder_timepicker_end");
|
||||
|
||||
iRange = iEnd - iStart;
|
||||
|
||||
if (iRange === 0 || iEnd < iStart) {
|
||||
iEnd = iStart + DEFAULT_RANGE;
|
||||
iRange = DEFAULT_RANGE;
|
||||
}
|
||||
|
||||
return {
|
||||
start: iStart,
|
||||
end: iEnd,
|
||||
range: iRange
|
||||
};
|
||||
}
|
||||
|
||||
var fnServerData = function ( sSource, aoData, fnCallback ) {
|
||||
aoData.push( { name: "format", value: "json"} );
|
||||
|
||||
if (fnServerData.hasOwnProperty("start")) {
|
||||
aoData.push( { name: "start", value: fnServerData.start} );
|
||||
}
|
||||
if (fnServerData.hasOwnProperty("end")) {
|
||||
aoData.push( { name: "end", value: fnServerData.end} );
|
||||
}
|
||||
|
||||
$.ajax( {
|
||||
"dataType": "json",
|
||||
"type": "GET",
|
||||
"url": sSource,
|
||||
"data": aoData,
|
||||
"success": fnCallback
|
||||
} );
|
||||
};
|
||||
|
||||
var fnShowBuilderRowCallback = function ( nRow, aData, iDisplayIndex, iDisplayIndexFull ){
|
||||
var i,
|
||||
sSeparatorHTML,
|
||||
fnPrepareSeparatorRow,
|
||||
node;
|
||||
|
||||
//save some info for reordering purposes.
|
||||
$(nRow).data({"aData": aData});
|
||||
|
||||
fnPrepareSeparatorRow = function(sRowContent, sClass) {
|
||||
|
||||
node = nRow.children[1];
|
||||
node.innerHTML = sRowContent;
|
||||
node.setAttribute('colspan',100);
|
||||
for (i = 2; i < nRow.children.length; i = i+1) {
|
||||
node = nRow.children[i];
|
||||
node.innerHTML = "";
|
||||
node.setAttribute("style", "display : none");
|
||||
}
|
||||
|
||||
nRow.className = sClass;
|
||||
};
|
||||
|
||||
if (aData.header === true) {
|
||||
node = nRow.children[0];
|
||||
node.innerHTML = '<span class="ui-icon ui-icon-play"></span>';
|
||||
|
||||
sSeparatorHTML = '<span>'+aData.title+'</span><span>'+aData.starts+'</span><span>'+aData.ends+'</span>';
|
||||
fnPrepareSeparatorRow(sSeparatorHTML, "sb-header");
|
||||
}
|
||||
else if (aData.footer === true) {
|
||||
|
||||
node = nRow.children[0];
|
||||
node.innerHTML = '<span class="ui-icon ui-icon-check"></span>';
|
||||
|
||||
sSeparatorHTML = '<span>Show Footer</span>';
|
||||
fnPrepareSeparatorRow(sSeparatorHTML, "sb-footer");
|
||||
}
|
||||
else if (aData.empty === true) {
|
||||
|
||||
node = nRow.children[0];
|
||||
node.innerHTML = '';
|
||||
|
||||
sSeparatorHTML = '<span>Show Empty</span>';
|
||||
fnPrepareSeparatorRow(sSeparatorHTML, "sb-empty odd");
|
||||
}
|
||||
else {
|
||||
$(nRow).attr("id", "sched_"+aData.id);
|
||||
|
||||
node = nRow.children[0];
|
||||
if (aData.checkbox === true) {
|
||||
node.innerHTML = '<input type="checkbox" name="'+aData.id+'"></input>';
|
||||
}
|
||||
else {
|
||||
node.innerHTML = '';
|
||||
|
||||
$(nRow).addClass("sb-not-allowed");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
fnRemoveSelectedItems = function() {
|
||||
var oTT = TableTools.fnGetInstance('show_builder_table'),
|
||||
aData = oTT.fnGetSelectedData(),
|
||||
item,
|
||||
temp,
|
||||
ids = [];
|
||||
|
||||
for (item in aData) {
|
||||
temp = aData[item];
|
||||
if (temp !== null && temp.hasOwnProperty('id')) {
|
||||
ids.push(temp.id);
|
||||
}
|
||||
}
|
||||
|
||||
$.post( "/showbuilder/schedule-remove",
|
||||
{"ids": ids, "format": "json"},
|
||||
function(data) {
|
||||
oTT.fnSelectNone();
|
||||
oTable.fnDraw();
|
||||
});
|
||||
};
|
||||
|
||||
oTable = tableDiv.dataTable( {
|
||||
"aoColumns": [
|
||||
/* checkbox */ {"mDataProp": "checkbox", "sTitle": "<input type='checkbox' name='sb_cb_all'>", "sWidth": "15px"},
|
||||
/* starts */{"mDataProp": "starts", "sTitle": "Airtime"},
|
||||
/* ends */{"mDataProp": "ends", "sTitle": "Off Air"},
|
||||
/* runtime */{"mDataProp": "runtime", "sTitle": "Runtime"},
|
||||
/* title */{"mDataProp": "title", "sTitle": "Title"},
|
||||
/* creator */{"mDataProp": "creator", "sTitle": "Creator"},
|
||||
/* album */{"mDataProp": "album", "sTitle": "Album"}
|
||||
],
|
||||
|
||||
"bJQueryUI": true,
|
||||
"bSort": false,
|
||||
"bFilter": false,
|
||||
"bProcessing": true,
|
||||
"bServerSide": true,
|
||||
"bInfo": false,
|
||||
"bAutoWidth": false,
|
||||
|
||||
"fnServerData": fnServerData,
|
||||
"fnRowCallback": fnShowBuilderRowCallback,
|
||||
"fnHeaderCallback": function(nHead) {
|
||||
$(nHead).find("input[type=checkbox]").attr("checked", false);
|
||||
},
|
||||
|
||||
"oColVis": {
|
||||
"aiExclude": [ 0, 1 ]
|
||||
},
|
||||
|
||||
"oColReorder": {
|
||||
"iFixedColumns": 2
|
||||
},
|
||||
|
||||
"oTableTools": {
|
||||
"sRowSelect": "multi",
|
||||
"aButtons": [],
|
||||
"fnPreRowSelect": function ( e ) {
|
||||
var node = e.currentTarget;
|
||||
//don't select separating rows, or shows without privileges.
|
||||
if ($(node).hasClass("sb-header")
|
||||
|| $(node).hasClass("sb-footer")
|
||||
|| $(node).hasClass("sb-not-allowed")){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
"fnRowSelected": function ( node ) {
|
||||
|
||||
//seems to happen if everything is selected
|
||||
if ( node === null) {
|
||||
oTable.find("input[type=checkbox]").attr("checked", true);
|
||||
}
|
||||
else {
|
||||
$(node).find("input[type=checkbox]").attr("checked", true);
|
||||
}
|
||||
},
|
||||
"fnRowDeselected": function ( node ) {
|
||||
|
||||
//seems to happen if everything is deselected
|
||||
if ( node === null) {
|
||||
oTable.find("input[type=checkbox]").attr("checked", false);
|
||||
}
|
||||
else {
|
||||
$(node).find("input[type=checkbox]").attr("checked", false);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// R = ColReorderResize, C = ColVis, T = TableTools
|
||||
"sDom": 'Rr<"H"CT<"#show_builder_toolbar">>t<"F">',
|
||||
|
||||
"sAjaxDataProp": "schedule",
|
||||
"sAjaxSource": "/showbuilder/builder-feed"
|
||||
});
|
||||
|
||||
$('[name="sb_cb_all"]').click(function(){
|
||||
var oTT = TableTools.fnGetInstance('show_builder_table');
|
||||
|
||||
if ($(this).is(":checked")) {
|
||||
var allowedNodes;
|
||||
|
||||
allowedNodes = oTable.find('tr:not(.sb-header):not(.sb-footer):not(.sb-not-allowed)');
|
||||
|
||||
allowedNodes.each(function(i, el){
|
||||
oTT.fnSelect(el);
|
||||
});
|
||||
}
|
||||
else {
|
||||
oTT.fnSelectNone();
|
||||
}
|
||||
});
|
||||
|
||||
$( "#show_builder_datepicker_start" ).datepicker(oBaseDatePickerSettings);
|
||||
|
||||
$( "#show_builder_timepicker_start" ).timepicker(oBaseTimePickerSettings);
|
||||
|
||||
$( "#show_builder_datepicker_end" ).datepicker(oBaseDatePickerSettings);
|
||||
|
||||
$( "#show_builder_timepicker_end" ).timepicker(oBaseTimePickerSettings);
|
||||
|
||||
$( "#show_builder_timerange_button" ).click(function(ev){
|
||||
var oSettings,
|
||||
oRange;
|
||||
|
||||
oRange = fnGetScheduleRange();
|
||||
|
||||
oSettings = oTable.fnSettings();
|
||||
oSettings.fnServerData.start = oRange.start;
|
||||
oSettings.fnServerData.end = oRange.end;
|
||||
|
||||
oTable.fnDraw();
|
||||
});
|
||||
|
||||
var sortableConf = (function(){
|
||||
var origRow,
|
||||
oItemData,
|
||||
oPrevData,
|
||||
fnAdd,
|
||||
fnMove,
|
||||
fnReceive,
|
||||
fnUpdate,
|
||||
oTT = TableTools.fnGetInstance('show_builder_table');
|
||||
|
||||
fnAdd = function() {
|
||||
var aMediaIds = [],
|
||||
aSchedIds = [];
|
||||
|
||||
aSchedIds.push({"id": oPrevData.id, "instance": oPrevData.instance});
|
||||
aMediaIds.push({"id": oItemData.id, "type": oItemData.ftype});
|
||||
|
||||
$.post("/showbuilder/schedule-add",
|
||||
{"format": "json", "mediaIds": aMediaIds, "schedIds": aSchedIds},
|
||||
function(json){
|
||||
oTT.fnSelectNone();
|
||||
oTable.fnDraw();
|
||||
});
|
||||
};
|
||||
|
||||
fnMove = function() {
|
||||
var aSelect = [],
|
||||
aAfter = [];
|
||||
|
||||
aSelect.push({"id": oItemData.id, "instance": oItemData.instance});
|
||||
aAfter.push({"id": oPrevData.id, "instance": oPrevData.instance});
|
||||
|
||||
$.post("/showbuilder/schedule-move",
|
||||
{"format": "json", "selectedItem": aSelect, "afterItem": aAfter},
|
||||
function(json){
|
||||
oTable.fnDraw();
|
||||
});
|
||||
};
|
||||
|
||||
fnReceive = function(event, ui) {
|
||||
origRow = ui.item;
|
||||
};
|
||||
|
||||
fnUpdate = function(event, ui) {
|
||||
oPrevData = ui.item.prev().data("aData");
|
||||
|
||||
//item was dragged in
|
||||
if (origRow !== undefined) {
|
||||
oItemData = origRow.data("aData");
|
||||
origRow = undefined;
|
||||
fnAdd();
|
||||
}
|
||||
//item was reordered.
|
||||
else {
|
||||
oItemData = ui.item.data("aData");
|
||||
fnMove();
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
placeholder: "placeholder show-builder-placeholder ui-state-highlight",
|
||||
forcePlaceholderSize: true,
|
||||
items: 'tr:not(:first):not(.sb-header):not(.sb-footer):not(.sb-not-allowed)',
|
||||
receive: fnReceive,
|
||||
update: fnUpdate,
|
||||
start: function(event, ui) {
|
||||
//ui.placeholder.html("PLACE HOLDER");
|
||||
},
|
||||
};
|
||||
}());
|
||||
|
||||
tableDiv.sortable(sortableConf);
|
||||
|
||||
$("#show_builder_toolbar")
|
||||
.append('<span class="ui-icon ui-icon-trash"></span>')
|
||||
.find(".ui-icon-trash")
|
||||
.click(fnRemoveSelectedItems);
|
||||
|
||||
});
|
|
@ -0,0 +1,377 @@
|
|||
/* jjmenu - context menu jquery plugin
|
||||
* http://jursza.net/dev/jjmenu/
|
||||
*
|
||||
* @author Jacek Jursza (okhan.pl@gmail.com)
|
||||
* @version 1.1.2
|
||||
* @date 2010-08-28
|
||||
* @category jQuery plugin
|
||||
* @copyright (c) 2009 Jacek Jursza (http://jursza.net/)
|
||||
* @licence MIT [http://www.opensource.org/licenses/mit-license.php]
|
||||
*/
|
||||
|
||||
(function($){
|
||||
|
||||
$.fn.jjmenu = function (clickEvent, param, myReplaces, effect) {
|
||||
|
||||
var global = this;
|
||||
var acceptEvent = false;
|
||||
|
||||
|
||||
if ( clickEvent == "rightClick" || clickEvent == "both" )
|
||||
{
|
||||
global.mousedown(function(event) {
|
||||
if (event.button == 2 && (clickEvent == "rightClick" || clickEvent == "both")) { // right click
|
||||
global.pageX = event.pageX;
|
||||
global.pageY = event.pageY;
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
var mmain = new menu("main", param, myReplaces, this, effect);
|
||||
$(this)[0].oncontextmenu = function() {
|
||||
return false;
|
||||
}
|
||||
$(this).unbind('mouseup');
|
||||
$(this).blur();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
document.body.oncontextmenu = function() {
|
||||
if ($("div[id^=jjmenu_main]").length) return false;
|
||||
}
|
||||
}
|
||||
|
||||
if ( clickEvent == "click" || clickEvent == "both" )
|
||||
{
|
||||
global.click(
|
||||
function(event) {
|
||||
if (this == event.currentTarget) {
|
||||
global.pageX = event.pageX;
|
||||
global.pageY = event.pageY;
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
var mmain = new menu("main", param, myReplaces, this, effect);
|
||||
$(this).blur();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).click(function(event) { if (event.button!=2) $("div[id^=jjmenu]").remove(); });
|
||||
|
||||
/* Menu obeject */
|
||||
function menu(id,param,myReplaces,el,effect) {
|
||||
|
||||
var effect = getEffect(id, effect);
|
||||
|
||||
if (id == "main") window.triggerElement = el;
|
||||
$("div[id^=jjmenu_"+id+"]").remove();
|
||||
|
||||
var m = document.createElement('div');
|
||||
var ms = document.createElement('span');
|
||||
$(m).append(ms);
|
||||
|
||||
m.className = "jjmenu"; m.id = "jjmenu_"+id;
|
||||
$(m).css({display:'none'});
|
||||
$(document.body).append(m);
|
||||
|
||||
positionMenu();
|
||||
|
||||
var dynamicItems = false;
|
||||
|
||||
for (var i in param) {
|
||||
|
||||
if (param[i].get) {
|
||||
|
||||
dynamicItems = true;
|
||||
$.getJSON(uReplace(param[i].get), function(data) {
|
||||
/* jjmenu doesn't provide ability to add callback function
|
||||
in case of error. So the error handling has to be included in
|
||||
the library itself */
|
||||
if(data.show_error == true){
|
||||
alert("The show instance doesn't exist anymore!");
|
||||
window.location.reload();
|
||||
}else if(data.playlist_error == true){
|
||||
alert("The playlist doesn't exist anymore!");
|
||||
window.location.reload();
|
||||
}
|
||||
for (var ii in data) {
|
||||
putItem(data[ii]);
|
||||
}
|
||||
checkPosition();
|
||||
})
|
||||
$(this).ajaxError( function() {
|
||||
checkPosition();
|
||||
});
|
||||
}
|
||||
else if (param[i].getByFunction) {
|
||||
|
||||
if (typeof(param[i].getByFunction) == "function") {
|
||||
var uF = param[i].getByFunction;
|
||||
}
|
||||
else {
|
||||
var uF = eval(param[i].getByFunction);
|
||||
}
|
||||
var uItems = uF(myReplaces);
|
||||
for (var ii in uItems) {
|
||||
putItem(uItems[ii]);
|
||||
}
|
||||
checkPosition();
|
||||
}
|
||||
else {
|
||||
putItem(param[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (!dynamicItems) checkPosition();
|
||||
showMenu();
|
||||
|
||||
/* first position menu */
|
||||
function positionMenu() {
|
||||
|
||||
var pos = $(el).offset();
|
||||
|
||||
var t = pos.top;
|
||||
|
||||
if (effect.xposition == "left") {
|
||||
var l = pos.left;
|
||||
}
|
||||
else {
|
||||
var l = pos.left+$(el).width()+10;
|
||||
}
|
||||
|
||||
if (effect.xposition == "mouse") {
|
||||
l = global.pageX;
|
||||
}
|
||||
if (effect.yposition == "mouse") {
|
||||
t = global.pageY;
|
||||
}
|
||||
|
||||
$(m).css({position:"absolute",top:t+"px",left:l+"px"});
|
||||
}
|
||||
|
||||
/* correct menu position */
|
||||
function checkPosition() {
|
||||
|
||||
var isHidden = $(m).css("display") == "none" ? true : false;
|
||||
var noAuto = false;
|
||||
|
||||
if (effect.orientation == "top" || effect.orientation == "bottom") {
|
||||
noAuto = true;
|
||||
}
|
||||
|
||||
if (isHidden) $(m).show();
|
||||
var positionTop = $(m).offset().top;
|
||||
var positionLeft = $(m).offset().left;
|
||||
if (isHidden) $(m).hide();
|
||||
|
||||
var xPos = positionTop - $(window).scrollTop();
|
||||
|
||||
$(m).css({left:"0px"});
|
||||
var menuHeight = $(m).outerHeight();
|
||||
var menuWidth = $(m).outerWidth();
|
||||
$(m).css({left:positionLeft+"px"});
|
||||
|
||||
var nleft = positionLeft;
|
||||
if ( positionLeft + menuWidth > $(window).width() ) {
|
||||
nleft = $(window).width() - menuWidth;
|
||||
}
|
||||
|
||||
var spaceBottom = true;
|
||||
if (effect.yposition == "auto" && effect.xposition == "left") {
|
||||
|
||||
if ( xPos + menuHeight + $(el).outerHeight() > $(window).height()) {
|
||||
spaceBottom = false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
if ( xPos + menuHeight > $(window).height()) {
|
||||
spaceBottom = false;
|
||||
}
|
||||
}
|
||||
|
||||
var spaceTop = true;
|
||||
if (positionTop - menuHeight < 0) {
|
||||
spaceTop = false;
|
||||
}
|
||||
|
||||
if (effect.yposition == "bottom") {
|
||||
positionTop = positionTop + $(el).outerHeight();
|
||||
}
|
||||
|
||||
if ( (effect.orientation == "auto" && spaceBottom == false && spaceTop == true) || effect.orientation == "top") {
|
||||
// top orientation
|
||||
var ntop = parseInt(positionTop,10) - parseInt(menuHeight,10);
|
||||
$(m).addClass("topOriented");
|
||||
|
||||
} else {
|
||||
// bottom orientation
|
||||
$(m).addClass("bottomOriented");
|
||||
if (effect.yposition == "auto" && effect.xposition == "left") {
|
||||
positionTop = positionTop + $(el).outerHeight();
|
||||
}
|
||||
var ntop = parseInt(positionTop,10);
|
||||
}
|
||||
|
||||
$(m).css({"top":ntop+"px", "left":nleft+"px"});
|
||||
}
|
||||
|
||||
/* show menu depends to effect.show */
|
||||
function showMenu() {
|
||||
|
||||
if (!effect || effect.show == "default") {
|
||||
$(m).show();
|
||||
return false;
|
||||
}
|
||||
|
||||
var speed = parseInt(effect.speed);
|
||||
speed = isNaN(speed) ? 500 : speed;
|
||||
|
||||
switch (effect.show)
|
||||
{
|
||||
case "fadeIn":
|
||||
$(m).fadeIn(speed);
|
||||
break;
|
||||
|
||||
case "slideDown":
|
||||
$(m).slideDown(speed);
|
||||
break;
|
||||
|
||||
default:
|
||||
$(m).show();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* put item to menu */
|
||||
function putItem(n) {
|
||||
|
||||
var item = document.createElement('div');
|
||||
$(item).hover(function(){
|
||||
$(this).addClass("jj_menu_item_hover")
|
||||
},
|
||||
function(){
|
||||
$(this).removeClass("jj_menu_item_hover")
|
||||
});
|
||||
|
||||
$(item).click( function(event) {
|
||||
event.stopPropagation();
|
||||
doAction(n.action);
|
||||
});
|
||||
|
||||
var span = document.createElement('span');
|
||||
$(item).append(span);
|
||||
|
||||
|
||||
switch (n.type)
|
||||
{
|
||||
case "sub":
|
||||
item.className = "jj_menu_item jj_menu_item_more";
|
||||
$(item).click(function() {
|
||||
if ($("#jjmenu_"+id+"_sub").length > 0) {
|
||||
$("div[id^=jjmenu_"+id+"_sub]").remove();
|
||||
}
|
||||
else {
|
||||
var sub = new menu(id+"_sub", n.src, myReplaces, this, effect);
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
||||
default:
|
||||
$(item).hover(function() { $("div[id^=jjmenu_"+id+"_sub]").remove(); });
|
||||
item.className = "jj_menu_item";
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (n.customClass && n.customClass.length>0) {
|
||||
jQuery(span).addClass(n.customClass);
|
||||
}
|
||||
|
||||
$(span).html(uReplace(n.title));
|
||||
$(ms).append(item);
|
||||
}
|
||||
|
||||
/* do action on menu item */
|
||||
function doAction(act) {
|
||||
|
||||
$("#jjmenu_main").hide();
|
||||
|
||||
if (act) {
|
||||
|
||||
switch (act.type) {
|
||||
|
||||
case "gourl":
|
||||
if (act.target) {
|
||||
var newWindow = window.open(uReplace(act.url), act.target);
|
||||
newWindow.focus();
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
document.location.href=uReplace(act.url);
|
||||
}
|
||||
break;
|
||||
|
||||
case "ajax":
|
||||
$.getJSON(uReplace(act.url), function(data) {
|
||||
|
||||
var cb = eval(act.callback);
|
||||
if (typeof(cb) == "function") {
|
||||
cb(data);
|
||||
}
|
||||
|
||||
});
|
||||
break;
|
||||
|
||||
case "fn":
|
||||
var callfn = 'var cb = '+act.callback;
|
||||
jQuery.globalEval(callfn);
|
||||
if (typeof(cb) == "function") {
|
||||
cb(myReplaces);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* replace string with user parameters */
|
||||
function uReplace(str) {
|
||||
if (myReplaces) {
|
||||
for (var u in myReplaces) {
|
||||
str = str.replace("#"+u+"#", eval("myReplaces."+u));
|
||||
}
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
/* get effect opbject */
|
||||
function getEffect(id, effect) {
|
||||
|
||||
var defEffect = {
|
||||
show:"default",
|
||||
xposition:"right",
|
||||
yposition:"auto",
|
||||
orientation:"auto"
|
||||
};
|
||||
|
||||
if (!effect) { return defEffect; }
|
||||
|
||||
if (!effect.show) effect.show = "default";
|
||||
|
||||
var show = effect.show;
|
||||
|
||||
if (!effect.xposition) effect.xposition = "right";
|
||||
if (!effect.yposition) effect.yposition = "auto";
|
||||
if (!effect.orientation) effect.orientation = "auto";
|
||||
|
||||
if (id != "main") {
|
||||
var subeffect = defEffect;
|
||||
subeffect.show = show;
|
||||
}
|
||||
|
||||
return ( id == "main" ) ? effect : subeffect;
|
||||
}
|
||||
} // !menu
|
||||
};
|
||||
|
||||
})(jQuery);
|
|
@ -44,7 +44,7 @@
|
|||
{
|
||||
global.click(
|
||||
function(event) {
|
||||
if (this == event.currentTarget) {
|
||||
if (this == event.target) {
|
||||
global.pageX = event.pageX;
|
||||
global.pageY = event.pageY;
|
||||
event.preventDefault();
|
||||
|
@ -84,16 +84,6 @@
|
|||
|
||||
dynamicItems = true;
|
||||
$.getJSON(uReplace(param[i].get), function(data) {
|
||||
/* jjmenu doesn't provide ability to add callback function
|
||||
in case of error. So the error handling has to be included in
|
||||
the library itself */
|
||||
if(data.show_error == true){
|
||||
alert("The show instance doesn't exist anymore!");
|
||||
window.location.reload();
|
||||
}else if(data.playlist_error == true){
|
||||
alert("The playlist doesn't exist anymore!");
|
||||
window.location.reload();
|
||||
}
|
||||
for (var ii in data) {
|
||||
putItem(data[ii]);
|
||||
}
|
||||
|
@ -295,8 +285,6 @@
|
|||
/* do action on menu item */
|
||||
function doAction(act) {
|
||||
|
||||
$("#jjmenu_main").hide();
|
||||
|
||||
if (act) {
|
||||
|
||||
switch (act.type) {
|
||||
|
@ -314,7 +302,7 @@
|
|||
|
||||
case "ajax":
|
||||
$.getJSON(uReplace(act.url), function(data) {
|
||||
|
||||
|
||||
var cb = eval(act.callback);
|
||||
if (typeof(cb) == "function") {
|
||||
cb(data);
|
||||
|
@ -374,4 +362,4 @@
|
|||
} // !menu
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
})(jQuery);
|
|
@ -1,151 +1,153 @@
|
|||
/*
|
||||
* File: jquery.dataTables.min.js
|
||||
* Version: 1.8.2
|
||||
* Version: 1.9.0
|
||||
* Author: Allan Jardine (www.sprymedia.co.uk)
|
||||
* Info: www.datatables.net
|
||||
*
|
||||
* Copyright 2008-2011 Allan Jardine, all rights reserved.
|
||||
* Copyright 2008-2012 Allan Jardine, all rights reserved.
|
||||
*
|
||||
* This source file is free software, under either the GPL v2 license or a
|
||||
* BSD style license, as supplied with this software.
|
||||
* BSD style license, available at:
|
||||
* http://datatables.net/license_gpl2
|
||||
* http://datatables.net/license_bsd
|
||||
*
|
||||
* This source file is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
|
||||
*/
|
||||
(function(i,za,p){i.fn.dataTableSettings=[];var D=i.fn.dataTableSettings;i.fn.dataTableExt={};var n=i.fn.dataTableExt;n.sVersion="1.8.2";n.sErrMode="alert";n.iApiIndex=0;n.oApi={};n.afnFiltering=[];n.aoFeatures=[];n.ofnSearch={};n.afnSortData=[];n.oStdClasses={sPagePrevEnabled:"paginate_enabled_previous",sPagePrevDisabled:"paginate_disabled_previous",sPageNextEnabled:"paginate_enabled_next",sPageNextDisabled:"paginate_disabled_next",sPageJUINext:"",sPageJUIPrev:"",sPageButton:"paginate_button",sPageButtonActive:"paginate_active",
|
||||
sPageButtonStaticDisabled:"paginate_button paginate_button_disabled",sPageFirst:"first",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",
|
||||
sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:""};n.oJUIClasses={sPagePrevEnabled:"fg-button ui-button ui-state-default ui-corner-left",
|
||||
sPagePrevDisabled:"fg-button ui-button ui-state-default ui-corner-left ui-state-disabled",sPageNextEnabled:"fg-button ui-button ui-state-default ui-corner-right",sPageNextDisabled:"fg-button ui-button ui-state-default ui-corner-right ui-state-disabled",sPageJUINext:"ui-icon ui-icon-circle-arrow-e",sPageJUIPrev:"ui-icon ui-icon-circle-arrow-w",sPageButton:"fg-button ui-button ui-state-default",sPageButtonActive:"fg-button ui-button ui-state-default ui-state-disabled",sPageButtonStaticDisabled:"fg-button ui-button ui-state-default ui-state-disabled",
|
||||
sPageFirst:"first ui-corner-tl ui-corner-bl",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last ui-corner-tr ui-corner-br",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"ui-state-default",sSortDesc:"ui-state-default",sSortable:"ui-state-default",
|
||||
sSortableAsc:"ui-state-default",sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default",sSortColumn:"sorting_",sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollWrapper:"dataTables_scroll",
|
||||
sScrollHead:"dataTables_scrollHead ui-state-default",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot ui-state-default",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:"ui-state-default"};n.oPagination={two_button:{fnInit:function(g,l,s){var t,w,y;if(g.bJUI){t=p.createElement("a");w=p.createElement("a");y=p.createElement("span");y.className=g.oClasses.sPageJUINext;w.appendChild(y);y=p.createElement("span");y.className=g.oClasses.sPageJUIPrev;
|
||||
t.appendChild(y)}else{t=p.createElement("div");w=p.createElement("div")}t.className=g.oClasses.sPagePrevDisabled;w.className=g.oClasses.sPageNextDisabled;t.title=g.oLanguage.oPaginate.sPrevious;w.title=g.oLanguage.oPaginate.sNext;l.appendChild(t);l.appendChild(w);i(t).bind("click.DT",function(){g.oApi._fnPageChange(g,"previous")&&s(g)});i(w).bind("click.DT",function(){g.oApi._fnPageChange(g,"next")&&s(g)});i(t).bind("selectstart.DT",function(){return false});i(w).bind("selectstart.DT",function(){return false});
|
||||
if(g.sTableId!==""&&typeof g.aanFeatures.p=="undefined"){l.setAttribute("id",g.sTableId+"_paginate");t.setAttribute("id",g.sTableId+"_previous");w.setAttribute("id",g.sTableId+"_next")}},fnUpdate:function(g){if(g.aanFeatures.p)for(var l=g.aanFeatures.p,s=0,t=l.length;s<t;s++)if(l[s].childNodes.length!==0){l[s].childNodes[0].className=g._iDisplayStart===0?g.oClasses.sPagePrevDisabled:g.oClasses.sPagePrevEnabled;l[s].childNodes[1].className=g.fnDisplayEnd()==g.fnRecordsDisplay()?g.oClasses.sPageNextDisabled:
|
||||
g.oClasses.sPageNextEnabled}}},iFullNumbersShowPages:5,full_numbers:{fnInit:function(g,l,s){var t=p.createElement("span"),w=p.createElement("span"),y=p.createElement("span"),F=p.createElement("span"),x=p.createElement("span");t.innerHTML=g.oLanguage.oPaginate.sFirst;w.innerHTML=g.oLanguage.oPaginate.sPrevious;F.innerHTML=g.oLanguage.oPaginate.sNext;x.innerHTML=g.oLanguage.oPaginate.sLast;var v=g.oClasses;t.className=v.sPageButton+" "+v.sPageFirst;w.className=v.sPageButton+" "+v.sPagePrevious;F.className=
|
||||
v.sPageButton+" "+v.sPageNext;x.className=v.sPageButton+" "+v.sPageLast;l.appendChild(t);l.appendChild(w);l.appendChild(y);l.appendChild(F);l.appendChild(x);i(t).bind("click.DT",function(){g.oApi._fnPageChange(g,"first")&&s(g)});i(w).bind("click.DT",function(){g.oApi._fnPageChange(g,"previous")&&s(g)});i(F).bind("click.DT",function(){g.oApi._fnPageChange(g,"next")&&s(g)});i(x).bind("click.DT",function(){g.oApi._fnPageChange(g,"last")&&s(g)});i("span",l).bind("mousedown.DT",function(){return false}).bind("selectstart.DT",
|
||||
function(){return false});if(g.sTableId!==""&&typeof g.aanFeatures.p=="undefined"){l.setAttribute("id",g.sTableId+"_paginate");t.setAttribute("id",g.sTableId+"_first");w.setAttribute("id",g.sTableId+"_previous");F.setAttribute("id",g.sTableId+"_next");x.setAttribute("id",g.sTableId+"_last")}},fnUpdate:function(g,l){if(g.aanFeatures.p){var s=n.oPagination.iFullNumbersShowPages,t=Math.floor(s/2),w=Math.ceil(g.fnRecordsDisplay()/g._iDisplayLength),y=Math.ceil(g._iDisplayStart/g._iDisplayLength)+1,F=
|
||||
"",x,v=g.oClasses;if(w<s){t=1;x=w}else if(y<=t){t=1;x=s}else if(y>=w-t){t=w-s+1;x=w}else{t=y-Math.ceil(s/2)+1;x=t+s-1}for(s=t;s<=x;s++)F+=y!=s?'<span class="'+v.sPageButton+'">'+s+"</span>":'<span class="'+v.sPageButtonActive+'">'+s+"</span>";x=g.aanFeatures.p;var z,$=function(M){g._iDisplayStart=(this.innerHTML*1-1)*g._iDisplayLength;l(g);M.preventDefault()},X=function(){return false};s=0;for(t=x.length;s<t;s++)if(x[s].childNodes.length!==0){z=i("span:eq(2)",x[s]);z.html(F);i("span",z).bind("click.DT",
|
||||
$).bind("mousedown.DT",X).bind("selectstart.DT",X);z=x[s].getElementsByTagName("span");z=[z[0],z[1],z[z.length-2],z[z.length-1]];i(z).removeClass(v.sPageButton+" "+v.sPageButtonActive+" "+v.sPageButtonStaticDisabled);if(y==1){z[0].className+=" "+v.sPageButtonStaticDisabled;z[1].className+=" "+v.sPageButtonStaticDisabled}else{z[0].className+=" "+v.sPageButton;z[1].className+=" "+v.sPageButton}if(w===0||y==w||g._iDisplayLength==-1){z[2].className+=" "+v.sPageButtonStaticDisabled;z[3].className+=" "+
|
||||
v.sPageButtonStaticDisabled}else{z[2].className+=" "+v.sPageButton;z[3].className+=" "+v.sPageButton}}}}}};n.oSort={"string-asc":function(g,l){if(typeof g!="string")g="";if(typeof l!="string")l="";g=g.toLowerCase();l=l.toLowerCase();return g<l?-1:g>l?1:0},"string-desc":function(g,l){if(typeof g!="string")g="";if(typeof l!="string")l="";g=g.toLowerCase();l=l.toLowerCase();return g<l?1:g>l?-1:0},"html-asc":function(g,l){g=g.replace(/<.*?>/g,"").toLowerCase();l=l.replace(/<.*?>/g,"").toLowerCase();return g<
|
||||
l?-1:g>l?1:0},"html-desc":function(g,l){g=g.replace(/<.*?>/g,"").toLowerCase();l=l.replace(/<.*?>/g,"").toLowerCase();return g<l?1:g>l?-1:0},"date-asc":function(g,l){g=Date.parse(g);l=Date.parse(l);if(isNaN(g)||g==="")g=Date.parse("01/01/1970 00:00:00");if(isNaN(l)||l==="")l=Date.parse("01/01/1970 00:00:00");return g-l},"date-desc":function(g,l){g=Date.parse(g);l=Date.parse(l);if(isNaN(g)||g==="")g=Date.parse("01/01/1970 00:00:00");if(isNaN(l)||l==="")l=Date.parse("01/01/1970 00:00:00");return l-
|
||||
g},"numeric-asc":function(g,l){return(g=="-"||g===""?0:g*1)-(l=="-"||l===""?0:l*1)},"numeric-desc":function(g,l){return(l=="-"||l===""?0:l*1)-(g=="-"||g===""?0:g*1)}};n.aTypes=[function(g){if(typeof g=="number")return"numeric";else if(typeof g!="string")return null;var l,s=false;l=g.charAt(0);if("0123456789-".indexOf(l)==-1)return null;for(var t=1;t<g.length;t++){l=g.charAt(t);if("0123456789.".indexOf(l)==-1)return null;if(l=="."){if(s)return null;s=true}}return"numeric"},function(g){var l=Date.parse(g);
|
||||
if(l!==null&&!isNaN(l)||typeof g=="string"&&g.length===0)return"date";return null},function(g){if(typeof g=="string"&&g.indexOf("<")!=-1&&g.indexOf(">")!=-1)return"html";return null}];n.fnVersionCheck=function(g){var l=function(x,v){for(;x.length<v;)x+="0";return x},s=n.sVersion.split(".");g=g.split(".");for(var t="",w="",y=0,F=g.length;y<F;y++){t+=l(s[y],3);w+=l(g[y],3)}return parseInt(t,10)>=parseInt(w,10)};n._oExternConfig={iNextUnique:0};i.fn.dataTable=function(g){function l(){this.fnRecordsTotal=
|
||||
function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsTotal,10):this.aiDisplayMaster.length};this.fnRecordsDisplay=function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsDisplay,10):this.aiDisplay.length};this.fnDisplayEnd=function(){return this.oFeatures.bServerSide?this.oFeatures.bPaginate===false||this._iDisplayLength==-1?this._iDisplayStart+this.aiDisplay.length:Math.min(this._iDisplayStart+this._iDisplayLength,this._iRecordsDisplay):this._iDisplayEnd};this.sInstance=
|
||||
this.oInstance=null;this.oFeatures={bPaginate:true,bLengthChange:true,bFilter:true,bSort:true,bInfo:true,bAutoWidth:true,bProcessing:false,bSortClasses:true,bStateSave:false,bServerSide:false,bDeferRender:false};this.oScroll={sX:"",sXInner:"",sY:"",bCollapse:false,bInfinite:false,iLoadGap:100,iBarWidth:0,bAutoCss:true};this.aanFeatures=[];this.oLanguage={sProcessing:"Processing...",sLengthMenu:"Show _MENU_ entries",sZeroRecords:"No matching records found",sEmptyTable:"No data available in table",
|
||||
sLoadingRecords:"Loading...",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sInfoThousands:",",sSearch:"Search:",sUrl:"",oPaginate:{sFirst:"First",sPrevious:"Previous",sNext:"Next",sLast:"Last"},fnInfoCallback:null};this.aoData=[];this.aiDisplay=[];this.aiDisplayMaster=[];this.aoColumns=[];this.aoHeader=[];this.aoFooter=[];this.iNextId=0;this.asDataSearch=[];this.oPreviousSearch={sSearch:"",
|
||||
bRegex:false,bSmart:true};this.aoPreSearchCols=[];this.aaSorting=[[0,"asc",0]];this.aaSortingFixed=null;this.asStripeClasses=[];this.asDestroyStripes=[];this.sDestroyWidth=0;this.fnFooterCallback=this.fnHeaderCallback=this.fnRowCallback=null;this.aoDrawCallback=[];this.fnInitComplete=this.fnPreDrawCallback=null;this.sTableId="";this.nTableWrapper=this.nTBody=this.nTFoot=this.nTHead=this.nTable=null;this.bInitialised=this.bDeferLoading=false;this.aoOpenRows=[];this.sDom="lfrtip";this.sPaginationType=
|
||||
"two_button";this.iCookieDuration=7200;this.sCookiePrefix="SpryMedia_DataTables_";this.fnCookieCallback=null;this.aoStateSave=[];this.aoStateLoad=[];this.sAjaxSource=this.oLoadedState=null;this.sAjaxDataProp="aaData";this.bAjaxDataGet=true;this.jqXHR=null;this.fnServerData=function(a,b,c,d){d.jqXHR=i.ajax({url:a,data:b,success:function(f){i(d.oInstance).trigger("xhr",d);c(f)},dataType:"json",cache:false,error:function(f,e){e=="parsererror"&&alert("DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.")}})};
|
||||
this.aoServerParams=[];this.fnFormatNumber=function(a){if(a<1E3)return a;else{var b=a+"";a=b.split("");var c="";b=b.length;for(var d=0;d<b;d++){if(d%3===0&&d!==0)c=this.oLanguage.sInfoThousands+c;c=a[b-d-1]+c}}return c};this.aLengthMenu=[10,25,50,100];this.bDrawing=this.iDraw=0;this.iDrawError=-1;this._iDisplayLength=10;this._iDisplayStart=0;this._iDisplayEnd=10;this._iRecordsDisplay=this._iRecordsTotal=0;this.bJUI=false;this.oClasses=n.oStdClasses;this.bSortCellsTop=this.bSorted=this.bFiltered=false;
|
||||
this.oInit=null;this.aoDestroyCallback=[]}function s(a){return function(){var b=[A(this[n.iApiIndex])].concat(Array.prototype.slice.call(arguments));return n.oApi[a].apply(this,b)}}function t(a){var b,c,d=a.iInitDisplayStart;if(a.bInitialised===false)setTimeout(function(){t(a)},200);else{Aa(a);X(a);M(a,a.aoHeader);a.nTFoot&&M(a,a.aoFooter);K(a,true);a.oFeatures.bAutoWidth&&ga(a);b=0;for(c=a.aoColumns.length;b<c;b++)if(a.aoColumns[b].sWidth!==null)a.aoColumns[b].nTh.style.width=q(a.aoColumns[b].sWidth);
|
||||
if(a.oFeatures.bSort)R(a);else if(a.oFeatures.bFilter)N(a,a.oPreviousSearch);else{a.aiDisplay=a.aiDisplayMaster.slice();E(a);C(a)}if(a.sAjaxSource!==null&&!a.oFeatures.bServerSide){c=[];ha(a,c);a.fnServerData.call(a.oInstance,a.sAjaxSource,c,function(f){var e=f;if(a.sAjaxDataProp!=="")e=aa(a.sAjaxDataProp)(f);for(b=0;b<e.length;b++)v(a,e[b]);a.iInitDisplayStart=d;if(a.oFeatures.bSort)R(a);else{a.aiDisplay=a.aiDisplayMaster.slice();E(a);C(a)}K(a,false);w(a,f)},a)}else if(!a.oFeatures.bServerSide){K(a,
|
||||
false);w(a)}}}function w(a,b){a._bInitComplete=true;if(typeof a.fnInitComplete=="function")typeof b!="undefined"?a.fnInitComplete.call(a.oInstance,a,b):a.fnInitComplete.call(a.oInstance,a)}function y(a,b,c){a.oLanguage=i.extend(true,a.oLanguage,b);typeof b.sEmptyTable=="undefined"&&typeof b.sZeroRecords!="undefined"&&o(a.oLanguage,b,"sZeroRecords","sEmptyTable");typeof b.sLoadingRecords=="undefined"&&typeof b.sZeroRecords!="undefined"&&o(a.oLanguage,b,"sZeroRecords","sLoadingRecords");c&&t(a)}function F(a,
|
||||
b){var c=a.aoColumns.length;b={sType:null,_bAutoType:true,bVisible:true,bSearchable:true,bSortable:true,asSorting:["asc","desc"],sSortingClass:a.oClasses.sSortable,sSortingClassJUI:a.oClasses.sSortJUI,sTitle:b?b.innerHTML:"",sName:"",sWidth:null,sWidthOrig:null,sClass:null,fnRender:null,bUseRendered:true,iDataSort:c,mDataProp:c,fnGetData:null,fnSetData:null,sSortDataType:"std",sDefaultContent:null,sContentPadding:"",nTh:b?b:p.createElement("th"),nTf:null};a.aoColumns.push(b);if(typeof a.aoPreSearchCols[c]==
|
||||
"undefined"||a.aoPreSearchCols[c]===null)a.aoPreSearchCols[c]={sSearch:"",bRegex:false,bSmart:true};else{if(typeof a.aoPreSearchCols[c].bRegex=="undefined")a.aoPreSearchCols[c].bRegex=true;if(typeof a.aoPreSearchCols[c].bSmart=="undefined")a.aoPreSearchCols[c].bSmart=true}x(a,c,null)}function x(a,b,c){b=a.aoColumns[b];if(typeof c!="undefined"&&c!==null){if(typeof c.sType!="undefined"){b.sType=c.sType;b._bAutoType=false}o(b,c,"bVisible");o(b,c,"bSearchable");o(b,c,"bSortable");o(b,c,"sTitle");o(b,
|
||||
c,"sName");o(b,c,"sWidth");o(b,c,"sWidth","sWidthOrig");o(b,c,"sClass");o(b,c,"fnRender");o(b,c,"bUseRendered");o(b,c,"iDataSort");o(b,c,"mDataProp");o(b,c,"asSorting");o(b,c,"sSortDataType");o(b,c,"sDefaultContent");o(b,c,"sContentPadding")}b.fnGetData=aa(b.mDataProp);b.fnSetData=Ba(b.mDataProp);if(!a.oFeatures.bSort)b.bSortable=false;if(!b.bSortable||i.inArray("asc",b.asSorting)==-1&&i.inArray("desc",b.asSorting)==-1){b.sSortingClass=a.oClasses.sSortableNone;b.sSortingClassJUI=""}else if(b.bSortable||
|
||||
i.inArray("asc",b.asSorting)==-1&&i.inArray("desc",b.asSorting)==-1){b.sSortingClass=a.oClasses.sSortable;b.sSortingClassJUI=a.oClasses.sSortJUI}else if(i.inArray("asc",b.asSorting)!=-1&&i.inArray("desc",b.asSorting)==-1){b.sSortingClass=a.oClasses.sSortableAsc;b.sSortingClassJUI=a.oClasses.sSortJUIAscAllowed}else if(i.inArray("asc",b.asSorting)==-1&&i.inArray("desc",b.asSorting)!=-1){b.sSortingClass=a.oClasses.sSortableDesc;b.sSortingClassJUI=a.oClasses.sSortJUIDescAllowed}}function v(a,b){var c;
|
||||
c=i.isArray(b)?b.slice():i.extend(true,{},b);b=a.aoData.length;var d={nTr:null,_iId:a.iNextId++,_aData:c,_anHidden:[],_sRowStripe:""};a.aoData.push(d);for(var f,e=0,h=a.aoColumns.length;e<h;e++){c=a.aoColumns[e];typeof c.fnRender=="function"&&c.bUseRendered&&c.mDataProp!==null&&O(a,b,e,c.fnRender({iDataRow:b,iDataColumn:e,aData:d._aData,oSettings:a}));if(c._bAutoType&&c.sType!="string"){f=G(a,b,e,"type");if(f!==null&&f!==""){f=ia(f);if(c.sType===null)c.sType=f;else if(c.sType!=f&&c.sType!="html")c.sType=
|
||||
"string"}}}a.aiDisplayMaster.push(b);a.oFeatures.bDeferRender||z(a,b);return b}function z(a,b){var c=a.aoData[b],d;if(c.nTr===null){c.nTr=p.createElement("tr");typeof c._aData.DT_RowId!="undefined"&&c.nTr.setAttribute("id",c._aData.DT_RowId);typeof c._aData.DT_RowClass!="undefined"&&i(c.nTr).addClass(c._aData.DT_RowClass);for(var f=0,e=a.aoColumns.length;f<e;f++){var h=a.aoColumns[f];d=p.createElement("td");d.innerHTML=typeof h.fnRender=="function"&&(!h.bUseRendered||h.mDataProp===null)?h.fnRender({iDataRow:b,
|
||||
iDataColumn:f,aData:c._aData,oSettings:a}):G(a,b,f,"display");if(h.sClass!==null)d.className=h.sClass;if(h.bVisible){c.nTr.appendChild(d);c._anHidden[f]=null}else c._anHidden[f]=d}}}function $(a){var b,c,d,f,e,h,j,k,m;if(a.bDeferLoading||a.sAjaxSource===null){j=a.nTBody.childNodes;b=0;for(c=j.length;b<c;b++)if(j[b].nodeName.toUpperCase()=="TR"){k=a.aoData.length;a.aoData.push({nTr:j[b],_iId:a.iNextId++,_aData:[],_anHidden:[],_sRowStripe:""});a.aiDisplayMaster.push(k);h=j[b].childNodes;d=e=0;for(f=
|
||||
h.length;d<f;d++){m=h[d].nodeName.toUpperCase();if(m=="TD"||m=="TH"){O(a,k,e,i.trim(h[d].innerHTML));e++}}}}j=ba(a);h=[];b=0;for(c=j.length;b<c;b++){d=0;for(f=j[b].childNodes.length;d<f;d++){e=j[b].childNodes[d];m=e.nodeName.toUpperCase();if(m=="TD"||m=="TH")h.push(e)}}h.length!=j.length*a.aoColumns.length&&J(a,1,"Unexpected number of TD elements. Expected "+j.length*a.aoColumns.length+" and got "+h.length+". DataTables does not support rowspan / colspan in the table body, and there must be one cell for each row/column combination.");
|
||||
d=0;for(f=a.aoColumns.length;d<f;d++){if(a.aoColumns[d].sTitle===null)a.aoColumns[d].sTitle=a.aoColumns[d].nTh.innerHTML;j=a.aoColumns[d]._bAutoType;m=typeof a.aoColumns[d].fnRender=="function";e=a.aoColumns[d].sClass!==null;k=a.aoColumns[d].bVisible;var u,r;if(j||m||e||!k){b=0;for(c=a.aoData.length;b<c;b++){u=h[b*f+d];if(j&&a.aoColumns[d].sType!="string"){r=G(a,b,d,"type");if(r!==""){r=ia(r);if(a.aoColumns[d].sType===null)a.aoColumns[d].sType=r;else if(a.aoColumns[d].sType!=r&&a.aoColumns[d].sType!=
|
||||
"html")a.aoColumns[d].sType="string"}}if(m){r=a.aoColumns[d].fnRender({iDataRow:b,iDataColumn:d,aData:a.aoData[b]._aData,oSettings:a});u.innerHTML=r;a.aoColumns[d].bUseRendered&&O(a,b,d,r)}if(e)u.className+=" "+a.aoColumns[d].sClass;if(k)a.aoData[b]._anHidden[d]=null;else{a.aoData[b]._anHidden[d]=u;u.parentNode.removeChild(u)}}}}}function X(a){var b,c,d;a.nTHead.getElementsByTagName("tr");if(a.nTHead.getElementsByTagName("th").length!==0){b=0;for(d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;
|
||||
a.aoColumns[b].sClass!==null&&i(c).addClass(a.aoColumns[b].sClass);if(a.aoColumns[b].sTitle!=c.innerHTML)c.innerHTML=a.aoColumns[b].sTitle}}else{var f=p.createElement("tr");b=0;for(d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;c.innerHTML=a.aoColumns[b].sTitle;a.aoColumns[b].sClass!==null&&i(c).addClass(a.aoColumns[b].sClass);f.appendChild(c)}i(a.nTHead).html("")[0].appendChild(f);Y(a.aoHeader,a.nTHead)}if(a.bJUI){b=0;for(d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;f=p.createElement("div");
|
||||
f.className=a.oClasses.sSortJUIWrapper;i(c).contents().appendTo(f);var e=p.createElement("span");e.className=a.oClasses.sSortIcon;f.appendChild(e);c.appendChild(f)}}d=function(){this.onselectstart=function(){return false};return false};if(a.oFeatures.bSort)for(b=0;b<a.aoColumns.length;b++)if(a.aoColumns[b].bSortable!==false){ja(a,a.aoColumns[b].nTh,b);i(a.aoColumns[b].nTh).bind("mousedown.DT",d)}else i(a.aoColumns[b].nTh).addClass(a.oClasses.sSortableNone);a.oClasses.sFooterTH!==""&&i(a.nTFoot).children("tr").children("th").addClass(a.oClasses.sFooterTH);
|
||||
if(a.nTFoot!==null){c=S(a,null,a.aoFooter);b=0;for(d=a.aoColumns.length;b<d;b++)if(typeof c[b]!="undefined")a.aoColumns[b].nTf=c[b]}}function M(a,b,c){var d,f,e,h=[],j=[],k=a.aoColumns.length;if(typeof c=="undefined")c=false;d=0;for(f=b.length;d<f;d++){h[d]=b[d].slice();h[d].nTr=b[d].nTr;for(e=k-1;e>=0;e--)!a.aoColumns[e].bVisible&&!c&&h[d].splice(e,1);j.push([])}d=0;for(f=h.length;d<f;d++){if(h[d].nTr){a=0;for(e=h[d].nTr.childNodes.length;a<e;a++)h[d].nTr.removeChild(h[d].nTr.childNodes[0])}e=0;
|
||||
for(b=h[d].length;e<b;e++){k=c=1;if(typeof j[d][e]=="undefined"){h[d].nTr.appendChild(h[d][e].cell);for(j[d][e]=1;typeof h[d+c]!="undefined"&&h[d][e].cell==h[d+c][e].cell;){j[d+c][e]=1;c++}for(;typeof h[d][e+k]!="undefined"&&h[d][e].cell==h[d][e+k].cell;){for(a=0;a<c;a++)j[d+a][e+k]=1;k++}h[d][e].cell.rowSpan=c;h[d][e].cell.colSpan=k}}}}function C(a){var b,c,d=[],f=0,e=false;b=a.asStripeClasses.length;c=a.aoOpenRows.length;if(!(a.fnPreDrawCallback!==null&&a.fnPreDrawCallback.call(a.oInstance,a)===
|
||||
false)){a.bDrawing=true;if(typeof a.iInitDisplayStart!="undefined"&&a.iInitDisplayStart!=-1){a._iDisplayStart=a.oFeatures.bServerSide?a.iInitDisplayStart:a.iInitDisplayStart>=a.fnRecordsDisplay()?0:a.iInitDisplayStart;a.iInitDisplayStart=-1;E(a)}if(a.bDeferLoading){a.bDeferLoading=false;a.iDraw++}else if(a.oFeatures.bServerSide){if(!a.bDestroying&&!Ca(a))return}else a.iDraw++;if(a.aiDisplay.length!==0){var h=a._iDisplayStart,j=a._iDisplayEnd;if(a.oFeatures.bServerSide){h=0;j=a.aoData.length}for(h=
|
||||
h;h<j;h++){var k=a.aoData[a.aiDisplay[h]];k.nTr===null&&z(a,a.aiDisplay[h]);var m=k.nTr;if(b!==0){var u=a.asStripeClasses[f%b];if(k._sRowStripe!=u){i(m).removeClass(k._sRowStripe).addClass(u);k._sRowStripe=u}}if(typeof a.fnRowCallback=="function"){m=a.fnRowCallback.call(a.oInstance,m,a.aoData[a.aiDisplay[h]]._aData,f,h);if(!m&&!e){J(a,0,"A node was not returned by fnRowCallback");e=true}}d.push(m);f++;if(c!==0)for(k=0;k<c;k++)m==a.aoOpenRows[k].nParent&&d.push(a.aoOpenRows[k].nTr)}}else{d[0]=p.createElement("tr");
|
||||
if(typeof a.asStripeClasses[0]!="undefined")d[0].className=a.asStripeClasses[0];e=a.oLanguage.sZeroRecords.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()));if(a.iDraw==1&&a.sAjaxSource!==null&&!a.oFeatures.bServerSide)e=a.oLanguage.sLoadingRecords;else if(typeof a.oLanguage.sEmptyTable!="undefined"&&a.fnRecordsTotal()===0)e=a.oLanguage.sEmptyTable;b=p.createElement("td");b.setAttribute("valign","top");b.colSpan=Z(a);b.className=a.oClasses.sRowEmpty;b.innerHTML=e;d[f].appendChild(b)}typeof a.fnHeaderCallback==
|
||||
"function"&&a.fnHeaderCallback.call(a.oInstance,i(a.nTHead).children("tr")[0],ca(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay);typeof a.fnFooterCallback=="function"&&a.fnFooterCallback.call(a.oInstance,i(a.nTFoot).children("tr")[0],ca(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay);f=p.createDocumentFragment();b=p.createDocumentFragment();if(a.nTBody){e=a.nTBody.parentNode;b.appendChild(a.nTBody);if(!a.oScroll.bInfinite||!a._bInitComplete||a.bSorted||a.bFiltered){c=a.nTBody.childNodes;for(b=
|
||||
c.length-1;b>=0;b--)c[b].parentNode.removeChild(c[b])}b=0;for(c=d.length;b<c;b++)f.appendChild(d[b]);a.nTBody.appendChild(f);e!==null&&e.appendChild(a.nTBody)}for(b=a.aoDrawCallback.length-1;b>=0;b--)a.aoDrawCallback[b].fn.call(a.oInstance,a);i(a.oInstance).trigger("draw",a);a.bSorted=false;a.bFiltered=false;a.bDrawing=false;if(a.oFeatures.bServerSide){K(a,false);typeof a._bInitComplete=="undefined"&&w(a)}}}function da(a){if(a.oFeatures.bSort)R(a,a.oPreviousSearch);else if(a.oFeatures.bFilter)N(a,
|
||||
a.oPreviousSearch);else{E(a);C(a)}}function Ca(a){if(a.bAjaxDataGet){a.iDraw++;K(a,true);var b=Da(a);ha(a,b);a.fnServerData.call(a.oInstance,a.sAjaxSource,b,function(c){Ea(a,c)},a);return false}else return true}function Da(a){var b=a.aoColumns.length,c=[],d,f;c.push({name:"sEcho",value:a.iDraw});c.push({name:"iColumns",value:b});c.push({name:"sColumns",value:ka(a)});c.push({name:"iDisplayStart",value:a._iDisplayStart});c.push({name:"iDisplayLength",value:a.oFeatures.bPaginate!==false?a._iDisplayLength:
|
||||
-1});for(f=0;f<b;f++){d=a.aoColumns[f].mDataProp;c.push({name:"mDataProp_"+f,value:typeof d=="function"?"function":d})}if(a.oFeatures.bFilter!==false){c.push({name:"sSearch",value:a.oPreviousSearch.sSearch});c.push({name:"bRegex",value:a.oPreviousSearch.bRegex});for(f=0;f<b;f++){c.push({name:"sSearch_"+f,value:a.aoPreSearchCols[f].sSearch});c.push({name:"bRegex_"+f,value:a.aoPreSearchCols[f].bRegex});c.push({name:"bSearchable_"+f,value:a.aoColumns[f].bSearchable})}}if(a.oFeatures.bSort!==false){d=
|
||||
a.aaSortingFixed!==null?a.aaSortingFixed.length:0;var e=a.aaSorting.length;c.push({name:"iSortingCols",value:d+e});for(f=0;f<d;f++){c.push({name:"iSortCol_"+f,value:a.aaSortingFixed[f][0]});c.push({name:"sSortDir_"+f,value:a.aaSortingFixed[f][1]})}for(f=0;f<e;f++){c.push({name:"iSortCol_"+(f+d),value:a.aaSorting[f][0]});c.push({name:"sSortDir_"+(f+d),value:a.aaSorting[f][1]})}for(f=0;f<b;f++)c.push({name:"bSortable_"+f,value:a.aoColumns[f].bSortable})}return c}function ha(a,b){for(var c=0,d=a.aoServerParams.length;c<
|
||||
d;c++)a.aoServerParams[c].fn.call(a.oInstance,b)}function Ea(a,b){if(typeof b.sEcho!="undefined")if(b.sEcho*1<a.iDraw)return;else a.iDraw=b.sEcho*1;if(!a.oScroll.bInfinite||a.oScroll.bInfinite&&(a.bSorted||a.bFiltered))la(a);a._iRecordsTotal=b.iTotalRecords;a._iRecordsDisplay=b.iTotalDisplayRecords;var c=ka(a);if(c=typeof b.sColumns!="undefined"&&c!==""&&b.sColumns!=c)var d=Fa(a,b.sColumns);b=aa(a.sAjaxDataProp)(b);for(var f=0,e=b.length;f<e;f++)if(c){for(var h=[],j=0,k=a.aoColumns.length;j<k;j++)h.push(b[f][d[j]]);
|
||||
v(a,h)}else v(a,b[f]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=false;C(a);a.bAjaxDataGet=true;K(a,false)}function Aa(a){var b=p.createElement("div");a.nTable.parentNode.insertBefore(b,a.nTable);a.nTableWrapper=p.createElement("div");a.nTableWrapper.className=a.oClasses.sWrapper;a.sTableId!==""&&a.nTableWrapper.setAttribute("id",a.sTableId+"_wrapper");a.nTableReinsertBefore=a.nTable.nextSibling;for(var c=a.nTableWrapper,d=a.sDom.split(""),f,e,h,j,k,m,u,r=0;r<d.length;r++){e=0;h=d[r];if(h==
|
||||
"<"){j=p.createElement("div");k=d[r+1];if(k=="'"||k=='"'){m="";for(u=2;d[r+u]!=k;){m+=d[r+u];u++}if(m=="H")m="fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix";else if(m=="F")m="fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix";if(m.indexOf(".")!=-1){k=m.split(".");j.setAttribute("id",k[0].substr(1,k[0].length-1));j.className=k[1]}else if(m.charAt(0)=="#")j.setAttribute("id",m.substr(1,m.length-1));else j.className=m;r+=u}c.appendChild(j);
|
||||
c=j}else if(h==">")c=c.parentNode;else if(h=="l"&&a.oFeatures.bPaginate&&a.oFeatures.bLengthChange){f=Ga(a);e=1}else if(h=="f"&&a.oFeatures.bFilter){f=Ha(a);e=1}else if(h=="r"&&a.oFeatures.bProcessing){f=Ia(a);e=1}else if(h=="t"){f=Ja(a);e=1}else if(h=="i"&&a.oFeatures.bInfo){f=Ka(a);e=1}else if(h=="p"&&a.oFeatures.bPaginate){f=La(a);e=1}else if(n.aoFeatures.length!==0){j=n.aoFeatures;u=0;for(k=j.length;u<k;u++)if(h==j[u].cFeature){if(f=j[u].fnInit(a))e=1;break}}if(e==1&&f!==null){if(typeof a.aanFeatures[h]!=
|
||||
"object")a.aanFeatures[h]=[];a.aanFeatures[h].push(f);c.appendChild(f)}}b.parentNode.replaceChild(a.nTableWrapper,b)}function Ja(a){if(a.oScroll.sX===""&&a.oScroll.sY==="")return a.nTable;var b=p.createElement("div"),c=p.createElement("div"),d=p.createElement("div"),f=p.createElement("div"),e=p.createElement("div"),h=p.createElement("div"),j=a.nTable.cloneNode(false),k=a.nTable.cloneNode(false),m=a.nTable.getElementsByTagName("thead")[0],u=a.nTable.getElementsByTagName("tfoot").length===0?null:a.nTable.getElementsByTagName("tfoot")[0],
|
||||
r=typeof g.bJQueryUI!="undefined"&&g.bJQueryUI?n.oJUIClasses:n.oStdClasses;c.appendChild(d);e.appendChild(h);f.appendChild(a.nTable);b.appendChild(c);b.appendChild(f);d.appendChild(j);j.appendChild(m);if(u!==null){b.appendChild(e);h.appendChild(k);k.appendChild(u)}b.className=r.sScrollWrapper;c.className=r.sScrollHead;d.className=r.sScrollHeadInner;f.className=r.sScrollBody;e.className=r.sScrollFoot;h.className=r.sScrollFootInner;if(a.oScroll.bAutoCss){c.style.overflow="hidden";c.style.position="relative";
|
||||
e.style.overflow="hidden";f.style.overflow="auto"}c.style.border="0";c.style.width="100%";e.style.border="0";d.style.width="150%";j.removeAttribute("id");j.style.marginLeft="0";a.nTable.style.marginLeft="0";if(u!==null){k.removeAttribute("id");k.style.marginLeft="0"}d=i(a.nTable).children("caption");h=0;for(k=d.length;h<k;h++)j.appendChild(d[h]);if(a.oScroll.sX!==""){c.style.width=q(a.oScroll.sX);f.style.width=q(a.oScroll.sX);if(u!==null)e.style.width=q(a.oScroll.sX);i(f).scroll(function(){c.scrollLeft=
|
||||
this.scrollLeft;if(u!==null)e.scrollLeft=this.scrollLeft})}if(a.oScroll.sY!=="")f.style.height=q(a.oScroll.sY);a.aoDrawCallback.push({fn:Ma,sName:"scrolling"});a.oScroll.bInfinite&&i(f).scroll(function(){if(!a.bDrawing)if(i(this).scrollTop()+i(this).height()>i(a.nTable).height()-a.oScroll.iLoadGap)if(a.fnDisplayEnd()<a.fnRecordsDisplay()){ma(a,"next");E(a);C(a)}});a.nScrollHead=c;a.nScrollFoot=e;return b}function Ma(a){var b=a.nScrollHead.getElementsByTagName("div")[0],c=b.getElementsByTagName("table")[0],
|
||||
d=a.nTable.parentNode,f,e,h,j,k,m,u,r,H=[],L=a.nTFoot!==null?a.nScrollFoot.getElementsByTagName("div")[0]:null,T=a.nTFoot!==null?L.getElementsByTagName("table")[0]:null,B=i.browser.msie&&i.browser.version<=7;h=a.nTable.getElementsByTagName("thead");h.length>0&&a.nTable.removeChild(h[0]);if(a.nTFoot!==null){k=a.nTable.getElementsByTagName("tfoot");k.length>0&&a.nTable.removeChild(k[0])}h=a.nTHead.cloneNode(true);a.nTable.insertBefore(h,a.nTable.childNodes[0]);if(a.nTFoot!==null){k=a.nTFoot.cloneNode(true);
|
||||
a.nTable.insertBefore(k,a.nTable.childNodes[1])}if(a.oScroll.sX===""){d.style.width="100%";b.parentNode.style.width="100%"}var U=S(a,h);f=0;for(e=U.length;f<e;f++){u=Na(a,f);U[f].style.width=a.aoColumns[u].sWidth}a.nTFoot!==null&&P(function(I){I.style.width=""},k.getElementsByTagName("tr"));f=i(a.nTable).outerWidth();if(a.oScroll.sX===""){a.nTable.style.width="100%";if(B&&(d.scrollHeight>d.offsetHeight||i(d).css("overflow-y")=="scroll"))a.nTable.style.width=q(i(a.nTable).outerWidth()-a.oScroll.iBarWidth)}else if(a.oScroll.sXInner!==
|
||||
"")a.nTable.style.width=q(a.oScroll.sXInner);else if(f==i(d).width()&&i(d).height()<i(a.nTable).height()){a.nTable.style.width=q(f-a.oScroll.iBarWidth);if(i(a.nTable).outerWidth()>f-a.oScroll.iBarWidth)a.nTable.style.width=q(f)}else a.nTable.style.width=q(f);f=i(a.nTable).outerWidth();e=a.nTHead.getElementsByTagName("tr");h=h.getElementsByTagName("tr");P(function(I,na){m=I.style;m.paddingTop="0";m.paddingBottom="0";m.borderTopWidth="0";m.borderBottomWidth="0";m.height=0;r=i(I).width();na.style.width=
|
||||
q(r);H.push(r)},h,e);i(h).height(0);if(a.nTFoot!==null){j=k.getElementsByTagName("tr");k=a.nTFoot.getElementsByTagName("tr");P(function(I,na){m=I.style;m.paddingTop="0";m.paddingBottom="0";m.borderTopWidth="0";m.borderBottomWidth="0";m.height=0;r=i(I).width();na.style.width=q(r);H.push(r)},j,k);i(j).height(0)}P(function(I){I.innerHTML="";I.style.width=q(H.shift())},h);a.nTFoot!==null&&P(function(I){I.innerHTML="";I.style.width=q(H.shift())},j);if(i(a.nTable).outerWidth()<f){j=d.scrollHeight>d.offsetHeight||
|
||||
i(d).css("overflow-y")=="scroll"?f+a.oScroll.iBarWidth:f;if(B&&(d.scrollHeight>d.offsetHeight||i(d).css("overflow-y")=="scroll"))a.nTable.style.width=q(j-a.oScroll.iBarWidth);d.style.width=q(j);b.parentNode.style.width=q(j);if(a.nTFoot!==null)L.parentNode.style.width=q(j);if(a.oScroll.sX==="")J(a,1,"The table cannot fit into the current element which will cause column misalignment. The table has been drawn at its minimum possible width.");else a.oScroll.sXInner!==""&&J(a,1,"The table cannot fit into the current element which will cause column misalignment. Increase the sScrollXInner value or remove it to allow automatic calculation")}else{d.style.width=
|
||||
q("100%");b.parentNode.style.width=q("100%");if(a.nTFoot!==null)L.parentNode.style.width=q("100%")}if(a.oScroll.sY==="")if(B)d.style.height=q(a.nTable.offsetHeight+a.oScroll.iBarWidth);if(a.oScroll.sY!==""&&a.oScroll.bCollapse){d.style.height=q(a.oScroll.sY);B=a.oScroll.sX!==""&&a.nTable.offsetWidth>d.offsetWidth?a.oScroll.iBarWidth:0;if(a.nTable.offsetHeight<d.offsetHeight)d.style.height=q(i(a.nTable).height()+B)}B=i(a.nTable).outerWidth();c.style.width=q(B);b.style.width=q(B+a.oScroll.iBarWidth);
|
||||
if(a.nTFoot!==null){L.style.width=q(a.nTable.offsetWidth+a.oScroll.iBarWidth);T.style.width=q(a.nTable.offsetWidth)}if(a.bSorted||a.bFiltered)d.scrollTop=0}function ea(a){if(a.oFeatures.bAutoWidth===false)return false;ga(a);for(var b=0,c=a.aoColumns.length;b<c;b++)a.aoColumns[b].nTh.style.width=a.aoColumns[b].sWidth}function Ha(a){var b=a.oLanguage.sSearch;b=b.indexOf("_INPUT_")!==-1?b.replace("_INPUT_",'<input type="text" />'):b===""?'<input type="text" />':b+' <input type="text" />';var c=p.createElement("div");
|
||||
c.className=a.oClasses.sFilter;c.innerHTML="<label>"+b+"</label>";a.sTableId!==""&&typeof a.aanFeatures.f=="undefined"&&c.setAttribute("id",a.sTableId+"_filter");b=i("input",c);b.val(a.oPreviousSearch.sSearch.replace('"',"""));b.bind("keyup.DT",function(){for(var d=a.aanFeatures.f,f=0,e=d.length;f<e;f++)d[f]!=i(this).parents("div.dataTables_filter")[0]&&i("input",d[f]).val(this.value);this.value!=a.oPreviousSearch.sSearch&&N(a,{sSearch:this.value,bRegex:a.oPreviousSearch.bRegex,bSmart:a.oPreviousSearch.bSmart})});
|
||||
b.bind("keypress.DT",function(d){if(d.keyCode==13)return false});return c}function N(a,b,c){Oa(a,b.sSearch,c,b.bRegex,b.bSmart);for(b=0;b<a.aoPreSearchCols.length;b++)Pa(a,a.aoPreSearchCols[b].sSearch,b,a.aoPreSearchCols[b].bRegex,a.aoPreSearchCols[b].bSmart);n.afnFiltering.length!==0&&Qa(a);a.bFiltered=true;i(a.oInstance).trigger("filter",a);a._iDisplayStart=0;E(a);C(a);oa(a,0)}function Qa(a){for(var b=n.afnFiltering,c=0,d=b.length;c<d;c++)for(var f=0,e=0,h=a.aiDisplay.length;e<h;e++){var j=a.aiDisplay[e-
|
||||
f];if(!b[c](a,fa(a,j,"filter"),j)){a.aiDisplay.splice(e-f,1);f++}}}function Pa(a,b,c,d,f){if(b!==""){var e=0;b=pa(b,d,f);for(d=a.aiDisplay.length-1;d>=0;d--){f=qa(G(a,a.aiDisplay[d],c,"filter"),a.aoColumns[c].sType);if(!b.test(f)){a.aiDisplay.splice(d,1);e++}}}}function Oa(a,b,c,d,f){var e=pa(b,d,f);if(typeof c=="undefined"||c===null)c=0;if(n.afnFiltering.length!==0)c=1;if(b.length<=0){a.aiDisplay.splice(0,a.aiDisplay.length);a.aiDisplay=a.aiDisplayMaster.slice()}else if(a.aiDisplay.length==a.aiDisplayMaster.length||
|
||||
a.oPreviousSearch.sSearch.length>b.length||c==1||b.indexOf(a.oPreviousSearch.sSearch)!==0){a.aiDisplay.splice(0,a.aiDisplay.length);oa(a,1);for(c=0;c<a.aiDisplayMaster.length;c++)e.test(a.asDataSearch[c])&&a.aiDisplay.push(a.aiDisplayMaster[c])}else{var h=0;for(c=0;c<a.asDataSearch.length;c++)if(!e.test(a.asDataSearch[c])){a.aiDisplay.splice(c-h,1);h++}}a.oPreviousSearch.sSearch=b;a.oPreviousSearch.bRegex=d;a.oPreviousSearch.bSmart=f}function oa(a,b){if(!a.oFeatures.bServerSide){a.asDataSearch.splice(0,
|
||||
a.asDataSearch.length);b=typeof b!="undefined"&&b==1?a.aiDisplayMaster:a.aiDisplay;for(var c=0,d=b.length;c<d;c++)a.asDataSearch[c]=ra(a,fa(a,b[c],"filter"))}}function ra(a,b){var c="";if(typeof a.__nTmpFilter=="undefined")a.__nTmpFilter=p.createElement("div");for(var d=a.__nTmpFilter,f=0,e=a.aoColumns.length;f<e;f++)if(a.aoColumns[f].bSearchable)c+=qa(b[f],a.aoColumns[f].sType)+" ";if(c.indexOf("&")!==-1){d.innerHTML=c;c=d.textContent?d.textContent:d.innerText;c=c.replace(/\n/g," ").replace(/\r/g,
|
||||
"")}return c}function pa(a,b,c){if(c){a=b?a.split(" "):sa(a).split(" ");a="^(?=.*?"+a.join(")(?=.*?")+").*$";return new RegExp(a,"i")}else{a=b?a:sa(a);return new RegExp(a,"i")}}function qa(a,b){if(typeof n.ofnSearch[b]=="function")return n.ofnSearch[b](a);else if(b=="html")return a.replace(/\n/g," ").replace(/<.*?>/g,"");else if(typeof a=="string")return a.replace(/\n/g," ");else if(a===null)return"";return a}function R(a,b){var c,d,f,e,h=[],j=[],k=n.oSort;d=a.aoData;var m=a.aoColumns;if(!a.oFeatures.bServerSide&&
|
||||
(a.aaSorting.length!==0||a.aaSortingFixed!==null)){h=a.aaSortingFixed!==null?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(c=0;c<h.length;c++){var u=h[c][0];f=ta(a,u);e=a.aoColumns[u].sSortDataType;if(typeof n.afnSortData[e]!="undefined"){var r=n.afnSortData[e](a,u,f);f=0;for(e=d.length;f<e;f++)O(a,f,u,r[f])}}c=0;for(d=a.aiDisplayMaster.length;c<d;c++)j[a.aiDisplayMaster[c]]=c;var H=h.length;a.aiDisplayMaster.sort(function(L,T){var B,U;for(c=0;c<H;c++){B=m[h[c][0]].iDataSort;U=m[B].sType;
|
||||
B=k[(U?U:"string")+"-"+h[c][1]](G(a,L,B,"sort"),G(a,T,B,"sort"));if(B!==0)return B}return k["numeric-asc"](j[L],j[T])})}if((typeof b=="undefined"||b)&&!a.oFeatures.bDeferRender)V(a);a.bSorted=true;i(a.oInstance).trigger("sort",a);if(a.oFeatures.bFilter)N(a,a.oPreviousSearch,1);else{a.aiDisplay=a.aiDisplayMaster.slice();a._iDisplayStart=0;E(a);C(a)}}function ja(a,b,c,d){i(b).bind("click.DT",function(f){if(a.aoColumns[c].bSortable!==false){var e=function(){var h,j;if(f.shiftKey){for(var k=false,m=0;m<
|
||||
a.aaSorting.length;m++)if(a.aaSorting[m][0]==c){k=true;h=a.aaSorting[m][0];j=a.aaSorting[m][2]+1;if(typeof a.aoColumns[h].asSorting[j]=="undefined")a.aaSorting.splice(m,1);else{a.aaSorting[m][1]=a.aoColumns[h].asSorting[j];a.aaSorting[m][2]=j}break}k===false&&a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0])}else if(a.aaSorting.length==1&&a.aaSorting[0][0]==c){h=a.aaSorting[0][0];j=a.aaSorting[0][2]+1;if(typeof a.aoColumns[h].asSorting[j]=="undefined")j=0;a.aaSorting[0][1]=a.aoColumns[h].asSorting[j];
|
||||
a.aaSorting[0][2]=j}else{a.aaSorting.splice(0,a.aaSorting.length);a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0])}R(a)};if(a.oFeatures.bProcessing){K(a,true);setTimeout(function(){e();a.oFeatures.bServerSide||K(a,false)},0)}else e();typeof d=="function"&&d(a)}})}function V(a){var b,c,d,f,e,h=a.aoColumns.length,j=a.oClasses;for(b=0;b<h;b++)a.aoColumns[b].bSortable&&i(a.aoColumns[b].nTh).removeClass(j.sSortAsc+" "+j.sSortDesc+" "+a.aoColumns[b].sSortingClass);f=a.aaSortingFixed!==null?a.aaSortingFixed.concat(a.aaSorting):
|
||||
a.aaSorting.slice();for(b=0;b<a.aoColumns.length;b++)if(a.aoColumns[b].bSortable){e=a.aoColumns[b].sSortingClass;d=-1;for(c=0;c<f.length;c++)if(f[c][0]==b){e=f[c][1]=="asc"?j.sSortAsc:j.sSortDesc;d=c;break}i(a.aoColumns[b].nTh).addClass(e);if(a.bJUI){c=i("span",a.aoColumns[b].nTh);c.removeClass(j.sSortJUIAsc+" "+j.sSortJUIDesc+" "+j.sSortJUI+" "+j.sSortJUIAscAllowed+" "+j.sSortJUIDescAllowed);c.addClass(d==-1?a.aoColumns[b].sSortingClassJUI:f[d][1]=="asc"?j.sSortJUIAsc:j.sSortJUIDesc)}}else i(a.aoColumns[b].nTh).addClass(a.aoColumns[b].sSortingClass);
|
||||
e=j.sSortColumn;if(a.oFeatures.bSort&&a.oFeatures.bSortClasses){d=Q(a);if(a.oFeatures.bDeferRender)i(d).removeClass(e+"1 "+e+"2 "+e+"3");else if(d.length>=h)for(b=0;b<h;b++)if(d[b].className.indexOf(e+"1")!=-1){c=0;for(a=d.length/h;c<a;c++)d[h*c+b].className=i.trim(d[h*c+b].className.replace(e+"1",""))}else if(d[b].className.indexOf(e+"2")!=-1){c=0;for(a=d.length/h;c<a;c++)d[h*c+b].className=i.trim(d[h*c+b].className.replace(e+"2",""))}else if(d[b].className.indexOf(e+"3")!=-1){c=0;for(a=d.length/
|
||||
h;c<a;c++)d[h*c+b].className=i.trim(d[h*c+b].className.replace(" "+e+"3",""))}j=1;var k;for(b=0;b<f.length;b++){k=parseInt(f[b][0],10);c=0;for(a=d.length/h;c<a;c++)d[h*c+k].className+=" "+e+j;j<3&&j++}}}function La(a){if(a.oScroll.bInfinite)return null;var b=p.createElement("div");b.className=a.oClasses.sPaging+a.sPaginationType;n.oPagination[a.sPaginationType].fnInit(a,b,function(c){E(c);C(c)});typeof a.aanFeatures.p=="undefined"&&a.aoDrawCallback.push({fn:function(c){n.oPagination[c.sPaginationType].fnUpdate(c,
|
||||
function(d){E(d);C(d)})},sName:"pagination"});return b}function ma(a,b){var c=a._iDisplayStart;if(b=="first")a._iDisplayStart=0;else if(b=="previous"){a._iDisplayStart=a._iDisplayLength>=0?a._iDisplayStart-a._iDisplayLength:0;if(a._iDisplayStart<0)a._iDisplayStart=0}else if(b=="next")if(a._iDisplayLength>=0){if(a._iDisplayStart+a._iDisplayLength<a.fnRecordsDisplay())a._iDisplayStart+=a._iDisplayLength}else a._iDisplayStart=0;else if(b=="last")if(a._iDisplayLength>=0){b=parseInt((a.fnRecordsDisplay()-
|
||||
1)/a._iDisplayLength,10)+1;a._iDisplayStart=(b-1)*a._iDisplayLength}else a._iDisplayStart=0;else J(a,0,"Unknown paging action: "+b);i(a.oInstance).trigger("page",a);return c!=a._iDisplayStart}function Ka(a){var b=p.createElement("div");b.className=a.oClasses.sInfo;if(typeof a.aanFeatures.i=="undefined"){a.aoDrawCallback.push({fn:Ra,sName:"information"});a.sTableId!==""&&b.setAttribute("id",a.sTableId+"_info")}return b}function Ra(a){if(!(!a.oFeatures.bInfo||a.aanFeatures.i.length===0)){var b=a._iDisplayStart+
|
||||
1,c=a.fnDisplayEnd(),d=a.fnRecordsTotal(),f=a.fnRecordsDisplay(),e=a.fnFormatNumber(b),h=a.fnFormatNumber(c),j=a.fnFormatNumber(d),k=a.fnFormatNumber(f);if(a.oScroll.bInfinite)e=a.fnFormatNumber(1);e=a.fnRecordsDisplay()===0&&a.fnRecordsDisplay()==a.fnRecordsTotal()?a.oLanguage.sInfoEmpty+a.oLanguage.sInfoPostFix:a.fnRecordsDisplay()===0?a.oLanguage.sInfoEmpty+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",j)+a.oLanguage.sInfoPostFix:a.fnRecordsDisplay()==a.fnRecordsTotal()?a.oLanguage.sInfo.replace("_START_",
|
||||
e).replace("_END_",h).replace("_TOTAL_",k)+a.oLanguage.sInfoPostFix:a.oLanguage.sInfo.replace("_START_",e).replace("_END_",h).replace("_TOTAL_",k)+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()))+a.oLanguage.sInfoPostFix;if(a.oLanguage.fnInfoCallback!==null)e=a.oLanguage.fnInfoCallback(a,b,c,d,f,e);a=a.aanFeatures.i;b=0;for(c=a.length;b<c;b++)i(a[b]).html(e)}}function Ga(a){if(a.oScroll.bInfinite)return null;var b='<select size="1" '+(a.sTableId===""?"":'name="'+
|
||||
a.sTableId+'_length"')+">",c,d;if(a.aLengthMenu.length==2&&typeof a.aLengthMenu[0]=="object"&&typeof a.aLengthMenu[1]=="object"){c=0;for(d=a.aLengthMenu[0].length;c<d;c++)b+='<option value="'+a.aLengthMenu[0][c]+'">'+a.aLengthMenu[1][c]+"</option>"}else{c=0;for(d=a.aLengthMenu.length;c<d;c++)b+='<option value="'+a.aLengthMenu[c]+'">'+a.aLengthMenu[c]+"</option>"}b+="</select>";var f=p.createElement("div");a.sTableId!==""&&typeof a.aanFeatures.l=="undefined"&&f.setAttribute("id",a.sTableId+"_length");
|
||||
f.className=a.oClasses.sLength;f.innerHTML="<label>"+a.oLanguage.sLengthMenu.replace("_MENU_",b)+"</label>";i('select option[value="'+a._iDisplayLength+'"]',f).attr("selected",true);i("select",f).bind("change.DT",function(){var e=i(this).val(),h=a.aanFeatures.l;c=0;for(d=h.length;c<d;c++)h[c]!=this.parentNode&&i("select",h[c]).val(e);a._iDisplayLength=parseInt(e,10);E(a);if(a.fnDisplayEnd()==a.fnRecordsDisplay()){a._iDisplayStart=a.fnDisplayEnd()-a._iDisplayLength;if(a._iDisplayStart<0)a._iDisplayStart=
|
||||
0}if(a._iDisplayLength==-1)a._iDisplayStart=0;C(a)});return f}function Ia(a){var b=p.createElement("div");a.sTableId!==""&&typeof a.aanFeatures.r=="undefined"&&b.setAttribute("id",a.sTableId+"_processing");b.innerHTML=a.oLanguage.sProcessing;b.className=a.oClasses.sProcessing;a.nTable.parentNode.insertBefore(b,a.nTable);return b}function K(a,b){if(a.oFeatures.bProcessing){a=a.aanFeatures.r;for(var c=0,d=a.length;c<d;c++)a[c].style.visibility=b?"visible":"hidden"}}function Na(a,b){for(var c=-1,d=0;d<
|
||||
a.aoColumns.length;d++){a.aoColumns[d].bVisible===true&&c++;if(c==b)return d}return null}function ta(a,b){for(var c=-1,d=0;d<a.aoColumns.length;d++){a.aoColumns[d].bVisible===true&&c++;if(d==b)return a.aoColumns[d].bVisible===true?c:null}return null}function W(a,b){var c,d;c=a._iDisplayStart;for(d=a._iDisplayEnd;c<d;c++)if(a.aoData[a.aiDisplay[c]].nTr==b)return a.aiDisplay[c];c=0;for(d=a.aoData.length;c<d;c++)if(a.aoData[c].nTr==b)return c;return null}function Z(a){for(var b=0,c=0;c<a.aoColumns.length;c++)a.aoColumns[c].bVisible===
|
||||
true&&b++;return b}function E(a){a._iDisplayEnd=a.oFeatures.bPaginate===false?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength>a.aiDisplay.length||a._iDisplayLength==-1?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength}function Sa(a,b){if(!a||a===null||a==="")return 0;if(typeof b=="undefined")b=p.getElementsByTagName("body")[0];var c=p.createElement("div");c.style.width=q(a);b.appendChild(c);a=c.offsetWidth;b.removeChild(c);return a}function ga(a){var b=0,c,d=0,f=a.aoColumns.length,e,h=i("th",
|
||||
a.nTHead);for(e=0;e<f;e++)if(a.aoColumns[e].bVisible){d++;if(a.aoColumns[e].sWidth!==null){c=Sa(a.aoColumns[e].sWidthOrig,a.nTable.parentNode);if(c!==null)a.aoColumns[e].sWidth=q(c);b++}}if(f==h.length&&b===0&&d==f&&a.oScroll.sX===""&&a.oScroll.sY==="")for(e=0;e<a.aoColumns.length;e++){c=i(h[e]).width();if(c!==null)a.aoColumns[e].sWidth=q(c)}else{b=a.nTable.cloneNode(false);e=a.nTHead.cloneNode(true);d=p.createElement("tbody");c=p.createElement("tr");b.removeAttribute("id");b.appendChild(e);if(a.nTFoot!==
|
||||
null){b.appendChild(a.nTFoot.cloneNode(true));P(function(k){k.style.width=""},b.getElementsByTagName("tr"))}b.appendChild(d);d.appendChild(c);d=i("thead th",b);if(d.length===0)d=i("tbody tr:eq(0)>td",b);h=S(a,e);for(e=d=0;e<f;e++){var j=a.aoColumns[e];if(j.bVisible&&j.sWidthOrig!==null&&j.sWidthOrig!=="")h[e-d].style.width=q(j.sWidthOrig);else if(j.bVisible)h[e-d].style.width="";else d++}for(e=0;e<f;e++)if(a.aoColumns[e].bVisible){d=Ta(a,e);if(d!==null){d=d.cloneNode(true);if(a.aoColumns[e].sContentPadding!==
|
||||
"")d.innerHTML+=a.aoColumns[e].sContentPadding;c.appendChild(d)}}f=a.nTable.parentNode;f.appendChild(b);if(a.oScroll.sX!==""&&a.oScroll.sXInner!=="")b.style.width=q(a.oScroll.sXInner);else if(a.oScroll.sX!==""){b.style.width="";if(i(b).width()<f.offsetWidth)b.style.width=q(f.offsetWidth)}else if(a.oScroll.sY!=="")b.style.width=q(f.offsetWidth);b.style.visibility="hidden";Ua(a,b);f=i("tbody tr:eq(0)",b).children();if(f.length===0)f=S(a,i("thead",b)[0]);if(a.oScroll.sX!==""){for(e=d=c=0;e<a.aoColumns.length;e++)if(a.aoColumns[e].bVisible){c+=
|
||||
a.aoColumns[e].sWidthOrig===null?i(f[d]).outerWidth():parseInt(a.aoColumns[e].sWidth.replace("px",""),10)+(i(f[d]).outerWidth()-i(f[d]).width());d++}b.style.width=q(c);a.nTable.style.width=q(c)}for(e=d=0;e<a.aoColumns.length;e++)if(a.aoColumns[e].bVisible){c=i(f[d]).width();if(c!==null&&c>0)a.aoColumns[e].sWidth=q(c);d++}a.nTable.style.width=q(i(b).outerWidth());b.parentNode.removeChild(b)}}function Ua(a,b){if(a.oScroll.sX===""&&a.oScroll.sY!==""){i(b).width();b.style.width=q(i(b).outerWidth()-a.oScroll.iBarWidth)}else if(a.oScroll.sX!==
|
||||
"")b.style.width=q(i(b).outerWidth())}function Ta(a,b){var c=Va(a,b);if(c<0)return null;if(a.aoData[c].nTr===null){var d=p.createElement("td");d.innerHTML=G(a,c,b,"");return d}return Q(a,c)[b]}function Va(a,b){for(var c=-1,d=-1,f=0;f<a.aoData.length;f++){var e=G(a,f,b,"display")+"";e=e.replace(/<.*?>/g,"");if(e.length>c){c=e.length;d=f}}return d}function q(a){if(a===null)return"0px";if(typeof a=="number"){if(a<0)return"0px";return a+"px"}var b=a.charCodeAt(a.length-1);if(b<48||b>57)return a;return a+
|
||||
"px"}function Za(a,b){if(a.length!=b.length)return 1;for(var c=0;c<a.length;c++)if(a[c]!=b[c])return 2;return 0}function ia(a){for(var b=n.aTypes,c=b.length,d=0;d<c;d++){var f=b[d](a);if(f!==null)return f}return"string"}function A(a){for(var b=0;b<D.length;b++)if(D[b].nTable==a)return D[b];return null}function ca(a){for(var b=[],c=a.aoData.length,d=0;d<c;d++)b.push(a.aoData[d]._aData);return b}function ba(a){for(var b=[],c=0,d=a.aoData.length;c<d;c++)a.aoData[c].nTr!==null&&b.push(a.aoData[c].nTr);
|
||||
return b}function Q(a,b){var c=[],d,f,e,h,j;f=0;var k=a.aoData.length;if(typeof b!="undefined"){f=b;k=b+1}for(f=f;f<k;f++){j=a.aoData[f];if(j.nTr!==null){b=[];e=0;for(h=j.nTr.childNodes.length;e<h;e++){d=j.nTr.childNodes[e].nodeName.toLowerCase();if(d=="td"||d=="th")b.push(j.nTr.childNodes[e])}e=d=0;for(h=a.aoColumns.length;e<h;e++)if(a.aoColumns[e].bVisible)c.push(b[e-d]);else{c.push(j._anHidden[e]);d++}}}return c}function sa(a){return a.replace(new RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^)",
|
||||
"g"),"\\$1")}function ua(a,b){for(var c=-1,d=0,f=a.length;d<f;d++)if(a[d]==b)c=d;else a[d]>b&&a[d]--;c!=-1&&a.splice(c,1)}function Fa(a,b){b=b.split(",");for(var c=[],d=0,f=a.aoColumns.length;d<f;d++)for(var e=0;e<f;e++)if(a.aoColumns[d].sName==b[e]){c.push(e);break}return c}function ka(a){for(var b="",c=0,d=a.aoColumns.length;c<d;c++)b+=a.aoColumns[c].sName+",";if(b.length==d)return"";return b.slice(0,-1)}function J(a,b,c){a=a.sTableId===""?"DataTables warning: "+c:"DataTables warning (table id = '"+
|
||||
a.sTableId+"'): "+c;if(b===0)if(n.sErrMode=="alert")alert(a);else throw a;else typeof console!="undefined"&&typeof console.log!="undefined"&&console.log(a)}function la(a){a.aoData.splice(0,a.aoData.length);a.aiDisplayMaster.splice(0,a.aiDisplayMaster.length);a.aiDisplay.splice(0,a.aiDisplay.length);E(a)}function va(a){if(!(!a.oFeatures.bStateSave||typeof a.bDestroying!="undefined")){var b,c,d,f="{";f+='"iCreate":'+(new Date).getTime()+",";f+='"iStart":'+(a.oScroll.bInfinite?0:a._iDisplayStart)+",";
|
||||
f+='"iEnd":'+(a.oScroll.bInfinite?a._iDisplayLength:a._iDisplayEnd)+",";f+='"iLength":'+a._iDisplayLength+",";f+='"sFilter":"'+encodeURIComponent(a.oPreviousSearch.sSearch)+'",';f+='"sFilterEsc":'+!a.oPreviousSearch.bRegex+",";f+='"aaSorting":[ ';for(b=0;b<a.aaSorting.length;b++)f+="["+a.aaSorting[b][0]+',"'+a.aaSorting[b][1]+'"],';f=f.substring(0,f.length-1);f+="],";f+='"aaSearchCols":[ ';for(b=0;b<a.aoPreSearchCols.length;b++)f+='["'+encodeURIComponent(a.aoPreSearchCols[b].sSearch)+'",'+!a.aoPreSearchCols[b].bRegex+
|
||||
"],";f=f.substring(0,f.length-1);f+="],";f+='"abVisCols":[ ';for(b=0;b<a.aoColumns.length;b++)f+=a.aoColumns[b].bVisible+",";f=f.substring(0,f.length-1);f+="]";b=0;for(c=a.aoStateSave.length;b<c;b++){d=a.aoStateSave[b].fn(a,f);if(d!=="")f=d}f+="}";Wa(a.sCookiePrefix+a.sInstance,f,a.iCookieDuration,a.sCookiePrefix,a.fnCookieCallback)}}function Xa(a,b){if(a.oFeatures.bStateSave){var c,d,f;d=wa(a.sCookiePrefix+a.sInstance);if(d!==null&&d!==""){try{c=typeof i.parseJSON=="function"?i.parseJSON(d.replace(/'/g,
|
||||
'"')):eval("("+d+")")}catch(e){return}d=0;for(f=a.aoStateLoad.length;d<f;d++)if(!a.aoStateLoad[d].fn(a,c))return;a.oLoadedState=i.extend(true,{},c);a._iDisplayStart=c.iStart;a.iInitDisplayStart=c.iStart;a._iDisplayEnd=c.iEnd;a._iDisplayLength=c.iLength;a.oPreviousSearch.sSearch=decodeURIComponent(c.sFilter);a.aaSorting=c.aaSorting.slice();a.saved_aaSorting=c.aaSorting.slice();if(typeof c.sFilterEsc!="undefined")a.oPreviousSearch.bRegex=!c.sFilterEsc;if(typeof c.aaSearchCols!="undefined")for(d=0;d<
|
||||
c.aaSearchCols.length;d++)a.aoPreSearchCols[d]={sSearch:decodeURIComponent(c.aaSearchCols[d][0]),bRegex:!c.aaSearchCols[d][1]};if(typeof c.abVisCols!="undefined"){b.saved_aoColumns=[];for(d=0;d<c.abVisCols.length;d++){b.saved_aoColumns[d]={};b.saved_aoColumns[d].bVisible=c.abVisCols[d]}}}}}function Wa(a,b,c,d,f){var e=new Date;e.setTime(e.getTime()+c*1E3);c=za.location.pathname.split("/");a=a+"_"+c.pop().replace(/[\/:]/g,"").toLowerCase();var h;if(f!==null){h=typeof i.parseJSON=="function"?i.parseJSON(b):
|
||||
eval("("+b+")");b=f(a,h,e.toGMTString(),c.join("/")+"/")}else b=a+"="+encodeURIComponent(b)+"; expires="+e.toGMTString()+"; path="+c.join("/")+"/";f="";e=9999999999999;if((wa(a)!==null?p.cookie.length:b.length+p.cookie.length)+10>4096){a=p.cookie.split(";");for(var j=0,k=a.length;j<k;j++)if(a[j].indexOf(d)!=-1){var m=a[j].split("=");try{h=eval("("+decodeURIComponent(m[1])+")")}catch(u){continue}if(typeof h.iCreate!="undefined"&&h.iCreate<e){f=m[0];e=h.iCreate}}if(f!=="")p.cookie=f+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+
|
||||
c.join("/")+"/"}p.cookie=b}function wa(a){var b=za.location.pathname.split("/");a=a+"_"+b[b.length-1].replace(/[\/:]/g,"").toLowerCase()+"=";b=p.cookie.split(";");for(var c=0;c<b.length;c++){for(var d=b[c];d.charAt(0)==" ";)d=d.substring(1,d.length);if(d.indexOf(a)===0)return decodeURIComponent(d.substring(a.length,d.length))}return null}function Y(a,b){b=i(b).children("tr");var c,d,f,e,h,j,k,m,u=function(L,T,B){for(;typeof L[T][B]!="undefined";)B++;return B};a.splice(0,a.length);d=0;for(j=b.length;d<
|
||||
j;d++)a.push([]);d=0;for(j=b.length;d<j;d++){f=0;for(k=b[d].childNodes.length;f<k;f++){c=b[d].childNodes[f];if(c.nodeName.toUpperCase()=="TD"||c.nodeName.toUpperCase()=="TH"){var r=c.getAttribute("colspan")*1,H=c.getAttribute("rowspan")*1;r=!r||r===0||r===1?1:r;H=!H||H===0||H===1?1:H;m=u(a,d,0);for(h=0;h<r;h++)for(e=0;e<H;e++){a[d+e][m+h]={cell:c,unique:r==1?true:false};a[d+e].nTr=b[d]}}}}}function S(a,b,c){var d=[];if(typeof c=="undefined"){c=a.aoHeader;if(typeof b!="undefined"){c=[];Y(c,b)}}b=0;
|
||||
for(var f=c.length;b<f;b++)for(var e=0,h=c[b].length;e<h;e++)if(c[b][e].unique&&(typeof d[e]=="undefined"||!a.bSortCellsTop))d[e]=c[b][e].cell;return d}function Ya(){var a=p.createElement("p"),b=a.style;b.width="100%";b.height="200px";b.padding="0px";var c=p.createElement("div");b=c.style;b.position="absolute";b.top="0px";b.left="0px";b.visibility="hidden";b.width="200px";b.height="150px";b.padding="0px";b.overflow="hidden";c.appendChild(a);p.body.appendChild(c);b=a.offsetWidth;c.style.overflow="scroll";
|
||||
a=a.offsetWidth;if(b==a)a=c.clientWidth;p.body.removeChild(c);return b-a}function P(a,b,c){for(var d=0,f=b.length;d<f;d++)for(var e=0,h=b[d].childNodes.length;e<h;e++)if(b[d].childNodes[e].nodeType==1)typeof c!="undefined"?a(b[d].childNodes[e],c[d].childNodes[e]):a(b[d].childNodes[e])}function o(a,b,c,d){if(typeof d=="undefined")d=c;if(typeof b[c]!="undefined")a[d]=b[c]}function fa(a,b,c){for(var d=[],f=0,e=a.aoColumns.length;f<e;f++)d.push(G(a,b,f,c));return d}function G(a,b,c,d){var f=a.aoColumns[c];
|
||||
if((c=f.fnGetData(a.aoData[b]._aData))===undefined){if(a.iDrawError!=a.iDraw&&f.sDefaultContent===null){J(a,0,"Requested unknown parameter '"+f.mDataProp+"' from the data source for row "+b);a.iDrawError=a.iDraw}return f.sDefaultContent}if(c===null&&f.sDefaultContent!==null)c=f.sDefaultContent;else if(typeof c=="function")return c();if(d=="display"&&c===null)return"";return c}function O(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d)}function aa(a){if(a===null)return function(){return null};
|
||||
else if(typeof a=="function")return function(c){return a(c)};else if(typeof a=="string"&&a.indexOf(".")!=-1){var b=a.split(".");return b.length==2?function(c){return c[b[0]][b[1]]}:b.length==3?function(c){return c[b[0]][b[1]][b[2]]}:function(c){for(var d=0,f=b.length;d<f;d++)c=c[b[d]];return c}}else return function(c){return c[a]}}function Ba(a){if(a===null)return function(){};else if(typeof a=="function")return function(c,d){return a(c,d)};else if(typeof a=="string"&&a.indexOf(".")!=-1){var b=a.split(".");
|
||||
return b.length==2?function(c,d){c[b[0]][b[1]]=d}:b.length==3?function(c,d){c[b[0]][b[1]][b[2]]=d}:function(c,d){for(var f=0,e=b.length-1;f<e;f++)c=c[b[f]];c[b[b.length-1]]=d}}else return function(c,d){c[a]=d}}this.oApi={};this.fnDraw=function(a){var b=A(this[n.iApiIndex]);if(typeof a!="undefined"&&a===false){E(b);C(b)}else da(b)};this.fnFilter=function(a,b,c,d,f){var e=A(this[n.iApiIndex]);if(e.oFeatures.bFilter){if(typeof c=="undefined")c=false;if(typeof d=="undefined")d=true;if(typeof f=="undefined")f=
|
||||
true;if(typeof b=="undefined"||b===null){N(e,{sSearch:a,bRegex:c,bSmart:d},1);if(f&&typeof e.aanFeatures.f!="undefined"){b=e.aanFeatures.f;c=0;for(d=b.length;c<d;c++)i("input",b[c]).val(a)}}else{e.aoPreSearchCols[b].sSearch=a;e.aoPreSearchCols[b].bRegex=c;e.aoPreSearchCols[b].bSmart=d;N(e,e.oPreviousSearch,1)}}};this.fnSettings=function(){return A(this[n.iApiIndex])};this.fnVersionCheck=n.fnVersionCheck;this.fnSort=function(a){var b=A(this[n.iApiIndex]);b.aaSorting=a;R(b)};this.fnSortListener=function(a,
|
||||
b,c){ja(A(this[n.iApiIndex]),a,b,c)};this.fnAddData=function(a,b){if(a.length===0)return[];var c=[],d,f=A(this[n.iApiIndex]);if(typeof a[0]=="object")for(var e=0;e<a.length;e++){d=v(f,a[e]);if(d==-1)return c;c.push(d)}else{d=v(f,a);if(d==-1)return c;c.push(d)}f.aiDisplay=f.aiDisplayMaster.slice();if(typeof b=="undefined"||b)da(f);return c};this.fnDeleteRow=function(a,b,c){var d=A(this[n.iApiIndex]);a=typeof a=="object"?W(d,a):a;var f=d.aoData.splice(a,1),e=i.inArray(a,d.aiDisplay);d.asDataSearch.splice(e,
|
||||
1);ua(d.aiDisplayMaster,a);ua(d.aiDisplay,a);typeof b=="function"&&b.call(this,d,f);if(d._iDisplayStart>=d.aiDisplay.length){d._iDisplayStart-=d._iDisplayLength;if(d._iDisplayStart<0)d._iDisplayStart=0}if(typeof c=="undefined"||c){E(d);C(d)}return f};this.fnClearTable=function(a){var b=A(this[n.iApiIndex]);la(b);if(typeof a=="undefined"||a)C(b)};this.fnOpen=function(a,b,c){var d=A(this[n.iApiIndex]);this.fnClose(a);var f=p.createElement("tr"),e=p.createElement("td");f.appendChild(e);e.className=c;
|
||||
e.colSpan=Z(d);if(typeof b.jquery!="undefined"||typeof b=="object")e.appendChild(b);else e.innerHTML=b;b=i("tr",d.nTBody);i.inArray(a,b)!=-1&&i(f).insertAfter(a);d.aoOpenRows.push({nTr:f,nParent:a});return f};this.fnClose=function(a){for(var b=A(this[n.iApiIndex]),c=0;c<b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a){(a=b.aoOpenRows[c].nTr.parentNode)&&a.removeChild(b.aoOpenRows[c].nTr);b.aoOpenRows.splice(c,1);return 0}return 1};this.fnGetData=function(a,b){var c=A(this[n.iApiIndex]);if(typeof a!=
|
||||
"undefined"){a=typeof a=="object"?W(c,a):a;if(typeof b!="undefined")return G(c,a,b,"");return typeof c.aoData[a]!="undefined"?c.aoData[a]._aData:null}return ca(c)};this.fnGetNodes=function(a){var b=A(this[n.iApiIndex]);if(typeof a!="undefined")return typeof b.aoData[a]!="undefined"?b.aoData[a].nTr:null;return ba(b)};this.fnGetPosition=function(a){var b=A(this[n.iApiIndex]),c=a.nodeName.toUpperCase();if(c=="TR")return W(b,a);else if(c=="TD"||c=="TH"){c=W(b,a.parentNode);for(var d=Q(b,c),f=0;f<b.aoColumns.length;f++)if(d[f]==
|
||||
a)return[c,ta(b,f),f]}return null};this.fnUpdate=function(a,b,c,d,f){var e=A(this[n.iApiIndex]);b=typeof b=="object"?W(e,b):b;if(i.isArray(a)&&typeof a=="object"){e.aoData[b]._aData=a.slice();for(c=0;c<e.aoColumns.length;c++)this.fnUpdate(G(e,b,c),b,c,false,false)}else if(a!==null&&typeof a=="object"){e.aoData[b]._aData=i.extend(true,{},a);for(c=0;c<e.aoColumns.length;c++)this.fnUpdate(G(e,b,c),b,c,false,false)}else{a=a;O(e,b,c,a);if(e.aoColumns[c].fnRender!==null){a=e.aoColumns[c].fnRender({iDataRow:b,
|
||||
iDataColumn:c,aData:e.aoData[b]._aData,oSettings:e});e.aoColumns[c].bUseRendered&&O(e,b,c,a)}if(e.aoData[b].nTr!==null)Q(e,b)[c].innerHTML=a}c=i.inArray(b,e.aiDisplay);e.asDataSearch[c]=ra(e,fa(e,b,"filter"));if(typeof f=="undefined"||f)ea(e);if(typeof d=="undefined"||d)da(e);return 0};this.fnSetColumnVis=function(a,b,c){var d=A(this[n.iApiIndex]),f,e;e=d.aoColumns.length;var h,j;if(d.aoColumns[a].bVisible!=b){if(b){for(f=j=0;f<a;f++)d.aoColumns[f].bVisible&&j++;j=j>=Z(d);if(!j)for(f=a;f<e;f++)if(d.aoColumns[f].bVisible){h=
|
||||
f;break}f=0;for(e=d.aoData.length;f<e;f++)if(d.aoData[f].nTr!==null)j?d.aoData[f].nTr.appendChild(d.aoData[f]._anHidden[a]):d.aoData[f].nTr.insertBefore(d.aoData[f]._anHidden[a],Q(d,f)[h])}else{f=0;for(e=d.aoData.length;f<e;f++)if(d.aoData[f].nTr!==null){h=Q(d,f)[a];d.aoData[f]._anHidden[a]=h;h.parentNode.removeChild(h)}}d.aoColumns[a].bVisible=b;M(d,d.aoHeader);d.nTFoot&&M(d,d.aoFooter);f=0;for(e=d.aoOpenRows.length;f<e;f++)d.aoOpenRows[f].nTr.colSpan=Z(d);if(typeof c=="undefined"||c){ea(d);C(d)}va(d)}};
|
||||
this.fnPageChange=function(a,b){var c=A(this[n.iApiIndex]);ma(c,a);E(c);if(typeof b=="undefined"||b)C(c)};this.fnDestroy=function(){var a=A(this[n.iApiIndex]),b=a.nTableWrapper.parentNode,c=a.nTBody,d,f;a.bDestroying=true;d=0;for(f=a.aoDestroyCallback.length;d<f;d++)a.aoDestroyCallback[d].fn();d=0;for(f=a.aoColumns.length;d<f;d++)a.aoColumns[d].bVisible===false&&this.fnSetColumnVis(d,true);i(a.nTableWrapper).find("*").andSelf().unbind(".DT");i("tbody>tr>td."+a.oClasses.sRowEmpty,a.nTable).parent().remove();
|
||||
if(a.nTable!=a.nTHead.parentNode){i(a.nTable).children("thead").remove();a.nTable.appendChild(a.nTHead)}if(a.nTFoot&&a.nTable!=a.nTFoot.parentNode){i(a.nTable).children("tfoot").remove();a.nTable.appendChild(a.nTFoot)}a.nTable.parentNode.removeChild(a.nTable);i(a.nTableWrapper).remove();a.aaSorting=[];a.aaSortingFixed=[];V(a);i(ba(a)).removeClass(a.asStripeClasses.join(" "));if(a.bJUI){i("th",a.nTHead).removeClass([n.oStdClasses.sSortable,n.oJUIClasses.sSortableAsc,n.oJUIClasses.sSortableDesc,n.oJUIClasses.sSortableNone].join(" "));
|
||||
i("th span."+n.oJUIClasses.sSortIcon,a.nTHead).remove();i("th",a.nTHead).each(function(){var e=i("div."+n.oJUIClasses.sSortJUIWrapper,this),h=e.contents();i(this).append(h);e.remove()})}else i("th",a.nTHead).removeClass([n.oStdClasses.sSortable,n.oStdClasses.sSortableAsc,n.oStdClasses.sSortableDesc,n.oStdClasses.sSortableNone].join(" "));a.nTableReinsertBefore?b.insertBefore(a.nTable,a.nTableReinsertBefore):b.appendChild(a.nTable);d=0;for(f=a.aoData.length;d<f;d++)a.aoData[d].nTr!==null&&c.appendChild(a.aoData[d].nTr);
|
||||
if(a.oFeatures.bAutoWidth===true)a.nTable.style.width=q(a.sDestroyWidth);i(c).children("tr:even").addClass(a.asDestroyStripes[0]);i(c).children("tr:odd").addClass(a.asDestroyStripes[1]);d=0;for(f=D.length;d<f;d++)D[d]==a&&D.splice(d,1);a=null};this.fnAdjustColumnSizing=function(a){var b=A(this[n.iApiIndex]);ea(b);if(typeof a=="undefined"||a)this.fnDraw(false);else if(b.oScroll.sX!==""||b.oScroll.sY!=="")this.oApi._fnScrollDraw(b)};for(var xa in n.oApi)if(xa)this[xa]=s(xa);this.oApi._fnExternApiFunc=
|
||||
s;this.oApi._fnInitialise=t;this.oApi._fnInitComplete=w;this.oApi._fnLanguageProcess=y;this.oApi._fnAddColumn=F;this.oApi._fnColumnOptions=x;this.oApi._fnAddData=v;this.oApi._fnCreateTr=z;this.oApi._fnGatherData=$;this.oApi._fnBuildHead=X;this.oApi._fnDrawHead=M;this.oApi._fnDraw=C;this.oApi._fnReDraw=da;this.oApi._fnAjaxUpdate=Ca;this.oApi._fnAjaxParameters=Da;this.oApi._fnAjaxUpdateDraw=Ea;this.oApi._fnServerParams=ha;this.oApi._fnAddOptionsHtml=Aa;this.oApi._fnFeatureHtmlTable=Ja;this.oApi._fnScrollDraw=
|
||||
Ma;this.oApi._fnAdjustColumnSizing=ea;this.oApi._fnFeatureHtmlFilter=Ha;this.oApi._fnFilterComplete=N;this.oApi._fnFilterCustom=Qa;this.oApi._fnFilterColumn=Pa;this.oApi._fnFilter=Oa;this.oApi._fnBuildSearchArray=oa;this.oApi._fnBuildSearchRow=ra;this.oApi._fnFilterCreateSearch=pa;this.oApi._fnDataToSearch=qa;this.oApi._fnSort=R;this.oApi._fnSortAttachListener=ja;this.oApi._fnSortingClasses=V;this.oApi._fnFeatureHtmlPaginate=La;this.oApi._fnPageChange=ma;this.oApi._fnFeatureHtmlInfo=Ka;this.oApi._fnUpdateInfo=
|
||||
Ra;this.oApi._fnFeatureHtmlLength=Ga;this.oApi._fnFeatureHtmlProcessing=Ia;this.oApi._fnProcessingDisplay=K;this.oApi._fnVisibleToColumnIndex=Na;this.oApi._fnColumnIndexToVisible=ta;this.oApi._fnNodeToDataIndex=W;this.oApi._fnVisbleColumns=Z;this.oApi._fnCalculateEnd=E;this.oApi._fnConvertToWidth=Sa;this.oApi._fnCalculateColumnWidths=ga;this.oApi._fnScrollingWidthAdjust=Ua;this.oApi._fnGetWidestNode=Ta;this.oApi._fnGetMaxLenString=Va;this.oApi._fnStringToCss=q;this.oApi._fnArrayCmp=Za;this.oApi._fnDetectType=
|
||||
ia;this.oApi._fnSettingsFromNode=A;this.oApi._fnGetDataMaster=ca;this.oApi._fnGetTrNodes=ba;this.oApi._fnGetTdNodes=Q;this.oApi._fnEscapeRegex=sa;this.oApi._fnDeleteIndex=ua;this.oApi._fnReOrderIndex=Fa;this.oApi._fnColumnOrdering=ka;this.oApi._fnLog=J;this.oApi._fnClearTable=la;this.oApi._fnSaveState=va;this.oApi._fnLoadState=Xa;this.oApi._fnCreateCookie=Wa;this.oApi._fnReadCookie=wa;this.oApi._fnDetectHeader=Y;this.oApi._fnGetUniqueThs=S;this.oApi._fnScrollBarWidth=Ya;this.oApi._fnApplyToChildren=
|
||||
P;this.oApi._fnMap=o;this.oApi._fnGetRowData=fa;this.oApi._fnGetCellData=G;this.oApi._fnSetCellData=O;this.oApi._fnGetObjectDataFn=aa;this.oApi._fnSetObjectDataFn=Ba;var ya=this;return this.each(function(){var a=0,b,c,d,f;a=0;for(b=D.length;a<b;a++){if(D[a].nTable==this)if(typeof g=="undefined"||typeof g.bRetrieve!="undefined"&&g.bRetrieve===true)return D[a].oInstance;else if(typeof g.bDestroy!="undefined"&&g.bDestroy===true){D[a].oInstance.fnDestroy();break}else{J(D[a],0,"Cannot reinitialise DataTable.\n\nTo retrieve the DataTables object for this table, please pass either no arguments to the dataTable() function, or set bRetrieve to true. Alternatively, to destory the old table and create a new one, set bDestroy to true (note that a lot of changes to the configuration can be made through the API which is usually much faster).");
|
||||
return}if(D[a].sTableId!==""&&D[a].sTableId==this.getAttribute("id")){D.splice(a,1);break}}var e=new l;D.push(e);var h=false,j=false;a=this.getAttribute("id");if(a!==null){e.sTableId=a;e.sInstance=a}else e.sInstance=n._oExternConfig.iNextUnique++;if(this.nodeName.toLowerCase()!="table")J(e,0,"Attempted to initialise DataTables on a node which is not a table: "+this.nodeName);else{e.nTable=this;e.oInstance=ya.length==1?ya:i(this).dataTable();e.oApi=ya.oApi;e.sDestroyWidth=i(this).width();if(typeof g!=
|
||||
"undefined"&&g!==null){e.oInit=g;o(e.oFeatures,g,"bPaginate");o(e.oFeatures,g,"bLengthChange");o(e.oFeatures,g,"bFilter");o(e.oFeatures,g,"bSort");o(e.oFeatures,g,"bInfo");o(e.oFeatures,g,"bProcessing");o(e.oFeatures,g,"bAutoWidth");o(e.oFeatures,g,"bSortClasses");o(e.oFeatures,g,"bServerSide");o(e.oFeatures,g,"bDeferRender");o(e.oScroll,g,"sScrollX","sX");o(e.oScroll,g,"sScrollXInner","sXInner");o(e.oScroll,g,"sScrollY","sY");o(e.oScroll,g,"bScrollCollapse","bCollapse");o(e.oScroll,g,"bScrollInfinite",
|
||||
"bInfinite");o(e.oScroll,g,"iScrollLoadGap","iLoadGap");o(e.oScroll,g,"bScrollAutoCss","bAutoCss");o(e,g,"asStripClasses","asStripeClasses");o(e,g,"asStripeClasses");o(e,g,"fnPreDrawCallback");o(e,g,"fnRowCallback");o(e,g,"fnHeaderCallback");o(e,g,"fnFooterCallback");o(e,g,"fnCookieCallback");o(e,g,"fnInitComplete");o(e,g,"fnServerData");o(e,g,"fnFormatNumber");o(e,g,"aaSorting");o(e,g,"aaSortingFixed");o(e,g,"aLengthMenu");o(e,g,"sPaginationType");o(e,g,"sAjaxSource");o(e,g,"sAjaxDataProp");o(e,
|
||||
g,"iCookieDuration");o(e,g,"sCookiePrefix");o(e,g,"sDom");o(e,g,"bSortCellsTop");o(e,g,"oSearch","oPreviousSearch");o(e,g,"aoSearchCols","aoPreSearchCols");o(e,g,"iDisplayLength","_iDisplayLength");o(e,g,"bJQueryUI","bJUI");o(e.oLanguage,g,"fnInfoCallback");typeof g.fnDrawCallback=="function"&&e.aoDrawCallback.push({fn:g.fnDrawCallback,sName:"user"});typeof g.fnServerParams=="function"&&e.aoServerParams.push({fn:g.fnServerParams,sName:"user"});typeof g.fnStateSaveCallback=="function"&&e.aoStateSave.push({fn:g.fnStateSaveCallback,
|
||||
sName:"user"});typeof g.fnStateLoadCallback=="function"&&e.aoStateLoad.push({fn:g.fnStateLoadCallback,sName:"user"});if(e.oFeatures.bServerSide&&e.oFeatures.bSort&&e.oFeatures.bSortClasses)e.aoDrawCallback.push({fn:V,sName:"server_side_sort_classes"});else e.oFeatures.bDeferRender&&e.aoDrawCallback.push({fn:V,sName:"defer_sort_classes"});if(typeof g.bJQueryUI!="undefined"&&g.bJQueryUI){e.oClasses=n.oJUIClasses;if(typeof g.sDom=="undefined")e.sDom='<"H"lfr>t<"F"ip>'}if(e.oScroll.sX!==""||e.oScroll.sY!==
|
||||
"")e.oScroll.iBarWidth=Ya();if(typeof g.iDisplayStart!="undefined"&&typeof e.iInitDisplayStart=="undefined"){e.iInitDisplayStart=g.iDisplayStart;e._iDisplayStart=g.iDisplayStart}if(typeof g.bStateSave!="undefined"){e.oFeatures.bStateSave=g.bStateSave;Xa(e,g);e.aoDrawCallback.push({fn:va,sName:"state_save"})}if(typeof g.iDeferLoading!="undefined"){e.bDeferLoading=true;e._iRecordsTotal=g.iDeferLoading;e._iRecordsDisplay=g.iDeferLoading}if(typeof g.aaData!="undefined")j=true;if(typeof g!="undefined"&&
|
||||
typeof g.aoData!="undefined")g.aoColumns=g.aoData;if(typeof g.oLanguage!="undefined")if(typeof g.oLanguage.sUrl!="undefined"&&g.oLanguage.sUrl!==""){e.oLanguage.sUrl=g.oLanguage.sUrl;i.getJSON(e.oLanguage.sUrl,null,function(u){y(e,u,true)});h=true}else y(e,g.oLanguage,false)}else g={};if(typeof g.asStripClasses=="undefined"&&typeof g.asStripeClasses=="undefined"){e.asStripeClasses.push(e.oClasses.sStripeOdd);e.asStripeClasses.push(e.oClasses.sStripeEven)}c=false;d=i(this).children("tbody").children("tr");
|
||||
a=0;for(b=e.asStripeClasses.length;a<b;a++)if(d.filter(":lt(2)").hasClass(e.asStripeClasses[a])){c=true;break}if(c){e.asDestroyStripes=["",""];if(i(d[0]).hasClass(e.oClasses.sStripeOdd))e.asDestroyStripes[0]+=e.oClasses.sStripeOdd+" ";if(i(d[0]).hasClass(e.oClasses.sStripeEven))e.asDestroyStripes[0]+=e.oClasses.sStripeEven;if(i(d[1]).hasClass(e.oClasses.sStripeOdd))e.asDestroyStripes[1]+=e.oClasses.sStripeOdd+" ";if(i(d[1]).hasClass(e.oClasses.sStripeEven))e.asDestroyStripes[1]+=e.oClasses.sStripeEven;
|
||||
d.removeClass(e.asStripeClasses.join(" "))}c=[];var k;a=this.getElementsByTagName("thead");if(a.length!==0){Y(e.aoHeader,a[0]);c=S(e)}if(typeof g.aoColumns=="undefined"){k=[];a=0;for(b=c.length;a<b;a++)k.push(null)}else k=g.aoColumns;a=0;for(b=k.length;a<b;a++){if(typeof g.saved_aoColumns!="undefined"&&g.saved_aoColumns.length==b){if(k[a]===null)k[a]={};k[a].bVisible=g.saved_aoColumns[a].bVisible}F(e,c?c[a]:null)}if(typeof g.aoColumnDefs!="undefined")for(a=g.aoColumnDefs.length-1;a>=0;a--){var m=
|
||||
g.aoColumnDefs[a].aTargets;i.isArray(m)||J(e,1,"aTargets must be an array of targets, not a "+typeof m);c=0;for(d=m.length;c<d;c++)if(typeof m[c]=="number"&&m[c]>=0){for(;e.aoColumns.length<=m[c];)F(e);x(e,m[c],g.aoColumnDefs[a])}else if(typeof m[c]=="number"&&m[c]<0)x(e,e.aoColumns.length+m[c],g.aoColumnDefs[a]);else if(typeof m[c]=="string"){b=0;for(f=e.aoColumns.length;b<f;b++)if(m[c]=="_all"||i(e.aoColumns[b].nTh).hasClass(m[c]))x(e,b,g.aoColumnDefs[a])}}if(typeof k!="undefined"){a=0;for(b=k.length;a<
|
||||
b;a++)x(e,a,k[a])}a=0;for(b=e.aaSorting.length;a<b;a++){if(e.aaSorting[a][0]>=e.aoColumns.length)e.aaSorting[a][0]=0;k=e.aoColumns[e.aaSorting[a][0]];if(typeof e.aaSorting[a][2]=="undefined")e.aaSorting[a][2]=0;if(typeof g.aaSorting=="undefined"&&typeof e.saved_aaSorting=="undefined")e.aaSorting[a][1]=k.asSorting[0];c=0;for(d=k.asSorting.length;c<d;c++)if(e.aaSorting[a][1]==k.asSorting[c]){e.aaSorting[a][2]=c;break}}V(e);a=i(this).children("thead");if(a.length===0){a=[p.createElement("thead")];this.appendChild(a[0])}e.nTHead=
|
||||
a[0];a=i(this).children("tbody");if(a.length===0){a=[p.createElement("tbody")];this.appendChild(a[0])}e.nTBody=a[0];a=i(this).children("tfoot");if(a.length>0){e.nTFoot=a[0];Y(e.aoFooter,e.nTFoot)}if(j)for(a=0;a<g.aaData.length;a++)v(e,g.aaData[a]);else $(e);e.aiDisplay=e.aiDisplayMaster.slice();e.bInitialised=true;h===false&&t(e)}})}})(jQuery,window,document);
|
||||
(function(i,aa,k,l){var j=function(e){function o(a,b){var c=j.defaults.columns,d=a.aoColumns.length,c=i.extend({},j.models.oColumn,c,{sSortingClass:a.oClasses.sSortable,sSortingClassJUI:a.oClasses.sSortJUI,nTh:b?b:k.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mDataProp:c.mDataProp?c.oDefaults:d});a.aoColumns.push(c);if(a.aoPreSearchCols[d]===l||null===a.aoPreSearchCols[d])a.aoPreSearchCols[d]=i.extend({},j.models.oSearch);else{c=a.aoPreSearchCols[d];
|
||||
if(c.bRegex===l)c.bRegex=!0;if(c.bSmart===l)c.bSmart=!0;if(c.bCaseInsensitive===l)c.bCaseInsensitive=!0}E(a,d,null)}function E(a,b,c){b=a.aoColumns[b];if(c!==l&&null!==c){if(c.sType!==l)b.sType=c.sType,b._bAutoType=!1;i.extend(b,c);n(b,c,"sWidth","sWidthOrig");if(c.iDataSort!==l)b.aDataSort=[c.iDataSort];n(b,c,"aDataSort")}b.fnGetData=V(b.mDataProp);b.fnSetData=sa(b.mDataProp);if(!a.oFeatures.bSort)b.bSortable=!1;if(!b.bSortable||-1==i.inArray("asc",b.asSorting)&&-1==i.inArray("desc",b.asSorting))b.sSortingClass=
|
||||
a.oClasses.sSortableNone,b.sSortingClassJUI="";else if(b.bSortable||-1==i.inArray("asc",b.asSorting)&&-1==i.inArray("desc",b.asSorting))b.sSortingClass=a.oClasses.sSortable,b.sSortingClassJUI=a.oClasses.sSortJUI;else if(-1!=i.inArray("asc",b.asSorting)&&-1==i.inArray("desc",b.asSorting))b.sSortingClass=a.oClasses.sSortableAsc,b.sSortingClassJUI=a.oClasses.sSortJUIAscAllowed;else if(-1==i.inArray("asc",b.asSorting)&&-1!=i.inArray("desc",b.asSorting))b.sSortingClass=a.oClasses.sSortableDesc,b.sSortingClassJUI=
|
||||
a.oClasses.sSortJUIDescAllowed}function r(a){if(!1===a.oFeatures.bAutoWidth)return!1;ba(a);for(var b=0,c=a.aoColumns.length;b<c;b++)a.aoColumns[b].nTh.style.width=a.aoColumns[b].sWidth}function s(a,b){for(var c=-1,d=0;d<a.aoColumns.length;d++)if(!0===a.aoColumns[d].bVisible&&c++,c==b)return d;return null}function t(a,b){for(var c=-1,d=0;d<a.aoColumns.length;d++)if(!0===a.aoColumns[d].bVisible&&c++,d==b)return!0===a.aoColumns[d].bVisible?c:null;return null}function v(a){for(var b=0,c=0;c<a.aoColumns.length;c++)!0===
|
||||
a.aoColumns[c].bVisible&&b++;return b}function B(a){for(var b=j.ext.aTypes,c=b.length,d=0;d<c;d++){var f=b[d](a);if(null!==f)return f}return"string"}function D(a,b){for(var c=b.split(","),d=[],f=0,h=a.aoColumns.length;f<h;f++)for(var g=0;g<h;g++)if(a.aoColumns[f].sName==c[g]){d.push(g);break}return d}function x(a){for(var b="",c=0,d=a.aoColumns.length;c<d;c++)b+=a.aoColumns[c].sName+",";return b.length==d?"":b.slice(0,-1)}function I(a,b,c,d){var f,h,g,e,q;if(b)for(f=b.length-1;0<=f;f--){var m=b[f].aTargets;
|
||||
i.isArray(m)||F(a,1,"aTargets must be an array of targets, not a "+typeof m);for(h=0,g=m.length;h<g;h++)if("number"===typeof m[h]&&0<=m[h]){for(;a.aoColumns.length<=m[h];)o(a);d(m[h],b[f])}else if("number"===typeof m[h]&&0>m[h])d(a.aoColumns.length+m[h],b[f]);else if("string"===typeof m[h])for(e=0,q=a.aoColumns.length;e<q;e++)("_all"==m[h]||i(a.aoColumns[e].nTh).hasClass(m[h]))&&d(e,b[f])}if(c)for(f=0,a=c.length;f<a;f++)d(f,c[f])}function G(a,b){var c;c=i.isArray(b)?b.slice():i.extend(!0,{},b);var d=
|
||||
a.aoData.length;c=i.extend(!0,{},j.models.oRow,{_aData:c});a.aoData.push(c);for(var f,h=0,g=a.aoColumns.length;h<g;h++)if(c=a.aoColumns[h],"function"===typeof c.fnRender&&c.bUseRendered&&null!==c.mDataProp&&J(a,d,h,R(a,d,h)),c._bAutoType&&"string"!=c.sType&&(f=w(a,d,h,"type"),null!==f&&""!==f))if(f=B(f),null===c.sType)c.sType=f;else if(c.sType!=f&&"html"!=c.sType)c.sType="string";a.aiDisplayMaster.push(d);a.oFeatures.bDeferRender||ca(a,d);return d}function ta(a){var b,c,d,f,h,g,e,q,m;if(a.bDeferLoading||
|
||||
null===a.sAjaxSource){e=a.nTBody.childNodes;for(b=0,c=e.length;b<c;b++)if("TR"==e[b].nodeName.toUpperCase()){q=a.aoData.length;e[b]._DT_RowIndex=q;a.aoData.push(i.extend(!0,{},j.models.oRow,{nTr:e[b]}));a.aiDisplayMaster.push(q);g=e[b].childNodes;h=0;for(d=0,f=g.length;d<f;d++)if(m=g[d].nodeName.toUpperCase(),"TD"==m||"TH"==m)J(a,q,h,i.trim(g[d].innerHTML)),h++}}e=S(a);g=[];for(b=0,c=e.length;b<c;b++)for(d=0,f=e[b].childNodes.length;d<f;d++)h=e[b].childNodes[d],m=h.nodeName.toUpperCase(),("TD"==m||
|
||||
"TH"==m)&&g.push(h);for(f=0,e=a.aoColumns.length;f<e;f++){m=a.aoColumns[f];if(null===m.sTitle)m.sTitle=m.nTh.innerHTML;h=m._bAutoType;q="function"===typeof m.fnRender;var o=null!==m.sClass,r=m.bVisible,l,n;if(h||q||o||!r)for(b=0,c=a.aoData.length;b<c;b++){d=a.aoData[b];l=g[b*e+f];if(h&&"string"!=m.sType&&(n=w(a,b,f,"type"),""!==n))if(n=B(n),null===m.sType)m.sType=n;else if(m.sType!=n&&"html"!=m.sType)m.sType="string";if("function"===typeof m.mDataProp)l.innerHTML=w(a,b,f,"display");if(q)n=R(a,b,f),
|
||||
l.innerHTML=n,m.bUseRendered&&J(a,b,f,n);o&&(l.className+=" "+m.sClass);r?d._anHidden[f]=null:(d._anHidden[f]=l,l.parentNode.removeChild(l));m.fnCreatedCell&&m.fnCreatedCell.call(a.oInstance,l,w(a,b,f,"display"),d._aData,b,f)}}if(0!==a.aoRowCreatedCallback.length)for(b=0,c=a.aoData.length;b<c;b++)d=a.aoData[b],C(a,"aoRowCreatedCallback",null,[d.nTr,d._aData,b])}function K(a,b){return b._DT_RowIndex!==l?b._DT_RowIndex:null}function da(a,b,c){for(var b=L(a,b),d=0,a=a.aoColumns.length;d<a;d++)if(b[d]===
|
||||
c)return d;return-1}function W(a,b,c){for(var d=[],f=0,h=a.aoColumns.length;f<h;f++)d.push(w(a,b,f,c));return d}function w(a,b,c,d){var f=a.aoColumns[c];if((c=f.fnGetData(a.aoData[b]._aData,d))===l){if(a.iDrawError!=a.iDraw&&null===f.sDefaultContent)F(a,0,"Requested unknown parameter '"+f.mDataProp+"' from the data source for row "+b),a.iDrawError=a.iDraw;return f.sDefaultContent}if(null===c&&null!==f.sDefaultContent)c=f.sDefaultContent;else if("function"===typeof c)return c();return"display"==d&&
|
||||
null===c?"":c}function J(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d)}function V(a){if(null===a)return function(){return null};if("function"===typeof a)return function(b,d){return a(b,d)};if("string"===typeof a&&-1!=a.indexOf(".")){var b=a.split(".");return function(a){for(var d=0,f=b.length;d<f;d++)if(a=a[b[d]],a===l)return l;return a}}return function(b){return b[a]}}function sa(a){if(null===a)return function(){};if("function"===typeof a)return function(b,d){a(b,"set",d)};if("string"===
|
||||
typeof a&&-1!=a.indexOf(".")){var b=a.split(".");return function(a,d){for(var f=0,h=b.length-1;f<h;f++)a=a[b[f]];a[b[b.length-1]]=d}}return function(b,d){b[a]=d}}function X(a){for(var b=[],c=a.aoData.length,d=0;d<c;d++)b.push(a.aoData[d]._aData);return b}function ea(a){a.aoData.splice(0,a.aoData.length);a.aiDisplayMaster.splice(0,a.aiDisplayMaster.length);a.aiDisplay.splice(0,a.aiDisplay.length);z(a)}function fa(a,b){for(var c=-1,d=0,f=a.length;d<f;d++)a[d]==b?c=d:a[d]>b&&a[d]--; -1!=c&&a.splice(c,
|
||||
1)}function R(a,b,c){var d=a.aoColumns[c];return d.fnRender({iDataRow:b,iDataColumn:c,oSettings:a,aData:a.aoData[b]._aData,mDataProp:d.mDataProp},w(a,b,c,"display"))}function ca(a,b){var c=a.aoData[b],d;if(null===c.nTr){c.nTr=k.createElement("tr");c.nTr._DT_RowIndex=b;if(c._aData.DT_RowId)c.nTr.id=c._aData.DT_RowId;c._aData.DT_RowClass&&i(c.nTr).addClass(c._aData.DT_RowClass);for(var f=0,h=a.aoColumns.length;f<h;f++){var g=a.aoColumns[f];d=k.createElement("td");d.innerHTML="function"===typeof g.fnRender&&
|
||||
(!g.bUseRendered||null===g.mDataProp)?R(a,b,f):w(a,b,f,"display");if(null!==g.sClass)d.className=g.sClass;g.bVisible?(c.nTr.appendChild(d),c._anHidden[f]=null):c._anHidden[f]=d;g.fnCreatedCell&&g.fnCreatedCell.call(a.oInstance,d,w(a,b,f,"display"),c._aData,b,f)}C(a,"aoRowCreatedCallback",null,[c.nTr,c._aData,b])}}function ua(a){var b,c,d;if(0!==a.nTHead.getElementsByTagName("th").length)for(b=0,d=a.aoColumns.length;b<d;b++){if(c=a.aoColumns[b].nTh,c.setAttribute("role","columnheader"),a.aoColumns[b].bSortable&&
|
||||
(c.setAttribute("tabindex",a.iTabIndex),c.setAttribute("aria-controls",a.sTableId)),null!==a.aoColumns[b].sClass&&i(c).addClass(a.aoColumns[b].sClass),a.aoColumns[b].sTitle!=c.innerHTML)c.innerHTML=a.aoColumns[b].sTitle}else{var f=k.createElement("tr");for(b=0,d=a.aoColumns.length;b<d;b++)c=a.aoColumns[b].nTh,c.innerHTML=a.aoColumns[b].sTitle,c.setAttribute("tabindex","0"),null!==a.aoColumns[b].sClass&&i(c).addClass(a.aoColumns[b].sClass),f.appendChild(c);i(a.nTHead).html("")[0].appendChild(f);T(a.aoHeader,
|
||||
a.nTHead)}i(a.nTHead).children("tr").attr("role","row");if(a.bJUI)for(b=0,d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;f=k.createElement("div");f.className=a.oClasses.sSortJUIWrapper;i(c).contents().appendTo(f);var h=k.createElement("span");h.className=a.oClasses.sSortIcon;f.appendChild(h);c.appendChild(f)}if(a.oFeatures.bSort)for(b=0;b<a.aoColumns.length;b++)!1!==a.aoColumns[b].bSortable?ga(a,a.aoColumns[b].nTh,b):i(a.aoColumns[b].nTh).addClass(a.oClasses.sSortableNone);""!==a.oClasses.sFooterTH&&
|
||||
i(a.nTFoot).children("tr").children("th").addClass(a.oClasses.sFooterTH);if(null!==a.nTFoot){c=O(a,null,a.aoFooter);for(b=0,d=a.aoColumns.length;b<d;b++)if(c[b])a.aoColumns[b].nTf=c[b],a.aoColumns[b].sClass&&i(c[b]).addClass(a.aoColumns[b].sClass)}}function U(a,b,c){var d,f,h,g=[],e=[],i=a.aoColumns.length,m;c===l&&(c=!1);for(d=0,f=b.length;d<f;d++){g[d]=b[d].slice();g[d].nTr=b[d].nTr;for(h=i-1;0<=h;h--)!a.aoColumns[h].bVisible&&!c&&g[d].splice(h,1);e.push([])}for(d=0,f=g.length;d<f;d++){if(a=g[d].nTr)for(;h=
|
||||
a.firstChild;)a.removeChild(h);for(h=0,b=g[d].length;h<b;h++)if(m=i=1,e[d][h]===l){a.appendChild(g[d][h].cell);for(e[d][h]=1;g[d+i]!==l&&g[d][h].cell==g[d+i][h].cell;)e[d+i][h]=1,i++;for(;g[d][h+m]!==l&&g[d][h].cell==g[d][h+m].cell;){for(c=0;c<i;c++)e[d+c][h+m]=1;m++}g[d][h].cell.rowSpan=i;g[d][h].cell.colSpan=m}}}function y(a){var b,c,d=[],f=0,h=a.asStripeClasses.length;b=a.aoOpenRows.length;c=C(a,"aoPreDrawCallback","preDraw",[a]);if(-1===i.inArray(!1,c)){a.bDrawing=!0;if(a.iInitDisplayStart!==
|
||||
l&&-1!=a.iInitDisplayStart)a._iDisplayStart=a.oFeatures.bServerSide?a.iInitDisplayStart:a.iInitDisplayStart>=a.fnRecordsDisplay()?0:a.iInitDisplayStart,a.iInitDisplayStart=-1,z(a);if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++;else if(a.oFeatures.bServerSide){if(!a.bDestroying&&!va(a))return}else a.iDraw++;if(0!==a.aiDisplay.length){var g=a._iDisplayStart;c=a._iDisplayEnd;if(a.oFeatures.bServerSide)g=0,c=a.aoData.length;for(;g<c;g++){var e=a.aoData[a.aiDisplay[g]];null===e.nTr&&ca(a,a.aiDisplay[g]);
|
||||
var q=e.nTr;if(0!==h){var m=a.asStripeClasses[f%h];if(e._sRowStripe!=m)i(q).removeClass(e._sRowStripe).addClass(m),e._sRowStripe=m}C(a,"aoRowCallback",null,[q,a.aoData[a.aiDisplay[g]]._aData,f,g]);d.push(q);f++;if(0!==b)for(e=0;e<b;e++)if(q==a.aoOpenRows[e].nParent){d.push(a.aoOpenRows[e].nTr);break}}}else{d[0]=k.createElement("tr");if(a.asStripeClasses[0])d[0].className=a.asStripeClasses[0];h=a.oLanguage.sZeroRecords.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()));if(1==a.iDraw&&null!==a.sAjaxSource&&
|
||||
!a.oFeatures.bServerSide)h=a.oLanguage.sLoadingRecords;else if(a.oLanguage.sEmptyTable&&0===a.fnRecordsTotal())h=a.oLanguage.sEmptyTable;b=k.createElement("td");b.setAttribute("valign","top");b.colSpan=v(a);b.className=a.oClasses.sRowEmpty;b.innerHTML=h;d[f].appendChild(b)}C(a,"aoHeaderCallback","header",[i(a.nTHead).children("tr")[0],X(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay]);C(a,"aoFooterCallback","footer",[i(a.nTFoot).children("tr")[0],X(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay]);
|
||||
f=k.createDocumentFragment();b=k.createDocumentFragment();if(a.nTBody){h=a.nTBody.parentNode;b.appendChild(a.nTBody);if(!a.oScroll.bInfinite||!a._bInitComplete||a.bSorted||a.bFiltered)for(;b=a.nTBody.firstChild;)a.nTBody.removeChild(b);for(b=0,c=d.length;b<c;b++)f.appendChild(d[b]);a.nTBody.appendChild(f);null!==h&&h.appendChild(a.nTBody)}C(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1;a.oFeatures.bServerSide&&(H(a,!1),a._bInitComplete||Y(a))}}function Z(a){a.oFeatures.bSort?
|
||||
P(a,a.oPreviousSearch):a.oFeatures.bFilter?M(a,a.oPreviousSearch):(z(a),y(a))}function wa(a){var b=i("<div></div>")[0];a.nTable.parentNode.insertBefore(b,a.nTable);a.nTableWrapper=i('<div id="'+a.sTableId+'_wrapper" class="'+a.oClasses.sWrapper+'" role="grid"></div>')[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var c=a.nTableWrapper,d=a.sDom.split(""),f,h,g,e,q,m,o,l=0;l<d.length;l++){h=0;g=d[l];if("<"==g){e=i("<div></div>")[0];q=d[l+1];if("'"==q||'"'==q){m="";for(o=2;d[l+o]!=q;)m+=d[l+o],
|
||||
o++;"H"==m?m="fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix":"F"==m&&(m="fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix");-1!=m.indexOf(".")?(q=m.split("."),e.id=q[0].substr(1,q[0].length-1),e.className=q[1]):"#"==m.charAt(0)?e.id=m.substr(1,m.length-1):e.className=m;l+=o}c.appendChild(e);c=e}else if(">"==g)c=c.parentNode;else if("l"==g&&a.oFeatures.bPaginate&&a.oFeatures.bLengthChange)f=xa(a),h=1;else if("f"==g&&a.oFeatures.bFilter)f=
|
||||
ya(a),h=1;else if("r"==g&&a.oFeatures.bProcessing)f=za(a),h=1;else if("t"==g)f=Aa(a),h=1;else if("i"==g&&a.oFeatures.bInfo)f=Ba(a),h=1;else if("p"==g&&a.oFeatures.bPaginate)f=Ca(a),h=1;else if(0!==j.ext.aoFeatures.length){e=j.ext.aoFeatures;o=0;for(q=e.length;o<q;o++)if(g==e[o].cFeature){(f=e[o].fnInit(a))&&(h=1);break}}1==h&&null!==f&&("object"!==typeof a.aanFeatures[g]&&(a.aanFeatures[g]=[]),a.aanFeatures[g].push(f),c.appendChild(f))}b.parentNode.replaceChild(a.nTableWrapper,b)}function T(a,b){var c=
|
||||
i(b).children("tr"),d,f,h,g,e,q,m,j;a.splice(0,a.length);for(f=0,q=c.length;f<q;f++)a.push([]);for(f=0,q=c.length;f<q;f++)for(h=0,m=c[f].childNodes.length;h<m;h++)if(d=c[f].childNodes[h],"TD"==d.nodeName.toUpperCase()||"TH"==d.nodeName.toUpperCase()){var o=1*d.getAttribute("colspan"),l=1*d.getAttribute("rowspan"),o=!o||0===o||1===o?1:o,l=!l||0===l||1===l?1:l;for(g=0;a[f][g];)g++;j=g;for(e=0;e<o;e++)for(g=0;g<l;g++)a[f+g][j+e]={cell:d,unique:1==o?!0:!1},a[f+g].nTr=c[f]}}function O(a,b,c){var d=[];
|
||||
if(!c)c=a.aoHeader,b&&(c=[],T(c,b));for(var b=0,f=c.length;b<f;b++)for(var h=0,g=c[b].length;h<g;h++)if(c[b][h].unique&&(!d[h]||!a.bSortCellsTop))d[h]=c[b][h].cell;return d}function va(a){if(a.bAjaxDataGet){a.iDraw++;H(a,!0);var b=Da(a);ha(a,b);a.fnServerData.call(a.oInstance,a.sAjaxSource,b,function(b){Ea(a,b)},a);return!1}return!0}function Da(a){var b=a.aoColumns.length,c=[],d,f;c.push({name:"sEcho",value:a.iDraw});c.push({name:"iColumns",value:b});c.push({name:"sColumns",value:x(a)});c.push({name:"iDisplayStart",
|
||||
value:a._iDisplayStart});c.push({name:"iDisplayLength",value:!1!==a.oFeatures.bPaginate?a._iDisplayLength:-1});for(f=0;f<b;f++)d=a.aoColumns[f].mDataProp,c.push({name:"mDataProp_"+f,value:"function"===typeof d?"function":d});if(!1!==a.oFeatures.bFilter){c.push({name:"sSearch",value:a.oPreviousSearch.sSearch});c.push({name:"bRegex",value:a.oPreviousSearch.bRegex});for(f=0;f<b;f++)c.push({name:"sSearch_"+f,value:a.aoPreSearchCols[f].sSearch}),c.push({name:"bRegex_"+f,value:a.aoPreSearchCols[f].bRegex}),
|
||||
c.push({name:"bSearchable_"+f,value:a.aoColumns[f].bSearchable})}if(!1!==a.oFeatures.bSort){d=null!==a.aaSortingFixed?a.aaSortingFixed.length:0;var h=a.aaSorting.length;c.push({name:"iSortingCols",value:d+h});for(f=0;f<d;f++)c.push({name:"iSortCol_"+f,value:a.aaSortingFixed[f][0]}),c.push({name:"sSortDir_"+f,value:a.aaSortingFixed[f][1]});for(f=0;f<h;f++)c.push({name:"iSortCol_"+(f+d),value:a.aaSorting[f][0]}),c.push({name:"sSortDir_"+(f+d),value:a.aaSorting[f][1]});for(f=0;f<b;f++)c.push({name:"bSortable_"+
|
||||
f,value:a.aoColumns[f].bSortable})}return c}function ha(a,b){C(a,"aoServerParams","serverParams",[b])}function Ea(a,b){if(b.sEcho!==l){if(1*b.sEcho<a.iDraw)return;a.iDraw=1*b.sEcho}(!a.oScroll.bInfinite||a.oScroll.bInfinite&&(a.bSorted||a.bFiltered))&&ea(a);a._iRecordsTotal=parseInt(b.iTotalRecords,10);a._iRecordsDisplay=parseInt(b.iTotalDisplayRecords,10);var c=x(a),c=b.sColumns!==l&&""!==c&&b.sColumns!=c,d;c&&(d=D(a,b.sColumns));for(var f=V(a.sAjaxDataProp)(b),h=0,g=f.length;h<g;h++)if(c){for(var e=
|
||||
[],i=0,m=a.aoColumns.length;i<m;i++)e.push(f[h][d[i]]);G(a,e)}else G(a,f[h]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=!1;y(a);a.bAjaxDataGet=!0;H(a,!1)}function ya(a){var b=a.oPreviousSearch,c=a.oLanguage.sSearch,c=-1!==c.indexOf("_INPUT_")?c.replace("_INPUT_",'<input type="text" />'):""===c?'<input type="text" />':c+' <input type="text" />',d=k.createElement("div");d.className=a.oClasses.sFilter;d.innerHTML="<label>"+c+"</label>";if(!a.aanFeatures.f)d.id=a.sTableId+"_filter";c=i("input",
|
||||
d);c.val(b.sSearch.replace('"',"""));c.bind("keyup.DT",function(){for(var c=a.aanFeatures.f,d=0,g=c.length;d<g;d++)c[d]!=i(this).parents("div.dataTables_filter")[0]&&i("input",c[d]).val(this.value);this.value!=b.sSearch&&M(a,{sSearch:this.value,bRegex:b.bRegex,bSmart:b.bSmart,bCaseInsensitive:b.bCaseInsensitive})});c.attr("aria-controls",a.sTableId).bind("keypress.DT",function(a){if(13==a.keyCode)return!1});return d}function M(a,b,c){var d=a.oPreviousSearch,f=a.aoPreSearchCols,h=function(a){d.sSearch=
|
||||
a.sSearch;d.bRegex=a.bRegex;d.bSmart=a.bSmart;d.bCaseInsensitive=a.bCaseInsensitive};if(a.oFeatures.bServerSide)h(b);else{Fa(a,b.sSearch,c,b.bRegex,b.bSmart,b.bCaseInsensitive);h(b);for(b=0;b<a.aoPreSearchCols.length;b++)Ga(a,f[b].sSearch,b,f[b].bRegex,f[b].bSmart,f[b].bCaseInsensitive);Ha(a)}a.bFiltered=!0;i(a.oInstance).trigger("filter",a);a._iDisplayStart=0;z(a);y(a);ia(a,0)}function Ha(a){for(var b=j.ext.afnFiltering,c=0,d=b.length;c<d;c++)for(var f=0,h=0,g=a.aiDisplay.length;h<g;h++){var e=a.aiDisplay[h-
|
||||
f];b[c](a,W(a,e,"filter"),e)||(a.aiDisplay.splice(h-f,1),f++)}}function Ga(a,b,c,d,f,h){if(""!==b)for(var g=0,b=ja(b,d,f,h),d=a.aiDisplay.length-1;0<=d;d--)f=ka(w(a,a.aiDisplay[d],c,"filter"),a.aoColumns[c].sType),b.test(f)||(a.aiDisplay.splice(d,1),g++)}function Fa(a,b,c,d,f,h){d=ja(b,d,f,h);f=a.oPreviousSearch;c||(c=0);0!==j.ext.afnFiltering.length&&(c=1);if(0>=b.length)a.aiDisplay.splice(0,a.aiDisplay.length),a.aiDisplay=a.aiDisplayMaster.slice();else if(a.aiDisplay.length==a.aiDisplayMaster.length||
|
||||
f.sSearch.length>b.length||1==c||0!==b.indexOf(f.sSearch)){a.aiDisplay.splice(0,a.aiDisplay.length);ia(a,1);for(b=0;b<a.aiDisplayMaster.length;b++)d.test(a.asDataSearch[b])&&a.aiDisplay.push(a.aiDisplayMaster[b])}else for(b=c=0;b<a.asDataSearch.length;b++)d.test(a.asDataSearch[b])||(a.aiDisplay.splice(b-c,1),c++)}function ia(a,b){if(!a.oFeatures.bServerSide){a.asDataSearch.splice(0,a.asDataSearch.length);for(var c=b&&1===b?a.aiDisplayMaster:a.aiDisplay,d=0,f=c.length;d<f;d++)a.asDataSearch[d]=la(a,
|
||||
W(a,c[d],"filter"))}}function la(a,b){var c="";if(a.__nTmpFilter===l)a.__nTmpFilter=k.createElement("div");for(var d=a.__nTmpFilter,f=0,h=a.aoColumns.length;f<h;f++)a.aoColumns[f].bSearchable&&(c+=ka(b[f],a.aoColumns[f].sType)+" ");if(-1!==c.indexOf("&"))d.innerHTML=c,c=d.textContent?d.textContent:d.innerText,c=c.replace(/\n/g," ").replace(/\r/g,"");return c}function ja(a,b,c,d){if(c)return a=b?a.split(" "):ma(a).split(" "),a="^(?=.*?"+a.join(")(?=.*?")+").*$",RegExp(a,d?"i":"");a=b?a:ma(a);return RegExp(a,
|
||||
d?"i":"")}function ka(a,b){return"function"===typeof j.ext.ofnSearch[b]?j.ext.ofnSearch[b](a):"html"==b?a.replace(/[\r\n]/g," ").replace(/<.*?>/g,""):"string"===typeof a?a.replace(/[\r\n]/g," "):null===a?"":a}function ma(a){return a.replace(RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^)","g"),"\\$1")}function Ba(a){var b=k.createElement("div");b.className=a.oClasses.sInfo;if(!a.aanFeatures.i)a.aoDrawCallback.push({fn:Ia,sName:"information"}),b.id=a.sTableId+"_info";a.nTable.setAttribute("aria-describedby",
|
||||
a.sTableId+"_info");return b}function Ia(a){if(a.oFeatures.bInfo&&0!==a.aanFeatures.i.length){var b=a._iDisplayStart+1,c=a.fnDisplayEnd(),d=a.fnRecordsTotal(),f=a.fnRecordsDisplay(),h=a.fnFormatNumber(b),g=a.fnFormatNumber(c),e=a.fnFormatNumber(d),q=a.fnFormatNumber(f);a.oScroll.bInfinite&&(h=a.fnFormatNumber(1));h=0===a.fnRecordsDisplay()&&a.fnRecordsDisplay()==a.fnRecordsTotal()?a.oLanguage.sInfoEmpty+a.oLanguage.sInfoPostFix:0===a.fnRecordsDisplay()?a.oLanguage.sInfoEmpty+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",
|
||||
e)+a.oLanguage.sInfoPostFix:a.fnRecordsDisplay()==a.fnRecordsTotal()?a.oLanguage.sInfo.replace("_START_",h).replace("_END_",g).replace("_TOTAL_",q)+a.oLanguage.sInfoPostFix:a.oLanguage.sInfo.replace("_START_",h).replace("_END_",g).replace("_TOTAL_",q)+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()))+a.oLanguage.sInfoPostFix;null!==a.oLanguage.fnInfoCallback&&(h=a.oLanguage.fnInfoCallback.call(a.oInstance,a,b,c,d,f,h));a=a.aanFeatures.i;b=0;for(c=a.length;b<c;b++)i(a[b]).html(h)}}
|
||||
function $(a){var b,c,d=a.iInitDisplayStart;if(!1===a.bInitialised)setTimeout(function(){$(a)},200);else{wa(a);ua(a);U(a,a.aoHeader);a.nTFoot&&U(a,a.aoFooter);H(a,!0);a.oFeatures.bAutoWidth&&ba(a);for(b=0,c=a.aoColumns.length;b<c;b++)if(null!==a.aoColumns[b].sWidth)a.aoColumns[b].nTh.style.width=p(a.aoColumns[b].sWidth);a.oFeatures.bSort?P(a):a.oFeatures.bFilter?M(a,a.oPreviousSearch):(a.aiDisplay=a.aiDisplayMaster.slice(),z(a),y(a));null!==a.sAjaxSource&&!a.oFeatures.bServerSide?(c=[],ha(a,c),a.fnServerData.call(a.oInstance,
|
||||
a.sAjaxSource,c,function(c){var h=""!==a.sAjaxDataProp?V(a.sAjaxDataProp)(c):c;for(b=0;b<h.length;b++)G(a,h[b]);a.iInitDisplayStart=d;a.oFeatures.bSort?P(a):(a.aiDisplay=a.aiDisplayMaster.slice(),z(a),y(a));H(a,!1);Y(a,c)},a)):a.oFeatures.bServerSide||(H(a,!1),Y(a))}}function Y(a,b){a._bInitComplete=!0;C(a,"aoInitComplete","init",[a,b])}function na(a){!a.sEmptyTable&&a.sZeroRecords&&n(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&a.sZeroRecords&&n(a,a,"sZeroRecords","sLoadingRecords")}function xa(a){if(a.oScroll.bInfinite)return null;
|
||||
var b='<select size="1" '+('name="'+a.sTableId+'_length"')+">",c,d,f=a.aLengthMenu;if(2==f.length&&"object"===typeof f[0]&&"object"===typeof f[1])for(c=0,d=f[0].length;c<d;c++)b+='<option value="'+f[0][c]+'">'+f[1][c]+"</option>";else for(c=0,d=f.length;c<d;c++)b+='<option value="'+f[c]+'">'+f[c]+"</option>";b+="</select>";f=k.createElement("div");if(!a.aanFeatures.l)f.id=a.sTableId+"_length";f.className=a.oClasses.sLength;f.innerHTML="<label>"+a.oLanguage.sLengthMenu.replace("_MENU_",b)+"</label>";
|
||||
i('select option[value="'+a._iDisplayLength+'"]',f).attr("selected",!0);i("select",f).bind("change.DT",function(){var b=i(this).val(),f=a.aanFeatures.l;for(c=0,d=f.length;c<d;c++)f[c]!=this.parentNode&&i("select",f[c]).val(b);a._iDisplayLength=parseInt(b,10);z(a);if(a.fnDisplayEnd()==a.fnRecordsDisplay()&&(a._iDisplayStart=a.fnDisplayEnd()-a._iDisplayLength,0>a._iDisplayStart))a._iDisplayStart=0;if(-1==a._iDisplayLength)a._iDisplayStart=0;y(a)});i("select",f).attr("aria-controls",a.sTableId);return f}
|
||||
function z(a){a._iDisplayEnd=!1===a.oFeatures.bPaginate?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength>a.aiDisplay.length||-1==a._iDisplayLength?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength}function Ca(a){if(a.oScroll.bInfinite)return null;var b=k.createElement("div");b.className=a.oClasses.sPaging+a.sPaginationType;j.ext.oPagination[a.sPaginationType].fnInit(a,b,function(a){z(a);y(a)});a.aanFeatures.p||a.aoDrawCallback.push({fn:function(a){j.ext.oPagination[a.sPaginationType].fnUpdate(a,
|
||||
function(a){z(a);y(a)})},sName:"pagination"});return b}function oa(a,b){var c=a._iDisplayStart;if("number"===typeof b){if(a._iDisplayStart=b*a._iDisplayLength,a._iDisplayStart>a.fnRecordsDisplay())a._iDisplayStart=0}else if("first"==b)a._iDisplayStart=0;else if("previous"==b){if(a._iDisplayStart=0<=a._iDisplayLength?a._iDisplayStart-a._iDisplayLength:0,0>a._iDisplayStart)a._iDisplayStart=0}else if("next"==b)0<=a._iDisplayLength?a._iDisplayStart+a._iDisplayLength<a.fnRecordsDisplay()&&(a._iDisplayStart+=
|
||||
a._iDisplayLength):a._iDisplayStart=0;else if("last"==b)if(0<=a._iDisplayLength){var d=parseInt((a.fnRecordsDisplay()-1)/a._iDisplayLength,10)+1;a._iDisplayStart=(d-1)*a._iDisplayLength}else a._iDisplayStart=0;else F(a,0,"Unknown paging action: "+b);i(a.oInstance).trigger("page",a);return c!=a._iDisplayStart}function za(a){var b=k.createElement("div");if(!a.aanFeatures.r)b.id=a.sTableId+"_processing";b.innerHTML=a.oLanguage.sProcessing;b.className=a.oClasses.sProcessing;a.nTable.parentNode.insertBefore(b,
|
||||
a.nTable);return b}function H(a,b){if(a.oFeatures.bProcessing)for(var c=a.aanFeatures.r,d=0,f=c.length;d<f;d++)c[d].style.visibility=b?"visible":"hidden";i(a.oInstance).trigger("processing",[a,b])}function Aa(a){if(""===a.oScroll.sX&&""===a.oScroll.sY)return a.nTable;var b=k.createElement("div"),c=k.createElement("div"),d=k.createElement("div"),f=k.createElement("div"),h=k.createElement("div"),g=k.createElement("div"),e=a.nTable.cloneNode(!1),q=a.nTable.cloneNode(!1),m=a.nTable.getElementsByTagName("thead")[0],
|
||||
j=0===a.nTable.getElementsByTagName("tfoot").length?null:a.nTable.getElementsByTagName("tfoot")[0],o=a.oClasses;c.appendChild(d);h.appendChild(g);f.appendChild(a.nTable);b.appendChild(c);b.appendChild(f);d.appendChild(e);e.appendChild(m);null!==j&&(b.appendChild(h),g.appendChild(q),q.appendChild(j));b.className=o.sScrollWrapper;c.className=o.sScrollHead;d.className=o.sScrollHeadInner;f.className=o.sScrollBody;h.className=o.sScrollFoot;g.className=o.sScrollFootInner;if(a.oScroll.bAutoCss)c.style.overflow=
|
||||
"hidden",c.style.position="relative",h.style.overflow="hidden",f.style.overflow="auto";c.style.border="0";c.style.width="100%";h.style.border="0";d.style.width="150%";e.removeAttribute("id");e.style.marginLeft="0";a.nTable.style.marginLeft="0";if(null!==j)q.removeAttribute("id"),q.style.marginLeft="0";d=i(a.nTable).children("caption");g=0;for(q=d.length;g<q;g++)e.appendChild(d[g]);if(""!==a.oScroll.sX){c.style.width=p(a.oScroll.sX);f.style.width=p(a.oScroll.sX);if(null!==j)h.style.width=p(a.oScroll.sX);
|
||||
i(f).scroll(function(){c.scrollLeft=this.scrollLeft;if(null!==j)h.scrollLeft=this.scrollLeft})}if(""!==a.oScroll.sY)f.style.height=p(a.oScroll.sY);a.aoDrawCallback.push({fn:Ja,sName:"scrolling"});a.oScroll.bInfinite&&i(f).scroll(function(){!a.bDrawing&&0!==i(this).scrollTop()&&i(this).scrollTop()+i(this).height()>i(a.nTable).height()-a.oScroll.iLoadGap&&a.fnDisplayEnd()<a.fnRecordsDisplay()&&(oa(a,"next"),z(a),y(a))});a.nScrollHead=c;a.nScrollFoot=h;return b}function Ja(a){var b=a.nScrollHead.getElementsByTagName("div")[0],
|
||||
c=b.getElementsByTagName("table")[0],d=a.nTable.parentNode,f,h,g,e,j,m,o,l,r=[],n=null!==a.nTFoot?a.nScrollFoot.getElementsByTagName("div")[0]:null,E=null!==a.nTFoot?n.getElementsByTagName("table")[0]:null,k=i.browser.msie&&7>=i.browser.version;g=a.nTable.getElementsByTagName("thead");0<g.length&&a.nTable.removeChild(g[0]);null!==a.nTFoot&&(j=a.nTable.getElementsByTagName("tfoot"),0<j.length&&a.nTable.removeChild(j[0]));g=a.nTHead.cloneNode(!0);a.nTable.insertBefore(g,a.nTable.childNodes[0]);null!==
|
||||
a.nTFoot&&(j=a.nTFoot.cloneNode(!0),a.nTable.insertBefore(j,a.nTable.childNodes[1]));if(""===a.oScroll.sX)d.style.width="100%",b.parentNode.style.width="100%";var t=O(a,g);for(f=0,h=t.length;f<h;f++)o=s(a,f),t[f].style.width=a.aoColumns[o].sWidth;null!==a.nTFoot&&N(function(a){a.style.width=""},j.getElementsByTagName("tr"));f=i(a.nTable).outerWidth();if(""===a.oScroll.sX){if(a.nTable.style.width="100%",k&&(i("tbody",d).height()>d.offsetHeight||"scroll"==i(d).css("overflow-y")))a.nTable.style.width=
|
||||
p(i(a.nTable).outerWidth()-a.oScroll.iBarWidth)}else if(""!==a.oScroll.sXInner)a.nTable.style.width=p(a.oScroll.sXInner);else if(f==i(d).width()&&i(d).height()<i(a.nTable).height()){if(a.nTable.style.width=p(f-a.oScroll.iBarWidth),i(a.nTable).outerWidth()>f-a.oScroll.iBarWidth)a.nTable.style.width=p(f)}else a.nTable.style.width=p(f);f=i(a.nTable).outerWidth();h=a.nTHead.getElementsByTagName("tr");g=g.getElementsByTagName("tr");N(function(a,b){m=a.style;m.paddingTop="0";m.paddingBottom="0";m.borderTopWidth=
|
||||
"0";m.borderBottomWidth="0";m.height=0;l=i(a).width();b.style.width=p(l);r.push(l)},g,h);i(g).height(0);null!==a.nTFoot&&(e=j.getElementsByTagName("tr"),j=a.nTFoot.getElementsByTagName("tr"),N(function(a,b){m=a.style;m.paddingTop="0";m.paddingBottom="0";m.borderTopWidth="0";m.borderBottomWidth="0";m.height=0;l=i(a).width();b.style.width=p(l);r.push(l)},e,j),i(e).height(0));N(function(a){a.innerHTML="";a.style.width=p(r.shift())},g);null!==a.nTFoot&&N(function(a){a.innerHTML="";a.style.width=p(r.shift())},
|
||||
e);if(i(a.nTable).outerWidth()<f){e=d.scrollHeight>d.offsetHeight||"scroll"==i(d).css("overflow-y")?f+a.oScroll.iBarWidth:f;if(k&&(d.scrollHeight>d.offsetHeight||"scroll"==i(d).css("overflow-y")))a.nTable.style.width=p(e-a.oScroll.iBarWidth);d.style.width=p(e);b.parentNode.style.width=p(e);if(null!==a.nTFoot)n.parentNode.style.width=p(e);""===a.oScroll.sX?F(a,1,"The table cannot fit into the current element which will cause column misalignment. The table has been drawn at its minimum possible width."):
|
||||
""!==a.oScroll.sXInner&&F(a,1,"The table cannot fit into the current element which will cause column misalignment. Increase the sScrollXInner value or remove it to allow automatic calculation")}else if(d.style.width=p("100%"),b.parentNode.style.width=p("100%"),null!==a.nTFoot)n.parentNode.style.width=p("100%");if(""===a.oScroll.sY&&k)d.style.height=p(a.nTable.offsetHeight+a.oScroll.iBarWidth);if(""!==a.oScroll.sY&&a.oScroll.bCollapse&&(d.style.height=p(a.oScroll.sY),k=""!==a.oScroll.sX&&a.nTable.offsetWidth>
|
||||
d.offsetWidth?a.oScroll.iBarWidth:0,a.nTable.offsetHeight<d.offsetHeight))d.style.height=p(i(a.nTable).height()+k);k=i(a.nTable).outerWidth();c.style.width=p(k);b.style.width=p(k);if(null!==a.nTFoot)n.style.width=p(a.nTable.offsetWidth),E.style.width=p(a.nTable.offsetWidth);if(a.bSorted||a.bFiltered)d.scrollTop=0}function N(a,b,c){for(var d=0,f=b.length;d<f;d++)for(var h=0,g=b[d].childNodes.length;h<g;h++)1==b[d].childNodes[h].nodeType&&(c?a(b[d].childNodes[h],c[d].childNodes[h]):a(b[d].childNodes[h]))}
|
||||
function Ka(a,b){if(!a||null===a||""===a)return 0;b||(b=k.getElementsByTagName("body")[0]);var c,d=k.createElement("div");d.style.width=p(a);b.appendChild(d);c=d.offsetWidth;b.removeChild(d);return c}function ba(a){var b=0,c,d=0,f=a.aoColumns.length,h,g=i("th",a.nTHead),e=a.nTable.getAttribute("width");for(h=0;h<f;h++)if(a.aoColumns[h].bVisible&&(d++,null!==a.aoColumns[h].sWidth)){c=Ka(a.aoColumns[h].sWidthOrig,a.nTable.parentNode);if(null!==c)a.aoColumns[h].sWidth=p(c);b++}if(f==g.length&&0===b&&
|
||||
d==f&&""===a.oScroll.sX&&""===a.oScroll.sY)for(h=0;h<a.aoColumns.length;h++){if(c=i(g[h]).width(),null!==c)a.aoColumns[h].sWidth=p(c)}else{b=a.nTable.cloneNode(!1);h=a.nTHead.cloneNode(!0);d=k.createElement("tbody");c=k.createElement("tr");b.removeAttribute("id");b.appendChild(h);null!==a.nTFoot&&(b.appendChild(a.nTFoot.cloneNode(!0)),N(function(a){a.style.width=""},b.getElementsByTagName("tr")));b.appendChild(d);d.appendChild(c);d=i("thead th",b);0===d.length&&(d=i("tbody tr:eq(0)>td",b));g=O(a,
|
||||
h);for(h=d=0;h<f;h++){var j=a.aoColumns[h];j.bVisible&&null!==j.sWidthOrig&&""!==j.sWidthOrig?g[h-d].style.width=p(j.sWidthOrig):j.bVisible?g[h-d].style.width="":d++}for(h=0;h<f;h++)a.aoColumns[h].bVisible&&(d=La(a,h),null!==d&&(d=d.cloneNode(!0),""!==a.aoColumns[h].sContentPadding&&(d.innerHTML+=a.aoColumns[h].sContentPadding),c.appendChild(d)));f=a.nTable.parentNode;f.appendChild(b);if(""!==a.oScroll.sX&&""!==a.oScroll.sXInner)b.style.width=p(a.oScroll.sXInner);else if(""!==a.oScroll.sX){if(b.style.width=
|
||||
"",i(b).width()<f.offsetWidth)b.style.width=p(f.offsetWidth)}else if(""!==a.oScroll.sY)b.style.width=p(f.offsetWidth);else if(e)b.style.width=p(e);b.style.visibility="hidden";Ma(a,b);f=i("tbody tr:eq(0)",b).children();0===f.length&&(f=O(a,i("thead",b)[0]));if(""!==a.oScroll.sX){for(h=d=c=0;h<a.aoColumns.length;h++)a.aoColumns[h].bVisible&&(c=null===a.aoColumns[h].sWidthOrig?c+i(f[d]).outerWidth():c+(parseInt(a.aoColumns[h].sWidth.replace("px",""),10)+(i(f[d]).outerWidth()-i(f[d]).width())),d++);b.style.width=
|
||||
p(c);a.nTable.style.width=p(c)}for(h=d=0;h<a.aoColumns.length;h++)if(a.aoColumns[h].bVisible){c=i(f[d]).width();if(null!==c&&0<c)a.aoColumns[h].sWidth=p(c);d++}f=i(b).css("width");a.nTable.style.width=-1!==f.indexOf("%")?f:p(i(b).outerWidth());b.parentNode.removeChild(b)}if(e)a.nTable.style.width=p(e)}function Ma(a,b){if(""===a.oScroll.sX&&""!==a.oScroll.sY)i(b).width(),b.style.width=p(i(b).outerWidth()-a.oScroll.iBarWidth);else if(""!==a.oScroll.sX)b.style.width=p(i(b).outerWidth())}function La(a,
|
||||
b){var c=Na(a,b);if(0>c)return null;if(null===a.aoData[c].nTr){var d=k.createElement("td");d.innerHTML=w(a,c,b,"");return d}return L(a,c)[b]}function Na(a,b){for(var c=-1,d=-1,f=0;f<a.aoData.length;f++){var h=w(a,f,b,"display")+"",h=h.replace(/<.*?>/g,"");if(h.length>c)c=h.length,d=f}return d}function p(a){if(null===a)return"0px";if("number"==typeof a)return 0>a?"0px":a+"px";var b=a.charCodeAt(a.length-1);return 48>b||57<b?a:a+"px"}function Oa(){var a=k.createElement("p"),b=a.style;b.width="100%";
|
||||
b.height="200px";b.padding="0px";var c=k.createElement("div"),b=c.style;b.position="absolute";b.top="0px";b.left="0px";b.visibility="hidden";b.width="200px";b.height="150px";b.padding="0px";b.overflow="hidden";c.appendChild(a);k.body.appendChild(c);b=a.offsetWidth;c.style.overflow="scroll";a=a.offsetWidth;if(b==a)a=c.clientWidth;k.body.removeChild(c);return b-a}function P(a,b){var c,d,f,h,g,e,o=[],m=[],r=j.ext.oSort,n=a.aoData,k=a.aoColumns,E=a.oLanguage.oAria;if(!a.oFeatures.bServerSide&&(0!==a.aaSorting.length||
|
||||
null!==a.aaSortingFixed)){o=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(c=0;c<o.length;c++)if(d=o[c][0],f=t(a,d),h=a.aoColumns[d].sSortDataType,j.ext.afnSortData[h]){g=j.ext.afnSortData[h](a,d,f);for(f=0,h=n.length;f<h;f++)J(a,f,d,g[f])}for(c=0,d=a.aiDisplayMaster.length;c<d;c++)m[a.aiDisplayMaster[c]]=c;var p=o.length,s;for(c=0,d=n.length;c<d;c++)for(f=0;f<p;f++){s=k[o[f][0]].aDataSort;for(g=0,e=s.length;g<e;g++)h=k[s[g]].sType,h=r[(h?h:"string")+"-pre"],
|
||||
n[c]._aSortData[s[g]]=h?h(w(a,c,s[g],"sort")):w(a,c,s[g],"sort")}a.aiDisplayMaster.sort(function(a,b){var c,d,f,h,g;for(c=0;c<p;c++){g=k[o[c][0]].aDataSort;for(d=0,f=g.length;d<f;d++)if(h=k[g[d]].sType,h=r[(h?h:"string")+"-"+o[c][1]](n[a]._aSortData[g[d]],n[b]._aSortData[g[d]]),0!==h)return h}return r["numeric-asc"](m[a],m[b])})}(b===l||b)&&!a.oFeatures.bDeferRender&&Q(a);for(c=0,d=a.aoColumns.length;c<d;c++)f=k[c].nTh,f.removeAttribute("aria-sort"),f.removeAttribute("aria-label"),k[c].bSortable?
|
||||
0<o.length&&o[0][0]==c?(f.setAttribute("aria-sort","asc"==o[0][1]?"ascending":"descending"),f.setAttribute("aria-label",k[c].sTitle+("asc"==(k[c].asSorting[o[0][2]+1]?k[c].asSorting[o[0][2]+1]:k[c].asSorting[0])?E.sSortAscending:E.sSortDescending))):f.setAttribute("aria-label",k[c].sTitle+("asc"==k[c].asSorting[0]?E.sSortAscending:E.sSortDescending)):f.setAttribute("aria-label",k[c].sTitle);a.bSorted=!0;i(a.oInstance).trigger("sort",a);a.oFeatures.bFilter?M(a,a.oPreviousSearch,1):(a.aiDisplay=a.aiDisplayMaster.slice(),
|
||||
a._iDisplayStart=0,z(a),y(a))}function ga(a,b,c,d){Pa(b,{},function(b){if(!1!==a.aoColumns[c].bSortable){var h=function(){var d,h;if(b.shiftKey){for(var e=!1,i=0;i<a.aaSorting.length;i++)if(a.aaSorting[i][0]==c){e=!0;d=a.aaSorting[i][0];h=a.aaSorting[i][2]+1;a.aoColumns[d].asSorting[h]?(a.aaSorting[i][1]=a.aoColumns[d].asSorting[h],a.aaSorting[i][2]=h):a.aaSorting.splice(i,1);break}!1===e&&a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0])}else 1==a.aaSorting.length&&a.aaSorting[0][0]==c?(d=a.aaSorting[0][0],
|
||||
h=a.aaSorting[0][2]+1,a.aoColumns[d].asSorting[h]||(h=0),a.aaSorting[0][1]=a.aoColumns[d].asSorting[h],a.aaSorting[0][2]=h):(a.aaSorting.splice(0,a.aaSorting.length),a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0]));P(a)};a.oFeatures.bProcessing?(H(a,!0),setTimeout(function(){h();a.oFeatures.bServerSide||H(a,!1)},0)):h();"function"==typeof d&&d(a)}})}function Q(a){var b,c,d,f,h,g=a.aoColumns.length,e=a.oClasses;for(b=0;b<g;b++)a.aoColumns[b].bSortable&&i(a.aoColumns[b].nTh).removeClass(e.sSortAsc+
|
||||
" "+e.sSortDesc+" "+a.aoColumns[b].sSortingClass);f=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(b=0;b<a.aoColumns.length;b++)if(a.aoColumns[b].bSortable){h=a.aoColumns[b].sSortingClass;d=-1;for(c=0;c<f.length;c++)if(f[c][0]==b){h="asc"==f[c][1]?e.sSortAsc:e.sSortDesc;d=c;break}i(a.aoColumns[b].nTh).addClass(h);a.bJUI&&(c=i("span."+e.sSortIcon,a.aoColumns[b].nTh),c.removeClass(e.sSortJUIAsc+" "+e.sSortJUIDesc+" "+e.sSortJUI+" "+e.sSortJUIAscAllowed+" "+e.sSortJUIDescAllowed),
|
||||
c.addClass(-1==d?a.aoColumns[b].sSortingClassJUI:"asc"==f[d][1]?e.sSortJUIAsc:e.sSortJUIDesc))}else i(a.aoColumns[b].nTh).addClass(a.aoColumns[b].sSortingClass);h=e.sSortColumn;if(a.oFeatures.bSort&&a.oFeatures.bSortClasses){d=L(a);if(a.oFeatures.bDeferRender)i(d).removeClass(h+"1 "+h+"2 "+h+"3");else if(d.length>=g)for(b=0;b<g;b++)if(-1!=d[b].className.indexOf(h+"1"))for(c=0,a=d.length/g;c<a;c++)d[g*c+b].className=i.trim(d[g*c+b].className.replace(h+"1",""));else if(-1!=d[b].className.indexOf(h+
|
||||
"2"))for(c=0,a=d.length/g;c<a;c++)d[g*c+b].className=i.trim(d[g*c+b].className.replace(h+"2",""));else if(-1!=d[b].className.indexOf(h+"3"))for(c=0,a=d.length/g;c<a;c++)d[g*c+b].className=i.trim(d[g*c+b].className.replace(" "+h+"3",""));var e=1,j;for(b=0;b<f.length;b++){j=parseInt(f[b][0],10);for(c=0,a=d.length/g;c<a;c++)d[g*c+j].className+=" "+h+e;3>e&&e++}}}function pa(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b,c;b=a.oScroll.bInfinite;var d={iCreate:(new Date).getTime(),iStart:b?0:a._iDisplayStart,
|
||||
iEnd:b?a._iDisplayLength:a._iDisplayEnd,iLength:a._iDisplayLength,aaSorting:i.extend(!0,[],a.aaSorting),oSearch:i.extend(!0,{},a.oPreviousSearch),aoSearchCols:i.extend(!0,[],a.aoPreSearchCols),abVisCols:[]};for(b=0,c=a.aoColumns.length;b<c;b++)d.abVisCols.push(a.aoColumns[b].bVisible);C(a,"aoStateSaveParams","stateSaveParams",[a,d]);a.fnStateSave.call(a.oInstance,a,d)}}function Qa(a,b){if(a.oFeatures.bStateSave){var c=a.fnStateLoad.call(a.oInstance,a);if(c){var d=C(a,"aoStateLoadParams","stateLoadParams",
|
||||
[a,c]);if(-1===i.inArray(!1,d)){a.oLoadedState=i.extend(!0,{},c);a._iDisplayStart=c.iStart;a.iInitDisplayStart=c.iStart;a._iDisplayEnd=c.iEnd;a._iDisplayLength=c.iLength;a.aaSorting=c.aaSorting.slice();a.saved_aaSorting=c.aaSorting.slice();i.extend(a.oPreviousSearch,c.oSearch);i.extend(!0,a.aoPreSearchCols,c.aoSearchCols);b.saved_aoColumns=[];for(d=0;d<c.abVisCols.length;d++)b.saved_aoColumns[d]={},b.saved_aoColumns[d].bVisible=c.abVisCols[d];C(a,"aoStateLoaded","stateLoaded",[a,c])}}}}function Ra(a){for(var b=
|
||||
aa.location.pathname.split("/"),a=a+"_"+b[b.length-1].replace(/[\/:]/g,"").toLowerCase()+"=",b=k.cookie.split(";"),c=0;c<b.length;c++){for(var d=b[c];" "==d.charAt(0);)d=d.substring(1,d.length);if(0===d.indexOf(a))return decodeURIComponent(d.substring(a.length,d.length))}return null}function u(a){for(var b=0;b<j.settings.length;b++)if(j.settings[b].nTable===a)return j.settings[b];return null}function S(a){for(var b=[],a=a.aoData,c=0,d=a.length;c<d;c++)null!==a[c].nTr&&b.push(a[c].nTr);return b}function L(a,
|
||||
b){var c=[],d,f,h,e,i,j;f=0;var o=a.aoData.length;b!==l&&(f=b,o=b+1);for(h=f;h<o;h++)if(j=a.aoData[h],null!==j.nTr){f=[];for(e=0,i=j.nTr.childNodes.length;e<i;e++)d=j.nTr.childNodes[e].nodeName.toLowerCase(),("td"==d||"th"==d)&&f.push(j.nTr.childNodes[e]);d=0;for(e=0,i=a.aoColumns.length;e<i;e++)a.aoColumns[e].bVisible?c.push(f[e-d]):(c.push(j._anHidden[e]),d++)}return c}function F(a,b,c){a=null===a?"DataTables warning: "+c:"DataTables warning (table id = '"+a.sTableId+"'): "+c;if(0===b)if("alert"==
|
||||
j.ext.sErrMode)alert(a);else throw a;else console!==l&&console.log&&console.log(a)}function n(a,b,c,d){d===l&&(d=c);b[c]!==l&&(a[d]=b[c])}function Sa(a,b){for(var c in a)a.hasOwnProperty(c)&&b[c]!==l&&("object"===typeof e[c]&&!1===i.isArray(b[c])?i.extend(!0,a[c],b[c]):a[c]=b[c]);return a}function Pa(a,b,c){i(a).bind("click.DT",b,function(b){c(b);a.blur()}).bind("keypress.DT",b,function(a){13===a.which&&c(a)}).bind("selectstart.DT",function(){return!1})}function A(a,b,c,d){c&&a[b].push({fn:c,sName:d})}
|
||||
function C(a,b,c,d){for(var b=a[b],f=[],h=b.length-1;0<=h;h--)f.push(b[h].fn.apply(a.oInstance,d));null!==c&&i(a.oInstance).trigger(c,d);return f}function Ta(a){return function(){var b=[u(this[j.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return j.ext.oApi[a].apply(this,b)}}var Ua=aa.JSON?JSON.stringify:function(a){var b=typeof a;if("object"!==b||null===a)return"string"===b&&(a='"'+a+'"'),a+"";var c,d,f=[],h=i.isArray(a);for(c in a)d=a[c],b=typeof d,"string"===b?d='"'+d+'"':"object"===
|
||||
b&&null!==d&&(d=Ua(d)),f.push((h?"":'"'+c+'":')+d);return(h?"[":"{")+f+(h?"]":"}")};this.$=function(a,b){var c,d,f=[],h=u(this[j.ext.iApiIndex]);b||(b={});b=i.extend({},{filter:"none",order:"current",page:"all"},b);if("current"==b.page)for(c=h._iDisplayStart,d=h.fnDisplayEnd();c<d;c++)f.push(h.aoData[h.aiDisplay[c]].nTr);else if("current"==b.order&&"none"==b.filter)for(c=0,d=h.aiDisplayMaster.length;c<d;c++)f.push(h.aoData[h.aiDisplayMaster[c]].nTr);else if("current"==b.order&&"applied"==b.filter)for(c=
|
||||
0,d=h.aiDisplay.length;c<d;c++)f.push(h.aoData[h.aiDisplay[c]].nTr);else if("original"==b.order&&"none"==b.filter)for(c=0,d=h.aoData.length;c<d;c++)f.push(h.aoData[c].nTr);else if("original"==b.order&&"applied"==b.filter)for(c=0,d=h.aoData.length;c<d;c++)-1!==i.inArray(c,h.aiDisplay)&&f.push(h.aoData[c].nTr);else F(h,1,"Unknown selection options");d=i(f);c=d.filter(a);d=d.find(a);return i([].concat(i.makeArray(c),i.makeArray(d)))};this._=function(a,b){var c=[],d,f,h=this.$(a,b);for(d=0,f=h.length;d<
|
||||
f;d++)c.push(this.fnGetData(h[d]));return c};this.fnAddData=function(a,b){if(0===a.length)return[];var c=[],d,f=u(this[j.ext.iApiIndex]);if("object"===typeof a[0]&&null!==a[0])for(var h=0;h<a.length;h++){d=G(f,a[h]);if(-1==d)return c;c.push(d)}else{d=G(f,a);if(-1==d)return c;c.push(d)}f.aiDisplay=f.aiDisplayMaster.slice();(b===l||b)&&Z(f);return c};this.fnAdjustColumnSizing=function(a){var b=u(this[j.ext.iApiIndex]);r(b);a===l||a?this.fnDraw(!1):(""!==b.oScroll.sX||""!==b.oScroll.sY)&&this.oApi._fnScrollDraw(b)};
|
||||
this.fnClearTable=function(a){var b=u(this[j.ext.iApiIndex]);ea(b);(a===l||a)&&y(b)};this.fnClose=function(a){for(var b=u(this[j.ext.iApiIndex]),c=0;c<b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a)return(a=b.aoOpenRows[c].nTr.parentNode)&&a.removeChild(b.aoOpenRows[c].nTr),b.aoOpenRows.splice(c,1),0;return 1};this.fnDeleteRow=function(a,b,c){var d=u(this[j.ext.iApiIndex]),f,h,a="object"===typeof a?K(d,a):a,e=d.aoData.splice(a,1);for(f=0,h=d.aoData.length;f<h;f++)if(null!==d.aoData[f].nTr)d.aoData[f].nTr._DT_RowIndex=
|
||||
f;f=i.inArray(a,d.aiDisplay);d.asDataSearch.splice(f,1);fa(d.aiDisplayMaster,a);fa(d.aiDisplay,a);"function"===typeof b&&b.call(this,d,e);if(d._iDisplayStart>=d.aiDisplay.length&&(d._iDisplayStart-=d._iDisplayLength,0>d._iDisplayStart))d._iDisplayStart=0;if(c===l||c)z(d),y(d);return e};this.fnDestroy=function(a){var b=u(this[j.ext.iApiIndex]),c=b.nTableWrapper.parentNode,d=b.nTBody,f,e,a=a===l?!1:!0;b.bDestroying=!0;for(f=0,e=b.aoDestroyCallback.length;f<e;f++)b.aoDestroyCallback[f].fn();for(f=0,
|
||||
e=b.aoColumns.length;f<e;f++)!1===b.aoColumns[f].bVisible&&this.fnSetColumnVis(f,!0);i(b.nTableWrapper).find("*").andSelf().unbind(".DT");i("tbody>tr>td."+b.oClasses.sRowEmpty,b.nTable).parent().remove();b.nTable!=b.nTHead.parentNode&&(i(b.nTable).children("thead").remove(),b.nTable.appendChild(b.nTHead));b.nTFoot&&b.nTable!=b.nTFoot.parentNode&&(i(b.nTable).children("tfoot").remove(),b.nTable.appendChild(b.nTFoot));b.nTable.parentNode.removeChild(b.nTable);i(b.nTableWrapper).remove();b.aaSorting=
|
||||
[];b.aaSortingFixed=[];Q(b);i(S(b)).removeClass(b.asStripeClasses.join(" "));i("th, td",b.nTHead).removeClass([b.oClasses.sSortable,b.oClasses.sSortableAsc,b.oClasses.sSortableDesc,b.oClasses.sSortableNone].join(" "));b.bJUI&&(i("th span."+b.oClasses.sSortIcon+", td span."+b.oClasses.sSortIcon,b.nTHead).remove(),i("th, td",b.nTHead).each(function(){var a=i("div."+b.oClasses.sSortJUIWrapper,this),c=a.contents();i(this).append(c);a.remove()}));!a&&b.nTableReinsertBefore?c.insertBefore(b.nTable,b.nTableReinsertBefore):
|
||||
a||c.appendChild(b.nTable);for(f=0,e=b.aoData.length;f<e;f++)null!==b.aoData[f].nTr&&d.appendChild(b.aoData[f].nTr);if(!0===b.oFeatures.bAutoWidth)b.nTable.style.width=p(b.sDestroyWidth);i(d).children("tr:even").addClass(b.asDestroyStripes[0]);i(d).children("tr:odd").addClass(b.asDestroyStripes[1]);for(f=0,e=j.settings.length;f<e;f++)j.settings[f]==b&&j.settings.splice(f,1);b=null};this.fnDraw=function(a){var b=u(this[j.ext.iApiIndex]);a?(z(b),y(b)):Z(b)};this.fnFilter=function(a,b,c,d,f,e){var g=
|
||||
u(this[j.ext.iApiIndex]);if(g.oFeatures.bFilter){if(c===l||null===c)c=!1;if(d===l||null===d)d=!0;if(f===l||null===f)f=!0;if(e===l||null===e)e=!0;if(b===l||null===b){if(M(g,{sSearch:a+"",bRegex:c,bSmart:d,bCaseInsensitive:e},1),f&&g.aanFeatures.f){b=g.aanFeatures.f;c=0;for(d=b.length;c<d;c++)i("input",b[c]).val(a)}}else i.extend(g.aoPreSearchCols[b],{sSearch:a+"",bRegex:c,bSmart:d,bCaseInsensitive:e}),M(g,g.oPreviousSearch,1)}};this.fnGetData=function(a,b){var c=u(this[j.ext.iApiIndex]);if(a!==l){var d=
|
||||
a;if("object"===typeof a){var f=a.nodeName.toLowerCase();"tr"===f?d=K(c,a):"td"===f&&(d=K(c,a.parentNode),b=da(c,d,a))}return b!==l?w(c,d,b,""):c.aoData[d]!==l?c.aoData[d]._aData:null}return X(c)};this.fnGetNodes=function(a){var b=u(this[j.ext.iApiIndex]);return a!==l?b.aoData[a]!==l?b.aoData[a].nTr:null:S(b)};this.fnGetPosition=function(a){var b=u(this[j.ext.iApiIndex]),c=a.nodeName.toUpperCase();if("TR"==c)return K(b,a);return"TD"==c||"TH"==c?(c=K(b,a.parentNode),a=da(b,c,a),[c,t(b,a),a]):null};
|
||||
this.fnIsOpen=function(a){for(var b=u(this[j.ext.iApiIndex]),c=0;c<b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a)return!0;return!1};this.fnOpen=function(a,b,c){var d=u(this[j.ext.iApiIndex]),f=S(d);if(-1!==i.inArray(a,f)){this.fnClose(a);var f=k.createElement("tr"),e=k.createElement("td");f.appendChild(e);e.className=c;e.colSpan=v(d);"string"===typeof b?e.innerHTML=b:i(e).html(b);b=i("tr",d.nTBody);-1!=i.inArray(a,b)&&i(f).insertAfter(a);d.aoOpenRows.push({nTr:f,nParent:a});return f}};this.fnPageChange=
|
||||
function(a,b){var c=u(this[j.ext.iApiIndex]);oa(c,a);z(c);(b===l||b)&&y(c)};this.fnSetColumnVis=function(a,b,c){var d=u(this[j.ext.iApiIndex]),f,e,g=d.aoColumns,i=d.aoData,o,m;if(g[a].bVisible!=b){if(b){for(f=e=0;f<a;f++)g[f].bVisible&&e++;m=e>=v(d);if(!m)for(f=a;f<g.length;f++)if(g[f].bVisible){o=f;break}for(f=0,e=i.length;f<e;f++)null!==i[f].nTr&&(m?i[f].nTr.appendChild(i[f]._anHidden[a]):i[f].nTr.insertBefore(i[f]._anHidden[a],L(d,f)[o]))}else for(f=0,e=i.length;f<e;f++)null!==i[f].nTr&&(o=L(d,
|
||||
f)[a],i[f]._anHidden[a]=o,o.parentNode.removeChild(o));g[a].bVisible=b;U(d,d.aoHeader);d.nTFoot&&U(d,d.aoFooter);for(f=0,e=d.aoOpenRows.length;f<e;f++)d.aoOpenRows[f].nTr.colSpan=v(d);if(c===l||c)r(d),y(d);pa(d)}};this.fnSettings=function(){return u(this[j.ext.iApiIndex])};this.fnSort=function(a){var b=u(this[j.ext.iApiIndex]);b.aaSorting=a;P(b)};this.fnSortListener=function(a,b,c){ga(u(this[j.ext.iApiIndex]),a,b,c)};this.fnUpdate=function(a,b,c,d,f){var e=u(this[j.ext.iApiIndex]),b="object"===typeof b?
|
||||
K(e,b):b;if(e.__fnUpdateDeep===l&&i.isArray(a)&&"object"===typeof a){e.aoData[b]._aData=a.slice();e.__fnUpdateDeep=!0;for(c=0;c<e.aoColumns.length;c++)this.fnUpdate(w(e,b,c),b,c,!1,!1);e.__fnUpdateDeep=l}else if(e.__fnUpdateDeep===l&&null!==a&&"object"===typeof a){e.aoData[b]._aData=i.extend(!0,{},a);e.__fnUpdateDeep=!0;for(c=0;c<e.aoColumns.length;c++)this.fnUpdate(w(e,b,c),b,c,!1,!1);e.__fnUpdateDeep=l}else{J(e,b,c,a);var a=w(e,b,c,"display"),g=e.aoColumns[c];null!==g.fnRender&&(a=R(e,b,c),g.bUseRendered&&
|
||||
J(e,b,c,a));if(null!==e.aoData[b].nTr)L(e,b)[c].innerHTML=a}c=i.inArray(b,e.aiDisplay);e.asDataSearch[c]=la(e,W(e,b,"filter"));(f===l||f)&&r(e);(d===l||d)&&Z(e);return 0};this.fnVersionCheck=j.ext.fnVersionCheck;this.oApi={_fnExternApiFunc:Ta,_fnInitialise:$,_fnInitComplete:Y,_fnLanguageCompat:na,_fnAddColumn:o,_fnColumnOptions:E,_fnAddData:G,_fnCreateTr:ca,_fnGatherData:ta,_fnBuildHead:ua,_fnDrawHead:U,_fnDraw:y,_fnReDraw:Z,_fnAjaxUpdate:va,_fnAjaxParameters:Da,_fnAjaxUpdateDraw:Ea,_fnServerParams:ha,
|
||||
_fnAddOptionsHtml:wa,_fnFeatureHtmlTable:Aa,_fnScrollDraw:Ja,_fnAdjustColumnSizing:r,_fnFeatureHtmlFilter:ya,_fnFilterComplete:M,_fnFilterCustom:Ha,_fnFilterColumn:Ga,_fnFilter:Fa,_fnBuildSearchArray:ia,_fnBuildSearchRow:la,_fnFilterCreateSearch:ja,_fnDataToSearch:ka,_fnSort:P,_fnSortAttachListener:ga,_fnSortingClasses:Q,_fnFeatureHtmlPaginate:Ca,_fnPageChange:oa,_fnFeatureHtmlInfo:Ba,_fnUpdateInfo:Ia,_fnFeatureHtmlLength:xa,_fnFeatureHtmlProcessing:za,_fnProcessingDisplay:H,_fnVisibleToColumnIndex:s,
|
||||
_fnColumnIndexToVisible:t,_fnNodeToDataIndex:K,_fnVisbleColumns:v,_fnCalculateEnd:z,_fnConvertToWidth:Ka,_fnCalculateColumnWidths:ba,_fnScrollingWidthAdjust:Ma,_fnGetWidestNode:La,_fnGetMaxLenString:Na,_fnStringToCss:p,_fnDetectType:B,_fnSettingsFromNode:u,_fnGetDataMaster:X,_fnGetTrNodes:S,_fnGetTdNodes:L,_fnEscapeRegex:ma,_fnDeleteIndex:fa,_fnReOrderIndex:D,_fnColumnOrdering:x,_fnLog:F,_fnClearTable:ea,_fnSaveState:pa,_fnLoadState:Qa,_fnCreateCookie:function(a,b,c,d,e){var h=new Date;h.setTime(h.getTime()+
|
||||
1E3*c);var c=aa.location.pathname.split("/"),a=a+"_"+c.pop().replace(/[\/:]/g,"").toLowerCase(),g;null!==e?(g="function"===typeof i.parseJSON?i.parseJSON(b):eval("("+b+")"),b=e(a,g,h.toGMTString(),c.join("/")+"/")):b=a+"="+encodeURIComponent(b)+"; expires="+h.toGMTString()+"; path="+c.join("/")+"/";e="";h=9999999999999;if(4096<(null!==Ra(a)?k.cookie.length:b.length+k.cookie.length)+10){for(var a=k.cookie.split(";"),j=0,o=a.length;j<o;j++)if(-1!=a[j].indexOf(d)){var m=a[j].split("=");try{g=eval("("+
|
||||
decodeURIComponent(m[1])+")")}catch(l){continue}if(g.iCreate&&g.iCreate<h)e=m[0],h=g.iCreate}if(""!==e)k.cookie=e+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+c.join("/")+"/"}k.cookie=b},_fnReadCookie:Ra,_fnDetectHeader:T,_fnGetUniqueThs:O,_fnScrollBarWidth:Oa,_fnApplyToChildren:N,_fnMap:n,_fnGetRowData:W,_fnGetCellData:w,_fnSetCellData:J,_fnGetObjectDataFn:V,_fnSetObjectDataFn:sa,_fnApplyColumnDefs:I,_fnBindAction:Pa,_fnExtend:Sa,_fnCallbackReg:A,_fnCallbackFire:C,_fnJsonString:Ua,_fnRender:R,
|
||||
_fnNodeToColumnIndex:da};i.extend(j.ext.oApi,this.oApi);for(var qa in j.ext.oApi)qa&&(this[qa]=Ta(qa));var ra=this;return this.each(function(){var a=0,b,c,d;c=this.getAttribute("id");var f=!1,h=!1;if("table"!=this.nodeName.toLowerCase())F(null,0,"Attempted to initialise DataTables on a node which is not a table: "+this.nodeName);else{for(a=0,b=j.settings.length;a<b;a++){if(j.settings[a].nTable==this){if(e===l||e.bRetrieve)return j.settings[a].oInstance;if(e.bDestroy){j.settings[a].oInstance.fnDestroy();
|
||||
break}else{F(j.settings[a],0,"Cannot reinitialise DataTable.\n\nTo retrieve the DataTables object for this table, pass no arguments or see the docs for bRetrieve and bDestroy");return}}if(j.settings[a].sTableId==this.id){j.settings.splice(a,1);break}}if(null===c)this.id=c="DataTables_Table_"+j.ext._oExternConfig.iNextUnique++;var g=i.extend(!0,{},j.models.oSettings,{nTable:this,oApi:ra.oApi,oInit:e,sDestroyWidth:i(this).width(),sInstance:c,sTableId:c});j.settings.push(g);g.oInstance=1===ra.length?
|
||||
ra:i(this).dataTable();e||(e={});e.oLanguage&&na(e.oLanguage);e=Sa(i.extend(!0,{},j.defaults),e);n(g.oFeatures,e,"bPaginate");n(g.oFeatures,e,"bLengthChange");n(g.oFeatures,e,"bFilter");n(g.oFeatures,e,"bSort");n(g.oFeatures,e,"bInfo");n(g.oFeatures,e,"bProcessing");n(g.oFeatures,e,"bAutoWidth");n(g.oFeatures,e,"bSortClasses");n(g.oFeatures,e,"bServerSide");n(g.oFeatures,e,"bDeferRender");n(g.oScroll,e,"sScrollX","sX");n(g.oScroll,e,"sScrollXInner","sXInner");n(g.oScroll,e,"sScrollY","sY");n(g.oScroll,
|
||||
e,"bScrollCollapse","bCollapse");n(g.oScroll,e,"bScrollInfinite","bInfinite");n(g.oScroll,e,"iScrollLoadGap","iLoadGap");n(g.oScroll,e,"bScrollAutoCss","bAutoCss");n(g,e,"asStripClasses","asStripeClasses");n(g,e,"asStripeClasses");n(g,e,"fnServerData");n(g,e,"fnFormatNumber");n(g,e,"sServerMethod");n(g,e,"aaSorting");n(g,e,"aaSortingFixed");n(g,e,"aLengthMenu");n(g,e,"sPaginationType");n(g,e,"sAjaxSource");n(g,e,"sAjaxDataProp");n(g,e,"iCookieDuration");n(g,e,"sCookiePrefix");n(g,e,"sDom");n(g,e,
|
||||
"bSortCellsTop");n(g,e,"iTabIndex");n(g,e,"oSearch","oPreviousSearch");n(g,e,"aoSearchCols","aoPreSearchCols");n(g,e,"iDisplayLength","_iDisplayLength");n(g,e,"bJQueryUI","bJUI");n(g,e,"fnCookieCallback");n(g,e,"fnStateLoad");n(g,e,"fnStateSave");n(g.oLanguage,e,"fnInfoCallback");A(g,"aoDrawCallback",e.fnDrawCallback,"user");A(g,"aoServerParams",e.fnServerParams,"user");A(g,"aoStateSaveParams",e.fnStateSaveParams,"user");A(g,"aoStateLoadParams",e.fnStateLoadParams,"user");A(g,"aoStateLoaded",e.fnStateLoaded,
|
||||
"user");A(g,"aoRowCallback",e.fnRowCallback,"user");A(g,"aoRowCreatedCallback",e.fnCreatedRow,"user");A(g,"aoHeaderCallback",e.fnHeaderCallback,"user");A(g,"aoFooterCallback",e.fnFooterCallback,"user");A(g,"aoInitComplete",e.fnInitComplete,"user");A(g,"aoPreDrawCallback",e.fnPreDrawCallback,"user");g.oFeatures.bServerSide&&g.oFeatures.bSort&&g.oFeatures.bSortClasses?A(g,"aoDrawCallback",Q,"server_side_sort_classes"):g.oFeatures.bDeferRender&&A(g,"aoDrawCallback",Q,"defer_sort_classes");if(e.bJQueryUI){if(i.extend(g.oClasses,
|
||||
j.ext.oJUIClasses),e.sDom===j.defaults.sDom&&"lfrtip"===j.defaults.sDom)g.sDom='<"H"lfr>t<"F"ip>'}else i.extend(g.oClasses,j.ext.oStdClasses);i(this).addClass(g.oClasses.sTable);if(""!==g.oScroll.sX||""!==g.oScroll.sY)g.oScroll.iBarWidth=Oa();if(g.iInitDisplayStart===l)g.iInitDisplayStart=e.iDisplayStart,g._iDisplayStart=e.iDisplayStart;if(e.bStateSave)g.oFeatures.bStateSave=!0,Qa(g,e),A(g,"aoDrawCallback",pa,"state_save");if(null!==e.iDeferLoading)g.bDeferLoading=!0,g._iRecordsTotal=e.iDeferLoading,
|
||||
g._iRecordsDisplay=e.iDeferLoading;null!==e.aaData&&(h=!0);""!==e.oLanguage.sUrl?(g.oLanguage.sUrl=e.oLanguage.sUrl,i.getJSON(g.oLanguage.sUrl,null,function(a){na(a);i.extend(!0,g.oLanguage,e.oLanguage,a);$(g)}),f=!0):i.extend(!0,g.oLanguage,e.oLanguage);c=!1;d=i(this).children("tbody").children("tr");for(a=0,b=g.asStripeClasses.length;a<b;a++)if(d.filter(":lt(2)").hasClass(g.asStripeClasses[a])){c=!0;break}if(c)g.asDestroyStripes=["",""],i(d[0]).hasClass(g.oClasses.sStripeOdd)&&(g.asDestroyStripes[0]+=
|
||||
g.oClasses.sStripeOdd+" "),i(d[0]).hasClass(g.oClasses.sStripeEven)&&(g.asDestroyStripes[0]+=g.oClasses.sStripeEven),i(d[1]).hasClass(g.oClasses.sStripeOdd)&&(g.asDestroyStripes[1]+=g.oClasses.sStripeOdd+" "),i(d[1]).hasClass(g.oClasses.sStripeEven)&&(g.asDestroyStripes[1]+=g.oClasses.sStripeEven),d.removeClass(g.asStripeClasses.join(" "));c=[];a=this.getElementsByTagName("thead");0!==a.length&&(T(g.aoHeader,a[0]),c=O(g));if(null===e.aoColumns){d=[];for(a=0,b=c.length;a<b;a++)d.push(null)}else d=
|
||||
e.aoColumns;for(a=0,b=d.length;a<b;a++){if(e.saved_aoColumns!==l&&e.saved_aoColumns.length==b)null===d[a]&&(d[a]={}),d[a].bVisible=e.saved_aoColumns[a].bVisible;o(g,c?c[a]:null)}I(g,e.aoColumnDefs,d,function(a,b){E(g,a,b)});for(a=0,b=g.aaSorting.length;a<b;a++){g.aaSorting[a][0]>=g.aoColumns.length&&(g.aaSorting[a][0]=0);var r=g.aoColumns[g.aaSorting[a][0]];g.aaSorting[a][2]===l&&(g.aaSorting[a][2]=0);e.aaSorting===l&&g.saved_aaSorting===l&&(g.aaSorting[a][1]=r.asSorting[0]);for(c=0,d=r.asSorting.length;c<
|
||||
d;c++)if(g.aaSorting[a][1]==r.asSorting[c]){g.aaSorting[a][2]=c;break}}Q(g);a=i(this).children("thead");0===a.length&&(a=[k.createElement("thead")],this.appendChild(a[0]));g.nTHead=a[0];a=i(this).children("tbody");0===a.length&&(a=[k.createElement("tbody")],this.appendChild(a[0]));g.nTBody=a[0];g.nTBody.setAttribute("role","alert");g.nTBody.setAttribute("aria-live","polite");g.nTBody.setAttribute("aria-relevant","all");a=i(this).children("tfoot");if(0<a.length)g.nTFoot=a[0],T(g.aoFooter,g.nTFoot);
|
||||
if(h)for(a=0;a<e.aaData.length;a++)G(g,e.aaData[a]);else ta(g);g.aiDisplay=g.aiDisplayMaster.slice();g.bInitialised=!0;!1===f&&$(g)}})};j.version="1.9.0";j.settings=[];j.models={};j.models.ext={afnFiltering:[],afnSortData:[],aoFeatures:[],aTypes:[],fnVersionCheck:function(e){for(var i=function(e,i){for(;e.length<i;)e+="0";return e},l=j.ext.sVersion.split("."),e=e.split("."),r="",k="",t=0,v=e.length;t<v;t++)r+=i(l[t],3),k+=i(e[t],3);return parseInt(r,10)>=parseInt(k,10)},iApiIndex:0,ofnSearch:{},oApi:{},
|
||||
oStdClasses:{},oJUIClasses:{},oPagination:{},oSort:{},sVersion:j.version,sErrMode:"alert",_oExternConfig:{iNextUnique:0}};j.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};j.models.oRow={nTr:null,_aData:[],_aSortData:[],_anHidden:[],_sRowStripe:""};j.models.oColumn={aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bUseRendered:null,bVisible:null,_bAutoType:!0,fnCreatedCell:null,fnGetData:null,fnRender:null,fnSetData:null,mDataProp:null,nTh:null,nTf:null,sClass:null,
|
||||
sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};j.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:["odd","even"],bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollAutoCss:!0,bScrollCollapse:!1,
|
||||
bScrollInfinite:!1,bServerSide:!1,bSort:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCookieCallback:null,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(e){if(1E3>e)return e;for(var i=e+"",e=i.split(""),j="",i=i.length,l=0;l<i;l++)0===l%3&&0!==l&&(j=this.oLanguage.sInfoThousands+j),j=e[i-l-1]+j;return j},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:function(e,j,l,k){k.jqXHR=i.ajax({url:e,
|
||||
data:j,success:function(e){i(k.oInstance).trigger("xhr",k);l(e)},dataType:"json",cache:!1,type:k.sServerMethod,error:function(e,i){"parsererror"==i&&alert("DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.")}})},fnServerParams:null,fnStateLoad:function(e){var e=this.oApi._fnReadCookie(e.sCookiePrefix+e.sInstance),j;try{j="function"===typeof i.parseJSON?i.parseJSON(e):eval("("+e+")")}catch(l){j=null}return j},fnStateLoadParams:null,fnStateLoaded:null,
|
||||
fnStateSave:function(e,i){this.oApi._fnCreateCookie(e.sCookiePrefix+e.sInstance,this.oApi._fnJsonString(i),e.iCookieDuration,e.sCookiePrefix,e.fnCookieCallback)},fnStateSaveParams:null,iCookieDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iScrollLoadGap:100,iTabIndex:0,oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",
|
||||
sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sInfoThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sUrl:"",sZeroRecords:"No matching records found"},oSearch:i.extend({},j.models.oSearch),sAjaxDataProp:"aaData",sAjaxSource:null,sCookiePrefix:"SpryMedia_DataTables_",sDom:"lfrtip",sPaginationType:"two_button",sScrollX:"",
|
||||
sScrollXInner:"",sScrollY:"",sServerMethod:"GET"};j.defaults.columns={aDataSort:null,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bUseRendered:!0,bVisible:!0,fnCreatedCell:null,fnRender:null,iDataSort:-1,mDataProp:null,sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};j.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,
|
||||
bSortClasses:null,bStateSave:null},oScroll:{bAutoCss:null,bCollapse:null,bInfinite:null,iBarWidth:0,iLoadGap:null,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aoColumns:[],aoHeader:[],aoFooter:[],asDataSearch:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:null,asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],
|
||||
aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,sPaginationType:"two_button",iCookieDuration:0,sCookiePrefix:"",fnCookieCallback:null,aoStateSave:[],aoStateLoad:[],oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,
|
||||
aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iDisplayEnd:10,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsTotal,10):this.aiDisplayMaster.length},fnRecordsDisplay:function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsDisplay,10):this.aiDisplay.length},fnDisplayEnd:function(){return this.oFeatures.bServerSide?
|
||||
!1===this.oFeatures.bPaginate||-1==this._iDisplayLength?this._iDisplayStart+this.aiDisplay.length:Math.min(this._iDisplayStart+this._iDisplayLength,this._iRecordsDisplay):this._iDisplayEnd},oInstance:null,sInstance:null,iTabIndex:0};j.ext=i.extend(!0,{},j.models.ext);i.extend(j.ext.oStdClasses,{sTable:"dataTable",sPagePrevEnabled:"paginate_enabled_previous",sPagePrevDisabled:"paginate_disabled_previous",sPageNextEnabled:"paginate_enabled_next",sPageNextDisabled:"paginate_disabled_next",sPageJUINext:"",
|
||||
sPageJUIPrev:"",sPageButton:"paginate_button",sPageButtonActive:"paginate_active",sPageButtonStaticDisabled:"paginate_button paginate_button_disabled",sPageFirst:"first",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",
|
||||
sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",
|
||||
sFooterTH:""});i.extend(j.ext.oJUIClasses,j.ext.oStdClasses,{sPagePrevEnabled:"fg-button ui-button ui-state-default ui-corner-left",sPagePrevDisabled:"fg-button ui-button ui-state-default ui-corner-left ui-state-disabled",sPageNextEnabled:"fg-button ui-button ui-state-default ui-corner-right",sPageNextDisabled:"fg-button ui-button ui-state-default ui-corner-right ui-state-disabled",sPageJUINext:"ui-icon ui-icon-circle-arrow-e",sPageJUIPrev:"ui-icon ui-icon-circle-arrow-w",sPageButton:"fg-button ui-button ui-state-default",
|
||||
sPageButtonActive:"fg-button ui-button ui-state-default ui-state-disabled",sPageButtonStaticDisabled:"fg-button ui-button ui-state-default ui-state-disabled",sPageFirst:"first ui-corner-tl ui-corner-bl",sPageLast:"last ui-corner-tr ui-corner-br",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:"ui-state-default",sSortDesc:"ui-state-default",sSortable:"ui-state-default",sSortableAsc:"ui-state-default",sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default",
|
||||
sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead ui-state-default",sScrollFoot:"dataTables_scrollFoot ui-state-default",sFooterTH:"ui-state-default"});i.extend(j.ext.oPagination,
|
||||
{two_button:{fnInit:function(e,j,l){var k=e.oLanguage.oPaginate,s=function(i){e.oApi._fnPageChange(e,i.data.action)&&l(e)},k=!e.bJUI?'<a class="'+e.oClasses.sPagePrevDisabled+'" tabindex="'+e.iTabIndex+'" role="button">'+k.sPrevious+'</a><a class="'+e.oClasses.sPageNextDisabled+'" tabindex="'+e.iTabIndex+'" role="button">'+k.sNext+"</a>":'<a class="'+e.oClasses.sPagePrevDisabled+'" tabindex="'+e.iTabIndex+'" role="button"><span class="'+e.oClasses.sPageJUIPrev+'"></span></a><a class="'+e.oClasses.sPageNextDisabled+
|
||||
'" tabindex="'+e.iTabIndex+'" role="button"><span class="'+e.oClasses.sPageJUINext+'"></span></a>';i(j).append(k);var t=i("a",j),k=t[0],t=t[1];e.oApi._fnBindAction(k,{action:"previous"},s);e.oApi._fnBindAction(t,{action:"next"},s);if(!e.aanFeatures.p)j.id=e.sTableId+"_paginate",k.id=e.sTableId+"_previous",t.id=e.sTableId+"_next",k.setAttribute("aria-controls",e.sTableId),t.setAttribute("aria-controls",e.sTableId)},fnUpdate:function(e){if(e.aanFeatures.p)for(var i=e.oClasses,j=e.aanFeatures.p,l=0,
|
||||
k=j.length;l<k;l++)if(0!==j[l].childNodes.length)j[l].childNodes[0].className=0===e._iDisplayStart?i.sPagePrevDisabled:i.sPagePrevEnabled,j[l].childNodes[1].className=e.fnDisplayEnd()==e.fnRecordsDisplay()?i.sPageNextDisabled:i.sPageNextEnabled}},iFullNumbersShowPages:5,full_numbers:{fnInit:function(e,j,l){var k=e.oLanguage.oPaginate,s=e.oClasses,t=function(i){e.oApi._fnPageChange(e,i.data.action)&&l(e)};i(j).append('<a tabindex="'+e.iTabIndex+'" class="'+s.sPageButton+" "+s.sPageFirst+'">'+k.sFirst+
|
||||
'</a><a tabindex="'+e.iTabIndex+'" class="'+s.sPageButton+" "+s.sPagePrevious+'">'+k.sPrevious+'</a><span></span><a tabindex="'+e.iTabIndex+'" class="'+s.sPageButton+" "+s.sPageNext+'">'+k.sNext+'</a><a tabindex="'+e.iTabIndex+'" class="'+s.sPageButton+" "+s.sPageLast+'">'+k.sLast+"</a>");var v=i("a",j),k=v[0],s=v[1],B=v[2],v=v[3];e.oApi._fnBindAction(k,{action:"first"},t);e.oApi._fnBindAction(s,{action:"previous"},t);e.oApi._fnBindAction(B,{action:"next"},t);e.oApi._fnBindAction(v,{action:"last"},
|
||||
t);if(!e.aanFeatures.p)j.id=e.sTableId+"_paginate",k.id=e.sTableId+"_first",s.id=e.sTableId+"_previous",B.id=e.sTableId+"_next",v.id=e.sTableId+"_last"},fnUpdate:function(e,l){if(e.aanFeatures.p){var k=j.ext.oPagination.iFullNumbersShowPages,r=Math.floor(k/2),s=Math.ceil(e.fnRecordsDisplay()/e._iDisplayLength),t=Math.ceil(e._iDisplayStart/e._iDisplayLength)+1,v="",B,D=e.oClasses,x,I=e.aanFeatures.p,G=function(i){e.oApi._fnBindAction(this,{page:i+B-1},function(i){e.oApi._fnPageChange(e,i.data.page);
|
||||
l(e);i.preventDefault()})};s<k?(B=1,r=s):t<=r?(B=1,r=k):t>=s-r?(B=s-k+1,r=s):(B=t-Math.ceil(k/2)+1,r=B+k-1);for(k=B;k<=r;k++)v+=t!==k?'<a tabindex="'+e.iTabIndex+'" class="'+D.sPageButton+'">'+e.fnFormatNumber(k)+"</a>":'<a tabindex="'+e.iTabIndex+'" class="'+D.sPageButtonActive+'">'+e.fnFormatNumber(k)+"</a>";for(k=0,r=I.length;k<r;k++)0!==I[k].childNodes.length&&(i("span:eq(0)",I[k]).html(v).children("a").each(G),x=I[k].getElementsByTagName("a"),x=[x[0],x[1],x[x.length-2],x[x.length-1]],i(x).removeClass(D.sPageButton+
|
||||
" "+D.sPageButtonActive+" "+D.sPageButtonStaticDisabled),i([x[0],x[1]]).addClass(1==t?D.sPageButtonStaticDisabled:D.sPageButton),i([x[2],x[3]]).addClass(0===s||t===s||-1===e._iDisplayLength?D.sPageButtonStaticDisabled:D.sPageButton))}}}});i.extend(j.ext.oSort,{"string-pre":function(e){"string"!=typeof e&&(e="");return e.toLowerCase()},"string-asc":function(e,i){return e<i?-1:e>i?1:0},"string-desc":function(e,i){return e<i?1:e>i?-1:0},"html-pre":function(e){return e.replace(/<.*?>/g,"").toLowerCase()},
|
||||
"html-asc":function(e,i){return e<i?-1:e>i?1:0},"html-desc":function(e,i){return e<i?1:e>i?-1:0},"date-pre":function(e){e=Date.parse(e);if(isNaN(e)||""===e)e=Date.parse("01/01/1970 00:00:00");return e},"date-asc":function(e,i){return e-i},"date-desc":function(e,i){return i-e},"numeric-pre":function(e){return"-"==e||""===e?0:1*e},"numeric-asc":function(e,i){return e-i},"numeric-desc":function(e,i){return i-e}});i.extend(j.ext.aTypes,[function(e){if("number"===typeof e)return"numeric";if("string"!==
|
||||
typeof e)return null;var i,j=!1;i=e.charAt(0);if(-1=="0123456789-".indexOf(i))return null;for(var k=1;k<e.length;k++){i=e.charAt(k);if(-1=="0123456789.".indexOf(i))return null;if("."==i){if(j)return null;j=!0}}return"numeric"},function(e){var i=Date.parse(e);return null!==i&&!isNaN(i)||"string"===typeof e&&0===e.length?"date":null},function(e){return"string"===typeof e&&-1!=e.indexOf("<")&&-1!=e.indexOf(">")?"html":null}]);i.fn.DataTable=j;i.fn.dataTable=j;i.fn.dataTableSettings=j.settings;i.fn.dataTableExt=
|
||||
j.ext})(jQuery,window,document,void 0);
|
||||
|
|
|
@ -0,0 +1,916 @@
|
|||
/*
|
||||
* File: FixedHeader.js
|
||||
* Version: 2.0.5
|
||||
* Description: "Fix" a header at the top of the table, so it scrolls with the table
|
||||
* Author: Allan Jardine (www.sprymedia.co.uk)
|
||||
* Created: Wed 16 Sep 2009 19:46:30 BST
|
||||
* Language: Javascript
|
||||
* License: GPL v2 or BSD 3 point style
|
||||
* Project: Just a little bit of fun - enjoy :-)
|
||||
* Contact: www.sprymedia.co.uk/contact
|
||||
*
|
||||
* Copyright 2009-2010 Allan Jardine, all rights reserved.
|
||||
*
|
||||
* This source file is free software, under either the GPL v2 license or a
|
||||
* BSD style license, available at:
|
||||
* http://datatables.net/license_gpl2
|
||||
* http://datatables.net/license_bsd
|
||||
*/
|
||||
|
||||
/*
|
||||
* Function: FixedHeader
|
||||
* Purpose: Provide 'fixed' header, footer and columns on an HTML table
|
||||
* Returns: object:FixedHeader - must be called with 'new'
|
||||
* Inputs: mixed:mTable - target table
|
||||
* 1. DataTable object - when using FixedHeader with DataTables, or
|
||||
* 2. HTML table node - when using FixedHeader without DataTables
|
||||
* object:oInit - initialisation settings, with the following properties (each optional)
|
||||
* bool:top - fix the header (default true)
|
||||
* bool:bottom - fix the footer (default false)
|
||||
* bool:left - fix the left most column (default false)
|
||||
* bool:right - fix the right most column (default false)
|
||||
* int:zTop - fixed header zIndex
|
||||
* int:zBottom - fixed footer zIndex
|
||||
* int:zLeft - fixed left zIndex
|
||||
* int:zRight - fixed right zIndex
|
||||
*/
|
||||
var FixedHeader = function ( mTable, oInit ) {
|
||||
/* Sanity check - you just know it will happen */
|
||||
if ( typeof this.fnInit != 'function' )
|
||||
{
|
||||
alert( "FixedHeader warning: FixedHeader must be initialised with the 'new' keyword." );
|
||||
return;
|
||||
}
|
||||
|
||||
var that = this;
|
||||
var oSettings = {
|
||||
"aoCache": [],
|
||||
"oSides": {
|
||||
"top": true,
|
||||
"bottom": false,
|
||||
"left": false,
|
||||
"right": false
|
||||
},
|
||||
"oZIndexes": {
|
||||
"top": 104,
|
||||
"bottom": 103,
|
||||
"left": 102,
|
||||
"right": 101
|
||||
},
|
||||
"oMes": {
|
||||
"iTableWidth": 0,
|
||||
"iTableHeight": 0,
|
||||
"iTableLeft": 0,
|
||||
"iTableRight": 0, /* note this is left+width, not actually "right" */
|
||||
"iTableTop": 0,
|
||||
"iTableBottom": 0 /* note this is top+height, not actually "bottom" */
|
||||
},
|
||||
"nTable": null,
|
||||
"bUseAbsPos": false,
|
||||
"bFooter": false
|
||||
};
|
||||
|
||||
/*
|
||||
* Function: fnGetSettings
|
||||
* Purpose: Get the settings for this object
|
||||
* Returns: object: - settings object
|
||||
* Inputs: -
|
||||
*/
|
||||
this.fnGetSettings = function () {
|
||||
return oSettings;
|
||||
};
|
||||
|
||||
/*
|
||||
* Function: fnUpdate
|
||||
* Purpose: Update the positioning and copies of the fixed elements
|
||||
* Returns: -
|
||||
* Inputs: -
|
||||
*/
|
||||
this.fnUpdate = function () {
|
||||
this._fnUpdateClones();
|
||||
this._fnUpdatePositions();
|
||||
};
|
||||
|
||||
/*
|
||||
* Function: fnPosition
|
||||
* Purpose: Update the positioning of the fixed elements
|
||||
* Returns: -
|
||||
* Inputs: -
|
||||
*/
|
||||
this.fnPosition = function () {
|
||||
this._fnUpdatePositions();
|
||||
};
|
||||
|
||||
/* Let's do it */
|
||||
this.fnInit( mTable, oInit );
|
||||
|
||||
/* Store the instance on the DataTables object for easy access */
|
||||
if ( typeof mTable.fnSettings == 'function' )
|
||||
{
|
||||
mTable._oPluginFixedHeader = this;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Variable: FixedHeader
|
||||
* Purpose: Prototype for FixedHeader
|
||||
* Scope: global
|
||||
*/
|
||||
FixedHeader.prototype = {
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Initialisation
|
||||
*/
|
||||
|
||||
/*
|
||||
* Function: fnInit
|
||||
* Purpose: The "constructor"
|
||||
* Returns: -
|
||||
* Inputs: {as FixedHeader function}
|
||||
*/
|
||||
fnInit: function ( oTable, oInit )
|
||||
{
|
||||
var s = this.fnGetSettings();
|
||||
var that = this;
|
||||
|
||||
/* Record the user definable settings */
|
||||
this.fnInitSettings( s, oInit );
|
||||
|
||||
/* DataTables specific stuff */
|
||||
if ( typeof oTable.fnSettings == 'function' )
|
||||
{
|
||||
if ( typeof oTable.fnVersionCheck == 'functon' &&
|
||||
oTable.fnVersionCheck( '1.6.0' ) !== true )
|
||||
{
|
||||
alert( "FixedHeader 2 required DataTables 1.6.0 or later. "+
|
||||
"Please upgrade your DataTables installation" );
|
||||
return;
|
||||
}
|
||||
|
||||
var oDtSettings = oTable.fnSettings();
|
||||
|
||||
if ( oDtSettings.oScroll.sX != "" || oDtSettings.oScroll.sY != "" )
|
||||
{
|
||||
alert( "FixedHeader 2 is not supported with DataTables' scrolling mode at this time" );
|
||||
return;
|
||||
}
|
||||
|
||||
s.nTable = oDtSettings.nTable;
|
||||
oDtSettings.aoDrawCallback.push( {
|
||||
"fn": function () {
|
||||
FixedHeader.fnMeasure();
|
||||
that._fnUpdateClones.call(that);
|
||||
that._fnUpdatePositions.call(that);
|
||||
},
|
||||
"sName": "FixedHeader"
|
||||
} );
|
||||
}
|
||||
else
|
||||
{
|
||||
s.nTable = oTable;
|
||||
}
|
||||
|
||||
s.bFooter = ($('>tfoot', s.nTable).length > 0) ? true : false;
|
||||
|
||||
/* "Detect" browsers that don't support absolute positioing - or have bugs */
|
||||
s.bUseAbsPos = (jQuery.browser.msie && (jQuery.browser.version=="6.0"||jQuery.browser.version=="7.0"));
|
||||
|
||||
/* Add the 'sides' that are fixed */
|
||||
if ( s.oSides.top )
|
||||
{
|
||||
s.aoCache.push( that._fnCloneTable( "fixedHeader", "FixedHeader_Header", that._fnCloneThead ) );
|
||||
}
|
||||
if ( s.oSides.bottom )
|
||||
{
|
||||
s.aoCache.push( that._fnCloneTable( "fixedFooter", "FixedHeader_Footer", that._fnCloneTfoot ) );
|
||||
}
|
||||
if ( s.oSides.left )
|
||||
{
|
||||
s.aoCache.push( that._fnCloneTable( "fixedLeft", "FixedHeader_Left", that._fnCloneTLeft ) );
|
||||
}
|
||||
if ( s.oSides.right )
|
||||
{
|
||||
s.aoCache.push( that._fnCloneTable( "fixedRight", "FixedHeader_Right", that._fnCloneTRight ) );
|
||||
}
|
||||
|
||||
/* Event listeners for window movement */
|
||||
FixedHeader.afnScroll.push( function () {
|
||||
that._fnUpdatePositions.call(that);
|
||||
} );
|
||||
|
||||
jQuery(window).resize( function () {
|
||||
FixedHeader.fnMeasure();
|
||||
that._fnUpdateClones.call(that);
|
||||
that._fnUpdatePositions.call(that);
|
||||
} );
|
||||
|
||||
/* Get things right to start with */
|
||||
FixedHeader.fnMeasure();
|
||||
that._fnUpdateClones();
|
||||
that._fnUpdatePositions();
|
||||
},
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Support functions
|
||||
*/
|
||||
|
||||
/*
|
||||
* Function: fnInitSettings
|
||||
* Purpose: Take the user's settings and copy them to our local store
|
||||
* Returns: -
|
||||
* Inputs: object:s - the local settings object
|
||||
* object:oInit - the user's settings object
|
||||
*/
|
||||
fnInitSettings: function ( s, oInit )
|
||||
{
|
||||
if ( typeof oInit != 'undefined' )
|
||||
{
|
||||
if ( typeof oInit.top != 'undefined' ) {
|
||||
s.oSides.top = oInit.top;
|
||||
}
|
||||
if ( typeof oInit.bottom != 'undefined' ) {
|
||||
s.oSides.bottom = oInit.bottom;
|
||||
}
|
||||
if ( typeof oInit.left != 'undefined' ) {
|
||||
s.oSides.left = oInit.left;
|
||||
}
|
||||
if ( typeof oInit.right != 'undefined' ) {
|
||||
s.oSides.right = oInit.right;
|
||||
}
|
||||
|
||||
if ( typeof oInit.zTop != 'undefined' ) {
|
||||
s.oZIndexes.top = oInit.zTop;
|
||||
}
|
||||
if ( typeof oInit.zBottom != 'undefined' ) {
|
||||
s.oZIndexes.bottom = oInit.zBottom;
|
||||
}
|
||||
if ( typeof oInit.zLeft != 'undefined' ) {
|
||||
s.oZIndexes.left = oInit.zLeft;
|
||||
}
|
||||
if ( typeof oInit.zRight != 'undefined' ) {
|
||||
s.oZIndexes.right = oInit.zRight;
|
||||
}
|
||||
}
|
||||
|
||||
/* Detect browsers which have poor position:fixed support so we can use absolute positions.
|
||||
* This is much slower since the position must be updated for each scroll, but widens
|
||||
* compatibility
|
||||
*/
|
||||
s.bUseAbsPos = (jQuery.browser.msie &&
|
||||
(jQuery.browser.version=="6.0"||jQuery.browser.version=="7.0"));
|
||||
},
|
||||
|
||||
/*
|
||||
* Function: _fnCloneTable
|
||||
* Purpose: Clone the table node and do basic initialisation
|
||||
* Returns: -
|
||||
* Inputs: -
|
||||
*/
|
||||
_fnCloneTable: function ( sType, sClass, fnClone )
|
||||
{
|
||||
var s = this.fnGetSettings();
|
||||
var nCTable;
|
||||
|
||||
/* We know that the table _MUST_ has a DIV wrapped around it, because this is simply how
|
||||
* DataTables works. Therefore, we can set this to be relatively position (if it is not
|
||||
* alreadu absolute, and use this as the base point for the cloned header
|
||||
*/
|
||||
if ( jQuery(s.nTable.parentNode).css('position') != "absolute" )
|
||||
{
|
||||
s.nTable.parentNode.style.position = "relative";
|
||||
}
|
||||
|
||||
/* Just a shallow clone will do - we only want the table node */
|
||||
nCTable = s.nTable.cloneNode( false );
|
||||
nCTable.removeAttribute( 'id' );
|
||||
|
||||
var nDiv = document.createElement( 'div' );
|
||||
nDiv.style.position = "absolute";
|
||||
nDiv.style.top = "0px";
|
||||
nDiv.style.left = "0px";
|
||||
nDiv.className += " FixedHeader_Cloned "+sType+" "+sClass;
|
||||
|
||||
/* Set the zIndexes */
|
||||
if ( sType == "fixedHeader" )
|
||||
{
|
||||
nDiv.style.zIndex = s.oZIndexes.top;
|
||||
}
|
||||
if ( sType == "fixedFooter" )
|
||||
{
|
||||
nDiv.style.zIndex = s.oZIndexes.bottom;
|
||||
}
|
||||
if ( sType == "fixedLeft" )
|
||||
{
|
||||
nDiv.style.zIndex = s.oZIndexes.left;
|
||||
}
|
||||
else if ( sType == "fixedRight" )
|
||||
{
|
||||
nDiv.style.zIndex = s.oZIndexes.right;
|
||||
}
|
||||
|
||||
/* remove margins since we are going to poistion it absolutely */
|
||||
nCTable.style.margin = "0";
|
||||
|
||||
/* Insert the newly cloned table into the DOM, on top of the "real" header */
|
||||
nDiv.appendChild( nCTable );
|
||||
document.body.appendChild( nDiv );
|
||||
|
||||
return {
|
||||
"nNode": nCTable,
|
||||
"nWrapper": nDiv,
|
||||
"sType": sType,
|
||||
"sPosition": "",
|
||||
"sTop": "",
|
||||
"sLeft": "",
|
||||
"fnClone": fnClone
|
||||
};
|
||||
},
|
||||
|
||||
/*
|
||||
* Function: _fnUpdatePositions
|
||||
* Purpose: Get the current positioning of the table in the DOM
|
||||
* Returns: -
|
||||
* Inputs: -
|
||||
*/
|
||||
_fnMeasure: function ()
|
||||
{
|
||||
var
|
||||
s = this.fnGetSettings(),
|
||||
m = s.oMes,
|
||||
jqTable = jQuery(s.nTable),
|
||||
oOffset = jqTable.offset(),
|
||||
iParentScrollTop = this._fnSumScroll( s.nTable.parentNode, 'scrollTop' ),
|
||||
iParentScrollLeft = this._fnSumScroll( s.nTable.parentNode, 'scrollLeft' );
|
||||
|
||||
m.iTableWidth = jqTable.outerWidth();
|
||||
m.iTableHeight = jqTable.outerHeight();
|
||||
m.iTableLeft = oOffset.left + s.nTable.parentNode.scrollLeft;
|
||||
m.iTableTop = oOffset.top + iParentScrollTop;
|
||||
m.iTableRight = m.iTableLeft + m.iTableWidth;
|
||||
m.iTableRight = FixedHeader.oDoc.iWidth - m.iTableLeft - m.iTableWidth;
|
||||
m.iTableBottom = FixedHeader.oDoc.iHeight - m.iTableTop - m.iTableHeight;
|
||||
},
|
||||
|
||||
/*
|
||||
* Function: _fnSumScroll
|
||||
* Purpose: Sum node parameters all the way to the top
|
||||
* Returns: int: sum
|
||||
* Inputs: node:n - node to consider
|
||||
* string:side - scrollTop or scrollLeft
|
||||
*/
|
||||
_fnSumScroll: function ( n, side )
|
||||
{
|
||||
var i = n[side];
|
||||
while ( n = n.parentNode )
|
||||
{
|
||||
if ( n.nodeName != 'HTML' && n.nodeName != 'BODY' )
|
||||
{
|
||||
break;
|
||||
}
|
||||
i = n[side];
|
||||
}
|
||||
return i;
|
||||
},
|
||||
|
||||
/*
|
||||
* Function: _fnUpdatePositions
|
||||
* Purpose: Loop over the fixed elements for this table and update their positions
|
||||
* Returns: -
|
||||
* Inputs: -
|
||||
*/
|
||||
_fnUpdatePositions: function ()
|
||||
{
|
||||
var s = this.fnGetSettings();
|
||||
this._fnMeasure();
|
||||
|
||||
for ( var i=0, iLen=s.aoCache.length ; i<iLen ; i++ )
|
||||
{
|
||||
if ( s.aoCache[i].sType == "fixedHeader" )
|
||||
{
|
||||
this._fnScrollFixedHeader( s.aoCache[i] );
|
||||
}
|
||||
else if ( s.aoCache[i].sType == "fixedFooter" )
|
||||
{
|
||||
this._fnScrollFixedFooter( s.aoCache[i] );
|
||||
}
|
||||
else if ( s.aoCache[i].sType == "fixedLeft" )
|
||||
{
|
||||
this._fnScrollHorizontalLeft( s.aoCache[i] );
|
||||
}
|
||||
else
|
||||
{
|
||||
this._fnScrollHorizontalRight( s.aoCache[i] );
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
* Function: _fnUpdateClones
|
||||
* Purpose: Loop over the fixed elements for this table and call their cloning functions
|
||||
* Returns: -
|
||||
* Inputs: -
|
||||
*/
|
||||
_fnUpdateClones: function ()
|
||||
{
|
||||
var s = this.fnGetSettings();
|
||||
for ( var i=0, iLen=s.aoCache.length ; i<iLen ; i++ )
|
||||
{
|
||||
s.aoCache[i].fnClone.call( this, s.aoCache[i] );
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Scrolling functions
|
||||
*/
|
||||
|
||||
/*
|
||||
* Function: _fnScrollHorizontalLeft
|
||||
* Purpose: Update the positioning of the scrolling elements
|
||||
* Returns: -
|
||||
* Inputs: object:oCache - the cahced values for this fixed element
|
||||
*/
|
||||
_fnScrollHorizontalRight: function ( oCache )
|
||||
{
|
||||
var
|
||||
s = this.fnGetSettings(),
|
||||
oMes = s.oMes,
|
||||
oWin = FixedHeader.oWin,
|
||||
oDoc = FixedHeader.oDoc,
|
||||
nTable = oCache.nWrapper,
|
||||
iFixedWidth = jQuery(nTable).outerWidth();
|
||||
|
||||
if ( oWin.iScrollRight < oMes.iTableRight )
|
||||
{
|
||||
/* Fully right aligned */
|
||||
this._fnUpdateCache( oCache, 'sPosition', 'absolute', 'position', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sTop', oMes.iTableTop+"px", 'top', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sLeft', (oMes.iTableLeft+oMes.iTableWidth-iFixedWidth)+"px", 'left', nTable.style );
|
||||
}
|
||||
else if ( oMes.iTableLeft < oDoc.iWidth-oWin.iScrollRight-iFixedWidth )
|
||||
{
|
||||
/* Middle */
|
||||
if ( s.bUseAbsPos )
|
||||
{
|
||||
this._fnUpdateCache( oCache, 'sPosition', 'absolute', 'position', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sTop', oMes.iTableTop+"px", 'top', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sLeft', (oDoc.iWidth-oWin.iScrollRight-iFixedWidth)+"px", 'left', nTable.style );
|
||||
}
|
||||
else
|
||||
{
|
||||
this._fnUpdateCache( oCache, 'sPosition', 'fixed', 'position', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sTop', (oMes.iTableTop-oWin.iScrollTop)+"px", 'top', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sLeft', (oWin.iWidth-iFixedWidth)+"px", 'left', nTable.style );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Fully left aligned */
|
||||
this._fnUpdateCache( oCache, 'sPosition', 'absolute', 'position', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sTop', oMes.iTableTop+"px", 'top', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sLeft', oMes.iTableLeft+"px", 'left', nTable.style );
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
* Function: _fnScrollHorizontalLeft
|
||||
* Purpose: Update the positioning of the scrolling elements
|
||||
* Returns: -
|
||||
* Inputs: object:oCache - the cahced values for this fixed element
|
||||
*/
|
||||
_fnScrollHorizontalLeft: function ( oCache )
|
||||
{
|
||||
var
|
||||
s = this.fnGetSettings(),
|
||||
oMes = s.oMes,
|
||||
oWin = FixedHeader.oWin,
|
||||
oDoc = FixedHeader.oDoc,
|
||||
nTable = oCache.nWrapper,
|
||||
iCellWidth = jQuery(nTable).outerWidth();
|
||||
|
||||
if ( oWin.iScrollLeft < oMes.iTableLeft )
|
||||
{
|
||||
/* Fully left align */
|
||||
this._fnUpdateCache( oCache, 'sPosition', 'absolute', 'position', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sTop', oMes.iTableTop+"px", 'top', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sLeft', oMes.iTableLeft+"px", 'left', nTable.style );
|
||||
}
|
||||
else if ( oWin.iScrollLeft < oMes.iTableLeft+oMes.iTableWidth-iCellWidth )
|
||||
{
|
||||
/* Middle */
|
||||
if ( s.bUseAbsPos )
|
||||
{
|
||||
this._fnUpdateCache( oCache, 'sPosition', 'absolute', 'position', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sTop', oMes.iTableTop+"px", 'top', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sLeft', oWin.iScrollLeft+"px", 'left', nTable.style );
|
||||
}
|
||||
else
|
||||
{
|
||||
this._fnUpdateCache( oCache, 'sPosition', 'fixed', 'position', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sTop', (oMes.iTableTop-oWin.iScrollTop)+"px", 'top', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sLeft', "0px", 'left', nTable.style );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Fully right align */
|
||||
this._fnUpdateCache( oCache, 'sPosition', 'absolute', 'position', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sTop', oMes.iTableTop+"px", 'top', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sLeft', (oMes.iTableLeft+oMes.iTableWidth-iCellWidth)+"px", 'left', nTable.style );
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
* Function: _fnScrollFixedFooter
|
||||
* Purpose: Update the positioning of the scrolling elements
|
||||
* Returns: -
|
||||
* Inputs: object:oCache - the cahced values for this fixed element
|
||||
*/
|
||||
_fnScrollFixedFooter: function ( oCache )
|
||||
{
|
||||
var
|
||||
s = this.fnGetSettings(),
|
||||
oMes = s.oMes,
|
||||
oWin = FixedHeader.oWin,
|
||||
oDoc = FixedHeader.oDoc,
|
||||
nTable = oCache.nWrapper,
|
||||
iTheadHeight = jQuery("thead", s.nTable).outerHeight(),
|
||||
iCellHeight = jQuery(nTable).outerHeight();
|
||||
|
||||
if ( oWin.iScrollBottom < oMes.iTableBottom )
|
||||
{
|
||||
/* Below */
|
||||
this._fnUpdateCache( oCache, 'sPosition', 'absolute', 'position', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sTop', (oMes.iTableTop+oMes.iTableHeight-iCellHeight)+"px", 'top', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sLeft', oMes.iTableLeft+"px", 'left', nTable.style );
|
||||
}
|
||||
else if ( oWin.iScrollBottom < oMes.iTableBottom+oMes.iTableHeight-iCellHeight-iTheadHeight )
|
||||
{
|
||||
/* Middle */
|
||||
if ( s.bUseAbsPos )
|
||||
{
|
||||
this._fnUpdateCache( oCache, 'sPosition', "absolute", 'position', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sTop', (oDoc.iHeight-oWin.iScrollBottom-iCellHeight)+"px", 'top', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sLeft', oMes.iTableLeft+"px", 'left', nTable.style );
|
||||
}
|
||||
else
|
||||
{
|
||||
this._fnUpdateCache( oCache, 'sPosition', 'fixed', 'position', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sTop', (oWin.iHeight-iCellHeight)+"px", 'top', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sLeft', (oMes.iTableLeft-oWin.iScrollLeft)+"px", 'left', nTable.style );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Above */
|
||||
this._fnUpdateCache( oCache, 'sPosition', 'absolute', 'position', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sTop', (oMes.iTableTop+iCellHeight)+"px", 'top', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sLeft', oMes.iTableLeft+"px", 'left', nTable.style );
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
* Function: _fnScrollFixedHeader
|
||||
* Purpose: Update the positioning of the scrolling elements
|
||||
* Returns: -
|
||||
* Inputs: object:oCache - the cahced values for this fixed element
|
||||
*/
|
||||
_fnScrollFixedHeader: function ( oCache )
|
||||
{
|
||||
var
|
||||
s = this.fnGetSettings(),
|
||||
oMes = s.oMes,
|
||||
oWin = FixedHeader.oWin,
|
||||
oDoc = FixedHeader.oDoc,
|
||||
nTable = oCache.nWrapper,
|
||||
iTbodyHeight = s.nTable.getElementsByTagName('tbody')[0].offsetHeight;
|
||||
|
||||
if ( oMes.iTableTop > oWin.iScrollTop )
|
||||
{
|
||||
/* Above the table */
|
||||
this._fnUpdateCache( oCache, 'sPosition', "absolute", 'position', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sTop', oMes.iTableTop+"px", 'top', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sLeft', oMes.iTableLeft+"px", 'left', nTable.style );
|
||||
}
|
||||
else if ( oWin.iScrollTop > oMes.iTableTop+iTbodyHeight )
|
||||
{
|
||||
/* At the bottom of the table */
|
||||
this._fnUpdateCache( oCache, 'sPosition', "absolute", 'position', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sTop', (oMes.iTableTop+iTbodyHeight)+"px", 'top', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sLeft', oMes.iTableLeft+"px", 'left', nTable.style );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* In the middle of the table */
|
||||
if ( s.bUseAbsPos )
|
||||
{
|
||||
this._fnUpdateCache( oCache, 'sPosition', "absolute", 'position', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sTop', oWin.iScrollTop+"px", 'top', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sLeft', oMes.iTableLeft+"px", 'left', nTable.style );
|
||||
}
|
||||
else
|
||||
{
|
||||
this._fnUpdateCache( oCache, 'sPosition', 'fixed', 'position', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sTop', "0px", 'top', nTable.style );
|
||||
this._fnUpdateCache( oCache, 'sLeft', (oMes.iTableLeft-oWin.iScrollLeft)+"px", 'left', nTable.style );
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
* Function: _fnUpdateCache
|
||||
* Purpose: Check the cache and update cache and value if needed
|
||||
* Returns: -
|
||||
* Inputs: object:oCache - local cache object
|
||||
* string:sCache - cache property
|
||||
* string:sSet - value to set
|
||||
* string:sProperty - object property to set
|
||||
* object:oObj - object to update
|
||||
*/
|
||||
_fnUpdateCache: function ( oCache, sCache, sSet, sProperty, oObj )
|
||||
{
|
||||
if ( oCache[sCache] != sSet )
|
||||
{
|
||||
oObj[sProperty] = sSet;
|
||||
oCache[sCache] = sSet;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Cloning functions
|
||||
*/
|
||||
|
||||
/*
|
||||
* Function: _fnCloneThead
|
||||
* Purpose: Clone the thead element
|
||||
* Returns: -
|
||||
* Inputs: object:oCache - the cahced values for this fixed element
|
||||
*/
|
||||
_fnCloneThead: function ( oCache )
|
||||
{
|
||||
var s = this.fnGetSettings();
|
||||
var nTable = oCache.nNode;
|
||||
|
||||
/* Set the wrapper width to match that of the cloned table */
|
||||
oCache.nWrapper.style.width = jQuery(s.nTable).outerWidth()+"px";
|
||||
|
||||
/* Remove any children the cloned table has */
|
||||
while ( nTable.childNodes.length > 0 )
|
||||
{
|
||||
jQuery('thead th', nTable).unbind( 'click' );
|
||||
nTable.removeChild( nTable.childNodes[0] );
|
||||
}
|
||||
|
||||
/* Clone the DataTables header */
|
||||
var nThead = jQuery('thead', s.nTable).clone(true)[0];
|
||||
nTable.appendChild( nThead );
|
||||
|
||||
/* Copy the widths across - apparently a clone isn't good enough for this */
|
||||
jQuery("thead>tr th", s.nTable).each( function (i) {
|
||||
jQuery("thead>tr th:eq("+i+")", nTable).width( jQuery(this).width() );
|
||||
} );
|
||||
|
||||
jQuery("thead>tr td", s.nTable).each( function (i) {
|
||||
jQuery("thead>tr td:eq("+i+")", nTable).width( jQuery(this).width() );
|
||||
} );
|
||||
},
|
||||
|
||||
/*
|
||||
* Function: _fnCloneTfoot
|
||||
* Purpose: Clone the tfoot element
|
||||
* Returns: -
|
||||
* Inputs: object:oCache - the cahced values for this fixed element
|
||||
*/
|
||||
_fnCloneTfoot: function ( oCache )
|
||||
{
|
||||
var s = this.fnGetSettings();
|
||||
var nTable = oCache.nNode;
|
||||
|
||||
/* Set the wrapper width to match that of the cloned table */
|
||||
oCache.nWrapper.style.width = jQuery(s.nTable).outerWidth()+"px";
|
||||
|
||||
/* Remove any children the cloned table has */
|
||||
while ( nTable.childNodes.length > 0 )
|
||||
{
|
||||
nTable.removeChild( nTable.childNodes[0] );
|
||||
}
|
||||
|
||||
/* Clone the DataTables footer */
|
||||
var nTfoot = jQuery('tfoot', s.nTable).clone(true)[0];
|
||||
nTable.appendChild( nTfoot );
|
||||
|
||||
/* Copy the widths across - apparently a clone isn't good enough for this */
|
||||
jQuery("tfoot:eq(0)>tr th", s.nTable).each( function (i) {
|
||||
jQuery("tfoot:eq(0)>tr th:eq("+i+")", nTable).width( jQuery(this).width() );
|
||||
} );
|
||||
|
||||
jQuery("tfoot:eq(0)>tr td", s.nTable).each( function (i) {
|
||||
jQuery("tfoot:eq(0)>tr th:eq("+i+")", nTable)[0].style.width( jQuery(this).width() );
|
||||
} );
|
||||
},
|
||||
|
||||
/*
|
||||
* Function: _fnCloneTLeft
|
||||
* Purpose: Clone the left column
|
||||
* Returns: -
|
||||
* Inputs: object:oCache - the cahced values for this fixed element
|
||||
*/
|
||||
_fnCloneTLeft: function ( oCache )
|
||||
{
|
||||
var s = this.fnGetSettings();
|
||||
var nTable = oCache.nNode;
|
||||
var nBody = $('tbody', s.nTable)[0];
|
||||
var iCols = $('tbody tr:eq(0) td', s.nTable).length;
|
||||
var bRubbishOldIE = ($.browser.msie && ($.browser.version == "6.0" || $.browser.version == "7.0"));
|
||||
|
||||
/* Remove any children the cloned table has */
|
||||
while ( nTable.childNodes.length > 0 )
|
||||
{
|
||||
nTable.removeChild( nTable.childNodes[0] );
|
||||
}
|
||||
|
||||
/* Is this the most efficient way to do this - it looks horrible... */
|
||||
nTable.appendChild( jQuery("thead", s.nTable).clone(true)[0] );
|
||||
nTable.appendChild( jQuery("tbody", s.nTable).clone(true)[0] );
|
||||
if ( s.bFooter )
|
||||
{
|
||||
nTable.appendChild( jQuery("tfoot", s.nTable).clone(true)[0] );
|
||||
}
|
||||
|
||||
jQuery('thead tr th:gt(0)', nTable).remove();
|
||||
jQuery('tfoot tr th:gt(0)', nTable).remove();
|
||||
|
||||
/* Remove unneeded cells */
|
||||
$('tbody tr', nTable).each( function (k) {
|
||||
$('td:gt(0)', this).remove();
|
||||
} );
|
||||
|
||||
this.fnEqualiseHeights( 'tbody', nBody.parentNode, nTable );
|
||||
|
||||
var iWidth = jQuery('thead tr th:eq(0)', s.nTable).outerWidth();
|
||||
nTable.style.width = iWidth+"px";
|
||||
oCache.nWrapper.style.width = iWidth+"px";
|
||||
},
|
||||
|
||||
/*
|
||||
* Function: _fnCloneTRight
|
||||
* Purpose: Clone the right most colun
|
||||
* Returns: -
|
||||
* Inputs: object:oCache - the cahced values for this fixed element
|
||||
*/
|
||||
_fnCloneTRight: function ( oCache )
|
||||
{
|
||||
var s = this.fnGetSettings();
|
||||
var nBody = $('tbody', s.nTable)[0];
|
||||
var nTable = oCache.nNode;
|
||||
var iCols = jQuery('tbody tr:eq(0) td', s.nTable).length;
|
||||
var bRubbishOldIE = ($.browser.msie && ($.browser.version == "6.0" || $.browser.version == "7.0"));
|
||||
|
||||
/* Remove any children the cloned table has */
|
||||
while ( nTable.childNodes.length > 0 )
|
||||
{
|
||||
nTable.removeChild( nTable.childNodes[0] );
|
||||
}
|
||||
|
||||
/* Is this the most efficient way to do this - it looks horrible... */
|
||||
nTable.appendChild( jQuery("thead", s.nTable).clone(true)[0] );
|
||||
nTable.appendChild( jQuery("tbody", s.nTable).clone(true)[0] );
|
||||
if ( s.bFooter )
|
||||
{
|
||||
nTable.appendChild( jQuery("tfoot", s.nTable).clone(true)[0] );
|
||||
}
|
||||
jQuery('thead tr th:not(:nth-child('+iCols+'n))', nTable).remove();
|
||||
jQuery('tfoot tr th:not(:nth-child('+iCols+'n))', nTable).remove();
|
||||
|
||||
/* Remove unneeded cells */
|
||||
$('tbody tr', nTable).each( function (k) {
|
||||
$('td:lt('+(iCols-1)+')', this).remove();
|
||||
} );
|
||||
|
||||
this.fnEqualiseHeights( 'tbody', nBody.parentNode, nTable );
|
||||
|
||||
var iWidth = jQuery('thead tr th:eq('+(iCols-1)+')', s.nTable).outerWidth();
|
||||
nTable.style.width = iWidth+"px";
|
||||
oCache.nWrapper.style.width = iWidth+"px";
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Equalise the heights of the rows in a given table node in a cross browser way. Note that this
|
||||
* is more or less lifted as is from FixedColumns
|
||||
* @method fnEqualiseHeights
|
||||
* @returns void
|
||||
* @param {string} parent Node type - thead, tbody or tfoot
|
||||
* @param {element} original Original node to take the heights from
|
||||
* @param {element} clone Copy the heights to
|
||||
* @private
|
||||
*/
|
||||
"fnEqualiseHeights": function ( parent, original, clone )
|
||||
{
|
||||
var that = this,
|
||||
jqBoxHack = $(parent+' tr:eq(0)', original).children(':eq(0)'),
|
||||
iBoxHack = jqBoxHack.outerHeight() - jqBoxHack.height(),
|
||||
bRubbishOldIE = ($.browser.msie && ($.browser.version == "6.0" || $.browser.version == "7.0"));
|
||||
|
||||
/* Remove cells which are not needed and copy the height from the original table */
|
||||
$(parent+' tr', clone).each( function (k) {
|
||||
/* Can we use some kind of object detection here?! This is very nasty - damn browsers */
|
||||
if ( $.browser.mozilla || $.browser.opera )
|
||||
{
|
||||
$(this).children().height( $(parent+' tr:eq('+k+')', original).outerHeight() );
|
||||
}
|
||||
else
|
||||
{
|
||||
$(this).children().height( $(parent+' tr:eq('+k+')', original).outerHeight() - iBoxHack );
|
||||
}
|
||||
|
||||
if ( !bRubbishOldIE )
|
||||
{
|
||||
$(parent+' tr:eq('+k+')', original).height( $(parent+' tr:eq('+k+')', original).outerHeight() );
|
||||
}
|
||||
} );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Static properties and methods
|
||||
* We use these for speed! This information is common to all instances of FixedHeader, so no
|
||||
* point if having them calculated and stored for each different instance.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Variable: oWin
|
||||
* Purpose: Store information about the window positioning
|
||||
* Scope: FixedHeader
|
||||
*/
|
||||
FixedHeader.oWin = {
|
||||
"iScrollTop": 0,
|
||||
"iScrollRight": 0,
|
||||
"iScrollBottom": 0,
|
||||
"iScrollLeft": 0,
|
||||
"iHeight": 0,
|
||||
"iWidth": 0
|
||||
};
|
||||
|
||||
/*
|
||||
* Variable: oDoc
|
||||
* Purpose: Store information about the document size
|
||||
* Scope: FixedHeader
|
||||
*/
|
||||
FixedHeader.oDoc = {
|
||||
"iHeight": 0,
|
||||
"iWidth": 0
|
||||
};
|
||||
|
||||
/*
|
||||
* Variable: afnScroll
|
||||
* Purpose: Array of functions that are to be used for the scrolling components
|
||||
* Scope: FixedHeader
|
||||
*/
|
||||
FixedHeader.afnScroll = [];
|
||||
|
||||
/*
|
||||
* Function: fnMeasure
|
||||
* Purpose: Update the measurements for the window and document
|
||||
* Returns: -
|
||||
* Inputs: -
|
||||
*/
|
||||
FixedHeader.fnMeasure = function ()
|
||||
{
|
||||
var
|
||||
jqWin = jQuery(window),
|
||||
jqDoc = jQuery(document),
|
||||
oWin = FixedHeader.oWin,
|
||||
oDoc = FixedHeader.oDoc;
|
||||
|
||||
oDoc.iHeight = jqDoc.height();
|
||||
oDoc.iWidth = jqDoc.width();
|
||||
|
||||
oWin.iHeight = jqWin.height();
|
||||
oWin.iWidth = jqWin.width();
|
||||
oWin.iScrollTop = jqWin.scrollTop();
|
||||
oWin.iScrollLeft = jqWin.scrollLeft();
|
||||
oWin.iScrollRight = oDoc.iWidth - oWin.iScrollLeft - oWin.iWidth;
|
||||
oWin.iScrollBottom = oDoc.iHeight - oWin.iScrollTop - oWin.iHeight;
|
||||
};
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Global processing
|
||||
*/
|
||||
|
||||
/*
|
||||
* Just one 'scroll' event handler in FixedHeader, which calls the required components. This is
|
||||
* done as an optimisation, to reduce calculation and proagation time
|
||||
*/
|
||||
jQuery(window).scroll( function () {
|
||||
FixedHeader.fnMeasure();
|
||||
for ( var i=0, iLen=FixedHeader.afnScroll.length ; i<iLen ; i++ )
|
||||
{
|
||||
FixedHeader.afnScroll[i]();
|
||||
}
|
||||
} );
|
|
@ -0,0 +1,367 @@
|
|||
// Simple Set Clipboard System
|
||||
// Author: Joseph Huckaby
|
||||
|
||||
var ZeroClipboard = {
|
||||
|
||||
version: "1.0.4-TableTools2",
|
||||
clients: {}, // registered upload clients on page, indexed by id
|
||||
moviePath: '', // URL to movie
|
||||
nextId: 1, // ID of next movie
|
||||
|
||||
$: function(thingy) {
|
||||
// simple DOM lookup utility function
|
||||
if (typeof(thingy) == 'string') thingy = document.getElementById(thingy);
|
||||
if (!thingy.addClass) {
|
||||
// extend element with a few useful methods
|
||||
thingy.hide = function() { this.style.display = 'none'; };
|
||||
thingy.show = function() { this.style.display = ''; };
|
||||
thingy.addClass = function(name) { this.removeClass(name); this.className += ' ' + name; };
|
||||
thingy.removeClass = function(name) {
|
||||
this.className = this.className.replace( new RegExp("\\s*" + name + "\\s*"), " ").replace(/^\s+/, '').replace(/\s+$/, '');
|
||||
};
|
||||
thingy.hasClass = function(name) {
|
||||
return !!this.className.match( new RegExp("\\s*" + name + "\\s*") );
|
||||
}
|
||||
}
|
||||
return thingy;
|
||||
},
|
||||
|
||||
setMoviePath: function(path) {
|
||||
// set path to ZeroClipboard.swf
|
||||
this.moviePath = path;
|
||||
},
|
||||
|
||||
dispatch: function(id, eventName, args) {
|
||||
// receive event from flash movie, send to client
|
||||
var client = this.clients[id];
|
||||
if (client) {
|
||||
client.receiveEvent(eventName, args);
|
||||
}
|
||||
},
|
||||
|
||||
register: function(id, client) {
|
||||
// register new client to receive events
|
||||
this.clients[id] = client;
|
||||
},
|
||||
|
||||
getDOMObjectPosition: function(obj) {
|
||||
// get absolute coordinates for dom element
|
||||
var info = {
|
||||
left: 0,
|
||||
top: 0,
|
||||
width: obj.width ? obj.width : obj.offsetWidth,
|
||||
height: obj.height ? obj.height : obj.offsetHeight
|
||||
};
|
||||
|
||||
if ( obj.style.width != "" )
|
||||
info.width = obj.style.width.replace("px","");
|
||||
|
||||
if ( obj.style.height != "" )
|
||||
info.height = obj.style.height.replace("px","");
|
||||
|
||||
while (obj) {
|
||||
info.left += obj.offsetLeft;
|
||||
info.top += obj.offsetTop;
|
||||
obj = obj.offsetParent;
|
||||
}
|
||||
|
||||
return info;
|
||||
},
|
||||
|
||||
Client: function(elem) {
|
||||
// constructor for new simple upload client
|
||||
this.handlers = {};
|
||||
|
||||
// unique ID
|
||||
this.id = ZeroClipboard.nextId++;
|
||||
this.movieId = 'ZeroClipboardMovie_' + this.id;
|
||||
|
||||
// register client with singleton to receive flash events
|
||||
ZeroClipboard.register(this.id, this);
|
||||
|
||||
// create movie
|
||||
if (elem) this.glue(elem);
|
||||
}
|
||||
};
|
||||
|
||||
ZeroClipboard.Client.prototype = {
|
||||
|
||||
id: 0, // unique ID for us
|
||||
ready: false, // whether movie is ready to receive events or not
|
||||
movie: null, // reference to movie object
|
||||
clipText: '', // text to copy to clipboard
|
||||
fileName: '', // default file save name
|
||||
action: 'copy', // action to perform
|
||||
handCursorEnabled: true, // whether to show hand cursor, or default pointer cursor
|
||||
cssEffects: true, // enable CSS mouse effects on dom container
|
||||
handlers: null, // user event handlers
|
||||
sized: false,
|
||||
|
||||
glue: function(elem, title) {
|
||||
// glue to DOM element
|
||||
// elem can be ID or actual DOM element object
|
||||
this.domElement = ZeroClipboard.$(elem);
|
||||
|
||||
// float just above object, or zIndex 99 if dom element isn't set
|
||||
var zIndex = 99;
|
||||
if (this.domElement.style.zIndex) {
|
||||
zIndex = parseInt(this.domElement.style.zIndex) + 1;
|
||||
}
|
||||
|
||||
// find X/Y position of domElement
|
||||
var box = ZeroClipboard.getDOMObjectPosition(this.domElement);
|
||||
|
||||
// create floating DIV above element
|
||||
this.div = document.createElement('div');
|
||||
var style = this.div.style;
|
||||
style.position = 'absolute';
|
||||
style.left = (this.domElement.offsetLeft)+'px';
|
||||
//style.left = (this.domElement.offsetLeft+2)+'px';
|
||||
style.top = this.domElement.offsetTop+'px';
|
||||
style.width = (box.width) + 'px';
|
||||
//style.width = (box.width-4) + 'px';
|
||||
style.height = box.height + 'px';
|
||||
style.zIndex = zIndex;
|
||||
if ( typeof title != "undefined" && title != "" ) {
|
||||
this.div.title = title;
|
||||
}
|
||||
if ( box.width != 0 && box.height != 0 ) {
|
||||
this.sized = true;
|
||||
}
|
||||
|
||||
// style.backgroundColor = '#f00'; // debug
|
||||
this.domElement.parentNode.appendChild(this.div);
|
||||
|
||||
this.div.innerHTML = this.getHTML( box.width, box.height );
|
||||
},
|
||||
|
||||
positionElement: function() {
|
||||
var box = ZeroClipboard.getDOMObjectPosition(this.domElement);
|
||||
var style = this.div.style;
|
||||
|
||||
style.position = 'absolute';
|
||||
style.left = (this.domElement.offsetLeft)+'px';
|
||||
style.top = this.domElement.offsetTop+'px';
|
||||
style.width = box.width + 'px';
|
||||
style.height = box.height + 'px';
|
||||
|
||||
if ( box.width != 0 && box.height != 0 ) {
|
||||
this.sized = true;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
var flash = this.div.childNodes[0];
|
||||
flash.width = box.width;
|
||||
flash.height = box.height;
|
||||
},
|
||||
|
||||
getHTML: function(width, height) {
|
||||
// return HTML for movie
|
||||
var html = '';
|
||||
var flashvars = 'id=' + this.id +
|
||||
'&width=' + width +
|
||||
'&height=' + height;
|
||||
|
||||
if (navigator.userAgent.match(/MSIE/)) {
|
||||
// IE gets an OBJECT tag
|
||||
var protocol = location.href.match(/^https/i) ? 'https://' : 'http://';
|
||||
html += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+protocol+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="'+width+'" height="'+height+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+flashvars+'"/><param name="wmode" value="transparent"/></object>';
|
||||
}
|
||||
else {
|
||||
// all other browsers get an EMBED tag
|
||||
html += '<embed id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+flashvars+'" wmode="transparent" />';
|
||||
}
|
||||
return html;
|
||||
},
|
||||
|
||||
hide: function() {
|
||||
// temporarily hide floater offscreen
|
||||
if (this.div) {
|
||||
this.div.style.left = '-2000px';
|
||||
}
|
||||
},
|
||||
|
||||
show: function() {
|
||||
// show ourselves after a call to hide()
|
||||
this.reposition();
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
// destroy control and floater
|
||||
if (this.domElement && this.div) {
|
||||
this.hide();
|
||||
this.div.innerHTML = '';
|
||||
|
||||
var body = document.getElementsByTagName('body')[0];
|
||||
try { body.removeChild( this.div ); } catch(e) {;}
|
||||
|
||||
this.domElement = null;
|
||||
this.div = null;
|
||||
}
|
||||
},
|
||||
|
||||
reposition: function(elem) {
|
||||
// reposition our floating div, optionally to new container
|
||||
// warning: container CANNOT change size, only position
|
||||
if (elem) {
|
||||
this.domElement = ZeroClipboard.$(elem);
|
||||
if (!this.domElement) this.hide();
|
||||
}
|
||||
|
||||
if (this.domElement && this.div) {
|
||||
var box = ZeroClipboard.getDOMObjectPosition(this.domElement);
|
||||
var style = this.div.style;
|
||||
style.left = '' + box.left + 'px';
|
||||
style.top = '' + box.top + 'px';
|
||||
}
|
||||
},
|
||||
|
||||
clearText: function() {
|
||||
// clear the text to be copy / saved
|
||||
this.clipText = '';
|
||||
if (this.ready) this.movie.clearText();
|
||||
},
|
||||
|
||||
appendText: function(newText) {
|
||||
// append text to that which is to be copied / saved
|
||||
this.clipText += newText;
|
||||
if (this.ready) { this.movie.appendText(newText) ;}
|
||||
},
|
||||
|
||||
setText: function(newText) {
|
||||
// set text to be copied to be copied / saved
|
||||
this.clipText = newText;
|
||||
if (this.ready) { this.movie.setText(newText) ;}
|
||||
},
|
||||
|
||||
setCharSet: function(charSet) {
|
||||
// set the character set (UTF16LE or UTF8)
|
||||
this.charSet = charSet;
|
||||
if (this.ready) { this.movie.setCharSet(charSet) ;}
|
||||
},
|
||||
|
||||
setBomInc: function(bomInc) {
|
||||
// set if the BOM should be included or not
|
||||
this.incBom = bomInc;
|
||||
if (this.ready) { this.movie.setBomInc(bomInc) ;}
|
||||
},
|
||||
|
||||
setFileName: function(newText) {
|
||||
// set the file name
|
||||
this.fileName = newText;
|
||||
if (this.ready) this.movie.setFileName(newText);
|
||||
},
|
||||
|
||||
setAction: function(newText) {
|
||||
// set action (save or copy)
|
||||
this.action = newText;
|
||||
if (this.ready) this.movie.setAction(newText);
|
||||
},
|
||||
|
||||
addEventListener: function(eventName, func) {
|
||||
// add user event listener for event
|
||||
// event types: load, queueStart, fileStart, fileComplete, queueComplete, progress, error, cancel
|
||||
eventName = eventName.toString().toLowerCase().replace(/^on/, '');
|
||||
if (!this.handlers[eventName]) this.handlers[eventName] = [];
|
||||
this.handlers[eventName].push(func);
|
||||
},
|
||||
|
||||
setHandCursor: function(enabled) {
|
||||
// enable hand cursor (true), or default arrow cursor (false)
|
||||
this.handCursorEnabled = enabled;
|
||||
if (this.ready) this.movie.setHandCursor(enabled);
|
||||
},
|
||||
|
||||
setCSSEffects: function(enabled) {
|
||||
// enable or disable CSS effects on DOM container
|
||||
this.cssEffects = !!enabled;
|
||||
},
|
||||
|
||||
receiveEvent: function(eventName, args) {
|
||||
// receive event from flash
|
||||
eventName = eventName.toString().toLowerCase().replace(/^on/, '');
|
||||
|
||||
// special behavior for certain events
|
||||
switch (eventName) {
|
||||
case 'load':
|
||||
// movie claims it is ready, but in IE this isn't always the case...
|
||||
// bug fix: Cannot extend EMBED DOM elements in Firefox, must use traditional function
|
||||
this.movie = document.getElementById(this.movieId);
|
||||
if (!this.movie) {
|
||||
var self = this;
|
||||
setTimeout( function() { self.receiveEvent('load', null); }, 1 );
|
||||
return;
|
||||
}
|
||||
|
||||
// firefox on pc needs a "kick" in order to set these in certain cases
|
||||
if (!this.ready && navigator.userAgent.match(/Firefox/) && navigator.userAgent.match(/Windows/)) {
|
||||
var self = this;
|
||||
setTimeout( function() { self.receiveEvent('load', null); }, 100 );
|
||||
this.ready = true;
|
||||
return;
|
||||
}
|
||||
|
||||
this.ready = true;
|
||||
this.movie.clearText();
|
||||
this.movie.appendText( this.clipText );
|
||||
this.movie.setFileName( this.fileName );
|
||||
this.movie.setAction( this.action );
|
||||
this.movie.setCharSet( this.charSet );
|
||||
this.movie.setBomInc( this.incBom );
|
||||
this.movie.setHandCursor( this.handCursorEnabled );
|
||||
break;
|
||||
|
||||
case 'mouseover':
|
||||
if (this.domElement && this.cssEffects) {
|
||||
//this.domElement.addClass('hover');
|
||||
if (this.recoverActive) this.domElement.addClass('active');
|
||||
}
|
||||
break;
|
||||
|
||||
case 'mouseout':
|
||||
if (this.domElement && this.cssEffects) {
|
||||
this.recoverActive = false;
|
||||
if (this.domElement.hasClass('active')) {
|
||||
this.domElement.removeClass('active');
|
||||
this.recoverActive = true;
|
||||
}
|
||||
//this.domElement.removeClass('hover');
|
||||
}
|
||||
break;
|
||||
|
||||
case 'mousedown':
|
||||
if (this.domElement && this.cssEffects) {
|
||||
this.domElement.addClass('active');
|
||||
}
|
||||
break;
|
||||
|
||||
case 'mouseup':
|
||||
if (this.domElement && this.cssEffects) {
|
||||
this.domElement.removeClass('active');
|
||||
this.recoverActive = false;
|
||||
}
|
||||
break;
|
||||
} // switch eventName
|
||||
|
||||
if (this.handlers[eventName]) {
|
||||
for (var idx = 0, len = this.handlers[eventName].length; idx < len; idx++) {
|
||||
var func = this.handlers[eventName][idx];
|
||||
|
||||
if (typeof(func) == 'function') {
|
||||
// actual function reference
|
||||
func(this, args);
|
||||
}
|
||||
else if ((typeof(func) == 'object') && (func.length == 2)) {
|
||||
// PHP style object + method, i.e. [myObject, 'myMethod']
|
||||
func[0][ func[1] ](this, args);
|
||||
}
|
||||
else if (typeof(func) == 'string') {
|
||||
// name of function
|
||||
window[func](this, args);
|
||||
}
|
||||
} // foreach event handler defined
|
||||
} // user defined handler for event
|
||||
}
|
||||
|
||||
};
|
|
@ -1,94 +0,0 @@
|
|||
var giTotalTestCount = 0;
|
||||
var giActiveModule = 0;
|
||||
var giModuleTests;
|
||||
var giStartTime;
|
||||
var giTest;
|
||||
var gbStop = false;
|
||||
var gtoTest;
|
||||
|
||||
function fnTestStart ( sTestInfo )
|
||||
{
|
||||
gaoTest[ giActiveModule ].iTests++;
|
||||
document.getElementById('test_info').innerHTML +=
|
||||
(giActiveModule+1)+'.'+(giModuleTests+1)+'. '+sTestInfo+'... ';
|
||||
document.getElementById('test_number').innerHTML = giTotalTestCount+1;
|
||||
giModuleTests++;
|
||||
giTotalTestCount++;
|
||||
|
||||
/* Set a timer to catch stalled script */
|
||||
gtoTest = setTimeout( function () {
|
||||
fnMessage( '<span class="error">WARNING - test script stalled. Likely a JS error</span>' );
|
||||
gbStop = true;
|
||||
}, 3000 );
|
||||
}
|
||||
|
||||
function fnTestResult ( bResult )
|
||||
{
|
||||
clearTimeout( gtoTest );
|
||||
if ( bResult )
|
||||
{
|
||||
fnMessage( 'Passed' );
|
||||
}
|
||||
else
|
||||
{
|
||||
fnMessage( '<span class="error">FAILED</span>' );
|
||||
gbStop = true;
|
||||
fnEnd( false );
|
||||
}
|
||||
}
|
||||
|
||||
function fnUnitStart( iTest )
|
||||
{
|
||||
if ( !gbStop )
|
||||
{
|
||||
giModuleTests = 0;
|
||||
window.parent.test_arena.location.href =
|
||||
(iTest==0?"":"../")+'templates/'+gaoTest[iTest].sTemplate+'.php?scripts='+gaoTest[iTest].sTest;
|
||||
giTest = iTest;
|
||||
}
|
||||
}
|
||||
|
||||
function fnStartMessage( sMessage )
|
||||
{
|
||||
fnMessage( '<br><b>'+gaoTest[giTest].sGroup+' - '+sMessage+'</b>' );
|
||||
}
|
||||
|
||||
function fnMessage( sMessage )
|
||||
{
|
||||
var nInfo = document.getElementById('test_info');
|
||||
nInfo.innerHTML += sMessage+'<br>';
|
||||
nInfo.scrollTop = nInfo.scrollHeight;
|
||||
}
|
||||
|
||||
function fnUnitComplete()
|
||||
{
|
||||
if ( giActiveModule < gaoTest.length - 1 )
|
||||
{
|
||||
fnUnitStart( ++giActiveModule );
|
||||
}
|
||||
else
|
||||
{
|
||||
fnEnd( true );
|
||||
}
|
||||
}
|
||||
|
||||
function fnEnd( bSuccess )
|
||||
{
|
||||
var iEndTime = new Date().getTime();
|
||||
var sTime = '<br>This test run took '+parseInt((iEndTime-giStartTime)/1000, 10)+
|
||||
' second(s) to complete.';
|
||||
|
||||
if ( bSuccess )
|
||||
{
|
||||
$('#test_running').html( 'Tests complete. '+giTotalTestCount+' tests were run.'+sTime );
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#test_running').html( 'Unit tests failed at test '+giTotalTestCount+'.'+sTime );
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready( function () {
|
||||
giStartTime = new Date().getTime();
|
||||
fnUnitStart( giActiveModule );
|
||||
} );
|
|
@ -1,100 +0,0 @@
|
|||
<?php
|
||||
header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' );
|
||||
header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );
|
||||
header( 'Cache-Control: no-store, no-cache, must-revalidate' );
|
||||
header( 'Cache-Control: post-check=0, pre-check=0', false );
|
||||
header( 'Pragma: no-cache' );
|
||||
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>DataTables unit test controller</title>
|
||||
|
||||
<style type="text/css" media="screen">
|
||||
#controller {
|
||||
font: 12px/1.45em "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0 0 0 0.5em;
|
||||
color: #333;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
#test_info {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
font-size: 11px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.error {
|
||||
color: red;
|
||||
}
|
||||
|
||||
#controller h1 {
|
||||
color: #4E6CA3;
|
||||
font-size: 18px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" language="javascript" src="../js/jquery.js"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var gaoTest = [
|
||||
<?php
|
||||
function fnReadDir( &$aReturn, $path )
|
||||
{
|
||||
$rDir = opendir( $path );
|
||||
while ( ($file = readdir($rDir)) !== false )
|
||||
{
|
||||
if ( $file == "." || $file == ".." || $file == ".DS_Store" )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else if ( is_dir( $path.'/'.$file ) )
|
||||
{
|
||||
fnReadDir( $aReturn, $path.'/'.$file );
|
||||
}
|
||||
else
|
||||
{
|
||||
array_push( $aReturn, $path.'/'.$file );
|
||||
}
|
||||
}
|
||||
closedir($rDir);
|
||||
}
|
||||
|
||||
/* Get the tests dynamically from the 'tests' directory, and their templates */
|
||||
$aFiles = array();
|
||||
fnReadDir( &$aFiles, "tests" );
|
||||
|
||||
for ( $i=0 ; $i<count($aFiles) ; $i++ )
|
||||
{
|
||||
$sTemplate;
|
||||
$fp = fopen( $aFiles[$i], "r" );
|
||||
fscanf( $fp, "// DATA_TEMPLATE: %s", &$sTemplate );
|
||||
fclose( $fp );
|
||||
|
||||
$aPath = split('/', $aFiles[$i]);
|
||||
|
||||
echo '{ '.
|
||||
'"sTemplate": "'.$sTemplate.'", '.
|
||||
'"sTest": "'.$aFiles[$i].'", '.
|
||||
'"sGroup": "'.$aPath[1].'"},'."\n";
|
||||
}
|
||||
|
||||
?>
|
||||
null ];
|
||||
gaoTest.pop(); /* No interest in the null */
|
||||
</script>
|
||||
<script type="text/javascript" language="javascript" src="controller.js"></script>
|
||||
</head>
|
||||
<body id="controller">
|
||||
<h1>DataTables unit testing</h1>
|
||||
<div id="test_running">Running test: <span id="test_number"></span></div>
|
||||
<div id="test_info">
|
||||
<b>Test information:</b><br>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,7 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
|
||||
<html>
|
||||
<frameset rows="20%,80%">
|
||||
<frame name="controller" id="controller" src="controller.php">
|
||||
<frame name="test_arena" id="test_arena">
|
||||
</frameset>
|
||||
</html>
|
|
@ -1,482 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico" />
|
||||
|
||||
<title>DataTables example</title>
|
||||
<style type="text/css" title="currentStyle">
|
||||
@import "../../css/demo_page.css";
|
||||
@import "../../css/demo_table.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../../js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="../../js/jquery.dataTables.js"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$(document).ready(function() {
|
||||
var oTable = $('#example').dataTable();
|
||||
var oSettings = oTable.fnSettings();
|
||||
var iStart = new Date().getTime();
|
||||
|
||||
//console.profile();
|
||||
//for ( var i=0, iLen=1000 ; i<iLen ; i++ )
|
||||
//{
|
||||
// oSettings._iDisplayLength = 100;
|
||||
// oTable.oApi._fnCalculateEnd( oSettings );
|
||||
// oTable.oApi._fnDraw( oSettings );
|
||||
//
|
||||
// oSettings._iDisplayLength = 10;
|
||||
// oTable.oApi._fnCalculateEnd( oSettings );
|
||||
// oTable.oApi._fnDraw( oSettings );
|
||||
//}
|
||||
//console.profileEnd();
|
||||
|
||||
var iEnd = new Date().getTime();
|
||||
document.getElementById('output').innerHTML = "Test took "+(iEnd-iStart)+"mS";
|
||||
} );
|
||||
</script>
|
||||
</head>
|
||||
<body id="dt_example">
|
||||
<div id="container">
|
||||
<div class="full_width big">
|
||||
<i>DataTables</i> performance test - draw
|
||||
</div>
|
||||
<div id="output"></div>
|
||||
|
||||
<div id="demo">
|
||||
<table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Rendering engine</th>
|
||||
<th>Browser</th>
|
||||
<th>Platform(s)</th>
|
||||
<th>Engine version</th>
|
||||
<th>CSS grade</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="gradeX">
|
||||
<td>Trident</td>
|
||||
<td>Internet
|
||||
Explorer 4.0</td>
|
||||
<td>Win 95+</td>
|
||||
<td class="center">4</td>
|
||||
<td class="center">X</td>
|
||||
</tr>
|
||||
<tr class="gradeC">
|
||||
<td>Trident</td>
|
||||
<td>Internet
|
||||
Explorer 5.0</td>
|
||||
<td>Win 95+</td>
|
||||
<td class="center">5</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Trident</td>
|
||||
<td>Internet
|
||||
Explorer 5.5</td>
|
||||
<td>Win 95+</td>
|
||||
<td class="center">5.5</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Trident</td>
|
||||
<td>Internet
|
||||
Explorer 6</td>
|
||||
<td>Win 98+</td>
|
||||
<td class="center">6</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Trident</td>
|
||||
<td>Internet Explorer 7</td>
|
||||
<td>Win XP SP2+</td>
|
||||
<td class="center">7</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Trident</td>
|
||||
<td>AOL browser (AOL desktop)</td>
|
||||
<td>Win XP</td>
|
||||
<td class="center">6</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Firefox 1.0</td>
|
||||
<td>Win 98+ / OSX.2+</td>
|
||||
<td class="center">1.7</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Firefox 1.5</td>
|
||||
<td>Win 98+ / OSX.2+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Firefox 2.0</td>
|
||||
<td>Win 98+ / OSX.2+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Firefox 3.0</td>
|
||||
<td>Win 2k+ / OSX.3+</td>
|
||||
<td class="center">1.9</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Camino 1.0</td>
|
||||
<td>OSX.2+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Camino 1.5</td>
|
||||
<td>OSX.3+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Netscape 7.2</td>
|
||||
<td>Win 95+ / Mac OS 8.6-9.2</td>
|
||||
<td class="center">1.7</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Netscape Browser 8</td>
|
||||
<td>Win 98SE+</td>
|
||||
<td class="center">1.7</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Netscape Navigator 9</td>
|
||||
<td>Win 98+ / OSX.2+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.0</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.1</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1.1</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.2</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1.2</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.3</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1.3</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.4</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1.4</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.5</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1.5</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.6</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1.6</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.7</td>
|
||||
<td>Win 98+ / OSX.1+</td>
|
||||
<td class="center">1.7</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.8</td>
|
||||
<td>Win 98+ / OSX.1+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Seamonkey 1.1</td>
|
||||
<td>Win 98+ / OSX.2+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Epiphany 2.20</td>
|
||||
<td>Gnome</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>Safari 1.2</td>
|
||||
<td>OSX.3</td>
|
||||
<td class="center">125.5</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>Safari 1.3</td>
|
||||
<td>OSX.3</td>
|
||||
<td class="center">312.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>Safari 2.0</td>
|
||||
<td>OSX.4+</td>
|
||||
<td class="center">419.3</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>Safari 3.0</td>
|
||||
<td>OSX.4+</td>
|
||||
<td class="center">522.1</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>OmniWeb 5.5</td>
|
||||
<td>OSX.4+</td>
|
||||
<td class="center">420</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>iPod Touch / iPhone</td>
|
||||
<td>iPod</td>
|
||||
<td class="center">420.1</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>S60</td>
|
||||
<td>S60</td>
|
||||
<td class="center">413</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 7.0</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 7.5</td>
|
||||
<td>Win 95+ / OSX.2+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 8.0</td>
|
||||
<td>Win 95+ / OSX.2+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 8.5</td>
|
||||
<td>Win 95+ / OSX.2+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 9.0</td>
|
||||
<td>Win 95+ / OSX.3+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 9.2</td>
|
||||
<td>Win 88+ / OSX.3+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 9.5</td>
|
||||
<td>Win 88+ / OSX.3+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera for Wii</td>
|
||||
<td>Wii</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Nokia N800</td>
|
||||
<td>N800</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Nintendo DS browser</td>
|
||||
<td>Nintendo DS</td>
|
||||
<td class="center">8.5</td>
|
||||
<td class="center">C/A<sup>1</sup></td>
|
||||
</tr>
|
||||
<tr class="gradeC">
|
||||
<td>KHTML</td>
|
||||
<td>Konqureror 3.1</td>
|
||||
<td>KDE 3.1</td>
|
||||
<td class="center">3.1</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>KHTML</td>
|
||||
<td>Konqureror 3.3</td>
|
||||
<td>KDE 3.3</td>
|
||||
<td class="center">3.3</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>KHTML</td>
|
||||
<td>Konqureror 3.5</td>
|
||||
<td>KDE 3.5</td>
|
||||
<td class="center">3.5</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeX">
|
||||
<td>Tasman</td>
|
||||
<td>Internet Explorer 4.5</td>
|
||||
<td>Mac OS 8-9</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">X</td>
|
||||
</tr>
|
||||
<tr class="gradeC">
|
||||
<td>Tasman</td>
|
||||
<td>Internet Explorer 5.1</td>
|
||||
<td>Mac OS 7.6-9</td>
|
||||
<td class="center">1</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeC">
|
||||
<td>Tasman</td>
|
||||
<td>Internet Explorer 5.2</td>
|
||||
<td>Mac OS 8-X</td>
|
||||
<td class="center">1</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Misc</td>
|
||||
<td>NetFront 3.1</td>
|
||||
<td>Embedded devices</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Misc</td>
|
||||
<td>NetFront 3.4</td>
|
||||
<td>Embedded devices</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeX">
|
||||
<td>Misc</td>
|
||||
<td>Dillo 0.8</td>
|
||||
<td>Embedded devices</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">X</td>
|
||||
</tr>
|
||||
<tr class="gradeX">
|
||||
<td>Misc</td>
|
||||
<td>Links</td>
|
||||
<td>Text only</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">X</td>
|
||||
</tr>
|
||||
<tr class="gradeX">
|
||||
<td>Misc</td>
|
||||
<td>Lynx</td>
|
||||
<td>Text only</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">X</td>
|
||||
</tr>
|
||||
<tr class="gradeC">
|
||||
<td>Misc</td>
|
||||
<td>IE Mobile</td>
|
||||
<td>Windows Mobile 6</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeC">
|
||||
<td>Misc</td>
|
||||
<td>PSP browser</td>
|
||||
<td>PSP</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeU">
|
||||
<td>Other browsers</td>
|
||||
<td>All others</td>
|
||||
<td>-</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">U</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>Rendering engine</th>
|
||||
<th>Browser</th>
|
||||
<th>Platform(s)</th>
|
||||
<th>Engine version</th>
|
||||
<th>CSS grade</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<div class="spacer"></div>
|
||||
|
||||
|
||||
<div id="footer" style="text-align:center;">
|
||||
<span style="font-size:10px;">
|
||||
DataTables © Allan Jardine 2008-2009.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,107 +0,0 @@
|
|||
<?php
|
||||
/* MySQL connection */
|
||||
include( $_SERVER['DOCUMENT_ROOT']."/datatables/mysql.php" ); /* ;-) */
|
||||
|
||||
$gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) or
|
||||
die( 'Could not open connection to server' );
|
||||
|
||||
mysql_select_db( $gaSql['db'], $gaSql['link'] ) or
|
||||
die( 'Could not select database '. $gaSql['db'] );
|
||||
|
||||
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico" />
|
||||
|
||||
<title>DataTables example</title>
|
||||
<style type="text/css" title="currentStyle">
|
||||
@import "../../css/demo_page.css";
|
||||
@import "../../css/demo_table.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../../js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="../../js/jquery.dataTables.js"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$(document).ready(function() {
|
||||
var oTable = $('#example').dataTable();
|
||||
var iStart = new Date().getTime();
|
||||
|
||||
//if ( typeof console != 'undefined' ) {
|
||||
// console.profile();
|
||||
//}
|
||||
//for ( var i=0 ; i<1 ; i++ )
|
||||
//{
|
||||
// var oTable = $('#example').dataTable({"bDestroy": true});
|
||||
//}
|
||||
//if ( typeof console != 'undefined' ) {
|
||||
// console.profileEnd();
|
||||
//}
|
||||
|
||||
oTable.fnSort( [[ 1, 'asc' ]] );
|
||||
oTable.fnSort( [[ 2, 'asc' ]] );
|
||||
oTable.fnSort( [[ 1, 'asc' ]] );
|
||||
oTable.fnSort( [[ 2, 'asc' ]] );
|
||||
|
||||
var iEnd = new Date().getTime();
|
||||
document.getElementById('output').innerHTML = "Test took "+(iEnd-iStart)+" mS";
|
||||
} );
|
||||
</script>
|
||||
</head>
|
||||
<body id="dt_example">
|
||||
<div id="container">
|
||||
<div class="full_width big">
|
||||
<i>DataTables</i> performance test - draw
|
||||
</div>
|
||||
<div id="output"></div>
|
||||
|
||||
<div id="demo">
|
||||
<table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>id</th>
|
||||
<th>name</th>
|
||||
<th>phone</th>
|
||||
<th>email</th>
|
||||
<th>city</th>
|
||||
<th>zip</th>
|
||||
<th>state</th>
|
||||
<th>country</th>
|
||||
<th>zip2</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$sQuery = "
|
||||
SELECT *
|
||||
FROM testData
|
||||
LIMIT 2000
|
||||
";
|
||||
$rResult = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
|
||||
while ( $aRow = mysql_fetch_array( $rResult ) )
|
||||
{
|
||||
echo '<tr>';
|
||||
echo '<td><a href="1">'.$aRow['id'].'</a></td>';
|
||||
echo '<td>'.$aRow['name'].'</td>';
|
||||
echo '<td>'.$aRow['phone'].'</td>';
|
||||
echo '<td>'.$aRow['email'].'</td>';
|
||||
echo '<td>'.$aRow['city'].'</td>';
|
||||
echo '<td>'.$aRow['zip'].'</td>';
|
||||
echo '<td>'.$aRow['state'].'</td>';
|
||||
echo '<td>'.$aRow['country'].'</td>';
|
||||
echo '<td>'.$aRow['zip2'].'</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="spacer"></div>
|
||||
|
||||
<div id="footer" style="text-align:center;">
|
||||
<span style="font-size:10px;">
|
||||
DataTables © Allan Jardine 2008-2009.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,477 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico" />
|
||||
|
||||
<title>DataTables example</title>
|
||||
<style type="text/css" title="currentStyle">
|
||||
@import "../../css/demo_page.css";
|
||||
@import "../../css/demo_table.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../../js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="../../js/jquery.dataTables.js"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$(document).ready(function() {
|
||||
var oTable = $('#example').dataTable();
|
||||
var oSettings = oTable.fnSettings();
|
||||
var iStart = new Date().getTime();
|
||||
|
||||
//for ( var i=0, iLen=100 ; i<iLen ; i++ )
|
||||
//{
|
||||
console.profile( );
|
||||
oTable.fnPageChange( "next" );
|
||||
oTable.fnPageChange( "previous" );
|
||||
console.profileEnd( );
|
||||
//}
|
||||
|
||||
var iEnd = new Date().getTime();
|
||||
document.getElementById('output').innerHTML = "Test took "+(iEnd-iStart)+"mS";
|
||||
} );
|
||||
</script>
|
||||
</head>
|
||||
<body id="dt_example">
|
||||
<div id="container">
|
||||
<div class="full_width big">
|
||||
<i>DataTables</i> performance test - draw
|
||||
</div>
|
||||
<div id="output"></div>
|
||||
|
||||
<div id="demo">
|
||||
<table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Rendering engine</th>
|
||||
<th>Browser</th>
|
||||
<th>Platform(s)</th>
|
||||
<th>Engine version</th>
|
||||
<th>CSS grade</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="gradeX">
|
||||
<td>Trident</td>
|
||||
<td>Internet
|
||||
Explorer 4.0</td>
|
||||
<td>Win 95+</td>
|
||||
<td class="center">4</td>
|
||||
<td class="center">X</td>
|
||||
</tr>
|
||||
<tr class="gradeC">
|
||||
<td>Trident</td>
|
||||
<td>Internet
|
||||
Explorer 5.0</td>
|
||||
<td>Win 95+</td>
|
||||
<td class="center">5</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Trident</td>
|
||||
<td>Internet
|
||||
Explorer 5.5</td>
|
||||
<td>Win 95+</td>
|
||||
<td class="center">5.5</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Trident</td>
|
||||
<td>Internet
|
||||
Explorer 6</td>
|
||||
<td>Win 98+</td>
|
||||
<td class="center">6</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Trident</td>
|
||||
<td>Internet Explorer 7</td>
|
||||
<td>Win XP SP2+</td>
|
||||
<td class="center">7</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Trident</td>
|
||||
<td>AOL browser (AOL desktop)</td>
|
||||
<td>Win XP</td>
|
||||
<td class="center">6</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Firefox 1.0</td>
|
||||
<td>Win 98+ / OSX.2+</td>
|
||||
<td class="center">1.7</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Firefox 1.5</td>
|
||||
<td>Win 98+ / OSX.2+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Firefox 2.0</td>
|
||||
<td>Win 98+ / OSX.2+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Firefox 3.0</td>
|
||||
<td>Win 2k+ / OSX.3+</td>
|
||||
<td class="center">1.9</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Camino 1.0</td>
|
||||
<td>OSX.2+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Camino 1.5</td>
|
||||
<td>OSX.3+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Netscape 7.2</td>
|
||||
<td>Win 95+ / Mac OS 8.6-9.2</td>
|
||||
<td class="center">1.7</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Netscape Browser 8</td>
|
||||
<td>Win 98SE+</td>
|
||||
<td class="center">1.7</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Netscape Navigator 9</td>
|
||||
<td>Win 98+ / OSX.2+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.0</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.1</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1.1</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.2</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1.2</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.3</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1.3</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.4</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1.4</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.5</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1.5</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.6</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1.6</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.7</td>
|
||||
<td>Win 98+ / OSX.1+</td>
|
||||
<td class="center">1.7</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.8</td>
|
||||
<td>Win 98+ / OSX.1+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Seamonkey 1.1</td>
|
||||
<td>Win 98+ / OSX.2+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Epiphany 2.20</td>
|
||||
<td>Gnome</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>Safari 1.2</td>
|
||||
<td>OSX.3</td>
|
||||
<td class="center">125.5</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>Safari 1.3</td>
|
||||
<td>OSX.3</td>
|
||||
<td class="center">312.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>Safari 2.0</td>
|
||||
<td>OSX.4+</td>
|
||||
<td class="center">419.3</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>Safari 3.0</td>
|
||||
<td>OSX.4+</td>
|
||||
<td class="center">522.1</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>OmniWeb 5.5</td>
|
||||
<td>OSX.4+</td>
|
||||
<td class="center">420</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>iPod Touch / iPhone</td>
|
||||
<td>iPod</td>
|
||||
<td class="center">420.1</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>S60</td>
|
||||
<td>S60</td>
|
||||
<td class="center">413</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 7.0</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 7.5</td>
|
||||
<td>Win 95+ / OSX.2+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 8.0</td>
|
||||
<td>Win 95+ / OSX.2+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 8.5</td>
|
||||
<td>Win 95+ / OSX.2+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 9.0</td>
|
||||
<td>Win 95+ / OSX.3+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 9.2</td>
|
||||
<td>Win 88+ / OSX.3+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 9.5</td>
|
||||
<td>Win 88+ / OSX.3+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera for Wii</td>
|
||||
<td>Wii</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Nokia N800</td>
|
||||
<td>N800</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Nintendo DS browser</td>
|
||||
<td>Nintendo DS</td>
|
||||
<td class="center">8.5</td>
|
||||
<td class="center">C/A<sup>1</sup></td>
|
||||
</tr>
|
||||
<tr class="gradeC">
|
||||
<td>KHTML</td>
|
||||
<td>Konqureror 3.1</td>
|
||||
<td>KDE 3.1</td>
|
||||
<td class="center">3.1</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>KHTML</td>
|
||||
<td>Konqureror 3.3</td>
|
||||
<td>KDE 3.3</td>
|
||||
<td class="center">3.3</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>KHTML</td>
|
||||
<td>Konqureror 3.5</td>
|
||||
<td>KDE 3.5</td>
|
||||
<td class="center">3.5</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeX">
|
||||
<td>Tasman</td>
|
||||
<td>Internet Explorer 4.5</td>
|
||||
<td>Mac OS 8-9</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">X</td>
|
||||
</tr>
|
||||
<tr class="gradeC">
|
||||
<td>Tasman</td>
|
||||
<td>Internet Explorer 5.1</td>
|
||||
<td>Mac OS 7.6-9</td>
|
||||
<td class="center">1</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeC">
|
||||
<td>Tasman</td>
|
||||
<td>Internet Explorer 5.2</td>
|
||||
<td>Mac OS 8-X</td>
|
||||
<td class="center">1</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Misc</td>
|
||||
<td>NetFront 3.1</td>
|
||||
<td>Embedded devices</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Misc</td>
|
||||
<td>NetFront 3.4</td>
|
||||
<td>Embedded devices</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeX">
|
||||
<td>Misc</td>
|
||||
<td>Dillo 0.8</td>
|
||||
<td>Embedded devices</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">X</td>
|
||||
</tr>
|
||||
<tr class="gradeX">
|
||||
<td>Misc</td>
|
||||
<td>Links</td>
|
||||
<td>Text only</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">X</td>
|
||||
</tr>
|
||||
<tr class="gradeX">
|
||||
<td>Misc</td>
|
||||
<td>Lynx</td>
|
||||
<td>Text only</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">X</td>
|
||||
</tr>
|
||||
<tr class="gradeC">
|
||||
<td>Misc</td>
|
||||
<td>IE Mobile</td>
|
||||
<td>Windows Mobile 6</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeC">
|
||||
<td>Misc</td>
|
||||
<td>PSP browser</td>
|
||||
<td>PSP</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeU">
|
||||
<td>Other browsers</td>
|
||||
<td>All others</td>
|
||||
<td>-</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">U</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>Rendering engine</th>
|
||||
<th>Browser</th>
|
||||
<th>Platform(s)</th>
|
||||
<th>Engine version</th>
|
||||
<th>CSS grade</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<div class="spacer"></div>
|
||||
|
||||
|
||||
<div id="footer" style="text-align:center;">
|
||||
<span style="font-size:10px;">
|
||||
DataTables © Allan Jardine 2008-2009.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,477 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico" />
|
||||
|
||||
<title>DataTables example</title>
|
||||
<style type="text/css" title="currentStyle">
|
||||
@import "../../css/demo_page.css";
|
||||
@import "../../css/demo_table.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../../js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="../../js/jquery.dataTables.js"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$(document).ready(function() {
|
||||
var oTable = $('#example').dataTable();
|
||||
var oSettings = oTable.fnSettings();
|
||||
var iStart = new Date().getTime();
|
||||
|
||||
for ( var i=0, iLen=100 ; i<iLen ; i++ )
|
||||
{
|
||||
console.profile( );
|
||||
oTable.fnSort( [[1, 'asc']] );
|
||||
oTable.fnSort( [[0, 'asc']] );
|
||||
console.profileEnd( );
|
||||
}
|
||||
|
||||
var iEnd = new Date().getTime();
|
||||
document.getElementById('output').innerHTML = "Test took "+(iEnd-iStart)+"mS";
|
||||
} );
|
||||
</script>
|
||||
</head>
|
||||
<body id="dt_example">
|
||||
<div id="container">
|
||||
<div class="full_width big">
|
||||
<i>DataTables</i> performance test - draw
|
||||
</div>
|
||||
<div id="output"></div>
|
||||
|
||||
<div id="demo">
|
||||
<table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Rendering engine</th>
|
||||
<th>Browser</th>
|
||||
<th>Platform(s)</th>
|
||||
<th>Engine version</th>
|
||||
<th>CSS grade</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="gradeX">
|
||||
<td>Trident</td>
|
||||
<td>Internet
|
||||
Explorer 4.0</td>
|
||||
<td>Win 95+</td>
|
||||
<td class="center">4</td>
|
||||
<td class="center">X</td>
|
||||
</tr>
|
||||
<tr class="gradeC">
|
||||
<td>Trident</td>
|
||||
<td>Internet
|
||||
Explorer 5.0</td>
|
||||
<td>Win 95+</td>
|
||||
<td class="center">5</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Trident</td>
|
||||
<td>Internet
|
||||
Explorer 5.5</td>
|
||||
<td>Win 95+</td>
|
||||
<td class="center">5.5</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Trident</td>
|
||||
<td>Internet
|
||||
Explorer 6</td>
|
||||
<td>Win 98+</td>
|
||||
<td class="center">6</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Trident</td>
|
||||
<td>Internet Explorer 7</td>
|
||||
<td>Win XP SP2+</td>
|
||||
<td class="center">7</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Trident</td>
|
||||
<td>AOL browser (AOL desktop)</td>
|
||||
<td>Win XP</td>
|
||||
<td class="center">6</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Firefox 1.0</td>
|
||||
<td>Win 98+ / OSX.2+</td>
|
||||
<td class="center">1.7</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Firefox 1.5</td>
|
||||
<td>Win 98+ / OSX.2+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Firefox 2.0</td>
|
||||
<td>Win 98+ / OSX.2+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Firefox 3.0</td>
|
||||
<td>Win 2k+ / OSX.3+</td>
|
||||
<td class="center">1.9</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Camino 1.0</td>
|
||||
<td>OSX.2+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Camino 1.5</td>
|
||||
<td>OSX.3+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Netscape 7.2</td>
|
||||
<td>Win 95+ / Mac OS 8.6-9.2</td>
|
||||
<td class="center">1.7</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Netscape Browser 8</td>
|
||||
<td>Win 98SE+</td>
|
||||
<td class="center">1.7</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Netscape Navigator 9</td>
|
||||
<td>Win 98+ / OSX.2+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.0</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.1</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1.1</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.2</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1.2</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.3</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1.3</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.4</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1.4</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.5</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1.5</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.6</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1.6</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.7</td>
|
||||
<td>Win 98+ / OSX.1+</td>
|
||||
<td class="center">1.7</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.8</td>
|
||||
<td>Win 98+ / OSX.1+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Seamonkey 1.1</td>
|
||||
<td>Win 98+ / OSX.2+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Epiphany 2.20</td>
|
||||
<td>Gnome</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>Safari 1.2</td>
|
||||
<td>OSX.3</td>
|
||||
<td class="center">125.5</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>Safari 1.3</td>
|
||||
<td>OSX.3</td>
|
||||
<td class="center">312.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>Safari 2.0</td>
|
||||
<td>OSX.4+</td>
|
||||
<td class="center">419.3</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>Safari 3.0</td>
|
||||
<td>OSX.4+</td>
|
||||
<td class="center">522.1</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>OmniWeb 5.5</td>
|
||||
<td>OSX.4+</td>
|
||||
<td class="center">420</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>iPod Touch / iPhone</td>
|
||||
<td>iPod</td>
|
||||
<td class="center">420.1</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>S60</td>
|
||||
<td>S60</td>
|
||||
<td class="center">413</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 7.0</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 7.5</td>
|
||||
<td>Win 95+ / OSX.2+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 8.0</td>
|
||||
<td>Win 95+ / OSX.2+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 8.5</td>
|
||||
<td>Win 95+ / OSX.2+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 9.0</td>
|
||||
<td>Win 95+ / OSX.3+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 9.2</td>
|
||||
<td>Win 88+ / OSX.3+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 9.5</td>
|
||||
<td>Win 88+ / OSX.3+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera for Wii</td>
|
||||
<td>Wii</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Nokia N800</td>
|
||||
<td>N800</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Nintendo DS browser</td>
|
||||
<td>Nintendo DS</td>
|
||||
<td class="center">8.5</td>
|
||||
<td class="center">C/A<sup>1</sup></td>
|
||||
</tr>
|
||||
<tr class="gradeC">
|
||||
<td>KHTML</td>
|
||||
<td>Konqureror 3.1</td>
|
||||
<td>KDE 3.1</td>
|
||||
<td class="center">3.1</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>KHTML</td>
|
||||
<td>Konqureror 3.3</td>
|
||||
<td>KDE 3.3</td>
|
||||
<td class="center">3.3</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>KHTML</td>
|
||||
<td>Konqureror 3.5</td>
|
||||
<td>KDE 3.5</td>
|
||||
<td class="center">3.5</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeX">
|
||||
<td>Tasman</td>
|
||||
<td>Internet Explorer 4.5</td>
|
||||
<td>Mac OS 8-9</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">X</td>
|
||||
</tr>
|
||||
<tr class="gradeC">
|
||||
<td>Tasman</td>
|
||||
<td>Internet Explorer 5.1</td>
|
||||
<td>Mac OS 7.6-9</td>
|
||||
<td class="center">1</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeC">
|
||||
<td>Tasman</td>
|
||||
<td>Internet Explorer 5.2</td>
|
||||
<td>Mac OS 8-X</td>
|
||||
<td class="center">1</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Misc</td>
|
||||
<td>NetFront 3.1</td>
|
||||
<td>Embedded devices</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Misc</td>
|
||||
<td>NetFront 3.4</td>
|
||||
<td>Embedded devices</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeX">
|
||||
<td>Misc</td>
|
||||
<td>Dillo 0.8</td>
|
||||
<td>Embedded devices</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">X</td>
|
||||
</tr>
|
||||
<tr class="gradeX">
|
||||
<td>Misc</td>
|
||||
<td>Links</td>
|
||||
<td>Text only</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">X</td>
|
||||
</tr>
|
||||
<tr class="gradeX">
|
||||
<td>Misc</td>
|
||||
<td>Lynx</td>
|
||||
<td>Text only</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">X</td>
|
||||
</tr>
|
||||
<tr class="gradeC">
|
||||
<td>Misc</td>
|
||||
<td>IE Mobile</td>
|
||||
<td>Windows Mobile 6</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeC">
|
||||
<td>Misc</td>
|
||||
<td>PSP browser</td>
|
||||
<td>PSP</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeU">
|
||||
<td>Other browsers</td>
|
||||
<td>All others</td>
|
||||
<td>-</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">U</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>Rendering engine</th>
|
||||
<th>Browser</th>
|
||||
<th>Platform(s)</th>
|
||||
<th>Engine version</th>
|
||||
<th>CSS grade</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<div class="spacer"></div>
|
||||
|
||||
|
||||
<div id="footer" style="text-align:center;">
|
||||
<span style="font-size:10px;">
|
||||
DataTables © Allan Jardine 2008-2009.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,469 +0,0 @@
|
|||
<?php
|
||||
header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' );
|
||||
header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );
|
||||
header( 'Cache-Control: no-store, no-cache, must-revalidate' );
|
||||
header( 'Cache-Control: post-check=0, pre-check=0', false );
|
||||
header( 'Pragma: no-cache' );
|
||||
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<link rel="shortcut icon" type="image/ico" href="http://www.sprymedia.co.uk/media/images/favicon.ico" />
|
||||
|
||||
<title>DataTables unit testing</title>
|
||||
<style type="text/css" title="currentStyle">
|
||||
@import "../../css/demo_page.css";
|
||||
@import "../../css/demo_table.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../../js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="../../js/jquery.dataTables.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="../unit_test.js"></script>
|
||||
<?php
|
||||
$aScripts = split( ":", $_GET['scripts'] );
|
||||
for ( $i=0 ; $i<count($aScripts) ; $i++ )
|
||||
{
|
||||
echo '<script type="text/javascript" language="javascript" src="../'.$aScripts[$i].'?rand='.rand().'"></script>'."\n";
|
||||
}
|
||||
?>
|
||||
</head>
|
||||
<body id="dt_example">
|
||||
<div id="container">
|
||||
<div class="full_width big">
|
||||
<i>DataTables</i> unit test template for reading DOM data
|
||||
</div>
|
||||
|
||||
<div id="demo">
|
||||
<table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan="2" class="bl bt">Rendering engine</th>
|
||||
<th colspan="3" class="bl br bt">Browser details</th>
|
||||
<th class="br bt">CSS grade</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="bl">Browser</th>
|
||||
<th>Platform(s)</th>
|
||||
<th class="br">Engine version</th>
|
||||
<th class="br bt">CSS grade</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="gradeX">
|
||||
<td>Trident</td>
|
||||
<td>Internet
|
||||
Explorer 4.0</td>
|
||||
<td>Win 95+</td>
|
||||
<td class="center">4</td>
|
||||
<td class="center">X</td>
|
||||
</tr>
|
||||
<tr class="gradeC">
|
||||
<td>Trident</td>
|
||||
<td>Internet
|
||||
Explorer 5.0</td>
|
||||
<td>Win 95+</td>
|
||||
<td class="center">5</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Trident</td>
|
||||
<td>Internet
|
||||
Explorer 5.5</td>
|
||||
<td>Win 95+</td>
|
||||
<td class="center">5.5</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Trident</td>
|
||||
<td>Internet
|
||||
Explorer 6</td>
|
||||
<td>Win 98+</td>
|
||||
<td class="center">6</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Trident</td>
|
||||
<td>Internet Explorer 7</td>
|
||||
<td>Win XP SP2+</td>
|
||||
<td class="center">7</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Trident</td>
|
||||
<td>AOL browser (AOL desktop)</td>
|
||||
<td>Win XP</td>
|
||||
<td class="center">6</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Firefox 1.0</td>
|
||||
<td>Win 98+ / OSX.2+</td>
|
||||
<td class="center">1.7</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Firefox 1.5</td>
|
||||
<td>Win 98+ / OSX.2+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Firefox 2.0</td>
|
||||
<td>Win 98+ / OSX.2+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Firefox 3.0</td>
|
||||
<td>Win 2k+ / OSX.3+</td>
|
||||
<td class="center">1.9</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Camino 1.0</td>
|
||||
<td>OSX.2+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Camino 1.5</td>
|
||||
<td>OSX.3+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Netscape 7.2</td>
|
||||
<td>Win 95+ / Mac OS 8.6-9.2</td>
|
||||
<td class="center">1.7</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Netscape Browser 8</td>
|
||||
<td>Win 98SE+</td>
|
||||
<td class="center">1.7</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Netscape Navigator 9</td>
|
||||
<td>Win 98+ / OSX.2+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.0</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.1</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1.1</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.2</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1.2</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.3</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1.3</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.4</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1.4</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.5</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1.5</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.6</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">1.6</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.7</td>
|
||||
<td>Win 98+ / OSX.1+</td>
|
||||
<td class="center">1.7</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Mozilla 1.8</td>
|
||||
<td>Win 98+ / OSX.1+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Seamonkey 1.1</td>
|
||||
<td>Win 98+ / OSX.2+</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Gecko</td>
|
||||
<td>Epiphany 2.20</td>
|
||||
<td>Gnome</td>
|
||||
<td class="center">1.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>Safari 1.2</td>
|
||||
<td>OSX.3</td>
|
||||
<td class="center">125.5</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>Safari 1.3</td>
|
||||
<td>OSX.3</td>
|
||||
<td class="center">312.8</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>Safari 2.0</td>
|
||||
<td>OSX.4+</td>
|
||||
<td class="center">419.3</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>Safari 3.0</td>
|
||||
<td>OSX.4+</td>
|
||||
<td class="center">522.1</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>OmniWeb 5.5</td>
|
||||
<td>OSX.4+</td>
|
||||
<td class="center">420</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>iPod Touch / iPhone</td>
|
||||
<td>iPod</td>
|
||||
<td class="center">420.1</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Webkit</td>
|
||||
<td>S60</td>
|
||||
<td>S60</td>
|
||||
<td class="center">413</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 7.0</td>
|
||||
<td>Win 95+ / OSX.1+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 7.5</td>
|
||||
<td>Win 95+ / OSX.2+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 8.0</td>
|
||||
<td>Win 95+ / OSX.2+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 8.5</td>
|
||||
<td>Win 95+ / OSX.2+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 9.0</td>
|
||||
<td>Win 95+ / OSX.3+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 9.2</td>
|
||||
<td>Win 88+ / OSX.3+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera 9.5</td>
|
||||
<td>Win 88+ / OSX.3+</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Opera for Wii</td>
|
||||
<td>Wii</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Nokia N800</td>
|
||||
<td>N800</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Presto</td>
|
||||
<td>Nintendo DS browser</td>
|
||||
<td>Nintendo DS</td>
|
||||
<td class="center">8.5</td>
|
||||
<td class="center">C/A<sup>1</sup></td>
|
||||
</tr>
|
||||
<tr class="gradeC">
|
||||
<td>KHTML</td>
|
||||
<td>Konqureror 3.1</td>
|
||||
<td>KDE 3.1</td>
|
||||
<td class="center">3.1</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>KHTML</td>
|
||||
<td>Konqureror 3.3</td>
|
||||
<td>KDE 3.3</td>
|
||||
<td class="center">3.3</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>KHTML</td>
|
||||
<td>Konqureror 3.5</td>
|
||||
<td>KDE 3.5</td>
|
||||
<td class="center">3.5</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeX">
|
||||
<td>Tasman</td>
|
||||
<td>Internet Explorer 4.5</td>
|
||||
<td>Mac OS 8-9</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">X</td>
|
||||
</tr>
|
||||
<tr class="gradeC">
|
||||
<td>Tasman</td>
|
||||
<td>Internet Explorer 5.1</td>
|
||||
<td>Mac OS 7.6-9</td>
|
||||
<td class="center">1</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeC">
|
||||
<td>Tasman</td>
|
||||
<td>Internet Explorer 5.2</td>
|
||||
<td>Mac OS 8-X</td>
|
||||
<td class="center">1</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Misc</td>
|
||||
<td>NetFront 3.1</td>
|
||||
<td>Embedded devices</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeA">
|
||||
<td>Misc</td>
|
||||
<td>NetFront 3.4</td>
|
||||
<td>Embedded devices</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">A</td>
|
||||
</tr>
|
||||
<tr class="gradeX">
|
||||
<td>Misc</td>
|
||||
<td>Dillo 0.8</td>
|
||||
<td>Embedded devices</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">X</td>
|
||||
</tr>
|
||||
<tr class="gradeX">
|
||||
<td>Misc</td>
|
||||
<td>Links</td>
|
||||
<td>Text only</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">X</td>
|
||||
</tr>
|
||||
<tr class="gradeX">
|
||||
<td>Misc</td>
|
||||
<td>Lynx</td>
|
||||
<td>Text only</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">X</td>
|
||||
</tr>
|
||||
<tr class="gradeC">
|
||||
<td>Misc</td>
|
||||
<td>IE Mobile</td>
|
||||
<td>Windows Mobile 6</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeC">
|
||||
<td>Misc</td>
|
||||
<td>PSP browser</td>
|
||||
<td>PSP</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">C</td>
|
||||
</tr>
|
||||
<tr class="gradeU">
|
||||
<td>Other browsers</td>
|
||||
<td>All others</td>
|
||||
<td>-</td>
|
||||
<td class="center">-</td>
|
||||
<td class="center">U</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>Rendering engine</th>
|
||||
<th>Browser</th>
|
||||
<th>Platform(s)</th>
|
||||
<th>Engine version</th>
|
||||
<th>CSS grade</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<div class="spacer"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|