From 07dc8373fec08588da5419fb2b65cdbc6b52a334 Mon Sep 17 00:00:00 2001 From: 黃勁捷 Date: Mon, 24 Dec 2012 20:05:16 +0800 Subject: 終於弄好輸入有HTML TAG的問題了 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/list.css | 7 ------- jinhtml/list.html | 5 +++-- js/list.js | 17 +---------------- 3 files changed, 4 insertions(+), 25 deletions(-) diff --git a/css/list.css b/css/list.css index 606f778..7a90e6d 100644 --- a/css/list.css +++ b/css/list.css @@ -74,13 +74,6 @@ div#unmatchedmessage { } #neweventbutton { font-size:2.5em; - color:gray; -} -#neweventblock { - cursor:pointer; -} -#neweventblock:hover #neweventbutton { - color:black; } .title { border-right-width:0px; diff --git a/jinhtml/list.html b/jinhtml/list.html index 43409cf..5aa5e2d 100644 --- a/jinhtml/list.html +++ b/jinhtml/list.html @@ -13,8 +13,9 @@ {% endblock %} {% block headjs %} - + + + {% endblock %} {% block body %} diff --git a/js/list.js b/js/list.js index 40d5803..46c2a92 100644 --- a/js/list.js +++ b/js/list.js @@ -349,7 +349,6 @@ function switchbacktonormalmode (eventid) { var checkclass = ["content", "remind", "year", "month", "date", "hour", "minute"]; $ ("#" + "newevent" + "head").css ("display", "none"); $ ("#" + "newevent" + "content").css ("display", "none"); - $ ("#neweventblock").css ("display", "block"); for (var i = 0 ; i < checkclass.length ; i++) { $ ("#input" + "newevent" + checkclass[i]).css ("background-color", "white"); } @@ -667,7 +666,7 @@ function cancelupdateevent (eventid) { for (var i = 0 ; i < headdataclass.length ; i++) { $ ("#" + eventid + headdataclass[i]).text (originevent[i]); } - $ ("#" + eventid + "content").html ("
"
+		$ ("#" + eventid + "content").html ("
");
 		$ ("#" + eventid + "contentpre").text (originevent[4]);
 		for (var i = 0 ; i < headdataclass.length ; i++) {
 			$ ("#" + eventid + headdataclass[i]).attr ("onclick", "togglecontent (this.id)");
@@ -678,22 +677,10 @@ function cancelupdateevent (eventid) {
 
 function resumeeditbutton () {		//恢復其他活動的編輯  恢復新增活動
 	$ (".editbutton").attr ("disabled", false);
-	$ ("#neweventblock").css ("cursor", "pointer");
-	$ ("#neweventblock").hover (function () {
-		$ ("#neweventbutton").css ("color", "black");
-		}, function () {
-		$ ("#neweventbutton").css ("color", "gray");
-	});
-	$ ("#neweventblock").attr ("onclick", "displayneweventinput ();");
 }
 
 function disableeditbutton () {		//停用其他活動的編輯  停用新增活動
 	$ (".editbutton").attr ("disabled", true);
-	$ ("#neweventblock").css ("cursor", "auto");	//編輯現有活動
-	$ ("#neweventblock").hover (function () {
-		$ ("#neweventbutton").css ("color", "gray");
-	});
-	$ ("#neweventblock").removeAttr ("onclick");
 }
 
 function inputkeyup (dataid) {		//dataid starts with 'input'
@@ -850,7 +837,6 @@ function setnonchangingyearcss () {//set cursor, even,odd color, next,prev page
 	$ (".event:odd").css ("background-color", "#33FFFF");
 	$ ("#prevpagebutton").attr ("disabled", (curpage == 1));
 	$ ("#nextpagebutton").attr ("disabled", (curpage * 10 >= calevent.length));
-	$ ("#neweventblock").css ("display", "block");
 	$ ("#" + "newevent" + "head").css ("display", "none");
 	$ ("#" + "newevent" + "content").css ("display", "none");
 	resumeeditbutton ();
@@ -875,7 +861,6 @@ function timetostring (hour, minute) {//12:0 => 12:00
 }
 
 function displayneweventinput () {
-	$ ("#neweventblock").css ("display", "none");
 	$ ("#neweventhead").css ("display", "table-row");
 	$ ("#neweventcontent").slideDown (250);
 	pushneweventdata ();
-- 
cgit