From 29c55b43f419b7f6c277d44a87f3c5d0782e8fa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=81=E5=AE=81?= Date: Mon, 29 Sep 2014 00:02:53 +0800 Subject: [PATCH] fix editor css --- admin/editor-js.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/admin/editor-js.php b/admin/editor-js.php index 3602e793..c3c551bd 100644 --- a/admin/editor-js.php +++ b/admin/editor-js.php @@ -170,9 +170,14 @@ $(document).ready(function () { t.height(h * ow / w); } + var to; editor.hooks.chain('onPreviewRefresh', function () { var diff = $('.diff', preview), scrolled = false; + if (to) { + clearTimeout(to); + } + $('img', preview).load(function () { var t = $(this), src = t.attr('src'); @@ -191,7 +196,10 @@ $(document).ready(function () { var changed = $('.diff', preview).parent(); if (!changed.is(preview)) { - changed.effect('highlight', {color : '#EEEEEE'}, 1000); + changed.css('background-color', 'rgba(255,230,0,0.5)'); + to = setTimeout(function () { + changed.css('background-color', 'transparent'); + }, 4500); } if (diff.length > 0) {