update video editor

This commit is contained in:
rolux 2012-01-12 16:09:19 +05:30
parent a31d4737f8
commit 7d8a4aa948
4 changed files with 28 additions and 14 deletions

View file

@ -4,6 +4,9 @@
You can edit this file. You can edit this file.
*/ */
{ {
"annotations": {
"showUsers": true
},
/* /*
Capabilities are per user level. Capabilities are per user level.
They can either be general: They can either be general:
@ -501,6 +504,7 @@
"item": "Note", "item": "Note",
"overlap": true, "overlap": true,
"private": true, "private": true,
"showInfo": true,
"type": "text" "type": "text"
}, },
{ {
@ -509,6 +513,7 @@
"canAddAnnotations": {"member": true, "friend": true, "staff": true, "admin": true}, "canAddAnnotations": {"member": true, "friend": true, "staff": true, "admin": true},
"item": "Note", "item": "Note",
"overlap": true, "overlap": true,
"showInfo": true,
"type": "text" "type": "text"
}, },
{ {

View file

@ -48,13 +48,16 @@ def load_config():
def reloader_thread(): def reloader_thread():
_config_mtime = 0 _config_mtime = 0
while RUN_RELOADER: while RUN_RELOADER:
stat = os.stat(settings.SITE_CONFIG) try:
mtime = stat.st_mtime stat = os.stat(settings.SITE_CONFIG)
if _win: mtime = stat.st_mtime
mtime -= stat.st_ctime if _win:
if mtime > _config_mtime: mtime -= stat.st_ctime
load_config() if mtime > _config_mtime:
_config_mtime = mtime load_config()
_config_mtime = mtime
except:
print "reloading config failed"
time.sleep(1) time.sleep(1)
def update_static(): def update_static():

View file

@ -4,6 +4,9 @@
You can edit this file. You can edit this file.
*/ */
{ {
"annotations": {
"showUsers": true
},
/* /*
Capabilities are per user level. Capabilities are per user level.
They can either be general: They can either be general:
@ -431,6 +434,7 @@
"canAddAnnotations": {"member": true, "staff": true, "admin": true}, "canAddAnnotations": {"member": true, "staff": true, "admin": true},
"item": "Description", "item": "Description",
"overlay": true, "overlay": true,
"showInfo": true,
"type": "text" "type": "text"
}, },
{ {
@ -448,7 +452,7 @@
//{"id": "info", "title": "with Info"}, //{"id": "info", "title": "with Info"},
{"id": "clips", "title": "with Clips"}, {"id": "clips", "title": "with Clips"},
{"id": "timelines", "title": "with Timelines"}, {"id": "timelines", "title": "with Timelines"},
{"id": "maps", "title": "with Maps"}, //{"id": "maps", "title": "with Maps"},
//{"id": "calendars", "title": "with Calendars"}, //{"id": "calendars", "title": "with Calendars"},
{"id": "clip", "title": "as Clips"}, {"id": "clip", "title": "as Clips"},
//{"id": "video", "title": "as Video"}, //{"id": "video", "title": "as Video"},

View file

@ -120,7 +120,7 @@ pandora.ui.item = function() {
); );
} else if (pandora.user.ui.itemView == 'video') { } else if (pandora.user.ui.itemView == 'video') {
pandora.$ui.contentPanel.replaceElement(1, pandora.$ui.player = Ox.VideoPanelPlayer({ pandora.$ui.contentPanel.replaceElement(1, pandora.$ui.player = Ox.VideoPanel({
annotationsSize: pandora.user.ui.annotationsSize, annotationsSize: pandora.user.ui.annotationsSize,
censored: videoOptions.censored, censored: videoOptions.censored,
cuts: result.data.cuts || [], cuts: result.data.cuts || [],
@ -140,6 +140,7 @@ pandora.ui.item = function() {
scaleToFill: pandora.user.ui.videoScale == 'fill', scaleToFill: pandora.user.ui.videoScale == 'fill',
showAnnotations: pandora.user.ui.showAnnotations, showAnnotations: pandora.user.ui.showAnnotations,
showTimeline: pandora.user.ui.showTimeline, showTimeline: pandora.user.ui.showTimeline,
showUsers: pandora.site.annotations.showUsers,
subtitles: videoOptions.subtitles, subtitles: videoOptions.subtitles,
tooltips: true, tooltips: true,
timeline: '/' + pandora.user.ui.item + '/timeline16p.png', timeline: '/' + pandora.user.ui.item + '/timeline16p.png',
@ -232,6 +233,7 @@ pandora.ui.item = function() {
showAnnotations: pandora.user.ui.showAnnotations, showAnnotations: pandora.user.ui.showAnnotations,
showLargeTimeline: true, showLargeTimeline: true,
showLayers: pandora.user.ui.showLayers, showLayers: pandora.user.ui.showLayers,
showUsers: pandora.site.annotations.showUsers,
subtitles: videoOptions.subtitles, subtitles: videoOptions.subtitles,
tooltips: true, tooltips: true,
video: videoOptions.video, video: videoOptions.video,
@ -240,16 +242,16 @@ pandora.ui.item = function() {
volume: pandora.user.ui.videoVolume, volume: pandora.user.ui.videoVolume,
width: pandora.$ui.document.width() - pandora.$ui.mainPanel.size(0) - 1 width: pandora.$ui.document.width() - pandora.$ui.mainPanel.size(0) - 1
}).bindEvent({ }).bindEvent({
annotationsFont: function(data) { annotationsfont: function(data) {
pandora.UI.set({annotationsFont: data.font}); pandora.UI.set({annotationsFont: data.font});
}, },
annotationsRange: function(data) { annotationsrange: function(data) {
pandora.UI.set({annotationsRange: data.range}); pandora.UI.set({annotationsRange: data.range});
}, },
annotationsSize: function(data) { annotationssize: function(data) {
pandora.UI.set({annotationsSize: data.size}); pandora.UI.set({annotationsSize: data.size});
}, },
annotationsSort: function(data) { annotationssort: function(data) {
pandora.UI.set({annotationsSort: data.sort}); pandora.UI.set({annotationsSort: data.sort});
}, },
find: function(data) { find: function(data) {
@ -323,7 +325,7 @@ pandora.ui.item = function() {
id: data.id id: data.id
}, function(result) { }, function(result) {
//fixme: check for errors //fixme: check for errors
pandora.$ui.editor.removeAnnotation(data.layer, data.id); //pandora.$ui.editor.removeAnnotation(data.layer, data.id);
}); });
}, },
toggleannotations: function(data) { toggleannotations: function(data) {