new jjmenu for dynamic context menus. playlists in library.
need to work on javascript callback
This commit is contained in:
parent
4bdcba83e2
commit
d2b1bf0622
17 changed files with 545 additions and 318 deletions
|
@ -1,15 +1,33 @@
|
|||
/*
|
||||
function contextMenu(action, el, pos) {
|
||||
var method = action.split('/').pop(),
|
||||
url;
|
||||
url, tr_id, id;
|
||||
|
||||
tr_id = $(el).attr('id');
|
||||
id = tr_id.split("_").pop();
|
||||
url = '/'+action;
|
||||
|
||||
if (method === 'delete') {
|
||||
url = action + '/format/json';
|
||||
url = url + '/id/' + $(el).attr('id');
|
||||
$.post(url, deleteItem);
|
||||
url = url + '/format/json';
|
||||
url = url + '/id/' + id;
|
||||
$.post(url, function(json) {
|
||||
|
||||
if(json.message) {
|
||||
alert(json.message);
|
||||
return;
|
||||
}
|
||||
|
||||
$("#library_display tr#" +tr_id).remove();
|
||||
});
|
||||
}
|
||||
else if (method === 'add-item') {
|
||||
url = action + '/format/json';
|
||||
url = url + '/id/' + $(el).attr('id');
|
||||
url = url + '/format/json';
|
||||
url = url + '/id/' + id;
|
||||
$.post(url, setSPLContent);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
function contextMenu() {
|
||||
alert("callback");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue