diff --git a/airtime_mvc/public/css/dashboard.css b/airtime_mvc/public/css/dashboard.css index af2ceb33f..678957d64 100644 --- a/airtime_mvc/public/css/dashboard.css +++ b/airtime_mvc/public/css/dashboard.css @@ -731,7 +731,7 @@ th.library_checkbox { /* This is so dragged items show up above the layout */ -#library_display .ui-draggable-dragging { +#library_content .ui-draggable-dragging { z-index: 9999; position: fixed !important; } diff --git a/airtime_mvc/public/js/airtime/library/events/library_showbuilder.js b/airtime_mvc/public/js/airtime/library/events/library_showbuilder.js index 130c79b52..00b80ff4c 100644 --- a/airtime_mvc/public/js/airtime/library/events/library_showbuilder.js +++ b/airtime_mvc/public/js/airtime/library/events/library_showbuilder.js @@ -109,46 +109,6 @@ var AIRTIME = (function(AIRTIME) { sortable = "#show_builder_table"; } else { sortable = ".active-tab .spl_sortable"; - //$('#library_display tr[class*="lib-"]') - // .draggable( - // { - // helper: function () { - // - // var $el = $(this), selected = mod - // .getChosenAudioFilesLength(), container, message, - // width = $(this).width(), height = 55; - // - // // dragging an element that has an unselected - // // checkbox. - // if (mod.isChosenItem($el) === false) { - // selected++; - // } - // - // if (selected === 1) { - // message = $.i18n._("Adding 1 Item"); - // } else { - // message = sprintf($.i18n._("Adding %s Items"), selected); - // } - // - // container = $('
').append( - // "").find("li").addClass( - // "ui-state-default").append("") - // .find("div").addClass( - // "list-item-container").append( - // message).end().width(width) - // .height(height).end(); - // - // return container; - // }, - // create: function(event, ui) { - // $(this).draggable("option", "cursorAt", { - // left: Math.floor(this.clientWidth / 2) - // }); - // }, - // cursor: 'move', - // distance: 25, // min-distance for dragging - // connectToSortable: '.active-tab .spl_sortable' - // }); } $('#library_display tr[class*="lib-"]') diff --git a/airtime_mvc/public/js/airtime/library/library.js b/airtime_mvc/public/js/airtime/library/library.js index 5fe28da86..e255677a3 100644 --- a/airtime_mvc/public/js/airtime/library/library.js +++ b/airtime_mvc/public/js/airtime/library/library.js @@ -1264,6 +1264,10 @@ var AIRTIME = (function(AIRTIME) { oTable.fnDraw(); }; + mod.getCurrentTable = function () { + return oTable; + }; + mod.openPodcastEpisodeDialog = function () { var episode = mod.podcastEpisodeTableWidget.getSelectedRows()[0]; $("body").append(""); diff --git a/airtime_mvc/public/js/airtime/library/podcast.js b/airtime_mvc/public/js/airtime/library/podcast.js index 8ee515a2a..867ff7004 100644 --- a/airtime_mvc/public/js/airtime/library/podcast.js +++ b/airtime_mvc/public/js/airtime/library/podcast.js @@ -420,6 +420,7 @@ var AIRTIME = (function (AIRTIME) { dt.fnClearTable(); dt.fnAddData(JSON.parse(json)); dt.fnDraw(); + }).done(function () { dt.unblock(); }); }; @@ -597,13 +598,38 @@ var AIRTIME = (function (AIRTIME) { params = $.extend(true, params, { oColVis: { - sAlign: 'right', aiExclude: [0, 1], - buttonText: $.i18n._("Columns"), - iOverlayFade: 0, oColReorder: { iFixedColumns: 1 // Checkbox } + }, + fnCreatedRow: function(nRow, aData, iDataIndex) { + var self = this; + $(nRow).draggable({ + helper: function () { + var $row = $(this); + $row.data("aData", self._datatable.fnGetData($(nRow).index()).file); + self.selectRow(this, self._datatable.fnGetData($row.index()), self.SELECTION_MODE.SINGLE, $row.index()); + var selected = self.getSelectedRows().length, container, + width = self._$wrapperDOMNode.closest(".dataTables_wrapper").outerWidth(), message; + + message = sprintf($.i18n._("Adding %s Item%s"), selected, selected > 1 ? "s" : ""); + container = $('').attr('id', 'draggingContainer').append('