From 496ffe5d86135ace5a02ee2e85e1357a70d578b1 Mon Sep 17 00:00:00 2001 From: joyqi Date: Sun, 20 Oct 2013 02:09:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E9=9B=85=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/write-js.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/admin/write-js.php b/admin/write-js.php index 3fb5271e..19f9e199 100644 --- a/admin/write-js.php +++ b/admin/write-js.php @@ -124,17 +124,14 @@ $(document).ready(function() { var savedData = null, locked = false, formAction = form.attr('action'), idInput = $('input[name=cid]'), + cid = idInput.val(), autoSave = $('#auto-save-message'), - autoSaveOnce = !!idInput.val(), - lastSaveTime = null, - cid = null; + autoSaveOnce = !!cid, + lastSaveTime = null; function autoSaveListener () { setInterval(function () { - if (cid) { - idInput.val(cid); - } - + idInput.val(cid); var data = form.serialize(); if (savedData != data && !locked) {