From e8b13623096a68c6ff6de837bcc1b22f9eff3a87 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Mon, 30 Jan 2012 23:27:27 +0000 Subject: [PATCH] fix list calendar bugs --- source/Ox.UI/js/Calendar/Ox.Calendar.js | 7 +++++++ source/Ox.UI/js/Calendar/Ox.ListCalendar.js | 9 +++++---- source/Ox.UI/js/List/Ox.List.js | 3 +-- source/Ox.UI/js/List/Ox.TextList.js | 5 ----- source/Ox.UI/js/Video/Ox.VideoEditor.js | 8 ++++---- 5 files changed, 17 insertions(+), 15 deletions(-) diff --git a/source/Ox.UI/js/Calendar/Ox.Calendar.js b/source/Ox.UI/js/Calendar/Ox.Calendar.js index c4844fa6..90448ebb 100644 --- a/source/Ox.UI/js/Calendar/Ox.Calendar.js +++ b/source/Ox.UI/js/Calendar/Ox.Calendar.js @@ -344,6 +344,13 @@ Ox.Calendar = function(options, self) { posision: 'absolute', top: (self.options.showToolbar * 24) + 'px' }) + .bindEvent({ + dragstart: dragstart, + drag: drag, + dragpause: dragpause, + dragend: dragend, + singleclick: singleclick + }) .appendTo(that); self.$container = Ox.Element() diff --git a/source/Ox.UI/js/Calendar/Ox.ListCalendar.js b/source/Ox.UI/js/Calendar/Ox.ListCalendar.js index b1a24e18..d4fc8165 100644 --- a/source/Ox.UI/js/Calendar/Ox.ListCalendar.js +++ b/source/Ox.UI/js/Calendar/Ox.ListCalendar.js @@ -502,9 +502,7 @@ Ox.ListCalendar = function(options, self) { if (result.status.code == 200) { self.options.events[index][key] = value; self.$list.value(id, key, value); - if (['name', 'type', 'start', 'end'].indexOf(key) > -1) { - self.$calendar.editEvent(id, key, value); - } + self.$calendar.editEvent(id, key, value); if (key == 'name') { self.$eventName.options({title: value}); } else if (['start', 'end'].indexOf(key) > -1) { @@ -518,7 +516,7 @@ Ox.ListCalendar = function(options, self) { ); } } else { - alert(result.status.text); + // ... } }); } @@ -576,6 +574,9 @@ Ox.ListCalendar = function(options, self) { self.selectedEvent = event.id; self.$eventName.options({title: event.name}); self.$eventTitle.show(); + Ox.print('VALUES:', Ox.extend({}, event, { + end: event.current ? '' : event.end + })) self.$eventForm.values(Ox.extend({}, event, { end: event.current ? '' : event.end })).show(); diff --git a/source/Ox.UI/js/List/Ox.List.js b/source/Ox.UI/js/List/Ox.List.js index 1067d765..bb5aafcd 100644 --- a/source/Ox.UI/js/List/Ox.List.js +++ b/source/Ox.UI/js/List/Ox.List.js @@ -762,9 +762,8 @@ Ox.List = function(options, self) { setTimeout(fillFirstPage, 0); self.selected.length && scrollToPosition(self.selected[0]); Ox.Log('List', 'CONSTRUCT:', timeC, 'APPEND:', timeA); - // that.triggerEvent('init', {items: self.options.items.length}); + that.triggerEvent('init', {items: self.options.items.length}); // fixme: do sync lists need to trigger init? - // will this only be reached in sync lists? } function loadPage(page, callback) { diff --git a/source/Ox.UI/js/List/Ox.TextList.js b/source/Ox.UI/js/List/Ox.TextList.js index 0b6164ef..0a0fed55 100644 --- a/source/Ox.UI/js/List/Ox.TextList.js +++ b/source/Ox.UI/js/List/Ox.TextList.js @@ -222,11 +222,6 @@ Ox.TextList = function(options, self) { edit: function(data) { that.editCell(data.id, data.key); }, - init: function(data) { - // fixme: why does this never reach? - //Ox.Log('List', 'INIT????') - //that.triggerEvent('init', data); - }, select: function() { self.options.selected = that.$body.options('selected'); } diff --git a/source/Ox.UI/js/Video/Ox.VideoEditor.js b/source/Ox.UI/js/Video/Ox.VideoEditor.js index 0f20e479..11572e97 100644 --- a/source/Ox.UI/js/Video/Ox.VideoEditor.js +++ b/source/Ox.UI/js/Video/Ox.VideoEditor.js @@ -28,7 +28,7 @@ Ox.VideoEditor = function(options, self) { clickLink: null, cuts: [], duration: 0, - download: false, + enableDownload: false, enableSubtitles: false, find: '', fps: 25, @@ -427,9 +427,9 @@ Ox.VideoEditor = function(options, self) { {id: 'largeTimeline', title: 'Hide Large Timeline', disabled: true}, {id: 'subtitlesTimeline', title: 'Hide Subtitles on Large Timeline', disabled: true}, {}, - {id: 'downloadVideo', title: 'Download Video...', disabled: !self.options.download }, - {id: 'downloadSelection', title: 'Download Selection...', disabled: !self.options.download}, - {id: 'embedSelection', title: 'Embed Selection...', disabled: !self.options.download}, + {id: 'downloadVideo', title: 'Download Video...', disabled: !self.options.enableDownload }, + {id: 'downloadSelection', title: 'Download Selection...', disabled: !self.options.enableDownload}, + {id: 'embedSelection', title: 'Embed Selection...'}, {}, {id: 'keyboard', title: 'Keyboard Shortcuts...', keyboard: 'h'} ],