diff options
author | Dieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de> | 2008-03-23 01:01:32 +0100 |
---|---|---|
committer | Dieter Hametner <dh (plus) vdr (at) gekrumbel (dot) de> | 2008-03-23 01:01:32 +0100 |
commit | 78ffd15e485fe3ba341bf7d5e7479ff9a5a6de4b (patch) | |
tree | 76f900ca7235290c88a2fce69b451714de734bbf /live/js | |
parent | 0f276e51c7dbf0e36baf35823f8b17163d094b39 (diff) | |
download | vdr-plugin-live-78ffd15e485fe3ba341bf7d5e7479ff9a5a6de4b.tar.gz vdr-plugin-live-78ffd15e485fe3ba341bf7d5e7479ff9a5a6de4b.tar.bz2 |
Some clean up in the timer editing call.
Prepeared timer edititing to be a popup like the epg-data. This is not
finished yet and seems to have some problems with the form and the
popup. So the overall functionality is disabled. Never the less some of
the changes for this are of general interrest, so current work was
commited.
Changes in the styles for this.
Diffstat (limited to 'live/js')
-rw-r--r-- | live/js/live/pageenhance.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/live/js/live/pageenhance.js b/live/js/live/pageenhance.js index d98b374..5ca90c0 100644 --- a/live/js/live/pageenhance.js +++ b/live/js/live/pageenhance.js @@ -16,6 +16,7 @@ var PageEnhance = new Class({ vlcWinOptions: { size: { width: 720, height: 640 } }, + editTimerSelector: 'a[href^="edit_timer.html?timerid"]', hintTipSelector: '*[title]', hintClassName: 'hint', infoWinOptions: { @@ -46,6 +47,9 @@ var PageEnhance = new Class({ $$(this.options.actionLinkSelector).each(this.vdrRequest.bind(this)); $$(this.options.vlcLinkSelector).each(this.vlcRequest.bind(this)); $$(this.options.datePickerSelector).each(this.datePicker.bind(this)); + // the following line activates timer editing in popup window. + // but it does not yet work like expected. So we leave it deactivated currently. + // $$(this.options.editTimerSelector).each(this.editTimer.bind(this)); }, // actions applied on mouse down. @@ -85,6 +89,30 @@ var PageEnhance = new Class({ } }, + // Edit Timer Popup function. Apply to all elements that should + // pop up a timer edit windows based on InfoWin window. + editTimer: function(el){ + var href = el.href; + var timerid = $pick(href, ""); + if (timerid != "") { + var extractId = /timerid=(.+)/; + var found = extractId.exec(timerid); + if ($defined(found) && found.length > 1) { + timerid = found[1]; + el.addEvent('click', function(event){ + var event = new Event(event); + new InfoWin.Ajax(timerid, href, $merge(this.options.infoWinOptions, { + bodyselect: '', + modal: true, + onDomExtend: this.domExtend.bind(this) + })).show(event); + event.stop(); + return false; + }.bind(this)); + } + } + }, + // function that requests an action from the server vdr. vdrRequest: function(el){ el.addEvent('click', function(event, element){ |