Permalink
Browse files

Gallery Build Tag: gallery-2011.03.09-21-14

  • Loading branch information...
1 parent c905196 commit fadacee97434da20dbba6f2a91617014a0e50157 YUI Builder committed Mar 9, 2011
@@ -0,0 +1,96 @@
+YUI.add('gallery-google-maps-loader', function(Y) {
+
+'use strict';
+
+var _loaded = false,
+
+ _class;
+
+_class = function (config) {
+ _class.superclass.constructor.call(this, config);
+};
+
+_class.ATTRS = {
+ source: {
+ value: 'http://maps.google.com/maps/api/js'
+ },
+ timeout: {
+ value: 30000
+ }
+};
+
+_class.NAME = 'GoogleMapsLoader';
+
+Y.extend(_class, Y.Base, {
+ initializer: function () {
+ this.publish('failure');
+ this.publish('success', {
+ fireOnce: true
+ });
+ this.publish('timeout');
+ },
+ isLoaded: function () {
+ return _loaded;
+ },
+ load: function (parameters) {
+ if (_loaded) {
+ return;
+ }
+
+ if (!parameters) {
+ parameters = {};
+ }
+
+ var language = parameters.language,
+ libraries = parameters.libraries,
+ region = parameters.region,
+ sensor = parameters.sensor,
+ timeout = parameters.timeout || this.get('timeout'),
+ url = (parameters.source || this.get('source')) + '?callback={callback}',
+ version = parameters.version;
+
+ if (language) {
+ url += '&language=' + language;
+ }
+
+ if (libraries) {
+ if (Y.Lang.isArray(libraries)) {
+ libraries = libraries.join(',');
+ }
+
+ url += '&libraries=' + libraries;
+ }
+
+ if (region) {
+ url += '&region=' + region;
+ }
+
+ url += '&sensor=' + (sensor ? 'true' : 'false');
+
+ if (version) {
+ url += '&v=' + version;
+ }
+
+ Y.jsonp(url, {
+ context: this,
+ on: {
+ failure: function () {
+ this.fire('failure');
+ },
+ success: function () {
+ _loaded = true;
+ this.fire('success');
+ },
+ timeout: function () {
+ this.fire('timeout');
+ }
+ },
+ timeout: timeout
+ });
+ }
+});
+
+Y.GoogleMapsLoader = new _class();
+
+
+}, 'gallery-2011.03.09-21-14' ,{requires:['base', 'jsonp'], skinnable:false});

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -0,0 +1,96 @@
+YUI.add('gallery-google-maps-loader', function(Y) {
+
+'use strict';
+
+var _loaded = false,
+
+ _class;
+
+_class = function (config) {
+ _class.superclass.constructor.call(this, config);
+};
+
+_class.ATTRS = {
+ source: {
+ value: 'http://maps.google.com/maps/api/js'
+ },
+ timeout: {
+ value: 30000
+ }
+};
+
+_class.NAME = 'GoogleMapsLoader';
+
+Y.extend(_class, Y.Base, {
+ initializer: function () {
+ this.publish('failure');
+ this.publish('success', {
+ fireOnce: true
+ });
+ this.publish('timeout');
+ },
+ isLoaded: function () {
+ return _loaded;
+ },
+ load: function (parameters) {
+ if (_loaded) {
+ return;
+ }
+
+ if (!parameters) {
+ parameters = {};
+ }
+
+ var language = parameters.language,
+ libraries = parameters.libraries,
+ region = parameters.region,
+ sensor = parameters.sensor,
+ timeout = parameters.timeout || this.get('timeout'),
+ url = (parameters.source || this.get('source')) + '?callback={callback}',
+ version = parameters.version;
+
+ if (language) {
+ url += '&language=' + language;
+ }
+
+ if (libraries) {
+ if (Y.Lang.isArray(libraries)) {
+ libraries = libraries.join(',');
+ }
+
+ url += '&libraries=' + libraries;
+ }
+
+ if (region) {
+ url += '&region=' + region;
+ }
+
+ url += '&sensor=' + (sensor ? 'true' : 'false');
+
+ if (version) {
+ url += '&v=' + version;
+ }
+
+ Y.jsonp(url, {
+ context: this,
+ on: {
+ failure: function () {
+ this.fire('failure');
+ },
+ success: function () {
+ _loaded = true;
+ this.fire('success');
+ },
+ timeout: function () {
+ this.fire('timeout');
+ }
+ },
+ timeout: timeout
+ });
+ }
+});
+
+Y.GoogleMapsLoader = new _class();
+
+
+}, 'gallery-2011.03.09-21-14' ,{requires:['base', 'jsonp'], skinnable:false});
@@ -76,7 +76,7 @@ YUI.add('gallery-oauth', function(Y) {
}
paramList = baseStr[2][0].split("&");
- paramList.push("oauth_signature="+theSig);
+ paramList.push("oauth_signature=" + encodeURIComponent(theSig));
paramList.sort(function(a,b) {
if (a[0] < b[0]) { return -1; }
if (a[0] > b[0]) { return 1; }
@@ -127,4 +127,4 @@ YUI.add('gallery-oauth', function(Y) {
}
-}, 'gallery-2010.08.11-20-39' ,{requires:['jsonp'], optional:['yql']});
+}, 'gallery-2011.03.09-21-14' ,{optional:['yql'], requires:['jsonp']});

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -76,7 +76,7 @@ YUI.add('gallery-oauth', function(Y) {
}
paramList = baseStr[2][0].split("&");
- paramList.push("oauth_signature="+theSig);
+ paramList.push("oauth_signature=" + encodeURIComponent(theSig));
paramList.sort(function(a,b) {
if (a[0] < b[0]) { return -1; }
if (a[0] > b[0]) { return 1; }
@@ -127,4 +127,4 @@ YUI.add('gallery-oauth', function(Y) {
}
-}, 'gallery-2010.08.11-20-39' ,{requires:['jsonp'], optional:['yql']});
+}, 'gallery-2011.03.09-21-14' ,{optional:['yql'], requires:['jsonp']});
@@ -43,10 +43,6 @@ Y.CustomEvent.prototype.fireComplex = function(args) {
self.events = events;
- if (self.preventedFn) {
- events.on('prevented', self.preventedFn);
- }
-
if (self.stoppedFn) {
events.on('stopped', self.stoppedFn);
}
@@ -163,4 +159,4 @@ Y.CustomEvent.prototype.fireComplex = function(args) {
};
-}, 'gallery-2011.02.09-21-32' ,{requires:['event-custom-complex']});
+}, 'gallery-2011.03.09-21-14' ,{requires:['event-custom-complex']});

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -43,10 +43,6 @@ Y.CustomEvent.prototype.fireComplex = function(args) {
self.events = events;
- if (self.preventedFn) {
- events.on('prevented', self.preventedFn);
- }
-
if (self.stoppedFn) {
events.on('stopped', self.stoppedFn);
}
@@ -163,4 +159,4 @@ Y.CustomEvent.prototype.fireComplex = function(args) {
};
-}, 'gallery-2011.02.09-21-32' ,{requires:['event-custom-complex']});
+}, 'gallery-2011.03.09-21-14' ,{requires:['event-custom-complex']});

0 comments on commit fadacee

Please sign in to comment.