rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 15
136k
|
---|---|---|
Ext.Msg.alert("Diff. Analysis failed", error); | Ext.Msg.alert("Differential exp. Analysis failed", error); | var customize = function(analysisInfo) { var factors = analysisInfo.factors; var proposedAnalysis = analysisInfo.type; var canDoInteractions = (proposedAnalysis == 'TWIA') || factors.length > 2; /* * DifferentialExpressionAnalysisSetupWindow - to be refactored. */ var deasw = new Ext.Window({ modal : true, stateful : false, resizable : false, autoHeight : true, width : 300, plain : true, title : "Differential analysis settings", items : [{ xtype : 'form', autoHeight : true, items : [{ xtype : 'fieldset', title : "Select factor(s) to use", autoHeight : true, labelWidth : 200, id : 'diff-ex-analysis-customize-factors' }, { xtype : 'fieldset', labelWidth : 200, autoHeight : true, hidden : !canDoInteractions, items : [{ xtype : 'checkbox', id : 'diff-ex-analysis-customize-include-interactions-checkbox', fieldLabel : 'Include interactions if possible' }] }] }], buttons : [{ text : 'Proceed', id : 'diff-ex-customize-proceed-button', disabled : false, scope : this, handler : function(btn, text) { var includeInteractions = Ext .getCmp('diff-ex-analysis-customize-include-interactions-checkbox').getValue(); /* * Get the factors the user checked. See checkbox creation code below. */ var factorsToUseIds = []; if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } var checked = Ext.getCmp(f.id + '-factor-checkbox').getValue(); if (checked) { factorsToUseIds.push(f.id); } } } if (factorsToUseIds.length < 1) { Ext.Msg.alert("Invalid selection", "Please pick at least one factor."); return; } /* * Pass back the factors to be used, and the choice of whether interactions are to be * used. */ var callParams = []; callParams.push(id); callParams.push(factorsToUseIds); callParams.push(includeInteractions); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); deasw.relayEvents(k, ['done']); Ext.getBody().unmask(); k.on('done', function(payload) { this.fireEvent('differential', payload) }); }.createDelegate(this), errorHandler : function(error) { Ext.Msg.alert("Diff. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.runCustom.apply(this, callParams); deasw.close(); } }, { text : 'Cancel', handler : function() { deasw.close(); } }] }); deasw.doLayout(); /* * Create the checkboxes for user choice of factors. */ if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } Ext.getCmp('diff-ex-analysis-customize-factors').add(new Ext.form.Checkbox({ fieldLabel : f.name, labelWidth : 180, id : f.id + '-factor-checkbox', tooltip : f.name })); } } deasw.doLayout(); deasw.show(); }; |
tooltip : f.name | tooltip : f.name, checked : onlyOne | var customize = function(analysisInfo) { var factors = analysisInfo.factors; var proposedAnalysis = analysisInfo.type; var canDoInteractions = (proposedAnalysis == 'TWIA') || factors.length > 2; /* * DifferentialExpressionAnalysisSetupWindow - to be refactored. */ var deasw = new Ext.Window({ modal : true, stateful : false, resizable : false, autoHeight : true, width : 300, plain : true, title : "Differential analysis settings", items : [{ xtype : 'form', autoHeight : true, items : [{ xtype : 'fieldset', title : "Select factor(s) to use", autoHeight : true, labelWidth : 200, id : 'diff-ex-analysis-customize-factors' }, { xtype : 'fieldset', labelWidth : 200, autoHeight : true, hidden : !canDoInteractions, items : [{ xtype : 'checkbox', id : 'diff-ex-analysis-customize-include-interactions-checkbox', fieldLabel : 'Include interactions if possible' }] }] }], buttons : [{ text : 'Proceed', id : 'diff-ex-customize-proceed-button', disabled : false, scope : this, handler : function(btn, text) { var includeInteractions = Ext .getCmp('diff-ex-analysis-customize-include-interactions-checkbox').getValue(); /* * Get the factors the user checked. See checkbox creation code below. */ var factorsToUseIds = []; if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } var checked = Ext.getCmp(f.id + '-factor-checkbox').getValue(); if (checked) { factorsToUseIds.push(f.id); } } } if (factorsToUseIds.length < 1) { Ext.Msg.alert("Invalid selection", "Please pick at least one factor."); return; } /* * Pass back the factors to be used, and the choice of whether interactions are to be * used. */ var callParams = []; callParams.push(id); callParams.push(factorsToUseIds); callParams.push(includeInteractions); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); deasw.relayEvents(k, ['done']); Ext.getBody().unmask(); k.on('done', function(payload) { this.fireEvent('differential', payload) }); }.createDelegate(this), errorHandler : function(error) { Ext.Msg.alert("Diff. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.runCustom.apply(this, callParams); deasw.close(); } }, { text : 'Cancel', handler : function() { deasw.close(); } }] }); deasw.doLayout(); /* * Create the checkboxes for user choice of factors. */ if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } Ext.getCmp('diff-ex-analysis-customize-factors').add(new Ext.form.Checkbox({ fieldLabel : f.name, labelWidth : 180, id : f.id + '-factor-checkbox', tooltip : f.name })); } } deasw.doLayout(); deasw.show(); }; |
deasw.relayEvents(k, ['done']); | this.relayEvents(k, ['done']); | var customize = function(analysisInfo) { var factors = analysisInfo.factors; var proposedAnalysis = analysisInfo.type; var canDoInteractions = (proposedAnalysis == 'TWIA') || factors.length > 2; /* * DifferentialExpressionAnalysisSetupWindow - to be refactored. */ var deasw = new Ext.Window({ modal : true, stateful : false, resizable : false, autoHeight : true, width : 300, plain : true, title : "Differential analysis settings", items : [{ xtype : 'form', autoHeight : true, items : [{ xtype : 'fieldset', title : "Select factor(s) to use", autoHeight : true, labelWidth : 200, id : 'diff-ex-analysis-customize-factors' }, { xtype : 'fieldset', labelWidth : 200, autoHeight : true, hidden : !canDoInteractions, /* * FIXME hide this if we have more than 2 factors -- basically where * we're not going to bother supporting interactions. */ items : [{ xtype : 'checkbox', id : 'diff-ex-analysis-customize-include-interactions-checkbox', fieldLabel : 'Include interactions if possible' }] }] }], buttons : [{ text : 'Proceed', id : 'diff-ex-customize-proceed-button', disabled : false, scope : this, handler : function(btn, text) { var includeInteractions = Ext .getCmp('diff-ex-analysis-customize-include-interactions-checkbox').getValue(); /* * Get the factors the user checked. See checkbox creation code below. */ var factorsToUseIds = []; if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } var checked = Ext.getCmp(f.id + '-factor-checkbox').getValue(); if (checked) { factorsToUseIds.push(f.id); } } } if (factorsToUseIds.length < 1) { Ext.Msg.alert("Invalid selection", "Please pick at least one factor."); return; } /* * Pass back the factors to be used, and the choice of whether interactions are to be * used. */ var callParams = []; callParams.push(id); callParams.push(factorsToUseIds); callParams.push(includeInteractions); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); deasw.relayEvents(k, ['done']); Ext.getBody().unmask(); k.on('done', function(payload) { this.fireEvent('differential', payload) }); }.createDelegate(this), errorHandler : function(error) { Ext.Msg.alert("Differential exp. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.runCustom.apply(this, callParams); deasw.close(); } }, { text : 'Cancel', handler : function() { deasw.close(); } }] }); deasw.doLayout(); /* * Create the checkboxes for user choice of factors. */ if (factors) { var onlyOne = factors.length == 1; for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } Ext.getCmp('diff-ex-analysis-customize-factors').add(new Ext.form.Checkbox({ fieldLabel : f.name, labelWidth : 180, id : f.id + '-factor-checkbox', tooltip : f.name, checked : onlyOne })); } } /* * TODO: add radiobutton for subset, if there are more than one factor */ deasw.doLayout(); deasw.show(); }; |
var canDoInteractions = (proposedAnalysis == 'TWIA') || factors.length > 2; | var customize = function(analysisInfo) { var factors = analysisInfo.factors; var proposedAnalysis = analysisInfo.type; var canDoInteractions = (proposedAnalysis == 'TWIA') || factors.length > 2; /* * DifferentialExpressionAnalysisSetupWindow - to be refactored. */ var deasw = new Ext.Window({ modal : true, stateful : false, resizable : false, autoHeight : true, width : 300, plain : true, title : "Differential analysis settings", items : [{ xtype : 'form', autoHeight : true, items : [{ xtype : 'fieldset', title : "Select factor(s) to use", autoHeight : true, labelWidth : 200, id : 'diff-ex-analysis-customize-factors' }, { xtype : 'fieldset', labelWidth : 200, autoHeight : true, hidden : !canDoInteractions, /* * FIXME hide this if we have more than 2 factors -- basically where * we're not going to bother supporting interactions. */ items : [{ xtype : 'checkbox', id : 'diff-ex-analysis-customize-include-interactions-checkbox', fieldLabel : 'Include interactions if possible' }] }] }], buttons : [{ text : 'Proceed', id : 'diff-ex-customize-proceed-button', disabled : false, scope : this, handler : function(btn, text) { var includeInteractions = Ext .getCmp('diff-ex-analysis-customize-include-interactions-checkbox').getValue(); /* * Get the factors the user checked. See checkbox creation code below. */ var factorsToUseIds = []; if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } var checked = Ext.getCmp(f.id + '-factor-checkbox').getValue(); if (checked) { factorsToUseIds.push(f.id); } } } if (factorsToUseIds.length < 1) { Ext.Msg.alert("Invalid selection", "Please pick at least one factor."); return; } /* * Pass back the factors to be used, and the choice of whether interactions are to be * used. */ var callParams = []; callParams.push(id); callParams.push(factorsToUseIds); callParams.push(includeInteractions); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); m.relayEvents(k, ['done', 'fail']); Ext.getBody().unmask(); k.on('done', function(payload) { m.fireEvent('differential', payload) }); }.createDelegate(m), errorHandler : function(error) { Ext.Msg.alert("Differential exp. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.runCustom.apply(this, callParams); deasw.close(); } }, { text : 'Cancel', handler : function() { deasw.close(); } }] }); deasw.doLayout(); /* * Create the checkboxes for user choice of factors. */ if (factors) { var onlyOne = factors.length == 1; for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } Ext.getCmp('diff-ex-analysis-customize-factors').add(new Ext.form.Checkbox({ fieldLabel : f.name, labelWidth : 180, id : f.id + '-factor-checkbox', tooltip : f.name, checked : onlyOne })); } } /* * TODO: add radiobutton for subset, if there are more than one factor */ deasw.doLayout(); deasw.show(); }; |
|
* DifferentialExpressionAnalysisSetupWindow - to be refactored. | * Set up buttons for the subset form. */ var subsetRadios = []; subsetRadios.push(new Ext.form.Radio({ boxLabel : 'None', name : 'diff-ex-analyze-subset', id : 'no-factor-subset-radio', checked : true, listeners : { check : validateFactorsChosen.createDelegate(this, [factors]) } })); for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } /* * set up the subsets. */ subsetRadios.push(new Ext.form.Radio({ boxLabel : f.name, name : 'diff-ex-analyze-subset', id : f.id + '-factor-subset-radio', checked : false })); } /* * DifferentialExpressionAnalysisCustomization - only available if there is more than one factor. We should * refactor this code. | var customize = function(analysisInfo) { var factors = analysisInfo.factors; var proposedAnalysis = analysisInfo.type; var canDoInteractions = (proposedAnalysis == 'TWIA') || factors.length > 2; /* * DifferentialExpressionAnalysisSetupWindow - to be refactored. */ var deasw = new Ext.Window({ modal : true, stateful : false, resizable : false, autoHeight : true, width : 300, plain : true, title : "Differential analysis settings", items : [{ xtype : 'form', autoHeight : true, items : [{ xtype : 'fieldset', title : "Select factor(s) to use", autoHeight : true, labelWidth : 200, id : 'diff-ex-analysis-customize-factors' }, { xtype : 'fieldset', labelWidth : 200, autoHeight : true, hidden : !canDoInteractions, /* * FIXME hide this if we have more than 2 factors -- basically where * we're not going to bother supporting interactions. */ items : [{ xtype : 'checkbox', id : 'diff-ex-analysis-customize-include-interactions-checkbox', fieldLabel : 'Include interactions if possible' }] }] }], buttons : [{ text : 'Proceed', id : 'diff-ex-customize-proceed-button', disabled : false, scope : this, handler : function(btn, text) { var includeInteractions = Ext .getCmp('diff-ex-analysis-customize-include-interactions-checkbox').getValue(); /* * Get the factors the user checked. See checkbox creation code below. */ var factorsToUseIds = []; if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } var checked = Ext.getCmp(f.id + '-factor-checkbox').getValue(); if (checked) { factorsToUseIds.push(f.id); } } } if (factorsToUseIds.length < 1) { Ext.Msg.alert("Invalid selection", "Please pick at least one factor."); return; } /* * Pass back the factors to be used, and the choice of whether interactions are to be * used. */ var callParams = []; callParams.push(id); callParams.push(factorsToUseIds); callParams.push(includeInteractions); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); m.relayEvents(k, ['done', 'fail']); Ext.getBody().unmask(); k.on('done', function(payload) { m.fireEvent('differential', payload) }); }.createDelegate(m), errorHandler : function(error) { Ext.Msg.alert("Differential exp. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.runCustom.apply(this, callParams); deasw.close(); } }, { text : 'Cancel', handler : function() { deasw.close(); } }] }); deasw.doLayout(); /* * Create the checkboxes for user choice of factors. */ if (factors) { var onlyOne = factors.length == 1; for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } Ext.getCmp('diff-ex-analysis-customize-factors').add(new Ext.form.Checkbox({ fieldLabel : f.name, labelWidth : 180, id : f.id + '-factor-checkbox', tooltip : f.name, checked : onlyOne })); } } /* * TODO: add radiobutton for subset, if there are more than one factor */ deasw.doLayout(); deasw.show(); }; |
modal : true, stateful : false, resizable : false, autoHeight : true, width : 300, plain : true, title : "Differential analysis settings", items : [{ xtype : 'form', autoHeight : true, items : [{ xtype : 'fieldset', title : "Select factor(s) to use", autoHeight : true, labelWidth : 200, id : 'diff-ex-analysis-customize-factors' }, { xtype : 'fieldset', labelWidth : 200, autoHeight : true, hidden : !canDoInteractions, items : [{ xtype : 'checkbox', id : 'diff-ex-analysis-customize-include-interactions-checkbox', fieldLabel : 'Include interactions if possible' }] }] }], buttons : [{ text : 'Proceed', id : 'diff-ex-customize-proceed-button', disabled : false, scope : this, handler : function(btn, text) { var includeInteractions = Ext .getCmp('diff-ex-analysis-customize-include-interactions-checkbox').getValue(); var factorsToUseIds = []; if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } var checked = Ext.getCmp(f.id + '-factor-checkbox').getValue(); if (checked) { factorsToUseIds.push(f.id); } } } if (factorsToUseIds.length < 1) { Ext.Msg.alert("Invalid selection", "Please pick at least one factor."); return; } var callParams = []; callParams.push(id); callParams.push(factorsToUseIds); callParams.push(includeInteractions); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); m.relayEvents(k, ['done', 'fail']); Ext.getBody().unmask(); k.on('done', function(payload) { m.fireEvent('differential', payload) }); }.createDelegate(m), errorHandler : function(error) { Ext.Msg.alert("Differential exp. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.runCustom.apply(this, callParams); deasw.close(); } }, { text : 'Cancel', handler : function() { deasw.close(); } }] }); | name : 'diff-customization-window', modal : true, stateful : false, resizable : false, autoHeight : true, width : 300, plain : true, title : "Differential analysis settings", items : [{ xtype : 'form', bodyBorder : false, autoHeight : true, items : [{ xtype : 'fieldset', title : "Select factor(s) to use", autoHeight : true, labelWidth : 200, id : 'diff-ex-analysis-customize-factors' }, { xtype : 'fieldset', title : "Optional: Select a subset factor", items : [{ xtype : 'radiogroup', columns : 1, allowBlank : true, autoHeight : true, id : 'diff-ex-analysis-subset-factors', items : subsetRadios, listeners : { change : validateFactorsChosen.createDelegate(this, [factors]) } }] }, { xtype : 'fieldset', labelWidth : 200, autoHeight : true, hidden : false, items : [{ xtype : 'checkbox', id : 'diff-ex-analysis-customize-include-interactions-checkbox', fieldLabel : 'Include interactions if possible' }] }] }], buttons : [{ text : "Help", id : 'diff-ex-customize-help-button', disabled : false, scope : this, handler : function() { Ext.Msg.show({ title : 'Processed vector analysis', msg : 'Choose which factors to include in the model. If you choose only one, the analysis will be a t-test or one-way-anova. If you choose two factors, you might be able to include interactions. If you choose three or more, ' + 'interactions will not be estimated.' + 'You can also choose to analyze different parts of the data sets separately, by splitting it up according to the factors listed. The analysis is then done independently on each subset.', buttons : Ext.Msg.OK, icon : Ext.MessageBox.INFO }); } }, { text : 'Proceed', id : 'diff-ex-customize-proceed-button', disabled : false, scope : this, handler : function(btn, text) { var includeInteractions = Ext .getCmp('diff-ex-analysis-customize-include-interactions-checkbox').getValue(); var factorsToUseIds = getFactorsToUseIds(factors); var subsetFactor = getSubsetFactorId(factors); if (factorsToUseIds.length < 1) { Ext.Msg.alert("Invalid selection", "Please pick at least one factor."); return; } if (subsetFactor !== null && factorsToUseIds.indexOf(subsetFactor) >= 0) { Ext.Msg.alert("Invalid selection", "You cannot subset on a factor included in the model."); return; } var callParams = []; callParams.push(id); callParams.push(factorsToUseIds); callParams.push(includeInteractions); callParams.push(subsetFactor) Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); m.relayEvents(k, ['done', 'fail']); Ext.getBody().unmask(); k.on('done', function(payload) { m.fireEvent('differential', payload) }); }.createDelegate(m), errorHandler : function(error) { Ext.Msg.alert("Differential exp. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.runCustom.apply(this, callParams); deasw.close(); } }, { text : 'Cancel', handler : function() { deasw.close(); } }] }); | var customize = function(analysisInfo) { var factors = analysisInfo.factors; var proposedAnalysis = analysisInfo.type; var canDoInteractions = (proposedAnalysis == 'TWIA') || factors.length > 2; /* * DifferentialExpressionAnalysisSetupWindow - to be refactored. */ var deasw = new Ext.Window({ modal : true, stateful : false, resizable : false, autoHeight : true, width : 300, plain : true, title : "Differential analysis settings", items : [{ xtype : 'form', autoHeight : true, items : [{ xtype : 'fieldset', title : "Select factor(s) to use", autoHeight : true, labelWidth : 200, id : 'diff-ex-analysis-customize-factors' }, { xtype : 'fieldset', labelWidth : 200, autoHeight : true, hidden : !canDoInteractions, /* * FIXME hide this if we have more than 2 factors -- basically where * we're not going to bother supporting interactions. */ items : [{ xtype : 'checkbox', id : 'diff-ex-analysis-customize-include-interactions-checkbox', fieldLabel : 'Include interactions if possible' }] }] }], buttons : [{ text : 'Proceed', id : 'diff-ex-customize-proceed-button', disabled : false, scope : this, handler : function(btn, text) { var includeInteractions = Ext .getCmp('diff-ex-analysis-customize-include-interactions-checkbox').getValue(); /* * Get the factors the user checked. See checkbox creation code below. */ var factorsToUseIds = []; if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } var checked = Ext.getCmp(f.id + '-factor-checkbox').getValue(); if (checked) { factorsToUseIds.push(f.id); } } } if (factorsToUseIds.length < 1) { Ext.Msg.alert("Invalid selection", "Please pick at least one factor."); return; } /* * Pass back the factors to be used, and the choice of whether interactions are to be * used. */ var callParams = []; callParams.push(id); callParams.push(factorsToUseIds); callParams.push(includeInteractions); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); m.relayEvents(k, ['done', 'fail']); Ext.getBody().unmask(); k.on('done', function(payload) { m.fireEvent('differential', payload) }); }.createDelegate(m), errorHandler : function(error) { Ext.Msg.alert("Differential exp. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.runCustom.apply(this, callParams); deasw.close(); } }, { text : 'Cancel', handler : function() { deasw.close(); } }] }); deasw.doLayout(); /* * Create the checkboxes for user choice of factors. */ if (factors) { var onlyOne = factors.length == 1; for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } Ext.getCmp('diff-ex-analysis-customize-factors').add(new Ext.form.Checkbox({ fieldLabel : f.name, labelWidth : 180, id : f.id + '-factor-checkbox', tooltip : f.name, checked : onlyOne })); } } /* * TODO: add radiobutton for subset, if there are more than one factor */ deasw.doLayout(); deasw.show(); }; |
* Create the checkboxes for user choice of factors. | * Create the checkboxes for user choice of factors. We assume there is more than one. | var customize = function(analysisInfo) { var factors = analysisInfo.factors; var proposedAnalysis = analysisInfo.type; var canDoInteractions = (proposedAnalysis == 'TWIA') || factors.length > 2; /* * DifferentialExpressionAnalysisSetupWindow - to be refactored. */ var deasw = new Ext.Window({ modal : true, stateful : false, resizable : false, autoHeight : true, width : 300, plain : true, title : "Differential analysis settings", items : [{ xtype : 'form', autoHeight : true, items : [{ xtype : 'fieldset', title : "Select factor(s) to use", autoHeight : true, labelWidth : 200, id : 'diff-ex-analysis-customize-factors' }, { xtype : 'fieldset', labelWidth : 200, autoHeight : true, hidden : !canDoInteractions, /* * FIXME hide this if we have more than 2 factors -- basically where * we're not going to bother supporting interactions. */ items : [{ xtype : 'checkbox', id : 'diff-ex-analysis-customize-include-interactions-checkbox', fieldLabel : 'Include interactions if possible' }] }] }], buttons : [{ text : 'Proceed', id : 'diff-ex-customize-proceed-button', disabled : false, scope : this, handler : function(btn, text) { var includeInteractions = Ext .getCmp('diff-ex-analysis-customize-include-interactions-checkbox').getValue(); /* * Get the factors the user checked. See checkbox creation code below. */ var factorsToUseIds = []; if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } var checked = Ext.getCmp(f.id + '-factor-checkbox').getValue(); if (checked) { factorsToUseIds.push(f.id); } } } if (factorsToUseIds.length < 1) { Ext.Msg.alert("Invalid selection", "Please pick at least one factor."); return; } /* * Pass back the factors to be used, and the choice of whether interactions are to be * used. */ var callParams = []; callParams.push(id); callParams.push(factorsToUseIds); callParams.push(includeInteractions); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); m.relayEvents(k, ['done', 'fail']); Ext.getBody().unmask(); k.on('done', function(payload) { m.fireEvent('differential', payload) }); }.createDelegate(m), errorHandler : function(error) { Ext.Msg.alert("Differential exp. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.runCustom.apply(this, callParams); deasw.close(); } }, { text : 'Cancel', handler : function() { deasw.close(); } }] }); deasw.doLayout(); /* * Create the checkboxes for user choice of factors. */ if (factors) { var onlyOne = factors.length == 1; for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } Ext.getCmp('diff-ex-analysis-customize-factors').add(new Ext.form.Checkbox({ fieldLabel : f.name, labelWidth : 180, id : f.id + '-factor-checkbox', tooltip : f.name, checked : onlyOne })); } } /* * TODO: add radiobutton for subset, if there are more than one factor */ deasw.doLayout(); deasw.show(); }; |
var onlyOne = factors.length == 1; | var customize = function(analysisInfo) { var factors = analysisInfo.factors; var proposedAnalysis = analysisInfo.type; var canDoInteractions = (proposedAnalysis == 'TWIA') || factors.length > 2; /* * DifferentialExpressionAnalysisSetupWindow - to be refactored. */ var deasw = new Ext.Window({ modal : true, stateful : false, resizable : false, autoHeight : true, width : 300, plain : true, title : "Differential analysis settings", items : [{ xtype : 'form', autoHeight : true, items : [{ xtype : 'fieldset', title : "Select factor(s) to use", autoHeight : true, labelWidth : 200, id : 'diff-ex-analysis-customize-factors' }, { xtype : 'fieldset', labelWidth : 200, autoHeight : true, hidden : !canDoInteractions, /* * FIXME hide this if we have more than 2 factors -- basically where * we're not going to bother supporting interactions. */ items : [{ xtype : 'checkbox', id : 'diff-ex-analysis-customize-include-interactions-checkbox', fieldLabel : 'Include interactions if possible' }] }] }], buttons : [{ text : 'Proceed', id : 'diff-ex-customize-proceed-button', disabled : false, scope : this, handler : function(btn, text) { var includeInteractions = Ext .getCmp('diff-ex-analysis-customize-include-interactions-checkbox').getValue(); /* * Get the factors the user checked. See checkbox creation code below. */ var factorsToUseIds = []; if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } var checked = Ext.getCmp(f.id + '-factor-checkbox').getValue(); if (checked) { factorsToUseIds.push(f.id); } } } if (factorsToUseIds.length < 1) { Ext.Msg.alert("Invalid selection", "Please pick at least one factor."); return; } /* * Pass back the factors to be used, and the choice of whether interactions are to be * used. */ var callParams = []; callParams.push(id); callParams.push(factorsToUseIds); callParams.push(includeInteractions); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); m.relayEvents(k, ['done', 'fail']); Ext.getBody().unmask(); k.on('done', function(payload) { m.fireEvent('differential', payload) }); }.createDelegate(m), errorHandler : function(error) { Ext.Msg.alert("Differential exp. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.runCustom.apply(this, callParams); deasw.close(); } }, { text : 'Cancel', handler : function() { deasw.close(); } }] }); deasw.doLayout(); /* * Create the checkboxes for user choice of factors. */ if (factors) { var onlyOne = factors.length == 1; for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } Ext.getCmp('diff-ex-analysis-customize-factors').add(new Ext.form.Checkbox({ fieldLabel : f.name, labelWidth : 180, id : f.id + '-factor-checkbox', tooltip : f.name, checked : onlyOne })); } } /* * TODO: add radiobutton for subset, if there are more than one factor */ deasw.doLayout(); deasw.show(); }; |
|
checked : onlyOne | checked : false, listeners : { check : validateFactorsChosen.createDelegate(this, [factors]) } | var customize = function(analysisInfo) { var factors = analysisInfo.factors; var proposedAnalysis = analysisInfo.type; var canDoInteractions = (proposedAnalysis == 'TWIA') || factors.length > 2; /* * DifferentialExpressionAnalysisSetupWindow - to be refactored. */ var deasw = new Ext.Window({ modal : true, stateful : false, resizable : false, autoHeight : true, width : 300, plain : true, title : "Differential analysis settings", items : [{ xtype : 'form', autoHeight : true, items : [{ xtype : 'fieldset', title : "Select factor(s) to use", autoHeight : true, labelWidth : 200, id : 'diff-ex-analysis-customize-factors' }, { xtype : 'fieldset', labelWidth : 200, autoHeight : true, hidden : !canDoInteractions, /* * FIXME hide this if we have more than 2 factors -- basically where * we're not going to bother supporting interactions. */ items : [{ xtype : 'checkbox', id : 'diff-ex-analysis-customize-include-interactions-checkbox', fieldLabel : 'Include interactions if possible' }] }] }], buttons : [{ text : 'Proceed', id : 'diff-ex-customize-proceed-button', disabled : false, scope : this, handler : function(btn, text) { var includeInteractions = Ext .getCmp('diff-ex-analysis-customize-include-interactions-checkbox').getValue(); /* * Get the factors the user checked. See checkbox creation code below. */ var factorsToUseIds = []; if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } var checked = Ext.getCmp(f.id + '-factor-checkbox').getValue(); if (checked) { factorsToUseIds.push(f.id); } } } if (factorsToUseIds.length < 1) { Ext.Msg.alert("Invalid selection", "Please pick at least one factor."); return; } /* * Pass back the factors to be used, and the choice of whether interactions are to be * used. */ var callParams = []; callParams.push(id); callParams.push(factorsToUseIds); callParams.push(includeInteractions); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); m.relayEvents(k, ['done', 'fail']); Ext.getBody().unmask(); k.on('done', function(payload) { m.fireEvent('differential', payload) }); }.createDelegate(m), errorHandler : function(error) { Ext.Msg.alert("Differential exp. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.runCustom.apply(this, callParams); deasw.close(); } }, { text : 'Cancel', handler : function() { deasw.close(); } }] }); deasw.doLayout(); /* * Create the checkboxes for user choice of factors. */ if (factors) { var onlyOne = factors.length == 1; for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } Ext.getCmp('diff-ex-analysis-customize-factors').add(new Ext.form.Checkbox({ fieldLabel : f.name, labelWidth : 180, id : f.id + '-factor-checkbox', tooltip : f.name, checked : onlyOne })); } } /* * TODO: add radiobutton for subset, if there are more than one factor */ deasw.doLayout(); deasw.show(); }; |
this.relayEvents(k, ['done']); | m.relayEvents(k, ['done', 'fail']); | var customize = function(analysisInfo) { var factors = analysisInfo.factors; var proposedAnalysis = analysisInfo.type; var canDoInteractions = (proposedAnalysis == 'TWIA') || factors.length > 2; /* * DifferentialExpressionAnalysisSetupWindow - to be refactored. */ var deasw = new Ext.Window({ modal : true, stateful : false, resizable : false, autoHeight : true, width : 300, plain : true, title : "Differential analysis settings", items : [{ xtype : 'form', autoHeight : true, items : [{ xtype : 'fieldset', title : "Select factor(s) to use", autoHeight : true, labelWidth : 200, id : 'diff-ex-analysis-customize-factors' }, { xtype : 'fieldset', labelWidth : 200, autoHeight : true, hidden : !canDoInteractions, /* * FIXME hide this if we have more than 2 factors -- basically where * we're not going to bother supporting interactions. */ items : [{ xtype : 'checkbox', id : 'diff-ex-analysis-customize-include-interactions-checkbox', fieldLabel : 'Include interactions if possible' }] }] }], buttons : [{ text : 'Proceed', id : 'diff-ex-customize-proceed-button', disabled : false, scope : this, handler : function(btn, text) { var includeInteractions = Ext .getCmp('diff-ex-analysis-customize-include-interactions-checkbox').getValue(); /* * Get the factors the user checked. See checkbox creation code below. */ var factorsToUseIds = []; if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } var checked = Ext.getCmp(f.id + '-factor-checkbox').getValue(); if (checked) { factorsToUseIds.push(f.id); } } } if (factorsToUseIds.length < 1) { Ext.Msg.alert("Invalid selection", "Please pick at least one factor."); return; } /* * Pass back the factors to be used, and the choice of whether interactions are to be * used. */ var callParams = []; callParams.push(id); callParams.push(factorsToUseIds); callParams.push(includeInteractions); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); this.relayEvents(k, ['done']); Ext.getBody().unmask(); k.on('done', function(payload) { this.fireEvent('differential', payload) }); }.createDelegate(this), errorHandler : function(error) { Ext.Msg.alert("Differential exp. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.runCustom.apply(this, callParams); deasw.close(); } }, { text : 'Cancel', handler : function() { deasw.close(); } }] }); deasw.doLayout(); /* * Create the checkboxes for user choice of factors. */ if (factors) { var onlyOne = factors.length == 1; for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } Ext.getCmp('diff-ex-analysis-customize-factors').add(new Ext.form.Checkbox({ fieldLabel : f.name, labelWidth : 180, id : f.id + '-factor-checkbox', tooltip : f.name, checked : onlyOne })); } } /* * TODO: add radiobutton for subset, if there are more than one factor */ deasw.doLayout(); deasw.show(); }; |
this.fireEvent('differential', payload) | m.fireEvent('differential', payload) | var customize = function(analysisInfo) { var factors = analysisInfo.factors; var proposedAnalysis = analysisInfo.type; var canDoInteractions = (proposedAnalysis == 'TWIA') || factors.length > 2; /* * DifferentialExpressionAnalysisSetupWindow - to be refactored. */ var deasw = new Ext.Window({ modal : true, stateful : false, resizable : false, autoHeight : true, width : 300, plain : true, title : "Differential analysis settings", items : [{ xtype : 'form', autoHeight : true, items : [{ xtype : 'fieldset', title : "Select factor(s) to use", autoHeight : true, labelWidth : 200, id : 'diff-ex-analysis-customize-factors' }, { xtype : 'fieldset', labelWidth : 200, autoHeight : true, hidden : !canDoInteractions, /* * FIXME hide this if we have more than 2 factors -- basically where * we're not going to bother supporting interactions. */ items : [{ xtype : 'checkbox', id : 'diff-ex-analysis-customize-include-interactions-checkbox', fieldLabel : 'Include interactions if possible' }] }] }], buttons : [{ text : 'Proceed', id : 'diff-ex-customize-proceed-button', disabled : false, scope : this, handler : function(btn, text) { var includeInteractions = Ext .getCmp('diff-ex-analysis-customize-include-interactions-checkbox').getValue(); /* * Get the factors the user checked. See checkbox creation code below. */ var factorsToUseIds = []; if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } var checked = Ext.getCmp(f.id + '-factor-checkbox').getValue(); if (checked) { factorsToUseIds.push(f.id); } } } if (factorsToUseIds.length < 1) { Ext.Msg.alert("Invalid selection", "Please pick at least one factor."); return; } /* * Pass back the factors to be used, and the choice of whether interactions are to be * used. */ var callParams = []; callParams.push(id); callParams.push(factorsToUseIds); callParams.push(includeInteractions); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); this.relayEvents(k, ['done']); Ext.getBody().unmask(); k.on('done', function(payload) { this.fireEvent('differential', payload) }); }.createDelegate(this), errorHandler : function(error) { Ext.Msg.alert("Differential exp. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.runCustom.apply(this, callParams); deasw.close(); } }, { text : 'Cancel', handler : function() { deasw.close(); } }] }); deasw.doLayout(); /* * Create the checkboxes for user choice of factors. */ if (factors) { var onlyOne = factors.length == 1; for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } Ext.getCmp('diff-ex-analysis-customize-factors').add(new Ext.form.Checkbox({ fieldLabel : f.name, labelWidth : 180, id : f.id + '-factor-checkbox', tooltip : f.name, checked : onlyOne })); } } /* * TODO: add radiobutton for subset, if there are more than one factor */ deasw.doLayout(); deasw.show(); }; |
}.createDelegate(this), | }.createDelegate(m), | var customize = function(analysisInfo) { var factors = analysisInfo.factors; var proposedAnalysis = analysisInfo.type; var canDoInteractions = (proposedAnalysis == 'TWIA') || factors.length > 2; /* * DifferentialExpressionAnalysisSetupWindow - to be refactored. */ var deasw = new Ext.Window({ modal : true, stateful : false, resizable : false, autoHeight : true, width : 300, plain : true, title : "Differential analysis settings", items : [{ xtype : 'form', autoHeight : true, items : [{ xtype : 'fieldset', title : "Select factor(s) to use", autoHeight : true, labelWidth : 200, id : 'diff-ex-analysis-customize-factors' }, { xtype : 'fieldset', labelWidth : 200, autoHeight : true, hidden : !canDoInteractions, /* * FIXME hide this if we have more than 2 factors -- basically where * we're not going to bother supporting interactions. */ items : [{ xtype : 'checkbox', id : 'diff-ex-analysis-customize-include-interactions-checkbox', fieldLabel : 'Include interactions if possible' }] }] }], buttons : [{ text : 'Proceed', id : 'diff-ex-customize-proceed-button', disabled : false, scope : this, handler : function(btn, text) { var includeInteractions = Ext .getCmp('diff-ex-analysis-customize-include-interactions-checkbox').getValue(); /* * Get the factors the user checked. See checkbox creation code below. */ var factorsToUseIds = []; if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } var checked = Ext.getCmp(f.id + '-factor-checkbox').getValue(); if (checked) { factorsToUseIds.push(f.id); } } } if (factorsToUseIds.length < 1) { Ext.Msg.alert("Invalid selection", "Please pick at least one factor."); return; } /* * Pass back the factors to be used, and the choice of whether interactions are to be * used. */ var callParams = []; callParams.push(id); callParams.push(factorsToUseIds); callParams.push(includeInteractions); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); this.relayEvents(k, ['done']); Ext.getBody().unmask(); k.on('done', function(payload) { this.fireEvent('differential', payload) }); }.createDelegate(this), errorHandler : function(error) { Ext.Msg.alert("Differential exp. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.runCustom.apply(this, callParams); deasw.close(); } }, { text : 'Cancel', handler : function() { deasw.close(); } }] }); deasw.doLayout(); /* * Create the checkboxes for user choice of factors. */ if (factors) { var onlyOne = factors.length == 1; for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } Ext.getCmp('diff-ex-analysis-customize-factors').add(new Ext.form.Checkbox({ fieldLabel : f.name, labelWidth : 180, id : f.id + '-factor-checkbox', tooltip : f.name, checked : onlyOne })); } } /* * TODO: add radiobutton for subset, if there are more than one factor */ deasw.doLayout(); deasw.show(); }; |
Ext.Msg.alert("Please pick 1 or 2 factors."); | Ext.Msg.alert("Invalid selection", "Please pick 1 or 2 factors."); | var customize = function(analysisInfo) { var factors = analysisInfo.factors; var proposedAnalysis = analysisInfo.type; var canDoInteractions = (proposedAnalysis == 'TWIA') || factors.length > 2; /* * DifferentialExpressionAnalysisSetupWindow - to be refactored. */ var deasw = new Ext.Window({ modal : true, stateful : false, resizable : false, autoHeight : true, width : 300, plain : true, title : "Differential analysis settings", items : [{ xtype : 'form', autoHeight : true, items : [{ xtype : 'fieldset', title : "Select up to 2 factor(s) to use", autoHeight : true, labelWidth : 200, id : 'diff-ex-analysis-customize-factors' }, { xtype : 'fieldset', labelWidth : 200, autoHeight : true, hidden : !canDoInteractions, items : [{ xtype : 'checkbox', id : 'diff-ex-analysis-customize-include-interactions-checkbox', fieldLabel : 'Include interactions if possible' }] }] }], buttons : [{ text : 'Proceed', id : 'diff-ex-customize-proceed-button', disabled : false, scope : this, handler : function(btn, text) { var includeInteractions = Ext .getCmp('diff-ex-analysis-customize-include-interactions-checkbox').getValue(); /* * Get the factors the user checked. See checkbox creation code below. */ var factorsToUseIds = []; if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } var checked = Ext.getCmp(f.id + '-factor-checkbox').getValue(); if (checked) { factorsToUseIds.push(f.id); } } } if (factorsToUseIds.length < 1 || factorsToUseIds.length > 2) { Ext.Msg.alert("Please pick 1 or 2 factors."); return; } /* * Pass back the factors to be used, and the choice of whether interactions are to be * used. */ var callParams = []; callParams.push(id); callParams.push(factorsToUseIds); callParams.push(includeInteractions); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); deasw.relayEvents(k, ['done']); Ext.getBody().unmask(); k.on('done', function(payload) { this.fireEvent('differential', payload) }); }.createDelegate(this), errorHandler : function(error) { Ext.Msg.alert("Diff. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.runCustom.apply(this, callParams); deasw.close(); } }, { text : 'Cancel', handler : function() { deasw.close(); } }] }); deasw.doLayout(); /* * Create the checkboxes for user choice of factors. */ if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } Ext.getCmp('diff-ex-analysis-customize-factors').add(new Ext.form.Checkbox({ fieldLabel : f.name, labelWidth : 180, id : f.id + '-factor-checkbox', tooltip : f.name })); } } deasw.doLayout(); deasw.show(); }; |
name : "publik", type : 'boolean' }, { name : "shared", type : 'boolean' }, { | Gemma.DatasetGroupStore = function(config) { /* * Leave this here so copies of records can be constructed. */ this.record = Ext.data.Record.create([{ name : "id", type : "int" }, { name : "name", type : "string" }, { name : "description", type : "string" }, { name : "numExperiments", type : "int" }, { name : "expressionExperimentIds" }, { name : "taxonId", type : "int" }, { name : "taxonName" }, { name : "modifiable", type : 'boolean' }, { name : "currentUserHasWritePermission", type : 'boolean' }]); // todo replace with JsonReader. this.reader = new Ext.data.ListRangeReader({ id : "id" }, this.record), Gemma.DatasetGroupStore.superclass.constructor.call(this, config);}; |
|
this.data.load(uri); | if (typeof this.data.onreadystatechange == "unknown") { var wrappedCallback = new ContextFixer(this._sarissaOnLoadCallback, this); this.data.onreadystatechange = wrappedCallback.execute; this.data.load(uri); } else { var thisObject = this; YUI().use("io-base", function(Y) { Y.on('io:complete', thisObject._YUIOnLoadCallback , thisObject, []); var request = Y.io(uri); } ); } | function dbforms2_listview() { this.transport = new dbforms2_transport(); this.onChooseAction = null; this.onDeleteAction = null; this.disabled = false; // set this to the data uri this.dataURI = ''; this.init = function(resultsDOMNode) { this.results = new dbforms2_listview_results(resultsDOMNode, this); } this.loadEntries = function(arguments) { var uri = this.dataURI; if(arguments !== undefined) { if(arguments['thatid'] != undefined && arguments['thatid'] != null && arguments['thatid'] != 0) { uri = uri+'?thatid=' + escape(arguments['thatid']); } } this.data = Sarissa.getDomDocument(); var wrappedCallback = new bx_helpers_contextfixer(this._sarissaOnLoadCallback, this); this.data.onreadystatechange = wrappedCallback.execute; dbforms2_log.log('loading ' + uri + '...') this.dataLoaded = false; this.data.load(uri); } this.loadEntriesFromXML = function() { var entry = this.data.documentElement.firstChild.firstChild; this.results.removeAllEntries(); while(entry) { idNS = entry.getElementsByTagName('_id'); titleNS = entry.getElementsByTagName('_title'); title = 'Parse Error'; id = 0; if(titleNS.length > 0 && titleNS.item(0).childNodes[0]) title = titleNS.item(0).childNodes[0].data if(idNS.length > 0 && idNS.item(0).childNodes[0]) id = idNS.item(0).childNodes[0].data; this.results.addEntry(id, title); entry = entry.nextSibling; } } this.onChoose = function(entry) { this.onChooseAction(entry); } this.onDelete = function(entry) { this.onDeleteAction(entry); } this._sarissaOnLoadCallback = function() { if(this.data.readyState == 4 && !this.dataLoaded && this.data.documentElement) { this.dataLoaded = true; this.loadEntriesFromXML(); } } } |
this.loadEntriesFromXML = function() { var entry = this.data.documentElement.firstChild.firstChild; | this.loadEntriesFromXML = function(isYui) { if (!isYui) { this.data = Sarissa.fixFirefox3Permissions(this.data); } var entry = this.data.documentElement.firstChild.firstChild; | function dbforms2_listview() { this.transport = new dbforms2_transport(); this.onChooseAction = null; this.onDeleteAction = null; this.disabled = false; // set this to the data uri this.dataURI = ''; this.init = function(resultsDOMNode) { this.results = new dbforms2_listview_results(resultsDOMNode, this); } this.loadEntries = function(arguments) { var uri = this.dataURI; if(arguments !== undefined) { if(arguments['thatid'] != undefined && arguments['thatid'] != null && arguments['thatid'] != 0) { uri = uri+'?thatid=' + escape(arguments['thatid']); } } this.data = Sarissa.getDomDocument(); var wrappedCallback = new bx_helpers_contextfixer(this._sarissaOnLoadCallback, this); this.data.onreadystatechange = wrappedCallback.execute; dbforms2_log.log('loading ' + uri + '...') this.dataLoaded = false; this.data.load(uri); } this.loadEntriesFromXML = function() { var entry = this.data.documentElement.firstChild.firstChild; this.results.removeAllEntries(); while(entry) { idNS = entry.getElementsByTagName('_id'); titleNS = entry.getElementsByTagName('_title'); title = 'Parse Error'; id = 0; if(titleNS.length > 0 && titleNS.item(0).childNodes[0]) title = titleNS.item(0).childNodes[0].data if(idNS.length > 0 && idNS.item(0).childNodes[0]) id = idNS.item(0).childNodes[0].data; this.results.addEntry(id, title); entry = entry.nextSibling; } } this.onChoose = function(entry) { this.onChooseAction(entry); } this.onDelete = function(entry) { this.onDeleteAction(entry); } this._sarissaOnLoadCallback = function() { if(this.data.readyState == 4 && !this.dataLoaded && this.data.documentElement) { this.dataLoaded = true; this.loadEntriesFromXML(); } } } |
title = 'Parse Error'; | function dbforms2_listview() { this.transport = new dbforms2_transport(); this.onChooseAction = null; this.onDeleteAction = null; this.disabled = false; // set this to the data uri this.dataURI = ''; this.init = function(resultsDOMNode) { this.results = new dbforms2_listview_results(resultsDOMNode, this); } this.loadEntries = function(arguments) { var uri = this.dataURI; if(arguments !== undefined) { if(arguments['thatid'] != undefined && arguments['thatid'] != null && arguments['thatid'] != 0) { uri = uri+'?thatid=' + escape(arguments['thatid']); } } this.data = Sarissa.getDomDocument(); var wrappedCallback = new bx_helpers_contextfixer(this._sarissaOnLoadCallback, this); this.data.onreadystatechange = wrappedCallback.execute; dbforms2_log.log('loading ' + uri + '...') this.dataLoaded = false; this.data.load(uri); } this.loadEntriesFromXML = function() { var entry = this.data.documentElement.firstChild.firstChild; this.results.removeAllEntries(); while(entry) { idNS = entry.getElementsByTagName('_id'); titleNS = entry.getElementsByTagName('_title'); title = 'Parse Error'; id = 0; if(titleNS.length > 0 && titleNS.item(0).childNodes[0]) title = titleNS.item(0).childNodes[0].data if(idNS.length > 0 && idNS.item(0).childNodes[0]) id = idNS.item(0).childNodes[0].data; this.results.addEntry(id, title); entry = entry.nextSibling; } } this.onChoose = function(entry) { this.onChooseAction(entry); } this.onDelete = function(entry) { this.onDeleteAction(entry); } this._sarissaOnLoadCallback = function() { if(this.data.readyState == 4 && !this.dataLoaded && this.data.documentElement) { this.dataLoaded = true; this.loadEntriesFromXML(); } } } |
|
if(titleNS.length > 0 && titleNS.item(0).childNodes[0]) | if(idNS.length > 0 && idNS.item(0).childNodes[0]) { id = idNS.item(0).childNodes[0].data; } title = '#Empty Field# ('+ id +')'; if(titleNS.length > 0 && titleNS.item(0).childNodes[0]) { | function dbforms2_listview() { this.transport = new dbforms2_transport(); this.onChooseAction = null; this.onDeleteAction = null; this.disabled = false; // set this to the data uri this.dataURI = ''; this.init = function(resultsDOMNode) { this.results = new dbforms2_listview_results(resultsDOMNode, this); } this.loadEntries = function(arguments) { var uri = this.dataURI; if(arguments !== undefined) { if(arguments['thatid'] != undefined && arguments['thatid'] != null && arguments['thatid'] != 0) { uri = uri+'?thatid=' + escape(arguments['thatid']); } } this.data = Sarissa.getDomDocument(); var wrappedCallback = new bx_helpers_contextfixer(this._sarissaOnLoadCallback, this); this.data.onreadystatechange = wrappedCallback.execute; dbforms2_log.log('loading ' + uri + '...') this.dataLoaded = false; this.data.load(uri); } this.loadEntriesFromXML = function() { var entry = this.data.documentElement.firstChild.firstChild; this.results.removeAllEntries(); while(entry) { idNS = entry.getElementsByTagName('_id'); titleNS = entry.getElementsByTagName('_title'); title = 'Parse Error'; id = 0; if(titleNS.length > 0 && titleNS.item(0).childNodes[0]) title = titleNS.item(0).childNodes[0].data if(idNS.length > 0 && idNS.item(0).childNodes[0]) id = idNS.item(0).childNodes[0].data; this.results.addEntry(id, title); entry = entry.nextSibling; } } this.onChoose = function(entry) { this.onChooseAction(entry); } this.onDelete = function(entry) { this.onDeleteAction(entry); } this._sarissaOnLoadCallback = function() { if(this.data.readyState == 4 && !this.dataLoaded && this.data.documentElement) { this.dataLoaded = true; this.loadEntriesFromXML(); } } } |
if(idNS.length > 0 && idNS.item(0).childNodes[0]) id = idNS.item(0).childNodes[0].data; | function dbforms2_listview() { this.transport = new dbforms2_transport(); this.onChooseAction = null; this.onDeleteAction = null; this.disabled = false; // set this to the data uri this.dataURI = ''; this.init = function(resultsDOMNode) { this.results = new dbforms2_listview_results(resultsDOMNode, this); } this.loadEntries = function(arguments) { var uri = this.dataURI; if(arguments !== undefined) { if(arguments['thatid'] != undefined && arguments['thatid'] != null && arguments['thatid'] != 0) { uri = uri+'?thatid=' + escape(arguments['thatid']); } } this.data = Sarissa.getDomDocument(); var wrappedCallback = new bx_helpers_contextfixer(this._sarissaOnLoadCallback, this); this.data.onreadystatechange = wrappedCallback.execute; dbforms2_log.log('loading ' + uri + '...') this.dataLoaded = false; this.data.load(uri); } this.loadEntriesFromXML = function() { var entry = this.data.documentElement.firstChild.firstChild; this.results.removeAllEntries(); while(entry) { idNS = entry.getElementsByTagName('_id'); titleNS = entry.getElementsByTagName('_title'); title = 'Parse Error'; id = 0; if(titleNS.length > 0 && titleNS.item(0).childNodes[0]) title = titleNS.item(0).childNodes[0].data if(idNS.length > 0 && idNS.item(0).childNodes[0]) id = idNS.item(0).childNodes[0].data; this.results.addEntry(id, title); entry = entry.nextSibling; } } this.onChoose = function(entry) { this.onChooseAction(entry); } this.onDelete = function(entry) { this.onDeleteAction(entry); } this._sarissaOnLoadCallback = function() { if(this.data.readyState == 4 && !this.dataLoaded && this.data.documentElement) { this.dataLoaded = true; this.loadEntriesFromXML(); } } } |
|
this._sarissaOnLoadCallback = function() { if(this.data.readyState == 4 && !this.dataLoaded && this.data.documentElement) { this.dataLoaded = true; this.loadEntriesFromXML(); } } | function dbforms2_listview() { this.transport = new dbforms2_transport(); this.onChooseAction = null; this.onDeleteAction = null; this.disabled = false; // set this to the data uri this.dataURI = ''; this.init = function(resultsDOMNode) { this.results = new dbforms2_listview_results(resultsDOMNode, this); } this.loadEntries = function(arguments) { var uri = this.dataURI; if(arguments !== undefined) { if(arguments['thatid'] != undefined && arguments['thatid'] != null && arguments['thatid'] != 0) { uri = uri+'?thatid=' + escape(arguments['thatid']); } } this.data = Sarissa.getDomDocument(); var wrappedCallback = new bx_helpers_contextfixer(this._sarissaOnLoadCallback, this); this.data.onreadystatechange = wrappedCallback.execute; dbforms2_log.log('loading ' + uri + '...') this.dataLoaded = false; this.data.load(uri); } this.loadEntriesFromXML = function() { var entry = this.data.documentElement.firstChild.firstChild; this.results.removeAllEntries(); while(entry) { idNS = entry.getElementsByTagName('_id'); titleNS = entry.getElementsByTagName('_title'); title = 'Parse Error'; id = 0; if(titleNS.length > 0 && titleNS.item(0).childNodes[0]) title = titleNS.item(0).childNodes[0].data if(idNS.length > 0 && idNS.item(0).childNodes[0]) id = idNS.item(0).childNodes[0].data; this.results.addEntry(id, title); entry = entry.nextSibling; } } this.onChoose = function(entry) { this.onChooseAction(entry); } this.onDelete = function(entry) { this.onDeleteAction(entry); } this._sarissaOnLoadCallback = function() { if(this.data.readyState == 4 && !this.dataLoaded && this.data.documentElement) { this.dataLoaded = true; this.loadEntriesFromXML(); } } } |
|
var wrappedCallback = new ContextFixer(this._sarissaOnLoadCallback, this); this.data.onreadystatechange = wrappedCallback.execute; | var thisObject = this; | function dbforms2_transport() { this.data = null; this.dataLoaded = false; this.dataSaved = false; this.onLoadCallback = null; this.onSaveCallback = null; this.loadXML = function(dataURI) { this.data = Sarissa.getDomDocument(); var wrappedCallback = new ContextFixer(this._sarissaOnLoadCallback, this); this.data.onreadystatechange = wrappedCallback.execute; dbforms2_log.log('loading ' + dataURI + '...') this.dataLoaded = false; this.data.load(dataURI); } this.loadXMLSync = function(dataURI) { this.data = new XMLHttpRequest(); this.data.open('GET', dataURI, false); response = new dbforms2_response(); dbforms2_log.log('loading ' + dataURI + '...') try { this.data.send(''); response.responseData = this.data.responseXML; response.responseCode = 0; } catch (e) { response.responseText = 'Unable to establish a connection to the server.'; } return response; } this.saveXML = function(dataURI, xml) { this.data = new XMLHttpRequest(); var wrappedCallback = new ContextFixer(this._sarissaOnSaveCallback, this); this.data.onreadystatechange = wrappedCallback.execute; this.dataSaved = false; this.data.open('POST', dataURI); this.data.send(xml); } this.saveXMLSync = function(dataURI, xml) { this.data = new XMLHttpRequest(); this.data.open('POST', dataURI, false); response = new dbforms2_response(); try { this.data.send(xml); response.setXML(this.data.responseXML); } catch (e) { response.responseText = 'Unable to establish a connection to the server.'; } return response; } this._sarissaOnLoadCallback = function() { //dbforms2_log.log('dbforms2_loader::_sarissaOnLoadCallback'); if(this.data.readyState == 4 && !this.dataLoaded && this.data.documentElement) { dbforms2_log.log('data loaded'); this.dataLoaded = true; // call document ready callback when the document has been loaded if (this.onLoadCallback != null && typeof this.onLoadCallback == "function") this.onLoadCallback(); } } this._sarissaOnSaveCallback = function() { //dbforms2_log.log('dbforms2_loader::_sarissaOnSaveCallback'); if(this.data.readyState == 4 && !this.dataSaved) { dbforms2_log.log('data saved'); this.dataSaved = true; response = new dbforms2_response(); response.setXML(this.data.responseXML); dbforms2_log.log('response = ' + dbforms2_common.serializeToString(this.data.responseXML)); // call document ready callback when the document has been saved if (this.onSaveCallback != null && typeof this.onSaveCallback == "function") this.onSaveCallback(response); } }} |
this.data.load(dataURI); | YUI().use("io-base", function(Y) { Y.on('io:complete', thisObject._YUIOnLoadCallback , thisObject, []); var request = Y.io(dataURI); } ); | function dbforms2_transport() { this.data = null; this.dataLoaded = false; this.dataSaved = false; this.onLoadCallback = null; this.onSaveCallback = null; this.loadXML = function(dataURI) { this.data = Sarissa.getDomDocument(); var wrappedCallback = new ContextFixer(this._sarissaOnLoadCallback, this); this.data.onreadystatechange = wrappedCallback.execute; dbforms2_log.log('loading ' + dataURI + '...') this.dataLoaded = false; this.data.load(dataURI); } this.loadXMLSync = function(dataURI) { this.data = new XMLHttpRequest(); this.data.open('GET', dataURI, false); response = new dbforms2_response(); dbforms2_log.log('loading ' + dataURI + '...') try { this.data.send(''); response.responseData = this.data.responseXML; response.responseCode = 0; } catch (e) { response.responseText = 'Unable to establish a connection to the server.'; } return response; } this.saveXML = function(dataURI, xml) { this.data = new XMLHttpRequest(); var wrappedCallback = new ContextFixer(this._sarissaOnSaveCallback, this); this.data.onreadystatechange = wrappedCallback.execute; this.dataSaved = false; this.data.open('POST', dataURI); this.data.send(xml); } this.saveXMLSync = function(dataURI, xml) { this.data = new XMLHttpRequest(); this.data.open('POST', dataURI, false); response = new dbforms2_response(); try { this.data.send(xml); response.setXML(this.data.responseXML); } catch (e) { response.responseText = 'Unable to establish a connection to the server.'; } return response; } this._sarissaOnLoadCallback = function() { //dbforms2_log.log('dbforms2_loader::_sarissaOnLoadCallback'); if(this.data.readyState == 4 && !this.dataLoaded && this.data.documentElement) { dbforms2_log.log('data loaded'); this.dataLoaded = true; // call document ready callback when the document has been loaded if (this.onLoadCallback != null && typeof this.onLoadCallback == "function") this.onLoadCallback(); } } this._sarissaOnSaveCallback = function() { //dbforms2_log.log('dbforms2_loader::_sarissaOnSaveCallback'); if(this.data.readyState == 4 && !this.dataSaved) { dbforms2_log.log('data saved'); this.dataSaved = true; response = new dbforms2_response(); response.setXML(this.data.responseXML); dbforms2_log.log('response = ' + dbforms2_common.serializeToString(this.data.responseXML)); // call document ready callback when the document has been saved if (this.onSaveCallback != null && typeof this.onSaveCallback == "function") this.onSaveCallback(response); } }} |
this._sarissaOnLoadCallback = function() { if(this.data.readyState == 4 && !this.dataLoaded && this.data.documentElement) { | this._YUIOnLoadCallback = function(a,xhr,options) { if(xhr.readyState == 4 && !this.dataLoaded && xhr.responseXML && xhr.responseXML.documentElement) { | function dbforms2_transport() { this.data = null; this.dataLoaded = false; this.dataSaved = false; this.onLoadCallback = null; this.onSaveCallback = null; this.loadXML = function(dataURI) { this.data = Sarissa.getDomDocument(); var wrappedCallback = new ContextFixer(this._sarissaOnLoadCallback, this); this.data.onreadystatechange = wrappedCallback.execute; dbforms2_log.log('loading ' + dataURI + '...') this.dataLoaded = false; this.data.load(dataURI); } this.loadXMLSync = function(dataURI) { this.data = new XMLHttpRequest(); this.data.open('GET', dataURI, false); response = new dbforms2_response(); dbforms2_log.log('loading ' + dataURI + '...') try { this.data.send(''); response.responseData = this.data.responseXML; response.responseCode = 0; } catch (e) { response.responseText = 'Unable to establish a connection to the server.'; } return response; } this.saveXML = function(dataURI, xml) { this.data = new XMLHttpRequest(); var wrappedCallback = new ContextFixer(this._sarissaOnSaveCallback, this); this.data.onreadystatechange = wrappedCallback.execute; this.dataSaved = false; this.data.open('POST', dataURI); this.data.send(xml); } this.saveXMLSync = function(dataURI, xml) { this.data = new XMLHttpRequest(); this.data.open('POST', dataURI, false); response = new dbforms2_response(); try { this.data.send(xml); response.setXML(this.data.responseXML); } catch (e) { response.responseText = 'Unable to establish a connection to the server.'; } return response; } this._sarissaOnLoadCallback = function() { //dbforms2_log.log('dbforms2_loader::_sarissaOnLoadCallback'); if(this.data.readyState == 4 && !this.dataLoaded && this.data.documentElement) { dbforms2_log.log('data loaded'); this.dataLoaded = true; // call document ready callback when the document has been loaded if (this.onLoadCallback != null && typeof this.onLoadCallback == "function") this.onLoadCallback(); } } this._sarissaOnSaveCallback = function() { //dbforms2_log.log('dbforms2_loader::_sarissaOnSaveCallback'); if(this.data.readyState == 4 && !this.dataSaved) { dbforms2_log.log('data saved'); this.dataSaved = true; response = new dbforms2_response(); response.setXML(this.data.responseXML); dbforms2_log.log('response = ' + dbforms2_common.serializeToString(this.data.responseXML)); // call document ready callback when the document has been saved if (this.onSaveCallback != null && typeof this.onSaveCallback == "function") this.onSaveCallback(response); } }} |
this.data = xhr.responseXML; | function dbforms2_transport() { this.data = null; this.dataLoaded = false; this.dataSaved = false; this.onLoadCallback = null; this.onSaveCallback = null; this.loadXML = function(dataURI) { this.data = Sarissa.getDomDocument(); var wrappedCallback = new ContextFixer(this._sarissaOnLoadCallback, this); this.data.onreadystatechange = wrappedCallback.execute; dbforms2_log.log('loading ' + dataURI + '...') this.dataLoaded = false; this.data.load(dataURI); } this.loadXMLSync = function(dataURI) { this.data = new XMLHttpRequest(); this.data.open('GET', dataURI, false); response = new dbforms2_response(); dbforms2_log.log('loading ' + dataURI + '...') try { this.data.send(''); response.responseData = this.data.responseXML; response.responseCode = 0; } catch (e) { response.responseText = 'Unable to establish a connection to the server.'; } return response; } this.saveXML = function(dataURI, xml) { this.data = new XMLHttpRequest(); var wrappedCallback = new ContextFixer(this._sarissaOnSaveCallback, this); this.data.onreadystatechange = wrappedCallback.execute; this.dataSaved = false; this.data.open('POST', dataURI); this.data.send(xml); } this.saveXMLSync = function(dataURI, xml) { this.data = new XMLHttpRequest(); this.data.open('POST', dataURI, false); response = new dbforms2_response(); try { this.data.send(xml); response.setXML(this.data.responseXML); } catch (e) { response.responseText = 'Unable to establish a connection to the server.'; } return response; } this._sarissaOnLoadCallback = function() { //dbforms2_log.log('dbforms2_loader::_sarissaOnLoadCallback'); if(this.data.readyState == 4 && !this.dataLoaded && this.data.documentElement) { dbforms2_log.log('data loaded'); this.dataLoaded = true; // call document ready callback when the document has been loaded if (this.onLoadCallback != null && typeof this.onLoadCallback == "function") this.onLoadCallback(); } } this._sarissaOnSaveCallback = function() { //dbforms2_log.log('dbforms2_loader::_sarissaOnSaveCallback'); if(this.data.readyState == 4 && !this.dataSaved) { dbforms2_log.log('data saved'); this.dataSaved = true; response = new dbforms2_response(); response.setXML(this.data.responseXML); dbforms2_log.log('response = ' + dbforms2_common.serializeToString(this.data.responseXML)); // call document ready callback when the document has been saved if (this.onSaveCallback != null && typeof this.onSaveCallback == "function") this.onSaveCallback(response); } }} |
|
clearTimeout(this.activeCell.timeoutId); | deactivate: function(save) { if(this.activeCell.field !== null) { save = $defined(save) ? save : true; var newValue = {data : null, error : false}; clearTimeout(this.activeCell.timeoutId); // update the value in the model if(save && this.activeCell.field.getValue().toString() != this.activeCell.oldValue.toString()) { this.grid.model.moveTo(this.activeCell.coords.row); /* * @todo webkit shrinks the rows when the value is updated... but refreshing the grid * immidiately returns in a wrong calculating of the cell position (getCoordinates) */ switch(this.activeCell.fieldOptions.type) { case 'Select': var index = this.activeCell.field.field.selectedIndex; newValue.data = document.id(this.activeCell.field.field.options[index]).get('value'); break; case 'Textarea': newValue.data = this.activeCell.field.getValue().replace(/\n/gi, '<br />'); break; default: newValue.data = this.activeCell.field.getValue(); break; } if(save) { this.activeCell.newValue.data = newValue.data; // manually blur the field to activate the validator -> continues with this.terminate() this.activeCell.timeoutId = this.activeCell.field.field.blur.delay(50, this.activeCell.field.field); } // validation only if it should be saved! if(this.activeCell.validator != null && !this.activeCell.validator.isValid()) { newValue.error = true; this.activeCell.field.field.focus.delay(50, this.activeCell.field.field); } }else{ this.activeCell.span.show(); } if(newValue.data != null && newValue.error == false) { this.grid.model.set(this.activeCell.coords.index, newValue.data); this.addFormatterUriClickListener(); // else show error message and cell }else if(newValue.error == true) { this.activeCell.span.show(); } // update reference to activeCell if($defined(this.activeCell.coords.row) && $defined(this.activeCell.coords.index)) { this.activeCell.cell = this.grid.gridTableBody.rows[this.activeCell.coords.row].cells[this.activeCell.coords.index-1]; } if(this.options.useKeyboard) { this.activeCell.field.removeEvent('keypress', this.setKeyboard); } /** * COMMENT: this is just an idea how changing a value could be visualized * we could also pass an Fx.Tween element? * the row could probably be highlighted as well? */ if(this.options.cellChangeFx.use) { if(newValue.data != null && newValue.error == false) { this.activeCell.cell.highlight(this.options.cellChangeFx.success); }else if(newValue.error){ this.activeCell.cell.highlight(this.options.cellChangeFx.error); } //this.activeCell.cell.removeProperty('style').delay(250, this.activeCell.cell); } // check for error and keep input field alive if(newValue.error) { if(this.options.cellChangeFx.use) { this.activeCell.field.field.highlight(this.options.cellChangeFx.error); } this.activeCell.field.field.setStyle('border','1px solid '+this.options.cellChangeFx.error); this.activeCell.field.field.focus(); return false; // otherwise hide it }else{ this.keyboard.deactivate(); this.unsetActiveField(); return true; } } }, |
|
this.activeCell.timeoutId = this.activeCell.field.field.blur.delay(50, this.activeCell.field.field); | deactivate: function(save) { if(this.activeCell.field !== null) { save = $defined(save) ? save : true; var newValue = {data : null, error : false}; clearTimeout(this.activeCell.timeoutId); // update the value in the model if(save && this.activeCell.field.getValue().toString() != this.activeCell.oldValue.toString()) { this.grid.model.moveTo(this.activeCell.coords.row); /* * @todo webkit shrinks the rows when the value is updated... but refreshing the grid * immidiately returns in a wrong calculating of the cell position (getCoordinates) */ switch(this.activeCell.fieldOptions.type) { case 'Select': var index = this.activeCell.field.field.selectedIndex; newValue.data = document.id(this.activeCell.field.field.options[index]).get('value'); break; case 'Textarea': newValue.data = this.activeCell.field.getValue().replace(/\n/gi, '<br />'); break; default: newValue.data = this.activeCell.field.getValue(); break; } if(save) { this.activeCell.newValue.data = newValue.data; // manually blur the field to activate the validator -> continues with this.terminate() this.activeCell.timeoutId = this.activeCell.field.field.blur.delay(50, this.activeCell.field.field); } // validation only if it should be saved! if(this.activeCell.validator != null && !this.activeCell.validator.isValid()) { newValue.error = true; this.activeCell.field.field.focus.delay(50, this.activeCell.field.field); } }else{ this.activeCell.span.show(); } if(newValue.data != null && newValue.error == false) { this.grid.model.set(this.activeCell.coords.index, newValue.data); this.addFormatterUriClickListener(); // else show error message and cell }else if(newValue.error == true) { this.activeCell.span.show(); } // update reference to activeCell if($defined(this.activeCell.coords.row) && $defined(this.activeCell.coords.index)) { this.activeCell.cell = this.grid.gridTableBody.rows[this.activeCell.coords.row].cells[this.activeCell.coords.index-1]; } if(this.options.useKeyboard) { this.activeCell.field.removeEvent('keypress', this.setKeyboard); } /** * COMMENT: this is just an idea how changing a value could be visualized * we could also pass an Fx.Tween element? * the row could probably be highlighted as well? */ if(this.options.cellChangeFx.use) { if(newValue.data != null && newValue.error == false) { this.activeCell.cell.highlight(this.options.cellChangeFx.success); }else if(newValue.error){ this.activeCell.cell.highlight(this.options.cellChangeFx.error); } //this.activeCell.cell.removeProperty('style').delay(250, this.activeCell.cell); } // check for error and keep input field alive if(newValue.error) { if(this.options.cellChangeFx.use) { this.activeCell.field.field.highlight(this.options.cellChangeFx.error); } this.activeCell.field.field.setStyle('border','1px solid '+this.options.cellChangeFx.error); this.activeCell.field.field.focus(); return false; // otherwise hide it }else{ this.keyboard.deactivate(); this.unsetActiveField(); return true; } } }, |
|
if(newValue.data != null && newValue.error == false) { | if(save && newValue.data != null && newValue.error == false) { | deactivate: function(save) { if(this.activeCell.field !== null) { save = $defined(save) ? save : true; var newValue = {data : null, error : false}; clearTimeout(this.activeCell.timeoutId); // update the value in the model if(save && this.activeCell.field.getValue().toString() != this.activeCell.oldValue.toString()) { this.grid.model.moveTo(this.activeCell.coords.row); /* * @todo webkit shrinks the rows when the value is updated... but refreshing the grid * immidiately returns in a wrong calculating of the cell position (getCoordinates) */ switch(this.activeCell.fieldOptions.type) { case 'Select': var index = this.activeCell.field.field.selectedIndex; newValue.data = document.id(this.activeCell.field.field.options[index]).get('value'); break; case 'Textarea': newValue.data = this.activeCell.field.getValue().replace(/\n/gi, '<br />'); break; default: newValue.data = this.activeCell.field.getValue(); break; } if(save) { this.activeCell.newValue.data = newValue.data; // manually blur the field to activate the validator -> continues with this.terminate() this.activeCell.timeoutId = this.activeCell.field.field.blur.delay(50, this.activeCell.field.field); } // validation only if it should be saved! if(this.activeCell.validator != null && !this.activeCell.validator.isValid()) { newValue.error = true; this.activeCell.field.field.focus.delay(50, this.activeCell.field.field); } }else{ this.activeCell.span.show(); } if(newValue.data != null && newValue.error == false) { this.grid.model.set(this.activeCell.coords.index, newValue.data); this.addFormatterUriClickListener(); // else show error message and cell }else if(newValue.error == true) { this.activeCell.span.show(); } // update reference to activeCell if($defined(this.activeCell.coords.row) && $defined(this.activeCell.coords.index)) { this.activeCell.cell = this.grid.gridTableBody.rows[this.activeCell.coords.row].cells[this.activeCell.coords.index-1]; } if(this.options.useKeyboard) { this.activeCell.field.removeEvent('keypress', this.setKeyboard); } /** * COMMENT: this is just an idea how changing a value could be visualized * we could also pass an Fx.Tween element? * the row could probably be highlighted as well? */ if(this.options.cellChangeFx.use) { if(newValue.data != null && newValue.error == false) { this.activeCell.cell.highlight(this.options.cellChangeFx.success); }else if(newValue.error){ this.activeCell.cell.highlight(this.options.cellChangeFx.error); } //this.activeCell.cell.removeProperty('style').delay(250, this.activeCell.cell); } // check for error and keep input field alive if(newValue.error) { if(this.options.cellChangeFx.use) { this.activeCell.field.field.highlight(this.options.cellChangeFx.error); } this.activeCell.field.field.setStyle('border','1px solid '+this.options.cellChangeFx.error); this.activeCell.field.field.focus(); return false; // otherwise hide it }else{ this.keyboard.deactivate(); this.unsetActiveField(); return true; } } }, |
this.activeCell.cell = this.grid.gridTableBody.rows[this.activeCell.coords.row].cells[this.activeCell.coords.index-1]; | var colIndex = this.grid.options.row.useHeaders ? this.activeCell.coords.index-1 : this.activeCell.coords.index; this.activeCell.cell = this.grid.gridTableBody.rows[this.activeCell.coords.row].cells[colIndex]; | deactivate: function(save) { if(this.activeCell.field !== null) { save = $defined(save) ? save : true; var newValue = {data : null, error : false}; clearTimeout(this.activeCell.timeoutId); // update the value in the model if(save && this.activeCell.field.getValue().toString() != this.activeCell.oldValue.toString()) { this.grid.model.moveTo(this.activeCell.coords.row); /* * @todo webkit shrinks the rows when the value is updated... but refreshing the grid * immidiately returns in a wrong calculating of the cell position (getCoordinates) */ switch(this.activeCell.fieldOptions.type) { case 'Select': var index = this.activeCell.field.field.selectedIndex; newValue.data = document.id(this.activeCell.field.field.options[index]).get('value'); break; case 'Textarea': newValue.data = this.activeCell.field.getValue().replace(/\n/gi, '<br />'); break; default: newValue.data = this.activeCell.field.getValue(); break; } if(save) { this.activeCell.newValue.data = newValue.data; // manually blur the field to activate the validator -> continues with this.terminate() this.activeCell.timeoutId = this.activeCell.field.field.blur.delay(50, this.activeCell.field.field); } // validation only if it should be saved! if(this.activeCell.validator != null && !this.activeCell.validator.isValid()) { newValue.error = true; this.activeCell.field.field.focus.delay(50, this.activeCell.field.field); } }else{ this.activeCell.span.show(); } if(newValue.data != null && newValue.error == false) { this.grid.model.set(this.activeCell.coords.index, newValue.data); this.addFormatterUriClickListener(); // else show error message and cell }else if(newValue.error == true) { this.activeCell.span.show(); } // update reference to activeCell if($defined(this.activeCell.coords.row) && $defined(this.activeCell.coords.index)) { this.activeCell.cell = this.grid.gridTableBody.rows[this.activeCell.coords.row].cells[this.activeCell.coords.index-1]; } if(this.options.useKeyboard) { this.activeCell.field.removeEvent('keypress', this.setKeyboard); } /** * COMMENT: this is just an idea how changing a value could be visualized * we could also pass an Fx.Tween element? * the row could probably be highlighted as well? */ if(this.options.cellChangeFx.use) { if(newValue.data != null && newValue.error == false) { this.activeCell.cell.highlight(this.options.cellChangeFx.success); }else if(newValue.error){ this.activeCell.cell.highlight(this.options.cellChangeFx.error); } //this.activeCell.cell.removeProperty('style').delay(250, this.activeCell.cell); } // check for error and keep input field alive if(newValue.error) { if(this.options.cellChangeFx.use) { this.activeCell.field.field.highlight(this.options.cellChangeFx.error); } this.activeCell.field.field.setStyle('border','1px solid '+this.options.cellChangeFx.error); this.activeCell.field.field.focus(); return false; // otherwise hide it }else{ this.keyboard.deactivate(); this.unsetActiveField(); return true; } } }, |
this.createResizeHandles(); | this.createHandles(); | deactivate: function(option) { if ($defined(this.options[option])) { this.options[option] = false; } this.createResizeHandles(); }, |
this.selectedRow.removeClass('jxGridRowSelected'); this.selectedRow = null; this.selectedRowHead.removeClass('jxGridRowHeaderSelected'); this.selectedRowHead = null; | this.selected.get('rows').each(function(row){ row.removeClass('jxGridRowSelected'); },this); this.selected.set('rows',[]); this.selected.get('rowHeads').each(function(rowHead){ rowHead.removeClass('jxGridRowHeaderSelected'); },this); this.selected.set('rowHeads',[]); | deactivate: function (opt) { this.options[opt] = false; if (opt === 'cell') { this.grid.selection.selected().each(function(cell){ this.grid.selection.unselect(cell); },this); this.grid.selection.options.selectClass = this.oldSelectionClass; } else if (opt === 'row') { this.selectedRow.removeClass('jxGridRowSelected'); this.selectedRow = null; this.selectedRowHead.removeClass('jxGridRowHeaderSelected'); this.selectedRowHead = null; } else { if ($defined(this.selectedCol)) { for (var i = 0; i < this.grid.gridTable.rows.length; i++) { this.grid.gridTable.rows[i].cells[this.selectedCol].removeClass('jxGridColumnSelected'); } } this.selectedColHead.removeClass('jxGridColumnHeaderSelected'); this.selectedColHead = null; this.selectedCol = null; } }, |
if ($defined(this.selectedCol)) { | this.selected.get('columns').each(function(column){ | deactivate: function (opt) { this.options[opt] = false; if (opt === 'cell') { this.grid.selection.selected().each(function(cell){ this.grid.selection.unselect(cell); },this); this.grid.selection.options.selectClass = this.oldSelectionClass; } else if (opt === 'row') { this.selectedRow.removeClass('jxGridRowSelected'); this.selectedRow = null; this.selectedRowHead.removeClass('jxGridRowHeaderSelected'); this.selectedRowHead = null; } else { if ($defined(this.selectedCol)) { for (var i = 0; i < this.grid.gridTable.rows.length; i++) { this.grid.gridTable.rows[i].cells[this.selectedCol].removeClass('jxGridColumnSelected'); } } this.selectedColHead.removeClass('jxGridColumnHeaderSelected'); this.selectedColHead = null; this.selectedCol = null; } }, |
this.grid.gridTable.rows[i].cells[this.selectedCol].removeClass('jxGridColumnSelected'); | this.grid.gridTable.rows[i].cells[column].removeClass('jxGridColumnSelected'); | deactivate: function (opt) { this.options[opt] = false; if (opt === 'cell') { this.grid.selection.selected().each(function(cell){ this.grid.selection.unselect(cell); },this); this.grid.selection.options.selectClass = this.oldSelectionClass; } else if (opt === 'row') { this.selectedRow.removeClass('jxGridRowSelected'); this.selectedRow = null; this.selectedRowHead.removeClass('jxGridRowHeaderSelected'); this.selectedRowHead = null; } else { if ($defined(this.selectedCol)) { for (var i = 0; i < this.grid.gridTable.rows.length; i++) { this.grid.gridTable.rows[i].cells[this.selectedCol].removeClass('jxGridColumnSelected'); } } this.selectedColHead.removeClass('jxGridColumnHeaderSelected'); this.selectedColHead = null; this.selectedCol = null; } }, |
} this.selectedColHead.removeClass('jxGridColumnHeaderSelected'); this.selectedColHead = null; this.selectedCol = null; | },this); this.selected.set('columns',[]); this.selected.get('columnHeads').each(function(rowHead){ rowHead.removeClass('jxGridColumnHeaderSelected'); },this); this.selected.set('columnHeads',[]); | deactivate: function (opt) { this.options[opt] = false; if (opt === 'cell') { this.grid.selection.selected().each(function(cell){ this.grid.selection.unselect(cell); },this); this.grid.selection.options.selectClass = this.oldSelectionClass; } else if (opt === 'row') { this.selectedRow.removeClass('jxGridRowSelected'); this.selectedRow = null; this.selectedRowHead.removeClass('jxGridRowHeaderSelected'); this.selectedRowHead = null; } else { if ($defined(this.selectedCol)) { for (var i = 0; i < this.grid.gridTable.rows.length; i++) { this.grid.gridTable.rows[i].cells[this.selectedCol].removeClass('jxGridColumnSelected'); } } this.selectedColHead.removeClass('jxGridColumnHeaderSelected'); this.selectedColHead = null; this.selectedCol = null; } }, |
var gridTableRows = this.grid.gridTable.rows, | var gridTableRows = this.grid.gridTableBody.rows, | deactivate: function (opt) { var gridTableRows = this.grid.gridTable.rows, selected = this.selected, i; this.options[opt] = false; if (opt === 'cell') { selected.get('cells').each(function(cell) { cell.removeClass('jxGridCellSelected'); }); selected.set('cells',[]); } else if (opt === 'row') { selected.get('rows').each(function(row){ row.removeClass('jxGridRowSelected'); }); selected.set('rows',[]); selected.get('rowHeads').each(function(rowHead){ rowHead.removeClass('jxGridRowHeaderSelected'); }); selected.set('rowHeads',[]); } else { selected.get('columns').each(function(column){ for (i = 0; i < gridTableRows.length; i++) { gridTableRows[i].cells[column].removeClass('jxGridColumnSelected'); } }); selected.set('columns',[]); selected.get('columnHeads').each(function(rowHead){ rowHead.removeClass('jxGridColumnHeaderSelected'); },this); selected.set('columnHeads',[]); } }, |
this.activeCell.cell.highlight(this.options.cellChangeFx.success); | highlighter.start('background-color',this.options.cellChangeFx.success, currentCellBg); | deactivate: function(save) { clearTimeout(this.activeCell.timeoutId); if(this.activeCell.field !== null) { save = $defined(save) ? save : true; var newValue = {data : null, error : false}; // update the value in the model if(save && this.activeCell.field.getValue().toString() != this.activeCell.oldValue.toString()) { this.grid.model.moveTo(this.activeCell.coords.row); /* * @todo webkit shrinks the rows when the value is updated... but refreshing the grid * immidiately returns in a wrong calculating of the cell position (getCoordinates) */ switch(this.activeCell.fieldOptions.type) { case 'Select': var index = this.activeCell.field.field.selectedIndex; newValue.data = document.id(this.activeCell.field.field.options[index]).get('value'); break; case 'Textarea': newValue.data = this.activeCell.field.getValue().replace(/\n/gi, '<br />'); break; default: newValue.data = this.activeCell.field.getValue(); break; } if(save) { this.activeCell.newValue.data = newValue.data; // manually blur the field to activate the validator -> continues with this.terminate() //this.activeCell.timeoutId = this.activeCell.field.field.blur.delay(50, this.activeCell.field.field); } // validation only if it should be saved! if(this.activeCell.validator != null && !this.activeCell.validator.isValid()) { newValue.error = true; this.activeCell.field.field.focus.delay(50, this.activeCell.field.field); } }else{ this.activeCell.span.show(); } if(save && newValue.data != null && newValue.error == false) { this.grid.model.set(this.activeCell.coords.index, newValue.data); this.addFormatterUriClickListener(); // else show error message and cell }else if(newValue.error == true) { this.activeCell.span.show(); } // update reference to activeCell if($defined(this.activeCell.coords.row) && $defined(this.activeCell.coords.index)) { var colIndex = this.grid.options.row.useHeaders ? this.activeCell.coords.index-1 : this.activeCell.coords.index; this.activeCell.cell = this.grid.gridTableBody.rows[this.activeCell.coords.row].cells[colIndex]; } if(this.options.useKeyboard) { this.activeCell.field.removeEvent('keypress', this.setKeyboard); } /** * COMMENT: this is just an idea how changing a value could be visualized * we could also pass an Fx.Tween element? * the row could probably be highlighted as well? */ if(this.options.cellChangeFx.use) { if(newValue.data != null && newValue.error == false) { this.activeCell.cell.highlight(this.options.cellChangeFx.success); }else if(newValue.error){ this.activeCell.cell.highlight(this.options.cellChangeFx.error); } //this.activeCell.cell.removeProperty('style').delay(250, this.activeCell.cell); } // check for error and keep input field alive if(newValue.error) { if(this.options.cellChangeFx.use) { this.activeCell.field.field.highlight(this.options.cellChangeFx.error); } this.activeCell.field.field.setStyle('border','1px solid '+this.options.cellChangeFx.error); this.activeCell.field.field.focus(); return false; // otherwise hide it }else{ this.keyboard.deactivate(); this.unsetActiveField(); return true; } } }, |
this.activeCell.cell.highlight(this.options.cellChangeFx.error); | highlighter.start('background-color',this.options.cellChangeFx.error, currentCellBg); | deactivate: function(save) { clearTimeout(this.activeCell.timeoutId); if(this.activeCell.field !== null) { save = $defined(save) ? save : true; var newValue = {data : null, error : false}; // update the value in the model if(save && this.activeCell.field.getValue().toString() != this.activeCell.oldValue.toString()) { this.grid.model.moveTo(this.activeCell.coords.row); /* * @todo webkit shrinks the rows when the value is updated... but refreshing the grid * immidiately returns in a wrong calculating of the cell position (getCoordinates) */ switch(this.activeCell.fieldOptions.type) { case 'Select': var index = this.activeCell.field.field.selectedIndex; newValue.data = document.id(this.activeCell.field.field.options[index]).get('value'); break; case 'Textarea': newValue.data = this.activeCell.field.getValue().replace(/\n/gi, '<br />'); break; default: newValue.data = this.activeCell.field.getValue(); break; } if(save) { this.activeCell.newValue.data = newValue.data; // manually blur the field to activate the validator -> continues with this.terminate() //this.activeCell.timeoutId = this.activeCell.field.field.blur.delay(50, this.activeCell.field.field); } // validation only if it should be saved! if(this.activeCell.validator != null && !this.activeCell.validator.isValid()) { newValue.error = true; this.activeCell.field.field.focus.delay(50, this.activeCell.field.field); } }else{ this.activeCell.span.show(); } if(save && newValue.data != null && newValue.error == false) { this.grid.model.set(this.activeCell.coords.index, newValue.data); this.addFormatterUriClickListener(); // else show error message and cell }else if(newValue.error == true) { this.activeCell.span.show(); } // update reference to activeCell if($defined(this.activeCell.coords.row) && $defined(this.activeCell.coords.index)) { var colIndex = this.grid.options.row.useHeaders ? this.activeCell.coords.index-1 : this.activeCell.coords.index; this.activeCell.cell = this.grid.gridTableBody.rows[this.activeCell.coords.row].cells[colIndex]; } if(this.options.useKeyboard) { this.activeCell.field.removeEvent('keypress', this.setKeyboard); } /** * COMMENT: this is just an idea how changing a value could be visualized * we could also pass an Fx.Tween element? * the row could probably be highlighted as well? */ if(this.options.cellChangeFx.use) { if(newValue.data != null && newValue.error == false) { this.activeCell.cell.highlight(this.options.cellChangeFx.success); }else if(newValue.error){ this.activeCell.cell.highlight(this.options.cellChangeFx.error); } //this.activeCell.cell.removeProperty('style').delay(250, this.activeCell.cell); } // check for error and keep input field alive if(newValue.error) { if(this.options.cellChangeFx.use) { this.activeCell.field.field.highlight(this.options.cellChangeFx.error); } this.activeCell.field.field.setStyle('border','1px solid '+this.options.cellChangeFx.error); this.activeCell.field.field.focus(); return false; // otherwise hide it }else{ this.keyboard.deactivate(); this.unsetActiveField(); return true; } } }, |
var valueNew = {data : null, error : false}; | var newValue = {data : null, error : false}; | deactivate: function(save) { if(this.activeCell.field != null) { save = $defined(save) ? save : true; var valueNew = {data : null, error : false}; clearTimeout(this.activeCell.timeoutId); // update the value in the model if(save && this.activeCell.field.getValue().toString() != this.activeCell.oldValue.toString()) { this.grid.model.moveTo(this.activeCell.coords.row); /* * @todo webkit shrinks the rows when the value is updated... but refreshing the grid * immidiately returns in a wrong calculating of the cell position (getCoordinates) */ switch(this.activeCell.fieldOptions.type) { case 'Select': var index = this.activeCell.field.field.selectedIndex; valueNew.data = document.id(this.activeCell.field.field.options[index]).get('value'); //this.grid.model.set(this.activeCell.coords.index, document.id(this.activeCell.field.field.options[index]).get("value")); break; case 'Textarea': valueNew.data = this.activeCell.field.getValue().replace(/\n/gi, '<br />'); //this.grid.model.set(this.activeCell.coords.index, this.activeCell.field.getValue().replace(/\n/gi, '<br />')); break; default: valueNew.data = this.activeCell.field.getValue(); //this.grid.model.set(this.activeCell.coords.index, this.activeCell.field.getValue()); break; } valueNew = this.checkValue(valueNew); // save the value if(valueNew.data != null && valueNew.error == false) { this.grid.model.set(this.activeCell.coords.index, valueNew.data); this.addFormatterUriClickListener(); // else show error message }else if(valueNew.error == true) { this.activeCell.span.show(); } // update reference to activeCell this.activeCell.cell = this.grid.gridTableBody.rows[this.activeCell.coords.row].cells[this.activeCell.coords.index-1]; }else{ this.activeCell.span.show(); } if(this.options.useKeyboard) { this.activeCell.field.removeEvent('keypress', this.setKeyboard); } /** * COMMENT: this is just an idea how changing a value could be visualized * we could also pass an Fx.Tween element? * the row could probably be highlighted as well? */ if(this.options.cellChangeFx.use) { if(valueNew.data != null && valueNew.error == false) { this.activeCell.cell.highlight(this.options.cellChangeFx.success); }else if(valueNew.error){ this.activeCell.cell.highlight(this.options.cellChangeFx.error); } } // check for error and keep input field alive if(valueNew.error) { if(this.options.cellChangeFx.use) { this.activeCell.field.field.highlight(this.options.cellChangeFx.error); } this.activeCell.field.field.setStyle('border','1px solid '+this.options.cellChangeFx.error); this.activeCell.field.field.focus(); return false; // otherwise hide it }else{ this.keyboard.deactivate(); this.unsetActiveField(); return true; } } }, |
valueNew.data = document.id(this.activeCell.field.field.options[index]).get('value'); | newValue.data = document.id(this.activeCell.field.field.options[index]).get('value'); | deactivate: function(save) { if(this.activeCell.field != null) { save = $defined(save) ? save : true; var valueNew = {data : null, error : false}; clearTimeout(this.activeCell.timeoutId); // update the value in the model if(save && this.activeCell.field.getValue().toString() != this.activeCell.oldValue.toString()) { this.grid.model.moveTo(this.activeCell.coords.row); /* * @todo webkit shrinks the rows when the value is updated... but refreshing the grid * immidiately returns in a wrong calculating of the cell position (getCoordinates) */ switch(this.activeCell.fieldOptions.type) { case 'Select': var index = this.activeCell.field.field.selectedIndex; valueNew.data = document.id(this.activeCell.field.field.options[index]).get('value'); //this.grid.model.set(this.activeCell.coords.index, document.id(this.activeCell.field.field.options[index]).get("value")); break; case 'Textarea': valueNew.data = this.activeCell.field.getValue().replace(/\n/gi, '<br />'); //this.grid.model.set(this.activeCell.coords.index, this.activeCell.field.getValue().replace(/\n/gi, '<br />')); break; default: valueNew.data = this.activeCell.field.getValue(); //this.grid.model.set(this.activeCell.coords.index, this.activeCell.field.getValue()); break; } valueNew = this.checkValue(valueNew); // save the value if(valueNew.data != null && valueNew.error == false) { this.grid.model.set(this.activeCell.coords.index, valueNew.data); this.addFormatterUriClickListener(); // else show error message }else if(valueNew.error == true) { this.activeCell.span.show(); } // update reference to activeCell this.activeCell.cell = this.grid.gridTableBody.rows[this.activeCell.coords.row].cells[this.activeCell.coords.index-1]; }else{ this.activeCell.span.show(); } if(this.options.useKeyboard) { this.activeCell.field.removeEvent('keypress', this.setKeyboard); } /** * COMMENT: this is just an idea how changing a value could be visualized * we could also pass an Fx.Tween element? * the row could probably be highlighted as well? */ if(this.options.cellChangeFx.use) { if(valueNew.data != null && valueNew.error == false) { this.activeCell.cell.highlight(this.options.cellChangeFx.success); }else if(valueNew.error){ this.activeCell.cell.highlight(this.options.cellChangeFx.error); } } // check for error and keep input field alive if(valueNew.error) { if(this.options.cellChangeFx.use) { this.activeCell.field.field.highlight(this.options.cellChangeFx.error); } this.activeCell.field.field.setStyle('border','1px solid '+this.options.cellChangeFx.error); this.activeCell.field.field.focus(); return false; // otherwise hide it }else{ this.keyboard.deactivate(); this.unsetActiveField(); return true; } } }, |
valueNew.data = this.activeCell.field.getValue().replace(/\n/gi, '<br />'); | newValue.data = this.activeCell.field.getValue().replace(/\n/gi, '<br />'); | deactivate: function(save) { if(this.activeCell.field != null) { save = $defined(save) ? save : true; var valueNew = {data : null, error : false}; clearTimeout(this.activeCell.timeoutId); // update the value in the model if(save && this.activeCell.field.getValue().toString() != this.activeCell.oldValue.toString()) { this.grid.model.moveTo(this.activeCell.coords.row); /* * @todo webkit shrinks the rows when the value is updated... but refreshing the grid * immidiately returns in a wrong calculating of the cell position (getCoordinates) */ switch(this.activeCell.fieldOptions.type) { case 'Select': var index = this.activeCell.field.field.selectedIndex; valueNew.data = document.id(this.activeCell.field.field.options[index]).get('value'); //this.grid.model.set(this.activeCell.coords.index, document.id(this.activeCell.field.field.options[index]).get("value")); break; case 'Textarea': valueNew.data = this.activeCell.field.getValue().replace(/\n/gi, '<br />'); //this.grid.model.set(this.activeCell.coords.index, this.activeCell.field.getValue().replace(/\n/gi, '<br />')); break; default: valueNew.data = this.activeCell.field.getValue(); //this.grid.model.set(this.activeCell.coords.index, this.activeCell.field.getValue()); break; } valueNew = this.checkValue(valueNew); // save the value if(valueNew.data != null && valueNew.error == false) { this.grid.model.set(this.activeCell.coords.index, valueNew.data); this.addFormatterUriClickListener(); // else show error message }else if(valueNew.error == true) { this.activeCell.span.show(); } // update reference to activeCell this.activeCell.cell = this.grid.gridTableBody.rows[this.activeCell.coords.row].cells[this.activeCell.coords.index-1]; }else{ this.activeCell.span.show(); } if(this.options.useKeyboard) { this.activeCell.field.removeEvent('keypress', this.setKeyboard); } /** * COMMENT: this is just an idea how changing a value could be visualized * we could also pass an Fx.Tween element? * the row could probably be highlighted as well? */ if(this.options.cellChangeFx.use) { if(valueNew.data != null && valueNew.error == false) { this.activeCell.cell.highlight(this.options.cellChangeFx.success); }else if(valueNew.error){ this.activeCell.cell.highlight(this.options.cellChangeFx.error); } } // check for error and keep input field alive if(valueNew.error) { if(this.options.cellChangeFx.use) { this.activeCell.field.field.highlight(this.options.cellChangeFx.error); } this.activeCell.field.field.setStyle('border','1px solid '+this.options.cellChangeFx.error); this.activeCell.field.field.focus(); return false; // otherwise hide it }else{ this.keyboard.deactivate(); this.unsetActiveField(); return true; } } }, |
valueNew.data = this.activeCell.field.getValue(); | newValue.data = this.activeCell.field.getValue(); | deactivate: function(save) { if(this.activeCell.field != null) { save = $defined(save) ? save : true; var valueNew = {data : null, error : false}; clearTimeout(this.activeCell.timeoutId); // update the value in the model if(save && this.activeCell.field.getValue().toString() != this.activeCell.oldValue.toString()) { this.grid.model.moveTo(this.activeCell.coords.row); /* * @todo webkit shrinks the rows when the value is updated... but refreshing the grid * immidiately returns in a wrong calculating of the cell position (getCoordinates) */ switch(this.activeCell.fieldOptions.type) { case 'Select': var index = this.activeCell.field.field.selectedIndex; valueNew.data = document.id(this.activeCell.field.field.options[index]).get('value'); //this.grid.model.set(this.activeCell.coords.index, document.id(this.activeCell.field.field.options[index]).get("value")); break; case 'Textarea': valueNew.data = this.activeCell.field.getValue().replace(/\n/gi, '<br />'); //this.grid.model.set(this.activeCell.coords.index, this.activeCell.field.getValue().replace(/\n/gi, '<br />')); break; default: valueNew.data = this.activeCell.field.getValue(); //this.grid.model.set(this.activeCell.coords.index, this.activeCell.field.getValue()); break; } valueNew = this.checkValue(valueNew); // save the value if(valueNew.data != null && valueNew.error == false) { this.grid.model.set(this.activeCell.coords.index, valueNew.data); this.addFormatterUriClickListener(); // else show error message }else if(valueNew.error == true) { this.activeCell.span.show(); } // update reference to activeCell this.activeCell.cell = this.grid.gridTableBody.rows[this.activeCell.coords.row].cells[this.activeCell.coords.index-1]; }else{ this.activeCell.span.show(); } if(this.options.useKeyboard) { this.activeCell.field.removeEvent('keypress', this.setKeyboard); } /** * COMMENT: this is just an idea how changing a value could be visualized * we could also pass an Fx.Tween element? * the row could probably be highlighted as well? */ if(this.options.cellChangeFx.use) { if(valueNew.data != null && valueNew.error == false) { this.activeCell.cell.highlight(this.options.cellChangeFx.success); }else if(valueNew.error){ this.activeCell.cell.highlight(this.options.cellChangeFx.error); } } // check for error and keep input field alive if(valueNew.error) { if(this.options.cellChangeFx.use) { this.activeCell.field.field.highlight(this.options.cellChangeFx.error); } this.activeCell.field.field.setStyle('border','1px solid '+this.options.cellChangeFx.error); this.activeCell.field.field.focus(); return false; // otherwise hide it }else{ this.keyboard.deactivate(); this.unsetActiveField(); return true; } } }, |
valueNew = this.checkValue(valueNew); if(valueNew.data != null && valueNew.error == false) { this.grid.model.set(this.activeCell.coords.index, valueNew.data); this.addFormatterUriClickListener(); }else if(valueNew.error == true) { this.activeCell.span.show(); | if(save) { this.activeCell.newValue.data = newValue.data; this.activeCell.timeoutId = this.activeCell.field.field.blur.delay(50, this.activeCell.field.field); | deactivate: function(save) { if(this.activeCell.field != null) { save = $defined(save) ? save : true; var valueNew = {data : null, error : false}; clearTimeout(this.activeCell.timeoutId); // update the value in the model if(save && this.activeCell.field.getValue().toString() != this.activeCell.oldValue.toString()) { this.grid.model.moveTo(this.activeCell.coords.row); /* * @todo webkit shrinks the rows when the value is updated... but refreshing the grid * immidiately returns in a wrong calculating of the cell position (getCoordinates) */ switch(this.activeCell.fieldOptions.type) { case 'Select': var index = this.activeCell.field.field.selectedIndex; valueNew.data = document.id(this.activeCell.field.field.options[index]).get('value'); //this.grid.model.set(this.activeCell.coords.index, document.id(this.activeCell.field.field.options[index]).get("value")); break; case 'Textarea': valueNew.data = this.activeCell.field.getValue().replace(/\n/gi, '<br />'); //this.grid.model.set(this.activeCell.coords.index, this.activeCell.field.getValue().replace(/\n/gi, '<br />')); break; default: valueNew.data = this.activeCell.field.getValue(); //this.grid.model.set(this.activeCell.coords.index, this.activeCell.field.getValue()); break; } valueNew = this.checkValue(valueNew); // save the value if(valueNew.data != null && valueNew.error == false) { this.grid.model.set(this.activeCell.coords.index, valueNew.data); this.addFormatterUriClickListener(); // else show error message }else if(valueNew.error == true) { this.activeCell.span.show(); } // update reference to activeCell this.activeCell.cell = this.grid.gridTableBody.rows[this.activeCell.coords.row].cells[this.activeCell.coords.index-1]; }else{ this.activeCell.span.show(); } if(this.options.useKeyboard) { this.activeCell.field.removeEvent('keypress', this.setKeyboard); } /** * COMMENT: this is just an idea how changing a value could be visualized * we could also pass an Fx.Tween element? * the row could probably be highlighted as well? */ if(this.options.cellChangeFx.use) { if(valueNew.data != null && valueNew.error == false) { this.activeCell.cell.highlight(this.options.cellChangeFx.success); }else if(valueNew.error){ this.activeCell.cell.highlight(this.options.cellChangeFx.error); } } // check for error and keep input field alive if(valueNew.error) { if(this.options.cellChangeFx.use) { this.activeCell.field.field.highlight(this.options.cellChangeFx.error); } this.activeCell.field.field.setStyle('border','1px solid '+this.options.cellChangeFx.error); this.activeCell.field.field.focus(); return false; // otherwise hide it }else{ this.keyboard.deactivate(); this.unsetActiveField(); return true; } } }, |
this.activeCell.cell = this.grid.gridTableBody.rows[this.activeCell.coords.row].cells[this.activeCell.coords.index-1]; | deactivate: function(save) { if(this.activeCell.field != null) { save = $defined(save) ? save : true; var valueNew = {data : null, error : false}; clearTimeout(this.activeCell.timeoutId); // update the value in the model if(save && this.activeCell.field.getValue().toString() != this.activeCell.oldValue.toString()) { this.grid.model.moveTo(this.activeCell.coords.row); /* * @todo webkit shrinks the rows when the value is updated... but refreshing the grid * immidiately returns in a wrong calculating of the cell position (getCoordinates) */ switch(this.activeCell.fieldOptions.type) { case 'Select': var index = this.activeCell.field.field.selectedIndex; valueNew.data = document.id(this.activeCell.field.field.options[index]).get('value'); //this.grid.model.set(this.activeCell.coords.index, document.id(this.activeCell.field.field.options[index]).get("value")); break; case 'Textarea': valueNew.data = this.activeCell.field.getValue().replace(/\n/gi, '<br />'); //this.grid.model.set(this.activeCell.coords.index, this.activeCell.field.getValue().replace(/\n/gi, '<br />')); break; default: valueNew.data = this.activeCell.field.getValue(); //this.grid.model.set(this.activeCell.coords.index, this.activeCell.field.getValue()); break; } valueNew = this.checkValue(valueNew); // save the value if(valueNew.data != null && valueNew.error == false) { this.grid.model.set(this.activeCell.coords.index, valueNew.data); this.addFormatterUriClickListener(); // else show error message }else if(valueNew.error == true) { this.activeCell.span.show(); } // update reference to activeCell this.activeCell.cell = this.grid.gridTableBody.rows[this.activeCell.coords.row].cells[this.activeCell.coords.index-1]; }else{ this.activeCell.span.show(); } if(this.options.useKeyboard) { this.activeCell.field.removeEvent('keypress', this.setKeyboard); } /** * COMMENT: this is just an idea how changing a value could be visualized * we could also pass an Fx.Tween element? * the row could probably be highlighted as well? */ if(this.options.cellChangeFx.use) { if(valueNew.data != null && valueNew.error == false) { this.activeCell.cell.highlight(this.options.cellChangeFx.success); }else if(valueNew.error){ this.activeCell.cell.highlight(this.options.cellChangeFx.error); } } // check for error and keep input field alive if(valueNew.error) { if(this.options.cellChangeFx.use) { this.activeCell.field.field.highlight(this.options.cellChangeFx.error); } this.activeCell.field.field.setStyle('border','1px solid '+this.options.cellChangeFx.error); this.activeCell.field.field.focus(); return false; // otherwise hide it }else{ this.keyboard.deactivate(); this.unsetActiveField(); return true; } } }, |
|
} if(this.options.useKeyboard) { this.activeCell.field.removeEvent('keypress', this.setKeyboard); } if(this.options.cellChangeFx.use) { if(valueNew.data != null && valueNew.error == false) { this.activeCell.cell.highlight(this.options.cellChangeFx.success); }else if(valueNew.error){ this.activeCell.cell.highlight(this.options.cellChangeFx.error); } } if(valueNew.error) { if(this.options.cellChangeFx.use) { this.activeCell.field.field.highlight(this.options.cellChangeFx.error); } this.activeCell.field.field.setStyle('border','1px solid '+this.options.cellChangeFx.error); this.activeCell.field.field.focus(); return false; }else{ this.keyboard.deactivate(); | deactivate: function(save) { if(this.activeCell.field != null) { save = $defined(save) ? save : true; var valueNew = {data : null, error : false}; clearTimeout(this.activeCell.timeoutId); // update the value in the model if(save && this.activeCell.field.getValue().toString() != this.activeCell.oldValue.toString()) { this.grid.model.moveTo(this.activeCell.coords.row); /* * @todo webkit shrinks the rows when the value is updated... but refreshing the grid * immidiately returns in a wrong calculating of the cell position (getCoordinates) */ switch(this.activeCell.fieldOptions.type) { case 'Select': var index = this.activeCell.field.field.selectedIndex; valueNew.data = document.id(this.activeCell.field.field.options[index]).get('value'); //this.grid.model.set(this.activeCell.coords.index, document.id(this.activeCell.field.field.options[index]).get("value")); break; case 'Textarea': valueNew.data = this.activeCell.field.getValue().replace(/\n/gi, '<br />'); //this.grid.model.set(this.activeCell.coords.index, this.activeCell.field.getValue().replace(/\n/gi, '<br />')); break; default: valueNew.data = this.activeCell.field.getValue(); //this.grid.model.set(this.activeCell.coords.index, this.activeCell.field.getValue()); break; } valueNew = this.checkValue(valueNew); // save the value if(valueNew.data != null && valueNew.error == false) { this.grid.model.set(this.activeCell.coords.index, valueNew.data); this.addFormatterUriClickListener(); // else show error message }else if(valueNew.error == true) { this.activeCell.span.show(); } // update reference to activeCell this.activeCell.cell = this.grid.gridTableBody.rows[this.activeCell.coords.row].cells[this.activeCell.coords.index-1]; }else{ this.activeCell.span.show(); } if(this.options.useKeyboard) { this.activeCell.field.removeEvent('keypress', this.setKeyboard); } /** * COMMENT: this is just an idea how changing a value could be visualized * we could also pass an Fx.Tween element? * the row could probably be highlighted as well? */ if(this.options.cellChangeFx.use) { if(valueNew.data != null && valueNew.error == false) { this.activeCell.cell.highlight(this.options.cellChangeFx.success); }else if(valueNew.error){ this.activeCell.cell.highlight(this.options.cellChangeFx.error); } } // check for error and keep input field alive if(valueNew.error) { if(this.options.cellChangeFx.use) { this.activeCell.field.field.highlight(this.options.cellChangeFx.error); } this.activeCell.field.field.setStyle('border','1px solid '+this.options.cellChangeFx.error); this.activeCell.field.field.focus(); return false; // otherwise hide it }else{ this.keyboard.deactivate(); this.unsetActiveField(); return true; } } }, |
|
return true; | deactivate: function(save) { if(this.activeCell.field != null) { save = $defined(save) ? save : true; var valueNew = {data : null, error : false}; clearTimeout(this.activeCell.timeoutId); // update the value in the model if(save && this.activeCell.field.getValue().toString() != this.activeCell.oldValue.toString()) { this.grid.model.moveTo(this.activeCell.coords.row); /* * @todo webkit shrinks the rows when the value is updated... but refreshing the grid * immidiately returns in a wrong calculating of the cell position (getCoordinates) */ switch(this.activeCell.fieldOptions.type) { case 'Select': var index = this.activeCell.field.field.selectedIndex; valueNew.data = document.id(this.activeCell.field.field.options[index]).get('value'); //this.grid.model.set(this.activeCell.coords.index, document.id(this.activeCell.field.field.options[index]).get("value")); break; case 'Textarea': valueNew.data = this.activeCell.field.getValue().replace(/\n/gi, '<br />'); //this.grid.model.set(this.activeCell.coords.index, this.activeCell.field.getValue().replace(/\n/gi, '<br />')); break; default: valueNew.data = this.activeCell.field.getValue(); //this.grid.model.set(this.activeCell.coords.index, this.activeCell.field.getValue()); break; } valueNew = this.checkValue(valueNew); // save the value if(valueNew.data != null && valueNew.error == false) { this.grid.model.set(this.activeCell.coords.index, valueNew.data); this.addFormatterUriClickListener(); // else show error message }else if(valueNew.error == true) { this.activeCell.span.show(); } // update reference to activeCell this.activeCell.cell = this.grid.gridTableBody.rows[this.activeCell.coords.row].cells[this.activeCell.coords.index-1]; }else{ this.activeCell.span.show(); } if(this.options.useKeyboard) { this.activeCell.field.removeEvent('keypress', this.setKeyboard); } /** * COMMENT: this is just an idea how changing a value could be visualized * we could also pass an Fx.Tween element? * the row could probably be highlighted as well? */ if(this.options.cellChangeFx.use) { if(valueNew.data != null && valueNew.error == false) { this.activeCell.cell.highlight(this.options.cellChangeFx.success); }else if(valueNew.error){ this.activeCell.cell.highlight(this.options.cellChangeFx.error); } } // check for error and keep input field alive if(valueNew.error) { if(this.options.cellChangeFx.use) { this.activeCell.field.field.highlight(this.options.cellChangeFx.error); } this.activeCell.field.field.setStyle('border','1px solid '+this.options.cellChangeFx.error); this.activeCell.field.field.focus(); return false; // otherwise hide it }else{ this.keyboard.deactivate(); this.unsetActiveField(); return true; } } }, |
|
citethis.$('txtDebug').value = timestamp + ': ' + msg + '\n' + citethis.$('txtDebug').value; } else { return; } | debug: function ( msg ){ //return; var n = new Date(), timestamp = [ n.getFullYear(), n.getMonth(), n.getDate (), n.getHours(), n.getMinutes(), n.getSeconds() ].join (""); citethis.$('txtDebug').value = timestamp + ': ' + msg + '\n' + citethis.$('txtDebug').value; }, |
|
var n = new Date(), timestamp = [ n.getFullYear(), n.getMonth(), n.getDate (), n.getHours(), n.getMinutes(), n.getSeconds() ].join (""); citethis.$('txtDebug').value = timestamp + ': ' + msg + '\n' + citethis.$('txtDebug').value; | debug: function ( msg ){ //return; var n = new Date(), timestamp = [ n.getFullYear(), n.getMonth(), n.getDate (), n.getHours(), n.getMinutes(), n.getSeconds() ].join (""); citethis.$('txtDebug').value = timestamp + ': ' + msg + '\n' + citethis.$('txtDebug').value; }, |
|
return; | debug: function ( msg ){ //return; var n = new Date(), timestamp = [ n.getFullYear(), n.getMonth(), n.getDate (), n.getHours(), n.getMinutes(), n.getSeconds() ].join (""); citethis.$('txtDebug').value = timestamp + ': ' + msg + '\n' + citethis.$('txtDebug').value; }, |
|
output = Base64._utf8_decode(output); | output = info_webtoolkit_Base64._utf8_decode(output); | decode : function (input) { var output = ""; var chr1, chr2, chr3; var enc1, enc2, enc3, enc4; var i = 0; input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); while (i < input.length) { enc1 = this._keyStr.indexOf(input.charAt(i++)); enc2 = this._keyStr.indexOf(input.charAt(i++)); enc3 = this._keyStr.indexOf(input.charAt(i++)); enc4 = this._keyStr.indexOf(input.charAt(i++)); chr1 = (enc1 << 2) | (enc2 >> 4); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr3 = ((enc3 & 3) << 6) | enc4; output = output + String.fromCharCode(chr1); if (enc3 != 64) { output = output + String.fromCharCode(chr2); } if (enc4 != 64) { output = output + String.fromCharCode(chr3); } } output = Base64._utf8_decode(output); return output; }, |
if (onSuccessFn) onSuccessFn(r.getResult().Value); | if (onSuccessFn) onSuccessFn(r.Value); | decrementValue: function(key, decrementBy, onSuccessFn, onErrorFn) { this.gateway.getFromService('DecrementValue', { Key: key || null, DecrementBy: decrementBy || '0' }, function(r) { if (onSuccessFn) onSuccessFn(r.getResult().Value); }, onErrorFn || RedisClient.errorFn); }, |
this.relayEvents(k, ['done']); | this.relayEvents(k, ['done', 'fail']); | deleteExperiment : function(id) { Ext.Msg.show({ title : 'Really delete?', msg : 'Are you sure you want to delete the experiment? This cannot be undone.', buttons : Ext.Msg.YESNO, fn : function(btn, text) { if (btn == 'yes') { var callParams = []; callParams.push(id); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); this.relayEvents(k, ['done']); Ext.getBody().unmask(); k.on('done', function(payload) { this.fireEvent('deleted', payload) }); }.createDelegate(this), errorHandler : function(error) { Ext.Msg.alert("Deletion failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); ExpressionExperimentController.deleteById.apply(this, callParams); } }, scope : this, animEl : 'elId', icon : Ext.MessageBox.WARNING }); }, |
ExperimentalDesignController.deleteExperimentalFactors = function(p1, callback) { | ExperimentalDesignController.deleteExperimentalFactors = function(pO, p1, callback) { | ExperimentalDesignController.deleteExperimentalFactors = function(p1, callback) { dwr.engine._execute(ExperimentalDesignController._path, 'ExperimentalDesignController', 'deleteExperimentalFactors', p1, callback);} |
'deleteExperimentalFactors', p1, callback); | 'deleteExperimentalFactors', pO, p1, callback); | ExperimentalDesignController.deleteExperimentalFactors = function(p1, callback) { dwr.engine._execute(ExperimentalDesignController._path, 'ExperimentalDesignController', 'deleteExperimentalFactors', p1, callback);} |
SecurityController.deleteGeneGroup = function(p0, callback) { dwr.engine._execute(SecurityController._path, 'SecurityController', 'deleteGeneGroup', p0, callback); | GeneSetController.deleteGeneGroup = function(p0, callback) { dwr.engine._execute(GeneSetController._path, 'GeneSetController', 'deleteGeneGroup', p0, callback); | SecurityController.deleteGeneGroup = function(p0, callback) { dwr.engine._execute(SecurityController._path, 'SecurityController', 'deleteGeneGroup', p0, callback);} |
this.data[index] = null; | this.data.splice(index,1); | deleteRecord: function(index) { if (!$defined(index)) { index = this.index; } var record = this.data[index]; record.state = Jx.Record.DELETE; // Set to Null or slice it out and compact the array??? this.data[index] = null; if (!$defined(this.deleted)) { this.deleted = []; } this.deleted.push(record); this.fireEvent('storeRecordDeleted', [record, this]); }, |
} | }; | var deleteTagLocally = function(){ from_target[tagname].remove(); delete from_target[tagname]; } |
if (onSuccessFn) onSuccessFn(r.getResult().Item); | if (onSuccessFn) onSuccessFn(r.Item); | dequeueItemFromList: function(id, onSuccessFn, onErrorFn) { this.gateway.getFromService('DequeueItemFromList', { Id: id || null }, function(r) { if (onSuccessFn) onSuccessFn(r.getResult().Item); }, onErrorFn || RedisClient.errorFn); }, |
jq('.hidden_items').remove() | jq('.hidden_items').remove(); | deselect_all :function(){ jq('.hidden_items').remove() jq('.tabbedview_select').children('a').each(function(){ if(jq(this).attr('href').indexOf('tabbedview.select_all()') != -1){ jq(this).removeClass('selected'); } }); }, |
this.log("called destroy"); | destroy: function() { this.log("called destroy"); $.widget.prototype.destroy.apply(this, arguments); // default destroy if(this.selectIsWrapped) { //unwrap this.wrapper.before(this.selectbox); } this.selectbox.unbind("change." + widgetName); $(document).unbind("click." + widgetName, this._myDocClickHandler); //all other handlers are in these removed nodes. this.wrapper.remove(); this.listWrapper.remove(); // see ticket; http://dev.jqueryui.com/ticket/5005 // code fixes <= 1.7.2 ; expect bug will be fixed in 1.7.3 if($.ui.version <= "1.7.2") { this.element.unbind("setData." + widgetName); this.element.unbind("getData." + widgetName); // will remove all events sorry, might have other side effects but needed this.element.unbind("remove"); } }, |
|
this._moveAttrs(this.input, this.selectbox, this.options.moveAttrs); | destroy: function() { // this.log("called destroy"); if(this.selectIsWrapped) { //unwrap this.wrapper.before(this.selectbox); } this.labels.attr("for", this.selectbox.attr("id")); //revert label 'for' attributes. this.labels = null; this.selectbox.unbind("change." + widgetName); $(document).unbind("click." + widgetName, this._myDocClickHandler); if(this._myPollId) clearInterval(this._myPollId ); //all other handlers are in these removed nodes. this.wrapper.remove(); this.listWrapper.remove(); if($.ui.version < "1.8") { // see ticket; http://dev.jqueryui.com/ticket/5005 - wasn't fixed 1.7.3 this.selectbox.unbind("setData." + widgetName); this.selectbox.unbind("getData." + widgetName); // will remove all events sorry, might have other side effects but needed this.selectbox.unbind("remove"); $.widget.prototype.destroy.apply(this, arguments); // default destroy } else { // 1.8+ $.Widget.prototype.destroy.apply(this, arguments); // default destroy } this.selectbox = null; }, |
|
if (Jx.Styles.isStyleSheetDefined(this.styleSheet)) { Jx.Styles.removeStyleSheet(this.styleSheet); } | destroyGrid : function () { var n = this.colTableBody.cloneNode(false); this.colTable.replaceChild(n, this.colTableBody); this.colTableBody = n; n = this.rowTableHead.cloneNode(false); this.rowTable.replaceChild(n, this.rowTableHead); this.rowTableHead = n; n = this.gridTableBody.cloneNode(false); this.gridTable.replaceChild(n, this.gridTableBody); this.gridTableBody = n; }, |
|
this.store.removeEvent('storeDataLoaded', this.fill); | detach: function () { }, |
|
this.grid.removeEvent('doneCreateGrid', this.bound.createResizeHandles); this.grid.removeEvent('beginCreateGrid', this.bound.removeResizeHandles); | this.grid.removeEvent('doneCreateGrid', this.createHandles); this.grid.removeEvent('beginCreateGrid', this.removeHandles); | detach: function() { if (this.grid) { this.grid.removeEvent('doneCreateGrid', this.bound.createResizeHandles); this.grid.removeEvent('beginCreateGrid', this.bound.removeResizeHandles); } this.grid = null; }, |
}, | } | detach: function () { this.parent(); }, |
} | }, | detach: function(obj){ obj.deregisterPlugin(this); } |
this.grid.removeEvent('gridCellSelect', this.bound.select); | this.grid.removeEvent('gridCellSelect', this.select); | detach: function() { if (this.grid) { this.grid.removeEvent('gridCellSelect', this.bound.select); if (this.options.cell) { this.grid.selection.options.selectedClass = this.oldSelectionClass; } } this.grid = null; }, |
if (this.options.useCheckColumn) { var col = this.grid.columns.getByName('selection'); this.grid.columns.columns.erase(col); if (this.options.checkAsHeader) { this.grid.row.options.headerColumn = this.oldHeaderColumn; } } | detach: function() { if (this.grid) { this.grid.removeEvent('gridCellSelect', this.bound.select); if (this.options.cell) { this.grid.selection.options.selectedClass = this.oldSelectionClass; } } this.grid = null; }, |
|
var runurl = '<a href="#" onClick="return Ext.getCmp(\'eemanager\').doDifferential(' + | var runurl = '<span style="cursor:pointer" onClick="return Ext.getCmp(\'eemanager\').doDifferential(' + | differentialAnalysisRenderer : function(ee) { var id = ee.id; var runurl = '<a href="#" onClick="return Ext.getCmp(\'eemanager\').doDifferential(' + id + ')"><img src="/Gemma/images/icons/control_play_blue.png" alt="differential expression analysis" title="differential expression analysis"/></a>'; if (ee.numPopulatedFactors > 0) { if (ee.dateDifferentialAnalysis) { var type = ee.differentialAnalysisEventType; var color = "#000"; var suggestRun = true; var qtip = 'ext:qtip="OK"'; if (type == 'FailedDifferentialExpressionAnalysisEventImpl') { // note: // no // such // thing. color = 'red'; qtip = 'ext:qtip="Failed"'; } return '<span style="color:' + color + ';" ' + qtip + '>' + Ext.util.Format.date(ee.dateDifferentialAnalysis, 'y/M/d') + ' ' + (suggestRun ? runurl : ''); } else { return '<span style="color:#3A3;">Needed</span> ' + runurl; } } else { return '<span style="color:#CCF;">NA</span>'; } }, |
')"><img src="/Gemma/images/icons/control_play_blue.png" alt="differential expression analysis" title="differential expression analysis"/></a>'; | ')"><img src="/Gemma/images/icons/control_play_blue.png" alt="differential expression analysis" title="differential expression analysis"/></span>'; | differentialAnalysisRenderer : function(ee) { var id = ee.id; var runurl = '<a href="#" onClick="return Ext.getCmp(\'eemanager\').doDifferential(' + id + ')"><img src="/Gemma/images/icons/control_play_blue.png" alt="differential expression analysis" title="differential expression analysis"/></a>'; if (ee.numPopulatedFactors > 0) { if (ee.dateDifferentialAnalysis) { var type = ee.differentialAnalysisEventType; var color = "#000"; var suggestRun = true; var qtip = 'ext:qtip="OK"'; if (type == 'FailedDifferentialExpressionAnalysisEventImpl') { // note: // no // such // thing. color = 'red'; qtip = 'ext:qtip="Failed"'; } return '<span style="color:' + color + ';" ' + qtip + '>' + Ext.util.Format.date(ee.dateDifferentialAnalysis, 'y/M/d') + ' ' + (suggestRun ? runurl : ''); } else { return '<span style="color:#3A3;">Needed</span> ' + runurl; } } else { return '<span style="color:#CCF;">NA</span>'; } }, |
var runurl = '<a href="#" onClick="return Ext.getCmp(\'eemanager\').doDifferential(' + id + ')"><img src="/Gemma/images/icons/control_play_blue.png" alt="differential expression analysis" ext:qtip="Run differential expression analysis"/></a>'; | var runurl = ""; if (record.get("currentUserHasWritePermission")) { runurl = '<a href="#" onClick="return Ext.getCmp(\'eemanager\').doDifferential(' + id + ')"><img src="/Gemma/images/icons/control_play_blue.png" alt="differential expression analysis" ext:qtip="Run differential expression analysis"/></a>'; } | var differentialAnalysisRenderer = function(value, metadata, record, rowIndex, colIndex, store) { var id = record.get('id'); var runurl = '<a href="#" onClick="return Ext.getCmp(\'eemanager\').doDifferential(' + id + ')"><img src="/Gemma/images/icons/control_play_blue.png" alt="differential expression analysis" ext:qtip="Run differential expression analysis"/></a>'; if (diffIsPossible(record)) { if (record.get('dateDifferentialAnalysis')) { var type = record.get('differentialAnalysisEventType'); var color = "#000"; var suggestRun = true; var qtip = 'ext:qtip="OK"'; if (type == 'FailedDifferentialExpressionAnalysisEventImpl') { // note: // no // such // thing. color = 'red'; qtip = 'ext:qtip="Failed"'; } return '<span style="color:' + color + ';" ' + qtip + '>' + Ext.util.Format.date(value, 'y/M/d') + ' ' + (suggestRun ? runurl : ''); } else { return '<span style="color:#3A3;">Needed</span> ' + runurl; } } else { return '<span style="color:#CCF;" ext:qtip="You must create at least one experimental factor to enable this analysis.">NA</span>'; } }; |
return record.get("numPopulatedFactors") > 0; | return record.get("numPopulatedFactors") > 0 && record.get("currentUserHasWritePermission"); | var diffIsPossible = function(record) { return record.get("numPopulatedFactors") > 0; }; |
setTimeout(function(){$('#bsignin').click()},1000); | setTimeout(function(){$('#bsignin').click();},1000); | var direct = function() { var $li = $(this); $('#openid_form .providers li').removeClass('highlight'); $li.addClass('highlight'); $usrfs.fadeOut('slow'); $localfs.fadeOut('slow'); $idfs.fadeOut('slow'); $id.val($this.find("li.highlight span").text()); setTimeout(function(){$('#bsignin').click()},1000); return false; }; |
this.log("disable"); | disable: function() { this.log("disable"); this.hideList(); this.isDisabled = true; this.button.addClass(this.css.buttonDisabled); this.input.addClass(this.css.inputDisabled); this.input.attr("disabled", "disabled"); }, |
|
this.selectbox.attr("disabled", "disabled"); | disable: function() { // this.log("disable"); this.hideList(); this.isDisabled = true; this.button.addClass(this.css.buttonDisabled); this.input.addClass(this.css.inputDisabled); this.input.attr("disabled", "disabled"); }, |
|
disable : function(close) { | disable : function(close, save) { | disable : function(close) { close = $defined(close) ? close : true; if(close && this.activeCell.cell != null) { this.deactivate(false); } this.options.enabled = false; }, |
this.deactivate(false); | this.deactivate(save); | disable : function(close) { close = $defined(close) ? close : true; if(close && this.activeCell.cell != null) { this.deactivate(false); } this.options.enabled = false; }, |
} | }, | disableStyleSheet: function (name) { this.getDynamicStyleSheet(name).disabled = true; } |
runHook("disp", FBEFORE); | runHook("disp", FBEFORE, statustext); | function disp(statustext) { runHook("disp", FBEFORE); if (o3_allowmove == 0) { runHook("placeLayer", FREPLACE); (olNs6&&olShowId<0) ? olShowId=setTimeout("runHook('showObject', FREPLACE, over)", 1) : runHook("showObject", FREPLACE, over); o3_allowmove = (o3_sticky || o3_followmouse==0) ? 0 : 1; } runHook("disp", FAFTER); if (statustext != "") self.status = statustext;} |
runHook("disp", FAFTER); | runHook("disp", FAFTER, statustext); | function disp(statustext) { runHook("disp", FBEFORE); if (o3_allowmove == 0) { runHook("placeLayer", FREPLACE); (olNs6&&olShowId<0) ? olShowId=setTimeout("runHook('showObject', FREPLACE, over)", 1) : runHook("showObject", FREPLACE, over); o3_allowmove = (o3_sticky || o3_followmouse==0) ? 0 : 1; } runHook("disp", FAFTER); if (statustext != "") self.status = statustext;} |
setVisibility('search',false); | function displayAlbum() { setVisibility('gallery',false); setVisibility('album',true);} |
|
setVisibility('search',false); | function displayGallery() { setVisibility('gallery',true); setVisibility('album',false);} |
|
Ext.ux.Lightbox.openUrl({'href': url, 'title': headerText}, 600, 400); | height = TYPO3.configuration.feeditadvanced.editWindow.height ? TYPO3.configuration.feeditadvanced.editWindow.height : 600; width = TYPO3.configuration.feeditadvanced.editWindow.width ? TYPO3.configuration.feeditadvanced.editWindow.width : 800; Ext.ux.Lightbox.openUrl({'href': url, 'title': headerText}, width, height); | displayIframe: function(headerText, url) { Ext.ux.Lightbox.openUrl({'href': url, 'title': headerText}, 600, 400); }, |
height = TYPO3.configuration.feeditadvanced.editWindow.height ? TYPO3.configuration.feeditadvanced.editWindow.height : 600; width = TYPO3.configuration.feeditadvanced.editWindow.width ? TYPO3.configuration.feeditadvanced.editWindow.width : 800; | height = TYPO3.configuration.feeditadvanced.editWindow.height ? parseInt(TYPO3.configuration.feeditadvanced.editWindow.height) : 600; width = TYPO3.configuration.feeditadvanced.editWindow.width ? parseInt(TYPO3.configuration.feeditadvanced.editWindow.width) : 800; | displayIframe: function(headerText, url) { height = TYPO3.configuration.feeditadvanced.editWindow.height ? TYPO3.configuration.feeditadvanced.editWindow.height : 600; width = TYPO3.configuration.feeditadvanced.editWindow.width ? TYPO3.configuration.feeditadvanced.editWindow.width : 800; Ext.ux.Lightbox.openUrl({'href': url, 'title': headerText}, width, height); }, |
if(response!=null&&response.user.userId!="null"){ | if(response!=null&&response.user.userId!="null"&&response.user.userId!="UnRegisteredUser"){ | function displayLoginLinks (response) { if(response!=null&&response.user.userId!="null"){ var displayName = response.user.userInfo.displayName; document.getElementById("loginLinks").innerHTML="Welcome <b>"+displayName+"</b> : <span><a href=\"./admin/upload.html\"><u>Admin page</u></a></span> <span><a href=\"./logout/\"><u>Logout</u></a></span>" ; } else { document.getElementById("loginLinks").innerHTML="<span><a href=\"./admin/authenticate\"><u>Super admin</u></a></span> <span><a href=\"./home/authenticate\"><u>Login</u></a></span>"; } } |
if(response!=null&&response.user.userId!="null"&&response.user.userId!="UnRegisteredUser"){ | if(response!=null&&response.user.userId!="null"&&response.user.userId!="Guest"){ | function displayLoginLinks (response) { if(response!=null&&response.user.userId!="null"&&response.user.userId!="UnRegisteredUser"){ var displayName = response.user.userInfo.displayName; document.getElementById("loginLinks").innerHTML="Welcome <b>"+displayName+"</b> : <span><a href=\"./admin/upload.html\"><u>Admin page</u></a></span> <span><a href=\"./logout/\"><u>Logout</u></a></span>" ; } else { document.getElementById("loginLinks").innerHTML="<span><a href=\"./admin/authenticate\"><u>Super admin</u></a></span> <span><a href=\"./home/authenticate\"><u>Login</u></a></span>"; }} |
tr.append($(this).addClass('pagination-data')); | tr.append($(this).clone().addClass('pagination-data')); | function displayPage(data) { target.empty(); navbar(target, Number($('tr:first > td:first', data).text())); var table = $('<table class="pagination"></table>'); target.append(table); $('> tr', data).each(function (i) { var current = $('> td:first', this).text(); var tr = $('<tr></tr>'); var td = $('<td class="pagination-n"></td>'); td.text(current + "."); tr.append(td); $('> td:gt(0)', this).each(function () { tr.append($(this).addClass('pagination-data')); }); table.append(tr); $('.pagination-toggle', tr).click(function (ev) { ev.preventDefault(); options.itemsPerPage = 1; retrievePage(current); }); options.itemCallback.call(target, current, tr); }); options.readyCallback.call(target, options); } |
verReplot(); | function displayVersions() { //Fill in metric selectors $.each(state.metrics['PROJECT_VERSION'], function(i, obj){ $("<option/>").attr("value", obj.metric.id).text(obj.metric.mnemonic + " | " + obj.metric.description).appendTo("#verplot2metr"); $("<option/>").attr("value", obj.metric.id).text(obj.metric.mnemonic + " | " + obj.metric.description).appendTo("#verplot1metr"); }); //Setup triggers for metric selectors $("#verplot1metr").change(loadVerPlot1); $("#verplot2metr").change(loadVerPlot2); //Trigger metric a metric selection, to start metric results download verReplot(); //Setup version slider $("#versionrange").slider({ range: true, min: state.verFirst.version.revisionId, max: state.verLatest.version.revisionId, values: [0, state.verLatest.version.revisionId], slide: function(event, ui) { $("#versionlbl").val(ui.values[0] + '-' + ui.values[1]); verReplot(); } }); $("#versionlbl").val($("#versionrange").slider("values", 0) + ' - ' + $("#versionrange").slider("values", 1)); //Setup the sample size label $("#samplesize").slider({ min: 0, max: 50, values: [32], slide: function(event, ui) { $("#smpllbl").val(ui.values[0]); verReplot(); } }); $("#smpllbl").val($("#samplesize").slider("values", 0)); //Show the version pane if ($("#versionpane").is(":visible") == false) $("#versionpane").show('clip', null, 500);} |
|
slide: function(event, ui) { | stop: function(event, ui) { | function displayVersions() { //Fill in metric selectors $.each(state.metrics['PROJECT_VERSION'], function(i, obj){ $("<option/>").attr("value", obj.metric.id).text(obj.metric.mnemonic + " | " + obj.metric.description).appendTo("#verplot2metr"); $("<option/>").attr("value", obj.metric.id).text(obj.metric.mnemonic + " | " + obj.metric.description).appendTo("#verplot1metr"); }); //Setup triggers for metric selectors $("#verplot1metr").change(loadVerPlot1); $("#verplot2metr").change(loadVerPlot2); //Trigger metric a metric selection, to start metric results download verReplot(); //Setup version slider $("#versionrange").slider({ range: true, min: state.verFirst.version.revisionId, max: state.verLatest.version.revisionId, values: [0, state.verLatest.version.revisionId], slide: function(event, ui) { $("#versionlbl").val(ui.values[0] + '-' + ui.values[1]); verReplot(); } }); $("#versionlbl").val($("#versionrange").slider("values", 0) + ' - ' + $("#versionrange").slider("values", 1)); //Setup the sample size label $("#samplesize").slider({ min: 0, max: 50, values: [32], slide: function(event, ui) { $("#smpllbl").val(ui.values[0]); verReplot(); } }); $("#smpllbl").val($("#samplesize").slider("values", 0)); //Show the version pane if ($("#versionpane").is(":visible") == false) $("#versionpane").show('clip', null, 500);} |
values: [32], slide: function(event, ui) { | values: [25], stop: function(event, ui) { | function displayVersions() { //Fill in metric selectors $.each(state.metrics['PROJECT_VERSION'], function(i, obj){ $("<option/>").attr("value", obj.metric.id).text(obj.metric.mnemonic + " | " + obj.metric.description).appendTo("#verplot2metr"); $("<option/>").attr("value", obj.metric.id).text(obj.metric.mnemonic + " | " + obj.metric.description).appendTo("#verplot1metr"); }); //Setup triggers for metric selectors $("#verplot1metr").change(loadVerPlot1); $("#verplot2metr").change(loadVerPlot2); //Trigger metric a metric selection, to start metric results download verReplot(); //Setup version slider $("#versionrange").slider({ range: true, min: state.verFirst.version.revisionId, max: state.verLatest.version.revisionId, values: [0, state.verLatest.version.revisionId], slide: function(event, ui) { $("#versionlbl").val(ui.values[0] + '-' + ui.values[1]); verReplot(); } }); $("#versionlbl").val($("#versionrange").slider("values", 0) + ' - ' + $("#versionrange").slider("values", 1)); //Setup the sample size label $("#samplesize").slider({ min: 0, max: 50, values: [32], slide: function(event, ui) { $("#smpllbl").val(ui.values[0]); verReplot(); } }); $("#smpllbl").val($("#samplesize").slider("values", 0)); //Show the version pane if ($("#versionpane").is(":visible") == false) $("#versionpane").show('clip', null, 500);} |
if (a.cells[0].innerHTML.toLowerCase().trim() < b.cells[0].innerHTML.toLowerCase().trim() ) | if (a.cells[0].id.toLowerCase().trim() < b.cells[0].innerHTML.toLowerCase().trim() ) | function distTableSort_catorder(a,b){//alert (a.cells[0].innerHTML.toLowerCase().trim() + b.cells[0].innerHTML.toLowerCase().trim() + "=="); if (a.cells[0].innerHTML.toLowerCase().trim() < b.cells[0].innerHTML.toLowerCase().trim() ) { return -1; } if (a.cells[0].innerHTML.toLowerCase().trim() > b.cells[0].innerHTML.toLowerCase().trim() ) { return 1; } return 0;} |
if (a.cells[0].innerHTML.toLowerCase().trim() > b.cells[0].innerHTML.toLowerCase().trim() ) | if (a.cells[0].id.toLowerCase().trim() > b.cells[0].innerHTML.toLowerCase().trim() ) | function distTableSort_catorder(a,b){//alert (a.cells[0].innerHTML.toLowerCase().trim() + b.cells[0].innerHTML.toLowerCase().trim() + "=="); if (a.cells[0].innerHTML.toLowerCase().trim() < b.cells[0].innerHTML.toLowerCase().trim() ) { return -1; } if (a.cells[0].innerHTML.toLowerCase().trim() > b.cells[0].innerHTML.toLowerCase().trim() ) { return 1; } return 0;} |
this.document_add_all_events = function (e) { | function document_add_all_events (e) { | this.document_add_all_events = function (e) { // Toggle the LBCode editor on or off depending on the markup setting. var inputmode = document.getElementById('input_mode'); lnblog.addEvent(inputmode, 'change', toggle_lbcode_editor); toggle_lbcode_editor(); // Toggle the extended settings fields on or off. var setfld = document.getElementById('entry_settings'); var setleg = setfld.getElementsByTagName('legend'); lnblog.addEvent(setleg[0], 'click', toggle_post_settings); toggle_post_settings(); // Add event handlers to file upload boxes. var uploads = document.getElementsByTagName('input'); for (i=0; i< uploads.length; i++) { if (uploads[i].type == 'file') { lnblog.addEvent(uploads[i], 'change', upload_add_link); } } var tagsel = document.getElementById('tag_list'); lnblog.addEvent(tagsel, 'change', topic_add_tag); var pubart = document.getElementById('publisharticle'); if (pubart) { lnblog.addEvent(pubart, 'change', articleSet); articleSet(); } var preview = document.getElementById('preview'); lnblog.addEvent(preview, 'click', function(e) { var has_files = false; var i = 1; var max_uploads = 20; var upld; postform = document.getElementById('postform'); while (upld = document.getElementById('upload'+i) && i < max_uploads) { if (upld.value) { has_files = true; break; } i++; } if (has_files) { var ret = window.confirm(strings.editor_submitWithFiles); if (ret) { postform.action = postform.action + '&save=draft'; return true; } else { return false; } } else { return true; } }); document.getElementById('subject').focus(); return true; } |
} if (document.getElementById('articlepath')) { lnblog.addEvent(document.getElementById('subject'), 'blur', set_article_path); | this.document_add_all_events = function (e) { // Toggle the LBCode editor on or off depending on the markup setting. var inputmode = document.getElementById('input_mode'); lnblog.addEvent(inputmode, 'change', toggle_lbcode_editor); toggle_lbcode_editor(); // Toggle the extended settings fields on or off. var setfld = document.getElementById('entry_settings'); var setleg = setfld.getElementsByTagName('legend'); lnblog.addEvent(setleg[0], 'click', toggle_post_settings); toggle_post_settings(); // Add event handlers to file upload boxes. var uploads = document.getElementsByTagName('input'); for (i=0; i< uploads.length; i++) { if (uploads[i].type == 'file') { lnblog.addEvent(uploads[i], 'change', upload_add_link); } } var tagsel = document.getElementById('tag_list'); lnblog.addEvent(tagsel, 'change', topic_add_tag); var pubart = document.getElementById('publisharticle'); if (pubart) { lnblog.addEvent(pubart, 'change', articleSet); articleSet(); } var preview = document.getElementById('preview'); lnblog.addEvent(preview, 'click', function(e) { var has_files = false; var i = 1; var max_uploads = 20; var upld; postform = document.getElementById('postform'); while (upld = document.getElementById('upload'+i) && i < max_uploads) { if (upld.value) { has_files = true; break; } i++; } if (has_files) { var ret = window.confirm(strings.editor_submitWithFiles); if (ret) { postform.action = postform.action + '&save=draft'; return true; } else { return false; } } else { return true; } }); document.getElementById('subject').focus(); return true; } |
|
lnblog.addEvent(uploads[i], 'change', upload_add_link); | lnblog.addEvent(uploads[i], 'change', self.upload_add_link); | function document_add_all_events (e) { // Toggle the LBCode editor on or off depending on the markup setting. var inputmode = document.getElementById('input_mode'); lnblog.addEvent(inputmode, 'change', toggle_lbcode_editor); toggle_lbcode_editor(); // Toggle the extended settings fields on or off. var setfld = document.getElementById('entry_settings'); var setleg = setfld.getElementsByTagName('legend'); lnblog.addEvent(setleg[0], 'click', toggle_post_settings); toggle_post_settings(); // Add event handlers to file upload boxes. var uploads = document.getElementsByTagName('input'); for (i=0; i< uploads.length; i++) { if (uploads[i].type == 'file') { lnblog.addEvent(uploads[i], 'change', upload_add_link); } } var tagsel = document.getElementById('tag_list'); lnblog.addEvent(tagsel, 'change', topic_add_tag); var pubart = document.getElementById('publisharticle'); if (pubart) { lnblog.addEvent(pubart, 'change', articleSet); articleSet(); } if (document.getElementById('articlepath')) { lnblog.addEvent(document.getElementById('subject'), 'blur', set_article_path); } var preview = document.getElementById('preview'); lnblog.addEvent(preview, 'click', function(e) { var has_files = false; var i = 1; var max_uploads = 20; var upld; postform = document.getElementById('postform'); while (upld = document.getElementById('upload'+i) && i < max_uploads) { if (upld.value) { has_files = true; break; } i++; } if (has_files) { var ret = window.confirm(strings.editor_submitWithFiles); if (ret) { postform.action = postform.action + '&save=draft'; return true; } else { return false; } } else { return true; } }); document.getElementById('subject').focus(); return true; } |
title : "Select the factor(s) to use", | title : "Select up to 2 factor(s) to use", | doDifferential : function(id) { /* * Do an analysis interactively. */ var customize = function(analysisInfo) { var factors = analysisInfo.factors; var proposedAnalysis = analysisInfo.type; var canDoInteractions = (proposedAnalysis == 'TWIA') || factors.length > 2; /* * DifferentialExpressionAnalysisSetupWindow - to be refactored. */ var deasw = new Ext.Window({ modal : true, stateful : false, resizable : false, autoHeight : true, plain : true, title : "Differential analysis settings", items : [{ xtype : 'form', autoHeight : true, items : [{ xtype : 'fieldset', title : "Select the factor(s) to use", autoHeight : true, labelWidth : 200, id : 'diff-ex-analysis-customize-factors' }, { xtype : 'fieldset', labelWidth : 200, autoHeight : true, hidden : !canDoInteractions, items : [{ xtype : 'checkbox', id : 'diff-ex-analysis-customize-include-interactions-checkbox', fieldLabel : 'Include interactions' }] }] }], buttons : [{ text : 'Proceed', id : 'diff-ex-customize-proceed-button', disabled : false, scope : this, handler : function(btn, text) { var includeInteractions = Ext .getCmp('diff-ex-analysis-customize-include-interactions-checkbox').getValue(); /* * Get the factors the user checked. See checkbox creation code below. */ var factorsToUseIds = []; if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } var checked = Ext.getCmp(f.id + '-factor-checkbox').getValue(); if (checked) { factorsToUseIds.push(f.id); } } } /* * Pass back the factors to be used, and the choice of whether interactions are to be * used. */ var callParams = []; callParams.push(id); callParams.push(factorsToUseIds); callParams.push(includeInteractions); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); deasw.relayEvents(k, ['done']); Ext.getBody().unmask(); k.on('done', function(payload) { this.fireEvent('differential', payload) }); }.createDelegate(this), errorHandler : function(error) { Ext.Msg.alert("Diff. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.runCustom.apply(this, callParams); deasw.close(); } }, { text : 'Cancel', handler : function() { deasw.close(); } }] }); deasw.doLayout(); /* * Create the checkboxes for user choice of factors. */ if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } Ext.getCmp('diff-ex-analysis-customize-factors').add(new Ext.form.Checkbox({ fieldLabel : f.name, labelWidth : 180, id : f.id + '-factor-checkbox', tooltip : f.name })); } } deasw.doLayout(); deasw.show(); }; /* * Callback for analysis type determination. This gets the type of analysis, if it can be determined. If the * type is non-null, then just ask the user for confirmation. If they say no, or the type is null, show them the * DifferentialExpressionAnalysisSetupWindow. */ var cb = function(analysisInfo) { if (analysisInfo.type) { var customizable = false; var analysisType = ''; if (analysisInfo.type === 'TWIA') { analysisType = 'Two-way ANOVA with interactions'; customizable = true; } else if (analysisInfo.type === 'TWA') { analysisType = 'Two-way ANOVA without interactions'; customizable = true; } else if (analysisInfo.type === 'TTEST') { analysisType = 'T-test'; } else if (analysisInfo.type === 'OWA') { analysisType = 'One-way ANOVA'; } // ask for confirmation. var w = new Ext.Window({ autoCreate : true, resizable : false, constrain : true, constrainHeader : true, minimizable : false, maximizable : false, stateful : false, modal : true, shim : true, buttonAlign : "center", width : 400, height : 100, minHeight : 80, plain : true, footer : true, closable : true, title : 'Differential expression analysis', html : 'Please confirm. The analysis performed will be a ' + analysisType + '. Previous analysis results for this experiment will be deleted.', buttons : [{ text : 'Proceed', handler : function(btn, text) { var callParams = [] callParams.push(id); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); this.relayEvents(k, ['done']); Ext.getBody().unmask(); k.on('done', function(payload) { this.fireEvent('differential', payload) }); }.createDelegate(this), errorHandler : function(error) { Ext.Msg.alert("Diff. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.run.apply(this, callParams); w.close(); } }, { text : 'Cancel', handler : function() { w.close(); } }, { disabled : !customizable, hidden : !customizable, text : 'Customize', handler : function() { w.close(); customize(analysisInfo); } }], iconCls : Ext.MessageBox.QUESTION }); w.show(); } else { /* * System couldn't guess the analysis type, so force user to customize. */ customize(analysisInfo); } }; /* * Get the analysis type. */ var eh = function(error) { Ext.Msg.alert("There was an error", error); }; DifferentialExpressionAnalysisController.determineAnalysisType(id, { callback : cb, errorhandler : eh }); }, |
fieldLabel : 'Include interactions' | fieldLabel : 'Include interactions if possible' | doDifferential : function(id) { /* * Do an analysis interactively. */ var customize = function(analysisInfo) { var factors = analysisInfo.factors; var proposedAnalysis = analysisInfo.type; var canDoInteractions = (proposedAnalysis == 'TWIA') || factors.length > 2; /* * DifferentialExpressionAnalysisSetupWindow - to be refactored. */ var deasw = new Ext.Window({ modal : true, stateful : false, resizable : false, autoHeight : true, plain : true, title : "Differential analysis settings", items : [{ xtype : 'form', autoHeight : true, items : [{ xtype : 'fieldset', title : "Select the factor(s) to use", autoHeight : true, labelWidth : 200, id : 'diff-ex-analysis-customize-factors' }, { xtype : 'fieldset', labelWidth : 200, autoHeight : true, hidden : !canDoInteractions, items : [{ xtype : 'checkbox', id : 'diff-ex-analysis-customize-include-interactions-checkbox', fieldLabel : 'Include interactions' }] }] }], buttons : [{ text : 'Proceed', id : 'diff-ex-customize-proceed-button', disabled : false, scope : this, handler : function(btn, text) { var includeInteractions = Ext .getCmp('diff-ex-analysis-customize-include-interactions-checkbox').getValue(); /* * Get the factors the user checked. See checkbox creation code below. */ var factorsToUseIds = []; if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } var checked = Ext.getCmp(f.id + '-factor-checkbox').getValue(); if (checked) { factorsToUseIds.push(f.id); } } } /* * Pass back the factors to be used, and the choice of whether interactions are to be * used. */ var callParams = []; callParams.push(id); callParams.push(factorsToUseIds); callParams.push(includeInteractions); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); deasw.relayEvents(k, ['done']); Ext.getBody().unmask(); k.on('done', function(payload) { this.fireEvent('differential', payload) }); }.createDelegate(this), errorHandler : function(error) { Ext.Msg.alert("Diff. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.runCustom.apply(this, callParams); deasw.close(); } }, { text : 'Cancel', handler : function() { deasw.close(); } }] }); deasw.doLayout(); /* * Create the checkboxes for user choice of factors. */ if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } Ext.getCmp('diff-ex-analysis-customize-factors').add(new Ext.form.Checkbox({ fieldLabel : f.name, labelWidth : 180, id : f.id + '-factor-checkbox', tooltip : f.name })); } } deasw.doLayout(); deasw.show(); }; /* * Callback for analysis type determination. This gets the type of analysis, if it can be determined. If the * type is non-null, then just ask the user for confirmation. If they say no, or the type is null, show them the * DifferentialExpressionAnalysisSetupWindow. */ var cb = function(analysisInfo) { if (analysisInfo.type) { var customizable = false; var analysisType = ''; if (analysisInfo.type === 'TWIA') { analysisType = 'Two-way ANOVA with interactions'; customizable = true; } else if (analysisInfo.type === 'TWA') { analysisType = 'Two-way ANOVA without interactions'; customizable = true; } else if (analysisInfo.type === 'TTEST') { analysisType = 'T-test'; } else if (analysisInfo.type === 'OWA') { analysisType = 'One-way ANOVA'; } // ask for confirmation. var w = new Ext.Window({ autoCreate : true, resizable : false, constrain : true, constrainHeader : true, minimizable : false, maximizable : false, stateful : false, modal : true, shim : true, buttonAlign : "center", width : 400, height : 100, minHeight : 80, plain : true, footer : true, closable : true, title : 'Differential expression analysis', html : 'Please confirm. The analysis performed will be a ' + analysisType + '. Previous analysis results for this experiment will be deleted.', buttons : [{ text : 'Proceed', handler : function(btn, text) { var callParams = [] callParams.push(id); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); this.relayEvents(k, ['done']); Ext.getBody().unmask(); k.on('done', function(payload) { this.fireEvent('differential', payload) }); }.createDelegate(this), errorHandler : function(error) { Ext.Msg.alert("Diff. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.run.apply(this, callParams); w.close(); } }, { text : 'Cancel', handler : function() { w.close(); } }, { disabled : !customizable, hidden : !customizable, text : 'Customize', handler : function() { w.close(); customize(analysisInfo); } }], iconCls : Ext.MessageBox.QUESTION }); w.show(); } else { /* * System couldn't guess the analysis type, so force user to customize. */ customize(analysisInfo); } }; /* * Get the analysis type. */ var eh = function(error) { Ext.Msg.alert("There was an error", error); }; DifferentialExpressionAnalysisController.determineAnalysisType(id, { callback : cb, errorhandler : eh }); }, |
} if (factorsToUseIds.length < 1 || factorsToUseIds.length > 2) { Ext.Msg.alert("Please pick 1 or 2 factors."); return; | doDifferential : function(id) { /* * Do an analysis interactively. */ var customize = function(analysisInfo) { var factors = analysisInfo.factors; var proposedAnalysis = analysisInfo.type; var canDoInteractions = (proposedAnalysis == 'TWIA') || factors.length > 2; /* * DifferentialExpressionAnalysisSetupWindow - to be refactored. */ var deasw = new Ext.Window({ modal : true, stateful : false, resizable : false, autoHeight : true, plain : true, title : "Differential analysis settings", items : [{ xtype : 'form', autoHeight : true, items : [{ xtype : 'fieldset', title : "Select the factor(s) to use", autoHeight : true, labelWidth : 200, id : 'diff-ex-analysis-customize-factors' }, { xtype : 'fieldset', labelWidth : 200, autoHeight : true, hidden : !canDoInteractions, items : [{ xtype : 'checkbox', id : 'diff-ex-analysis-customize-include-interactions-checkbox', fieldLabel : 'Include interactions' }] }] }], buttons : [{ text : 'Proceed', id : 'diff-ex-customize-proceed-button', disabled : false, scope : this, handler : function(btn, text) { var includeInteractions = Ext .getCmp('diff-ex-analysis-customize-include-interactions-checkbox').getValue(); /* * Get the factors the user checked. See checkbox creation code below. */ var factorsToUseIds = []; if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } var checked = Ext.getCmp(f.id + '-factor-checkbox').getValue(); if (checked) { factorsToUseIds.push(f.id); } } } /* * Pass back the factors to be used, and the choice of whether interactions are to be * used. */ var callParams = []; callParams.push(id); callParams.push(factorsToUseIds); callParams.push(includeInteractions); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); deasw.relayEvents(k, ['done']); Ext.getBody().unmask(); k.on('done', function(payload) { this.fireEvent('differential', payload) }); }.createDelegate(this), errorHandler : function(error) { Ext.Msg.alert("Diff. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.runCustom.apply(this, callParams); deasw.close(); } }, { text : 'Cancel', handler : function() { deasw.close(); } }] }); deasw.doLayout(); /* * Create the checkboxes for user choice of factors. */ if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } Ext.getCmp('diff-ex-analysis-customize-factors').add(new Ext.form.Checkbox({ fieldLabel : f.name, labelWidth : 180, id : f.id + '-factor-checkbox', tooltip : f.name })); } } deasw.doLayout(); deasw.show(); }; /* * Callback for analysis type determination. This gets the type of analysis, if it can be determined. If the * type is non-null, then just ask the user for confirmation. If they say no, or the type is null, show them the * DifferentialExpressionAnalysisSetupWindow. */ var cb = function(analysisInfo) { if (analysisInfo.type) { var customizable = false; var analysisType = ''; if (analysisInfo.type === 'TWIA') { analysisType = 'Two-way ANOVA with interactions'; customizable = true; } else if (analysisInfo.type === 'TWA') { analysisType = 'Two-way ANOVA without interactions'; customizable = true; } else if (analysisInfo.type === 'TTEST') { analysisType = 'T-test'; } else if (analysisInfo.type === 'OWA') { analysisType = 'One-way ANOVA'; } // ask for confirmation. var w = new Ext.Window({ autoCreate : true, resizable : false, constrain : true, constrainHeader : true, minimizable : false, maximizable : false, stateful : false, modal : true, shim : true, buttonAlign : "center", width : 400, height : 100, minHeight : 80, plain : true, footer : true, closable : true, title : 'Differential expression analysis', html : 'Please confirm. The analysis performed will be a ' + analysisType + '. Previous analysis results for this experiment will be deleted.', buttons : [{ text : 'Proceed', handler : function(btn, text) { var callParams = [] callParams.push(id); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); this.relayEvents(k, ['done']); Ext.getBody().unmask(); k.on('done', function(payload) { this.fireEvent('differential', payload) }); }.createDelegate(this), errorHandler : function(error) { Ext.Msg.alert("Diff. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.run.apply(this, callParams); w.close(); } }, { text : 'Cancel', handler : function() { w.close(); } }, { disabled : !customizable, hidden : !customizable, text : 'Customize', handler : function() { w.close(); customize(analysisInfo); } }], iconCls : Ext.MessageBox.QUESTION }); w.show(); } else { /* * System couldn't guess the analysis type, so force user to customize. */ customize(analysisInfo); } }; /* * Get the analysis type. */ var eh = function(error) { Ext.Msg.alert("There was an error", error); }; DifferentialExpressionAnalysisController.determineAnalysisType(id, { callback : cb, errorhandler : eh }); }, |
|
Ext.Msg.alert("Diff. Analysis failed", error); | Ext.Msg.alert("Differential exp. Analysis failed", error); | doDifferential : function(id) { /* * Do an analysis interactively. */ var customize = function(analysisInfo) { var factors = analysisInfo.factors; var proposedAnalysis = analysisInfo.type; var canDoInteractions = (proposedAnalysis == 'TWIA') || factors.length > 2; /* * DifferentialExpressionAnalysisSetupWindow - to be refactored. */ var deasw = new Ext.Window({ modal : true, stateful : false, resizable : false, autoHeight : true, width : 300, plain : true, title : "Differential analysis settings", items : [{ xtype : 'form', autoHeight : true, items : [{ xtype : 'fieldset', title : "Select factor(s) to use", autoHeight : true, labelWidth : 200, id : 'diff-ex-analysis-customize-factors' }, { xtype : 'fieldset', labelWidth : 200, autoHeight : true, hidden : !canDoInteractions, items : [{ xtype : 'checkbox', id : 'diff-ex-analysis-customize-include-interactions-checkbox', fieldLabel : 'Include interactions if possible' }] }] }], buttons : [{ text : 'Proceed', id : 'diff-ex-customize-proceed-button', disabled : false, scope : this, handler : function(btn, text) { var includeInteractions = Ext .getCmp('diff-ex-analysis-customize-include-interactions-checkbox').getValue(); /* * Get the factors the user checked. See checkbox creation code below. */ var factorsToUseIds = []; if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } var checked = Ext.getCmp(f.id + '-factor-checkbox').getValue(); if (checked) { factorsToUseIds.push(f.id); } } } if (factorsToUseIds.length < 1) { Ext.Msg.alert("Invalid selection", "Please pick at least one factor."); return; } /* * Pass back the factors to be used, and the choice of whether interactions are to be * used. */ var callParams = []; callParams.push(id); callParams.push(factorsToUseIds); callParams.push(includeInteractions); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); deasw.relayEvents(k, ['done']); Ext.getBody().unmask(); k.on('done', function(payload) { this.fireEvent('differential', payload) }); }.createDelegate(this), errorHandler : function(error) { Ext.Msg.alert("Diff. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.runCustom.apply(this, callParams); deasw.close(); } }, { text : 'Cancel', handler : function() { deasw.close(); } }] }); deasw.doLayout(); /* * Create the checkboxes for user choice of factors. */ if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } Ext.getCmp('diff-ex-analysis-customize-factors').add(new Ext.form.Checkbox({ fieldLabel : f.name, labelWidth : 180, id : f.id + '-factor-checkbox', tooltip : f.name })); } } deasw.doLayout(); deasw.show(); }; /* * Callback for analysis type determination. This gets the type of analysis, if it can be determined. If the * type is non-null, then just ask the user for confirmation. If they say no, or the type is null, show them the * DifferentialExpressionAnalysisSetupWindow. */ var cb = function(analysisInfo) { if (analysisInfo.type) { var customizable = true; var analysisType = ''; if (analysisInfo.type === 'TWIA') { analysisType = 'Two-way ANOVA with interactions'; customizable = true; } else if (analysisInfo.type === 'TWA') { analysisType = 'Two-way ANOVA without interactions'; customizable = true; } else if (analysisInfo.type === 'TTEST') { analysisType = 'T-test (two-sample)'; } else if (analysisInfo.type === 'OSTTEST') { analysisType = 'T-test (one-sample)'; } else if (analysisInfo.type === 'OWA') { analysisType = 'One-way ANOVA'; } else { analysisType = 'Generic ANOVA/ANCOVA'; // TODO: allow choice of the factors customizable = true; } // ask for confirmation. var w = new Ext.Window({ autoCreate : true, resizable : false, constrain : true, constrainHeader : true, minimizable : false, maximizable : false, stateful : false, modal : true, shim : true, buttonAlign : "center", width : 400, height : 100, minHeight : 80, plain : true, footer : true, closable : true, title : 'Differential expression analysis', html : 'Please confirm. The analysis performed will be a ' + analysisType + '. Previous analysis results for this experiment will be deleted.', buttons : [{ text : 'Proceed', handler : function(btn, text) { var callParams = []; callParams.push(id); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); this.relayEvents(k, ['done']); Ext.getBody().unmask(); k.on('done', function(payload) { this.fireEvent('differential', payload); }); }.createDelegate(this), errorHandler : function(error) { Ext.Msg.alert("Diff. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.run.apply(this, callParams); w.close(); } }, { text : 'Cancel', handler : function() { w.close(); } }, { disabled : !customizable, hidden : !customizable, text : 'Customize', handler : function() { w.close(); customize(analysisInfo); } }], iconCls : Ext.MessageBox.QUESTION }); w.show(); } else { /* * System couldn't guess the analysis type, so force user to customize. */ customize(analysisInfo); } }; /* * Get the analysis type. */ var eh = function(error) { Ext.Msg.alert("There was an error", error); }; DifferentialExpressionAnalysisController.determineAnalysisType(id, { callback : cb, errorhandler : eh }); }, |
tooltip : f.name | tooltip : f.name, checked : onlyOne | doDifferential : function(id) { /* * Do an analysis interactively. */ var customize = function(analysisInfo) { var factors = analysisInfo.factors; var proposedAnalysis = analysisInfo.type; var canDoInteractions = (proposedAnalysis == 'TWIA') || factors.length > 2; /* * DifferentialExpressionAnalysisSetupWindow - to be refactored. */ var deasw = new Ext.Window({ modal : true, stateful : false, resizable : false, autoHeight : true, width : 300, plain : true, title : "Differential analysis settings", items : [{ xtype : 'form', autoHeight : true, items : [{ xtype : 'fieldset', title : "Select factor(s) to use", autoHeight : true, labelWidth : 200, id : 'diff-ex-analysis-customize-factors' }, { xtype : 'fieldset', labelWidth : 200, autoHeight : true, hidden : !canDoInteractions, items : [{ xtype : 'checkbox', id : 'diff-ex-analysis-customize-include-interactions-checkbox', fieldLabel : 'Include interactions if possible' }] }] }], buttons : [{ text : 'Proceed', id : 'diff-ex-customize-proceed-button', disabled : false, scope : this, handler : function(btn, text) { var includeInteractions = Ext .getCmp('diff-ex-analysis-customize-include-interactions-checkbox').getValue(); /* * Get the factors the user checked. See checkbox creation code below. */ var factorsToUseIds = []; if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } var checked = Ext.getCmp(f.id + '-factor-checkbox').getValue(); if (checked) { factorsToUseIds.push(f.id); } } } if (factorsToUseIds.length < 1) { Ext.Msg.alert("Invalid selection", "Please pick at least one factor."); return; } /* * Pass back the factors to be used, and the choice of whether interactions are to be * used. */ var callParams = []; callParams.push(id); callParams.push(factorsToUseIds); callParams.push(includeInteractions); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); deasw.relayEvents(k, ['done']); Ext.getBody().unmask(); k.on('done', function(payload) { this.fireEvent('differential', payload) }); }.createDelegate(this), errorHandler : function(error) { Ext.Msg.alert("Diff. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.runCustom.apply(this, callParams); deasw.close(); } }, { text : 'Cancel', handler : function() { deasw.close(); } }] }); deasw.doLayout(); /* * Create the checkboxes for user choice of factors. */ if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } Ext.getCmp('diff-ex-analysis-customize-factors').add(new Ext.form.Checkbox({ fieldLabel : f.name, labelWidth : 180, id : f.id + '-factor-checkbox', tooltip : f.name })); } } deasw.doLayout(); deasw.show(); }; /* * Callback for analysis type determination. This gets the type of analysis, if it can be determined. If the * type is non-null, then just ask the user for confirmation. If they say no, or the type is null, show them the * DifferentialExpressionAnalysisSetupWindow. */ var cb = function(analysisInfo) { if (analysisInfo.type) { var customizable = true; var analysisType = ''; if (analysisInfo.type === 'TWIA') { analysisType = 'Two-way ANOVA with interactions'; customizable = true; } else if (analysisInfo.type === 'TWA') { analysisType = 'Two-way ANOVA without interactions'; customizable = true; } else if (analysisInfo.type === 'TTEST') { analysisType = 'T-test (two-sample)'; } else if (analysisInfo.type === 'OSTTEST') { analysisType = 'T-test (one-sample)'; } else if (analysisInfo.type === 'OWA') { analysisType = 'One-way ANOVA'; } else { analysisType = 'Generic ANOVA/ANCOVA'; // TODO: allow choice of the factors customizable = true; } // ask for confirmation. var w = new Ext.Window({ autoCreate : true, resizable : false, constrain : true, constrainHeader : true, minimizable : false, maximizable : false, stateful : false, modal : true, shim : true, buttonAlign : "center", width : 400, height : 100, minHeight : 80, plain : true, footer : true, closable : true, title : 'Differential expression analysis', html : 'Please confirm. The analysis performed will be a ' + analysisType + '. Previous analysis results for this experiment will be deleted.', buttons : [{ text : 'Proceed', handler : function(btn, text) { var callParams = []; callParams.push(id); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); this.relayEvents(k, ['done']); Ext.getBody().unmask(); k.on('done', function(payload) { this.fireEvent('differential', payload); }); }.createDelegate(this), errorHandler : function(error) { Ext.Msg.alert("Diff. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.run.apply(this, callParams); w.close(); } }, { text : 'Cancel', handler : function() { w.close(); } }, { disabled : !customizable, hidden : !customizable, text : 'Customize', handler : function() { w.close(); customize(analysisInfo); } }], iconCls : Ext.MessageBox.QUESTION }); w.show(); } else { /* * System couldn't guess the analysis type, so force user to customize. */ customize(analysisInfo); } }; /* * Get the analysis type. */ var eh = function(error) { Ext.Msg.alert("There was an error", error); }; DifferentialExpressionAnalysisController.determineAnalysisType(id, { callback : cb, errorhandler : eh }); }, |
var customizable = true; | var customizable = false; | doDifferential : function(id) { /* * Do an analysis interactively. */ var customize = function(analysisInfo) { var factors = analysisInfo.factors; var proposedAnalysis = analysisInfo.type; var canDoInteractions = (proposedAnalysis == 'TWIA') || factors.length > 2; /* * DifferentialExpressionAnalysisSetupWindow - to be refactored. */ var deasw = new Ext.Window({ modal : true, stateful : false, resizable : false, autoHeight : true, width : 300, plain : true, title : "Differential analysis settings", items : [{ xtype : 'form', autoHeight : true, items : [{ xtype : 'fieldset', title : "Select factor(s) to use", autoHeight : true, labelWidth : 200, id : 'diff-ex-analysis-customize-factors' }, { xtype : 'fieldset', labelWidth : 200, autoHeight : true, hidden : !canDoInteractions, items : [{ xtype : 'checkbox', id : 'diff-ex-analysis-customize-include-interactions-checkbox', fieldLabel : 'Include interactions if possible' }] }] }], buttons : [{ text : 'Proceed', id : 'diff-ex-customize-proceed-button', disabled : false, scope : this, handler : function(btn, text) { var includeInteractions = Ext .getCmp('diff-ex-analysis-customize-include-interactions-checkbox').getValue(); /* * Get the factors the user checked. See checkbox creation code below. */ var factorsToUseIds = []; if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } var checked = Ext.getCmp(f.id + '-factor-checkbox').getValue(); if (checked) { factorsToUseIds.push(f.id); } } } if (factorsToUseIds.length < 1) { Ext.Msg.alert("Invalid selection", "Please pick at least one factor."); return; } /* * Pass back the factors to be used, and the choice of whether interactions are to be * used. */ var callParams = []; callParams.push(id); callParams.push(factorsToUseIds); callParams.push(includeInteractions); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); deasw.relayEvents(k, ['done']); Ext.getBody().unmask(); k.on('done', function(payload) { this.fireEvent('differential', payload) }); }.createDelegate(this), errorHandler : function(error) { Ext.Msg.alert("Diff. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.runCustom.apply(this, callParams); deasw.close(); } }, { text : 'Cancel', handler : function() { deasw.close(); } }] }); deasw.doLayout(); /* * Create the checkboxes for user choice of factors. */ if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } Ext.getCmp('diff-ex-analysis-customize-factors').add(new Ext.form.Checkbox({ fieldLabel : f.name, labelWidth : 180, id : f.id + '-factor-checkbox', tooltip : f.name })); } } deasw.doLayout(); deasw.show(); }; /* * Callback for analysis type determination. This gets the type of analysis, if it can be determined. If the * type is non-null, then just ask the user for confirmation. If they say no, or the type is null, show them the * DifferentialExpressionAnalysisSetupWindow. */ var cb = function(analysisInfo) { if (analysisInfo.type) { var customizable = true; var analysisType = ''; if (analysisInfo.type === 'TWIA') { analysisType = 'Two-way ANOVA with interactions'; customizable = true; } else if (analysisInfo.type === 'TWA') { analysisType = 'Two-way ANOVA without interactions'; customizable = true; } else if (analysisInfo.type === 'TTEST') { analysisType = 'T-test (two-sample)'; } else if (analysisInfo.type === 'OSTTEST') { analysisType = 'T-test (one-sample)'; } else if (analysisInfo.type === 'OWA') { analysisType = 'One-way ANOVA'; } else { analysisType = 'Generic ANOVA/ANCOVA'; // TODO: allow choice of the factors customizable = true; } // ask for confirmation. var w = new Ext.Window({ autoCreate : true, resizable : false, constrain : true, constrainHeader : true, minimizable : false, maximizable : false, stateful : false, modal : true, shim : true, buttonAlign : "center", width : 400, height : 100, minHeight : 80, plain : true, footer : true, closable : true, title : 'Differential expression analysis', html : 'Please confirm. The analysis performed will be a ' + analysisType + '. Previous analysis results for this experiment will be deleted.', buttons : [{ text : 'Proceed', handler : function(btn, text) { var callParams = []; callParams.push(id); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); this.relayEvents(k, ['done']); Ext.getBody().unmask(); k.on('done', function(payload) { this.fireEvent('differential', payload); }); }.createDelegate(this), errorHandler : function(error) { Ext.Msg.alert("Diff. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.run.apply(this, callParams); w.close(); } }, { text : 'Cancel', handler : function() { w.close(); } }, { disabled : !customizable, hidden : !customizable, text : 'Customize', handler : function() { w.close(); customize(analysisInfo); } }], iconCls : Ext.MessageBox.QUESTION }); w.show(); } else { /* * System couldn't guess the analysis type, so force user to customize. */ customize(analysisInfo); } }; /* * Get the analysis type. */ var eh = function(error) { Ext.Msg.alert("There was an error", error); }; DifferentialExpressionAnalysisController.determineAnalysisType(id, { callback : cb, errorhandler : eh }); }, |
height : 100, | height : 130, | doDifferential : function(id) { /* * Do an analysis interactively. */ var customize = function(analysisInfo) { var factors = analysisInfo.factors; var proposedAnalysis = analysisInfo.type; var canDoInteractions = (proposedAnalysis == 'TWIA') || factors.length > 2; /* * DifferentialExpressionAnalysisSetupWindow - to be refactored. */ var deasw = new Ext.Window({ modal : true, stateful : false, resizable : false, autoHeight : true, width : 300, plain : true, title : "Differential analysis settings", items : [{ xtype : 'form', autoHeight : true, items : [{ xtype : 'fieldset', title : "Select factor(s) to use", autoHeight : true, labelWidth : 200, id : 'diff-ex-analysis-customize-factors' }, { xtype : 'fieldset', labelWidth : 200, autoHeight : true, hidden : !canDoInteractions, items : [{ xtype : 'checkbox', id : 'diff-ex-analysis-customize-include-interactions-checkbox', fieldLabel : 'Include interactions if possible' }] }] }], buttons : [{ text : 'Proceed', id : 'diff-ex-customize-proceed-button', disabled : false, scope : this, handler : function(btn, text) { var includeInteractions = Ext .getCmp('diff-ex-analysis-customize-include-interactions-checkbox').getValue(); /* * Get the factors the user checked. See checkbox creation code below. */ var factorsToUseIds = []; if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } var checked = Ext.getCmp(f.id + '-factor-checkbox').getValue(); if (checked) { factorsToUseIds.push(f.id); } } } if (factorsToUseIds.length < 1) { Ext.Msg.alert("Invalid selection", "Please pick at least one factor."); return; } /* * Pass back the factors to be used, and the choice of whether interactions are to be * used. */ var callParams = []; callParams.push(id); callParams.push(factorsToUseIds); callParams.push(includeInteractions); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); deasw.relayEvents(k, ['done']); Ext.getBody().unmask(); k.on('done', function(payload) { this.fireEvent('differential', payload) }); }.createDelegate(this), errorHandler : function(error) { Ext.Msg.alert("Diff. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.runCustom.apply(this, callParams); deasw.close(); } }, { text : 'Cancel', handler : function() { deasw.close(); } }] }); deasw.doLayout(); /* * Create the checkboxes for user choice of factors. */ if (factors) { for (var i = 0; i < factors.length; i++) { var f = factors[i]; if (!f.name) { continue; } Ext.getCmp('diff-ex-analysis-customize-factors').add(new Ext.form.Checkbox({ fieldLabel : f.name, labelWidth : 180, id : f.id + '-factor-checkbox', tooltip : f.name })); } } deasw.doLayout(); deasw.show(); }; /* * Callback for analysis type determination. This gets the type of analysis, if it can be determined. If the * type is non-null, then just ask the user for confirmation. If they say no, or the type is null, show them the * DifferentialExpressionAnalysisSetupWindow. */ var cb = function(analysisInfo) { if (analysisInfo.type) { var customizable = true; var analysisType = ''; if (analysisInfo.type === 'TWIA') { analysisType = 'Two-way ANOVA with interactions'; customizable = true; } else if (analysisInfo.type === 'TWA') { analysisType = 'Two-way ANOVA without interactions'; customizable = true; } else if (analysisInfo.type === 'TTEST') { analysisType = 'T-test (two-sample)'; } else if (analysisInfo.type === 'OSTTEST') { analysisType = 'T-test (one-sample)'; } else if (analysisInfo.type === 'OWA') { analysisType = 'One-way ANOVA'; } else { analysisType = 'Generic ANOVA/ANCOVA'; // TODO: allow choice of the factors customizable = true; } // ask for confirmation. var w = new Ext.Window({ autoCreate : true, resizable : false, constrain : true, constrainHeader : true, minimizable : false, maximizable : false, stateful : false, modal : true, shim : true, buttonAlign : "center", width : 400, height : 100, minHeight : 80, plain : true, footer : true, closable : true, title : 'Differential expression analysis', html : 'Please confirm. The analysis performed will be a ' + analysisType + '. Previous analysis results for this experiment will be deleted.', buttons : [{ text : 'Proceed', handler : function(btn, text) { var callParams = []; callParams.push(id); Ext.getBody().mask(); callParams.push({ callback : function(data) { var k = new Gemma.WaitHandler(); k.handleWait(data, true); this.relayEvents(k, ['done']); Ext.getBody().unmask(); k.on('done', function(payload) { this.fireEvent('differential', payload); }); }.createDelegate(this), errorHandler : function(error) { Ext.Msg.alert("Diff. Analysis failed", error); Ext.getBody().unmask(); }.createDelegate(this) }); DifferentialExpressionAnalysisController.run.apply(this, callParams); w.close(); } }, { text : 'Cancel', handler : function() { w.close(); } }, { disabled : !customizable, hidden : !customizable, text : 'Customize', handler : function() { w.close(); customize(analysisInfo); } }], iconCls : Ext.MessageBox.QUESTION }); w.show(); } else { /* * System couldn't guess the analysis type, so force user to customize. */ customize(analysisInfo); } }; /* * Get the analysis type. */ var eh = function(error) { Ext.Msg.alert("There was an error", error); }; DifferentialExpressionAnalysisController.determineAnalysisType(id, { callback : cb, errorhandler : eh }); }, |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.