Permalink
Browse files

Gallery Build Tag: gallery-2012.10.10-19-59

  • Loading branch information...
1 parent fd9a717 commit f2933ac5fbff4f1739fde59b1223c3602e0b8d7f YUI Builder committed Oct 10, 2012

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -673,7 +673,7 @@ Y.extend(BulkEditDataSource, Y.DataSource.Local,
record_id = record_id.toString();
var record = this._recordMap[ record_id ];
- if (record && this._getComparator(key)(record[key] || '', value || ''))
+ if (record && this._getComparator(key)(Y.Lang.isValue(record[key]) ? record[key] : '', Y.Lang.isValue(value) ? value : ''))
{
if (this._diff[ record_id ])
{
@@ -1285,7 +1285,7 @@ Y.extend(BulkEditor, Y.Widget,
var ds = this.get('ds');
var records = ds.getCurrentRecords();
var id_key = ds.get('uniqueIdKey');
- Y.Object.each(this.get('fields'), function(value, key)
+ Y.Object.each(this.get('fields'), function(field, key)
{
Y.Array.each(records, function(r)
{
@@ -1294,7 +1294,7 @@ Y.extend(BulkEditor, Y.Widget,
value;
if (tag == 'input' && node.get('type').toLowerCase() == 'checkbox')
{
- value = node.get('checked');
+ value = node.get('checked') ? field.values.on : field.values.off;
}
else if (tag == 'select' && node.get('multiple'))
{
@@ -2411,7 +2411,7 @@ BulkEditor.markup =
key: o.key,
id: this.getFieldId(o.record, o.key),
label: label,
- value: o.value ? 'checked="checked"' : '',
+ value: o.value == o.field.values.on ? 'checked="checked"' : '',
msg: BulkEditor.error_msg_markup
});
},
@@ -2591,12 +2591,18 @@ HTMLTableBulkEditor.ATTRS =
}
};
-var cell_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'cell'),
+var cell_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'cell'),
cell_class_prefix = cell_class + '-',
- odd_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'odd'),
- even_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'even'),
- msg_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'record-message'),
- liner_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'liner');
+ odd_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'odd'),
+ even_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'even'),
+ msg_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'record-message'),
+ liner_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'liner'),
+
+ input_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'input'),
+ textarea_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'textarea'),
+ select_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'select'),
+ checkbox_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'checkbox'),
+ cb_multiselect_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'checkbox-multiselect');
/**
* Renders an input element in the cell.
@@ -2608,6 +2614,7 @@ var cell_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'cell
HTMLTableBulkEditor.inputFormatter = function(o)
{
o.cell.set('innerHTML', BulkEditor.markup.input.call(this, o));
+ o.cell.addClass(input_class);
};
/**
@@ -2620,6 +2627,7 @@ HTMLTableBulkEditor.inputFormatter = function(o)
HTMLTableBulkEditor.textareaFormatter = function(o)
{
o.cell.set('innerHTML', BulkEditor.markup.textarea.call(this, o));
+ o.cell.addClass(textarea_class);
};
/**
@@ -2632,6 +2640,7 @@ HTMLTableBulkEditor.textareaFormatter = function(o)
HTMLTableBulkEditor.selectFormatter = function(o)
{
o.cell.set('innerHTML', BulkEditor.markup.select.call(this, o));
+ o.cell.addClass(select_class);
};
/**
@@ -2644,6 +2653,7 @@ HTMLTableBulkEditor.selectFormatter = function(o)
HTMLTableBulkEditor.checkboxFormatter = function(o)
{
o.cell.set('innerHTML', BulkEditor.markup.checkbox.call(this, o));
+ o.cell.addClass(checkbox_class);
};
/**
@@ -2656,6 +2666,7 @@ HTMLTableBulkEditor.checkboxFormatter = function(o)
HTMLTableBulkEditor.checkboxMultiselectFormatter = function(o)
{
o.cell.set('innerHTML', BulkEditor.markup.checkboxMultiselect.call(this, o));
+ o.cell.addClass(cb_multiselect_class);
};
/**
@@ -2884,4 +2895,4 @@ Y.extend(HTMLTableBulkEditor, BulkEditor,
Y.HTMLTableBulkEditor = HTMLTableBulkEditor;
-}, 'gallery-2012.10.03-20-02' ,{optional:['datasource','dataschema','gallery-paginator'], requires:['widget','datasource-local','gallery-busyoverlay','gallery-formmgr-css-validation','gallery-node-optimizations','gallery-scrollintoview','array-extras','gallery-funcprog','escape','event-key','gallery-nodelist-extras2'], skinnable:true});
+}, 'gallery-2012.10.10-19-59' ,{optional:['datasource','dataschema','gallery-paginator'], requires:['widget','datasource-local','gallery-busyoverlay','gallery-formmgr-css-validation','gallery-node-optimizations','gallery-scrollintoview','array-extras','gallery-funcprog','escape','event-key','gallery-nodelist-extras2'], skinnable:true});

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -673,7 +673,7 @@ Y.extend(BulkEditDataSource, Y.DataSource.Local,
record_id = record_id.toString();
var record = this._recordMap[ record_id ];
- if (record && this._getComparator(key)(record[key] || '', value || ''))
+ if (record && this._getComparator(key)(Y.Lang.isValue(record[key]) ? record[key] : '', Y.Lang.isValue(value) ? value : ''))
{
if (this._diff[ record_id ])
{
@@ -1284,7 +1284,7 @@ Y.extend(BulkEditor, Y.Widget,
var ds = this.get('ds');
var records = ds.getCurrentRecords();
var id_key = ds.get('uniqueIdKey');
- Y.Object.each(this.get('fields'), function(value, key)
+ Y.Object.each(this.get('fields'), function(field, key)
{
Y.Array.each(records, function(r)
{
@@ -1293,7 +1293,7 @@ Y.extend(BulkEditor, Y.Widget,
value;
if (tag == 'input' && node.get('type').toLowerCase() == 'checkbox')
{
- value = node.get('checked');
+ value = node.get('checked') ? field.values.on : field.values.off;
}
else if (tag == 'select' && node.get('multiple'))
{
@@ -2409,7 +2409,7 @@ BulkEditor.markup =
key: o.key,
id: this.getFieldId(o.record, o.key),
label: label,
- value: o.value ? 'checked="checked"' : '',
+ value: o.value == o.field.values.on ? 'checked="checked"' : '',
msg: BulkEditor.error_msg_markup
});
},
@@ -2589,12 +2589,18 @@ HTMLTableBulkEditor.ATTRS =
}
};
-var cell_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'cell'),
+var cell_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'cell'),
cell_class_prefix = cell_class + '-',
- odd_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'odd'),
- even_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'even'),
- msg_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'record-message'),
- liner_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'liner');
+ odd_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'odd'),
+ even_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'even'),
+ msg_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'record-message'),
+ liner_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'liner'),
+
+ input_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'input'),
+ textarea_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'textarea'),
+ select_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'select'),
+ checkbox_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'checkbox'),
+ cb_multiselect_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'checkbox-multiselect');
/**
* Renders an input element in the cell.
@@ -2606,6 +2612,7 @@ var cell_class = Y.ClassNameManager.getClassName(HTMLTableBulkEditor.NAME, 'cell
HTMLTableBulkEditor.inputFormatter = function(o)
{
o.cell.set('innerHTML', BulkEditor.markup.input.call(this, o));
+ o.cell.addClass(input_class);
};
/**
@@ -2618,6 +2625,7 @@ HTMLTableBulkEditor.inputFormatter = function(o)
HTMLTableBulkEditor.textareaFormatter = function(o)
{
o.cell.set('innerHTML', BulkEditor.markup.textarea.call(this, o));
+ o.cell.addClass(textarea_class);
};
/**
@@ -2630,6 +2638,7 @@ HTMLTableBulkEditor.textareaFormatter = function(o)
HTMLTableBulkEditor.selectFormatter = function(o)
{
o.cell.set('innerHTML', BulkEditor.markup.select.call(this, o));
+ o.cell.addClass(select_class);
};
/**
@@ -2642,6 +2651,7 @@ HTMLTableBulkEditor.selectFormatter = function(o)
HTMLTableBulkEditor.checkboxFormatter = function(o)
{
o.cell.set('innerHTML', BulkEditor.markup.checkbox.call(this, o));
+ o.cell.addClass(checkbox_class);
};
/**
@@ -2654,6 +2664,7 @@ HTMLTableBulkEditor.checkboxFormatter = function(o)
HTMLTableBulkEditor.checkboxMultiselectFormatter = function(o)
{
o.cell.set('innerHTML', BulkEditor.markup.checkboxMultiselect.call(this, o));
+ o.cell.addClass(cb_multiselect_class);
};
/**
@@ -2881,4 +2892,4 @@ Y.extend(HTMLTableBulkEditor, BulkEditor,
Y.HTMLTableBulkEditor = HTMLTableBulkEditor;
-}, 'gallery-2012.10.03-20-02' ,{optional:['datasource','dataschema','gallery-paginator'], requires:['widget','datasource-local','gallery-busyoverlay','gallery-formmgr-css-validation','gallery-node-optimizations','gallery-scrollintoview','array-extras','gallery-funcprog','escape','event-key','gallery-nodelist-extras2'], skinnable:true});
+}, 'gallery-2012.10.10-19-59' ,{optional:['datasource','dataschema','gallery-paginator'], requires:['widget','datasource-local','gallery-busyoverlay','gallery-formmgr-css-validation','gallery-node-optimizations','gallery-scrollintoview','array-extras','gallery-funcprog','escape','event-key','gallery-nodelist-extras2'], skinnable:true});
@@ -0,0 +1,96 @@
+if (typeof _yuitest_coverage == "undefined"){
+ _yuitest_coverage = {};
+ _yuitest_coverline = function(src, line){
+ var coverage = _yuitest_coverage[src];
+ if (!coverage.lines[line]){
+ coverage.calledLines++;
+ }
+ coverage.lines[line]++;
+ };
+ _yuitest_coverfunc = function(src, name, line){
+ var coverage = _yuitest_coverage[src],
+ funcId = name + ":" + line;
+ if (!coverage.functions[funcId]){
+ coverage.calledFunctions++;
+ }
+ coverage.functions[funcId]++;
+ };
+}
+_yuitest_coverage["/build/gallery-model-sync-multi/gallery-model-sync-multi.js"] = {
+ lines: {},
+ functions: {},
+ coveredLines: 0,
+ calledLines: 0,
+ coveredFunctions: 0,
+ calledFunctions: 0,
+ path: "/build/gallery-model-sync-multi/gallery-model-sync-multi.js",
+ code: []
+};
+_yuitest_coverage["/build/gallery-model-sync-multi/gallery-model-sync-multi.js"].code=["YUI.add('gallery-model-sync-multi', function(Y) {","","/**"," * Allows multiple model sync implementations to be used by a single model."," * @module gallery-model-sync-multi"," */","(function (Y) {"," 'use strict';",""," /**"," * This is a class extension for Y.Module allowing multiple model sync"," * implementations to be used by a single model. When a class is created"," * extending Y.Model, this class extension must come after all other class"," * extensions which implement sync. Model classes using this extension"," * should have a static SYNCS property. The SYNCS property will be an"," * object of key/value pairs. There should be a value for each other sync"," * implementation extension. The keys can be any name you want to give that"," * implementation. When calling the sync methods such as load or save, the"," * options argument object should be given a sync property which matches the"," * name of one of the SYNCS to use."," * @class Multi"," * @constructor"," * @namespace ModelSync"," */"," var _class = function () {};"," "," _class.prototype = {"," /**"," * This sync method passes to one of the other sync methods based on the"," * value of options.sync. If there is no matching sync method, this"," * does nothing."," * @method sync"," * @param action"," * @param options"," * @param callbackFunction"," * @protected"," */"," sync: function (action, options) {"," options = options || {};"," "," var Sync = this.constructor.SYNCS[options.sync];"," "," return Sync && Sync.prototype.sync.apply(this, arguments);"," }"," };"," "," Y.namespace('ModelSync').Multi = _class;","}(Y));","","","}, 'gallery-2012.10.10-19-59' ,{requires:['yui-base'], skinnable:false});"];
+_yuitest_coverage["/build/gallery-model-sync-multi/gallery-model-sync-multi.js"].lines = {"1":0,"7":0,"8":0,"25":0,"27":0,"39":0,"41":0,"43":0,"47":0};
+_yuitest_coverage["/build/gallery-model-sync-multi/gallery-model-sync-multi.js"].functions = {"sync:38":0,"(anonymous 2):7":0,"(anonymous 1):1":0};
+_yuitest_coverage["/build/gallery-model-sync-multi/gallery-model-sync-multi.js"].coveredLines = 9;
+_yuitest_coverage["/build/gallery-model-sync-multi/gallery-model-sync-multi.js"].coveredFunctions = 3;
+_yuitest_coverline("/build/gallery-model-sync-multi/gallery-model-sync-multi.js", 1);
+YUI.add('gallery-model-sync-multi', function(Y) {
+
+/**
+ * Allows multiple model sync implementations to be used by a single model.
+ * @module gallery-model-sync-multi
+ */
+_yuitest_coverfunc("/build/gallery-model-sync-multi/gallery-model-sync-multi.js", "(anonymous 1)", 1);
+_yuitest_coverline("/build/gallery-model-sync-multi/gallery-model-sync-multi.js", 7);
+(function (Y) {
+ _yuitest_coverfunc("/build/gallery-model-sync-multi/gallery-model-sync-multi.js", "(anonymous 2)", 7);
+_yuitest_coverline("/build/gallery-model-sync-multi/gallery-model-sync-multi.js", 8);
+'use strict';
+
+ /**
+ * This is a class extension for Y.Module allowing multiple model sync
+ * implementations to be used by a single model. When a class is created
+ * extending Y.Model, this class extension must come after all other class
+ * extensions which implement sync. Model classes using this extension
+ * should have a static SYNCS property. The SYNCS property will be an
+ * object of key/value pairs. There should be a value for each other sync
+ * implementation extension. The keys can be any name you want to give that
+ * implementation. When calling the sync methods such as load or save, the
+ * options argument object should be given a sync property which matches the
+ * name of one of the SYNCS to use.
+ * @class Multi
+ * @constructor
+ * @namespace ModelSync
+ */
+ _yuitest_coverline("/build/gallery-model-sync-multi/gallery-model-sync-multi.js", 25);
+var _class = function () {};
+
+ _yuitest_coverline("/build/gallery-model-sync-multi/gallery-model-sync-multi.js", 27);
+_class.prototype = {
+ /**
+ * This sync method passes to one of the other sync methods based on the
+ * value of options.sync. If there is no matching sync method, this
+ * does nothing.
+ * @method sync
+ * @param action
+ * @param options
+ * @param callbackFunction
+ * @protected
+ */
+ sync: function (action, options) {
+ _yuitest_coverfunc("/build/gallery-model-sync-multi/gallery-model-sync-multi.js", "sync", 38);
+_yuitest_coverline("/build/gallery-model-sync-multi/gallery-model-sync-multi.js", 39);
+options = options || {};
+
+ _yuitest_coverline("/build/gallery-model-sync-multi/gallery-model-sync-multi.js", 41);
+var Sync = this.constructor.SYNCS[options.sync];
+
+ _yuitest_coverline("/build/gallery-model-sync-multi/gallery-model-sync-multi.js", 43);
+return Sync && Sync.prototype.sync.apply(this, arguments);
+ }
+ };
+
+ _yuitest_coverline("/build/gallery-model-sync-multi/gallery-model-sync-multi.js", 47);
+Y.namespace('ModelSync').Multi = _class;
+}(Y));
+
+
+}, 'gallery-2012.10.10-19-59' ,{requires:['yui-base'], skinnable:false});
@@ -0,0 +1,51 @@
+YUI.add('gallery-model-sync-multi', function(Y) {
+
+/**
+ * Allows multiple model sync implementations to be used by a single model.
+ * @module gallery-model-sync-multi
+ */
+(function (Y) {
+ 'use strict';
+
+ /**
+ * This is a class extension for Y.Module allowing multiple model sync
+ * implementations to be used by a single model. When a class is created
+ * extending Y.Model, this class extension must come after all other class
+ * extensions which implement sync. Model classes using this extension
+ * should have a static SYNCS property. The SYNCS property will be an
+ * object of key/value pairs. There should be a value for each other sync
+ * implementation extension. The keys can be any name you want to give that
+ * implementation. When calling the sync methods such as load or save, the
+ * options argument object should be given a sync property which matches the
+ * name of one of the SYNCS to use.
+ * @class Multi
+ * @constructor
+ * @namespace ModelSync
+ */
+ var _class = function () {};
+
+ _class.prototype = {
+ /**
+ * This sync method passes to one of the other sync methods based on the
+ * value of options.sync. If there is no matching sync method, this
+ * does nothing.
+ * @method sync
+ * @param action
+ * @param options
+ * @param callbackFunction
+ * @protected
+ */
+ sync: function (action, options) {
+ options = options || {};
+
+ var Sync = this.constructor.SYNCS[options.sync];
+
+ return Sync && Sync.prototype.sync.apply(this, arguments);
+ }
+ };
+
+ Y.namespace('ModelSync').Multi = _class;
+}(Y));
+
+
+}, 'gallery-2012.10.10-19-59' ,{requires:['yui-base'], skinnable:false});

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

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit f2933ac

Please sign in to comment.