Changeset 1333
- Timestamp:
- 03/16/08 23:59:02 (4 months ago)
- Files:
-
- mochikit/trunk/MochiKit/DOM.js (modified) (2 diffs)
- mochikit/trunk/packed/MochiKit/MochiKit.js (modified) (94 diffs)
- mochikit/trunk/tests/test_MochiKit-DOM.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
mochikit/trunk/MochiKit/DOM.js
r1325 r1333 64 64 "OL", 65 65 "LI", 66 "DL",67 "DT",68 "DD",66 "DL", 67 "DT", 68 "DD", 69 69 "TD", 70 70 "TR", … … 356 356 maybeparent = self.getElement(maybeparent); 357 357 } 358 if (typeof(node) == 'undefined' || node === null || node === self._document) {358 if (typeof(node) == 'undefined' || node === null) { 359 359 return false; 360 360 } 361 do{361 while (node !== self._document) { 362 362 if (node === maybeparent) { 363 363 return true; 364 364 } 365 var tagName = node.tagName;366 365 node = node.parentNode; 367 if (!tagName) { 368 break; 369 } 370 tagName = tagName.toUpperCase(); 371 } while (tagName != "BODY" && tagName != "HTML"); 366 } 372 367 return false; 373 368 }, mochikit/trunk/packed/MochiKit/MochiKit.js
r1323 r1333 2811 2811 _30d=self.getElement(_30d); 2812 2812 } 2813 if(typeof (node)=="undefined"||node===null ||node===self._document){2813 if(typeof (node)=="undefined"||node===null){ 2814 2814 return false; 2815 2815 } 2816 do{2816 while(node!==self._document){ 2817 2817 if(node===_30d){ 2818 2818 return true; 2819 2819 } 2820 var _30f=node.tagName;2821 2820 node=node.parentNode; 2822 if(!_30f){ 2823 break; 2824 } 2825 _30f=_30f.toUpperCase(); 2826 }while(_30f!="BODY"&&_30f!="HTML"); 2821 } 2827 2822 return false; 2828 },setNodeAttribute:function(node,attr,_31 2){2823 },setNodeAttribute:function(node,attr,_311){ 2829 2824 var o={}; 2830 o[attr]=_31 2;2825 o[attr]=_311; 2831 2826 try{ 2832 2827 return MochiKit.DOM.updateNodeAttributes(node,o); … … 2837 2832 },getNodeAttribute:function(node,attr){ 2838 2833 var self=MochiKit.DOM; 2839 var _31 7=self.attributeArray.renames[attr];2834 var _316=self.attributeArray.renames[attr]; 2840 2835 node=self.getElement(node); 2841 2836 try{ 2842 if(_31 7){2843 return node[_31 7];2837 if(_316){ 2838 return node[_316]; 2844 2839 } 2845 2840 return node.getAttribute(attr); … … 2850 2845 },removeNodeAttribute:function(node,attr){ 2851 2846 var self=MochiKit.DOM; 2852 var _31 b=self.attributeArray.renames[attr];2847 var _31a=self.attributeArray.renames[attr]; 2853 2848 node=self.getElement(node); 2854 2849 try{ 2855 if(_31 b){2856 return node[_31 b];2850 if(_31a){ 2851 return node[_31a]; 2857 2852 } 2858 2853 return node.removeAttribute(attr); … … 2861 2856 } 2862 2857 return null; 2863 },updateNodeAttributes:function(node,_31 d){2858 },updateNodeAttributes:function(node,_31c){ 2864 2859 var elem=node; 2865 2860 var self=MochiKit.DOM; … … 2867 2862 elem=self.getElement(node); 2868 2863 } 2869 if(_31 d){2870 var _3 20=MochiKit.Base.updatetree;2864 if(_31c){ 2865 var _31f=MochiKit.Base.updatetree; 2871 2866 if(self.attributeArray.compliant){ 2872 for(var k in _31 d){2873 var v=_31 d[k];2867 for(var k in _31c){ 2868 var v=_31c[k]; 2874 2869 if(typeof (v)=="object"&&typeof (elem[k])=="object"){ 2875 2870 if(k=="style"&&MochiKit.Style){ 2876 2871 MochiKit.Style.setStyle(elem,v); 2877 2872 }else{ 2878 _3 20(elem[k],v);2873 _31f(elem[k],v); 2879 2874 } 2880 2875 }else{ … … 2890 2885 } 2891 2886 }else{ 2892 var _32 3=self.attributeArray.renames;2893 for(var k in _31 d){2894 v=_31 d[k];2895 var _32 4=_323[k];2887 var _322=self.attributeArray.renames; 2888 for(var k in _31c){ 2889 v=_31c[k]; 2890 var _323=_322[k]; 2896 2891 if(k=="style"&&typeof (v)=="string"){ 2897 2892 elem.style.cssText=v; 2898 2893 }else{ 2899 if(typeof (_32 4)=="string"){2900 elem[_32 4]=v;2894 if(typeof (_323)=="string"){ 2895 elem[_323]=v; 2901 2896 }else{ 2902 2897 if(typeof (elem[k])=="object"&&typeof (v)=="object"){ … … 2904 2899 MochiKit.Style.setStyle(elem,v); 2905 2900 }else{ 2906 _3 20(elem[k],v);2901 _31f(elem[k],v); 2907 2902 } 2908 2903 }else{ … … 2928 2923 elem=self.getElement(node); 2929 2924 } 2930 var _32 8=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)];2931 var _32 9=MochiKit.Base.concat;2932 while(_32 8.length){2933 var n=_32 8.shift();2925 var _327=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)]; 2926 var _328=MochiKit.Base.concat; 2927 while(_327.length){ 2928 var n=_327.shift(); 2934 2929 if(typeof (n)=="undefined"||n===null){ 2935 2930 }else{ … … 2937 2932 elem.appendChild(n); 2938 2933 }else{ 2939 _32 8=_329(n,_328);2934 _327=_328(n,_327); 2940 2935 } 2941 2936 } … … 2948 2943 elem=self.getElement(node); 2949 2944 } 2950 var _32 e=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)];2951 var _32 f=elem.parentNode;2952 var _3 30=MochiKit.Base.concat;2953 while(_32 e.length){2954 var n=_32 e.shift();2945 var _32d=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)]; 2946 var _32e=elem.parentNode; 2947 var _32f=MochiKit.Base.concat; 2948 while(_32d.length){ 2949 var n=_32d.shift(); 2955 2950 if(typeof (n)=="undefined"||n===null){ 2956 2951 }else{ 2957 2952 if(typeof (n.nodeType)=="number"){ 2958 _32 f.insertBefore(n,elem);2959 }else{ 2960 _32 e=_330(n,_32e);2961 } 2962 } 2963 } 2964 return _32 f;2953 _32e.insertBefore(n,elem); 2954 }else{ 2955 _32d=_32f(n,_32d); 2956 } 2957 } 2958 } 2959 return _32e; 2965 2960 },insertSiblingNodesAfter:function(node){ 2966 2961 var elem=node; … … 2969 2964 elem=self.getElement(node); 2970 2965 } 2971 var _33 5=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)];2966 var _334=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)]; 2972 2967 if(elem.nextSibling){ 2973 return self.insertSiblingNodesBefore(elem.nextSibling,_33 5);2974 }else{ 2975 return self.appendChildNodes(elem.parentNode,_33 5);2968 return self.insertSiblingNodesBefore(elem.nextSibling,_334); 2969 }else{ 2970 return self.appendChildNodes(elem.parentNode,_334); 2976 2971 } 2977 2972 },replaceChildNodes:function(node){ … … 2982 2977 arguments[0]=elem; 2983 2978 } 2984 var _33 9;2985 while((_33 9=elem.firstChild)){2986 elem.removeChild(_33 9);2979 var _338; 2980 while((_338=elem.firstChild)){ 2981 elem.removeChild(_338); 2987 2982 } 2988 2983 if(arguments.length<2){ … … 2991 2986 return self.appendChildNodes.apply(this,arguments); 2992 2987 } 2993 },createDOM:function(name,_33 b){2988 },createDOM:function(name,_33a){ 2994 2989 var elem; 2995 2990 var self=MochiKit.DOM; 2996 2991 var m=MochiKit.Base; 2997 if(typeof (_33 b)=="string"||typeof (_33b)=="number"){2992 if(typeof (_33a)=="string"||typeof (_33a)=="number"){ 2998 2993 var args=m.extend([name,null],arguments,1); 2999 2994 return arguments.callee.apply(this,args); 3000 2995 } 3001 2996 if(typeof (name)=="string"){ 3002 var _3 40=self._xhtml;3003 if(_33 b&&!self.attributeArray.compliant){3004 var _34 1="";3005 if("name" in _33 b){3006 _34 1+=" name=\""+self.escapeHTML(_33b.name)+"\"";3007 } 3008 if(name=="input"&&"type" in _33 b){3009 _34 1+=" type=\""+self.escapeHTML(_33b.type)+"\"";3010 } 3011 if(_34 1){3012 name="<"+name+_34 1+">";3013 _3 40=false;2997 var _33f=self._xhtml; 2998 if(_33a&&!self.attributeArray.compliant){ 2999 var _340=""; 3000 if("name" in _33a){ 3001 _340+=" name=\""+self.escapeHTML(_33a.name)+"\""; 3002 } 3003 if(name=="input"&&"type" in _33a){ 3004 _340+=" type=\""+self.escapeHTML(_33a.type)+"\""; 3005 } 3006 if(_340){ 3007 name="<"+name+_340+">"; 3008 _33f=false; 3014 3009 } 3015 3010 } 3016 3011 var d=self._document; 3017 if(_3 40&&d===document){3012 if(_33f&&d===document){ 3018 3013 elem=d.createElementNS("http://www.w3.org/1999/xhtml",name); 3019 3014 }else{ … … 3023 3018 elem=name; 3024 3019 } 3025 if(_33 b){3026 self.updateNodeAttributes(elem,_33 b);3020 if(_33a){ 3021 self.updateNodeAttributes(elem,_33a); 3027 3022 } 3028 3023 if(arguments.length<=2){ … … 3042 3037 var self=MochiKit.DOM; 3043 3038 dest=self.getElement(dest); 3044 var _34 9=dest.parentNode;3039 var _348=dest.parentNode; 3045 3040 if(src){ 3046 3041 src=self.getElement(src); 3047 _34 9.replaceChild(src,dest);3048 }else{ 3049 _34 9.removeChild(dest);3042 _348.replaceChild(src,dest); 3043 }else{ 3044 _348.removeChild(dest); 3050 3045 } 3051 3046 return src; … … 3057 3052 return MochiKit.Base.map(self.getElement,arguments); 3058 3053 } 3059 },getElementsByTagAndClassName:function(_34 c,_34d,_34e){3054 },getElementsByTagAndClassName:function(_34b,_34c,_34d){ 3060 3055 var self=MochiKit.DOM; 3056 if(typeof (_34b)=="undefined"||_34b===null){ 3057 _34b="*"; 3058 } 3059 if(typeof (_34d)=="undefined"||_34d===null){ 3060 _34d=self._document; 3061 } 3062 _34d=self.getElement(_34d); 3063 var _34f=(_34d.getElementsByTagName(_34b)||self._document.all); 3061 3064 if(typeof (_34c)=="undefined"||_34c===null){ 3062 _34c="*"; 3063 } 3064 if(typeof (_34e)=="undefined"||_34e===null){ 3065 _34e=self._document; 3066 } 3067 _34e=self.getElement(_34e); 3068 var _350=(_34e.getElementsByTagName(_34c)||self._document.all); 3069 if(typeof (_34d)=="undefined"||_34d===null){ 3070 return MochiKit.Base.extend(null,_350); 3071 } 3072 var _351=[]; 3073 for(var i=0;i<_350.length;i++){ 3074 var _353=_350[i]; 3075 var cls=_353.className; 3065 return MochiKit.Base.extend(null,_34f); 3066 } 3067 var _350=[]; 3068 for(var i=0;i<_34f.length;i++){ 3069 var _352=_34f[i]; 3070 var cls=_352.className; 3076 3071 if(!cls){ 3077 3072 continue; 3078 3073 } 3079 var _35 5=cls.split(" ");3080 for(var j=0;j<_35 5.length;j++){3081 if(_35 5[j]==_34d){3082 _35 1.push(_353);3074 var _354=cls.split(" "); 3075 for(var j=0;j<_354.length;j++){ 3076 if(_354[j]==_34c){ 3077 _350.push(_352); 3083 3078 break; 3084 3079 } 3085 3080 } 3086 3081 } 3087 return _35 1;3082 return _350; 3088 3083 },_newCallStack:function(path,once){ 3089 3084 var rval=function(){ 3090 var _35 a=arguments.callee.callStack;3091 for(var i=0;i<_35 a.length;i++){3092 if(_35 a[i].apply(this,arguments)===false){3085 var _359=arguments.callee.callStack; 3086 for(var i=0;i<_359.length;i++){ 3087 if(_359[i].apply(this,arguments)===false){ 3093 3088 break; 3094 3089 } … … 3104 3099 rval.callStack=[]; 3105 3100 return rval; 3106 },addToCallStack:function(_35 c,path,func,once){3101 },addToCallStack:function(_35b,path,func,once){ 3107 3102 var self=MochiKit.DOM; 3108 var _36 1=_35c[path];3109 var _36 2=_361;3110 if(!(typeof (_36 1)=="function"&&typeof (_361.callStack)=="object"&&_361.callStack!==null)){3111 _36 2=self._newCallStack(path,once);3112 if(typeof (_36 1)=="function"){3113 _36 2.callStack.push(_361);3114 } 3115 _35 c[path]=_362;3116 } 3117 _36 2.callStack.push(func);3103 var _360=_35b[path]; 3104 var _361=_360; 3105 if(!(typeof (_360)=="function"&&typeof (_360.callStack)=="object"&&_360.callStack!==null)){ 3106 _361=self._newCallStack(path,once); 3107 if(typeof (_360)=="function"){ 3108 _361.callStack.push(_360); 3109 } 3110 _35b[path]=_361; 3111 } 3112 _361.callStack.push(func); 3118 3113 },addLoadEvent:function(func){ 3119 3114 var self=MochiKit.DOM; 3120 3115 self.addToCallStack(self._window,"onload",func,true); 3121 },focusOnLoad:function(_36 5){3116 },focusOnLoad:function(_364){ 3122 3117 var self=MochiKit.DOM; 3123 3118 self.addLoadEvent(function(){ 3124 _36 5=self.getElement(_365);3125 if(_36 5){3126 _36 5.focus();3119 _364=self.getElement(_364); 3120 if(_364){ 3121 _364.focus(); 3127 3122 } 3128 3123 }); 3129 },setElementClass:function(_36 7,_368){3124 },setElementClass:function(_366,_367){ 3130 3125 var self=MochiKit.DOM; 3131 var obj=self.getElement(_36 7);3126 var obj=self.getElement(_366); 3132 3127 if(self.attributeArray.compliant){ 3133 obj.setAttribute("class",_36 8);3134 }else{ 3135 obj.setAttribute("className",_36 8);3136 } 3137 },toggleElementClass:function(_36 b){3128 obj.setAttribute("class",_367); 3129 }else{ 3130 obj.setAttribute("className",_367); 3131 } 3132 },toggleElementClass:function(_36a){ 3138 3133 var self=MochiKit.DOM; 3139 3134 for(var i=1;i<arguments.length;i++){ 3140 3135 var obj=self.getElement(arguments[i]); 3141 if(!self.addElementClass(obj,_36 b)){3142 self.removeElementClass(obj,_36 b);3143 } 3144 } 3145 },addElementClass:function(_36 f,_370){3136 if(!self.addElementClass(obj,_36a)){ 3137 self.removeElementClass(obj,_36a); 3138 } 3139 } 3140 },addElementClass:function(_36e,_36f){ 3146 3141 var self=MochiKit.DOM; 3147 var obj=self.getElement(_36 f);3142 var obj=self.getElement(_36e); 3148 3143 var cls=obj.className; 3149 3144 if(cls==undefined||cls.length===0){ 3150 self.setElementClass(obj,_3 70);3145 self.setElementClass(obj,_36f); 3151 3146 return true; 3152 3147 } 3153 if(cls==_3 70){3148 if(cls==_36f){ 3154 3149 return false; 3155 3150 } 3156 var _37 4=cls.split(" ");3157 for(var i=0;i<_37 4.length;i++){3158 if(_37 4[i]==_370){3151 var _373=cls.split(" "); 3152 for(var i=0;i<_373.length;i++){ 3153 if(_373[i]==_36f){ 3159 3154 return false; 3160 3155 } 3161 3156 } 3162 self.setElementClass(obj,cls+" "+_3 70);3157 self.setElementClass(obj,cls+" "+_36f); 3163 3158 return true; 3164 },removeElementClass:function(_37 6,_377){3159 },removeElementClass:function(_375,_376){ 3165 3160 var self=MochiKit.DOM; 3166 var obj=self.getElement(_37 6);3161 var obj=self.getElement(_375); 3167 3162 var cls=obj.className; 3168 3163 if(cls==undefined||cls.length===0){ 3169 3164 return false; 3170 3165 } 3171 if(cls==_37 7){3166 if(cls==_376){ 3172 3167 self.setElementClass(obj,""); 3173 3168 return true; 3174 3169 } 3175 var _37 b=cls.split(" ");3176 for(var i=0;i<_37 b.length;i++){3177 if(_37 b[i]==_377){3178 _37 b.splice(i,1);3179 self.setElementClass(obj,_37 b.join(" "));3170 var _37a=cls.split(" "); 3171 for(var i=0;i<_37a.length;i++){ 3172 if(_37a[i]==_376){ 3173 _37a.splice(i,1); 3174 self.setElementClass(obj,_37a.join(" ")); 3180 3175 return true; 3181 3176 } 3182 3177 } 3183 3178 return false; 3184 },swapElementClass:function(_37 d,_37e,_37f){3185 var obj=MochiKit.DOM.getElement(_37 d);3186 var res=MochiKit.DOM.removeElementClass(obj,_37 e);3179 },swapElementClass:function(_37c,_37d,_37e){ 3180 var obj=MochiKit.DOM.getElement(_37c); 3181 var res=MochiKit.DOM.removeElementClass(obj,_37d); 3187 3182 if(res){ 3188 MochiKit.DOM.addElementClass(obj,_37 f);3183 MochiKit.DOM.addElementClass(obj,_37e); 3189 3184 } 3190 3185 return res; 3191 },hasElementClass:function(_38 2,_383){3192 var obj=MochiKit.DOM.getElement(_38 2);3186 },hasElementClass:function(_381,_382){ 3187 var obj=MochiKit.DOM.getElement(_381); 3193 3188 var cls=obj.className; 3194 3189 if(!cls){ 3195 3190 return false; 3196 3191 } 3197 var _38 6=cls.split(" ");3192 var _385=cls.split(" "); 3198 3193 for(var i=1;i<arguments.length;i++){ 3199 3194 var good=false; 3200 for(var j=0;j<_38 6.length;j++){3201 if(_38 6[j]==arguments[i]){3195 for(var j=0;j<_385.length;j++){ 3196 if(_385[j]==arguments[i]){ 3202 3197 good=true; 3203 3198 break; … … 3217 3212 lst=[]; 3218 3213 } 3219 var _38 e=[dom];3214 var _38d=[dom]; 3220 3215 var self=MochiKit.DOM; 3221 var _3 90=self.escapeHTML;3222 var _39 1=self.attributeArray;3223 while(_38 e.length){3224 dom=_38 e.pop();3216 var _38f=self.escapeHTML; 3217 var _390=self.attributeArray; 3218 while(_38d.length){ 3219 dom=_38d.pop(); 3225 3220 if(typeof (dom)=="string"){ 3226 3221 lst.push(dom); … … 3228 3223 if(dom.nodeType==1){ 3229 3224 lst.push("<"+dom.tagName.toLowerCase()); 3230 var _39 2=[];3231 var _39 3=_391(dom);3232 for(var i=0;i<_39 3.length;i++){3233 var a=_39 3[i];3234 _39 2.push([" ",a.name,"=\"",_390(a.value),"\""]);3235 } 3236 _39 2.sort();3237 for(i=0;i<_39 2.length;i++){3238 var _39 6=_392[i];3239 for(var j=0;j<_39 6.length;j++){3240 lst.push(_39 6[j]);3225 var _391=[]; 3226 var _392=_390(dom); 3227 for(var i=0;i<_392.length;i++){ 3228 var a=_392[i]; 3229 _391.push([" ",a.name,"=\"",_38f(a.value),"\""]); 3230 } 3231 _391.sort(); 3232 for(i=0;i<_391.length;i++){ 3233 var _395=_391[i]; 3234 for(var j=0;j<_395.length;j++){ 3235 lst.push(_395[j]); 3241 3236 } 3242 3237 } 3243 3238 if(dom.hasChildNodes()){ 3244 3239 lst.push(">"); 3245 _38 e.push("</"+dom.tagName.toLowerCase()+">");3246 var _39 8=dom.childNodes;3247 for(i=_39 8.length-1;i>=0;i--){3248 _38 e.push(_398[i]);3240 _38d.push("</"+dom.tagName.toLowerCase()+">"); 3241 var _397=dom.childNodes; 3242 for(i=_397.length-1;i>=0;i--){ 3243 _38d.push(_397[i]); 3249 3244 } 3250 3245 }else{ … … 3253 3248 }else{ 3254 3249 if(dom.nodeType==3){ 3255 lst.push(_3 90(dom.nodeValue));3250 lst.push(_38f(dom.nodeValue)); 3256 3251 } 3257 3252 } … … 3259 3254 } 3260 3255 return lst; 3261 },scrapeText:function(node,_39 a){3256 },scrapeText:function(node,_399){ 3262 3257 var rval=[]; 3263 3258 (function(node){ … … 3268 3263 } 3269 3264 } 3270 var _39 f=node.nodeValue;3271 if(typeof (_39 f)=="string"){3272 rval.push(_39 f);3265 var _39e=node.nodeValue; 3266 if(typeof (_39e)=="string"){ 3267 rval.push(_39e); 3273 3268 } 3274 3269 })(MochiKit.DOM.getElement(node)); 3275 if(_39 a){3270 if(_399){ 3276 3271 return rval; 3277 3272 }else{ 3278 3273 return rval.join(""); 3279 3274 } 3280 },removeEmptyTextNodes:function(_3 a0){3281 _3 a0=MochiKit.DOM.getElement(_3a0);3282 for(var i=0;i<_3 a0.childNodes.length;i++){3283 var node=_3 a0.childNodes[i];3275 },removeEmptyTextNodes:function(_39f){ 3276 _39f=MochiKit.DOM.getElement(_39f); 3277 for(var i=0;i<_39f.childNodes.length;i++){ 3278 var node=_39f.childNodes[i]; 3284 3279 if(node.nodeType==3&&!/\S/.test(node.nodeValue)){ 3285 3280 node.parentNode.removeChild(node); 3286 3281 } 3287 3282 } 3288 },makeClipping:function(_3a 3){3289 _3a 3=MochiKit.DOM.getElement(_3a3);3290 var _3a 4=_3a3.style.overflow;3291 if((MochiKit.Style.getStyle(_3a 3,"overflow")||"visible")!="hidden"){3292 _3a 3.style.overflow="hidden";3293 } 3294 return _3a 4;3295 },undoClipping:function(_3a 5,_3a6){3296 _3a 5=MochiKit.DOM.getElement(_3a5);3297 if(!_3a 6){3283 },makeClipping:function(_3a2){ 3284 _3a2=MochiKit.DOM.getElement(_3a2); 3285 var _3a3=_3a2.style.overflow; 3286 if((MochiKit.Style.getStyle(_3a2,"overflow")||"visible")!="hidden"){ 3287 _3a2.style.overflow="hidden"; 3288 } 3289 return _3a3; 3290 },undoClipping:function(_3a4,_3a5){ 3291 _3a4=MochiKit.DOM.getElement(_3a4); 3292 if(!_3a5){ 3298 3293 return; 3299 3294 } 3300 _3a 5.style.overflow=_3a6;3301 },makePositioned:function(_3a 7){3302 _3a 7=MochiKit.DOM.getElement(_3a7);3303 var pos=MochiKit.Style.getStyle(_3a 7,"position");3295 _3a4.style.overflow=_3a5; 3296 },makePositioned:function(_3a6){ 3297 _3a6=MochiKit.DOM.getElement(_3a6); 3298 var pos=MochiKit.Style.getStyle(_3a6,"position"); 3304 3299 if(pos=="static"||!pos){ 3305 _3a 7.style.position="relative";3300 _3a6.style.position="relative"; 3306 3301 if(/Opera/.test(navigator.userAgent)){ 3307 _3a 7.style.top=0;3308 _3a 7.style.left=0;3309 } 3310 } 3311 },undoPositioned:function(_3a 9){3312 _3a 9=MochiKit.DOM.getElement(_3a9);3313 if(_3a 9.style.position=="relative"){3314 _3a 9.style.position=_3a9.style.top=_3a9.style.left=_3a9.style.bottom=_3a9.style.right="";3315 } 3316 },getFirstElementByTagAndClassName:function(_3a a,_3ab,_3ac){3302 _3a6.style.top=0; 3303 _3a6.style.left=0; 3304 } 3305 } 3306 },undoPositioned:function(_3a8){ 3307 _3a8=MochiKit.DOM.getElement(_3a8); 3308 if(_3a8.style.position=="relative"){ 3309 _3a8.style.position=_3a8.style.top=_3a8.style.left=_3a8.style.bottom=_3a8.style.right=""; 3310 } 3311 },getFirstElementByTagAndClassName:function(_3a9,_3aa,_3ab){ 3317 3312 var self=MochiKit.DOM; 3313 if(typeof (_3a9)=="undefined"||_3a9===null){ 3314 _3a9="*"; 3315 } 3316 if(typeof (_3ab)=="undefined"||_3ab===null){ 3317 _3ab=self._document; 3318 } 3319 _3ab=self.getElement(_3ab); 3320 var _3ad=(_3ab.getElementsByTagName(_3a9)||self._document.all); 3318 3321 if(typeof (_3aa)=="undefined"||_3aa===null){ 3319 _3aa="*"; 3320 } 3321 if(typeof (_3ac)=="undefined"||_3ac===null){ 3322 _3ac=self._document; 3323 } 3324 _3ac=self.getElement(_3ac); 3325 var _3ae=(_3ac.getElementsByTagName(_3aa)||self._document.all); 3326 if(typeof (_3ab)=="undefined"||_3ab===null){ 3327 return _3ae[0]; 3328 } 3329 for(var i=0;i<_3ae.length;i++){ 3330 var _3b0=_3ae[i]; 3331 var _3b1=_3b0.className.split(" "); 3332 for(var j=0;j<_3b1.length;j++){ 3333 if(_3b1[j]==_3ab){ 3334 return _3b0; 3335 } 3336 } 3337 } 3338 },getFirstParentByTagAndClassName:function(elem,_3b4,_3b5){ 3322 return _3ad[0]; 3323 } 3324 for(var i=0;i<_3ad.length;i++){ 3325 var _3af=_3ad[i]; 3326 var _3b0=_3af.className.split(" "); 3327 for(var j=0;j<_3b0.length;j++){ 3328 if(_3b0[j]==_3aa){ 3329 return _3af; 3330 } 3331 } 3332 } 3333 },getFirstParentByTagAndClassName:function(elem,_3b3,_3b4){ 3339 3334 var self=MochiKit.DOM; 3340 3335 elem=self.getElement(elem); 3336 if(typeof (_3b3)=="undefined"||_3b3===null){ 3337 _3b3="*"; 3338 }else{ 3339 _3b3=_3b3.toUpperCase(); 3340 } 3341 3341 if(typeof (_3b4)=="undefined"||_3b4===null){ 3342 _3b4="*"; 3343 }else{ 3344 _3b4=_3b4.toUpperCase(); 3345 } 3346 if(typeof (_3b5)=="undefined"||_3b5===null){ 3347 _3b5=null; 3348 } 3342 _3b4=null; 3343 } 3344 var _3b6=""; 3349 3345 var _3b7=""; 3350 var _3b8="";3351 3346 while(elem&&elem.tagName){ 3352 3347 elem=elem.parentNode; 3353 if(_3b 4=="*"&&_3b5===null){3348 if(_3b3=="*"&&_3b4===null){ 3354 3349 return elem; 3355 3350 } 3356 _3b 7=elem.className.split(" ");3357 _3b 8=elem.tagName.toUpperCase();3358 if(_3b 5===null&&_3b4==_3b8){3351 _3b6=elem.className.split(" "); 3352 _3b7=elem.tagName.toUpperCase(); 3353 if(_3b4===null&&_3b3==_3b7){ 3359 3354 return elem; 3360 3355 }else{ 3361 if(_3b 5!==null){3362 for(var i=0;i<_3b 7.length;i++){3363 if(_3b 4=="*"&&_3b7[i]==_3b5){3356 if(_3b4!==null){ 3357 for(var i=0;i<_3b6.length;i++){ 3358 if(_3b3=="*"&&_3b6[i]==_3b4){ 3364 3359 return elem; 3365 3360 }else{ 3366 if(_3b 4==_3b8&&_3b7[i]==_3b5){3361 if(_3b3==_3b7&&_3b6[i]==_3b4){ 3367 3362 return elem; 3368 3363 } … … 3373 3368 } 3374 3369 return elem; 3375 },isParent:function(_3b a,_3bb){3376 if(!_3b a.parentNode||_3ba==_3bb){3370 },isParent:function(_3b9,_3ba){ 3371 if(!_3b9.parentNode||_3b9==_3ba){ 3377 3372 return false; 3378 3373 } 3379 if(_3b a.parentNode==_3bb){3374 if(_3b9.parentNode==_3ba){ 3380 3375 return true; 3381 3376 } 3382 return MochiKit.DOM.isParent(_3b a.parentNode,_3bb);3377 return MochiKit.DOM.isParent(_3b9.parentNode,_3ba); 3383 3378 },__new__:function(win){ 3384 3379 var m=MochiKit.Base; 3385 3380 if(typeof (document)!="undefined"){ 3386 3381 this._document=document; 3387 var _3b e="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";3388 this._xhtml=(document.documentElement&&document.createElementNS&&document.documentElement.namespaceURI===_3b e);3382 var _3bd="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; 3383 this._xhtml=(document.documentElement&&document.createElementNS&&document.documentElement.namespaceURI===_3bd); 3389 3384 }else{ 3390 3385 if(MochiKit.MockDOM){ … … 3394 3389 this._window=win; 3395 3390 this.domConverters=new m.AdapterRegistry(); 3396 var _3b f=this._document.createElement("span");3397 var _3 c0;3398 if(_3b f&&_3bf.attributes&&_3bf.attributes.length>0){3399 var _3c 1=m.filter;3400 _3 c0=function(node){3401 return _3c 1(_3c0.ignoreAttrFilter,node.attributes);3402 }; 3403 _3 c0.ignoreAttr={};3404 var _3c 3=_3bf.attributes;3405 var _3c 4=_3c0.ignoreAttr;3406 for(var i=0;i<_3c 3.length;i++){3407 var a=_3c 3[i];3408 _3c 4[a.name]=a.value;3409 } 3410 _3 c0.ignoreAttrFilter=function(a){3411 return (_3 c0.ignoreAttr[a.name]!=a.value);3412 }; 3413 _3 c0.compliant=false;3414 _3 c0.renames={"class":"className","checked":"defaultChecked","usemap":"useMap","for":"htmlFor","readonly":"readOnly","colspan":"colSpan","bgcolor":"bgColor","cellspacing":"cellSpacing","cellpadding":"cellPadding"};3415 }else{ 3416 _3 c0=function(node){3391 var _3be=this._document.createElement("span"); 3392 var _3bf; 3393 if(_3be&&_3be.attributes&&_3be.attributes.length>0){ 3394 var _3c0=m.filter; 3395 _3bf=function(node){ 3396 return _3c0(_3bf.ignoreAttrFilter,node.attributes); 3397 }; 3398 _3bf.ignoreAttr={}; 3399 var _3c2=_3be.attributes; 3400 var _3c3=_3bf.ignoreAttr; 3401 for(var i=0;i<_3c2.length;i++){ 3402 var a=_3c2[i]; 3403 _3c3[a.name]=a.value; 3404 } 3405 _3bf.ignoreAttrFilter=function(a){ 3406 return (_3bf.ignoreAttr[a.name]!=a.value); 3407 }; 3408 _3bf.compliant=false; 3409 _3bf.renames={"class":"className","checked":"defaultChecked","usemap":"useMap","for":"htmlFor","readonly":"readOnly","colspan":"colSpan","bgcolor":"bgColor","cellspacing":"cellSpacing","cellpadding":"cellPadding"}; 3410 }else{ 3411 _3bf=function(node){ 3417 3412 return node.attributes; 3418 3413 }; 3419 _3 c0.compliant=true;3420 _3 c0.renames={};3421 } 3422 this.attributeArray=_3 c0;3423 var _3c 9=function(_3ca,arr){3424 var _3c c=arr[1].split(".");3414 _3bf.compliant=true; 3415 _3bf.renames={}; 3416 } 3417 this.attributeArray=_3bf; 3418 var _3c8=function(_3c9,arr){ 3419 var _3cb=arr[1].split("."); 3425 3420 var str=""; 3426 3421 var obj={}; 3427 str+="if (!MochiKit."+_3c c[1]+") { throw new Error(\"";3422 str+="if (!MochiKit."+_3cb[1]+") { throw new Error(\""; 3428 3423 str+="This function has been deprecated and depends on MochiKit."; 3429 str+=_3c c[1]+".\");}";3430 str+="return MochiKit."+_3c c[1]+"."+arr[0];3424 str+=_3cb[1]+".\");}"; 3425 str+="return MochiKit."+_3cb[1]+"."+arr[0]; 3431 3426 str+=".apply(this, arguments);"; 3432 obj[_3c c[2]]=new Function(str);3433 MochiKit.Base.update(MochiKit[_3c a],obj);3427 obj[_3cb[2]]=new Function(str); 3428 MochiKit.Base.update(MochiKit[_3c9],obj); 3434 3429 }; 3435 3430 for(var i;i<MochiKit.DOM.DEPRECATED.length;i++){ 3436 _3c 9("DOM",MochiKit.DOM.DEPRECATED[i]);3437 } 3438 var _3c f=this.createDOMFunc;3439 this.UL=_3c f("ul");3440 this.OL=_3c f("ol");3441 this.LI=_3c f("li");3442 this.DL=_3c f("dl");3443 this.DT=_3c f("dt");3444 this.DD=_3c f("dd");3445 this.TD=_3c f("td");3446 this.TR=_3c f("tr");3447 this.TBODY=_3c f("tbody");3448 this.THEAD=_3c f("thead");3449 this.TFOOT=_3c f("tfoot");3450 this.TABLE=_3c f("table");3451 this.TH=_3c f("th");3452 this.INPUT=_3c f("input");3453 this.SPAN=_3c f("span");3454 this.A=_3c f("a");3455 this.DIV=_3c f("div");3456 this.IMG=_3c f("img");3457 this.BUTTON=_3c f("button");3458 this.TT=_3c f("tt");3459 this.PRE=_3c f("pre");3460 this.H1=_3c f("h1");3461 this.H2=_3c f("h2");3462 this.H3=_3c f("h3");3463 this.BR=_3c f("br");3464 this.HR=_3c f("hr");3465 this.LABEL=_3c f("label");3466 this.TEXTAREA=_3c f("textarea");3467 this.FORM=_3c f("form");3468 this.P=_3c f("p");3469 this.SELECT=_3c f("select");3470 this.OPTION=_3c f("option");3471 this.OPTGROUP=_3c f("optgroup");3472 this.LEGEND=_3c f("legend");3473 this.FIELDSET=_3c f("fieldset");3474 this.STRONG=_3c f("strong");3475 this.CANVAS=_3c f("canvas");3431 _3c8("DOM",MochiKit.DOM.DEPRECATED[i]); 3432 } 3433 var _3ce=this.createDOMFunc; 3434 this.UL=_3ce("ul"); 3435 this.OL=_3ce("ol"); 3436 this.LI=_3ce("li"); 3437 this.DL=_3ce("dl"); 3438 this.DT=_3ce("dt"); 3439 this.DD=_3ce("dd"); 3440 this.TD=_3ce("td"); 3441 this.TR=_3ce("tr"); 3442 this.TBODY=_3ce("tbody"); 3443 this.THEAD=_3ce("thead"); 3444 this.TFOOT=_3ce("tfoot"); 3445 this.TABLE=_3ce("table"); 3446 this.TH=_3ce("th"); 3447 this.INPUT=_3ce("input"); 3448 this.SPAN=_3ce("span"); 3449 this.A=_3ce("a"); 3450 this.DIV=_3ce("div"); 3451 this.IMG=_3ce("img"); 3452 this.BUTTON=_3ce("button"); 3453 this.TT=_3ce("tt"); 3454 this.PRE=_3ce("pre"); 3455 this.H1=_3ce("h1"); 3456 this.H2=_3ce("h2"); 3457 this.H3=_3ce("h3"); 3458 this.BR=_3ce("br"); 3459 this.HR=_3ce("hr"); 3460 this.LABEL=_3ce("label"); 3461 this.TEXTAREA=_3ce("textarea"); 3462 this.FORM=_3ce("form"); 3463 this.P=_3ce("p"); 3464 this.SELECT=_3ce("select"); 3465 this.OPTION=_3ce("option"); 3466 this.OPTGROUP=_3ce("optgroup"); 3467 this.LEGEND=_3ce("legend"); 3468 this.FIELDSET=_3ce("fieldset"); 3469 this.STRONG=_3ce("strong"); 3470 this.CANVAS=_3ce("canvas"); 3476 3471 this.$=this.getElement; 3477 3472 this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; … … 3495 3490 MochiKit.Selector.EXPORT=["Selector","findChildElements","findDocElements","$$"]; 3496 3491 MochiKit.Selector.EXPORT_OK=[]; 3497 MochiKit.Selector.Selector=function(_3 d0){3492 MochiKit.Selector.Selector=function(_3cf){ 3498 3493 this.params={classNames:[],pseudoClassNames:[]}; 3499 this.expression=_3 d0.toString().replace(/(^\s+|\s+$)/g,"");3494 this.expression=_3cf.toString().replace(/(^\s+|\s+$)/g,""); 3500 3495 this.parseExpression(); 3501 3496 this.compileMatcher(); 3502 3497 }; 3503 3498 MochiKit.Selector.Selector.prototype={__class__:MochiKit.Selector.Selector,parseExpression:function(){ 3504 function abort(_3d 1){3505 throw "Parse error in selector: "+_3d 1;3499 function abort(_3d0){ 3500 throw "Parse error in selector: "+_3d0; 3506 3501 } 3507 3502 if(this.expression==""){ … … 3509 3504 } 3510 3505 var repr=MochiKit.Base.repr; 3511 var _3d 3=this.params;3506 var _3d2=this.params; 3512 3507 var expr=this.expression; 3513 var _3d 5,_3d6,_3d7,rest;3514 while(_3d 5=expr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!^$*]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)){3515 _3d 3.attributes=_3d3.attributes||[];3516 _3d 3.attributes.push({name:_3d5[2],operator:_3d5[3],value:_3d5[4]||_3d5[5]||""});3517 expr=_3d 5[1];3508 var _3d4,_3d5,_3d6,rest; 3509 while(_3d4=expr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!^$*]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)){ 3510 _3d2.attributes=_3d2.attributes||[]; 3511 _3d2.attributes.push({name:_3d4[2],operator:_3d4[3],value:_3d4[4]||_3d4[5]||""}); 3512 expr=_3d4[1]; 3518 3513 } 3519 3514 if(expr=="*"){ 3520 3515 return this.params.wildcard=true; 3521 3516 } 3522 while(_3d 5=expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+(?:\([^)]*\))?)(.*)/i)){3523 _3d 6=_3d5[1];3524 _3d 7=_3d5[2];3525 rest=_3d 5[3];3526 switch(_3d 6){3517 while(_3d4=expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+(?:\([^)]*\))?)(.*)/i)){ 3518 _3d5=_3d4[1]; 3519 _3d6=_3d4[2]; 3520 rest=_3d4[3]; 3521 switch(_3d5){ 3527 3522 case "#": 3528 _3d 3.id=_3d7;3523 _3d2.id=_3d6; 3529 3524 break; 3530 3525 case ".": 3531 _3d 3.classNames.push(_3d7);3526 _3d2.classNames.push(_3d6); 3532 3527 break; 3533 3528 case ":": 3534 _3d 3.pseudoClassNames.push(_3d7);3529 _3d2.pseudoClassNames.push(_3d6); 3535 3530 break; 3536 3531 case "": 3537 3532 case undefined: 3538 _3d 3.tagName=_3d7.toUpperCase();3533 _3d2.tagName=_3d6.toUpperCase(); 3539 3534 break; 3540 3535 default: … … 3548 3543 },buildMatchExpression:function(){ 3549 3544 var repr=MochiKit.Base.repr; 3550 var _3d a=this.params;3551 var _3d b=[];3552 var _3d c,i;3553 function childElements(_3d e){3554 return "MochiKit.Base.filter(function (node) { return node.nodeType == 1; }, "+_3d e+".childNodes)";3555 } 3556 if(_3d a.wildcard){3557 _3d b.push("true");3558 } 3559 if(_3d c=_3da.id){3560 _3d b.push("element.id == "+repr(_3dc));3561 } 3562 if(_3d c=_3da.tagName){3563 _3d b.push("element.tagName.toUpperCase() == "+repr(_3dc));3564 } 3565 if((_3d c=_3da.classNames).length>0){3566 for(i=0;i<_3d c.length;i++){3567 _3d b.push("MochiKit.DOM.hasElementClass(element, "+repr(_3dc[i])+")");3568 } 3569 } 3570 if((_3d c=_3da.pseudoClassNames).length>0){3571 for(i=0;i<_3d c.length;i++){3572 var _3d f=_3dc[i].match(/^([^(]+)(?:\((.*)\))?$/);3573 var _3 e0=_3df[1];3574 var _3e 1=_3df[2];3575 switch(_3 e0){3545 var _3d9=this.params; 3546 var _3da=[]; 3547 var _3db,i; 3548 function childElements(_3dd){ 3549 return "MochiKit.Base.filter(function (node) { return node.nodeType == 1; }, "+_3dd+".childNodes)"; 3550 } 3551 if(_3d9.wildcard){ 3552 _3da.push("true"); 3553 } 3554 if(_3db=_3d9.id){ 3555 _3da.push("element.id == "+repr(_3db)); 3556 } 3557 if(_3db=_3d9.tagName){ 3558 _3da.push("element.tagName.toUpperCase() == "+repr(_3db)); 3559 } 3560 if((_3db=_3d9.classNames).length>0){ 3561 for(i=0;i<_3db.length;i++){ 3562 _3da.push("MochiKit.DOM.hasElementClass(element, "+repr(_3db[i])+")"); 3563 } 3564 } 3565 if((_3db=_3d9.pseudoClassNames).length>0){ 3566 for(i=0;i<_3db.length;i++){ 3567 var _3de=_3db[i].match(/^([^(]+)(?:\((.*)\))?$/); 3568 var _3df=_3de[1]; 3569 var _3e0=_3de[2]; 3570 switch(_3df){ 3576 3571 case "root": 3577 _3d b.push("element.nodeType == 9 || element === element.ownerDocument.documentElement");3572 _3da.push("element.nodeType == 9 || element === element.ownerDocument.documentElement"); 3578 3573 break; 3579 3574 case "nth-child": … … 3581 3576 case "nth-of-type": 3582 3577 case "nth-last-of-type": 3583 _3d f=_3e1.match(/^((?:(\d+)n\+)?(\d+)|odd|even)$/);3584 if(!_3d f){3585 throw "Invalid argument to pseudo element nth-child: "+_3e 1;3578 _3de=_3e0.match(/^((?:(\d+)n\+)?(\d+)|odd|even)$/); 3579 if(!_3de){ 3580 throw "Invalid argument to pseudo element nth-child: "+_3e0; 3586 3581 } 3587 3582 var a,b; 3588 if(_3d f[0]=="odd"){3583 if(_3de[0]=="odd"){ 3589 3584 a=2; 3590 3585 b=1; 3591 3586 }else{ 3592 if(_3d f[0]=="even"){3587 if(_3de[0]=="even"){ 3593 3588 a=2; 3594 3589 b=0; 3595 3590 }else{ 3596 a=_3d f[2]&&parseInt(_3df)||null;3597 b=parseInt(_3d f[3]);3598 } 3599 } 3600 _3d b.push("this.nthChild(element,"+a+","+b+","+!!_3e0.match("^nth-last")+","+!!_3e0.match("of-type$")+")");3591 a=_3de[2]&&parseInt(_3de)||null; 3592 b=parseInt(_3de[3]); 3593 } 3594 } 3595 _3da.push("this.nthChild(element,"+a+","+b+","+!!_3df.match("^nth-last")+","+!!_3df.match("of-type$")+")"); 3601 3596 break; 3602 3597 case "first-child": 3603 _3d b.push("this.nthChild(element, null, 1)");3598 _3da.push("this.nthChild(element, null, 1)"); 3604 3599 break; 3605 3600 case "last-child": 3606 _3d b.push("this.nthChild(element, null, 1, true)");3601 _3da.push("this.nthChild(element, null, 1, true)"); 3607 3602 break; 3608 3603 case "first-of-type": 3609 _3d b.push("this.nthChild(element, null, 1, false, true)");3604 _3da.push("this.nthChild(element, null, 1, false, true)"); 3610 3605 break; 3611 3606 case "last-of-type": 3612 _3d b.push("this.nthChild(element, null, 1, true, true)");3607 _3da.push("this.nthChild(element, null, 1, true, true)"); 3613 3608 break; 3614 3609 case "only-child": 3615 _3d b.push(childElements("element.parentNode")+".length == 1");3610 _3da.push(childElements("element.parentNode")+".length == 1"); 3616 3611 break; 3617 3612 case "only-of-type": 3618 _3d b.push("MochiKit.Base.filter(function (node) { return node.tagName == element.tagName; }, "+childElements("element.parentNode")+").length == 1");3613 _3da.push("MochiKit.Base.filter(function (node) { return node.tagName == element.tagName; }, "+childElements("element.parentNode")+").length == 1"); 3619 3614 break; 3620 3615 case "empty": 3621 _3d b.push("element.childNodes.length == 0");3616 _3da.push("element.childNodes.length == 0"); 3622 3617 break; 3623 3618 case "enabled": 3624 _3d b.push("(this.isUIElement(element) && element.disabled === false)");3619 _3da.push("(this.isUIElement(element) && element.disabled === false)"); 3625 3620 break; 3626 3621 case "disabled": 3627 _3d b.push("(this.isUIElement(element) && element.disabled === true)");3622 _3da.push("(this.isUIElement(element) && element.disabled === true)"); 3628 3623 break; 3629 3624 case "checked": 3630 _3d b.push("(this.isUIElement(element) && element.checked === true)");3625 _3da.push("(this.isUIElement(element) && element.checked === true)"); 3631 3626 break; 3632 3627 case "not": 3633 var _3e 4=new MochiKit.Selector.Selector(_3e1);3634 _3d b.push("!( "+_3e4.buildMatchExpression()+")");3628 var _3e3=new MochiKit.Selector.Selector(_3e0); 3629 _3da.push("!( "+_3e3.buildMatchExpression()+")"); 3635 3630 break; 3636 3631 } 3637 3632 } 3638 3633 } 3639 if(_3d c=_3da.attributes){3640 MochiKit.Base.map(function(_3e 5){3641 var _3e 6="MochiKit.DOM.getNodeAttribute(element, "+repr(_3e5.name)+")";3642 var _3e 7=function(_3e8){3643 return _3e 6+".split("+repr(_3e8)+")";3644 }; 3645 switch(_3e 5.operator){3634 if(_3db=_3d9.attributes){ 3635 MochiKit.Base.map(function(_3e4){ 3636 var _3e5="MochiKit.DOM.getNodeAttribute(element, "+repr(_3e4.name)+")"; 3637 var _3e6=function(_3e7){ 3638 return _3e5+".split("+repr(_3e7)+")"; 3639 }; 3640 switch(_3e4.operator){ 3646 3641 case "=": 3647 _3d b.push(_3e6+" == "+repr(_3e5.value));3642 _3da.push(_3e5+" == "+repr(_3e4.value)); 3648 3643 break; 3649 3644 case "~=": 3650 _3d b.push(_3e6+" && MochiKit.Base.findValue("+_3e7(" ")+", "+repr(_3e5.value)+") > -1");3645 _3da.push(_3e5+" && MochiKit.Base.findValue("+_3e6(" ")+", "+repr(_3e4.value)+") > -1"); 3651 3646 break; 3652 3647 case "^=": 3653 _3d b.push(_3e6+".substring(0, "+_3e5.value.length+") == "+repr(_3e5.value));3648 _3da.push(_3e5+".substring(0, "+_3e4.value.length+") == "+repr(_3e4.value)); 3654 3649 break; 3655 3650 case "$=":
