Mercurial > pub > site.implab
view shared_view/includes/dojo/context.tt @ 16:e69c970c3ddd default tip
sync
author | sergey |
---|---|
date | Tue, 20 May 2014 01:28:48 +0400 |
parents | 573272ec604b |
children |
line wrap: on
line source
[% META activation = 'singleton' class='Benzin::Web::View::DojoContext'; JSON = import('JSON'); MACRO ToJSON(arg) GET JSON.new.utf8(1).encode(arg); theme = this.theme || 'tundra'; config = this.config || {}; dijitCss = cdn.dojo.dijit.themes.$theme.$theme.SetView('css'); dojoCss = cdn.dojo.dojo.resources.dojo.SetView('css'); dojoJs = cdn.dojo.Clone.SetView('js'); %] <link type="text/css" rel="stylesheet" href="$dojoCss"/> <link type="text/css" rel="stylesheet" href="$dijitCss"/> <script type="text/javascript"> var dojoConfig = [% ToJSON(config) %] </script> <script type="text/javascript" src="$dojoJs.dojo.dojo"></script> <script type="text/javascript"> [% IF config.parseOnLoad; this.AddJsModule('dojo/parser'); END; 'require(' _ ToJSON(this.modules) _ ');'; +%] </script>