Changeset 16697 for lang/actionscript
- Timestamp:
- 07/27/08 00:02:11 (4 months ago)
- Location:
- lang/actionscript/todoshare
- Files:
-
- 10 added
- 7 modified
-
bin-debug/TodoShare.swf (modified) (previous)
-
bin-debug/css (added)
-
bin-debug/js (added)
-
css (added)
-
css/default.css (added)
-
db.cgi (modified) (1 diff)
-
img (added)
-
index.cgi (modified) (3 diffs)
-
js (added)
-
js/common.js (added)
-
nohada.cgi (modified) (3 diffs)
-
perl/Obj.pm (modified) (5 diffs)
-
perl/Session.pm (added)
-
perl/Tmpl.pm (added)
-
test/db.sql (modified) (1 diff)
-
test/test.pl (modified) (1 diff)
-
todoJS.cgi (added)
Legend:
- Unmodified
- Added
- Removed
-
lang/actionscript/todoshare/db.cgi
r16014 r16697 22 22 # or die $DBI::errstr; 23 23 #my $relName="relation"; 24 25 my $cmd = fromJSON( $str_js ); 26 my $res=&Obj::exe($cmd); 27 print toJSON($res); 28 exit; 24 eval { 25 my $cmd = fromJSON( $str_js ); 26 my $res=&Obj::exe($cmd); 27 print toJSON($res); 28 }; 29 if ($@) { 30 print toJSON(["FAIL",$@]); 31 } -
lang/actionscript/todoshare/index.cgi
r16425 r16697 8 8 use Html; 9 9 use HtmlTag; 10 use Tmpl; 11 use Obj; 10 12 header; 13 my $id=$ENV{"QUERY_STRING"}; 14 $id =~ s/%([A-Fa-f0-9]{2})/pack("c",hex($1))/ge; 15 if ($id) {&disp($id);exit;} 11 16 12 17 &Html::p ([html, … … 16 21 [h1,"メニュー"], 17 22 link("todo.cgi","Todo"), 23 link("todoJS.cgi","Todo(JS)"), 18 24 link("nohada.cgi","のはだ"), 19 25 link("swkText.cgi","SWK(Text Mode)"), … … 36 42 } 37 43 44 sub disp { 45 &Tmpl::page({title=>$id},[span, 46 [h2,"Infomation about $id"], 47 [table,sub { 48 my $p=shift; 49 my $res=&Obj::exe(["FINDREL",$id,any,any]); 50 for (@$res) { 51 $p->p([&tr, 52 [td,$_->{name}] , 53 [td,&Tmpl::link2obj($_->{val})] 54 ]); 55 } 56 }] 57 ]); 58 59 60 } -
lang/actionscript/todoshare/nohada.cgi
r16425 r16697 30 30 return e[tName]; 31 31 }).sort().uniq(); 32 print(cand. join(", "));33 if (cand.length==1) {$(tName).value=cand[0];}34 else {sugs[tName].candidateList=cand;}32 print(cand.map(link2obj).join(", ")); 33 //if (cand.length==1) {$(tName).value=cand[0];} 34 sugs[tName].candidateList=cand; 35 35 }); 36 36 } … … 84 84 85 85 EOF 86 my $style=<<'EOF'; 87 div.suggest { 88 position: absolute; 89 background-color: #FFFFFF; 90 border: 1px solid #CCCCFF; 91 font-size: 90%; 92 width: 200px; 93 } 94 div.select{ /* キー上下で選択した場合のスタイル */ 95 color: #FFFFFF; 96 background-color: #3366FF; 97 } 98 div.over{ /* マウスオーバ時のスタイル */ 99 background-color: #99CCFF; 100 } 101 EOF 86 102 87 103 88 … … 108 93 script(src=>"prototype.js"), 109 94 script(src=>"suggest.js"), 95 script(src=>"js/common.js"), 110 96 [script,$scr], 111 [style,$style],97 link(rel=>"Stylesheet",type=>"text/css",href=>"css/default.css"), 112 98 ], 113 99 [body,[center, -
lang/actionscript/todoshare/perl/Obj.pm
r16425 r16697 5 5 use DBI; 6 6 use ArrayUtil; 7 use Session; 7 8 #use JSON2; 8 9 … … 140 141 &log($cmd,$query); 141 142 if ($res) { $res=(["OK",$objectID, $query ]); } 142 else { $res=(["Fail",$query,$sth->errstr]); }143 else { die("Fail ,$query, ".$sth->errstr); } 143 144 $sth->finish; 144 145 return array($res); … … 325 326 obj => $cmd->[1], 326 327 name =>$cmd->[2], 327 val => $cmd->[3] 328 val => $cmd->[3], 329 t => &Session::newT, 330 role=> &Session::getRole 328 331 }]); 329 332 } elsif ($cmd->[0] eq 'FINDREL') { … … 337 340 where=> $where 338 341 }]); 342 } elsif ($cmd->[0] eq 'PROGN') { 343 # [ "PROGN", cmd, cmd ... ] 344 for (my $i=1 ; $i<@$cmd ; $i++) { 345 &exe($cmd->[$i]); 346 } 347 return ["OK"]; 339 348 } else { 340 349 die("Unknown command $cmd->[0]"); … … 351 360 &escapeLiteral($objectID) .",". 352 361 &escapeLiteral($k) .",". 353 &escapeLiteral($v) .")" 362 &escapeLiteral($v) .",". 363 &escapeLiteral(&Session::newT) .",". 364 &escapeLiteral(&Session::getRole) . 365 366 ")" 354 367 ; 355 368 print STDERR "$objectID $k $v $value\n"; -
lang/actionscript/todoshare/test/db.sql
r16014 r16697 10 10 val varchar(255) 11 11 ); 12 13 create table relation ( 14 obj varchar(255), 15 name varchar(255), 16 val varchar(255), 17 t varchar(32), 18 role varchar(32) 19 ); 20 12 21 13 22 -
lang/actionscript/todoshare/test/test.pl
r16061 r16697 3 3 #package main; 4 4 #use pkg; 5 5 6 BEGIN{ 6 7 push @INC,"../perl"; 7 8 } 8 use strict; 9 use Html; 10 use HtmlTag; 9 use Session; 10 print &Session::newT; print"\n"; 11 print &Session::newT; print"\n"; 12 print &Session::newT; print"\n"; 13 sleep 1; 14 print &Session::newT; print"\n"; 15 print &Session::newT; print"\n"; 16 17 #use strict; 18 #use Html; 19 #use HtmlTag; 11 20 12 21 &Html::p ([a(href=>"test.html")]);
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)