Skip to content

Commit 1fa8e37

Browse files
committed
Build: Finished themes-download target
1 parent 5074bf3 commit 1fa8e37

File tree

3 files changed

+25
-18
lines changed

3 files changed

+25
-18
lines changed

build/build.xml

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -275,25 +275,32 @@
275275
</target>
276276

277277
<target name="themes-download">
278-
<!-- to create query strings, execute this in Firebug on /download page:
279-
$("select option[value!=none]").map(function() { $(this).parent().val(this.value); return $(this).parents("form").serialize(); }).get().join("\n");
278+
<!-- to create/update query strings for the theme-file, execute this in Firebug on /download page:
279+
$("select option[value!=none]").map(function() { $(this).parent().val(this.value).change(); return $(this).parents("form").serialize(); }).get().join(",");
280280
-->
281-
<loadfile srcFile="theme" property="url" />
282-
<!-- downloads just one theme and unzips it -->
281+
<loadfile srcFile="themes" property="urls" />
282+
<property name="zip" value="${dist.dir}themes/tmp.zip" />
283283
<mkdir dir="${dist.dir}themes" />
284-
<get src="http://ui-dev.jquery.com/download/?${url}" dest="${dist.dir}themes/first.zip" />
285-
<unzip src="${dist.dir}themes/first.zip"
286-
dest="${dist.dir}themes/">
287-
<patternset>
288-
<include name="development-bundle/themes/**"/>
289-
<exclude name="development-bundle/themes/base/**"/>
290-
</patternset>
291-
<mapper type="glob" from="development-bundle/themes/*" to="*" />
292-
</unzip>
293-
<delete file="${dist.dir}themes/first.zip" />
294-
<!-- need to rename the concatented file, not yet working
295-
<copy file="${dist.dir}themes/**/jquery-ui*custom.css" tofile="${dist.dir}themes/**/jquery-ui.css"/>
296-
-->
284+
<for list="${urls}" param="url">
285+
<sequential>
286+
<get src="http://ui-dev.jquery.com/download/?@{url}" dest="${zip}" />
287+
<unzip src="${zip}"
288+
dest="${dist.dir}themes/">
289+
<patternset>
290+
<include name="development-bundle/themes/**"/>
291+
<exclude name="development-bundle/themes/base/**"/>
292+
</patternset>
293+
<mapper type="glob" from="development-bundle/themes/*" to="*" />
294+
</unzip>
295+
<delete file="${zip}" />
296+
</sequential>
297+
</for>
298+
<move todir="${dist.dir}themes/">
299+
<fileset dir="${dist.dir}themes/" />
300+
<mapper>
301+
<mapper type="regexp" from="(.*)jquery-ui-.*custom.css" to="\1jquery-ui.css" />
302+
</mapper>
303+
</move>
297304
</target>
298305

299306
<target name="whitespace">

build/theme

Lines changed: 0 additions & 1 deletion
This file was deleted.

build/themes

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)