Changeset 553 for trunk/web2/addons/job_monarch/js
- Timestamp:
- 07/15/08 09:55:27 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web2/addons/job_monarch/js/jobgrid.js
r552 r553 119 119 { 120 120 bubbling = bubbling || false; 121 if(window.addEventListener) { // Standard 121 if(window.addEventListener) 122 { // Standard 122 123 element.addEventListener(type, expression, bubbling); 123 124 return true; 124 } else if(window.attachEvent) { // IE 125 } 126 else if(window.attachEvent) 127 { // IE 125 128 element.attachEvent('on' + type, expression); 126 129 return true; 127 } else return false; 130 } 131 else 132 return false; 128 133 } 129 134 … … 135 140 }; 136 141 137 ImageLoader.prototype = { 138 load:function(){ 142 ImageLoader.prototype = 143 { 144 load:function() 145 { 139 146 var url = this.url; 140 147 var image = this.image; 141 148 var loadEvent = this.loadEvent; 142 addListener(this.image, 'load', function(e){ 143 if(loadEvent != null){ 144 loadEvent(url, image); 149 addListener( this.image, 'load', function(e) 150 { 151 if( loadEvent != null ) 152 { 153 loadEvent( url, image ); 145 154 } 146 155 }, false); 147 156 this.image.src = this.url; 148 157 }, 149 getImage:function(){ 158 getImage: function() 159 { 150 160 return this.image; 151 161 } … … 161 171 162 172 var newClusterImage = new ImageLoader( 'clusterimage', img_url ); 163 newClusterImage.loadEvent = function( url, image ) {ClusterImageWindow.getBottomToolbar().clearStatus({useDefaults:true});} 173 newClusterImage.loadEvent = function( url, image ) 174 { 175 ClusterImageWindow.getBottomToolbar().clearStatus( { useDefaults:true } ); 176 } 164 177 165 178 ClusterImageWindow.getBottomToolbar().showBusy(); … … 235 248 id: 'JobsDataStore', 236 249 proxy: JobProxy, 237 baseParams: {task: "LISTING"}, // this parameter is passed for any HTTP request250 baseParams: { task: "LISTING" }, 238 251 reader: new Ext.data.JsonReader({ 239 252 root: 'results', … … 247 260 {name: 'name', type: 'string', mapping: 'name'}, 248 261 {name: 'requested_time', type: 'string', mapping: 'requested_time'}, 249 //{name: 'requested_memory', type: 'string', mapping: 'requested_memory'},262 {name: 'requested_memory', type: 'string', mapping: 'requested_memory'}, 250 263 {name: 'ppn', type: 'int', mapping: 'ppn'}, 251 264 {name: 'nodect', type: 'int', mapping: 'nodect'}, … … 255 268 {name: 'runningtime', type: 'string', mapping: 'runningtime'} 256 269 ]), 257 sortInfo: { field: 'jid', direction: "ASC"},270 sortInfo: { field: 'jid', direction: "DESC" }, 258 271 remoteSort: true 259 272 });
Note: See TracChangeset
for help on using the changeset viewer.