修正一些细节

This commit is contained in:
祁宁 2014-03-20 23:54:57 +08:00
parent 58afc7fc0c
commit ea3d5585a8
3 changed files with 14 additions and 24 deletions

View File

@ -160,7 +160,7 @@ $(document).ready(function () {
src = src.substring(0, src.length - 1);
}
return '<div style="background: #ddd; height: 40px; line-height: 40px; text-align: center; font-size: 12px; color: #777">'
return '<div style="background: #ddd; height: 40px; overflow: hidden; line-height: 40px; text-align: center; font-size: 12px; color: #777">'
+ tag + ' : ' + $.trim(src) + '</div>';
});

View File

@ -141,12 +141,18 @@
if (checked) {
$(s.rowEl, table).each(function () {
$(s.checkEl, this).prop('checked', true);
}).addClass('checked');
var t = $(this), el = $(s.checkEl, this).prop('checked', true);
if (el.length > 0) {
t.addClass('checked');
}
});
} else {
$(s.rowEl, table).each(function () {
$(s.checkEl, this).prop('checked', false);
}).removeClass('checked');
var t = $(this), el = $(s.checkEl, this).prop('checked', false);
if (el.length > 0) {
t.removeClass('checked');
}
});
}
});

View File

@ -149,26 +149,9 @@ class Widget_Abstract_Contents extends Widget_Abstract
protected function ___summary()
{
$content = $this->content;
$parts = preg_split("/<\/\s*(?:p|blockquote|q|pre|table)\s*>/i", $content, 2);
$parts = preg_split("/(<\/\s*(?:p|blockquote|q|pre|table)\s*>)/i", $content, 2, PREG_SPLIT_DELIM_CAPTURE);
if (!empty($parts)) {
preg_match("/<\s*(?:p|blockquote|q|pre|table)\s*>/i", $parts[0], $tags);
switch ($tags[0]) {
case '<pre>':
$content = $parts[0] . '</pre>';
break;
case '<blockquote>':
$content = $parts[0] . '</blockquote>';
break;
case '<q>':
$content = $parts[0] . '</q>';
break;
case '<table>':
$content = $parts[0] . '</table>';
break;
default:
$content = $parts[0] . '</p>';
break;
}
$content = $parts[0] . $parts[1];
}
return $content;
@ -940,3 +923,4 @@ class Widget_Abstract_Contents extends Widget_Abstract
echo $this->author->{$item};
}
}