Add colreorder fixed columns to podcast + episodes datatables so checkbox column is fixed
This commit is contained in:
parent
cc9f1ea6d0
commit
e8643e04eb
|
@ -167,16 +167,22 @@ class Rest_PodcastController extends Zend_Rest_Controller
|
||||||
$method = $this->_getParam('method', HttpRequestType::GET);
|
$method = $this->_getParam('method', HttpRequestType::GET);
|
||||||
$responseBody = [];
|
$responseBody = [];
|
||||||
|
|
||||||
|
// XXX: Should this be a map of HttpRequestType => function call instead? Would be a bit cleaner
|
||||||
switch($method) {
|
switch($method) {
|
||||||
case HttpRequestType::DELETE:
|
case HttpRequestType::DELETE:
|
||||||
foreach($ids as $id) {
|
foreach($ids as $id) {
|
||||||
Application_Service_PodcastService::deletePodcastById($id);
|
Application_Service_PodcastService::deletePodcastById($id);
|
||||||
}
|
}
|
||||||
// XXX: do we need this to be more descriptive?
|
// XXX: do we need this to be more descriptive?
|
||||||
|
// Should we even bother passing back a response message here?
|
||||||
$responseBody = "Successfully deleted podcasts";
|
$responseBody = "Successfully deleted podcasts";
|
||||||
break;
|
break;
|
||||||
case HttpRequestType::GET:
|
case HttpRequestType::GET:
|
||||||
foreach($ids as $id) {
|
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);
|
$responseBody[] = Application_Service_PodcastService::buildPodcastEditorResponse($id, $this->view);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1294,7 +1294,10 @@ var AIRTIME = (function(AIRTIME) {
|
||||||
podcastToolbarButtons, //Toolbar buttons
|
podcastToolbarButtons, //Toolbar buttons
|
||||||
{ //Datatables overrides.
|
{ //Datatables overrides.
|
||||||
'aoColumns' : aoColumns,
|
'aoColumns' : aoColumns,
|
||||||
'sAjaxSource' : ajaxSourceURL
|
'sAjaxSource' : ajaxSourceURL,
|
||||||
|
'oColReorder': {
|
||||||
|
'iFixedColumns': 1 // Checkbox
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
mod.podcastDataTable = mod.podcastTableWidget.getDatatable();
|
mod.podcastDataTable = mod.podcastTableWidget.getDatatable();
|
||||||
|
|
|
@ -188,7 +188,10 @@ var AIRTIME = (function (AIRTIME) {
|
||||||
"sAlign": "right",
|
"sAlign": "right",
|
||||||
"aiExclude": [0, 1],
|
"aiExclude": [0, 1],
|
||||||
"buttonText": $.i18n._("Columns"),
|
"buttonText": $.i18n._("Columns"),
|
||||||
"iOverlayFade": 0
|
"iOverlayFade": 0,
|
||||||
|
'oColReorder': {
|
||||||
|
'iFixedColumns': 1 // Checkbox
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue