annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
1 [% META activation = 'singleton' class='Benzin::Web::View::DojoContext';
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
2
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
3 JSON = import('JSON');
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
4 MACRO ToJSON(arg) GET JSON.new.utf8(1).encode(arg);
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
5
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
6 theme = this.theme || 'tundra';
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
7 config = this.config || {};
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
8 dijitCss = cdn.dojo.dijit.themes.$theme.$theme.SetView('css');
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
9 dojoCss = cdn.dojo.dojo.resources.dojo.SetView('css');
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
10 dojoJs = cdn.dojo.Clone.SetView('js');
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
11 %]
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
12 <link type="text/css" rel="stylesheet" href="$dojoCss"/>
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
13 <link type="text/css" rel="stylesheet" href="$dijitCss"/>
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
14 <script type="text/javascript">
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
15 var dojoConfig = [% ToJSON(config) %]
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
16 </script>
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
17 <script type="text/javascript" src="$dojoJs.dojo.dojo"></script>
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
18 <script type="text/javascript">
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
19 [%
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
20 IF config.parseOnLoad;
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
21 this.AddJsModule('dojo/parser');
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
22 END;
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
23 'require(' _ ToJSON(this.modules) _ ');';
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
24 +%]
573272ec604b almost comlete doxygen library
sergey
parents:
diff changeset
25 </script>