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();
|
||||
},
|
||||
editannotation: function(data) {
|
||||
Ox.Log('', 'editAnnotation', data);
|
||||
Ox.Log('', 'editAnnotation', data.id, data);
|
||||
function callback(result) {
|
||||
Ox.Log('', 'editAnnotation result', result);
|
||||
Ox.Log('', 'editAnnotation result', result.data.id, result);
|
||||
if (!Ox.isEmpty(result.data)) {
|
||||
result.data.date = Ox.formatDate(
|
||||
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] || '');
|
||||
Ox.Request.clearCache();
|
||||
};
|
||||
var edit = {
|
||||
'in': data['in'],
|
||||
out: data.out,
|
||||
value: data.value
|
||||
}
|
||||
if (data.id[0] == '_') {
|
||||
pandora.api.addAnnotation({
|
||||
'in': data['in'],
|
||||
item: ui.item,
|
||||
layer: data.layer,
|
||||
out: data.out,
|
||||
value: data.value
|
||||
}, callback);
|
||||
edit.item = ui.item;
|
||||
edit.layer = data.layer;
|
||||
|
||||
if (queue[data.id]) {
|
||||
queue[data.id].push(edit);
|
||||
} else {
|
||||
queue[data.id] = [];
|
||||
pandora.api.addAnnotation(edit, function(result) {
|
||||
callback(result);
|
||||
var id = data.id,
|
||||
pending = queue[id];
|
||||
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 {
|
||||
pandora.api.editAnnotation({
|
||||
id: data.id,
|
||||
'in': data['in'],
|
||||
out: data.out,
|
||||
value: data.value
|
||||
}, callback);
|
||||
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() {
|
||||
|
|
@ -387,7 +422,8 @@ pandora.ui.editor = function(data) {
|
|||
pandora_videotimeline: function(data) {
|
||||
that.options({timeline: data.value});
|
||||
}
|
||||
});
|
||||
}),
|
||||
queue = [];
|
||||
|
||||
pandora._dontSelectResult = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ fi
|
|||
|
||||
# if pandora is running inside a container, expose backend at port 2620
|
||||
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
|
||||
fi
|
||||
/srv/pandora/ctl start
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue