Changeset 19435 for lang/actionscript/todoshare
- Timestamp:
- 09/17/08 19:49:46 (4 months ago)
- Location:
- lang/actionscript/todoshare
- Files:
-
- 3 added
- 6 modified
-
css/default.css (modified) (1 diff)
-
db/db.sql (modified) (1 diff)
-
js/common.js (modified) (2 diffs)
-
js/objEdit.js (added)
-
perl/Obj.pm (modified) (1 diff)
-
test/ARefJS.html (added)
-
test/syntax.js (added)
-
test/tmpl.html (modified) (1 diff)
-
textEdit.html (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/actionscript/todoshare/css/default.css
r16697 r19435 11 11 } 12 12 div.over{ /* マウスオーバ時のスタイル */ 13 background-color: #99CCF F;13 background-color: #99CCFE; 14 14 } 15 16 .menu { 17 position: absolute; 18 font-size: 90%; 19 left: 10; 20 top: 30; 21 } 22 .main { 23 position: absolute; 24 font-size: 90%; 25 left: 150; 26 top: 30; 27 28 } 29 .view{ 30 position: absolute; 31 font-size: 90%; 32 left: 0; 33 top: 50; 34 width: 100; 35 36 } -
lang/actionscript/todoshare/db/db.sql
r17024 r19435 14 14 obj varchar(255), 15 15 name varchar(255), 16 val varchar(255),16 val text, 17 17 t varchar(32), 18 role varchar(32) ,18 role varchar(32) 19 19 ); 20 21 --create table textstore ( 22 -- txt varchar(255), 23 -- val text 24 --); 20 25 21 26 create table relation_arcl ( -
lang/actionscript/todoshare/js/common.js
r18180 r19435 1 1 function db(cmd,onComplete) { 2 var env=this; 2 var env=this; 3 var j=Object.toJSON(cmd); 4 //if (j.indexOf("?")>=0) {print(j);print (encodeURI(j)); } 3 5 new Ajax.Request("db.cgi", { 4 6 method: "put", 5 parameters: 'cmd='+encodeURI (Object.toJSON(cmd)) ,7 parameters: 'cmd='+encodeURIComponent(j) , 6 8 onSuccess:function(httpObj){ 7 9 try { 8 10 //print ("Applying: "+onComplete); 9 onComplete.apply(env, [httpObj.responseText.evalJSON()] ); 11 var ret=httpObj.responseText.evalJSON(); 12 if (ret[0]=="FAIL") throw ret[1]; 13 onComplete.apply(env, [ret] ); 10 14 //print ("Applyed"); 11 15 } catch(e) {handleError(e);} … … 34 38 dbDel.async=true; 35 39 40 function dbFindRel(obj,name,val,after) { 41 db.apply(this,[["FINDREL",obj,name,val],after]); 42 } 43 dbFindRel.async=true; 44 45 36 46 function link2obj(id) { 37 47 var href=encodeURI(id); -
lang/actionscript/todoshare/perl/Obj.pm
r18180 r19435 324 324 $query .= join " and \n", @{$wheres} ; 325 325 #print "$query\n"; 326 326 $query .=" order by $idNameOvr desc "; 327 327 my $sth = $db->prepare($query); 328 328 my $eres=$sth->execute; -
lang/actionscript/todoshare/test/tmpl.html
r18180 r19435 1 1 <html> 2 2 <head> 3 <meta http-equiv="Content-type" content="text/html; chars rt=utf-8">3 <meta http-equiv="Content-type" content="text/html; charset=utf-8"> 4 4 <title>タイトル</title> 5 5 <script src="prototype.js"></script> -
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)