1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-15 19:32:40 +01:00
phorge-phorge/webroot/rsrc/js/application/differential/behavior-populate.js

23 lines
501 B
JavaScript
Raw Normal View History

2011-01-25 20:57:47 +01:00
/**
* @provides javelin-behavior-differential-populate
2011-01-26 00:19:06 +01:00
* @requires javelin-lib-dev
2011-01-25 20:57:47 +01:00
*/
JX.behavior('differential-populate', function(config) {
function onresponse(target, response) {
JX.DOM.replace(JX.$(target), JX.HTML(response));
}
for (var k in config.registry) {
new JX.Request(config.uri, JX.bind(null, onresponse, k))
2011-01-25 20:57:47 +01:00
.setData({
id: config.registry[k][0],
2011-02-04 00:41:58 +01:00
vs: config.registry[k][1],
2011-01-25 20:57:47 +01:00
whitespace: config.whitespace
})
.send();
}
});