summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Brachold <vdr07@deltab.de>2010-08-01 08:24:39 +0000
committerAndreas Brachold <vdr07@deltab.de>2010-08-01 08:24:39 +0000
commit01c98b86cddc100cdcedb3d5363b8fed6edacf1c (patch)
treecc6a96988199cc5dbb1aece04bbf711a89e31fed
parent32b9ea3f0445eb738c8f2526ad83aa3f4285048b (diff)
downloadxxv-01c98b86cddc100cdcedb3d5363b8fed6edacf1c.tar.gz
xxv-01c98b86cddc100cdcedb3d5363b8fed6edacf1c.tar.bz2
jason: update timer view if autotimer upgraded
-rw-r--r--skins/jason/autotimers.js30
-rw-r--r--skins/jason/chronicle.js4
-rw-r--r--skins/jason/form.js26
-rw-r--r--skins/jason/now.js40
-rw-r--r--skins/jason/program.js10
-rw-r--r--skins/jason/search.js11
-rw-r--r--skins/jason/timers.js42
7 files changed, 78 insertions, 85 deletions
diff --git a/skins/jason/autotimers.js b/skins/jason/autotimers.js
index 3981785..569dc96 100644
--- a/skins/jason/autotimers.js
+++ b/skins/jason/autotimers.js
@@ -1,6 +1,6 @@
/*
* jason - Javascript based skin for xxv
- * Copyright(c) 2008-2009, anbr
+ * Copyright(c) 2008-2010, anbr
*
* http://xxv.berlios.de/
*
@@ -35,7 +35,6 @@ Ext.xxv.autotimerStore = function() {
Ext.xxv.autotimerGrid = function(viewer, channels) {
this.viewer = viewer;
- //Ext.apply(this, {}); // Apply config
// create the data store
this.store = new Ext.xxv.autotimerStore();
@@ -59,8 +58,9 @@ Ext.xxv.autotimerGrid = function(viewer, channels) {
,width: 200
,renderer: this.formatTitle
},
- this.activeColumn,
- { header: this.szColChannels
+ this.activeColumn,
+ {
+ header: this.szColChannels
,dataIndex: 'channels'
,width: 150
},{
@@ -100,8 +100,7 @@ Ext.xxv.autotimerGrid = function(viewer, channels) {
pageSize: this.store.autoLoad.params.limit
,store: this.store
,displayInfo: true
- ,items: [
- {
+ ,items: [{
id:'au'
,iconCls: 'upgrade-icon'
,tooltip: this.szUpgrade
@@ -239,9 +238,8 @@ Ext.extend(Ext.xxv.autotimerGrid, Ext.grid.EditorGridPanel, {
value, style
);
}
- /******************************************************************************/
- ,onDeleteSuccess : function( response,options )
- {
+/******************************************************************************/
+ ,onDeleteSuccess : function( response,options ) {
this.loadMask.hide();
var o = eval("("+response.responseText+")");
@@ -273,8 +271,7 @@ Ext.extend(Ext.xxv.autotimerGrid, Ext.grid.EditorGridPanel, {
}
}
- ,onDeleteFailure : function( response,options )
- {
+ ,onDeleteFailure : function( response,options ) {
this.loadMask.hide();
new Ext.xxv.MessageBox().msgFailure(this.szDeleteFailure, response.statusText);
}
@@ -305,7 +302,7 @@ Ext.extend(Ext.xxv.autotimerGrid, Ext.grid.EditorGridPanel, {
});
}
- /******************************************************************************/
+/******************************************************************************/
,EditItem : function( record ) {
this.stopEditing();
var item;
@@ -349,9 +346,8 @@ Ext.extend(Ext.xxv.autotimerGrid, Ext.grid.EditorGridPanel, {
if(o && o.data && typeof(o.data) == 'string'
&& o.success) {
-
new Ext.xxv.MessageBox().msgSuccess(this.szUpgradeSuccess, o.data);
-
+ this.updateTimer();
} else {
var msg = '';
if(o && o.data && typeof(o.data) == 'string') {
@@ -389,7 +385,11 @@ Ext.extend(Ext.xxv.autotimerGrid, Ext.grid.EditorGridPanel, {
}
});
}
-
+ ,updateTimer : function() {
+ if(this.viewer.gridTimer) {
+ this.viewer.gridTimer.dataDirty = true;
+ }
+ }
});
function createAutoTimerView(viewer,id) {
diff --git a/skins/jason/chronicle.js b/skins/jason/chronicle.js
index 03f04d1..7fceda1 100644
--- a/skins/jason/chronicle.js
+++ b/skins/jason/chronicle.js
@@ -245,8 +245,8 @@ Ext.extend(Ext.xxv.ChronicleGrid, Ext.grid.EditorGridPanel, {
var todel = "";
for(var i = 0, len = sel.length; i < len; i++){
if(i != 0)
- todel += ',';
- todel += sel[i].data.id;
+ todel += ',';
+ todel += sel[i].data.id;
}
Ext.Ajax.request({
scope: this
diff --git a/skins/jason/form.js b/skins/jason/form.js
index de62ae5..7090d2c 100644
--- a/skins/jason/form.js
+++ b/skins/jason/form.js
@@ -117,7 +117,7 @@ Ext.extend(Ext.xxv.Question, Ext.Window, {
config.baseCls = '';
config.style = 'border: 0px none;';
config.items = [{
- xtype: 'checkbox'
+ xtype: 'checkbox'
,labelSeparator: ''
,boxLabel: Ext.util.Format.ellipsis(r[i].data.fieldLabel,80)
,checked: r[i].data.valuedef == 'y' ? true : false
@@ -126,7 +126,7 @@ Ext.extend(Ext.xxv.Question, Ext.Window, {
];
break;
case 'checkbox':
- config.xtype = 'checkboxgroup';
+ config.xtype = 'checkboxgroup';
config.items = [];
for(var f = 0, flen = r[i].data.choices.length; f < flen; f++){
config.items.push({
@@ -152,15 +152,15 @@ Ext.extend(Ext.xxv.Question, Ext.Window, {
fields = [ {name: 'display'} ,{name: 'value'}, {name: 'groups'} ];
var cls = 'ux-mselect';
- var tpl = '<tpl for=".">';
+ var tpl = '<tpl for=".">';
tpl+= '<tpl if="this.isNewGroup(groups)"><div class="x-combo-list-hd">{groups}</div></tpl>';
tpl+= '<div class="' + cls +'-item';
- if(Ext.isIE || Ext.isIE7)
+ if(Ext.isIE || Ext.isIE7)
tpl+='" unselectable=on';
- else
+ else
tpl+=' x-unselectable"';
- tpl+='>{display}</div></tpl>';
+ tpl+='>{display}</div></tpl>';
config.tpl = new Ext.XTemplate(tpl, {
isNewGroup: function(groups){
@@ -171,16 +171,16 @@ Ext.extend(Ext.xxv.Question, Ext.Window, {
});
} else {
fields = [ {name: 'display'} ,{name: 'value'} ];
- config.tpl = null;
+ config.tpl = null;
}
config.store = new Ext.data.Store({
reader: new Ext.data.ArrayReader({}, fields),
data: r[i].data.choices
});
}
- config.valueField = 'value';
- config.displayField = 'display';
- config.width = '100%';
+ config.valueField = 'value';
+ config.displayField = 'display';
+ config.width = '100%';
if(len == 1) {
config.hideLabel = true;
config.height = 430;
@@ -188,10 +188,10 @@ Ext.extend(Ext.xxv.Question, Ext.Window, {
this.title = config.fieldLabel;
}
} else {
- config.height = 120;
+ config.height = 120;
}
- config.minLength = 0;
- config.maxLength = r[i].data.choices.length;
+ config.minLength = 0;
+ config.maxLength = r[i].data.choices.length;
break;
case 'list':
config.xtype = 'combo';
diff --git a/skins/jason/now.js b/skins/jason/now.js
index 70bedf0..d6841b9 100644
--- a/skins/jason/now.js
+++ b/skins/jason/now.js
@@ -34,13 +34,12 @@ Ext.xxv.NowStore = function() {
url: XXV.help.baseURL()
,method: 'GET'
})
- ,groupOnSort:false
+ ,groupOnSort:false
,sortInfo:{field:'order', direction:'ASC'}
,groupField:'grpname'
,remoteGroup:true
- ,hasMultiSort:false
- ,multiSortInfo:{}
-
+ ,hasMultiSort:false
+ ,multiSortInfo:{}
});
}
@@ -78,10 +77,10 @@ Ext.xxv.NowGrid = function(viewer) {
,maskRe: /^([0-9\:]+)$/
,regex: new RegExp("^([0-9]+\:[0-9]+)|("+this.szFollowing+")$")
,maxLengthText: 5
- ,listeners: {
- 'select': {fn:this.reload, scope:this}
- ,'specialkey': {fn:this.onSpecialkey, scope:this}
- }
+ ,listeners: {
+ 'select': {fn:this.reload, scope:this}
+ ,'specialkey': {fn:this.onSpecialkey, scope:this}
+ }
});
this.columns = [
@@ -132,7 +131,7 @@ Ext.xxv.NowGrid = function(viewer) {
enableGroupingMenu:false,
forceFit:true,
showGroupName: false,
- enableGrouping:true
+ enableGrouping:true
})
,tbar:new Ext.PagingToolbar({
pageSize: configuration.pageSize
@@ -403,8 +402,8 @@ Ext.extend(Ext.xxv.NowGrid, Ext.grid.GridPanel, {
if(o && o.data && typeof(o.data) == 'string'
&& o.success) {
new Ext.xxv.MessageBox().msgSuccess(this.szDeleteSuccess, o.data);
-
- var items = options.params.data.split(",");
+
+ var items = options.params.data.split(",");
for (var j = 0, jlen = options.store.getCount(); j < jlen; j++) {
var record = options.store.getAt(j);
for(var i = 0, len = items.length; i < len; i++){
@@ -424,8 +423,7 @@ Ext.extend(Ext.xxv.NowGrid, Ext.grid.GridPanel, {
new Ext.xxv.MessageBox().msgFailure(this.szDeleteFailure, msg);
}
}
- ,onDeleteFailure : function( response,options )
- {
+ ,onDeleteFailure : function( response,options ) {
this.viewer.loadMask.hide();
new Ext.xxv.MessageBox().msgFailure(this.szDeleteFailure, response.statusText);
}
@@ -439,11 +437,11 @@ Ext.extend(Ext.xxv.NowGrid, Ext.grid.GridPanel, {
var items = "";
for(var i = 0, len = sel.length; i < len; i++){
if(i != 0)
- items += ',';
+ items += ',';
if(sel[i].data.timerid == 0) {
continue;
}
- items += sel[i].data.timerid;
+ items += sel[i].data.timerid;
}
this.DeleteTimerId(items, this.store);
}
@@ -465,13 +463,13 @@ Ext.extend(Ext.xxv.NowGrid, Ext.grid.GridPanel, {
,formatTitle: function(value, p, record) {
- var style = "";
+ var style = "";
if(record.data.timerid) {
- if(record.data.timeractiv != 1) {
- style = " deactive";
- } else if(record.data.running == 1) {
- style = " running";
- } else {
+ if(record.data.timeractiv != 1) {
+ style = " deactive";
+ } else if(record.data.running == 1) {
+ style = " running";
+ } else {
style = " active";
}
}
diff --git a/skins/jason/program.js b/skins/jason/program.js
index 2d88fee..8195306 100644
--- a/skins/jason/program.js
+++ b/skins/jason/program.js
@@ -96,7 +96,7 @@ Ext.xxv.programGrid = function(viewer, record) {
enableGroupingMenu:false,
forceFit:true,
showGroupName: false,
- enableGrouping:true
+ enableGrouping:true
})
,tbar:new Ext.PagingToolbar({
pageSize: configuration.pageSize
@@ -232,8 +232,8 @@ Ext.extend(Ext.xxv.programGrid, Ext.grid.GridPanel, {
var ids = "";
for(var i = 0, len = sel.length; i < len; i++){
if(i != 0)
- ids += ',';
- ids += sel[i].data.id;
+ ids += ',';
+ ids += sel[i].data.id;
}
this.viewer.RecordID(ids);
}
@@ -250,11 +250,11 @@ Ext.extend(Ext.xxv.programGrid, Ext.grid.GridPanel, {
var items = "";
for(var i = 0, len = sel.length; i < len; i++){
if(i != 0)
- items += ',';
+ items += ',';
if(sel[i].data.timerid == 0) {
continue;
}
- items += sel[i].data.timerid;
+ items += sel[i].data.timerid;
}
this.viewer.gridNow.DeleteTimerId(items, this.store);
}
diff --git a/skins/jason/search.js b/skins/jason/search.js
index 9e327ec..d289267 100644
--- a/skins/jason/search.js
+++ b/skins/jason/search.js
@@ -87,7 +87,7 @@ Ext.xxv.searchGrid = function(viewer, lookup) {
enableGroupingMenu:false,
forceFit:true,
showGroupName: false,
- enableGrouping:true
+ enableGrouping:true
}),
tbar:new Ext.PagingToolbar({
pageSize: this.store.autoLoad.params.limit,
@@ -219,8 +219,8 @@ Ext.extend(Ext.xxv.searchGrid, Ext.grid.GridPanel, {
var ids = "";
for(var i = 0, len = sel.length; i < len; i++){
if(i != 0)
- ids += ',';
- ids += sel[i].data.id;
+ ids += ',';
+ ids += sel[i].data.id;
}
this.viewer.RecordID(ids);
}
@@ -237,11 +237,11 @@ Ext.extend(Ext.xxv.searchGrid, Ext.grid.GridPanel, {
var items = "";
for(var i = 0, len = sel.length; i < len; i++){
if(i != 0)
- items += ',';
+ items += ',';
if(sel[i].data.timerid == 0) {
continue;
}
- items += sel[i].data.timerid;
+ items += sel[i].data.timerid;
}
this.viewer.gridNow.DeleteTimerId(items, this.store);
}
@@ -362,4 +362,3 @@ function createSearchView(viewer,id,lookup) {
return tab;
}
-
diff --git a/skins/jason/timers.js b/skins/jason/timers.js
index 8cf4f7f..6c8a9bb 100644
--- a/skins/jason/timers.js
+++ b/skins/jason/timers.js
@@ -180,7 +180,7 @@ Ext.xxv.timerGrid = function(viewer) {
enableGroupingMenu:false,
forceFit:true,
showGroupName: false,
- enableGrouping:true
+ enableGrouping:true
})
,tbar:new Ext.PagingToolbar({
pageSize: this.store.autoLoad.params.limit
@@ -338,14 +338,14 @@ Ext.extend(Ext.xxv.timerGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel
}
subtitle += Woerter[i];
}
- var style = "";
- if((record.data.flags & 1) == 0) {
- style = " deactive";
- } else if(record.data.collision != '0') {
- style = " problem";
- } else if(record.data.running) {
- style = " running";
- }
+ var style = "";
+ if((record.data.flags & 1) == 0) {
+ style = " deactive";
+ } else if(record.data.collision != '0') {
+ style = " problem";
+ } else if(record.data.running) {
+ style = " running";
+ }
if(subtitle) {
return String.format(
'<div class="topic{2}"><b>{0}</b> <span class="subtitle{2}">{1}</span></div>',
@@ -360,9 +360,8 @@ Ext.extend(Ext.xxv.timerGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel
,formatDuration: function(value, p, record) {
return new Date(minTime().getTime()+(value * 1000)).dateFormat('H:i');
}
- /******************************************************************************/
- ,onToggleSuccess : function( response,options )
- {
+/******************************************************************************/
+ ,onToggleSuccess : function( response,options ) {
this.viewer.loadMask.hide();
var o = eval("("+response.responseText+")");
@@ -400,8 +399,7 @@ Ext.extend(Ext.xxv.timerGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel
}
}
- ,onToggleFailure : function( response,options )
- {
+ ,onToggleFailure : function( response,options ) {
this.viewer.loadMask.hide();
new Ext.xxv.MessageBox().msgFailure(this.szToggleFailure, response.statusText);
}
@@ -419,8 +417,8 @@ Ext.extend(Ext.xxv.timerGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel
var todo = "";
for(var i = 0, len = sel.length; i < len; i++){
if(i != 0)
- todo += ',';
- todo += sel[i].data.id;
+ todo += ',';
+ todo += sel[i].data.id;
}
Ext.Ajax.request({
scope: this
@@ -432,8 +430,7 @@ Ext.extend(Ext.xxv.timerGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel
});
}
/******************************************************************************/
- ,onDeleteSuccess : function( response,options )
- {
+ ,onDeleteSuccess : function( response,options ) {
this.viewer.loadMask.hide();
var o = eval("("+response.responseText+")");
@@ -443,7 +440,7 @@ Ext.extend(Ext.xxv.timerGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel
new Ext.xxv.MessageBox().msgSuccess(this.szDeleteSuccess, o.data);
var gsm = this.getSelectionModel();
- var sel = options.params.data.split(",");
+ var sel = options.params.data.split(",");
sel.reverse();
for(var i = 0, len = sel.length; i < len; i++){
if(gsm.isIdSelected(sel[i])) {
@@ -465,8 +462,7 @@ Ext.extend(Ext.xxv.timerGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel
}
}
- ,onDeleteFailure : function( response,options )
- {
+ ,onDeleteFailure : function( response,options ) {
this.viewer.loadMask.hide();
new Ext.xxv.MessageBox().msgFailure(this.szDeleteFailure, response.statusText);
}
@@ -484,8 +480,8 @@ Ext.extend(Ext.xxv.timerGrid, Ext.grid.GridPanel, { // Ext.grid.EditorGridPanel
var todel = "";
for(var i = 0, len = sel.length; i < len; i++){
if(i != 0)
- todel += ',';
- todel += sel[i].data.id;
+ todel += ',';
+ todel += sel[i].data.id;
}
Ext.Ajax.request({
scope: this