Changeset 3414
- Timestamp:
- 03/12/10 12:17:48 (2 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
sandbox/gislars/sipv/MapFish/client/mfbase/styler/lib/Styler/widgets/FilterPanel.js
r3369 r3414 119 119 var recordIsDate = (record.get('type')=='dateTime' || 120 120 record.get('type')=='date'); 121 122 var onSelect = function(el, value) { 123 if (recordIsDate) { 124 var dt = new Date(value); 125 value = dt.format('c'); 126 } 127 this.filter.value = value; 128 this.fireEvent("change", this.filter); 129 }; 121 130 122 131 if (this.storeUriProperty && record.get(this.storeUriProperty)) { … … 139 148 mode: 'local', 140 149 width: newCmpWidth, 141 triggerAction: 'all' 150 triggerAction: 'all', 151 listeners: { 152 "select": onSelect, 153 scope: this 154 } 142 155 }, this.comboOptions)); 143 156 … … 156 169 format: 'd/m/Y', 157 170 allowBlank: false, 158 blankText: "Ce champ est nécessaire" 171 blankText: "Ce champ est nécessaire", 172 listeners: { 173 "select": onSelect, 174 scope: this 175 } 159 176 }); 160 177 } else { … … 163 180 value: '', 164 181 allowBlank: false, 165 blankText: "Ce champ est nécessaire" 182 blankText: "Ce champ est nécessaire", 183 listeners: { 184 "change": onSelect, 185 scope: this 186 } 166 187 }); 167 188 } 168 field.on('change', function(el, value) {169 if (recordIsDate) {170 var dt = new Date(value);171 value = dt.format('c');172 }173 this.filter.value = value;174 this.fireEvent("change", this.filter);175 }, this);176 189 177 190 this.valueContainer.remove(previousCmp);
