Frontend polish and fixes; make empty placeholder implementation more abstract and add placeholder to 'My Podcast' view
This commit is contained in:
parent
0e74229975
commit
55df7775c2
10 changed files with 81 additions and 36 deletions
|
@ -10,7 +10,21 @@ var AIRTIME = (function(AIRTIME) {
|
|||
}
|
||||
|
||||
//Table widget constructor
|
||||
var Table = function(wrapperDOMNode, bItemSelection, toolbarButtons, dataTablesOptions) {
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param wrapperDOMNode
|
||||
* @param {boolean} bItemSelection
|
||||
* @param {Object} toolbarButtons
|
||||
* @param {Object} dataTablesOptions
|
||||
* @param {Object} [emptyPlaceholder]
|
||||
* @param {string} emptyPlaceholder.html
|
||||
* @param {string} emptyPlaceholder.iconClass
|
||||
*
|
||||
* @returns {Table}
|
||||
* @constructor
|
||||
*/
|
||||
var Table = function(wrapperDOMNode, bItemSelection, toolbarButtons, dataTablesOptions, emptyPlaceholder) {
|
||||
|
||||
var self = this;
|
||||
|
||||
|
@ -34,6 +48,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
//Save some of the constructor parameters
|
||||
self._$wrapperDOMNode = $(wrapperDOMNode);
|
||||
self._toolbarButtons = toolbarButtons;
|
||||
self._emptyPlaceholder = emptyPlaceholder;
|
||||
|
||||
// Exclude the leftmost column if we're implementing item selection
|
||||
self._colVisExcludeColumns = bItemSelection ? [0] : [];
|
||||
|
@ -93,6 +108,9 @@ var AIRTIME = (function(AIRTIME) {
|
|||
if (options.fnCreatedRow) {
|
||||
options.fnCreatedRow = options.fnCreatedRow.bind(this);
|
||||
}
|
||||
if (options.fnDrawCallback) {
|
||||
options.fnDrawCallback = options.fnDrawCallback.bind(this);
|
||||
}
|
||||
|
||||
self._datatable = self._$wrapperDOMNode.dataTable(options);
|
||||
// self._datatable.fnDraw(); //Load the AJAX data now that our event handlers have been bound.
|
||||
|
@ -372,6 +390,10 @@ var AIRTIME = (function(AIRTIME) {
|
|||
return this._selectedRows;
|
||||
};
|
||||
|
||||
Table.prototype.getEmptyPlaceholder = function () {
|
||||
return this._emptyPlaceholder;
|
||||
};
|
||||
|
||||
Table.prototype._handleAjaxError = function(r) {
|
||||
// If the request was denied due to permissioning
|
||||
if (r.status === 403) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue