Compare commits
2 commits
2779d8d099
...
2dfe0f3ff2
| Author | SHA1 | Date | |
|---|---|---|---|
| 2dfe0f3ff2 | |||
| 5bbb6ca195 |
2 changed files with 53 additions and 17 deletions
|
|
@ -205,9 +205,9 @@ pandora.ui.editor = function(data) {
|
||||||
}).open();
|
}).open();
|
||||||
},
|
},
|
||||||
editannotation: function(data) {
|
editannotation: function(data) {
|
||||||
Ox.Log('', 'editAnnotation', data);
|
Ox.Log('', 'editAnnotation', data.id, data);
|
||||||
function callback(result) {
|
function callback(result) {
|
||||||
Ox.Log('', 'editAnnotation result', result);
|
Ox.Log('', 'editAnnotation result', result.data.id, result);
|
||||||
if (!Ox.isEmpty(result.data)) {
|
if (!Ox.isEmpty(result.data)) {
|
||||||
result.data.date = Ox.formatDate(
|
result.data.date = Ox.formatDate(
|
||||||
result.data.modified.slice(0, 10), '%B %e, %Y'
|
result.data.modified.slice(0, 10), '%B %e, %Y'
|
||||||
|
|
@ -222,21 +222,56 @@ pandora.ui.editor = function(data) {
|
||||||
pandora.UI.set('videoPoints.' + ui.item + '.annotation', result.data.id.split('/')[1] || '');
|
pandora.UI.set('videoPoints.' + ui.item + '.annotation', result.data.id.split('/')[1] || '');
|
||||||
Ox.Request.clearCache();
|
Ox.Request.clearCache();
|
||||||
};
|
};
|
||||||
|
var edit = {
|
||||||
|
'in': data['in'],
|
||||||
|
out: data.out,
|
||||||
|
value: data.value
|
||||||
|
}
|
||||||
if (data.id[0] == '_') {
|
if (data.id[0] == '_') {
|
||||||
pandora.api.addAnnotation({
|
edit.item = ui.item;
|
||||||
'in': data['in'],
|
edit.layer = data.layer;
|
||||||
item: ui.item,
|
|
||||||
layer: data.layer,
|
if (queue[data.id]) {
|
||||||
out: data.out,
|
queue[data.id].push(edit);
|
||||||
value: data.value
|
|
||||||
}, callback);
|
|
||||||
} else {
|
} else {
|
||||||
pandora.api.editAnnotation({
|
queue[data.id] = [];
|
||||||
id: data.id,
|
pandora.api.addAnnotation(edit, function(result) {
|
||||||
'in': data['in'],
|
callback(result);
|
||||||
out: data.out,
|
var id = data.id,
|
||||||
value: data.value
|
pending = queue[id];
|
||||||
}, callback);
|
delete queue[id];
|
||||||
|
pending.length && Ox.serialForEach(pending, function(edit, index, array, callback) {
|
||||||
|
edit.id = id
|
||||||
|
Ox.Log('', 'process pending editAnnotation request', id, edit);
|
||||||
|
pandora.api.editAnnotation(edit, function(result) {
|
||||||
|
callback();
|
||||||
|
})
|
||||||
|
}, function() {
|
||||||
|
Ox.Request.clearCache();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
edit.id = data.id;
|
||||||
|
if (queue[data.id]) {
|
||||||
|
queue[data.id].push(edit);
|
||||||
|
} else {
|
||||||
|
queue[data.id] = [];
|
||||||
|
pandora.api.editAnnotation(edit, function(result) {
|
||||||
|
callback(result);
|
||||||
|
var pending = queue[edit.id];
|
||||||
|
delete queue[edit.id];
|
||||||
|
pending.length && Ox.serialForEach(pending, function(edit, index, array, cb) {
|
||||||
|
Ox.Log('', 'process pending editAnnotation request', edit.id, edit);
|
||||||
|
pandora.api.editAnnotation(edit, function(result) {
|
||||||
|
callback(result);
|
||||||
|
cb();
|
||||||
|
})
|
||||||
|
}, function() {
|
||||||
|
Ox.Request.clearCache();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
embedselection: function() {
|
embedselection: function() {
|
||||||
|
|
@ -387,7 +422,8 @@ pandora.ui.editor = function(data) {
|
||||||
pandora_videotimeline: function(data) {
|
pandora_videotimeline: function(data) {
|
||||||
that.options({timeline: data.value});
|
that.options({timeline: data.value});
|
||||||
}
|
}
|
||||||
});
|
}),
|
||||||
|
queue = [];
|
||||||
|
|
||||||
pandora._dontSelectResult = false;
|
pandora._dontSelectResult = false;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,7 @@ fi
|
||||||
|
|
||||||
# if pandora is running inside a container, expose backend at port 2620
|
# if pandora is running inside a container, expose backend at port 2620
|
||||||
if [ "$LXC" == "yes" ]; then
|
if [ "$LXC" == "yes" ]; then
|
||||||
sed -i s/127.0.0.1/0.0.0.0/g /srv/pandora/pandora/gunicorn_config.py
|
sed -i "s/127.0.0.1/[::]/g" /srv/pandora/pandora/gunicorn_config.py
|
||||||
echo "WEBSOCKET_ADDRESS = \"0.0.0.0\"" >> /srv/pandora/pandora/local_settings.py
|
echo "WEBSOCKET_ADDRESS = \"0.0.0.0\"" >> /srv/pandora/pandora/local_settings.py
|
||||||
fi
|
fi
|
||||||
/srv/pandora/ctl start
|
/srv/pandora/ctl start
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue