mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-13 02:12:41 +01:00
23 lines
498 B
JavaScript
23 lines
498 B
JavaScript
|
/**
|
||
|
* @provides javelin-behavior-differential-populate
|
||
|
*/
|
||
|
|
||
|
JX.behavior('differential-populate', function(config) {
|
||
|
|
||
|
function onresponse(target, response) {
|
||
|
JX.DOM.replace(JX.$(target), JX.HTML(response));
|
||
|
}
|
||
|
|
||
|
var uri;
|
||
|
for (var k in config.registry) {
|
||
|
uri = config.uri + config.registry[k][0] + '/';
|
||
|
new JX.Request(uri, JX.bind(null, onresponse, k))
|
||
|
.setData({
|
||
|
against: config.registry[k][1],
|
||
|
whitespace: config.whitespace
|
||
|
})
|
||
|
.send();
|
||
|
}
|
||
|
|
||
|
});
|