From b913b067c2a5a6bf456d78342baf3d8d355fd649 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg <rudi.grinberg@sourcefabric.org> Date: Mon, 17 Sep 2012 11:58:08 -0400 Subject: [PATCH] Added setColumnFilter(oTable) --- airtime_mvc/application/models/Soundcloud.php | 14 +++++++++----- airtime_mvc/public/js/airtime/library/library.js | 2 ++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/airtime_mvc/application/models/Soundcloud.php b/airtime_mvc/application/models/Soundcloud.php index c993d3a1d..1c4b94f9f 100644 --- a/airtime_mvc/application/models/Soundcloud.php +++ b/airtime_mvc/application/models/Soundcloud.php @@ -8,8 +8,9 @@ class Application_Model_Soundcloud public function __construct() { global $CC_CONFIG; - - $this->_soundcloud = new Services_Soundcloud($CC_CONFIG['soundcloud-client-id'], $CC_CONFIG['soundcloud-client-secret']); + $this->_soundcloud = new Services_Soundcloud( + $CC_CONFIG['soundcloud-client-id'], + $CC_CONFIG['soundcloud-client-secret']); } private function getToken() @@ -51,9 +52,9 @@ class Application_Model_Soundcloud //YYYY-MM-DD-HH-mm-SS $release = explode("-", $release); - $track_data['track[release_year]'] = $release[0]; + $track_data['track[release_year]'] = $release[0]; $track_data['track[release_month]'] = $release[1]; - $track_data['track[release_day]'] = $release[2]; + $track_data['track[release_day]'] = $release[2]; } if (isset($genre) && $genre != "") { @@ -81,7 +82,10 @@ class Application_Model_Soundcloud ); return $response; + } else { + throw new NoSoundCloundToken(); } } - } + +class NoSoundCloundToken extends Exception {} diff --git a/airtime_mvc/public/js/airtime/library/library.js b/airtime_mvc/public/js/airtime/library/library.js index c33284bc5..8f9a3c33f 100644 --- a/airtime_mvc/public/js/airtime/library/library.js +++ b/airtime_mvc/public/js/airtime/library/library.js @@ -647,6 +647,8 @@ var AIRTIME = (function(AIRTIME) { } }); + + setColumnFilter(oTable); oTable.fnSetFilteringDelay(350); $libContent.find(".dataTables_scrolling").css("max-height", tableHeight);