From b34b123312da76de0eadb36590e197b9bc78f4d2 Mon Sep 17 00:00:00 2001 From: Andreas Brachold Date: Mon, 16 Feb 2009 17:55:57 +0000 Subject: * Skins/jason: use nativ checkbox from framework --- skins/jason/autotimers.js | 12 ++++++++---- skins/jason/form.js | 31 ++++++++++++++++++++----------- 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/skins/jason/autotimers.js b/skins/jason/autotimers.js index 8c135fb..126971f 100644 --- a/skins/jason/autotimers.js +++ b/skins/jason/autotimers.js @@ -62,7 +62,7 @@ Ext.xxv.autotimerGrid = function(viewer, channels) { this.activeColumn, { header: this.szColChannels ,dataIndex: 'channels' - ,width: 150 + ,width: 150 },{ header: this.szColDirectory ,dataIndex: 'directory' @@ -222,10 +222,14 @@ Ext.extend(Ext.xxv.autotimerGrid, Ext.grid.EditorGridPanel, { this.ctxRow = null; } } - ,formatTitle: function(value, p, record) { + ,formatTitle: function(value, p, record) { + var style = ""; + if((record.data.active & 1) == 0) { + style = " deactive"; + } return String.format( - '
{0}
', - value + '
{0}
', + value, style ); } /******************************************************************************/ diff --git a/skins/jason/form.js b/skins/jason/form.js index e9262f6..c0a5fc0 100644 --- a/skins/jason/form.js +++ b/skins/jason/form.js @@ -106,13 +106,21 @@ Ext.extend(Ext.xxv.Question, Ext.Window, { config.xtype = 'hidden'; break; case 'confirm': - config.xtype = 'xxv-checkboxes'; - config.horizontal = true; + config.name = null; + config.xtype = 'fieldset'; config.hideLabel = true; - config.items = [{ - value: 'y', - boxLabel: Ext.util.Format.ellipsis(r[i].data.fieldLabel,80), - checked: r[i].data.valuedef == 'y' ? true : false + config.fieldLabel = null; + config.hideBorders = true; + config.autoHeight = true; + config.labelWidth = 1; + config.baseCls = ''; + config.style = 'border: 0px none;'; + config.items = [{ + xtype: 'checkbox' + ,labelSeparator: '' + ,boxLabel: Ext.util.Format.ellipsis(r[i].data.fieldLabel,80) + ,checked: r[i].data.valuedef == 'y' ? true : false + ,name: r[i].data.id } ]; break; @@ -263,14 +271,15 @@ Ext.extend(Ext.xxv.Question, Ext.Window, { var record = this.store.getAt(i); if(record.data.readonly == 0) { var field = this.form.getForm().findField(record.data.id); - /*switch(record.data.type){ + if(field) + switch(record.data.type){ case 'confirm': - params['__'+record.data.id] = field.getValue() ? 'y' : 'n'; + params['__'+record.data.id] = field.checked ? 'y' : 'n'; break; - default:*/ + default: params['__'+record.data.id] = field.getValue(); - /* break; - } */ + break; + } } } Ext.Ajax.request({ -- cgit v1.2.3