Reorganize dialog style

Move client side templates from "handlebars_templates" to
"templates_src/client_side"
This commit is contained in:
Dmitriy Simushev 2014-02-14 11:44:14 +00:00
parent 9e82414728
commit 921f382c6a
25 changed files with 14 additions and 14 deletions

View File

@ -18,20 +18,20 @@
<apply executable="mkdir" addsourcefile="false"> <apply executable="mkdir" addsourcefile="false">
<targetfile /> <targetfile />
<dirset dir="."> <dirset dir=".">
<include name="${dialogs_styles_path}/*/handlebars_templates" /> <include name="${dialogs_styles_path}/*/templates_src/client_side" />
</dirset> </dirset>
<mapper type="glob" from="*/handlebars_templates" to="*/handlebars_templates_tmp" /> <mapper type="glob" from="*/templates_src/client_side" to="*/templates_compiled/client_side_tmp" />
</apply> </apply>
<!-- Flatten templates directory structure --> <!-- Flatten templates directory structure -->
<apply executable="tools/flat_cp" force="true"> <apply executable="tools/flat_cp" force="true">
<srcfile /> <srcfile />
<targetfile /> <targetfile />
<arg value="handlebars_templates" /> <arg value="client_side" />
<fileset dir="."> <fileset dir=".">
<include name="${dialogs_styles_path}/*/handlebars_templates/**/*.handlebars" /> <include name="${dialogs_styles_path}/*/templates_src/client_side/**/*.handlebars" />
</fileset> </fileset>
<mapper type="regexp" from="^(.*)/handlebars_templates/(.*)$$" to="\1/handlebars_templates_tmp" /> <mapper type="regexp" from="^(.*)/templates_src/client_side/(.*)$$" to="\1/templates_compiled/client_side_tmp" />
</apply> </apply>
<echo>Compile templates</echo> <echo>Compile templates</echo>
@ -41,13 +41,13 @@
<arg value="-f"/> <arg value="-f"/>
<targetfile /> <targetfile />
<dirset dir="."> <dirset dir=".">
<include name="${dialogs_styles_path}/*/handlebars_templates_tmp" /> <include name="${dialogs_styles_path}/*/templates_compiled/client_side_tmp" />
</dirset> </dirset>
<mapper type="glob" from="*/handlebars_templates_tmp" to="*/js/compiled/templates_tmp.js" /> <mapper type="glob" from="*/client_side_tmp" to="*/client_side/templates_tmp.js" />
</apply> </apply>
<!-- Use closule compiler instead of handlebars minifyer (-m flag) <!-- Use closule compiler instead of handlebars minifyer (-m flag)
because of handlebars not insert line breaks. because of handlebars does not insert line breaks.
Very long lines are cutted by ant and this brings problems --> Very long lines are cutted by ant and this brings problems -->
<apply executable="java"> <apply executable="java">
<arg value="-jar" /> <arg value="-jar" />
@ -57,7 +57,7 @@
<arg value="--js_output_file" /> <arg value="--js_output_file" />
<targetfile /> <targetfile />
<fileset dir="."> <fileset dir=".">
<include name="${dialogs_styles_path}/*/js/compiled/templates_tmp.js" /> <include name="${dialogs_styles_path}/*/templates_compiled/client_side/templates_tmp.js" />
</fileset> </fileset>
<mapper type="glob" from="*_tmp.js" to="*_tmp.c.js" /> <mapper type="glob" from="*_tmp.js" to="*_tmp.c.js" />
</apply> </apply>
@ -66,7 +66,7 @@
some info to files --> some info to files -->
<move todir="${dialogs_styles_path}" overwrite="true"> <move todir="${dialogs_styles_path}" overwrite="true">
<fileset dir="${dialogs_styles_path}"/> <fileset dir="${dialogs_styles_path}"/>
<mapper type="glob" from="*/js/compiled/templates_tmp.c.js" to="*/js/compiled/templates.js"/> <mapper type="glob" from="*/templates_compiled/client_side/templates_tmp.c.js" to="*/templates_compiled/client_side/templates.js"/>
<filterchain> <filterchain>
<!-- Add header --> <!-- Add header -->
@ -80,19 +80,19 @@
<!-- Remove all temporary files --> <!-- Remove all temporary files -->
<!-- Use system 'rm' instead of ant <!-- Use system 'rm' instead of ant
'delete' task because it do not work with dirsets --> 'delete' task because it does not work with dirsets -->
<echo>Remove temporary files</echo> <echo>Remove temporary files</echo>
<apply executable="rm"> <apply executable="rm">
<arg value="-r" /> <arg value="-r" />
<arg value="-f" /> <arg value="-f" />
<dirset dir="."> <dirset dir=".">
<include name="${dialogs_styles_path}/*/handlebars_templates_tmp" /> <include name="${dialogs_styles_path}/*/templates_compiled/client_side_tmp" />
</dirset> </dirset>
</apply> </apply>
<delete> <delete>
<fileset dir="."> <fileset dir=".">
<include name="${dialogs_styles_path}/*/js/compiled/templates_tmp.js" /> <include name="${dialogs_styles_path}/*/templates_compiled/client_side/templates_tmp.js" />
</fileset> </fileset>
</delete> </delete>

View File

@ -15,7 +15,7 @@
<script type="text/javascript" src="{{mibewRoot}}/js/libs/handlebars.js"></script> <script type="text/javascript" src="{{mibewRoot}}/js/libs/handlebars.js"></script>
<!-- Javascript templates --> <!-- Javascript templates -->
<script type="text/javascript" src="{{stylePath}}/js/compiled/templates.js"></script> <script type="text/javascript" src="{{stylePath}}/templates_compiled/client_side/templates.js"></script>
<!-- Application files --> <!-- Application files -->
<script type="text/javascript" src="{{mibewRoot}}/js/compiled/mibewapi.js"></script> <script type="text/javascript" src="{{mibewRoot}}/js/compiled/mibewapi.js"></script>