Changeset 19435 for lang/actionscript/todoshare/textEdit.html
- Timestamp:
- 09/17/08 19:49:46 (4 months ago)
- Files:
-
- 1 modified
-
lang/actionscript/todoshare/textEdit.html (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/actionscript/todoshare/textEdit.html
r18180 r19435 2 2 <head> 3 3 <meta http-equiv="Content-type" content="text/html; charsrt=utf-8"> 4 <title> タイトル</title>4 <title>テキストエディタ</title> 5 5 <script src="prototype.js"></script> 6 6 <script src="suggest.js"></script> … … 10 10 <script src="js/tag.js"></script> 11 11 <script src="js/gui.js"></script> 12 <script src="js/objEdit.js"></script> 12 13 <link rel="Stylesheet" type="text/css" href="css/default.css"> 13 14 <script> 15 var content=""; 16 var tagEditor; 14 17 // JavaScript 15 18 function onLoad() { 16 19 nagameru(); 20 tagEditor=new ObjectEditor("tags"); 21 tagEditor.setRelationFilter(function (rel) { 22 return rel.name!="content"; 23 24 }); 17 25 } 18 26 function nagameru() { … … 27 35 r.map(function (e) { 28 36 return ["span", 29 [abutton,{onclick: [[yomu,e.id]]},"Edit"], 30 ["span", ["strong", e.id], ": " ,e.content], 37 //[abutton,{onclick: [[yomu,e.id]]},"Edit"],["br"], 38 ["a", { 39 href:"javascript:;", 40 onclick: function() {yomu(e.id);} 41 }, e.id], 42 ["br"], 43 digest(e.content), 31 44 ["br"] 32 45 ]; 33 46 }) 34 47 ); 48 } 49 function digest(s) { 50 if (s.length<50) return s; 51 return s.substring(0,50)+"..."; 35 52 } 36 53 function yomu(id) { … … 41 58 $("id").innerHTML=obj.id; 42 59 $("text").value=obj.content; 60 content=obj.content; 61 tagEditor.setObjectID(obj.id); 43 62 },gv("_")] 44 63 ); … … 57 76 [dbPut, obj], 58 77 [print, "ほぞんしました: "], 78 function () {content=obj.content;}, 59 79 dispID, 60 80 // [print, gv(obj,"id")], // ちえんひょうか … … 70 90 function clear() { 71 91 $("text").value=""; 92 content=""; 93 $("id").value=""; 72 94 obj=null; 73 95 } 96 function changeLoop() { 97 if (content!=$("text").value) { 98 $("changed").innerHTML="へんこうあり"; 99 } else { 100 $("changed").innerHTML=""; 101 } 102 } 103 setInterval(changeLoop, 1000); 74 104 </script> 75 105 </head> 76 106 <body id=body onLoad="onLoad()"> 107 <span id=menu> 77 108 <button onclick="save()">ほぞん</button> 78 109 <button onclick="mekuru()">めくる</button> … … 80 111 <button onclick="nagameru()">ながめる</button> 81 112 さがす:<input type=text name=word> 113 </span> 82 114 83 <Br> 84 <span id="view"></span> 85 ID: <span id="id"></span> <BR> 86 <textarea rows=10 cols=60 id=text></textarea> 87 115 <span id="view" class="view"></span> 116 <div class="main"> 117 ID: <span id="id"></span> <span id="changed"></span> <BR> 118 <textarea rows=20 cols=80 id=text></textarea> 119 <BR> 120 たぐ: 121 <span id="tags"></span> 88 122 <HR> 89 123 <a href="./">Home</a><BR> 90 124 <span id="console"></span> 125 </div> 91 126 </body> 92 127 </html>
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)