Permalink
Browse files

gallery-2014.02.20-06-27 ItsAsbreuk gallery-itsacheckbox

  • Loading branch information...
ekashida committed Feb 20, 2014
1 parent 12363fb commit 99d90b1b72fc2221a7aa3683a10c66d601e6f08a

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -213,7 +213,7 @@ Y.ITSACheckbox = Y.Base.create('itsacheckbox', Y.Widget, [], {
if (src && (src.get('tagName')==='INPUT') && (src.getAttribute('type')==='checkbox')) {
src.addClass(HIDDEN_CLASS);
// Need to check if checkbox is inside a label-element --> due to HTML validation the widget CANNOT lie inside a label!
- instance._srcParentNode = srcParentNode = src.get('parentNode');
+ instance._srcParentNode = srcParentNode = src.get('parentNode') || Y.one('body');
checkBoxInsideLabel = (srcParentNode.get('tagName')==='LABEL');
// in yui before 3.13.0 the boundingBox was created as a DIV behind srcNode
// as from 3.13.0, boundingBox===srcNode
@@ -338,7 +338,7 @@ Y.ITSACheckbox = Y.Base.create('itsacheckbox', Y.Widget, [], {
instance._forceCheckedVal = false;
dd.set('lock', disabled || instance.get(READONLY));
instance._goFinal(checked, true);
- // now set up the right payload for the valueChange-event
+ // now set up the right payload for the valuechange-event
if (disabled) {
payload.newVal = null;
payload.prevVal = checked;
@@ -962,22 +962,22 @@ Y.ITSACheckbox = Y.Base.create('itsacheckbox', Y.Widget, [], {
},
HTML_PARSER: {
checked: function (srcNode) {
- var checked = (srcNode.getAttribute(CHECKED).toLowerCase()===CHECKED);
+ var checked = srcNode.get(CHECKED);
return (this._srcNodeValidCheckbox(srcNode) && checked);
},
readonly: function (srcNode) {
var readonly = (srcNode.getAttribute(READONLY).toLowerCase()===READONLY);
return (this._srcNodeValidCheckbox(srcNode) && readonly);
},
disabled: function (srcNode) {
- var disabled = (srcNode.getAttribute(DISABLED).toLowerCase()===DISABLED);
+ var disabled = srcNode.get(DISABLED);
return (this._srcNodeValidCheckbox(srcNode) && disabled);
}
}
}
);
-}, 'gallery-2014.02.05-23-53', {
+}, 'gallery-2014.02.20-06-27', {
"requires": [
"yui-base",
"dd-ddm",

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -211,7 +211,7 @@ Y.ITSACheckbox = Y.Base.create('itsacheckbox', Y.Widget, [], {
if (src && (src.get('tagName')==='INPUT') && (src.getAttribute('type')==='checkbox')) {
src.addClass(HIDDEN_CLASS);
// Need to check if checkbox is inside a label-element --> due to HTML validation the widget CANNOT lie inside a label!
- instance._srcParentNode = srcParentNode = src.get('parentNode');
+ instance._srcParentNode = srcParentNode = src.get('parentNode') || Y.one('body');
checkBoxInsideLabel = (srcParentNode.get('tagName')==='LABEL');
// in yui before 3.13.0 the boundingBox was created as a DIV behind srcNode
// as from 3.13.0, boundingBox===srcNode
@@ -335,7 +335,7 @@ Y.ITSACheckbox = Y.Base.create('itsacheckbox', Y.Widget, [], {
instance._forceCheckedVal = false;
dd.set('lock', disabled || instance.get(READONLY));
instance._goFinal(checked, true);
- // now set up the right payload for the valueChange-event
+ // now set up the right payload for the valuechange-event
if (disabled) {
payload.newVal = null;
payload.prevVal = checked;
@@ -945,22 +945,22 @@ Y.ITSACheckbox = Y.Base.create('itsacheckbox', Y.Widget, [], {
},
HTML_PARSER: {
checked: function (srcNode) {
- var checked = (srcNode.getAttribute(CHECKED).toLowerCase()===CHECKED);
+ var checked = srcNode.get(CHECKED);
return (this._srcNodeValidCheckbox(srcNode) && checked);
},
readonly: function (srcNode) {
var readonly = (srcNode.getAttribute(READONLY).toLowerCase()===READONLY);
return (this._srcNodeValidCheckbox(srcNode) && readonly);
},
disabled: function (srcNode) {
- var disabled = (srcNode.getAttribute(DISABLED).toLowerCase()===DISABLED);
+ var disabled = srcNode.get(DISABLED);
return (this._srcNodeValidCheckbox(srcNode) && disabled);
}
}
}
);
-}, 'gallery-2014.02.05-23-53', {
+}, 'gallery-2014.02.20-06-27', {
"requires": [
"yui-base",
"dd-ddm",
@@ -1,6 +1,10 @@
gallery-itsacheckbox
========
+17-02-2014: version 0.3
+-----
+* Fixed issue with progressive enhancement reading init values of 'checked' and 'disabled'
+
04-02-2014: version 0.2
-----
* Fixed issue with progressive enhancement that failed as from YUI 3.13.0
@@ -211,7 +211,7 @@ Y.ITSACheckbox = Y.Base.create('itsacheckbox', Y.Widget, [], {
if (src && (src.get('tagName')==='INPUT') && (src.getAttribute('type')==='checkbox')) {
src.addClass(HIDDEN_CLASS);
// Need to check if checkbox is inside a label-element --> due to HTML validation the widget CANNOT lie inside a label!
- instance._srcParentNode = srcParentNode = src.get('parentNode');
+ instance._srcParentNode = srcParentNode = src.get('parentNode') || Y.one('body');
checkBoxInsideLabel = (srcParentNode.get('tagName')==='LABEL');
// in yui before 3.13.0 the boundingBox was created as a DIV behind srcNode
// as from 3.13.0, boundingBox===srcNode
@@ -336,7 +336,7 @@ Y.ITSACheckbox = Y.Base.create('itsacheckbox', Y.Widget, [], {
instance._forceCheckedVal = false;
dd.set('lock', disabled || instance.get(READONLY));
instance._goFinal(checked, true);
- // now set up the right payload for the valueChange-event
+ // now set up the right payload for the valuechange-event
if (disabled) {
payload.newVal = null;
payload.prevVal = checked;
@@ -960,15 +960,15 @@ Y.ITSACheckbox = Y.Base.create('itsacheckbox', Y.Widget, [], {
},
HTML_PARSER: {
checked: function (srcNode) {
- var checked = (srcNode.getAttribute(CHECKED).toLowerCase()===CHECKED);
+ var checked = srcNode.get(CHECKED);
return (this._srcNodeValidCheckbox(srcNode) && checked);
},
readonly: function (srcNode) {
var readonly = (srcNode.getAttribute(READONLY).toLowerCase()===READONLY);
return (this._srcNodeValidCheckbox(srcNode) && readonly);
},
disabled: function (srcNode) {
- var disabled = (srcNode.getAttribute(DISABLED).toLowerCase()===DISABLED);
+ var disabled = srcNode.get(DISABLED);
return (this._srcNodeValidCheckbox(srcNode) && disabled);
}
}
@@ -3,6 +3,6 @@
"failed": 2,
"total": 2,
"ignored": 0,
- "name": "http://127.0.0.1:5000/tests/src/gallery-itsacheckbox/tests/unit/index.html?filter=coverage",
- "error": "TypeError: 'undefined' is not an object (evaluating 'Y.Test.Runner')\nhttp://127.0.0.1:5000/tests/src/gallery-itsacheckbox/tests/unit/index.html?filter=coverage:28\nhttp://127.0.0.1:5000/build/yui/yui.js:970\nhttp://127.0.0.1:5000/build/yui/yui.js:945\nhttp://127.0.0.1:5000/build/yui/yui.js:970\nhttp://127.0.0.1:5000/build/yui/yui.js:1115\nhttp://127.0.0.1:5000/build/yui/yui.js:7708\nhttp://127.0.0.1:5000/build/yui/yui.js:7799\nhttp://127.0.0.1:5000/build/yui/yui.js:7999\nhttp://127.0.0.1:5000/build/yui/yui.js:8066\nhttp://127.0.0.1:5000/build/yui/yui.js:4619\nhttp://127.0.0.1:5000/build/yui/yui.js:4819\nhttp://127.0.0.1:5000/build/yui/yui.js:4927\nhttp://127.0.0.1:5000/build/yui/yui.js:4711"
+ "name": "http://127.0.0.1:5008/tests/src/gallery-itsacheckbox/tests/unit/index.html?filter=coverage",
+ "error": "TypeError: 'undefined' is not an object (evaluating 'new Y.Test.Suite')\nhttp://127.0.0.1:5008/tests/src/gallery-itsacheckbox/tests/unit/js/tests.js:3\nhttp://127.0.0.1:5008/build/yui/yui.js:775\nhttp://127.0.0.1:5008/build/yui/yui.js:1112\nhttp://127.0.0.1:5008/build/yui/yui.js:7708\nhttp://127.0.0.1:5008/build/yui/yui.js:7799\nhttp://127.0.0.1:5008/build/yui/yui.js:7999\nhttp://127.0.0.1:5008/build/yui/yui.js:8066\nhttp://127.0.0.1:5008/build/yui/yui.js:4619\nhttp://127.0.0.1:5008/build/yui/yui.js:4819\nhttp://127.0.0.1:5008/build/yui/yui.js:4927\nhttp://127.0.0.1:5008/build/yui/yui.js:4711"
}
@@ -1,2 +1 @@
-shifter [err] /src/gallery-itsacheckbox/js/gallery-itsacheckbox.js contains 11 lint errors
shifter [err] /assets/gallery-itsacheckbox/skins/sam/gallery-itsacheckbox-skin.css contains 2 lint errors
@@ -1,4 +1,4 @@
-yogi [info] using yogi@0.1.11 on node@0.10.25
+yogi [info] using yogi@0.1.11 on node@0.8.26
yogi [info] using module: gallery-itsacheckbox
yogi [info] running with shifter
shifter [info] racing to find the closest .shifter.json file
@@ -9,28 +9,6 @@ shifter [info] putting the hammer down, let's build this thing!
shifter [info] munging in loader meta data into build.json
shifter [info] putting the hammer down
shifter [info] shifting into gear for gallery-itsacheckbox
- #1: 'clonedNode' is not defined.
- clonedNode = Node.create(BOUNDINGBOX_TEMPLATE_NEWVERSION); // line 223, pos 21
- #2: 'clonedNode' is not defined.
- src.insert(clonedNode, 'after'); // line 225, pos 36
- #3: 'clonedNode' is not defined.
- srcParentNode.insert(clonedNode, checkBoxBeforeText ? 'before' : 'after'); // line 229, pos 46
- #4: 'clonedNode' is not defined.
- instance._set(BOUNDINGBOX, clonedNode); // redefine the boudingbox --> it has to be a node separate from srcNode // line 233, pos 48
- #5: 'wrapperLeftPos' is not defined.
- wrapperLeftPos = radiusleft-optionWidth; // line 763, pos 13
- #6: 'wrapperLeftPos' is not defined.
- wrapperNode.setStyle(LEFT, wrapperLeftPos+PX); // line 764, pos 40
- #7: 'wrapperLeftPos' is not defined.
- instance._changePosition = Math.round(-wrapperLeftPos/2); // line 766, pos 52
- #8: 'parentNode' is not defined.
- parentNode = copyNode || boundingBox; // line 834, pos 13
- #9: 'parentNode' is not defined.
- parentNode.setAttribute(DATA_FOCUSNEXTONENTER, STRINGTRUE); // line 835, pos 13
- #10: 'parentNode' is not defined.
- instance.get(SUBMITONENTER) && parentNode.setAttribute(DATA_SUBMITONENTER, STRINGTRUE); // line 837, pos 44
- #11: 'parentNode' is not defined.
- instance.get(PRIMARYBTNONENTER) && parentNode.setAttribute(DATA_PRIMARYBTNONENTER, STRINGTRUE); // line 838, pos 48
shifter [queu] file has changed, continuing build
shifter [queu] writing RAW file
shifter [queu] compressing gallery-itsacheckbox/gallery-itsacheckbox.js with UglifyJS
@@ -50,32 +28,30 @@ shifter [queu] copying assets to skin for sam
shifter [queu] writing skin file with core wrapper
shifter [queu] writing skin file without core wrapper
shifter [info] done racing, the gears are toast
-shifter [info] finished in 0.409 seconds, pretty fast huh?
+shifter [info] finished in 0.656 seconds, pretty fast huh?
yogi [info] build complete
yogi [info] testing module now
yogi [info] prepping grover tests
yogi [info] adding tests route
-yogi [info] launching xdr server on port 5001
-yogi [info] listening on: http://127.0.0.1:5000
yogi [info] turning on coverage support in grover
-Starting Grover on 1 files with PhantomJS@1.9.7
+yogi [info] launching xdr server on port 5009
+yogi [info] listening on: http://127.0.0.1:5008
+Starting Grover on 1 files with PhantomJS@1.9.2
Running 15 concurrent tests at a time.
Using a 120 second timeout per test.
-✖ [http://127.0.0.1:5000/tests/src/gallery-itsacheckbox/tests/unit/index.html?filter=coverage]: Passed: 0 Failed: 1 Total: 1 (ignored 0)
+✖ [http://127.0.0.1:5008/tests/src/gallery-itsacheckbox/tests/unit/index.html?filter=coverage]: Passed: 0 Failed: 1 Total: 1 (ignored 0)
Javascript Error
- TypeError: 'undefined' is not an object (evaluating 'Y.Test.Runner')
- http://127.0.0.1:5000/tests/src/gallery-itsacheckbox/tests/unit/index.html?filter=coverage:28
- http://127.0.0.1:5000/build/yui/yui.js:970
- http://127.0.0.1:5000/build/yui/yui.js:945
- http://127.0.0.1:5000/build/yui/yui.js:970
- http://127.0.0.1:5000/build/yui/yui.js:1115
- http://127.0.0.1:5000/build/yui/yui.js:7708
- http://127.0.0.1:5000/build/yui/yui.js:7799
- http://127.0.0.1:5000/build/yui/yui.js:7999
- http://127.0.0.1:5000/build/yui/yui.js:8066
- http://127.0.0.1:5000/build/yui/yui.js:4619
- http://127.0.0.1:5000/build/yui/yui.js:4819
- http://127.0.0.1:5000/build/yui/yui.js:4927
- http://127.0.0.1:5000/build/yui/yui.js:4711
+ TypeError: 'undefined' is not an object (evaluating 'new Y.Test.Suite')
+ http://127.0.0.1:5008/tests/src/gallery-itsacheckbox/tests/unit/js/tests.js:3
+ http://127.0.0.1:5008/build/yui/yui.js:775
+ http://127.0.0.1:5008/build/yui/yui.js:1112
+ http://127.0.0.1:5008/build/yui/yui.js:7708
+ http://127.0.0.1:5008/build/yui/yui.js:7799
+ http://127.0.0.1:5008/build/yui/yui.js:7999
+ http://127.0.0.1:5008/build/yui/yui.js:8066
+ http://127.0.0.1:5008/build/yui/yui.js:4619
+ http://127.0.0.1:5008/build/yui/yui.js:4819
+ http://127.0.0.1:5008/build/yui/yui.js:4927
+ http://127.0.0.1:5008/build/yui/yui.js:4711
Writing files in JSON format to: /src/gallery-itsacheckbox/logs/tests.json
yogi [bail] grover returned a failure
@@ -13,6 +13,9 @@
<input id="checkboxtest3" type="checkbox" disabled="disabled">
<input id="checkboxtest4" type="checkbox" readonly="readonly">
+<input id="checkboxtest5" type="checkbox" checked>
+<input id="checkboxtest6" type="checkbox" disabled>
+
<!-- ******************************** -->
<!-- START DEFINING THE COMBOLOADER -->
<!-- ******************************** -->
@@ -23,17 +26,13 @@
<!-- ******************************** -->
<script>
-YUI(yuiconfig).use('base-core', 'test', 'itsa-leakutils', function(Y) {
-
- Y.Test.Runner.setDOMIgnore('#logger', '#checkboxtest2', '#checkboxtest3', '#checkboxtest4', 'script', '.yui3-dd-shim', 'document');
- Y.Test.Runner.enableLeakDetector();
+// yuiconfig is defined inside loaderconfig.js
+YUI(yuiconfig).use('test-console', 'test', 'module-tests', function(Y) {
- Y.use('test-console', 'module-tests', function (Y) {
- (new Y.Test.Console()).render('#logger');
- Y.Test.Runner.setName('gallery-itsacheckbox');
- Y.Test.Runner.run();
- });
+ (new Y.Test.Console()).render('#logger');
+ Y.Test.Runner.setName('gallery-itsacheckbox');
+ Y.Test.Runner.run();
});
</script>
</body>
Oops, something went wrong.

0 comments on commit 99d90b1

Please sign in to comment.