diff options
| author | Andreas Brachold <vdr07@deltab.de> | 2009-12-20 14:46:30 +0000 |
|---|---|---|
| committer | Andreas Brachold <vdr07@deltab.de> | 2009-12-20 14:46:30 +0000 |
| commit | 6d3e88d05d3d104bec6f882d2a0205cd4d6f2ae7 (patch) | |
| tree | 23b8cfa57c06ead48a897d0f4c92ceab570bc44f | |
| parent | 06246360d87faa53f943c039b31d9d37ae325c3d (diff) | |
| download | xxv-6d3e88d05d3d104bec6f882d2a0205cd4d6f2ae7.tar.gz xxv-6d3e88d05d3d104bec6f882d2a0205cd4d6f2ae7.tar.bz2 | |
* Chronicle: store also epg description (change db layout version-32)
* Chronicle: ignore cutted recordings
* jason: show description from recording stored by chronicle
| -rw-r--r-- | skins/jason/chronicle.js | 126 | ||||
| -rw-r--r-- | skins/jason/locale/lang-de.js | 24 | ||||
| -rw-r--r-- | skins/jason/locale/lang-en.js | 24 | ||||
| -rwxr-xr-x | skins/jason/locale/lang-it.js | 24 | ||||
| -rw-r--r-- | skins/jason/menus.js | 2 | ||||
| -rw-r--r-- | skins/jason/now.js | 3 | ||||
| -rw-r--r-- | skins/jason/program.js | 5 | ||||
| -rw-r--r-- | skins/jason/search.js | 5 | ||||
| -rw-r--r-- | skins/jason/tabpanel.js | 4 | ||||
| -rw-r--r-- | skins/jason/timers.js | 5 |
10 files changed, 143 insertions, 79 deletions
diff --git a/skins/jason/chronicle.js b/skins/jason/chronicle.js index 07b3904..2463a44 100644 --- a/skins/jason/chronicle.js +++ b/skins/jason/chronicle.js @@ -17,10 +17,11 @@ Ext.xxv.chronicleStore = function() { fields: [
{name: 'id', type: 'int'}, {name: 'title', type: 'string'},
- {name: 'channels', type: 'string'}, + {name: 'channel', type: 'string'}, {name: 'day', type:'date', dateFormat:'timestamp'}, {name: 'start', type: 'string'},
- {name: 'stop', type: 'string'}
+ {name: 'stop', type: 'string'}, + {name: 'description', type: 'string'}
] }) ,proxy : new Ext.data.HttpProxy({
@@ -31,8 +32,9 @@ Ext.xxv.chronicleStore = function() { }); }; -Ext.xxv.chronicleGrid = function(viewer, channels) {
+Ext.xxv.ChronicleGrid = function(viewer) {
this.viewer = viewer;
+ this.preview = new Ext.xxv.ChroniclePreview(viewer); // create the data store this.store = new Ext.xxv.chronicleStore(); @@ -47,7 +49,7 @@ Ext.xxv.chronicleGrid = function(viewer, channels) { ,renderer: this.formatTitle
}, {
header: this.szColChannel
- ,dataIndex: 'channels'
+ ,dataIndex: 'channel'
,width: 130
},{
header: this.szColDay
@@ -67,8 +69,17 @@ Ext.xxv.chronicleGrid = function(viewer, channels) { var cm = new Ext.grid.ColumnModel(this.columns); cm.defaultSortable = true; - - Ext.xxv.chronicleGrid.superclass.constructor.call(this, {
+ this.filter = new Ext.ux.grid.Search({ + position:'top' + ,shortcutKey:null + ,paramNames: { + fields:'cmd' + ,all:'chrl' + ,cmd:'chrs' + ,query:'data' + } + }); + Ext.xxv.ChronicleGrid.superclass.constructor.call(this, {
region: 'center'
,id: 'chronicle-view-grid'
,loadMask: true @@ -82,33 +93,25 @@ Ext.xxv.chronicleGrid = function(viewer, channels) { pageSize: this.store.autoLoad.params.limit, store: this.store, displayInfo: true }) - ,plugins:[new Ext.ux.grid.Search({ - position:'top' - ,shortcutKey:null - ,paramNames: { - fields:'cmd' - ,all:'chrl' - ,cmd:'chrs' - ,query:'data' - } - })] + ,plugins:[this.filter] }); this.store.on({
- 'load' : this.onLoad
+ 'load' : this.onLoad + ,'beforeload' : this.onBeforeLoad
,'loadexception' : this.onLoadException
,scope:this
}); this.on('rowcontextmenu', this.onContextClick, this); + this.getSelectionModel().on('rowselect', this.select, this, {buffer:50}); this.on('rowdblclick', this.onEditItem, this);
}; -Ext.extend(Ext.xxv.chronicleGrid, Ext.grid.EditorGridPanel, { +Ext.extend(Ext.xxv.ChronicleGrid, Ext.grid.EditorGridPanel, { szTitle : "Chronicle" ,szToolTip : "Display recordings in chronological order" - ,szFindReRun : "Find rerun" ,szDelete : "Delete" ,szColTitle : "Title" ,szColDay : "Day" @@ -125,9 +128,12 @@ Ext.extend(Ext.xxv.chronicleGrid, Ext.grid.EditorGridPanel, { ,onLoadException : function( scope, o, arg, e) { new Ext.xxv.MessageBox().msgFailure(this.szLoadException, e.message); } + ,onBeforeLoad : function( store, opt ) { + this.preview.clear(); + } ,onLoad : function( store, records, opt ) { - this.getSelectionModel().selectFirstRow(); this.ownerCt.SetPanelTitle(this.szTitle); + this.getSelectionModel().selectFirstRow(); } ,onContextClick : function(grid, index, e){
if(!this.menu){ // create context menu on first right click
@@ -135,14 +141,14 @@ Ext.extend(Ext.xxv.chronicleGrid, Ext.grid.EditorGridPanel, { id:'grid-ctx',
items: [{
itemId:'s'
- ,text: this.szFindReRun
+ ,text: Ext.xxv.timerGrid.prototype.szFindReRun
,iconCls: 'find-icon'
,scope:this
,disabled: true ,handler: function(){ this.viewer.searchTab(this.ctxRecord);} },{
itemId:'chrd'
- ,text: this.szDelete
+ ,text: Ext.xxv.timerGrid.prototype.szDelete
,iconCls: 'delete-icon'
,scope:this
,disabled: true @@ -222,13 +228,10 @@ Ext.extend(Ext.xxv.chronicleGrid, Ext.grid.EditorGridPanel, { new Ext.xxv.MessageBox().msgFailure(this.szDeleteFailure, msg); } } - - ,onDeleteFailure : function( response,options ) - { + ,onDeleteFailure : function( response,options ) { this.loadMask.hide(); new Ext.xxv.MessageBox().msgFailure(this.szDeleteFailure, response.statusText); } - ,DeleteItem : function( record ) { this.stopEditing();
this.loadMask.show(); @@ -253,12 +256,59 @@ Ext.extend(Ext.xxv.chronicleGrid, Ext.grid.EditorGridPanel, { ,failure: this.onDeleteFailure ,params:{ data: todel } }); + } + ,select : function(sm, index, record){ + this.preview.select(record, this.filter.getValue()); }
}); +Ext.xxv.ChroniclePreview = function(viewer) { + this.viewer = viewer; + Ext.xxv.ChroniclePreview.superclass.constructor.call(this, {
+ id: 'chronicle-preview',
+ region: 'south',
+ cls:'preview',
+ autoScroll: true,
+ stateful:true, + tbar: [ {
+ id:'s',
+ tooltip: Ext.xxv.timerGrid.prototype.szFindReRun,
+ iconCls: 'find-icon',
+ disabled:true,
+ scope: viewer,
+ handler: function(){ this.searchTab(this.gridChronicle.getSelectionModel().getSelected()); }
+ } ]
+ }); +}; + +Ext.extend(Ext.xxv.ChroniclePreview, Ext.Panel, { + select : function(record, lookup){ + if(this.body)
+ XXV.getTemplate().overwrite(this.body, record.data); + if(lookup) + highlightText(this.body.dom,lookup,'x-highlight',1); + // Enable all toolbar buttons + var items = this.topToolbar.items;
+ if(items) { + items.eachKey(function(key, f) { + if(XXV.help.cmdAllowed(key)) f.enable(); + },items); + } + }
+ ,clear: function(){ + if(this) {
+ if(this.body) + this.body.update('');
+ // Disable all items + var items = this.topToolbar.items;
+ if(items) { items.eachKey(function(key, f){f.disable();},items); } + } + } +}); + function createChronicleView(viewer,id) { - viewer.chronicleGrid = new Ext.xxv.chronicleGrid(viewer, viewer.storeChannels); + viewer.gridChronicle = new Ext.xxv.ChronicleGrid(viewer); tab = new Ext.xxv.Panel({
id: id, @@ -267,7 +317,27 @@ function createChronicleView(viewer,id) { border:false, layout:'border', stateful:true,
- items:[ viewer.chronicleGrid ]
+ items:[ viewer.gridChronicle + ,{
+ id:'chronicle-bottom-preview',
+ layout:'fit',
+ items:XXV.BottomPreview ? 0 : viewer.gridChronicle.preview,
+ height: 250,
+ split: true,
+ border:false,
+ region:'south',
+ hidden:XXV.BottomPreview
+ }, {
+ id:'chronicle-right-preview',
+ layout:'fit',
+ items:XXV.RightPreview ? 0 : viewer.gridChronicle.preview, + border:false,
+ region:'east',
+ width:350,
+ split: true,
+ hidden:XXV.RightPreview
+ } + ]
});
diff --git a/skins/jason/locale/lang-de.js b/skins/jason/locale/lang-de.js index 223254d..e2f11dd 100644 --- a/skins/jason/locale/lang-de.js +++ b/skins/jason/locale/lang-de.js @@ -88,19 +88,17 @@ Ext.xxv.autotimerGrid.prototype.szUpgradeSuccess = "Suche nach gewünschten Prog Ext.xxv.autotimerGrid.prototype.szUpgradeFailure = "Suche nach gewünschten Programmeinträgen fehlgeschlagen!\r\n{0}"; /* chronicle.js */ -Ext.xxv.chronicleGrid.prototype.szTitle = "Chronik"; -Ext.xxv.chronicleGrid.prototype.szToolTip = "Zeigt Aufnahmen in chronologischer Anordnung"; -Ext.xxv.chronicleGrid.prototype.szFindReRun = "Suche Wiederholung"; -Ext.xxv.chronicleGrid.prototype.szDelete = "Löschen"; -Ext.xxv.chronicleGrid.prototype.szColTitle = "Titel"; -Ext.xxv.chronicleGrid.prototype.szColDay = "Datum"; -Ext.xxv.chronicleGrid.prototype.szColChannel = "Kanal"; -Ext.xxv.chronicleGrid.prototype.szColStart = "Beginn";
-Ext.xxv.chronicleGrid.prototype.szColStop = "Ende"; -Ext.xxv.chronicleGrid.prototype.szColDayFormat = "l, d.m.Y"; -Ext.xxv.chronicleGrid.prototype.szLoadException = "Konnte keine Daten der Chronik holen!\r\n{0}"; -Ext.xxv.chronicleGrid.prototype.szDeleteSuccess = "Eintrag der Chronik erfolgreich gelöscht.\r\n{0}"; -Ext.xxv.chronicleGrid.prototype.szDeleteFailure = "Konnte Eintrag der Chronik nicht löschen!\r\n{0}"; +Ext.xxv.ChronicleGrid.prototype.szTitle = "Chronik"; +Ext.xxv.ChronicleGrid.prototype.szToolTip = "Zeigt Aufnahmen in chronologischer Anordnung"; +Ext.xxv.ChronicleGrid.prototype.szColTitle = "Titel"; +Ext.xxv.ChronicleGrid.prototype.szColDay = "Datum"; +Ext.xxv.ChronicleGrid.prototype.szColChannel = "Kanal"; +Ext.xxv.ChronicleGrid.prototype.szColStart = "Beginn";
+Ext.xxv.ChronicleGrid.prototype.szColStop = "Ende"; +Ext.xxv.ChronicleGrid.prototype.szColDayFormat = "l, d.m.Y"; +Ext.xxv.ChronicleGrid.prototype.szLoadException = "Konnte keine Daten der Chronik holen!\r\n{0}"; +Ext.xxv.ChronicleGrid.prototype.szDeleteSuccess = "Eintrag der Chronik erfolgreich gelöscht.\r\n{0}"; +Ext.xxv.ChronicleGrid.prototype.szDeleteFailure = "Konnte Eintrag der Chronik nicht löschen!\r\n{0}"; /* now.js */ Ext.xxv.NowGrid.prototype.szTitle = "Programmführer"; diff --git a/skins/jason/locale/lang-en.js b/skins/jason/locale/lang-en.js index f564ca4..c5da2bd 100644 --- a/skins/jason/locale/lang-en.js +++ b/skins/jason/locale/lang-en.js @@ -88,19 +88,17 @@ Ext.xxv.autotimerGrid.prototype.szUpgradeSuccess = "Lookup for wanted events suc Ext.xxv.autotimerGrid.prototype.szUpgradeFailure = "Couldn't lookup for wanted events!\r\n{0}"; /* chronicle.js */ -Ext.xxv.chronicleGrid.prototype.szTitle = "Chronicle"; -Ext.xxv.chronicleGrid.prototype.szToolTip = "Display recordings in chronological order"; -Ext.xxv.chronicleGrid.prototype.szFindReRun = "Find rerun"; -Ext.xxv.chronicleGrid.prototype.szDelete = "Delete"; -Ext.xxv.chronicleGrid.prototype.szColTitle = "Title"; -Ext.xxv.chronicleGrid.prototype.szColDay = "Day"; -Ext.xxv.chronicleGrid.prototype.szColChannel = "Channel"; -Ext.xxv.chronicleGrid.prototype.szColStart = "Start";
-Ext.xxv.chronicleGrid.prototype.szColStop = "Stop"; -Ext.xxv.chronicleGrid.prototype.szColDayFormat = "l, m/d/Y"; -Ext.xxv.chronicleGrid.prototype.szLoadException = "Couldn't get data from chronicle!\r\n{0}"; -Ext.xxv.chronicleGrid.prototype.szDeleteSuccess = "Data from chronicle deleted successful.\r\n{0}"; -Ext.xxv.chronicleGrid.prototype.szDeleteFailure = "Couldn't delete data from chronicle!\r\n{0}"; +Ext.xxv.ChronicleGrid.prototype.szTitle = "Chronicle"; +Ext.xxv.ChronicleGrid.prototype.szToolTip = "Display recordings in chronological order"; +Ext.xxv.ChronicleGrid.prototype.szColTitle = "Title"; +Ext.xxv.ChronicleGrid.prototype.szColDay = "Day"; +Ext.xxv.ChronicleGrid.prototype.szColChannel = "Channel"; +Ext.xxv.ChronicleGrid.prototype.szColStart = "Start";
+Ext.xxv.ChronicleGrid.prototype.szColStop = "Stop"; +Ext.xxv.ChronicleGrid.prototype.szColDayFormat = "l, m/d/Y"; +Ext.xxv.ChronicleGrid.prototype.szLoadException = "Couldn't get data from chronicle!\r\n{0}"; +Ext.xxv.ChronicleGrid.prototype.szDeleteSuccess = "Data from chronicle deleted successful.\r\n{0}"; +Ext.xxv.ChronicleGrid.prototype.szDeleteFailure = "Couldn't delete data from chronicle!\r\n{0}"; /* now.js */ Ext.xxv.NowGrid.prototype.szTitle = "Program guide"; diff --git a/skins/jason/locale/lang-it.js b/skins/jason/locale/lang-it.js index 51251a1..9c9212e 100755 --- a/skins/jason/locale/lang-it.js +++ b/skins/jason/locale/lang-it.js @@ -88,19 +88,17 @@ Ext.xxv.autotimerGrid.prototype.szUpgradeSuccess = "Ricerca eventi desiderati ri Ext.xxv.autotimerGrid.prototype.szUpgradeFailure = "Impossibile cercare eventi desiderati!\r\n{0}"; /* chronicle.js */ -Ext.xxv.chronicleGrid.prototype.szTitle = "Cronologia"; -Ext.xxv.chronicleGrid.prototype.szToolTip = "Mostra registrazioni in ordine cronologico"; -Ext.xxv.chronicleGrid.prototype.szFindReRun = "Cerca repliche"; -Ext.xxv.chronicleGrid.prototype.szDelete = "Elimina"; -Ext.xxv.chronicleGrid.prototype.szColTitle = "Titolo"; -Ext.xxv.chronicleGrid.prototype.szColDay = "Giorno"; -Ext.xxv.chronicleGrid.prototype.szColChannel = "Canale"; -Ext.xxv.chronicleGrid.prototype.szColStart = "Inizio";
-Ext.xxv.chronicleGrid.prototype.szColStop = "Fine"; -Ext.xxv.chronicleGrid.prototype.szColDayFormat = "l, m/d/Y"; -Ext.xxv.chronicleGrid.prototype.szLoadException = "Impossibile recuperare dati della cronologia!\r\n{0}"; -Ext.xxv.chronicleGrid.prototype.szDeleteSuccess = "Eliminazione dati cronologia riuscita.\r\n{0}"; -Ext.xxv.chronicleGrid.prototype.szDeleteFailure = "Impossibile eliminare dati della cronologia!\r\n{0}"; +Ext.xxv.ChronicleGrid.prototype.szTitle = "Cronologia"; +Ext.xxv.ChronicleGrid.prototype.szToolTip = "Mostra registrazioni in ordine cronologico"; +Ext.xxv.ChronicleGrid.prototype.szColTitle = "Titolo"; +Ext.xxv.ChronicleGrid.prototype.szColDay = "Giorno"; +Ext.xxv.ChronicleGrid.prototype.szColChannel = "Canale"; +Ext.xxv.ChronicleGrid.prototype.szColStart = "Inizio";
+Ext.xxv.ChronicleGrid.prototype.szColStop = "Fine"; +Ext.xxv.ChronicleGrid.prototype.szColDayFormat = "l, m/d/Y"; +Ext.xxv.ChronicleGrid.prototype.szLoadException = "Impossibile recuperare dati della cronologia!\r\n{0}"; +Ext.xxv.ChronicleGrid.prototype.szDeleteSuccess = "Eliminazione dati cronologia riuscita.\r\n{0}"; +Ext.xxv.ChronicleGrid.prototype.szDeleteFailure = "Impossibile eliminare dati della cronologia!\r\n{0}"; /* now.js */ Ext.xxv.NowGrid.prototype.szTitle = "Guida programmi"; diff --git a/skins/jason/menus.js b/skins/jason/menus.js index bcc8182..0e3ed56 100644 --- a/skins/jason/menus.js +++ b/skins/jason/menus.js @@ -124,7 +124,7 @@ Ext.xxv.MainMenu = function(/*config*/){ ,iconCls:"recordings-icon" ,cmd: 'rl' },{ - text: Ext.xxv.chronicleGrid.prototype.szTitle + text: Ext.xxv.ChronicleGrid.prototype.szTitle ,iconCls:"chronicle-icon" ,cmd: 'chrl' },{ diff --git a/skins/jason/now.js b/skins/jason/now.js index b56ef59..442c760 100644 --- a/skins/jason/now.js +++ b/skins/jason/now.js @@ -193,8 +193,6 @@ Ext.extend(Ext.xxv.NowGrid, Ext.grid.GridPanel, { for (var i = 0; i < l; i++) { records[i].data.rang = i; } - this.getSelectionModel().selectFirstRow(); - if(store.baseParams.data && store.baseParams.cmd != 'nx' && store.reader.meta @@ -206,6 +204,7 @@ Ext.extend(Ext.xxv.NowGrid, Ext.grid.GridPanel, { this.ownerCt.SetPanelTitle(this.szFollowing + " - " + new Date().dateFormat('H:i')); else this.ownerCt.SetPanelTitle(this.szPresent + " - " + new Date().dateFormat('H:i')); + this.getSelectionModel().selectFirstRow(); } ,onSpecialkey : function(f, e) { if(e.getKey() == e.ENTER){ diff --git a/skins/jason/program.js b/skins/jason/program.js index 294c009..8f44883 100644 --- a/skins/jason/program.js +++ b/skins/jason/program.js @@ -231,8 +231,7 @@ Ext.extend(Ext.xxv.programGrid, Ext.grid.GridPanel, { this.viewer.gridNow.EditTimer(record, this.store); } ,select : function(sm, index, record){ - this.preview.select(sm, index, record, - this.filter.getValue()); + this.preview.select(record, this.filter.getValue()); }
}); @@ -273,7 +272,7 @@ Ext.xxv.programPreview = function(viewer) { Ext.extend(Ext.xxv.programPreview, Ext.Panel, { - select : function(sm, index, record, lookup){ + select : function(record, lookup){ if(this.body)
XXV.getTemplate().overwrite(this.body, record.data); if(lookup) diff --git a/skins/jason/search.js b/skins/jason/search.js index 648a972..3a7d154 100644 --- a/skins/jason/search.js +++ b/skins/jason/search.js @@ -219,7 +219,7 @@ Ext.extend(Ext.xxv.searchGrid, Ext.grid.GridPanel, { this.viewer.gridNow.EditTimer(record, this.store); } ,select : function(sm, index, record){ - this.preview.select(sm, index, record,this.store.baseParams.data); + this.preview.select(record,this.store.baseParams.data); } }); @@ -258,9 +258,10 @@ Ext.xxv.searchPreview = function(viewer) { }); }; Ext.extend(Ext.xxv.searchPreview, Ext.Panel, { - select : function(sm, index, record, lookup){ + select : function(record, lookup){ if(this.body)
XXV.getTemplate().overwrite(this.body, record.data); + if(lookup) highlightText(this.body.dom,lookup,'x-highlight',1); // Enable all toolbar buttons var items = this.topToolbar.items;
diff --git a/skins/jason/tabpanel.js b/skins/jason/tabpanel.js index a15efe6..392f026 100644 --- a/skins/jason/tabpanel.js +++ b/skins/jason/tabpanel.js @@ -63,7 +63,7 @@ Ext.extend(Ext.xxv.tabPanel, Ext.TabPanel, { return;
}
if(pressed){
- var pages = ['now','program','timer','search','recording']; + var pages = ['now','program','timer','search','recording','chronicle']; for(var i = 0, len = pages.length; i < len; i++){ var page = pages[i];
var right = Ext.getCmp(page + '-right-preview');
@@ -80,6 +80,8 @@ Ext.extend(Ext.xxv.tabPanel, Ext.TabPanel, { preview = this.gridSearch.preview; } else if(page == 'recording') { preview = this.gridRecordings.preview; + } else if(page == 'chronicle') { + preview = this.gridChronicle.preview; } else { continue; } diff --git a/skins/jason/timers.js b/skins/jason/timers.js index b088742..41eed8d 100644 --- a/skins/jason/timers.js +++ b/skins/jason/timers.js @@ -507,8 +507,7 @@ Ext.extend(Ext.xxv.timerGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel this.EditItem(record); } ,select : function(sm, index, record){ - this.preview.select(sm, index, record, - this.filter.getValue()); + this.preview.select(record, this.filter.getValue()); } }); @@ -552,7 +551,7 @@ Ext.extend(Ext.xxv.timerPreview, Ext.Panel, { szFindReRun : "Find rerun" ,szEdit : "Edit" ,szDelete : "Delete" - ,select : function(sm, index, record, lookup){ + ,select : function(record, lookup){ if(this.body)
XXV.getTemplate().overwrite(this.body, record.data); if(lookup) |
