CC-84: Smart Playlists
- added 'Smart Block' filter in datatable - added block files to library datatable
This commit is contained in:
parent
1f3cbd8aba
commit
bef9ba1eea
9 changed files with 147 additions and 50 deletions
|
@ -542,6 +542,7 @@ var AIRTIME = (function(AIRTIME) {
|
|||
.append('<option value="0">All</option>')
|
||||
.append('<option value="1">Files</option>')
|
||||
.append('<option value="2">Playlists</option>')
|
||||
.append('<option value="3">Smart Blocks</option>')
|
||||
.end()
|
||||
.change(function(ev){
|
||||
oTable.fnDraw();
|
||||
|
@ -613,7 +614,11 @@ var AIRTIME = (function(AIRTIME) {
|
|||
}
|
||||
else {
|
||||
callback = function() {
|
||||
AIRTIME.playlist.fnEdit(data.id);
|
||||
if (data.ftype === "playlist") {
|
||||
AIRTIME.playlist.fnEdit(data.id, 'playlist');
|
||||
} else {
|
||||
AIRTIME.playlist.fnEdit(data.id, 'block');
|
||||
}
|
||||
};
|
||||
}
|
||||
oItems.edit.callback = callback;
|
||||
|
|
|
@ -641,13 +641,13 @@ var AIRTIME = (function(AIRTIME){
|
|||
});
|
||||
};
|
||||
|
||||
mod.fnEdit = function(id) {
|
||||
var url = '/Playlist/edit';;
|
||||
mod.fnEdit = function(id, type) {
|
||||
var url = '/Playlist/edit';
|
||||
|
||||
stopAudioPreview();
|
||||
|
||||
$.post(url,
|
||||
{format: "json", id: id},
|
||||
{format: "json", id: id, type: type},
|
||||
function(json){
|
||||
openPlaylist(json);
|
||||
});
|
||||
|
|
|
@ -5,18 +5,6 @@ $(document).ready(function() {
|
|||
function setSmartPlaylistEvents() {
|
||||
var form = $('#smart-playlist-form');
|
||||
|
||||
/*
|
||||
sets.each(function(index, set){
|
||||
$(set).live('click', function(){
|
||||
if ($(this).next().hasClass('closed')) {
|
||||
$(this).next().removeClass('closed sp-closed');
|
||||
} else {
|
||||
$(this).next().addClass('closed sp-closed');
|
||||
}
|
||||
});
|
||||
});
|
||||
*/
|
||||
|
||||
form.find('.criteria_add').live('click', function(){
|
||||
|
||||
var div = $('dd[id="sp_criteria-element"]').children('div:visible:last').next();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue