SAAS-1199 - stop user from dragging unimported podcast episodes

This commit is contained in:
Duncan Sommerville 2015-11-11 11:16:02 -05:00
parent c5a5839eff
commit 5264bebe57
2 changed files with 36 additions and 26 deletions

View File

@ -1004,6 +1004,13 @@ div.blockOverlay {
table.dataTable tbody tr,
table.dataTable span.DataTables_sort_icon {
cursor: pointer;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
table.dataTable th.ui-state-default {

View File

@ -426,16 +426,17 @@ var AIRTIME = (function (AIRTIME) {
// When using static source data, we instantiate an empty table
// and pass this function the ID of the podcast we want to display.
if (id) this.config.podcastId = id;
var dt = this._datatable;
var self = this, dt = self._datatable;
dt.block({
message: "",
theme: true,
applyPlatformOpacityRules: false
});
$.get(endpoint + this.config.podcastId + '/episodes', function (json) {
$.get(endpoint + self.config.podcastId + '/episodes', function (json) {
dt.fnClearTable();
self.clearSelection();
dt.fnAddData(JSON.parse(json));
dt.fnDraw();
// dt.fnDraw();
}).done(function () {
dt.unblock();
});
@ -638,6 +639,7 @@ var AIRTIME = (function (AIRTIME) {
},
fnCreatedRow: function(nRow, aData, iDataIndex) {
var self = this;
if (aData.file && Object.keys(aData.file).length > 0) {
$(nRow).draggable({
helper: function () {
var $row = $(this), data = self._datatable.fnGetData(nRow);
@ -665,6 +667,7 @@ var AIRTIME = (function (AIRTIME) {
});
}
}
}
);
if (typeof PodcastEpisodeTable === 'undefined') {