Add colreorder fixed columns to podcast + episodes datatables so checkbox column is fixed

This commit is contained in:
Duncan Sommerville 2015-10-28 12:17:29 -04:00
parent cc9f1ea6d0
commit e8643e04eb
3 changed files with 14 additions and 2 deletions

View File

@ -167,16 +167,22 @@ class Rest_PodcastController extends Zend_Rest_Controller
$method = $this->_getParam('method', HttpRequestType::GET);
$responseBody = [];
// XXX: Should this be a map of HttpRequestType => function call instead? Would be a bit cleaner
switch($method) {
case HttpRequestType::DELETE:
foreach($ids as $id) {
Application_Service_PodcastService::deletePodcastById($id);
}
// XXX: do we need this to be more descriptive?
// Should we even bother passing back a response message here?
$responseBody = "Successfully deleted podcasts";
break;
case HttpRequestType::GET:
foreach($ids as $id) {
// TODO: This should use the same code path as the GET action.
// It essentially does, except for the randering of the tab layout.
// That said, not every GET is going to need the page rendered...
// Where should the rendering code for the podcast tabs go? -- Duncan
$responseBody[] = Application_Service_PodcastService::buildPodcastEditorResponse($id, $this->view);
}
break;

View File

@ -1294,7 +1294,10 @@ var AIRTIME = (function(AIRTIME) {
podcastToolbarButtons, //Toolbar buttons
{ //Datatables overrides.
'aoColumns' : aoColumns,
'sAjaxSource' : ajaxSourceURL
'sAjaxSource' : ajaxSourceURL,
'oColReorder': {
'iFixedColumns': 1 // Checkbox
}
});
mod.podcastDataTable = mod.podcastTableWidget.getDatatable();

View File

@ -188,7 +188,10 @@ var AIRTIME = (function (AIRTIME) {
"sAlign": "right",
"aiExclude": [0, 1],
"buttonText": $.i18n._("Columns"),
"iOverlayFade": 0
"iOverlayFade": 0,
'oColReorder': {
'iFixedColumns': 1 // Checkbox
}
}
});