From 676e719f46f04aca424eb595a400d2908fe41b8e Mon Sep 17 00:00:00 2001 From: chenmnkken Date: Sat, 16 Feb 2013 13:39:46 +0800 Subject: [PATCH] =?UTF-8?q?easyData.data=E6=96=B9=E6=B3=95=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=A4=9A=E4=B8=AA=E5=91=BD=E5=90=8D=E7=A9=BA=E9=97=B4?= =?UTF-8?q?=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 【缓存模块】easyData.data方法修复多个命名空间的BUG easyData.data方法修复了DOM元素如果有多个命名空间的缓存时,会出现添加空缓存的BUG。 --- build/{easy-0.8.3.js => easy-0.8.4.js} | 10 +- .../{easy-0.8.3.min.js => easy-0.8.4.min.js} | 8 +- src/data.js | 4 + test/anim.html | 422 +++++++++--------- test/event.html | 2 +- test/index.html | 2 +- test/module/easyCheck.js | 2 +- tools/build.js | 2 +- 8 files changed, 230 insertions(+), 222 deletions(-) rename build/{easy-0.8.3.js => easy-0.8.4.js} (96%) rename build/{easy-0.8.3.min.js => easy-0.8.4.min.js} (98%) diff --git a/build/easy-0.8.3.js b/build/easy-0.8.4.js similarity index 96% rename from build/easy-0.8.3.js rename to build/easy-0.8.4.js index df0887e..1290e7b 100644 --- a/build/easy-0.8.3.js +++ b/build/easy-0.8.4.js @@ -1,11 +1,11 @@ /* -* easy.js v0.8.3 +* easy.js v0.8.4 * * Copyright (c) 2012 Yiguo Chen * Released under the MIT and GPL Licenses * * Mail : chenmnkken@gmail.com -* Date : 2013-1-30 18:2:33 +* Date : 2013-2-16 13:38:28 */ // --------------------------------------------- @@ -238,7 +238,7 @@ easyJS.mix = function( target, source, override, whitelist ){ easyJS.mix( easyJS, { - version : '0.8.3', + version : '0.8.4', __uuid__ : 2, @@ -1556,6 +1556,10 @@ var easyData = { if( isNamespace ){ if( !(type in cache) ){ + if( isUndefined ){ + return; + } + cache[ type ] = {}; } diff --git a/build/easy-0.8.3.min.js b/build/easy-0.8.4.min.js similarity index 98% rename from build/easy-0.8.3.min.js rename to build/easy-0.8.4.min.js index c33146f..ae82721 100644 --- a/build/easy-0.8.3.min.js +++ b/build/easy-0.8.4.min.js @@ -1,8 +1,8 @@ -/* easy.js v0.8.3 | MIT and GPL Licenses | 2013-1-30 18:2:33 */ +/* easy.js v0.8.4 | MIT and GPL Licenses | 2013-2-16 13:38:28 */ (function(q,r){var V,Z,n=q.document,fa=!1,wa=!1,$=[],gb=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,xa=/^(http(?:s)?\:\/\/|file\:.+\:\/)/,hb=/loaded|complete|undefined/,M={},N={},W=n.head||n.getElementsByTagName("head")[0]||n.documentElement,ib=W.getElementsByTagName("base")[0],ya=n.createDocumentFragment(),ga=null,ha={},za=[/ms(ie)\s(\d\.\d)/,/(chrome)\/(\d+\.\d+)/,/(firefox)\/(\d+\.\d+)/,/version\/(\d+\.\d+)(?:\.\d)?\s(safari)/,/(opera)(?:.*version)\/([\d.]+)/],v=function(a,b){return new Aa(a,b)}, Aa=function(a,b){var c;this.length=0;if(!a)return this;if("string"===typeof a){a=a.trim();if("body"===a&&!b&&n.body)return this[0]=n.body,this.length=1,this;if("<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&3<=a.length)b=b?b.ownerDocument||b:n,c=v.create(a,b);else{b=b||n;if((c=gb.exec(a))&&~c[0].indexOf("#")){b=b?b.ownerDocument||b:n;if(c=b.getElementById(c[2]))this[0]=c,this.length=1;return this}c=v.query(a,b)}return v.makeArray(c,this)}if("function"===typeof a){a:{c=a;var d,e,f=!1,g=n.documentElement.doScroll, h=g?"onreadystatechange":"DOMContentLoaded",k=function(){if(!fa&&(fa=!0,$)){for(var a=0,b;b=$[a++];)b.call(q,v);$=r}},j=function(){try{g("left"),k()}catch(a){setTimeout(j,1)}};if(!wa){wa=!0;if("complete"===n.readyState){c=k();break a}if(n.addEventListener)d=function(){n.removeEventListener(h,d,!1);k()},n.addEventListener(h,d,!1),q.addEventListener("load",k,!1);else if(n.attachEvent){e=function(){"complete"===n.readyState&&(n.detachEvent(h,e),k())};n.attachEvent(h,e);q.attachEvent("onload",k);try{f= -null==q.frameElement}catch(l){}g&&f&&j()}}fa?c.call(q,v):$.push(c);c=void 0}return c}if(a.nodeType||"object"===typeof a&&"setInterval"in a)return this[0]=a,this.length=1,this;if("number"===typeof a.length)return v.makeArray(a,this)};Aa.prototype=v.prototype;v.mix=function(a,b,c,d){if(a&&b){c===r&&(c=!0);var e,f,g=function(d){if(!0===c||!(d in a))a[d]=b[d]};if(d&&(f=d.length))for(;f;)e=d[--f],e in b&&g(e);else for(e in b)g(e);return a}};v.mix(v,{version:"0.8.3",__uuid__:2,ui:{},browser:{ie:!1,chrome:!1, +null==q.frameElement}catch(l){}g&&f&&j()}}fa?c.call(q,v):$.push(c);c=void 0}return c}if(a.nodeType||"object"===typeof a&&"setInterval"in a)return this[0]=a,this.length=1,this;if("number"===typeof a.length)return v.makeArray(a,this)};Aa.prototype=v.prototype;v.mix=function(a,b,c,d){if(a&&b){c===r&&(c=!0);var e,f,g=function(d){if(!0===c||!(d in a))a[d]=b[d]};if(d&&(f=d.length))for(;f;)e=d[--f],e in b&&g(e);else for(e in b)g(e);return a}};v.mix(v,{version:"0.8.4",__uuid__:2,ui:{},browser:{ie:!1,chrome:!1, firefox:!1,safari:!1,opera:!1},module:{},merge:function(){for(var a={},b=0,c=arguments.length;b
';O=B.getElementsByTagName("input")[0];ja=B.getElementsByTagName("button")[0];aa=n.createElement("select");ka=aa.appendChild(n.createElement("option"));var Ha=function(a,b){if(n.createEvent){var c=n.createEvent("HTMLEvents"); c.initEvent(b,!0,!0);a.dispatchEvent(c)}else a.fireEvent("on"+b)},J={tbody:!B.getElementsByTagName("tbody").length,htmlSerialize:!!B.getElementsByTagName("link").length,cloneEvent:!1,cloneHTML5:"<:nav>"!==n.createElement("nav").cloneNode(!0).outerHTML,buttonValue:"testValue"===ja.getAttribute("value"),checkOn:"on"===O.value,mouseEnter:!1};O.checked=!0;J.cloneChecked=O.cloneNode(!0).checked;O.setAttribute("tabindex","5");J.attrTabindex=5===parseInt(O.getAttribute("tabindex"));!B.addEventListener&& (B.attachEvent&&B.fireEvent)&&(la=function(){J.cloneEvent=!0;B.detachEvent("onclick",la)},B.attachEvent("onclick",la),B.cloneNode(!0).fireEvent("onclick"));B.onmouseenter=function(){J.mouseEnter=!0};Ha(B,"mouseenter");E.browser.firefox?(J.focusin=!1,B.onfocusin=function(){J.focusin=!0},Ha(B,"focusin")):J.focusin=!0;aa.disabled=!0;J.optDisabled=!ka.disabled;B=O=ja=aa=ka=B.onmouseenter=null;sb.support=J;E.cache={};var z={getCacheIndex:function(a,b){if(1===a.nodeType){var c=E.euid;return!b||c in a?a[c]: -a[c]=++E.__uuid__}return E.isWindow(a)?0:9===a.nodeType?1:"HTML"===a.tagName?2:-1},data:function(a,b,c,d,e){var f=E.cache,g=null!==b,h=d===r;a=z.getCacheIndex(a,!h);if(a!==r&&(!(a in f)&&!h&&(f[a]={}),f=f[a])){g?(b in f||(f[b]={}),a=f[b][c]):a=f[c];if(h||!e&&a!==r)return a;if(e||!h)return g?f[b][c]=d:f[c]=d,d}},removeData:function(a,b,c){var d=z.getCacheIndex(a),e=E.cache;if(d in e){e=e[d];c&&(null!==b?e[b]&&delete e[b][c]:delete e[c]);if(!c||null!==b&&E.isEmptyObject(e[b]))e[b]=null,delete e[b]; -E.isEmptyObject(e)&&(delete E.cache[d],e=r);if(!(3>d)&&e===r)try{delete a[E.euid]}catch(f){a.removeAttribute(E.euid)}}},hasData:function(a){a=z.getCacheIndex(a);return!!(a!==r&&E.cache[a])}};E.mix(E.prototype,{data:function(a,b){if(E.isPlainObject(a))return E.each(a,function(a,b){this.data(a,b)},this),this;if(b===r)return z.data(this[0],"data",a);for(var c=0,d=this.length;cd)&&e===r)try{delete a[E.euid]}catch(f){a.removeAttribute(E.euid)}}},hasData:function(a){a=z.getCacheIndex(a);return!!(a!==r&&E.cache[a])}};E.mix(E.prototype,{data:function(a,b){if(E.isPlainObject(a))return E.each(a,function(a,b){this.data(a,b)},this),this;if(b===r)return z.data(this[0],"data",a);for(var c=0,d=this.length;c\+~][^\d\=]/,Ja={"class":"className","for":"htmlFor",id:"id",title:"title",type:"type"};[0,0].sort(function(){Ia=!1;return 0});var s={unique:function(a,b){if(2>a.length)return a;var c=0,d=1, e=a.length;ma=Ia;ba=b;if(a[0].sourceIndex){for(var d=[],f={},g=[],h=0,k,j;c - - - -easy.js 动画模块测试 - - - -
-

easy.js 动画模块测试

+ + + + +easy.js 动画模块测试 + + + + - - - - +
  • + +
    2
    +
  • +
  • + +
    3
    +
  • +
  • + +
    4
    +
  • +
  • + +
    5
    +
  • +
  • + +
    6
    +
  • +
  • + +
    7
    +
  • +
  • + +
    8
    +
  • +
  • + +
    9
    +
  • +
  • + +
    10
    +
  • + +
    + + + + \ No newline at end of file diff --git a/test/event.html b/test/event.html index 4a3df24..d02d982 100644 --- a/test/event.html +++ b/test/event.html @@ -72,7 +72,7 @@

    卸载普通输入框的 change 事件

    - + +