diff options
| author | Andreas Brachold <vdr07@deltab.de> | 2009-04-07 17:17:33 +0000 |
|---|---|---|
| committer | Andreas Brachold <vdr07@deltab.de> | 2009-04-07 17:17:33 +0000 |
| commit | 340a339355ed27c31272f12e58e5b645c530af75 (patch) | |
| tree | 6587e1e96f2a2f011910aabbd9b798542412f36f | |
| parent | 760692d05240aeafb1bdf8df7a4ee548fd9a2b1e (diff) | |
| download | xxv-340a339355ed27c31272f12e58e5b645c530af75.tar.gz xxv-340a339355ed27c31272f12e58e5b645c530af75.tar.bz2 | |
* jason: add menu entry for watch tv from program guide 'now on tv'
| -rw-r--r-- | skins/jason/now.js | 60 | ||||
| -rw-r--r-- | skins/jason/program.js | 32 |
2 files changed, 68 insertions, 24 deletions
diff --git a/skins/jason/now.js b/skins/jason/now.js index d12bd8e..7c46da3 100644 --- a/skins/jason/now.js +++ b/skins/jason/now.js @@ -224,26 +224,46 @@ Ext.extend(Ext.xxv.NowGrid, Ext.grid.GridPanel, { this.viewer.openProgram(data); } ,onContextClick : function(grid, index, e){
- if(!this.menu){ // create context menu on first right click
+ if(!this.menu){ // create context menu on first right click this.menu = new Ext.menu.Menu({
id:'grid-ctx',
items: [{
- text: this.szFindReRun,
- iconCls: 'find-icon',
- scope:this,
- handler: function(){ this.viewer.searchTab(this.ctxRecord); } + id:'s'
+ ,text: this.szFindReRun
+ ,iconCls: 'find-icon'
+ ,scope: this + ,disabled: true
+ ,handler: function(){ this.viewer.searchTab(this.ctxRecord); } },{
- text: this.szProgram,
- iconCls: 'program-icon',
- scope:this,
- handler: function(){ + id:'p'
+ ,text: this.szProgram
+ ,iconCls: 'program-icon'
+ ,scope: this + ,disabled: true
+ ,handler: function(){ var data = {'id':this.ctxRecord.data.chid,'name':this.ctxRecord.data.channel}; this.viewer.openProgram(data); } },{
- text: this.szRecord,
- iconCls: 'record-icon',
- scope:this,
- handler: function(){ this.Record(this.ctxRecord); } + id:'tn'
+ ,text: this.szRecord
+ ,iconCls: 'record-icon'
+ ,scope:this + ,disabled: true
+ ,handler: function(){ this.Record(this.ctxRecord); } + },'-',{
+ id:'lst'
+ ,iconCls:'stream-icon'
+ ,text: XXV.side.webcastText
+ ,scope: this
+ ,disabled: true
+ ,handler: function(){ XXV.side.onWebCastChannel(this.ctxRecord.data.chid); } + },{
+ id:'sw'
+ ,iconCls: 'switch-icon'
+ ,text: XXV.side.switchText
+ ,scope: this
+ ,disabled: true
+ ,handler: function(){ XXV.side.onSwitchChannel(this.ctxRecord.data.chid); } }
]
});
@@ -256,7 +276,19 @@ Ext.extend(Ext.xxv.NowGrid, Ext.grid.GridPanel, { }
this.ctxRow = this.view.getRow(index);
this.ctxRecord = this.store.getAt(index);
- Ext.fly(this.ctxRow).addClass('x-node-ctx');
+ Ext.fly(this.ctxRow).addClass('x-node-ctx'); + + var items = this.menu.items;
+ if(items) { items.eachKey(function(key, f) { + if(XXV.help.cmdAllowed(key)) + f.enable(); + },items); + } + + var follow = this.store.baseParams.cmd != 'n' || this.store.baseParams.data;
+ this.menu.items.get('lst').setDisabled(follow);
+ this.menu.items.get('sw').setDisabled(follow);
+ this.menu.showAt(e.getXY());
}
diff --git a/skins/jason/program.js b/skins/jason/program.js index 9c16f62..c90c817 100644 --- a/skins/jason/program.js +++ b/skins/jason/program.js @@ -142,17 +142,21 @@ Ext.extend(Ext.xxv.programGrid, Ext.grid.GridPanel, { if(!this.menu){ // create context menu on first right click
this.menu = new Ext.menu.Menu({
id:'grid-ctx',
- items: [{
- text: this.szFindReRun,
- iconCls: 'find-icon',
- scope:this,
- handler: function(){ this.viewer.searchTab(this.ctxRecord); } + items: [{ + id:'s'
+ ,text: this.szFindReRun
+ ,iconCls: 'find-icon'
+ ,scope:this + ,disabled: true
+ ,handler: function(){ this.viewer.searchTab(this.ctxRecord); } } - ,{
- text: this.szRecord,
- iconCls: 'record-icon',
- scope:this,
- handler: function(){ this.Record(null); } + ,{ + id:'tn'
+ ,text: this.szRecord
+ ,iconCls: 'record-icon'
+ ,scope:this + ,disabled: true
+ ,handler: function(){ this.Record(null); } } ]
});
@@ -166,6 +170,14 @@ Ext.extend(Ext.xxv.programGrid, Ext.grid.GridPanel, { this.ctxRow = this.view.getRow(index);
this.ctxRecord = this.store.getAt(index);
Ext.fly(this.ctxRow).addClass('x-node-ctx');
+ + var items = this.menu.items;
+ if(items) { items.eachKey(function(key, f) { + if(XXV.help.cmdAllowed(key)) + f.enable(); + },items); + } + this.menu.showAt(e.getXY());
}
|
