CC-3174 : show builder
darg into and drag around in the timeline is now working. need to change schedule table to not have auto incrementing ids to preserve an item's id for REST. (might find another way)
This commit is contained in:
parent
0199f572bd
commit
e001cd24c1
3 changed files with 133 additions and 62 deletions
|
@ -325,8 +325,8 @@ $(document).ready(function() {
|
|||
fnUpdate;
|
||||
|
||||
fnAdd = function() {
|
||||
var aSchedIds = [],
|
||||
aMediaIds = [];
|
||||
var aMediaIds = [],
|
||||
aSchedIds = [];
|
||||
|
||||
aSchedIds.push({"id": oPrevData.id, "instance": oPrevData.instance});
|
||||
aMediaIds.push({"id": oItemData.id, "type": oItemData.ftype});
|
||||
|
@ -338,6 +338,20 @@ $(document).ready(function() {
|
|||
});
|
||||
};
|
||||
|
||||
fnMove = function() {
|
||||
var aSelect = [],
|
||||
aAfter = [];
|
||||
|
||||
aSelect.push({"id": oItemData.id, "instance": oItemData.instance});
|
||||
aAfter.push({"id": oPrevData.id, "instance": oPrevData.instance});
|
||||
|
||||
$.post("/showbuilder/schedule-move",
|
||||
{"format": "json", "selectedItem": aSelect, "afterItem": aAfter},
|
||||
function(json){
|
||||
oTable.fnDraw();
|
||||
});
|
||||
};
|
||||
|
||||
fnReceive = function(event, ui) {
|
||||
origRow = ui.item;
|
||||
};
|
||||
|
@ -353,6 +367,7 @@ $(document).ready(function() {
|
|||
//item was reordered.
|
||||
else {
|
||||
oItemData = ui.item.data("aData");
|
||||
fnMove();
|
||||
}
|
||||
|
||||
origRow = undefined;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue