summaryrefslogtreecommitdiff
path: root/skins
diff options
context:
space:
mode:
authoranbr <vdr07@deltab.de>2011-11-26 21:32:12 +0100
committeranbr <vdr07@deltab.de>2011-11-26 21:32:12 +0100
commit1af6af46be79e78d0a841f67c74d85388d76fcd4 (patch)
tree31326811c1dc5a028ad1422b299904fc7407b713 /skins
parentf56a676f9fe0040053f0d351432bc9454fa4377e (diff)
downloadxxv-1af6af46be79e78d0a841f67c74d85388d76fcd4.tar.gz
xxv-1af6af46be79e78d0a841f67c74d85388d76fcd4.tar.bz2
jason: allow toggle from any view
Diffstat (limited to 'skins')
-rw-r--r--skins/jason/search.js30
1 files changed, 26 insertions, 4 deletions
diff --git a/skins/jason/search.js b/skins/jason/search.js
index cb637cc..23ffa6a 100644
--- a/skins/jason/search.js
+++ b/skins/jason/search.js
@@ -154,8 +154,7 @@ Ext.extend(Ext.xxv.searchGrid, Ext.grid.GridPanel, {
,scope:this
,disabled: true
,handler: function(){ this.viewer.searchTab(this.ctxRecord); }
- }
- ,{
+ },'-',{
itemId: 'tn'
,text: this.szRecord
,iconCls: 'record-icon'
@@ -170,6 +169,13 @@ Ext.extend(Ext.xxv.searchGrid, Ext.grid.GridPanel, {
,disabled: true
,handler: function() { this.EditTimer(this.ctxRecord); }
},{
+ itemId:'tt'
+ ,text: this.viewer.gridNow.szToggleTimer
+ ,iconCls: 'timer-toggle-icon'
+ ,scope:this
+ ,disabled: true
+ ,handler: function() { this.ToggleTimer(this.ctxRecord); }
+ },{
itemId:'td'
,text: this.viewer.gridNow.szDeleteTimer
,iconCls: 'timer-delete-icon'
@@ -195,6 +201,7 @@ Ext.extend(Ext.xxv.searchGrid, Ext.grid.GridPanel, {
if(items) { items.eachKey(function(key, f) {
if(f.itemId == 'tn') { if(timerid) f.hide(); else f.show(); }
else if(f.itemId == 'te') { if(timerid) f.show(); else f.hide(); }
+ else if(f.itemId == 'tt') { if(timerid) f.show(); else f.hide(); }
else if(f.itemId == 'td') { if(timerid) f.show(); else f.hide(); }
if(XXV.help.cmdAllowed(f.itemId))
f.enable();
@@ -253,7 +260,7 @@ Ext.extend(Ext.xxv.searchGrid, Ext.grid.GridPanel, {
,EditTimer : function(record) {
this.viewer.gridNow.EditTimer(record, this.updateTimer, this);
}
- ,DeleteTimer : function(record) {
+ ,SelectedTimer : function(record) {
var gsm = this.getSelectionModel();
var sel = gsm.getSelections();
if(sel.length <= 0) {
@@ -269,7 +276,13 @@ Ext.extend(Ext.xxv.searchGrid, Ext.grid.GridPanel, {
}
items += sel[i].data.timerid;
}
- this.viewer.gridNow.DeleteTimerId(items, this.store);
+ return items;
+ }
+ ,ToggleTimer : function(record) {
+ this.viewer.gridNow.ToggleTimerId(this.SelectedTimer(record), this.store);
+ }
+ ,DeleteTimer : function(record) {
+ this.viewer.gridNow.DeleteTimerId(this.SelectedTimer(record), this.store);
}
});
@@ -304,6 +317,15 @@ Ext.xxv.searchPreview = function(viewer,store) {
this.gridSearch.EditTimer(this.gridSearch.getSelectionModel().getSelected());
}
},{
+ id:'tt',
+ tooltip: Ext.xxv.NowGrid.prototype.szToggleTimer,
+ iconCls: 'timer-toggle-icon',
+ disabled:true,
+ scope: viewer,
+ handler: function(){
+ this.gridSearch.ToggleTimer(this.gridSearch.getSelectionModel().getSelected());
+ }
+ },{
id:'td',
tooltip: Ext.xxv.NowGrid.prototype.szDeleteTimer,
iconCls: 'timer-delete-icon',