sort clips after delete, fixes #2718
This commit is contained in:
parent
083fabc208
commit
12adaf062a
1 changed files with 5 additions and 3 deletions
|
@ -183,7 +183,8 @@ pandora.ui.editPanel = function(isEmbed) {
|
||||||
pandora.doHistory('delete', clips, ui.edit, function(result) {
|
pandora.doHistory('delete', clips, ui.edit, function(result) {
|
||||||
Ox.Request.clearCache('getEdit');
|
Ox.Request.clearCache('getEdit');
|
||||||
Ox.Request.clearCache('sortClips');
|
Ox.Request.clearCache('sortClips');
|
||||||
updateClips(result.data.clips);
|
edit.clips = result.data.clips;
|
||||||
|
sortClips(updateClips);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
edit: function(data) {
|
edit: function(data) {
|
||||||
|
@ -215,9 +216,10 @@ pandora.ui.editPanel = function(isEmbed) {
|
||||||
join: function(data) {
|
join: function(data) {
|
||||||
var clips = [serializeClips(data.ids), serializeClips(data.join)];
|
var clips = [serializeClips(data.ids), serializeClips(data.join)];
|
||||||
pandora.doHistory('join', clips, ui.edit, function(result) {
|
pandora.doHistory('join', clips, ui.edit, function(result) {
|
||||||
updateClips(edit.clips.filter(function(clip) {
|
edit.clips = edit.clips.filter(function(clip) {
|
||||||
return !Ox.contains(data.ids, clip.id);
|
return !Ox.contains(data.ids, clip.id);
|
||||||
}).concat(result.data.clips));
|
}).concat(result.data.clips);
|
||||||
|
sortClips(updateClips);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
loop: function(data) {
|
loop: function(data) {
|
||||||
|
|
Loading…
Reference in a new issue