Changeset 2566:9bf417837888 for themes/default
- Timestamp:
- 11/17/13 20:25:53 (12 years ago)
- Branch:
- 2.6
- Children:
- 2567:6c11245cbf04, 2568:61c67a7d17fa
- Location:
- themes/default
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
themes/default/_define.php
r2257 r2566 21 21 ) 22 22 ); 23 ?> -
themes/default/js/jquery.js
r0 r2566 55 55 // For matching the engine and version of the browser 56 56 browserMatch, 57 57 58 58 // Has the ready events already been bound? 59 59 readyBound = false, 60 60 61 61 // The functions to execute on DOM ready 62 62 readyList = [], … … 87 87 return this; 88 88 } 89 89 90 90 // The body element only exists once, optimize finding it 91 91 if ( selector === "body" && !context ) { … … 126 126 selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes; 127 127 } 128 128 129 129 return jQuery.merge( this, selector ); 130 130 131 131 // HANDLE: $("#id") 132 132 } else { … … 219 219 if ( jQuery.isArray( elems ) ) { 220 220 push.apply( ret, elems ); 221 221 222 222 } else { 223 223 jQuery.merge( ret, elems ); … … 245 245 return jQuery.each( this, callback, args ); 246 246 }, 247 247 248 248 ready: function( fn ) { 249 249 // Attach the listeners … … 263 263 return this; 264 264 }, 265 265 266 266 eq: function( i ) { 267 267 return i === -1 ? … … 288 288 })); 289 289 }, 290 290 291 291 end: function() { 292 292 return this.prevObject || jQuery(null); … … 369 369 return jQuery; 370 370 }, 371 371 372 372 // Is the DOM ready to be used? Set to true once it occurs. 373 373 isReady: false, 374 374 375 375 // Handle when the DOM is ready 376 376 ready: function() { … … 403 403 } 404 404 }, 405 405 406 406 bindReady: function() { 407 407 if ( readyBound ) { … … 421 421 // Use the handy event callback 422 422 document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); 423 423 424 424 // A fallback to window.onload, that will always work 425 425 window.addEventListener( "load", jQuery.ready, false ); … … 430 430 // maybe late but safe also for iframes 431 431 document.attachEvent("onreadystatechange", DOMContentLoaded); 432 432 433 433 // A fallback to window.onload, that will always work 434 434 window.attachEvent( "onload", jQuery.ready ); … … 466 466 return false; 467 467 } 468 468 469 469 // Not own constructor property must be Object 470 470 if ( obj.constructor … … 473 473 return false; 474 474 } 475 475 476 476 // Own properties are enumerated firstly, so to speed up, 477 477 // if last one is own, then all properties are own. 478 478 479 479 var key; 480 480 for ( key in obj ) {} 481 481 482 482 return key === undefined || hasOwnProperty.call( obj, key ); 483 483 }, … … 489 489 return true; 490 490 }, 491 491 492 492 error: function( msg ) { 493 493 throw msg; 494 494 }, 495 495 496 496 parseJSON: function( data ) { 497 497 if ( typeof data !== "string" || !data ) { … … 501 501 // Make sure leading/trailing whitespace is removed (IE can't handle it) 502 502 data = jQuery.trim( data ); 503 503 504 504 // Make sure the incoming data is actual JSON 505 505 // Logic borrowed from http://json.org/json2.js … … 628 628 first[ i++ ] = second[ j ]; 629 629 } 630 630 631 631 } else { 632 632 while ( second[j] !== undefined ) { … … 795 795 function access( elems, key, value, exec, fn, pass ) { 796 796 var length = elems.length; 797 797 798 798 // Setting many attributes 799 799 if ( typeof key === "object" ) { … … 803 803 return elems; 804 804 } 805 805 806 806 // Setting one attribute 807 807 if ( value !== undefined ) { 808 808 // Optionally, function values get executed if exec is true 809 809 exec = !pass && exec && jQuery.isFunction(value); 810 810 811 811 for ( var i = 0; i < length; i++ ) { 812 812 fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); 813 813 } 814 814 815 815 return elems; 816 816 } 817 817 818 818 // Getting an attribute 819 819 return length ? fn( elems[0], key ) : undefined; … … 910 910 try { 911 911 delete script.test; 912 912 913 913 } catch(e) { 914 914 jQuery.support.deleteExpando = false; … … 951 951 // Technique from Juriy Zaytsev 952 952 // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/ 953 var eventSupported = function( eventName ) { 954 var el = document.createElement("div"); 955 eventName = "on" + eventName; 956 957 var isSupported = (eventName in el); 958 if ( !isSupported ) { 959 el.setAttribute(eventName, "return;"); 960 isSupported = typeof el[eventName] === "function"; 961 } 962 el = null; 963 964 return isSupported; 953 var eventSupported = function( eventName ) { 954 var el = document.createElement("div"); 955 eventName = "on" + eventName; 956 957 var isSupported = (eventName in el); 958 if ( !isSupported ) { 959 el.setAttribute(eventName, "return;"); 960 isSupported = typeof el[eventName] === "function"; 961 } 962 el = null; 963 964 return isSupported; 965 965 }; 966 966 967 967 jQuery.support.submitBubbles = eventSupported("submit"); 968 968 jQuery.support.changeBubbles = eventSupported("change"); … … 988 988 jQuery.extend({ 989 989 cache: {}, 990 990 991 991 expando:expando, 992 992 … … 1015 1015 1016 1016 // Compute a unique ID for the element 1017 if ( !id ) { 1017 if ( !id ) { 1018 1018 id = ++uuid; 1019 1019 } … … 1385 1385 return elem.getAttribute("value") === null ? "on" : elem.value; 1386 1386 } 1387 1387 1388 1388 1389 1389 // Everything else, we just grab the value … … 1446 1446 offset: true 1447 1447 }, 1448 1448 1449 1449 attr: function( elem, name, value, pass ) { 1450 1450 // don't set attributes on text and comment nodes … … 1475 1475 if ( parent ) { 1476 1476 parent.selectedIndex; 1477 1477 1478 1478 // Make sure that it also works with optgroups, see #5701 1479 1479 if ( parent.parentNode ) { … … 1652 1652 } 1653 1653 } 1654 1655 if ( special.add ) { 1656 special.add.call( elem, handleObj ); 1654 1655 if ( special.add ) { 1656 special.add.call( elem, handleObj ); 1657 1657 1658 1658 if ( !handleObj.handler.guid ) { … … 1721 1721 type = namespaces.shift(); 1722 1722 1723 namespace = new RegExp("(^|\\.)" + 1723 namespace = new RegExp("(^|\\.)" + 1724 1724 jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)") 1725 1725 } … … 1874 1874 special = jQuery.event.special[ type ] || {}; 1875 1875 1876 if ( (!special._default || special._default.call( elem, event ) === false) && 1876 if ( (!special._default || special._default.call( elem, event ) === false) && 1877 1877 !isClick && !(target && target.nodeName && jQuery.noData[target.nodeName.toLowerCase()]) ) { 1878 1878 … … 1933 1933 event.data = handleObj.data; 1934 1934 event.handleObj = handleObj; 1935 1935 1936 1936 var ret = handleObj.handler.apply( this, arguments ); 1937 1937 … … 2027 2027 live: { 2028 2028 add: function( handleObj ) { 2029 jQuery.event.add( this, handleObj.origType, jQuery.extend({}, handleObj, {handler: liveHandler}) ); 2029 jQuery.event.add( this, handleObj.origType, jQuery.extend({}, handleObj, {handler: liveHandler}) ); 2030 2030 }, 2031 2031 … … 2033 2033 var remove = true, 2034 2034 type = handleObj.origType.replace(rnamespaces, ""); 2035 2035 2036 2036 jQuery.each( jQuery.data(this, "events").live || [], function() { 2037 2037 if ( type === this.origType.replace(rnamespaces, "") ) { … … 2069 2069 function( elem, type, handle ) { 2070 2070 elem.removeEventListener( type, handle, false ); 2071 } : 2071 } : 2072 2072 function( elem, type, handle ) { 2073 2073 elem.detachEvent( "on" + type, handle ); … … 2114 2114 return; 2115 2115 } 2116 2116 2117 2117 // if preventDefault exists run it on the original event 2118 2118 if ( e.preventDefault ) { … … 2206 2206 } 2207 2207 }); 2208 2208 2209 2209 jQuery.event.add(this, "keypress.specialSubmit", function( e ) { 2210 2210 var elem = e.target, type = elem.type; … … 2268 2268 jQuery.data( elem, "_change_data", val ); 2269 2269 } 2270 2270 2271 2271 if ( data === undefined || val === data ) { 2272 2272 return; … … 2281 2281 jQuery.event.special.change = { 2282 2282 filters: { 2283 focusout: testChange, 2283 focusout: testChange, 2284 2284 2285 2285 click: function( e ) { … … 2345 2345 setup: function() { 2346 2346 this.addEventListener( orig, handler, true ); 2347 }, 2348 teardown: function() { 2347 }, 2348 teardown: function() { 2349 2349 this.removeEventListener( orig, handler, true ); 2350 2350 } 2351 2351 }; 2352 2352 2353 function handler( e ) { 2353 function handler( e ) { 2354 2354 e = jQuery.event.fix( e ); 2355 2355 e.type = fix; … … 2368 2368 return this; 2369 2369 } 2370 2370 2371 2371 if ( jQuery.isFunction( data ) ) { 2372 2372 fn = data; … … 2408 2408 return this; 2409 2409 }, 2410 2410 2411 2411 delegate: function( selector, types, data, fn ) { 2412 2412 return this.live( types, data, fn, selector ); 2413 2413 }, 2414 2414 2415 2415 undelegate: function( selector, types, fn ) { 2416 2416 if ( arguments.length === 0 ) { 2417 2417 return this.unbind( "live" ); 2418 2418 2419 2419 } else { 2420 2420 return this.die( types, null, fn, selector ); 2421 2421 } 2422 2422 }, 2423 2423 2424 2424 trigger: function( type, data ) { 2425 2425 return this.each(function() { … … 2521 2521 } 2522 2522 } 2523 2523 2524 2524 return this; 2525 2525 } … … 2652 2652 return []; 2653 2653 } 2654 2654 2655 2655 if ( !selector || typeof selector !== "string" ) { 2656 2656 return results; … … 2659 2659 var parts = [], m, set, checkSet, extra, prune = true, contextXML = isXML(context), 2660 2660 soFar = selector; 2661 2661 2662 2662 // Reset the position of the chunker regexp (start from head) 2663 2663 while ( (chunker.exec(""), m = chunker.exec(soFar)) !== null ) { 2664 2664 soFar = m[3]; 2665 2665 2666 2666 parts.push( m[1] ); 2667 2667 2668 2668 if ( m[2] ) { 2669 2669 extra = m[3]; … … 2686 2686 selector += parts.shift(); 2687 2687 } 2688 2688 2689 2689 set = posProcess( selector, set ); 2690 2690 } … … 2797 2797 for ( var i = 0, l = Expr.order.length; i < l; i++ ) { 2798 2798 var type = Expr.order[i], match; 2799 2799 2800 2800 if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { 2801 2801 var left = match[1]; … … 3071 3071 ATTR: function(match, curLoop, inplace, result, not, isXML){ 3072 3072 var name = match[1].replace(/\\/g, ""); 3073 3073 3074 3074 if ( !isXML && Expr.attrMap[name] ) { 3075 3075 match[1] = Expr.attrMap[name]; … … 3097 3097 return true; 3098 3098 } 3099 3099 3100 3100 return match; 3101 3101 }, … … 3218 3218 case 'first': 3219 3219 while ( (node = node.previousSibling) ) { 3220 if ( node.nodeType === 1 ) { 3221 return false; 3220 if ( node.nodeType === 1 ) { 3221 return false; 3222 3222 } 3223 3223 } 3224 if ( type === "first" ) { 3225 return true; 3224 if ( type === "first" ) { 3225 return true; 3226 3226 } 3227 3227 node = elem; 3228 3228 case 'last': 3229 3229 while ( (node = node.nextSibling) ) { 3230 if ( node.nodeType === 1 ) { 3231 return false; 3230 if ( node.nodeType === 1 ) { 3231 return false; 3232 3232 } 3233 3233 } … … 3239 3239 return true; 3240 3240 } 3241 3241 3242 3242 var doneName = match[0], 3243 3243 parent = elem.parentNode; 3244 3244 3245 3245 if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) { 3246 3246 var count = 0; … … 3249 3249 node.nodeIndex = ++count; 3250 3250 } 3251 } 3251 } 3252 3252 parent.sizcache = doneName; 3253 3253 } 3254 3254 3255 3255 var diff = elem.nodeIndex - last; 3256 3256 if ( first === 0 ) { … … 3328 3328 return results; 3329 3329 } 3330 3330 3331 3331 return array; 3332 3332 }; … … 3520 3520 return; 3521 3521 } 3522 3522 3523 3523 Sizzle = function(query, context, extra, seed){ 3524 3524 context = context || document; … … 3531 3531 } catch(e){} 3532 3532 } 3533 3533 3534 3534 return oldSizzle(query, context, extra, seed); 3535 3535 }; … … 3560 3560 return; 3561 3561 } 3562 3562 3563 3563 Expr.order.splice(1, 0, "CLASS"); 3564 3564 Expr.find.CLASS = function(match, context, isXML) { … … 3648 3648 var isXML = function(elem){ 3649 3649 // documentElement is verified for cases where it doesn't yet exist 3650 // (such as loading iframes in IE - #4833) 3650 // (such as loading iframes in IE - #4833) 3651 3651 var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; 3652 3652 return documentElement ? documentElement.nodeName !== "HTML" : false; … … 3764 3764 return this.pushStack( winnow(this, selector, true), "filter", selector ); 3765 3765 }, 3766 3766 3767 3767 is: function( selector ) { 3768 3768 return !!selector && jQuery.filter( selector, this ).length > 0; … … 3778 3778 3779 3779 if ( !matches[selector] ) { 3780 matches[selector] = jQuery.expr.match.POS.test( selector ) ? 3780 matches[selector] = jQuery.expr.match.POS.test( selector ) ? 3781 3781 jQuery( selector, context || this.context ) : 3782 3782 selector; … … 3800 3800 } 3801 3801 3802 var pos = jQuery.expr.match.POS.test( selectors ) ? 3802 var pos = jQuery.expr.match.POS.test( selectors ) ? 3803 3803 jQuery( selectors, context || this.context ) : null; 3804 3804 … … 3813 3813 }); 3814 3814 }, 3815 3815 3816 3816 // Determine the position of an element within 3817 3817 // the matched set of elements … … 3894 3894 jQuery.fn[ name ] = function( until, selector ) { 3895 3895 var ret = jQuery.map( this, fn, until ); 3896 3896 3897 3897 if ( !runtil.test( name ) ) { 3898 3898 selector = until; … … 3921 3921 return jQuery.find.matches(expr, elems); 3922 3922 }, 3923 3923 3924 3924 dir: function( elem, dir, until ) { 3925 3925 var matched = [], cur = elem[dir]; … … 4109 4109 } 4110 4110 }, 4111 4111 4112 4112 // keepData is for internal use only--do not document 4113 4113 remove: function( selector, keepData ) { … … 4124 4124 } 4125 4125 } 4126 4126 4127 4127 return this; 4128 4128 }, … … 4140 4140 } 4141 4141 } 4142 4142 4143 4143 return this; 4144 4144 }, … … 4287 4287 results = buildFragment( args, this, scripts ); 4288 4288 } 4289 4289 4290 4290 fragment = results.fragment; 4291 4291 4292 4292 if ( fragment.childNodes.length === 1 ) { 4293 4293 first = fragment = fragment.firstChild; … … 4394 4394 var ret = [], insert = jQuery( selector ), 4395 4395 parent = this.length === 1 && this[0].parentNode; 4396 4396 4397 4397 if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) { 4398 4398 insert[ original ]( this[0] ); 4399 4399 return this; 4400 4400 4401 4401 } else { 4402 4402 for ( var i = 0, l = insert.length; i < l; i++ ) { … … 4405 4405 ret = ret.concat( elems ); 4406 4406 } 4407 4407 4408 4408 return this.pushStack( ret, name, insert.selector ); 4409 4409 } … … 4493 4493 if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) { 4494 4494 scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] ); 4495 4495 4496 4496 } else { 4497 4497 if ( ret[i].nodeType === 1 ) { … … 4505 4505 return ret; 4506 4506 }, 4507 4507 4508 4508 cleanData: function( elems ) { 4509 4509 var data, id, cache = jQuery.cache, 4510 4510 special = jQuery.event.special, 4511 4511 deleteExpando = jQuery.support.deleteExpando; 4512 4512 4513 4513 for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { 4514 4514 id = elem[ jQuery.expando ]; 4515 4515 4516 4516 if ( id ) { 4517 4517 data = cache[ id ]; 4518 4518 4519 4519 if ( data.events ) { 4520 4520 for ( var type in data.events ) { … … 4527 4527 } 4528 4528 } 4529 4529 4530 4530 if ( deleteExpando ) { 4531 4531 delete elem[ jQuery.expando ]; … … 4534 4534 elem.removeAttribute( jQuery.expando ); 4535 4535 } 4536 4536 4537 4537 delete cache[ id ]; 4538 4538 } … … 4567 4567 return jQuery.curCSS( elem, name ); 4568 4568 } 4569 4569 4570 4570 if ( typeof value === "number" && !rexclude.test(name) ) { 4571 4571 value += "px"; … … 4975 4975 ajax: function( origSettings ) { 4976 4976 var s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings); 4977 4977 4978 4978 var jsonp, status, data, 4979 4979 callbackContext = origSettings && origSettings.context || s, … … 5290 5290 } 5291 5291 } 5292 5292 5293 5293 function trigger(type, args) { 5294 5294 (s.context ? jQuery(s.context) : jQuery.event).trigger(type, args); … … 5378 5378 param: function( a, traditional ) { 5379 5379 var s = []; 5380 5380 5381 5381 // Set traditional to true for jQuery <= 1.3.2 behavior. 5382 5382 if ( traditional === undefined ) { 5383 5383 traditional = jQuery.ajaxSettings.traditional; 5384 5384 } 5385 5385 5386 5386 // If an array was passed in, assume that it is an array of form elements. 5387 5387 if ( jQuery.isArray(a) || a.jquery ) { … … 5390 5390 add( this.name, this.value ); 5391 5391 }); 5392 5392 5393 5393 } else { 5394 5394 // If traditional, encode the "old" way (the way 1.3.2 or older … … 5420 5420 } 5421 5421 }); 5422 5422 5423 5423 } else if ( !traditional && obj != null && typeof obj === "object" ) { 5424 5424 // Serialize object item. … … 5426 5426 buildParams( prefix + "[" + k + "]", v ); 5427 5427 }); 5428 5428 5429 5429 } else { 5430 5430 // Serialize scalar item. … … 5877 5877 } 5878 5878 }, 5879 5879 5880 5880 stop: function() { 5881 5881 clearInterval( timerId ); 5882 5882 timerId = null; 5883 5883 }, 5884 5884 5885 5885 speeds: { 5886 5886 slow: 600, … … 5926 5926 var elem = this[0]; 5927 5927 5928 if ( options ) { 5928 if ( options ) { 5929 5929 return this.each(function( i ) { 5930 5930 jQuery.offset.setOffset( this, options, i ); … … 5952 5952 var elem = this[0]; 5953 5953 5954 if ( options ) { 5954 if ( options ) { 5955 5955 return this.each(function( i ) { 5956 5956 jQuery.offset.setOffset( this, options, i ); … … 6060 6060 return { top: top, left: left }; 6061 6061 }, 6062 6062 6063 6063 setOffset: function( elem, options, i ) { 6064 6064 // set position first, in-case top/left are set even on static elem … … 6079 6079 left: (options.left - curOffset.left) + curLeft 6080 6080 }; 6081 6081 6082 6082 if ( "using" in options ) { 6083 6083 options.using.call( elem, props ); … … 6139 6139 jQuery.fn[ method ] = function(val) { 6140 6140 var elem = this[0], win; 6141 6141 6142 6142 if ( !elem ) { 6143 6143 return null; … … 6203 6203 return size == null ? null : this; 6204 6204 } 6205 6205 6206 6206 if ( jQuery.isFunction( size ) ) { 6207 6207 return this.each(function( i ) { -
themes/default/js/post.js
r0 r2566 6 6 '</p>' 7 7 ); 8 8 9 9 var cookie = readCookie($.cookie('comment_info')); 10 11 10 11 12 12 if (cookie != false) { 13 13 $('#c_name').val(cookie[0]); … … 16 16 $('#c_remember').attr('checked','checked'); 17 17 } 18 18 19 19 $('#c_remember').click(function() { 20 20 if (this.checked) { … … 24 24 } 25 25 }); 26 26 27 27 $('#c_name').change(function() { 28 28 if ($('#c_remember').get(0).checked) { … … 30 30 } 31 31 }); 32 32 33 33 $('#c_mail').change(function() { 34 34 if ($('#c_remember').get(0).checked) { … … 36 36 } 37 37 }); 38 38 39 39 $('#c_site').change(function() { 40 40 if ($('#c_remember').get(0).checked) { … … 42 42 } 43 43 }); 44 44 45 45 function setCookie() { 46 46 var name = $('#c_name').val(); … … 53 53 cpath = cpath.replace(/.*:\/\/[^\/]*([^?]*).*/g,"$1"); 54 54 } 55 55 56 56 $.cookie('comment_info', name + '\n' + mail + '\n' + site, {expires: 60, path: cpath}); 57 57 } 58 58 59 59 function dropCookie() { 60 60 $.cookie('comment_info','',{expires: -30, path: '/'}); 61 61 } 62 62 63 63 function readCookie(c) { 64 64 if (!c) { 65 65 return false; 66 66 } 67 67 68 68 var s = c.split('\n'); 69 69 70 70 if (s.length != 3) { 71 71 dropCookie(); 72 72 return false; 73 73 } 74 74 75 75 return s; 76 76 } -
themes/default/style.css
r1179 r2566 533 533 color: #279ac4; 534 534 border: 1px solid #cdcdcd; 535 padding: 1px 2px; 535 padding: 1px 2px; 536 536 width: 68%; 537 537 }
Note: See TracChangeset
for help on using the changeset viewer.