277 |
Object.extend(WebPAC.Updater.prototype, { |
Object.extend(WebPAC.Updater.prototype, { |
278 |
initialize: function(container, url, options) { |
initialize: function(container, url, options) { |
279 |
Logger.debug('WebPAC.Updater initialize '+container+','+url+','+options); |
Logger.debug('WebPAC.Updater initialize '+container+','+url+','+options); |
280 |
url += '/ajax'; |
if (url.indexOf('/ajax') == -1) { |
281 |
|
var pos = url.indexOf('?'); |
282 |
|
if (pos == -1) { |
283 |
|
url += '/ajax'; |
284 |
|
} else { |
285 |
|
url = url.substring(0,pos) + '/ajax' + url.substring(pos); |
286 |
|
} |
287 |
|
Logger.debug('added /ajax to '+url+' pos:'+pos); |
288 |
|
} |
289 |
|
Logger.info('using AJAX to update "'+container+'" from '+url); |
290 |
this.updater = new Ajax.Updater(container, url, options); |
this.updater = new Ajax.Updater(container, url, options); |
291 |
$('_ajax').value = 1; |
$('_ajax').value = 1; |
|
if ($('_ajax').value) Logger.info("using AJAX"); |
|
292 |
} |
} |
293 |
}); |
}); |
294 |
|
|