Permalink
Browse files

More mod updates

  • Loading branch information...
1 parent 6e18baa commit d404e3375dc1635a5e371d06ae9c90756816912b @davglass committed Oct 26, 2012
@@ -0,0 +1,127 @@
+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-node-reset/gallery-node-reset.js"] = {
+ lines: {},
+ functions: {},
+ coveredLines: 0,
+ calledLines: 0,
+ coveredFunctions: 0,
+ calledFunctions: 0,
+ path: "build/gallery-node-reset/gallery-node-reset.js",
+ code: []
+};
+_yuitest_coverage["build/gallery-node-reset/gallery-node-reset.js"].code=["YUI.add('gallery-node-reset', function (Y, NAME) {","",""," var NR = function(config) {"," config.node = ("," (Y.Widget && config.host instanceof Y.Widget) ? config.host.get('boundingBox') : "," ((config.host) ? config.host : config.node)"," );",""," NR.superclass.constructor.call(this, config);"," },"," resetCSS = 'ID div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, button, textarea, p, blockquote, th, td { margin: 0; padding: 0; }';"," resetCSS += 'ID table { border-collapse: collapse; border-spacing: 0; }';"," resetCSS += 'ID fieldset, img { border: 0; }';"," resetCSS += 'ID address, caption, cite, code, dfn, em, strong, th, var, optgroup { font-style: inherit; font-weight: inherit; }';"," resetCSS += 'ID del, ins { text-decoration: none; }';"," resetCSS += 'ID li { list-style: none; }';"," resetCSS += 'ID caption, th { text-align: left; }';"," resetCSS += 'ID h1, h2, h3, h4, h5, h6 { font-size: 100%; font-weight: normal; }';"," resetCSS += 'ID abbr, acronym { border: 0; font-variant: normal; }';"," resetCSS += 'ID sup { vertical-align: baseline; }';"," resetCSS += 'ID sub { vertical-align: baseline; }';"," "," NR.NAME = \"gallery-node-reset\";",""," NR.NS = \"reset\";",""," NR.ATTRS = {"," node: {"," setter: function(n) {"," return Y.one(n);"," }"," },"," sheet: {"," value: null"," }"," };",""," Y.extend(NR, Y.Base, {"," initializer: function() {"," var id = this.get('node').get('id'), sheet;",""," resetCSS = resetCSS.replace(/, /g, ', #' + id + ' ');"," resetCSS = resetCSS.replace(/ID/g, '#' + id);",""," sheet = Y.StyleSheet(resetCSS, 'node-reset-' + id);"," sheet.enable();",""," this.set('sheet', sheet);"," },"," destructor: function() {"," this.get('sheet').disable();"," }"," });"," Y.namespace('Plugin');"," Y.Plugin.NodeReset = NR;",""," ","","","}, '@VERSION@');"];
+_yuitest_coverage["build/gallery-node-reset/gallery-node-reset.js"].lines = {"1":0,"4":0,"5":0,"10":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"24":0,"26":0,"28":0,"31":0,"39":0,"41":0,"43":0,"44":0,"46":0,"47":0,"49":0,"52":0,"55":0,"56":0};
+_yuitest_coverage["build/gallery-node-reset/gallery-node-reset.js"].functions = {"NR:4":0,"setter:30":0,"initializer:40":0,"destructor:51":0,"(anonymous 1):1":0};
+_yuitest_coverage["build/gallery-node-reset/gallery-node-reset.js"].coveredLines = 28;
+_yuitest_coverage["build/gallery-node-reset/gallery-node-reset.js"].coveredFunctions = 5;
+_yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 1);
+YUI.add('gallery-node-reset', function (Y, NAME) {
+
+
+ _yuitest_coverfunc("build/gallery-node-reset/gallery-node-reset.js", "(anonymous 1)", 1);
+_yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 4);
+var NR = function(config) {
+ _yuitest_coverfunc("build/gallery-node-reset/gallery-node-reset.js", "NR", 4);
+_yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 5);
+config.node = (
+ (Y.Widget && config.host instanceof Y.Widget) ? config.host.get('boundingBox') :
+ ((config.host) ? config.host : config.node)
+ );
+
+ _yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 10);
+NR.superclass.constructor.call(this, config);
+ },
+ resetCSS = 'ID div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, button, textarea, p, blockquote, th, td { margin: 0; padding: 0; }';
+ _yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 13);
+resetCSS += 'ID table { border-collapse: collapse; border-spacing: 0; }';
+ _yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 14);
+resetCSS += 'ID fieldset, img { border: 0; }';
+ _yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 15);
+resetCSS += 'ID address, caption, cite, code, dfn, em, strong, th, var, optgroup { font-style: inherit; font-weight: inherit; }';
+ _yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 16);
+resetCSS += 'ID del, ins { text-decoration: none; }';
+ _yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 17);
+resetCSS += 'ID li { list-style: none; }';
+ _yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 18);
+resetCSS += 'ID caption, th { text-align: left; }';
+ _yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 19);
+resetCSS += 'ID h1, h2, h3, h4, h5, h6 { font-size: 100%; font-weight: normal; }';
+ _yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 20);
+resetCSS += 'ID abbr, acronym { border: 0; font-variant: normal; }';
+ _yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 21);
+resetCSS += 'ID sup { vertical-align: baseline; }';
+ _yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 22);
+resetCSS += 'ID sub { vertical-align: baseline; }';
+
+ _yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 24);
+NR.NAME = "gallery-node-reset";
+
+ _yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 26);
+NR.NS = "reset";
+
+ _yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 28);
+NR.ATTRS = {
+ node: {
+ setter: function(n) {
+ _yuitest_coverfunc("build/gallery-node-reset/gallery-node-reset.js", "setter", 30);
+_yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 31);
+return Y.one(n);
+ }
+ },
+ sheet: {
+ value: null
+ }
+ };
+
+ _yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 39);
+Y.extend(NR, Y.Base, {
+ initializer: function() {
+ _yuitest_coverfunc("build/gallery-node-reset/gallery-node-reset.js", "initializer", 40);
+_yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 41);
+var id = this.get('node').get('id'), sheet;
+
+ _yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 43);
+resetCSS = resetCSS.replace(/, /g, ', #' + id + ' ');
+ _yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 44);
+resetCSS = resetCSS.replace(/ID/g, '#' + id);
+
+ _yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 46);
+sheet = Y.StyleSheet(resetCSS, 'node-reset-' + id);
+ _yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 47);
+sheet.enable();
+
+ _yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 49);
+this.set('sheet', sheet);
+ },
+ destructor: function() {
+ _yuitest_coverfunc("build/gallery-node-reset/gallery-node-reset.js", "destructor", 51);
+_yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 52);
+this.get('sheet').disable();
+ }
+ });
+ _yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 55);
+Y.namespace('Plugin');
+ _yuitest_coverline("build/gallery-node-reset/gallery-node-reset.js", 56);
+Y.Plugin.NodeReset = NR;
+
+
+
+
+}, '@VERSION@');
@@ -0,0 +1,61 @@
+YUI.add('gallery-node-reset', function (Y, NAME) {
+
+
+ var NR = function(config) {
+ config.node = (
+ (Y.Widget && config.host instanceof Y.Widget) ? config.host.get('boundingBox') :
+ ((config.host) ? config.host : config.node)
+ );
+
+ NR.superclass.constructor.call(this, config);
+ },
+ resetCSS = 'ID div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, button, textarea, p, blockquote, th, td { margin: 0; padding: 0; }';
+ resetCSS += 'ID table { border-collapse: collapse; border-spacing: 0; }';
+ resetCSS += 'ID fieldset, img { border: 0; }';
+ resetCSS += 'ID address, caption, cite, code, dfn, em, strong, th, var, optgroup { font-style: inherit; font-weight: inherit; }';
+ resetCSS += 'ID del, ins { text-decoration: none; }';
+ resetCSS += 'ID li { list-style: none; }';
+ resetCSS += 'ID caption, th { text-align: left; }';
+ resetCSS += 'ID h1, h2, h3, h4, h5, h6 { font-size: 100%; font-weight: normal; }';
+ resetCSS += 'ID abbr, acronym { border: 0; font-variant: normal; }';
+ resetCSS += 'ID sup { vertical-align: baseline; }';
+ resetCSS += 'ID sub { vertical-align: baseline; }';
+
+ NR.NAME = "gallery-node-reset";
+
+ NR.NS = "reset";
+
+ NR.ATTRS = {
+ node: {
+ setter: function(n) {
+ return Y.one(n);
+ }
+ },
+ sheet: {
+ value: null
+ }
+ };
+
+ Y.extend(NR, Y.Base, {
+ initializer: function() {
+ var id = this.get('node').get('id'), sheet;
+
+ resetCSS = resetCSS.replace(/, /g, ', #' + id + ' ');
+ resetCSS = resetCSS.replace(/ID/g, '#' + id);
+
+ sheet = Y.StyleSheet(resetCSS, 'node-reset-' + id);
+ sheet.enable();
+
+ this.set('sheet', sheet);
+ },
+ destructor: function() {
+ this.get('sheet').disable();
+ }
+ });
+ Y.namespace('Plugin');
+ Y.Plugin.NodeReset = NR;
+
+
+
+
+}, '@VERSION@');
@@ -0,0 +1 @@
+YUI.add("gallery-node-reset",function(e,t){var n=function(t){t.node=e.Widget&&t.host instanceof e.Widget?t.host.get("boundingBox"):t.host?t.host:t.node,n.superclass.constructor.call(this,t)},r="ID div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, button, textarea, p, blockquote, th, td { margin: 0; padding: 0; }";r+="ID table { border-collapse: collapse; border-spacing: 0; }",r+="ID fieldset, img { border: 0; }",r+="ID address, caption, cite, code, dfn, em, strong, th, var, optgroup { font-style: inherit; font-weight: inherit; }",r+="ID del, ins { text-decoration: none; }",r+="ID li { list-style: none; }",r+="ID caption, th { text-align: left; }",r+="ID h1, h2, h3, h4, h5, h6 { font-size: 100%; font-weight: normal; }",r+="ID abbr, acronym { border: 0; font-variant: normal; }",r+="ID sup { vertical-align: baseline; }",r+="ID sub { vertical-align: baseline; }",n.NAME="gallery-node-reset",n.NS="reset",n.ATTRS={node:{setter:function(t){return e.one(t)}},sheet:{value:null}},e.extend(n,e.Base,{initializer:function(){var t=this.get("node").get("id"),n;r=r.replace(/, /g,", #"+t+" "),r=r.replace(/ID/g,"#"+t),n=e.StyleSheet(r,"node-reset-"+t),n.enable(),this.set("sheet",n)},destructor:function(){this.get("sheet").disable()}}),e.namespace("Plugin"),e.Plugin.NodeReset=n},"@VERSION@");
@@ -0,0 +1,61 @@
+YUI.add('gallery-node-reset', function (Y, NAME) {
+
+
+ var NR = function(config) {
+ config.node = (
+ (Y.Widget && config.host instanceof Y.Widget) ? config.host.get('boundingBox') :
+ ((config.host) ? config.host : config.node)
+ );
+
+ NR.superclass.constructor.call(this, config);
+ },
+ resetCSS = 'ID div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, button, textarea, p, blockquote, th, td { margin: 0; padding: 0; }';
+ resetCSS += 'ID table { border-collapse: collapse; border-spacing: 0; }';
+ resetCSS += 'ID fieldset, img { border: 0; }';
+ resetCSS += 'ID address, caption, cite, code, dfn, em, strong, th, var, optgroup { font-style: inherit; font-weight: inherit; }';
+ resetCSS += 'ID del, ins { text-decoration: none; }';
+ resetCSS += 'ID li { list-style: none; }';
+ resetCSS += 'ID caption, th { text-align: left; }';
+ resetCSS += 'ID h1, h2, h3, h4, h5, h6 { font-size: 100%; font-weight: normal; }';
+ resetCSS += 'ID abbr, acronym { border: 0; font-variant: normal; }';
+ resetCSS += 'ID sup { vertical-align: baseline; }';
+ resetCSS += 'ID sub { vertical-align: baseline; }';
+
+ NR.NAME = "gallery-node-reset";
+
+ NR.NS = "reset";
+
+ NR.ATTRS = {
+ node: {
+ setter: function(n) {
+ return Y.one(n);
+ }
+ },
+ sheet: {
+ value: null
+ }
+ };
+
+ Y.extend(NR, Y.Base, {
+ initializer: function() {
+ var id = this.get('node').get('id'), sheet;
+
+ resetCSS = resetCSS.replace(/, /g, ', #' + id + ' ');
+ resetCSS = resetCSS.replace(/ID/g, '#' + id);
+
+ sheet = Y.StyleSheet(resetCSS, 'node-reset-' + id);
+ sheet.enable();
+
+ this.set('sheet', sheet);
+ },
+ destructor: function() {
+ this.get('sheet').disable();
+ }
+ });
+ Y.namespace('Plugin');
+ Y.Plugin.NodeReset = NR;
+
+
+
+
+}, '@VERSION@');
No changes.
@@ -0,0 +1,10 @@
+{
+ "name": "gallery-node-reset",
+ "builds": {
+ "gallery-node-reset": {
+ "jsfiles": [
+ "node-reset.js"
+ ]
+ }
+ }
+}
No changes.
@@ -0,0 +1,10 @@
+{
+ "name" : "gallery-node-reset",
+ "displayName": "Gallery: node-reset",
+ "description": "This module attempts to localize the CSS Reset to a specific node.",
+ "author" : [ "davglass" ],
+
+ "tags": [ "gallery" ],
+
+ "examples": []
+}
@@ -0,0 +1,22 @@
+<div class="intro">
+ <p>
+ This module attempts to localize the CSS Reset to a specific node.
+ </p>
+</div>
+
+<h2>Description</h2>
+
+<p>This module attempts to localize the CSS Reset to a specific node.<br>
+<br>
+It scopes the rules found in the YUI reset.css file to the node that it's plugged into.<br>
+</p>
+
+```
+YUI().use('gallery-node-reset', function(Y) {
+
+ var node = Y.one('#demo');
+ node.plug(Y.Plugin.NodeReset);
+
+});
+```
+
No changes.
@@ -0,0 +1,12 @@
+{
+ "gallery-node-reset": {
+ "requires": [
+ "node",
+ "base",
+ "stylesheet"
+ ],
+ "supersedes": [],
+ "optional": [],
+ "skinnable": false
+ }
+}
@@ -0,0 +1,24 @@
+<!doctype html>
+<html>
+<head>
+ <title>gallery-node-reset</title>
+ <script src="/build/yui/yui.js"></script>
+ <script src="js/tests.js"></script>
+</head>
+<body class="yui3-skin-sam">
+<div id="logger"></div>
+
+<script>
+YUI({
+ coverage: ['node-reset'],
+ filter: (window.location.search.match(/[?&]filter=([^&]+)/) || [])[1] || 'raw'
+}).use('test-console', 'test', 'module-tests', function(Y) {
+
+ (new Y.Test.Console()).render('#logger');
+
+ Y.Test.Runner.setName('gallery-node-reset');
+ Y.Test.Runner.run();
+});
+</script>
+</body>
+</html>
@@ -0,0 +1,15 @@
+YUI.add('module-tests', function(Y) {
+
+ var suite = new Y.Test.Suite('gallery-node-reset');
+
+ suite.add(new Y.Test.Case({
+ name: 'Automated Tests',
+ 'test is empty': function() {
+ Y.Assert.fail('No Tests Provided For This Module');
+ }
+ }));
+
+ Y.Test.Runner.add(suite);
+
+
+},'', { requires: [ 'test' ] });

0 comments on commit d404e33

Please sign in to comment.