diff --git a/Source/Element/Element.js b/Source/Element/Element.js index 3cc2c4d4f..55e2d9178 100644 --- a/Source/Element/Element.js +++ b/Source/Element/Element.js @@ -262,7 +262,7 @@ var attributes = { 'text': (Browser.Engine.trident || (Browser.Engine.webkit && Browser.Engine.version < 420)) ? 'innerText' : 'textContent' }; var bools = ['compact', 'nowrap', 'ismap', 'declare', 'noshade', 'checked', 'disabled', 'readonly', 'multiple', 'selected', 'noresize', 'defer']; -var camels = ['value', 'accessKey', 'cellPadding', 'cellSpacing', 'colSpan', 'frameBorder', 'maxLength', 'readOnly', 'rowSpan', 'tabIndex', 'useMap']; +var camels = ['value', 'type', 'defaultValue', 'accessKey', 'cellPadding', 'cellSpacing', 'colSpan', 'frameBorder', 'maxLength', 'readOnly', 'rowSpan', 'tabIndex', 'useMap']; bools = bools.associate(bools); @@ -336,7 +336,7 @@ Element.implement({ }, setProperty: function(attribute, value){ - var key = attributes[attribute]; + var key = attributes[attribute.toLowerCase()]; if (value == undefined) return this.removeProperty(attribute); if (key && bools[attribute]) value = !!value; (key) ? this[key] = value : this.setAttribute(attribute, '' + value); @@ -349,7 +349,7 @@ Element.implement({ }, getProperty: function(attribute){ - var key = attributes[attribute]; + var key = attributes[attribute.toLowerCase()]; var value = (key) ? this[key] : this.getAttribute(attribute, 2); return (bools[attribute]) ? !!value : (key) ? value : value || null; }, @@ -360,7 +360,7 @@ Element.implement({ }, removeProperty: function(attribute){ - var key = attributes[attribute]; + var key = attributes[attribute.toLowerCase()]; (key) ? this[key] = (key && bools[attribute]) ? false : '' : this.removeAttribute(attribute); return this; }, diff --git a/Specs/Assets/Scripts/Builder.js b/Specs/Assets/Scripts/Builder.js index 9193f5ca6..aa9fac6c8 100644 --- a/Specs/Assets/Scripts/Builder.js +++ b/Specs/Assets/Scripts/Builder.js @@ -10,96 +10,30 @@ Note: */ var Builder = { - - root: '../', - - paths: { - source: 'Source', - specs: 'Specs' - }, - - included: { - source: {}, - specs: {}, - docs: {} - }, - - scripts: { - source: { - 'Core' : ['Core', 'Browser'], - 'Native' : ['Array', 'Function', 'Number', 'String', 'Hash', 'Event'], - 'Class' : ['Class', 'Class.Extras'], - 'Element' : ['Element', 'Element.Event', 'Element.Style', 'Element.Dimensions'], - 'Utilities' : ['Selectors', 'DomReady', 'JSON', 'Cookie', 'Swiff'], - 'Fx' : ['Fx', 'Fx.CSS', 'Fx.Tween', 'Fx.Morph', 'Fx.Transitions'], - 'Request' : ['Request', 'Request.HTML', 'Request.JSON'] - }, - - specs: { - 'Core' : ['Core', 'Browser'], - 'Native' : ['Array', 'String', 'Function', 'Number', 'Hash'], - 'Class' : ['Class', 'Class.Extras'], - 'Element' : ['Element', 'Element.Style', 'Element.Dimensions'], - 'Utilities' : ['Selectors'] - } - }, - - initialize: function(root){ - if (root) this.root = root; - this.includeType('source'); - return this; - }, - - getFolder: function(type, file){ - var scripts = this.scripts[type]; - for (var folder in scripts){ - for (var i = 0; i < scripts[folder].length; i++){ - var script = scripts[folder][i]; - if (script == file) return folder; + includeFiles: function(path, files){ + switch(typeof files){ + case 'object': + if( files.constructor == Array ){ + for(var i=0; i< files.length; i++){ + this.includeJs(path + files[i]); + } } + else{ + for(key in files){ + this.includeFiles(path + key + '/', files[key]); + } + } + break; + case 'string': + this.includeJs(path + files); } - return false; - }, - - getRequest: function(){ - var pairs = window.location.search.substring(1).split('&'); - var obj = {}; - for (var i = 0, l = pairs.length; i < l; i++){ - var pair = pairs[i].split('='); - obj[pair[0]] = pair[1]; - } - return obj; - }, - - includeFile: function(type, folder, file){ - folder = folder || this.getFolder(type, file); - if (!folder) return false; - this.included[type][folder] = this.included[type][folder] || []; - var files = this.included[type][folder]; - for (var i = 0; i < files.length; i++){ - if (files[i] == file) return false; - } - this.included[type][folder].push(file); - return document.writeln(''); - }, - - includeFolder: function(type, folder){ - var scripts = this.scripts[type][folder]; - for (var i = 0, l = scripts.length; i < l; i++) this.includeFile(type, folder, scripts[i]); }, - - includeType: function(type){ - for (var folder in this.scripts[type]) this.includeFolder(type, folder); + + includeJs: function(filePath){ + document.writeln(' - - - - - - - - - - - + + MooTools Specs + + + + + + + + + + + \ No newline at end of file