Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/webroot/rsrc/js/application/diffusion/behavior-pull-lastmodified.js
12241 views
1
/**
2
* @provides javelin-behavior-diffusion-pull-lastmodified
3
* @requires javelin-behavior
4
* javelin-dom
5
* javelin-util
6
* javelin-workflow
7
* javelin-json
8
*/
9
10
JX.behavior('diffusion-pull-lastmodified', function(config) {
11
12
new JX.Workflow(config.uri, {paths: JX.JSON.stringify(JX.keys(config.map))})
13
.setHandler(function(r) {
14
for (var k in r) {
15
for (var l in r[k]) {
16
if (!config.map[k][l]) {
17
continue;
18
}
19
try {
20
JX.DOM.setContent(JX.$(config.map[k][l]), JX.$H(r[k][l]));
21
} catch (ex) {
22
// The way this works is weird and sometimes the components get
23
// out of sync. Fail gently until we can eventually improve the
24
// underlying mechanism.
25
26
// In particular, we currently may generate lint information
27
// without generating a lint column. See T9524.
28
}
29
}
30
}
31
})
32
.start();
33
34
});
35
36