diff --git a/admin/common-js.php b/admin/common-js.php index 79833280..c6d3b3f7 100644 --- a/admin/common-js.php +++ b/admin/common-js.php @@ -31,7 +31,7 @@ var t = $(this), href = t.attr('href'); if ((href.length > 1 && href[0] == '#') - /^adminUrl, '/'); ?>.*$/.exec(href) + || /^adminUrl, '/'); ?>.*$/.exec(href) || /^index), '/'), 0, -1); ?>action\/[_a-zA-Z0-9\/]+.*$/.exec(href)) { return; } diff --git a/admin/javascript/typecho.js b/admin/javascript/typecho.js index ff78e0ee..d27dbd4d 100644 --- a/admin/javascript/typecho.js +++ b/admin/javascript/typecho.js @@ -52,12 +52,16 @@ $(s.checkEl, this).click(function (e) { clickRow($(this).parents(s.rowEl)); }); - - $('input[type=text],input[type=password],textarea,input[type=submit],input[type=button],a,button').click(function (e) { + }).click(function (e) { + var target = $(e.toElement ? e.toElement : e.target), + tagName = target.prop('tagName').toLowerCase(); + + if ($.inArray(tagName, ['input', 'textarea', 'a', 'button']) >= 0 + && 'checkbox' != target.attr('type')) { e.stopPropagation(); - }); - }).click(function () { - clickRow(this); + } else { + clickRow(this); + } }); $(s.selectAllEl).click(function () { @@ -985,3 +989,45 @@ jQuery.fn.extend({ } }); +/** + * jQuery Cookie plugin + * + * Copyright (c) 2010 Klaus Hartl (stilbuero.de) + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + */ +jQuery.cookie = function (key, value, options) { + + // key and at least value given, set cookie... + if (arguments.length > 1 && String(value) !== "[object Object]") { + options = jQuery.extend({}, options); + + if (value === null || value === undefined) { + options.expires = -1; + } + + if (typeof options.expires === 'number') { + var days = options.expires, t = options.expires = new Date(); + t.setDate(t.getDate() + days); + } + + value = String(value); + + return (document.cookie = [ + encodeURIComponent(key), '=', + options.raw ? value : encodeURIComponent(value), + options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE + options.path ? '; path=' + options.path : '', + options.domain ? '; domain=' + options.domain : '', + options.secure ? '; secure' : '' + ].join('')); + } + + // key and possibly options given, get cookie... + options = value || {}; + var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent; + return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null; +}; + diff --git a/admin/manage-comments.php b/admin/manage-comments.php index 6d041b16..c231a9ec 100644 --- a/admin/manage-comments.php +++ b/admin/manage-comments.php @@ -79,10 +79,10 @@ $comments = Typecho_Widget::widget('Widget_Comments_Admin');
- - + + - + @@ -93,42 +93,19 @@ $comments = Typecho_Widget::widget('Widget_Comments_Admin'); - - - - - - have()): ?> next()): ?> - + @@ -153,40 +130,33 @@ $comments = Typecho_Widget::widget('Widget_Comments_Admin');
dateWord(); ?> 于 title(); ?>
content(); ?> -
- -

-

- - -

- +
status): ?> - + status): ?> - + status): ?> - + - + status && 'comment' == $comments->type): ?> - + - +
@@ -219,244 +189,99 @@ include 'common-js.php'; include 'table-js.php'; ?>
-

- - -

-

- - -

-

- - -

-
-

- - -

-

- - -

-

- - -

-