From: <er...@us...> - 2012-03-20 21:11:34
|
Revision: 6112 http://jaffa.svn.sourceforge.net/jaffa/?rev=6112&view=rev Author: erikb78 Date: 2012-03-20 21:11:27 +0000 (Tue, 20 Mar 2012) Log Message: ----------- Merge from JAFFA_5_10_RELEASE Modified Paths: -------------- branches/JAFFA_5_12_RELEASE/JaffaConsole/source/html/jaffa/qm/queuemanager/QueueTransactionDetail.js branches/JAFFA_5_12_RELEASE/JaffaConsole/source/html/jaffa/qm/queuemanager/QueueTransactionFinder.js branches/JAFFA_5_12_RELEASE/JaffaRIA/source/html/js/extjs/jaffa/component/CRUDController.js branches/JAFFA_5_12_RELEASE/JaffaRIA/source/html/js/extjs/jaffa/finder/FinderGridWindow.js branches/JAFFA_5_12_RELEASE/JaffaRIA/source/html/js/extjs/jaffa/finder/FinderHeader.js branches/JAFFA_5_12_RELEASE/JaffaRIA/source/html/js/extjs/jaffa/layout/AdjacentFieldLayout.js branches/JAFFA_5_12_RELEASE/JaffaRIA/source/html/js/extjs/jaffa/maintenance/GridDetailContainer.js branches/JAFFA_5_12_RELEASE/JaffaRIA/source/html/js/extjs/ux/form/DateTime.js Property Changed: ---------------- branches/JAFFA_5_12_RELEASE/ Property changes on: branches/JAFFA_5_12_RELEASE ___________________________________________________________________ Modified: svn:mergeinfo - /branches/JAFFA_2_1_0_RELEASE:3009-3735 /branches/JAFFA_4_1_0_RELEASE:3009-3734 /branches/JAFFA_5_0_0_RELEASE:3427-3733 /branches/JAFFA_5_10_RELEASE:5429-5781 /branches/JAFFA_5_11_RELEASE:5507-5782,5860-5861 /branches/JAFFA_5_1_0_RELEASE:3704-3732 /branches/JAFFA_5_7_RELEASE:4878-6102 /branches/JAFFA_5_8_RELEASE:5013-6103 /branches/JAFFA_5_9_RELEASE:5138-6104 /trunk/JaffaBuild/build/shared.ant.properties:1685-4877 + /branches/JAFFA_2_1_0_RELEASE:3009-3735 /branches/JAFFA_4_1_0_RELEASE:3009-3734 /branches/JAFFA_5_0_0_RELEASE:3427-3733 /branches/JAFFA_5_10_RELEASE:5429-6105 /branches/JAFFA_5_11_RELEASE:5507-5782,5860-5861 /branches/JAFFA_5_1_0_RELEASE:3704-3732 /branches/JAFFA_5_7_RELEASE:4878-6102 /branches/JAFFA_5_8_RELEASE:5013-6103 /branches/JAFFA_5_9_RELEASE:5138-6104 /trunk/JaffaBuild/build/shared.ant.properties:1685-4877 Modified: branches/JAFFA_5_12_RELEASE/JaffaConsole/source/html/jaffa/qm/queuemanager/QueueTransactionDetail.js =================================================================== --- branches/JAFFA_5_12_RELEASE/JaffaConsole/source/html/jaffa/qm/queuemanager/QueueTransactionDetail.js 2012-03-20 19:21:10 UTC (rev 6111) +++ branches/JAFFA_5_12_RELEASE/JaffaConsole/source/html/jaffa/qm/queuemanager/QueueTransactionDetail.js 2012-03-20 21:11:27 UTC (rev 6112) @@ -168,7 +168,7 @@ this.controller.setPanelFields(this, data); if (this.tabs.general) { this.tabs.general.items.each(function(field){ - if (field.appFieldMapping){ + if (field.appFieldMapping && data.applicationFields){ for (var i = 0; i< data.applicationFields.length; i++){ if (data.applicationFields[i].name==field.appFieldMapping) field.setValue(data.applicationFields[i].value); Modified: branches/JAFFA_5_12_RELEASE/JaffaConsole/source/html/jaffa/qm/queuemanager/QueueTransactionFinder.js =================================================================== --- branches/JAFFA_5_12_RELEASE/JaffaConsole/source/html/jaffa/qm/queuemanager/QueueTransactionFinder.js 2012-03-20 19:21:10 UTC (rev 6111) +++ branches/JAFFA_5_12_RELEASE/JaffaConsole/source/html/jaffa/qm/queuemanager/QueueTransactionFinder.js 2012-03-20 21:11:27 UTC (rev 6112) @@ -66,8 +66,10 @@ this.TransactionRecord = new Jaffa.data.Record.create(transactionFields); Ext.override(this.TransactionRecord, { initData: function(data) { - for (var i = 0; i < data.applicationFields.length; i++) { - data['appFields.' + data.applicationFields[i].name] = data.applicationFields[i].value; + if (data.applicationFields){ + for (var i = 0; i < data.applicationFields.length; i++) { + data['appFields.' + data.applicationFields[i].name] = data.applicationFields[i].value; + } } } Modified: branches/JAFFA_5_12_RELEASE/JaffaRIA/source/html/js/extjs/jaffa/component/CRUDController.js =================================================================== --- branches/JAFFA_5_12_RELEASE/JaffaRIA/source/html/js/extjs/jaffa/component/CRUDController.js 2012-03-20 19:21:10 UTC (rev 6111) +++ branches/JAFFA_5_12_RELEASE/JaffaRIA/source/html/js/extjs/jaffa/component/CRUDController.js 2012-03-20 21:11:27 UTC (rev 6112) @@ -127,6 +127,13 @@ */ ,'prevalidate' /** + * @event prevalidatefailed + * Fires after the proxy's prevalidate call throws an error message. + * @param {Object} this + * @param {Object} params The params object passed to the {@link #_invokePrevalidate} function + */ + ,'prevalidatefailed' + /** * @event save * Fires before the save method's callback is called, assuming the save was successful * @param {Object} this @@ -345,7 +352,7 @@ if (typeof callbackOk == 'function') { callbackOk(serverResponse); } - }else{ + } else if (me.fireEvent("prevalidatefailed", me,serverResponse) !== false){ if (typeof callbackError === 'function') { callbackError(serverResponse); } Modified: branches/JAFFA_5_12_RELEASE/JaffaRIA/source/html/js/extjs/jaffa/finder/FinderGridWindow.js =================================================================== --- branches/JAFFA_5_12_RELEASE/JaffaRIA/source/html/js/extjs/jaffa/finder/FinderGridWindow.js 2012-03-20 19:21:10 UTC (rev 6111) +++ branches/JAFFA_5_12_RELEASE/JaffaRIA/source/html/js/extjs/jaffa/finder/FinderGridWindow.js 2012-03-20 21:11:27 UTC (rev 6112) @@ -75,9 +75,9 @@ renderGrid: function() { this.grid = new Jaffa.form.FinderGridPanel({ meta: this.meta, - loadMask : true, + loadMask : true, selModel : this.selectionModel, - listeners: { + listeners: { scope : this, rowdblclick: function(gridElement, rowIndex, evt) { var selectedRec = gridElement.getStore().getAt(rowIndex); @@ -86,31 +86,31 @@ evt.stopEvent(); this.close.defer(250, this); }, - - afterrender : function(gridEl){ - // load the grid - gridEl.getStore().load(); - gridEl.focus(); - } + + afterrender : function(gridEl){ + // load the grid + gridEl.getStore().load(); + gridEl.focus(); + } } }); - + this.grid.getStore().on('load', function() { - if(this.getEl()) { - this.getEl().unmask(); - } + if(this.getEl()) { + this.getEl().unmask(); + } // detect whether any filter menu is open var filtersInFocus = false; if(this.filters) { - this.filters.filters.each(function(flt) { - if (! flt.menu.hidden) { - filtersInFocus = true; - return false; - } - }); - // escape focus when any column filter menu is open - if (filtersInFocus) return; - } + this.filters.filters.each(function(flt) { + if (! flt.menu.hidden) { + filtersInFocus = true; + return false; + } + }); + // escape focus when any column filter menu is open + if (filtersInFocus) return; + } // set focus on the grid this.focus(); if (this.getStore().getCount() > 0) { @@ -143,20 +143,30 @@ // Add a filter to the grid this.grid.filters.clearFilters(); - this.grid.filters.filters.each(function(flt) { - var value; + var value,operator; if (this.meta && this.meta.fields && this.meta.fields[flt.dataIndex] && !this.meta.fields[flt.dataIndex].hidden) { var baseParam = baseParams[flt.dataIndex]; - if (baseParam && (!baseParam.operator || baseParam.operator == 'Equals' || baseParam.operator == 'BeginsWith') && baseParam.values && baseParam.values.length == 1) + if (flt.type !== "string" && baseParam && (!baseParam.operator || baseParam.operator == 'Equals' || baseParam.operator == 'BeginsWith') && baseParam.values && baseParam.values.length == 1) { value = baseParam.values[0]; + } + else + if (flt.type == "string" && baseParam && (!baseParam.operator || baseParam.operator == 'Equals' || baseParam.operator == 'BeginsWith' || baseParam.operator == 'Like' || baseParam.operator == 'EndWith') && baseParam.values && baseParam.values.length == 1) { + value = baseParam.values[0]; + if (baseParam.operator) operator = baseParam.operator; + } } + + //reset primarySearchField baseParams if (!Ext.isEmpty(value)) { delete baseParams[flt.dataIndex]; if (flt.type == 'list') { flt.setValue([value]); } else if (flt.type == 'string') { - flt.setValue(value); + flt.setValue({ + operator: operator, + value: value + }); } else if (flt.type == 'boolean') { flt.setValue(value); } else if (flt.type == 'date') { @@ -164,18 +174,20 @@ } else if (flt.type == 'numeric') { flt.setValue({eq: value}); } - if(this.staticBaseParams && this.staticBaseParams[flt.dataIndex]){ - if(flt.inputItem) flt.inputItem.disable(); - else if(flt.options){ - for(var i =0; i < flt.options.length; i++){ - flt.options[i].disable(); - } + } + // disable filters for staticBaseParams + var staticParameters = this.staticBaseParams || this.getStaticBaseParams(); + var cmColumns = this.grid.colModel.config; + if(staticParameters && staticParameters[flt.dataIndex]){ + Ext.each(cmColumns, function(c){ + if(c.dataIndex === flt.dataIndex){ + c.filter = false; // disables filtering for that column, see ux-overrides GridFilters.onMenu } - } else { - flt.setActive(true); - } + }); + } else if(!Ext.isEmpty(value)) { //activates primarySearchField's filter when the user provided a value + flt.setActive(true); } - }); + },this); }, clearFilters : function(){ this.grid.filters.clearFilters(); Modified: branches/JAFFA_5_12_RELEASE/JaffaRIA/source/html/js/extjs/jaffa/finder/FinderHeader.js =================================================================== --- branches/JAFFA_5_12_RELEASE/JaffaRIA/source/html/js/extjs/jaffa/finder/FinderHeader.js 2012-03-20 19:21:10 UTC (rev 6111) +++ branches/JAFFA_5_12_RELEASE/JaffaRIA/source/html/js/extjs/jaffa/finder/FinderHeader.js 2012-03-20 21:11:27 UTC (rev 6112) @@ -242,7 +242,7 @@ if (this.fireEvent('beforerefresh', this) !== false) { var cmp = Ext.getCmp('finderContainer'); if (cmp && cmp.store && !cmp.resultsPanel.disabled) { - cmp.store.loadMore(true); + cmp.store.reload(); } this.fireEvent('refresh',this,btn,evt); } @@ -681,20 +681,20 @@ } return text; }, + /** - * Refreshes parent window (web 1.0 Screen) by clicking Refresh button on that page. - * //TODO: Need to find a better way to refresh parent window + * Refreshes parent window by clicking Refresh button on that page. */ - refreshParentWindow : function() { + refreshParentWindow: function(){ if (this.isParentWindowAvailable()) { - // locate the refresh button - var refBtn, tns= self.opener.document.getElementsByTagName('a'); + // locate the refresh link + var refBtn, tns= self.opener.document.getElementsByTagName('a'); // Web 1.0 support for (var i=0; i<tns.length; i++) { if (tns[i].title=='Refresh') { refBtn = tns[i]; } } - if (refBtn) { + if(refBtn){ // get the onclick and href values. var ock, hrfun; for (var i=0; i<refBtn.attributes.length; i++) { @@ -706,6 +706,9 @@ } self.opener.eval(unescape(ock)); self.opener.eval(unescape(hrfun)); + } else if(self.opener.Ext && self.opener.Ext.getCmp('jaffa.maintenance.headerpanel.reloadData.btn')){ // Web 2.0 support + refBtn = self.opener.Ext.getCmp('jaffa.maintenance.headerpanel.reloadData.btn'); + refBtn.ownerCt.ownerCt.onRefresh(refBtn); } return true; } else { Modified: branches/JAFFA_5_12_RELEASE/JaffaRIA/source/html/js/extjs/jaffa/layout/AdjacentFieldLayout.js =================================================================== --- branches/JAFFA_5_12_RELEASE/JaffaRIA/source/html/js/extjs/jaffa/layout/AdjacentFieldLayout.js 2012-03-20 19:21:10 UTC (rev 6111) +++ branches/JAFFA_5_12_RELEASE/JaffaRIA/source/html/js/extjs/jaffa/layout/AdjacentFieldLayout.js 2012-03-20 21:11:27 UTC (rev 6112) @@ -54,7 +54,11 @@ */ labelSeparator : ':', adjacentSeparator : '/', - + /** + * @cfg {String} fieldSeparator + * Flag to display adjacent separator between fields even when the fields have noLabels + */ + hideFieldSeparator : true, // private getAnchorViewSize : function(ct, target){ return ct.body.getStyleSize(); @@ -195,11 +199,11 @@ }, getTemplateArgs: function(field,position) { - var noLabel = !field.fieldLabel || field.hideLabel; + var noLabel = (!field.fieldLabel || field.hideLabel) && this.hideFieldSeparator; return { id : field.id, label : field.label || field.fieldLabel, - itemCls : (field.itemCls || this.container.itemCls || '') + (field.hideLabel ? ' x-hide-label' : ''), + itemCls : (field.itemCls || this.container.itemCls || '') + ((field.hideLabel && this.hideFieldSeparator) ? ' x-hide-label' : ''), clearCls : field.clearCls || '', labelStyle : field.labelStyle || this.labelStyle || '', elementStyle : this.elementStyle || '', Modified: branches/JAFFA_5_12_RELEASE/JaffaRIA/source/html/js/extjs/jaffa/maintenance/GridDetailContainer.js =================================================================== --- branches/JAFFA_5_12_RELEASE/JaffaRIA/source/html/js/extjs/jaffa/maintenance/GridDetailContainer.js 2012-03-20 19:21:10 UTC (rev 6111) +++ branches/JAFFA_5_12_RELEASE/JaffaRIA/source/html/js/extjs/jaffa/maintenance/GridDetailContainer.js 2012-03-20 21:11:27 UTC (rev 6112) @@ -447,7 +447,7 @@ scope: this, disabled: true, handler: function(){ - this.layout.setActiveItem(1); + this.onFormView(); } }); this.detailPanel.getTopToolbar().add('->'); @@ -674,6 +674,9 @@ this.layout.setActiveItem(0); if (this.gridPanel.getTopToolbar().getComponent('_details')) this.gridPanel.getTopToolbar().getComponent('_details').disable(); } + }, + onFormView : function(){ + this.layout.setActiveItem(1); } }); Modified: branches/JAFFA_5_12_RELEASE/JaffaRIA/source/html/js/extjs/ux/form/DateTime.js =================================================================== --- branches/JAFFA_5_12_RELEASE/JaffaRIA/source/html/js/extjs/ux/form/DateTime.js 2012-03-20 19:21:10 UTC (rev 6111) +++ branches/JAFFA_5_12_RELEASE/JaffaRIA/source/html/js/extjs/ux/form/DateTime.js 2012-03-20 21:11:27 UTC (rev 6112) @@ -128,6 +128,7 @@ this.relayEvents(this.df, ['focus', 'specialkey', 'invalid', 'valid']); this.relayEvents(this.tf, ['focus', 'specialkey', 'invalid', 'valid']); + this.on('specialkey', this.onSpecialKey, this); } // eo function initComponent // }}} // {{{ @@ -147,7 +148,7 @@ // render DateField and TimeField // create bounding table var t; - if('bellow' === this.timePosition) { + if('below' === this.timePosition || 'bellow' === this.timePosition) { t = Ext.DomHelper.append(ct, {tag:'table',style:'border-collapse:collapse',children:[ {tag:'tr',children:[{tag:'td', style:'padding-bottom:1px', cls:'ux-datetime-date'}]} ,{tag:'tr',children:[{tag:'td', cls:'ux-datetime-time'}]} @@ -174,7 +175,6 @@ t.select('input').applyStyles({top:0}); } - this.on('specialkey', this.onSpecialKey, this); this.df.el.swallowEvent(['keydown', 'keypress']); this.tf.el.swallowEvent(['keydown', 'keypress']); @@ -397,12 +397,17 @@ this.df.beforeBlur(); this.tf.focus(); } - if(t === this.tf && e.shiftKey && !this.df.hidden) { - e.stopEvent(); - this.df.focus(); - // note by SeanZ: - // not having this.updateValue() on tf solves the problem that type-in n/t to - // date field and tab out and the time field is not populated. + if(t === this.tf && !this.df.hidden) { + if(e.shiftKey) { + e.stopEvent(); + this.df.focus(); + // note by SeanZ: + // not having this.updateValue() on tf solves the problem that type-in n/t to + // date field and tab out and the time field is not populated. + } else if(this.gridEditor){ + //Blur is not fired on tab out of the time field when in editor grid. To solve this, directly calling onBlur + Ext.form.Field.prototype.onBlur.call(this.tf); + } } //this.updateValue(); // make it df only } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |