aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base/common_scripts.html
blob: 42c04f11f38c1a0ce1d578afc4c6459b67843e7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
[%

USE date;
USE Math;

scripts = [];

scripts.push(
    start _ "/js/translation_strings." _ lang_code _ ".js?" _ Math.int( date.now / 3600 ),
    version('/jslib/jquery-1.7.2.min.js'),
    version('/js/validation_rules.js'),
    version('/js/jquery.validate.min.js'),
    version('/js/dropzone.min.js'),
    version('/js/jquery.multi-select.js'),
    version('/js/geo.min.js'),
    version('/cobrands/fixmystreet/fixmystreet.js'),
);

IF c.user_exists AND (c.user.from_body OR c.user.is_superuser);
    scripts.push(
        version('/cobrands/fixmystreet/staff.js')
    );
END;

FOR script IN map_js;
    scripts.push(script);
END;

scripts.push(
    version('/cobrands/fixmystreet/map.js'),
    version('/cobrands/fixmystreet/offline.js'),
);

IF admin;
    scripts.push(
        version('/js/jquery-ui/js/jquery-ui-1.10.3.custom.min.js'),
        version('/cobrands/fixmystreet/admin.js'),
    );
END;

FOR script IN extra_js;
    scripts.push(script);
END;

TRY;
    PROCESS 'footer_extra_js.html';
CATCH file;
END;

~%]