From c87237141316c3cdf3522c450d2658ebb4642560 Mon Sep 17 00:00:00 2001 From: Rafael Xavier de Souza Date: Wed, 4 Sep 2013 09:33:16 -0300 Subject: [PATCH 01/22] Update handlebars to 1.0.12 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d13fdf76..0ecc6c45 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "grunt-contrib-handlebars": "0.5.7", "grunt-contrib-jshint": "0.2.0", "grunt-contrib-uglify": "0.2.0", - "handlebars": "1.0.10", + "handlebars": "1.0.12", "lzma": "1.2.1", "optimist": "0.3.4", "rimraf": "2.0.2", From 91e130dcca1d9bc1416c881c99ce0ea4032b0b00 Mon Sep 17 00:00:00 2001 From: Rafael Xavier de Souza Date: Wed, 4 Sep 2013 09:33:59 -0300 Subject: [PATCH 02/22] Fix build of jquery.ui.theme.min.css --- lib/builder.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/builder.js b/lib/builder.js index 5190b0cd..62b6d20b 100644 --- a/lib/builder.js +++ b/lib/builder.js @@ -59,10 +59,6 @@ function Builder( jqueryUi, components, options ) { this.baseThemeFiles = files.baseThemeFiles; this.baseThemeMinFiles = files.baseThemeFiles.filter( selected ).map( min ); - this.baseThemeMinFiles.push({ - path: "themes/base/jquery.ui.theme.min.css", - data: banner( jqueryUi.pkg, null, { minify: true } ) + this.baseCssMin - }); this.baseThemeExceptThemeOrImages = files.baseThemeFiles.filter(function( file ) { if ( (/jquery.ui.theme|jquery-ui|images/).test( file.path ) ) { @@ -131,6 +127,10 @@ function Builder( jqueryUi, components, options ) { baseCss = util.scope( baseCss, options.scope ); baseCssMin = util.scope( baseCssMin, options.scope ); } + this.baseThemeMinFiles.push({ + path: "themes/base/jquery.ui.theme.min.css", + data: banner( jqueryUi.pkg, null, { minify: true } ) + baseCssMin + }); _bundleCss = function( base, theme, options ) { var bundleCss = base, fileNames = cssComponentFileNames; From cbafa0802f4537093205590b1c965cbefd119953 Mon Sep 17 00:00:00 2001 From: Rafael Xavier de Souza Date: Wed, 4 Sep 2013 09:55:22 -0300 Subject: [PATCH 03/22] Fix variable name s/jquery/jqueryCore/g --- template/zip/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/zip/index.html b/template/zip/index.html index 3a4dd675..9b10f581 100644 --- a/template/zip/index.html +++ b/template/zip/index.html @@ -154,7 +154,7 @@

Welcome to jQuery UI!

-

This page demonstrates the widgets you downloaded using the theme you selected in the download builder. We've included and linked to minified versions of jQuery, your personalized copy of jQuery UI (js/jquery-ui-{{ui.version}}.custom.min.js), and css/{{theme}}/jquery-ui-{{ui.version}}.custom.min.css which imports the entire jQuery UI CSS Framework. You can choose to link a subset of the CSS Framework depending on your needs.

+

This page demonstrates the widgets you downloaded using the theme you selected in the download builder. We've included and linked to minified versions of jQuery, your personalized copy of jQuery UI (js/jquery-ui-{{ui.version}}.custom.min.js), and css/{{theme}}/jquery-ui-{{ui.version}}.custom.min.css which imports the entire jQuery UI CSS Framework. You can choose to link a subset of the CSS Framework depending on your needs.

You've downloaded components and a theme that are compatible with jQuery 1.6+. Please make sure you are using jQuery 1.6+ in your production environment.

From 8b86c93f484c4c9ee24bcf5915ce5406920f8156 Mon Sep 17 00:00:00 2001 From: Rafael Xavier de Souza Date: Wed, 4 Sep 2013 13:19:59 -0300 Subject: [PATCH 04/22] 1.10.3-5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0ecc6c45..d99cf76e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "download.jqueryui.com", - "version": "1.10.3-4", + "version": "1.10.3-5", "dependencies": { "archiver": "0.4.1", "async": "0.1.22", From d98b59ca08087595efec5dbbd912364c43504439 Mon Sep 17 00:00:00 2001 From: Rafael Xavier de Souza Date: Thu, 10 Oct 2013 08:34:00 -0300 Subject: [PATCH 05/22] Throw error when vars.zThemeParams is used to instantiate a new theme --- lib/themeroller.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/themeroller.js b/lib/themeroller.js index 0102e524..89ec8bc7 100644 --- a/lib/themeroller.js +++ b/lib/themeroller.js @@ -97,6 +97,9 @@ function ThemeRoller( options ) { delete vars.name; delete vars.scope; } + if ( vars.zThemeParams ) { + throw new Error( "vars.zThemeParams unsupported at the moment. Unzipped vars only. (or need to make ThemeRoller async)" ); + } if ( options.jqueryUi instanceof JqueryUi ) { this.jqueryUi = options.jqueryUi; } else if ( options.version ) { From 1633bad5c4255370b1e5f7db7c68d5a7ccfe8db4 Mon Sep 17 00:00:00 2001 From: Rafael Xavier de Souza Date: Thu, 10 Oct 2013 10:38:21 -0300 Subject: [PATCH 06/22] Model's on("change") must be executed before user's on("change"). So, triggering a new event called change:before for that purpose. - Due to the non deterministic execution order of events, download#themeUrl() failed to prevent zThemeParams to be sent together with unzipped params. Because, the deferred themeParamsUnzipping had no effect if this.on("change") was executed after user's model.on("change"). This issue caused #160, and #168. This issue has been fixed by fixing the execution order of the events: [change:before, change]; --- app/src/model.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/model.js b/app/src/model.js index 9a278759..a6434aad 100644 --- a/app/src/model.js +++ b/app/src/model.js @@ -143,6 +143,7 @@ } }); if ( changed ) { + this.emitter.trigger( "change:before", [ changedAttributes, createdAttributes ] ); this.emitter.trigger( "change", [ changedAttributes, createdAttributes ] ); } return this; @@ -207,7 +208,7 @@ this.host = obj.host; this.orderedComponentsDfd = $.Deferred(); this.themeParamsUnzipping = $.Deferred().resolve(); - this.on( "change", $.proxy( this._change, this ) ); + this.on( "change:before", $.proxy( this._change, this ) ); }; $.extend( DownloadBuilderModel.prototype, Model.prototype, { @@ -381,7 +382,7 @@ Model.call( this ); this.baseVars = obj.baseVars; this.host = obj.host; - this.on( "change", $.proxy( this._change, this ) ); + this.on( "change:before", $.proxy( this._change, this ) ); }; $.extend( ThemeRollerModel.prototype, Model.prototype, { From 081b3df6f4b97d97ee2ce367f78d3644c45f2221 Mon Sep 17 00:00:00 2001 From: Rafael Xavier de Souza Date: Thu, 10 Oct 2013 11:02:18 -0300 Subject: [PATCH 07/22] Don't send zThemeParams param when requesting /themeroller/parsetheme.css --- app/src/model.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/model.js b/app/src/model.js index a6434aad..ff5abfae 100644 --- a/app/src/model.js +++ b/app/src/model.js @@ -465,7 +465,7 @@ }, parsethemeUrl: function() { - var attributes = omit( this.attributes, [ "downloadParams" ] ), + var attributes = omit( this.attributes, [ "downloadParams", "zThemeParams" ] ), downloadParams = ( "downloadParams" in this.attributes ? QueryString.decode( this.attributes.downloadParams ) : {} ); if ( downloadParams.version ) { attributes.version = downloadParams.version; From b735552862e64073a2c5aa6901d83e67ff52edae Mon Sep 17 00:00:00 2001 From: Rafael Xavier de Souza Date: Thu, 10 Oct 2013 11:03:57 -0300 Subject: [PATCH 08/22] Ignore zThemeParams on GET /themeroller --- themeroller.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/themeroller.js b/themeroller.js index 071fa831..7d81f36e 100644 --- a/themeroller.js +++ b/themeroller.js @@ -42,6 +42,9 @@ var Frontend = function( args ) { Frontend.prototype = { index: function( vars, options ) { + if ( vars && "zThemeParams" in vars ) { + delete vars.zThemeParams; + } var theme = new ThemeRoller({ vars: vars }); From f505dc64a67625e5b7376c656607fef9225449d8 Mon Sep 17 00:00:00 2001 From: Rafael Xavier de Souza Date: Thu, 10 Oct 2013 16:36:56 -0300 Subject: [PATCH 09/22] Schedule a new cache cleanup at the end of cacheCron (not at the end of each cache cleanup) --- lib/cache.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cache.js b/lib/cache.js index 7a72eabe..f858f1c8 100644 --- a/lib/cache.js +++ b/lib/cache.js @@ -21,8 +21,8 @@ cacheCron = function() { }); logger.log( cache.name + " Cleanup:", count ); - cacheCronTimeout = setTimeout( cacheCron, cacheExpiresTime ); }); + cacheCronTimeout = setTimeout( cacheCron, cacheExpiresTime ); }; Cache = function( name ) { From 99cdee5e24e337ea2aed2f9a3e4c02a0afa41d8a Mon Sep 17 00:00:00 2001 From: Rafael Xavier de Souza Date: Thu, 10 Oct 2013 16:50:38 -0300 Subject: [PATCH 10/22] 1.10.3-6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d99cf76e..f79d2871 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "download.jqueryui.com", - "version": "1.10.3-5", + "version": "1.10.3-6", "dependencies": { "archiver": "0.4.1", "async": "0.1.22", From aeead7081466ade08c4f2197637b2156ffab93df Mon Sep 17 00:00:00 2001 From: Rafael Xavier de Souza Date: Thu, 10 Oct 2013 16:59:53 -0300 Subject: [PATCH 11/22] Minor fix "Throw error when vars.zThemeParams is used to instantiate a new theme" --- lib/themeroller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/themeroller.js b/lib/themeroller.js index 89ec8bc7..21a7a536 100644 --- a/lib/themeroller.js +++ b/lib/themeroller.js @@ -97,7 +97,7 @@ function ThemeRoller( options ) { delete vars.name; delete vars.scope; } - if ( vars.zThemeParams ) { + if ( vars && vars.zThemeParams ) { throw new Error( "vars.zThemeParams unsupported at the moment. Unzipped vars only. (or need to make ThemeRoller async)" ); } if ( options.jqueryUi instanceof JqueryUi ) { From a84ff881a4c85dab63d5f65af7df560c3cdff301 Mon Sep 17 00:00:00 2001 From: Rafael Xavier de Souza Date: Thu, 10 Oct 2013 17:42:07 -0300 Subject: [PATCH 12/22] 1.10.3-7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f79d2871..507cde04 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "download.jqueryui.com", - "version": "1.10.3-6", + "version": "1.10.3-7", "dependencies": { "archiver": "0.4.1", "async": "0.1.22", From 39fdabf1d17aac54eb448f7a56e976cc19f7737b Mon Sep 17 00:00:00 2001 From: Rafael Xavier de Souza Date: Thu, 10 Oct 2013 15:40:54 -0300 Subject: [PATCH 13/22] Show service status on download page --- Gruntfile.js | 2 +- app/src/download.js | 23 ++++++++++++----------- template/download/index.html | 1 + template/download/service_status.html | 8 ++++++++ 4 files changed, 22 insertions(+), 12 deletions(-) create mode 100644 template/download/service_status.html diff --git a/Gruntfile.js b/Gruntfile.js index e5ff40ef..8acc9295 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -23,7 +23,7 @@ grunt.initConfig({ }, compile: { files: { - "app/src/template/download.js": [ "template/download/components.html", "template/download/theme.html" ], + "app/src/template/download.js": [ "template/download/components.html", "template/download/service_status.html", "template/download/theme.html" ], "app/src/template/themeroller.js": [ "template/themeroller/rollyourown.html", "template/themeroller/_rollyourown_group_corner.html", "template/themeroller/_rollyourown_group_default.html", "template/themeroller/_rollyourown_group_dropshadow.html", "template/themeroller/_rollyourown_group_font.html", "template/themeroller/_rollyourown_group_modaloverlay.html" ] } } diff --git a/app/src/download.js b/app/src/download.js index d69a9da3..899b8c90 100644 --- a/app/src/download.js +++ b/app/src/download.js @@ -35,12 +35,21 @@ }); } + function renderServiceStatus( xhr ) { + var element = $( JST[ "service_status.html" ]({ + status: xhr.status, + statusText: xhr.statusText, + responseText: xhr.responseText + })); + $( "#service-status" ).html( element ); + } + function themeFetch() { var dfd = $.Deferred(); model.themeUrl(function( url ) { $.ajax( url, { dataType: "jsonp" - }).done( dfd.resolve ).fail( dfd.fail ); + }).done( dfd.resolve ).fail( dfd.reject ); }); return dfd; } @@ -314,11 +323,7 @@ model.unsetOrderedComponents(); componentsFetch().done(function( components ) { initComponents( components ); - }).fail(function() { - if ( console && console.log ) { - console.log( "Failed loading components section", arguments ); - } - }); + }).fail( renderServiceStatus ); componentsLoad = $.Deferred(); } } @@ -406,10 +411,6 @@ }); themesLoad.resolve(); - }).fail(function() { - if ( console && console.log ) { - console.log( "Failed loading theme section", arguments ); - } - }); + }).fail( renderServiceStatus ); }( jQuery, Hash, JST, Model ) ); diff --git a/template/download/index.html b/template/download/index.html index 3e028357..9668cc88 100644 --- a/template/download/index.html +++ b/template/download/index.html @@ -10,6 +10,7 @@ All jQuery UI Downloads

+

Version

{{#each jqueryUis}} diff --git a/template/download/service_status.html b/template/download/service_status.html new file mode 100644 index 00000000..ec33fd99 --- /dev/null +++ b/template/download/service_status.html @@ -0,0 +1,8 @@ +
+
+

Service unavailable

+

{{status}} {{statusText}}

+
{{{responseText}}}
+

Check or report issues here

+
+
From 5fb394edabc92394989c8a02aaf1ddbb726fc56c Mon Sep 17 00:00:00 2001 From: Rafael Xavier de Souza Date: Fri, 25 Oct 2013 13:55:24 -0200 Subject: [PATCH 14/22] 1.10.3-8 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 507cde04..92a1ead9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "download.jqueryui.com", - "version": "1.10.3-7", + "version": "1.10.3-8", "dependencies": { "archiver": "0.4.1", "async": "0.1.22", From cf30a35006f07969c69b744e3323106d0fb2de14 Mon Sep 17 00:00:00 2001 From: Rafael Xavier de Souza Date: Wed, 18 Dec 2013 17:34:31 -0200 Subject: [PATCH 15/22] Delete unzipped.zThemeParams for precaution Make sure there's no zThemeParams attribute in unzipped object, due to former bug #171 fixed by 1633bad. Fixes #185 --- app/src/model.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/model.js b/app/src/model.js index ff5abfae..bfd0b0aa 100644 --- a/app/src/model.js +++ b/app/src/model.js @@ -231,6 +231,9 @@ this.themeParamsUnzipping = $.Deferred(); delete changed.zThemeParams; unzip( this.get( "zThemeParams" ), function( unzipped ) { + // Make sure there's no zThemeParams attribute in unzipped object, due to former bug #171 fixed by 1633bad. + delete unzipped.zThemeParams; + delete self.attributes.zThemeParams; self.set.call( self, { themeParams: QueryString.encode( unzipped ) From 35c306dde30c9cdbddf82c5a9b847ab1da50403d Mon Sep 17 00:00:00 2001 From: Rafael Xavier de Souza Date: Wed, 18 Dec 2013 17:48:55 -0200 Subject: [PATCH 16/22] 1.10.3-9 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 92a1ead9..8e6759d7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "download.jqueryui.com", - "version": "1.10.3-8", + "version": "1.10.3-9", "dependencies": { "archiver": "0.4.1", "async": "0.1.22", From 96cbecd6292de18028248690ffdf00ccc0fa5120 Mon Sep 17 00:00:00 2001 From: Rafael Xavier de Souza Date: Thu, 9 Jan 2014 15:54:33 -0200 Subject: [PATCH 17/22] 1.10.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8e6759d7..a6272530 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "download.jqueryui.com", - "version": "1.10.3-9", + "version": "1.10.4", "dependencies": { "archiver": "0.4.1", "async": "0.1.22", From 9087999d0fd1b016121fbb8f384950ff77369c68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Fri, 17 Jan 2014 09:49:05 -0500 Subject: [PATCH 18/22] Config: Replace 1.10.3 with 1.10.4 --- config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.json b/config.json index 67c93c5c..42c5ee4a 100644 --- a/config.json +++ b/config.json @@ -1,7 +1,7 @@ { "jqueryUi": { "stable": { - "version": "1.10.3", + "version": "1.10.4", "dependsOn": "jQuery1.6+" }, "legacy": { From 9a159be6ae9e7af99742df43851ec0a0e96b60af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Fri, 17 Jan 2014 09:49:26 -0500 Subject: [PATCH 19/22] 1.10.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a6272530..3885587b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "download.jqueryui.com", - "version": "1.10.4", + "version": "1.10.5", "dependencies": { "archiver": "0.4.1", "async": "0.1.22", From 744a2fd5c0f6bea238c3f71b0ffb8057e388fca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Fri, 17 Jan 2014 12:51:15 -0500 Subject: [PATCH 20/22] 1.10.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3885587b..8e87f5d4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "download.jqueryui.com", - "version": "1.10.5", + "version": "1.10.7", "dependencies": { "archiver": "0.4.1", "async": "0.1.22", From d89901541a9b61b612aa3a92e7bff77683dd1d26 Mon Sep 17 00:00:00 2001 From: Rafael Xavier de Souza Date: Wed, 29 Jan 2014 14:07:04 -0200 Subject: [PATCH 21/22] Builder: Fix I18n bundle banner includes list --- lib/builder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/builder.js b/lib/builder.js index 62b6d20b..1f791d16 100644 --- a/lib/builder.js +++ b/lib/builder.js @@ -86,7 +86,7 @@ function Builder( jqueryUi, components, options ) { }); this.bundleI18nMin = Files({ path: "jquery-ui-i18n.min.js", - data: banner( jqueryUi.pkg, files.i18nFiles.map( path.basename ), { minify: true }) + stripBanner( files.min( this.bundleI18n[ 0 ] ) ) + data: banner( jqueryUi.pkg, files.i18nFiles.paths().map( path.basename ), { minify: true }) + stripBanner( files.min( this.bundleI18n[ 0 ] ) ) }); } else { this.i18nFiles = this.i18nMinFiles = this.bundleI18n = this.bundleI18nMin = Files(); From f16117c0cb21a9a8530b9120a5cba79e98681909 Mon Sep 17 00:00:00 2001 From: Rafael Xavier de Souza Date: Wed, 29 Jan 2014 14:29:52 -0200 Subject: [PATCH 22/22] 1.10.8 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8e87f5d4..729cb618 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "download.jqueryui.com", - "version": "1.10.7", + "version": "1.10.8", "dependencies": { "archiver": "0.4.1", "async": "0.1.22",