Skip to content

Commit

Permalink
Gallery Build Tag: gallery-2011.04.06-19-44
Browse files Browse the repository at this point in the history
  • Loading branch information
YUI Builder committed Apr 6, 2011
1 parent d3cbfdb commit bb5f627
Show file tree
Hide file tree
Showing 23 changed files with 2,889 additions and 621 deletions.
105 changes: 105 additions & 0 deletions build/gallery-audio/gallery-audio-debug.js
@@ -0,0 +1,105 @@
YUI.add('gallery-audio', function(Y) {

'use strict';

var _playable = {};

(function (modernizr) {
if (modernizr) {
if (modernizr.audio) {
_playable.m4a = modernizr.audio.m4a;
_playable.mp3 = modernizr.audio.mp3;
_playable.ogg = modernizr.audio.ogg;
_playable.wav = modernizr.audio.wav;
}
return;
}

var audioElement = Y.config.doc.createElement('audio');

if (!audioElement.canPlayType) {
return;
}

_playable.m4a = audioElement.canPlayType('audio/x-m4a;') || audioElement.canPlayType('audio/aac;');
_playable.mp3 = audioElement.canPlayType('audio/mpeg;');
_playable.ogg = audioElement.canPlayType('audio/ogg; codecs="vorbis"');
_playable.wav = audioElement.canPlayType('audio/wav; codecs="1"');
}(Y.Modernizr || Y.config.win.Modernizr));

Y.Audio = {
create: function (config) {
config = config || {};

var format,
formats = config.format || [
'ogg',
'mp3',
'm4a',
'wav'
],
i,
length,
playable,
source = config.baseUrl || '',
testFormat;

if (Y.Lang.isArray(formats)) {
for (i = 0, length = formats.length; i < length; i += 1) {
testFormat = formats[i];
playable = _playable[testFormat];

if (!playable) {
continue;
}

if (playable === 'probably') {
format = testFormat;
break;
}

if (!format) {
format = testFormat;
}
}

if (format) {
source += '.' + format;
}
} else if (Y.Lang.isObject(formats)) {
for (testFormat in formats) {
if (formats.hasOwnProperty(testFormat)) {
playable = _playable[testFormat];

if (!playable) {
continue;
}

if (playable === 'probably') {
format = testFormat;
break;
}

if (!format) {
format = testFormat;
}
}
}

if (format) {
source += formats[format];
}
} else {
return null;
}

if (!format) {
return null;
}

return Y.Node.create('<audio ' + (config.autoplay ? 'autoplay="true" ' : '') + (config.controls ? 'controls="true"' : '') + (config.loop ? 'loop="true"' : '') + ' preload="' + (config.preload ? config.preload : 'auto') + '" src="' + source + '" />');
}
};


}, 'gallery-2011.04.06-19-44' ,{requires:['node'], optional:['gallery-modernizr']});
1 change: 1 addition & 0 deletions build/gallery-audio/gallery-audio-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

105 changes: 105 additions & 0 deletions build/gallery-audio/gallery-audio.js
@@ -0,0 +1,105 @@
YUI.add('gallery-audio', function(Y) {

'use strict';

var _playable = {};

(function (modernizr) {
if (modernizr) {
if (modernizr.audio) {
_playable.m4a = modernizr.audio.m4a;
_playable.mp3 = modernizr.audio.mp3;
_playable.ogg = modernizr.audio.ogg;
_playable.wav = modernizr.audio.wav;
}
return;
}

var audioElement = Y.config.doc.createElement('audio');

if (!audioElement.canPlayType) {
return;
}

_playable.m4a = audioElement.canPlayType('audio/x-m4a;') || audioElement.canPlayType('audio/aac;');
_playable.mp3 = audioElement.canPlayType('audio/mpeg;');
_playable.ogg = audioElement.canPlayType('audio/ogg; codecs="vorbis"');
_playable.wav = audioElement.canPlayType('audio/wav; codecs="1"');
}(Y.Modernizr || Y.config.win.Modernizr));

Y.Audio = {
create: function (config) {
config = config || {};

var format,
formats = config.format || [
'ogg',
'mp3',
'm4a',
'wav'
],
i,
length,
playable,
source = config.baseUrl || '',
testFormat;

if (Y.Lang.isArray(formats)) {
for (i = 0, length = formats.length; i < length; i += 1) {
testFormat = formats[i];
playable = _playable[testFormat];

if (!playable) {
continue;
}

if (playable === 'probably') {
format = testFormat;
break;
}

if (!format) {
format = testFormat;
}
}

if (format) {
source += '.' + format;
}
} else if (Y.Lang.isObject(formats)) {
for (testFormat in formats) {
if (formats.hasOwnProperty(testFormat)) {
playable = _playable[testFormat];

if (!playable) {
continue;
}

if (playable === 'probably') {
format = testFormat;
break;
}

if (!format) {
format = testFormat;
}
}
}

if (format) {
source += formats[format];
}
} else {
return null;
}

if (!format) {
return null;
}

return Y.Node.create('<audio ' + (config.autoplay ? 'autoplay="true" ' : '') + (config.controls ? 'controls="true"' : '') + (config.loop ? 'loop="true"' : '') + ' preload="' + (config.preload ? config.preload : 'auto') + '" src="' + source + '" />');
}
};


}, 'gallery-2011.04.06-19-44' ,{requires:['node'], optional:['gallery-modernizr']});
17 changes: 12 additions & 5 deletions build/gallery-ellipsis/gallery-ellipsis-debug.js
Expand Up @@ -35,7 +35,10 @@ YUI.add('gallery-ellipsis', function(Y) {
'fudge' : 3,

// target number of lines to wrap
'lines' : 1
'lines' : 1,

// whether or not to remember the original text to able to de-truncate
'remember' : true
});

// console.log(conf);
Expand All @@ -45,8 +48,11 @@ YUI.add('gallery-ellipsis', function(Y) {
// the element we're trying to truncate
var yEl = Y.one(node),

// the name of the field we use to store using .setData()
dataAttrName = 'ellipsis-original-text',

// original text
originalText = yEl.getAttribute('originalText') || yEl.get('text'),
originalText = conf.remember && yEl.getData(dataAttrName) || yEl.get('text'),

// keep the current length of the text so far
currentLength = originalText.length,
Expand Down Expand Up @@ -155,8 +161,8 @@ YUI.add('gallery-ellipsis', function(Y) {
clone.remove();

// set the original text if we want to ever want to expand past the current truncation
if (!yEl.getAttribute('originalText')) {
yEl.setAttribute('originalText', originalText);
if (conf.remember && !yEl.getData(dataAttrName)) {
yEl.setData(dataAttrName, originalText);
}

// console.log('originalText.length', originalText.length);
Expand Down Expand Up @@ -184,4 +190,5 @@ YUI.add('gallery-ellipsis', function(Y) {
Y.NodeList.importMethod(Y.Node.prototype, 'ellipsis');


}, 'gallery-2011.03.30-19-47' ,{requires:['base','node']});

}, 'gallery-2011.04.06-19-44' ,{requires:['base','node']});
2 changes: 1 addition & 1 deletion build/gallery-ellipsis/gallery-ellipsis-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 12 additions & 5 deletions build/gallery-ellipsis/gallery-ellipsis.js
Expand Up @@ -35,7 +35,10 @@ YUI.add('gallery-ellipsis', function(Y) {
'fudge' : 3,

// target number of lines to wrap
'lines' : 1
'lines' : 1,

// whether or not to remember the original text to able to de-truncate
'remember' : true
});

// console.log(conf);
Expand All @@ -45,8 +48,11 @@ YUI.add('gallery-ellipsis', function(Y) {
// the element we're trying to truncate
var yEl = Y.one(node),

// the name of the field we use to store using .setData()
dataAttrName = 'ellipsis-original-text',

// original text
originalText = yEl.getAttribute('originalText') || yEl.get('text'),
originalText = conf.remember && yEl.getData(dataAttrName) || yEl.get('text'),

// keep the current length of the text so far
currentLength = originalText.length,
Expand Down Expand Up @@ -155,8 +161,8 @@ YUI.add('gallery-ellipsis', function(Y) {
clone.remove();

// set the original text if we want to ever want to expand past the current truncation
if (!yEl.getAttribute('originalText')) {
yEl.setAttribute('originalText', originalText);
if (conf.remember && !yEl.getData(dataAttrName)) {
yEl.setData(dataAttrName, originalText);
}

// console.log('originalText.length', originalText.length);
Expand Down Expand Up @@ -184,4 +190,5 @@ YUI.add('gallery-ellipsis', function(Y) {
Y.NodeList.importMethod(Y.Node.prototype, 'ellipsis');


}, 'gallery-2011.03.30-19-47' ,{requires:['base','node']});

}, 'gallery-2011.04.06-19-44' ,{requires:['base','node']});
28 changes: 22 additions & 6 deletions build/gallery-querybuilder/gallery-querybuilder-debug.js
Expand Up @@ -12,7 +12,9 @@ var has_bubble_problem = (0 < Y.UA.ie && Y.UA.ie < 9);
* <p>The default package provides two data types: String (which can also
* be used for numbers) and Select (which provides a menu of options). The
* plugin API allows defining additional data types, e.g., date range or
* multi-select. A plugin must implement the following functions:</p>
* multi-select. Every plugin must be registered in
* <code>Y.QueryBuilder.plugin_mapping</code>. Plugins must implement the
* following functions:</p>
*
* <dl>
* <dt><code>constructor(qb, config)</code></dt>
Expand Down Expand Up @@ -608,7 +610,7 @@ Y.extend(QueryBuilder, Y.Widget,
return result;
},

/**********************************************************************
/*
* API for plugins
*/

Expand All @@ -631,7 +633,7 @@ Y.extend(QueryBuilder, Y.Widget,
this.fire('queryChanged');
},

/**********************************************************************
/*
* Form element names.
*/

Expand Down Expand Up @@ -764,7 +766,14 @@ QueryBuilder.String.prototype =
{
if (this.value_input) // could be destroyed
{
this.value_input.focus();
try
{
this.value_input.focus();
}
catch (e)
{
// IE will complain if field is invisible, instead of just ignoring it
}
}
});
},
Expand Down Expand Up @@ -907,7 +916,14 @@ QueryBuilder.Select.prototype =
/* array */ op_list,
/* array */ value)
{
this.value_menu.focus();
try
{
this.value_menu.focus();
}
catch (e)
{
// IE will complain if field is invisible, instead of just ignoring it
}
},

destroy: function()
Expand Down Expand Up @@ -972,4 +988,4 @@ QueryBuilder.plugin_mapping =
};


}, 'gallery-2011.02.16-20-31' ,{optional:['gallery-formmgr','gallery-scrollintoview'], requires:['widget','substitute'], skinnable:true});
}, 'gallery-2011.04.06-19-44' ,{skinnable:true, optional:['gallery-formmgr','gallery-scrollintoview'], requires:['widget','substitute']});

0 comments on commit bb5f627

Please sign in to comment.