tutos-commits Mailing List for TUTOS
Projects / CRM / PLM / Calendar / Tasks / SCRUM / Test / Inventory
Brought to you by:
gokohnert
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(13) |
Aug
(214) |
Sep
(144) |
Oct
(22) |
Nov
(22) |
Dec
(93) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(25) |
Feb
(31) |
Mar
(92) |
Apr
(70) |
May
(103) |
Jun
(130) |
Jul
(265) |
Aug
(325) |
Sep
(233) |
Oct
(244) |
Nov
(261) |
Dec
(157) |
2003 |
Jan
(101) |
Feb
(135) |
Mar
(148) |
Apr
(164) |
May
(53) |
Jun
(116) |
Jul
(149) |
Aug
(126) |
Sep
(45) |
Oct
(109) |
Nov
(36) |
Dec
(61) |
2004 |
Jan
(131) |
Feb
(236) |
Mar
(278) |
Apr
(259) |
May
(92) |
Jun
(110) |
Jul
(150) |
Aug
(64) |
Sep
(141) |
Oct
(141) |
Nov
(146) |
Dec
(65) |
2005 |
Jan
(70) |
Feb
(77) |
Mar
(129) |
Apr
(153) |
May
(161) |
Jun
(63) |
Jul
(42) |
Aug
(16) |
Sep
(30) |
Oct
(3) |
Nov
(8) |
Dec
(40) |
2006 |
Jan
(114) |
Feb
(16) |
Mar
(12) |
Apr
(15) |
May
(4) |
Jun
(9) |
Jul
(69) |
Aug
(27) |
Sep
(12) |
Oct
(80) |
Nov
(62) |
Dec
(41) |
2007 |
Jan
(34) |
Feb
(2) |
Mar
(38) |
Apr
(82) |
May
(61) |
Jun
(37) |
Jul
(16) |
Aug
(64) |
Sep
(7) |
Oct
(52) |
Nov
(18) |
Dec
(28) |
2008 |
Jan
(168) |
Feb
(26) |
Mar
(27) |
Apr
(19) |
May
(10) |
Jun
(58) |
Jul
(58) |
Aug
(91) |
Sep
(14) |
Oct
(23) |
Nov
(56) |
Dec
(38) |
2009 |
Jan
(58) |
Feb
(90) |
Mar
(204) |
Apr
(90) |
May
(27) |
Jun
(177) |
Jul
(116) |
Aug
(53) |
Sep
(42) |
Oct
(120) |
Nov
(51) |
Dec
(58) |
2010 |
Jan
(117) |
Feb
(231) |
Mar
(163) |
Apr
(90) |
May
(40) |
Jun
(139) |
Jul
(49) |
Aug
(118) |
Sep
(25) |
Oct
(80) |
Nov
(102) |
Dec
(99) |
2011 |
Jan
(176) |
Feb
(42) |
Mar
(60) |
Apr
(52) |
May
(30) |
Jun
(29) |
Jul
(27) |
Aug
(16) |
Sep
(51) |
Oct
(70) |
Nov
(63) |
Dec
(58) |
2012 |
Jan
(28) |
Feb
(26) |
Mar
(7) |
Apr
(12) |
May
(41) |
Jun
(61) |
Jul
(59) |
Aug
(38) |
Sep
(30) |
Oct
(28) |
Nov
(14) |
Dec
(31) |
2013 |
Jan
(24) |
Feb
(54) |
Mar
(45) |
Apr
(22) |
May
(35) |
Jun
(8) |
Jul
(18) |
Aug
(38) |
Sep
(11) |
Oct
(8) |
Nov
(19) |
Dec
(20) |
2014 |
Jan
(20) |
Feb
(22) |
Mar
(4) |
Apr
(6) |
May
(13) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(6) |
2015 |
Jan
|
Feb
(1) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2016 |
Jan
(4) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(8) |
Aug
(13) |
Sep
(12) |
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2021 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
9
|
10
|
11
|
12
(1) |
13
(8) |
14
(3) |
15
(2) |
16
(8) |
17
(2) |
18
(4) |
19
(4) |
20
(3) |
21
(2) |
22
(1) |
23
|
24
(1) |
25
(2) |
26
(1) |
27
|
28
|
|
|
|
|
|
From: <gok...@us...> - 2011-02-26 09:27:16
|
Revision: 47 http://tutos.svn.sourceforge.net/tutos/?rev=47&view=rev Author: gokohnert Date: 2011-02-26 09:27:10 +0000 (Sat, 26 Feb 2011) Log Message: ----------- smaller Modified Paths: -------------- trunk/php/stc/stc.pinc Modified: trunk/php/stc/stc.pinc =================================================================== --- trunk/php/stc/stc.pinc 2011-02-25 19:01:59 UTC (rev 46) +++ trunk/php/stc/stc.pinc 2011-02-26 09:27:10 UTC (rev 47) @@ -695,7 +695,8 @@ $url2 = addUrlParameter($url2,'owner='.$this->stateowner->id); } $id = uniqid(); - $x = '<table class="popupinfo"><img src="'.$url2.'"></table>'; + $x = '<table class="popupinfo"><img width="400" height="480" src="'.$url2.'"></table>'; + $x = '<img width="300" height="360" src="'.$url2.'">'; $r .= '<a id="bt_'.$id.'" href="'.$url.'" class="nodeco">'; $r .= htmlentities($txt); $r .= '</a>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-02-25 19:02:05
|
Revision: 46 http://tutos.svn.sourceforge.net/tutos/?rev=46&view=rev Author: gokohnert Date: 2011-02-25 19:01:59 +0000 (Fri, 25 Feb 2011) Log Message: ----------- fix Modified Paths: -------------- trunk/php/timetrack/mconfig.pinc Modified: trunk/php/timetrack/mconfig.pinc =================================================================== --- trunk/php/timetrack/mconfig.pinc 2011-02-25 17:17:08 UTC (rev 45) +++ trunk/php/timetrack/mconfig.pinc 2011-02-25 19:01:59 UTC (rev 46) @@ -33,6 +33,7 @@ $tutos[modulesinc]['timetrack'][] = 'task'; $tutos[modulesinc]['timetrack'][] = 'team'; $tutos[modulesinc]['timetrack'][] = 'address'; +$tutos[modulesinc]['timetrack'][] = 'stc'; # # Default Settings This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-02-25 17:17:14
|
Revision: 45 http://tutos.svn.sourceforge.net/tutos/?rev=45&view=rev Author: gokohnert Date: 2011-02-25 17:17:08 +0000 (Fri, 25 Feb 2011) Log Message: ----------- fix Modified Paths: -------------- trunk/php/timetrack/timetrack_ins.php Modified: trunk/php/timetrack/timetrack_ins.php =================================================================== --- trunk/php/timetrack/timetrack_ins.php 2011-02-24 07:40:36 UTC (rev 44) +++ trunk/php/timetrack/timetrack_ins.php 2011-02-25 17:17:08 UTC (rev 45) @@ -34,7 +34,7 @@ if ( isset($_POST['gotourl']) ) { $gotourl = $_POST['gotourl']; } else { - $gotourl = "timetrack_new.php"; + $gotourl = "timetrack/timetrack_new.php"; } if (isset($_REQUEST['ss'])) { $gotourl= addUrlParameter($gotourl,'ss='. $_REQUEST['ss'],true); @@ -214,4 +214,4 @@ } leave_insert($dbconn,'../'.$gotourl,$msg); -?> +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-02-24 07:40:42
|
Revision: 44 http://tutos.svn.sourceforge.net/tutos/?rev=44&view=rev Author: gokohnert Date: 2011-02-24 07:40:36 +0000 (Thu, 24 Feb 2011) Log Message: ----------- fix Modified Paths: -------------- trunk/php/subversion/templates/svn_notify.proto.de Modified: trunk/php/subversion/templates/svn_notify.proto.de =================================================================== --- trunk/php/subversion/templates/svn_notify.proto.de 2011-02-22 08:43:25 UTC (rev 43) +++ trunk/php/subversion/templates/svn_notify.proto.de 2011-02-24 07:40:36 UTC (rev 44) @@ -1,7 +1,7 @@ Hallo @TO@, @AUTHOR@ hat neue Daten in der Versionsverwaltung von @REPO@ abgelegt. -Dabei wurde die neue Stand "@REV@" erzeugt. +Dabei wurde der neue Stand "@REV@" erzeugt. ----------------- @LOG@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-02-22 08:43:32
|
Revision: 43 http://tutos.svn.sourceforge.net/tutos/?rev=43&view=rev Author: gokohnert Date: 2011-02-22 08:43:25 +0000 (Tue, 22 Feb 2011) Log Message: ----------- more pdf formatting Modified Paths: -------------- trunk/php/pdf2.pinc trunk/php/testmanager/testmanager.pinc trunk/php/testmanager/testrun_show.php Modified: trunk/php/pdf2.pinc =================================================================== --- trunk/php/pdf2.pinc 2011-02-21 15:22:13 UTC (rev 42) +++ trunk/php/pdf2.pinc 2011-02-22 08:43:25 UTC (rev 43) @@ -40,11 +40,11 @@ $this->setKeywords("TUTOS"); $this->setDisplayMode('fullpage','continuous'); $this->SetCompression(true); - $this->SetAutoPageBreak(true,20); + $this->SetAutoPageBreak(true,16); - $this->setTopMargin(20); + $this->setTopMargin(18); $this->setHeaderMargin(0); - $this->setFooterMargin(16); + $this->setFooterMargin(5); } @@ -57,7 +57,7 @@ //Position at 1.5 cm from bottom //Arial italic 8 $this->SetFont('helvetica','I',8); - $this->SetY(-15); + $this->SetY(-12); $this->SetX(10); $this->Cell(0,10,$d->getDateTime(),0,0,'L'); //Page number @@ -68,7 +68,7 @@ $this->SetX(10); $this->Cell(0,10,"generated by TUTOS ".$tutos[version],'T',1,'R',0,"http://www.tutos.org"); - $this->SetY(-12); + $this->SetY(-8); $this->SetX(10); $this->Cell(0,10,$current_user->getFullName(),0,0,'L'); Modified: trunk/php/testmanager/testmanager.pinc =================================================================== --- trunk/php/testmanager/testmanager.pinc 2011-02-21 15:22:13 UTC (rev 42) +++ trunk/php/testmanager/testmanager.pinc 2011-02-22 08:43:25 UTC (rev 43) @@ -647,15 +647,24 @@ global $lang; $this->read_last_mod(); - + $style = ''; if ($this->activ == 1) { $n = $lang['TestcaseResults'][$this->result]; + if ($this->result == 0) { + // fail + $style = ' style="background-color:#DAA"'; + } + if ($this->result == 1) { + // pass + $style = ' style="background-color:#ADA"'; + } + if (isset($this->lastmod[0])) { $i = $this->lastmod[0]; - $n .= "<br />".sprintf($lang['TestrunLastMod'], - $lang['TestcaseResults'][$i['new']], - $i['date']->getDateTime(), - $i['user']->getFullName()); + $n .= '<br /><br />'.sprintf($lang['TestrunLastMod'], + $lang['TestcaseResults'][$i['new']], + $i['date']->getDateTime(), + $i['user']->getFullName()); } } else { $n = ''; @@ -669,12 +678,12 @@ $c = preg_replace('#\n#','<br />',$this->comment); $tbl = ' <tr> -<td width="50">'.$precnt.'</td> +<td width="50" align="right">'.$precnt.'</td> <td width="130">'.$name.'</td> -<td width="130">'.$s.'</td> -<td width="130">'.$e.'</td> -<td width="130">'.$n.'</td> -<td width="130">'.$c.'</td> +<td width="140">'.$s.'</td> +<td width="140">'.$e.'</td> +<td width="100" align="center"'.$style.'>'.$n.'</td> +<td width="140">'.$c.'</td> </tr> '; return $tbl; @@ -1531,10 +1540,10 @@ <tr> <th align="center" width="50"></th> <th style="background-color:#BBB" align="center" width="130"><b>'.$lang['TestcaseName'].'</b></th> -<th style="background-color:#BBB" align="center" width="130"><b>'.$lang['TestcaseSteps'].'</b></th> -<th style="background-color:#BBB" align="center" width="130"><b>'.$lang['TestcaseExpected'].'</b></th> -<th style="background-color:#BBB" align="center" width="130"><b>'.$lang['TestcaseResult'].'</b></th> -<th style="background-color:#BBB" align="center" width="130"><b>'.$lang['TestcaseComment'].'</b></th> +<th style="background-color:#BBB" align="center" width="140"><b>'.$lang['TestcaseSteps'].'</b></th> +<th style="background-color:#BBB" align="center" width="140"><b>'.$lang['TestcaseExpected'].'</b></th> +<th style="background-color:#BBB" align="center" width="100"><b>'.$lang['TestcaseResult'].'</b></th> +<th style="background-color:#BBB" align="center" width="140"><b>'.$lang['TestcaseComment'].'</b></th> </tr> </thead> '; @@ -1545,6 +1554,7 @@ } if (count($this->list[usetestcase][0]) > 0) { $tbl .= '</table>'; + $pdf->SetFont('times', '', 9); $pdf->writeHTML($tbl, true, false, false, false, ''); $pdf->ln(3); } @@ -2488,31 +2498,31 @@ $tbl = ' '; $pdf->SetFont('times','B',8); - $pdf->Cell(35,0,myiconv($lang['TestrunState'])); + $pdf->Cell(35,0,$lang['TestrunState']); $pdf->SetFont('times','',8); - $pdf->Cell(145,0,myiconv($lang['TestrunStates'][$this->state])); + $pdf->Cell(145,0,$lang['TestrunStates'][$this->state]); $pdf->ln(6); // URL $pdf->SetFont('times','B',8); - $pdf->Cell(35,0,myiconv($lang['URL'])); + $pdf->Cell(35,0,$lang['URL']); $pdf->SetFont('times','',8); $pdf->Cell(145,0,dirname(getBaseUrl()).'/'.$this->getUrl()); $pdf->ln(6); // Signature Line $pdf->SetFont('times','B',8); - $pdf->Cell(45,0,myiconv($lang['AdrName'])); - $pdf->Cell(45,0,myiconv($lang['AdrEmail'])); - $pdf->Cell(65,0,myiconv($lang['TestrunSignature'])); - $pdf->Cell(45,0,myiconv($lang['Date'])); + $pdf->Cell(45,0,$lang['AdrName']); + $pdf->Cell(45,0,$lang['AdrEmail']); + $pdf->Cell(65,0,$lang['TestrunSignature']); + $pdf->Cell(45,0,$lang['Date']); $pdf->ln(5); - $pdf->SetFont('times','',7); + $pdf->SetFont('times','',8); foreach(array_unique($this->run->statarr[4]) as $i => $j ) { if (is_object($j)) { - $pdf->Cell(45,0,myiconv($j->getFullName())); - $pdf->Cell(45,0,myiconv($j->default_email())); - $pdf->Cell(65,0,myiconv('________________________')); - $pdf->Cell(45,0,myiconv('___.___._______')); + $pdf->Cell(45,0,$j->getFullName()); + $pdf->Cell(45,0,$j->default_email()); + $pdf->Cell(65,0,'________________________'); + $pdf->Cell(45,0,'___.___._______'); $pdf->ln(4); } } @@ -2520,18 +2530,22 @@ // Stats $pdf->SetFont('times','B',8); - $pdf->Cell(35,0,myiconv($lang['TestrunStats'].':')); + $pdf->Cell(35,0,$lang['TestrunStats'].':'); $pdf->ln(5); $pdf->SetFont('times','',7); foreach($this->run->statarr[0] as $i => $f) { - $pdf->Cell(45,0,myiconv($lang['TestcaseResults'][$i])); - $pdf->Cell(15,0,myiconv($f)); - $pdf->Cell(45,0,myiconv(sprintf('%.2f %%',100.0 * $f/$sum))); + $pdf->Cell(45,0,$lang['TestcaseResults'][$i]); + $pdf->Cell(15,0,$f); + $pdf->Cell(45,0,sprintf('%.2f %%',100.0 * $f/$sum)); $pdf->ln(4); } $pdf->ln(2); + $pdf->SetFont('times','',10); + $pdf->MultiCell(0,0,$this->desc,'TB'); + $pdf->ln(2); + testsuite::obj_read($this); $cnt = 1; $pdf->ln(3); Modified: trunk/php/testmanager/testrun_show.php =================================================================== --- trunk/php/testmanager/testrun_show.php 2011-02-21 15:22:13 UTC (rev 42) +++ trunk/php/testmanager/testrun_show.php 2011-02-22 08:43:25 UTC (rev 43) @@ -176,15 +176,17 @@ $pdf=new tutospdf($this->obj->dbconn,'L'); $pdf->Open(); - $pdf->setAuthor(myiconv($this->obj->creator->getFullName())); - $pdf->setTitle(myiconv($this->obj->getFullName())); - $pdf->setSubject(myiconv($this->obj->getFullName())); + $pdf->SetProtection(array('modify'),'','',3); + $pdf->setAuthor($this->obj->creator->getFullName()); + $pdf->setTitle($lang[$this->obj->getType()].' '.$this->obj->getFullName()); + $pdf->setSubject($this->obj->getFullName()); $pdf->setKeywords('Testrun'); $pdf->SetFont('times', '', 10); $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); - $pdf->SetHeaderData($tutos['base'].'/../'.$tutos[logo],15,$lang[$this->obj->getType()],$this->obj->getFullName()); + $pdf->SetHeaderData($tutos['base'].'/../'.$tutos[logo],15,$lang[$this->obj->getType()],$this->obj->ref->getFullName().': '.$this->obj->getFullName()); + # $pdf->headtitle = $lang[$this->obj->getType()].' '.$this->obj->getFullName(); $pdf->AddPage(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-02-21 15:22:20
|
Revision: 42 http://tutos.svn.sourceforge.net/tutos/?rev=42&view=rev Author: gokohnert Date: 2011-02-21 15:22:13 +0000 (Mon, 21 Feb 2011) Log Message: ----------- pdf stuff Modified Paths: -------------- trunk/php/database_show.php trunk/php/db.p3 trunk/php/file/file_ins.php trunk/php/mail.pinc trunk/php/pdf2.pinc trunk/php/testmanager/testmanager.pinc trunk/php/testmanager/testrun_show.php trunk/php/testmanager/testsuite_show.php trunk/php/webelements.p3 Modified: trunk/php/database_show.php =================================================================== --- trunk/php/database_show.php 2011-02-21 15:21:32 UTC (rev 41) +++ trunk/php/database_show.php 2011-02-21 15:22:13 UTC (rev 42) @@ -54,7 +54,7 @@ $r .= $this->showfield($lang['AdminDBPrefix']); $r .= $this->showdata($this->obj->prefix); -# Do not show sensitive infos + // Do not show sensitive infos if ( $this->user->isAdmin() ) { $r .= "</tr><tr>\n"; $r .= $this->showfield($lang['AdminDBHost']); @@ -136,7 +136,7 @@ * prepare */ Function prepare() { - global $msg,$lang; + global $msg,$lang,$tutos; $this->name = $lang['DBDetail']; Modified: trunk/php/db.p3 =================================================================== --- trunk/php/db.p3 2011-02-21 15:21:32 UTC (rev 41) +++ trunk/php/db.p3 2011-02-21 15:22:13 UTC (rev 42) @@ -515,6 +515,7 @@ $tutos['task_book_state'] = 1; $tutos['task_finish_state'] = 2; +$tutos['pagescript'] = ''; /** * Open the Database */ Modified: trunk/php/file/file_ins.php =================================================================== --- trunk/php/file/file_ins.php 2011-02-21 15:21:32 UTC (rev 41) +++ trunk/php/file/file_ins.php 2011-02-21 15:22:13 UTC (rev 42) @@ -76,7 +76,7 @@ } - leave_insert($dbconn,$gotourl,$msg,$info); + leave_insert($dbconn,'../'.$gotourl,$msg,$info); exit; } @@ -328,7 +328,7 @@ $dbconn->Commit("WORK"); if ( $f->id != -1 ) { - $gotourl = $f->getURL(); + $gotourl = '../'.$f->getURL(); } } Modified: trunk/php/mail.pinc =================================================================== --- trunk/php/mail.pinc 2011-02-21 15:21:32 UTC (rev 41) +++ trunk/php/mail.pinc 2011-02-21 15:22:13 UTC (rev 42) @@ -1600,7 +1600,7 @@ } if ( $from == "" ) { - $msg .= sprintf($lang['Err0034'],$this->from->getLink()) ."<br />\n"; + $msg .= sprintf($lang['Err0034'],$this->from->getFullName()) ."<br />\n"; return $msg; } if ( (($tutos[mailmode] == MAILMODE_SENDMAIL) && !is_executable($tutos[sendmail])) Modified: trunk/php/pdf2.pinc =================================================================== --- trunk/php/pdf2.pinc 2011-02-21 15:21:32 UTC (rev 41) +++ trunk/php/pdf2.pinc 2011-02-21 15:22:13 UTC (rev 42) @@ -14,10 +14,10 @@ if ($tutos[tcpdfpath] != '') { if (!file_exists($tutos['base'] .'/'. $tutos[tcpdfpath].'/tcpdf.php')) { - die ("NO TCPDF support. <br />\nSee \$tutos[tcpdfpath] in config. <br />\nmissing:".$tutos['base'] ."/". $tutos[tcpdfpath].'/fpdf.php'); + die ("NO TCPDF support. <br />\nSee \$tutos[tcpdfpath] in config. <br />\nmissing:".$tutos['base'] ."/". $tutos[tcpdfpath].'/tcpdf.php'); } require_once $tutos['base'] ."/". $tutos[tcpdfpath].'/tcpdf.php'; - require_once $tutos['base'] ."/". $tutos[tcpdfpath].'/config/lang/eng.php'; +# require_once $tutos['base'] ."/". $tutos[tcpdfpath].'/config/lang/eng.php'; } else { return; } @@ -41,7 +41,39 @@ $this->setDisplayMode('fullpage','continuous'); $this->SetCompression(true); $this->SetAutoPageBreak(true,20); + + $this->setTopMargin(20); + $this->setHeaderMargin(0); + $this->setFooterMargin(16); + } + + // Page footer + public function Footer() { + global $current_user,$lang,$tutos; + + $d = new TUTOS_Date_Time(); + //Position at 1.5 cm from bottom + //Arial italic 8 + $this->SetFont('helvetica','I',8); + $this->SetY(-15); + $this->SetX(10); + $this->Cell(0,10,$d->getDateTime(),0,0,'L'); + //Page number + $this->SetX(10); + $this->Cell(0,10,sprintf($lang['pageof'],$this->PageNo(),'{nb}'),0,0,'C'); + // LABEL + $this->SetFont('helvetica','',6); + $this->SetX(10); + $this->Cell(0,10,"generated by TUTOS ".$tutos[version],'T',1,'R',0,"http://www.tutos.org"); + + $this->SetY(-12); + $this->SetX(10); + $this->Cell(0,10,$current_user->getFullName(),0,0,'L'); + + return; + } + } ?> \ No newline at end of file Modified: trunk/php/testmanager/testmanager.pinc =================================================================== --- trunk/php/testmanager/testmanager.pinc 2011-02-21 15:21:32 UTC (rev 41) +++ trunk/php/testmanager/testmanager.pinc 2011-02-21 15:22:13 UTC (rev 42) @@ -648,105 +648,36 @@ $this->read_last_mod(); - - $page = $pdf->page; - $y = $pdf->y; - $ys = $pdf->y; - $x = $pdf->x; - - $maxy = $y; - - $al = array('R','R','L','L','L'); - - $pdf->SetFont('Arial','',8); - $h = 5; - - $pdf->Cell(15,$h, $precnt,'TLR',0,$al[0]); - $maxy = max($y,$pdf->y); - $x += 15; - - - $pdf->x = $x; - $pdf->y = $ys; - $pdf->MultiCell(40,3, myiconv($this->name),'TLR','L'); - if ($page != $pdf->page) { - $ys = 25; - $maxy = $ys; - $page = $pdf->page; - } - $maxy = max($maxy,$pdf->y); - $x += 40; - - $pdf->x = $x; - $pdf->y = $ys; - $pdf->MultiCell(60,3, myiconv($this->steps),'TLR','L'); - if ($page != $pdf->page) { - $ys = 25; - $maxy = $ys; - $page = $pdf->page; - } - $maxy = max($maxy,$pdf->y); - $x += 60; - - $pdf->x = $x; - $pdf->y = $ys; - $pdf->MultiCell(60,3, myiconv($this->expected),'TLR','L'); - if ($page != $pdf->page) { - $ys = 25; - $maxy = $ys; - $page = $pdf->page; - } - $maxy = max($maxy,$pdf->y); - $x += 60; - - $pdf->x = $x; - $pdf->y = $ys; if ($this->activ == 1) { $n = $lang['TestcaseResults'][$this->result]; if (isset($this->lastmod[0])) { $i = $this->lastmod[0]; - $n .= "\r\n\r\n".sprintf($lang['TestrunLastMod'], - $lang['TestcaseResults'][$i['new']], - $i['date']->getDateTime(), - $i['user']->getFullName()); + $n .= "<br />".sprintf($lang['TestrunLastMod'], + $lang['TestcaseResults'][$i['new']], + $i['date']->getDateTime(), + $i['user']->getFullName()); } } else { $n = ''; } - $pdf->MultiCell(40,$h,$n,'TLR','C'); - if ($page != $pdf->page) { - $ys = 25; - $maxy = $ys; - $page = $pdf->page; - } - $maxy = max($maxy,$pdf->y); - $x += 40; - $pdf->x = $x; - $pdf->y = $ys; - $pdf->MultiCell(0,$h, myiconv($this->comment),'TLR','L'); - if ($page != $pdf->page) { - $ys = 25; - $maxy = $ys; - $page = $pdf->page; - } - $maxy = max($maxy,$pdf->y); - $x += 65; - - $pdf->Line(10,$ys,10,$maxy); - $pdf->Line(25,$ys,25,$maxy); - $pdf->Line(65,$ys,65,$maxy); - $pdf->Line(125,$ys,125,$maxy); - $pdf->Line(185,$ys,185,$maxy); - $pdf->Line(225,$ys,225,$maxy); - $pdf->Line($pdf->w-$pdf->rMargin,$ys,$pdf->w-$pdf->rMargin,$maxy); - - $pdf->Line(10,$maxy,$pdf->w-$pdf->rMargin,$maxy); - - $pdf->x = $x; - - $pdf->ln(); - $pdf->y = $maxy; + $name = preg_replace('#\n#','<br />',$this->name); + $s = preg_replace('#\n#','<br />',$this->steps); + $s = imgReplace($s,$this,true); + $e = preg_replace('#\n#','<br />',$this->expected); + $e = imgReplace($e,$this,true); + $c = preg_replace('#\n#','<br />',$this->comment); + $tbl = ' +<tr> +<td width="50">'.$precnt.'</td> +<td width="130">'.$name.'</td> +<td width="130">'.$s.'</td> +<td width="130">'.$e.'</td> +<td width="130">'.$n.'</td> +<td width="130">'.$c.'</td> +</tr> +'; + return $tbl; } /** @@ -1566,49 +1497,59 @@ function fillPDF(tutospdf $pdf,$precnt = '') { global $lang; - $pdf->setFillColor(210,210,210); - // put out some header - $cnt = 1; - if ($precnt == '') $precnt = $cnt; - $h = 8; - $border = "LRB"; - $al = array('R','R','L','L','L'); + $pdf->SetFont('times', '', 10); - $pdf->SetFont('Arial','B',10); - $pdf->Cell(15,12,$precnt,1,0,'R',1); - $pdf->Cell(0,12,myiconv($this->name),1,0,'C',1); - $pdf->ln(14); - $pdf->SetFont('Arial','',8); - $pdf->MultiCell(0,3,myiconv($this->desc)); - $pdf->ln(); - // first go over all testcases testcase::obj_read($this); - // define and print headline + $name = preg_replace('#\n#','<br />',$this->name); + $desc = preg_replace('#\n#','<br />',$this->desc); + $desc = imgReplace($desc,$this,true); + + $tbl = ' +<table border ="0" cellpadding="2"> + <tr> + <td width="50" align="right"><h2><b>'.$precnt.'</b></h2></td> + <td width="650" align="left"><h2><b>'.$name.'</b></h2></td> + </tr> + <tr> + <td width="50" align="right"> </td> + <td width="650">'.$desc.'</td> + </tr> +</table> +'; + $pdf->writeHTML($tbl, true, false, false, false, ''); + + $tbl = '<table border ="1" cellpadding="2">'; if (count($this->list[usetestcase][0]) > 0) { - $pdf->SetFont('Arial','B',10); - $pdf->Cell(15,$h, $precnt,'TBLR',0,'R',1); - $pdf->Cell(40,$h, $lang['TestcaseName'],'TBR',0,'L',1); - $pdf->Cell(60,$h, $lang['TestcaseSteps'],'TBR',0,'L',1); - $pdf->Cell(60,$h, $lang['TestcaseExpected'],'TBR',0,'L',1); - $pdf->Cell(40,$h, $lang['TestcaseResult'],'TBR',0,'C',1); - $pdf->Cell(0,$h, $lang['TestcaseComment'],'TBR',0,'L',1); - $pdf->ln(); + // header + $tbl .= ' +<thead> +<tr> +<th align="center" width="50"></th> +<th style="background-color:#BBB" align="center" width="130"><b>'.$lang['TestcaseName'].'</b></th> +<th style="background-color:#BBB" align="center" width="130"><b>'.$lang['TestcaseSteps'].'</b></th> +<th style="background-color:#BBB" align="center" width="130"><b>'.$lang['TestcaseExpected'].'</b></th> +<th style="background-color:#BBB" align="center" width="130"><b>'.$lang['TestcaseResult'].'</b></th> +<th style="background-color:#BBB" align="center" width="130"><b>'.$lang['TestcaseComment'].'</b></th> +</tr> +</thead> +'; } foreach($this->list[usetestcase][0] as $tc) { - $tc->fillPDF($pdf,$precnt.'.'.$cnt); + $tbl .= $tc->fillPDF($pdf,$precnt.'.'.$cnt); $cnt++; } - // second go over all sub testsuites - - $pdf->ln(); + if (count($this->list[usetestcase][0]) > 0) { + $tbl .= '</table>'; + $pdf->writeHTML($tbl, true, false, false, false, ''); + $pdf->ln(3); + } testsuite::obj_read($this); foreach($this->list[usetestsuite][0] as $ts) { - $pdf->addPage(); $ts->fillPDF($pdf,$precnt.'.'.$cnt); $cnt++; } @@ -2544,26 +2485,28 @@ $sum += $f; } - $pdf->SetFont('Arial','B',8); + $tbl = ' +'; + $pdf->SetFont('times','B',8); $pdf->Cell(35,0,myiconv($lang['TestrunState'])); - $pdf->SetFont('Arial','',8); + $pdf->SetFont('times','',8); $pdf->Cell(145,0,myiconv($lang['TestrunStates'][$this->state])); $pdf->ln(6); // URL - $pdf->SetFont('Arial','B',8); + $pdf->SetFont('times','B',8); $pdf->Cell(35,0,myiconv($lang['URL'])); - $pdf->SetFont('Arial','',8); + $pdf->SetFont('times','',8); $pdf->Cell(145,0,dirname(getBaseUrl()).'/'.$this->getUrl()); $pdf->ln(6); // Signature Line - $pdf->SetFont('Arial','B',8); + $pdf->SetFont('times','B',8); $pdf->Cell(45,0,myiconv($lang['AdrName'])); $pdf->Cell(45,0,myiconv($lang['AdrEmail'])); $pdf->Cell(65,0,myiconv($lang['TestrunSignature'])); $pdf->Cell(45,0,myiconv($lang['Date'])); $pdf->ln(5); - $pdf->SetFont('Arial','',7); + $pdf->SetFont('times','',7); foreach(array_unique($this->run->statarr[4]) as $i => $j ) { if (is_object($j)) { $pdf->Cell(45,0,myiconv($j->getFullName())); @@ -2576,10 +2519,10 @@ $pdf->ln(2); // Stats - $pdf->SetFont('Arial','B',8); + $pdf->SetFont('times','B',8); $pdf->Cell(35,0,myiconv($lang['TestrunStats'].':')); $pdf->ln(5); - $pdf->SetFont('Arial','',7); + $pdf->SetFont('times','',7); foreach($this->run->statarr[0] as $i => $f) { $pdf->Cell(45,0,myiconv($lang['TestcaseResults'][$i])); $pdf->Cell(15,0,myiconv($f)); @@ -2588,13 +2531,15 @@ } $pdf->ln(2); + testsuite::obj_read($this); $cnt = 1; + $pdf->ln(3); foreach($this->list[usetestsuite][0] as $ts) { - # $pdf->addPage(); $ts->fillPDF($pdf,$precnt.$cnt); $cnt++; } + } /** @@ -2758,4 +2703,4 @@ $tutos['classes'][usetestsuite] = 'Testsuite'; $tutos['classes'][usetestcase] = 'Testcase'; $tutos['classes'][usetestrun] = 'Testrun'; -?> +?> \ No newline at end of file Modified: trunk/php/testmanager/testrun_show.php =================================================================== --- trunk/php/testmanager/testrun_show.php 2011-02-21 15:21:32 UTC (rev 41) +++ trunk/php/testmanager/testrun_show.php 2011-02-21 15:22:13 UTC (rev 42) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2000 - 2010 by Gero Kohnert + * Copyright 2000 - 2011 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -14,7 +14,7 @@ ini_set("include_path",".."); require_once 'webelements.p3'; require_once 'permission.p3'; -require_once 'pdf.pinc'; +require_once 'pdf2.pinc'; // Check if user is allowed to use it @@ -179,14 +179,20 @@ $pdf->setAuthor(myiconv($this->obj->creator->getFullName())); $pdf->setTitle(myiconv($this->obj->getFullName())); $pdf->setSubject(myiconv($this->obj->getFullName())); + $pdf->setKeywords('Testrun'); - $pdf->headtitle = myiconv($lang[$this->obj->getType()] .':'. $this->obj->getFullName()); + $pdf->SetFont('times', '', 10); + $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); + $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); + $pdf->SetHeaderData($tutos['base'].'/../'.$tutos[logo],15,$lang[$this->obj->getType()],$this->obj->getFullName()); + # $pdf->headtitle = $lang[$this->obj->getType()].' '.$this->obj->getFullName(); + $pdf->AddPage(); $this->obj->fillPDF($pdf); + $data = $pdf->Output('','S'); $pdf->Close(); - $data = $pdf->buffer; Header("Content-Type: application/pdf"); if(headers_sent()) { Fatal_Error('Some data has already been output to browser, can\'t send PDF file'); @@ -194,7 +200,7 @@ Header('Content-Disposition: inline; filename="'. $this->obj->name .'_'.Date('YmdHi').'.pdf"'); Header("Content-Description: Upload from TUTOS" ); Header('Content-Length: '.strlen($data)); - header("Expires: 0"); + header("Expires: -1"); header("Cache-Control: must-revalidate, post-check=0,pre-check=0"); header("Pragma: public"); return $data; @@ -415,5 +421,5 @@ ?> <!-- SVN Info $Id$ - $Author$ - --> \ No newline at end of file +$Author$ +--> \ No newline at end of file Modified: trunk/php/testmanager/testsuite_show.php =================================================================== --- trunk/php/testmanager/testsuite_show.php 2011-02-21 15:21:32 UTC (rev 41) +++ trunk/php/testmanager/testsuite_show.php 2011-02-21 15:22:13 UTC (rev 42) @@ -19,7 +19,7 @@ ini_set("include_path",".."); require_once 'webelements.p3'; require_once 'permission.p3'; -require_once 'pdf.pinc'; +require_once 'pdf2.pinc'; // Check if user is allowed to use it @@ -133,14 +133,18 @@ $pdf->setAuthor(myiconv($this->obj->creator->getFullName())); $pdf->setTitle(myiconv($this->obj->getFullName())); $pdf->setSubject(myiconv($this->obj->getFullName())); + $pdf->setKeywords('Testsuite'); - $pdf->headtitle = myiconv($lang[$this->obj->getType()] .":". $this->obj->getFullName()); + $pdf->SetFont('times', '', 10); + $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); + $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); + $pdf->SetHeaderData($tutos['base'].'/../'.$tutos[logo],15,$lang[$this->obj->getType()],$this->obj->getFullName()); $pdf->AddPage(); $this->obj->fillPDF($pdf); + $data = $pdf->Output('','S'); $pdf->Close(); - $data = $pdf->buffer; Header("Content-Type: application/pdf"); if(headers_sent()) { Fatal_Error('Some data has already been output to browser, can\'t send PDF file'); @@ -148,7 +152,7 @@ Header('Content-Disposition: inline; filename="'. $this->obj->name.'_'.Date('YmdHi').'.pdf"'); Header("Content-Description: Upload from TUTOS" ); Header('Content-Length: '.strlen($data)); - header("Expires: 0"); + header("Expires: -1"); header("Cache-Control: must-revalidate, post-check=0,pre-check=0"); header("Pragma: public"); return $data; Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2011-02-21 15:21:32 UTC (rev 41) +++ trunk/php/webelements.p3 2011-02-21 15:22:13 UTC (rev 42) @@ -422,7 +422,7 @@ case 'integer': case 'double': $msg .= $a; - break; + break; case 'object': if ($a instanceof tutos_base) { $msg .= '<'.$a->getType().'>'; @@ -799,7 +799,7 @@ /** * substitute image tags with links */ -Function imgReplace($n,&$obj) { +Function imgReplace($n,&$obj,$deref = false) { global $tutos; if(!class_exists('tutos_file')) { return $n; @@ -823,9 +823,16 @@ $u2 = addUrlParameter($u1,'format=show',true); $s[] = '/(@IMG)(.*)\s+["]?'.preg_quote(trim($x->getFullName()),'/').'["]?\s*@/im'; $s[] = '/(@IMG)(.*)\s+["]?'.preg_quote('#'.$x->id,'/').'["]?\s*@/im'; - $xx = '<img $2 border="1" src="'.$u2.'" alt="'.myentities(trim($x->getFullName())).'" />'; - $r[] = '<a href="'.$u2.'">'.$xx.'</a>'; - $r[] = '<a href="'.$u2.'">'.$xx.'</a>'; + if ($deref) { + $u2 = $tutos['base'].'/'.$x->dbconn->db->repository.'/'.$x->fileloc; + $xx = '<img $2 border="0" src="'.$u2.'" />'; + $r[] = $xx; + $r[] = $xx; + } else { + $xx = '<img $2 border="1" src="'.$u2.'" alt="'.myentities(trim($x->getFullName())).'" />'; + $r[] = '<a href="'.$u2.'">'.$xx.'</a>'; + $r[] = '<a href="'.$u2.'">'.$xx.'</a>'; + } } $n = preg_replace($s,$r,$n); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-02-21 15:21:43
|
Revision: 41 http://tutos.svn.sourceforge.net/tutos/?rev=41&view=rev Author: gokohnert Date: 2011-02-21 15:21:32 +0000 (Mon, 21 Feb 2011) Log Message: ----------- added tcpdf support Added Paths: ----------- trunk/libs/tcpdf/ trunk/libs/tcpdf/LICENSE.TXT trunk/libs/tcpdf/README.TXT trunk/libs/tcpdf/config/ trunk/libs/tcpdf/config/tcpdf_config.php trunk/libs/tcpdf/fonts/ trunk/libs/tcpdf/fonts/README.TXT trunk/libs/tcpdf/fonts/almohanad.ctg.z trunk/libs/tcpdf/fonts/almohanad.php trunk/libs/tcpdf/fonts/almohanad.z trunk/libs/tcpdf/fonts/arialunicid0.php trunk/libs/tcpdf/fonts/chinese.php trunk/libs/tcpdf/fonts/courier.php trunk/libs/tcpdf/fonts/dejavu-fonts-ttf-2.32/ trunk/libs/tcpdf/fonts/dejavu-fonts-ttf-2.32/AUTHORS trunk/libs/tcpdf/fonts/dejavu-fonts-ttf-2.32/BUGS trunk/libs/tcpdf/fonts/dejavu-fonts-ttf-2.32/LICENSE trunk/libs/tcpdf/fonts/dejavu-fonts-ttf-2.32/NEWS trunk/libs/tcpdf/fonts/dejavu-fonts-ttf-2.32/README trunk/libs/tcpdf/fonts/dejavu-fonts-ttf-2.32/langcover.txt trunk/libs/tcpdf/fonts/dejavu-fonts-ttf-2.32/status.txt trunk/libs/tcpdf/fonts/dejavu-fonts-ttf-2.32/unicover.txt trunk/libs/tcpdf/fonts/dejavusans.ctg.z trunk/libs/tcpdf/fonts/dejavusans.php trunk/libs/tcpdf/fonts/dejavusans.z trunk/libs/tcpdf/fonts/dejavusansb.ctg.z trunk/libs/tcpdf/fonts/dejavusansb.php trunk/libs/tcpdf/fonts/dejavusansb.z trunk/libs/tcpdf/fonts/dejavusansbi.ctg.z trunk/libs/tcpdf/fonts/dejavusansbi.php trunk/libs/tcpdf/fonts/dejavusansbi.z trunk/libs/tcpdf/fonts/dejavusanscondensed.ctg.z trunk/libs/tcpdf/fonts/dejavusanscondensed.php trunk/libs/tcpdf/fonts/dejavusanscondensed.z trunk/libs/tcpdf/fonts/dejavusanscondensedb.ctg.z trunk/libs/tcpdf/fonts/dejavusanscondensedb.php trunk/libs/tcpdf/fonts/dejavusanscondensedb.z trunk/libs/tcpdf/fonts/dejavusanscondensedbi.ctg.z trunk/libs/tcpdf/fonts/dejavusanscondensedbi.php trunk/libs/tcpdf/fonts/dejavusanscondensedbi.z trunk/libs/tcpdf/fonts/dejavusanscondensedi.ctg.z trunk/libs/tcpdf/fonts/dejavusanscondensedi.php trunk/libs/tcpdf/fonts/dejavusanscondensedi.z trunk/libs/tcpdf/fonts/dejavusansextralight.ctg.z trunk/libs/tcpdf/fonts/dejavusansextralight.php trunk/libs/tcpdf/fonts/dejavusansextralight.z trunk/libs/tcpdf/fonts/dejavusansi.ctg.z trunk/libs/tcpdf/fonts/dejavusansi.php trunk/libs/tcpdf/fonts/dejavusansi.z trunk/libs/tcpdf/fonts/dejavusansmono.ctg.z trunk/libs/tcpdf/fonts/dejavusansmono.php trunk/libs/tcpdf/fonts/dejavusansmono.z trunk/libs/tcpdf/fonts/dejavusansmonob.ctg.z trunk/libs/tcpdf/fonts/dejavusansmonob.php trunk/libs/tcpdf/fonts/dejavusansmonob.z trunk/libs/tcpdf/fonts/dejavusansmonobi.ctg.z trunk/libs/tcpdf/fonts/dejavusansmonobi.php trunk/libs/tcpdf/fonts/dejavusansmonobi.z trunk/libs/tcpdf/fonts/dejavusansmonoi.ctg.z trunk/libs/tcpdf/fonts/dejavusansmonoi.php trunk/libs/tcpdf/fonts/dejavusansmonoi.z trunk/libs/tcpdf/fonts/dejavuserif.ctg.z trunk/libs/tcpdf/fonts/dejavuserif.php trunk/libs/tcpdf/fonts/dejavuserif.z trunk/libs/tcpdf/fonts/dejavuserifb.ctg.z trunk/libs/tcpdf/fonts/dejavuserifb.php trunk/libs/tcpdf/fonts/dejavuserifb.z trunk/libs/tcpdf/fonts/dejavuserifbi.ctg.z trunk/libs/tcpdf/fonts/dejavuserifbi.php trunk/libs/tcpdf/fonts/dejavuserifbi.z trunk/libs/tcpdf/fonts/dejavuserifcondensed.ctg.z trunk/libs/tcpdf/fonts/dejavuserifcondensed.php trunk/libs/tcpdf/fonts/dejavuserifcondensed.z trunk/libs/tcpdf/fonts/dejavuserifcondensedb.ctg.z trunk/libs/tcpdf/fonts/dejavuserifcondensedb.php trunk/libs/tcpdf/fonts/dejavuserifcondensedb.z trunk/libs/tcpdf/fonts/dejavuserifcondensedbi.ctg.z trunk/libs/tcpdf/fonts/dejavuserifcondensedbi.php trunk/libs/tcpdf/fonts/dejavuserifcondensedbi.z trunk/libs/tcpdf/fonts/dejavuserifcondensedi.ctg.z trunk/libs/tcpdf/fonts/dejavuserifcondensedi.php trunk/libs/tcpdf/fonts/dejavuserifcondensedi.z trunk/libs/tcpdf/fonts/dejavuserifi.ctg.z trunk/libs/tcpdf/fonts/dejavuserifi.php trunk/libs/tcpdf/fonts/dejavuserifi.z trunk/libs/tcpdf/fonts/freefont-20100919/ trunk/libs/tcpdf/fonts/freefont-20100919/AUTHORS trunk/libs/tcpdf/fonts/freefont-20100919/COPYING trunk/libs/tcpdf/fonts/freefont-20100919/CREDITS trunk/libs/tcpdf/fonts/freefont-20100919/ChangeLog trunk/libs/tcpdf/fonts/freefont-20100919/INSTALL trunk/libs/tcpdf/fonts/freefont-20100919/README trunk/libs/tcpdf/fonts/freemono.ctg.z trunk/libs/tcpdf/fonts/freemono.php trunk/libs/tcpdf/fonts/freemono.z trunk/libs/tcpdf/fonts/freemonob.ctg.z trunk/libs/tcpdf/fonts/freemonob.php trunk/libs/tcpdf/fonts/freemonob.z trunk/libs/tcpdf/fonts/freemonobi.ctg.z trunk/libs/tcpdf/fonts/freemonobi.php trunk/libs/tcpdf/fonts/freemonobi.z trunk/libs/tcpdf/fonts/freemonoi.ctg.z trunk/libs/tcpdf/fonts/freemonoi.php trunk/libs/tcpdf/fonts/freemonoi.z trunk/libs/tcpdf/fonts/freesans.ctg.z trunk/libs/tcpdf/fonts/freesans.php trunk/libs/tcpdf/fonts/freesans.z trunk/libs/tcpdf/fonts/freesansb.ctg.z trunk/libs/tcpdf/fonts/freesansb.php trunk/libs/tcpdf/fonts/freesansb.z trunk/libs/tcpdf/fonts/freesansbi.ctg.z trunk/libs/tcpdf/fonts/freesansbi.php trunk/libs/tcpdf/fonts/freesansbi.z trunk/libs/tcpdf/fonts/freesansi.ctg.z trunk/libs/tcpdf/fonts/freesansi.php trunk/libs/tcpdf/fonts/freesansi.z trunk/libs/tcpdf/fonts/freeserif.ctg.z trunk/libs/tcpdf/fonts/freeserif.php trunk/libs/tcpdf/fonts/freeserif.z trunk/libs/tcpdf/fonts/freeserifb.ctg.z trunk/libs/tcpdf/fonts/freeserifb.php trunk/libs/tcpdf/fonts/freeserifb.z trunk/libs/tcpdf/fonts/freeserifbi.ctg.z trunk/libs/tcpdf/fonts/freeserifbi.php trunk/libs/tcpdf/fonts/freeserifbi.z trunk/libs/tcpdf/fonts/freeserifi.ctg.z trunk/libs/tcpdf/fonts/freeserifi.php trunk/libs/tcpdf/fonts/freeserifi.z trunk/libs/tcpdf/fonts/helvetica.php trunk/libs/tcpdf/fonts/helveticab.php trunk/libs/tcpdf/fonts/helveticabi.php trunk/libs/tcpdf/fonts/helveticai.php trunk/libs/tcpdf/fonts/hysmyeongjostdmedium.php trunk/libs/tcpdf/fonts/kozgopromedium.php trunk/libs/tcpdf/fonts/kozminproregular.php trunk/libs/tcpdf/fonts/msungstdlight.php trunk/libs/tcpdf/fonts/stsongstdlight.php trunk/libs/tcpdf/fonts/symbol.php trunk/libs/tcpdf/fonts/times.php trunk/libs/tcpdf/fonts/timesb.php trunk/libs/tcpdf/fonts/timesbi.php trunk/libs/tcpdf/fonts/timesi.php trunk/libs/tcpdf/fonts/uni2cid_ac15.php trunk/libs/tcpdf/fonts/uni2cid_ag15.php trunk/libs/tcpdf/fonts/uni2cid_aj16.php trunk/libs/tcpdf/fonts/uni2cid_ak12.php trunk/libs/tcpdf/fonts/utils/ trunk/libs/tcpdf/fonts/utils/README.TXT trunk/libs/tcpdf/fonts/utils/enc/ trunk/libs/tcpdf/fonts/utils/enc/cp1250.map trunk/libs/tcpdf/fonts/utils/enc/cp1251.map trunk/libs/tcpdf/fonts/utils/enc/cp1252.map trunk/libs/tcpdf/fonts/utils/enc/cp1253.map trunk/libs/tcpdf/fonts/utils/enc/cp1254.map trunk/libs/tcpdf/fonts/utils/enc/cp1255.map trunk/libs/tcpdf/fonts/utils/enc/cp1257.map trunk/libs/tcpdf/fonts/utils/enc/cp1258.map trunk/libs/tcpdf/fonts/utils/enc/cp874.map trunk/libs/tcpdf/fonts/utils/enc/iso-8859-1.map trunk/libs/tcpdf/fonts/utils/enc/iso-8859-11.map trunk/libs/tcpdf/fonts/utils/enc/iso-8859-15.map trunk/libs/tcpdf/fonts/utils/enc/iso-8859-16.map trunk/libs/tcpdf/fonts/utils/enc/iso-8859-2.map trunk/libs/tcpdf/fonts/utils/enc/iso-8859-4.map trunk/libs/tcpdf/fonts/utils/enc/iso-8859-5.map trunk/libs/tcpdf/fonts/utils/enc/iso-8859-7.map trunk/libs/tcpdf/fonts/utils/enc/iso-8859-9.map trunk/libs/tcpdf/fonts/utils/enc/koi8-r.map trunk/libs/tcpdf/fonts/utils/enc/koi8-u.map trunk/libs/tcpdf/fonts/utils/freetype6.dll trunk/libs/tcpdf/fonts/utils/makeallttffonts.php trunk/libs/tcpdf/fonts/utils/makefont.php trunk/libs/tcpdf/fonts/utils/pfm2afm trunk/libs/tcpdf/fonts/utils/pfm2afm.exe trunk/libs/tcpdf/fonts/utils/src/ trunk/libs/tcpdf/fonts/utils/src/pfm2afm-src.tar.gz trunk/libs/tcpdf/fonts/utils/src/readme.txt trunk/libs/tcpdf/fonts/utils/src/ttf2ufm-src.tar.gz trunk/libs/tcpdf/fonts/utils/ttf2ufm trunk/libs/tcpdf/fonts/utils/ttf2ufm.exe trunk/libs/tcpdf/fonts/utils/zlib1.dll trunk/libs/tcpdf/fonts/zapfdingbats.php trunk/libs/tcpdf/fonts/zarbold.ctg.z trunk/libs/tcpdf/fonts/zarbold.php trunk/libs/tcpdf/fonts/zarbold.z trunk/libs/tcpdf/htmlcolors.php trunk/libs/tcpdf/tcpdf.php trunk/libs/tcpdf/unicode_data.php Added: trunk/libs/tcpdf/LICENSE.TXT =================================================================== --- trunk/libs/tcpdf/LICENSE.TXT (rev 0) +++ trunk/libs/tcpdf/LICENSE.TXT 2011-02-21 15:21:32 UTC (rev 41) @@ -0,0 +1,860 @@ +********************************************************************** +* TCPDF LICENSE +********************************************************************** + + TCPDF is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. Additionally, + YOU CAN'T REMOVE ANY TCPDF COPYRIGHT NOTICE OR LINK FROM THE + GENERATED PDF DOCUMENTS. + +********************************************************************** +********************************************************************** + + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <" rel="nofollow">http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. + +********************************************************************** +********************************************************************** + + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <" rel="nofollow">http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <." rel="nofollow">http://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (C) <year> <name of author> + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<." rel="nofollow">http://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<." rel="nofollow">http://www.gnu.org/philosophy/why-not-lgpl.html>. + +********************************************************************** +********************************************************************** Added: trunk/libs/tcpdf/README.TXT =================================================================== --- trunk/libs/tcpdf/README.TXT (rev 0) +++ trunk/libs/tcpdf/README.TXT 2011-02-21 15:21:32 UTC (rev 41) @@ -0,0 +1,90 @@ +TCPDF - README +============================================================ + +I WISH TO IMPROVE AND EXPAND TCPDF BUT I NEED YOUR SUPPORT. +PLEASE MAKE A DONATION: +http://sourceforge.net/donate/index.php?group_id=128076 + +------------------------------------------------------------ + +Name: TCPDF +Version: 5.9.055 +Release date: 2011-02-17 +Author: Nicola Asuni + +Copyright (c) 2002-2011: + Nicola Asuni + Tecnick.com s.r.l. + Via Della Pace, 11 + 09044 Quartucciu (CA) + ITALY + www.tecnick.com + +URLs: + http: www.tcpdf.org + http: www.sourceforge.net/projects/tcpdf + +Description: + TCPDF is a PHP class for generating PDF files on-the-fly without requiring external extensions. + +Main Features: + * no external libraries are required for the basic functions; + * all standard page formats, custom page formats, custom margins and units of measure; + * UTF-8 Unicode and Right-To-Left languages; + * TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts; + * font subsetting; + * methods to publish some XHTML + CSS code, Javascript and Forms; + * images, graphic (geometric figures) and transformation methods; + * supports JPEG, PNG and SVG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http: www.imagemagick.org/www/formats.html) + * 1D and 2D barcodes: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS, QR-Code, PDF417; + * Grayscale, RGB, CMYK, Spot Colors and Transparencies; + * automatic page header and footer management; + * document encryption up to 256 bit and digital signature certifications; + * transactions to UNDO commands; + * PDF annotations, including links, text and file attachments; + * text rendering modes (fill, stroke and clipping); + * multiple columns mode; + * no-write page regions; + * bookmarks and table of content; + * text hyphenation; + * text stretching and spacing (tracking/kerning); + * automatic page break, line break and text alignments including justification; + * automatic page numbering and page groups; + * move and delete pages; + * page compression (requires php-zlib extension); + * XOBject Templates; + +Installation (full instructions on http: www.tcpdf.org): + 1. copy the folder on your Web server + 2. set your installation path and other parameters on the config/tcpdf_config.php + 3. call the examples/example_001.php page with your browser to see an example + +Source Code Documentation: + doc/index.html + http://www.tcpdf.org/doc/ + +For Additional Documentation: + http: www.tcpdf.org + +License + Copyright (C) 2002-2011 Nicola Asuni - Tecnick.com S.r.l. + + TCPDF is free software: you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. Additionally, + YOU CAN'T REMOVE ANY TCPDF COPYRIGHT NOTICE OR LINK FROM THE + GENERATED PDF DOCUMENTS. + + TCPDF is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the License + along with TCPDF. If not, see + <." rel="nofollow">http://www.tecnick.com/pagefiles/tcpdf/LICENSE.TXT>. + + See LICENSE.TXT file for more information. + +============================================================ Added: trunk/libs/tcpdf/config/tcpdf_config.php =================================================================== --- trunk/libs/tcpdf/config/tcpdf_config.php (rev 0) +++ trunk/libs/tcpdf/config/tcpdf_config.php 2011-02-21 15:21:32 UTC (rev 41) @@ -0,0 +1,240 @@ +<?php +//============================================================+ +// File name : tcpdf_config.php +// Begin : 2004-06-11 +// Last Update : 2010-12-16 +// +// Description : Configuration file for TCPDF. +// +// Author: Nicola Asuni +// +// (c) Copyright: +// Nicola Asuni +// Tecnick.com s.r.l. +// Via Della Pace, 11 +// 09044 Quartucciu (CA) +// ITALY +// www.tecnick.com +// in...@te... +//============================================================+ + +/** + * Configuration file for TCPDF. + * @author Nicola Asuni + * @package com.tecnick.tcpdf + * @version 4.9.005 + * @since 2004-10-27 + */ + +// If you define the constant K_TCPDF_EXTERNAL_CONFIG, the following settings will be ignored. + +if (!defined('K_TCPDF_EXTERNAL_CONFIG')) { + + // DOCUMENT_ROOT fix for IIS Webserver + if ((!isset($_SERVER['DOCUMENT_ROOT'])) OR (empty($_SERVER['DOCUMENT_ROOT']))) { + if(isset($_SERVER['SCRIPT_FILENAME'])) { + $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF']))); + } elseif(isset($_SERVER['PATH_TRANSLATED'])) { + $_SERVER['DOCUMENT_ROOT'] = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF']))); + } else { + // define here your DOCUMENT_ROOT path if the previous fails + $_SERVER['DOCUMENT_ROOT'] = '/var/www'; + } + } + + // Automatic calculation for the following K_PATH_MAIN constant + $k_path_main = str_replace( '\\', '/', realpath(substr(dirname(__FILE__), 0, 0-strlen('config')))); + if (substr($k_path_main, -1) != '/') { + $k_path_main .= '/'; + } + + /** + * Installation path (/var/www/tcpdf/). + * By default it is automatically calculated but you can also set it as a fixed string to improve performances. + */ + define ('K_PATH_MAIN', $k_path_main); + + // Automatic calculation for the following K_PATH_URL constant + $k_path_url = $k_path_main; // default value for console mode + if (isset($_SERVER['HTTP_HOST']) AND (!empty($_SERVER['HTTP_HOST']))) { + if(isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND strtolower($_SERVER['HTTPS'])!='off') { + $k_path_url = 'https://'; + } else { + $k_path_url = 'http://'; + } + $k_path_url .= $_SERVER['HTTP_HOST']; + $k_path_url .= str_replace( '\\', '/', substr(K_PATH_MAIN, (strlen($_SERVER['DOCUMENT_ROOT']) - 1))); + } + + /** + * URL path to tcpdf installation folder (http://localhost/tcpdf/). + * By default it is automatically ... [truncated message content] |
From: <gok...@us...> - 2011-02-20 19:44:45
|
Revision: 40 http://tutos.svn.sourceforge.net/tutos/?rev=40&view=rev Author: gokohnert Date: 2011-02-20 19:44:39 +0000 (Sun, 20 Feb 2011) Log Message: ----------- disable autocomplete on ajax fields Modified Paths: -------------- trunk/html/js/tutos.js trunk/php/webelements.p3 Modified: trunk/html/js/tutos.js =================================================================== --- trunk/html/js/tutos.js 2011-02-20 09:16:38 UTC (rev 39) +++ trunk/html/js/tutos.js 2011-02-20 19:44:39 UTC (rev 40) @@ -386,7 +386,10 @@ var all = TUTOSxml.getElementsByTagName("tutos")[0]; - document.getElementById(name+"-popup").innerHTML = name +"..."+ all + "..."; + $('#'+name+'-popup').html('...'+all+'...'); + $('#'+name).attr('autocomplete','off'); + $('#'+name+'fn').attr('autocomplete','off'); + // document.getElementById(name+"-popup").innerHTML = name +"..."+ all + "..."; // Check that a more recent document hasn't been processed // already Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2011-02-20 09:16:38 UTC (rev 39) +++ trunk/php/webelements.p3 2011-02-20 19:44:39 UTC (rev 40) @@ -1774,16 +1774,16 @@ $js .= " "EnableInputField('".$name."')\""; if ( is_object($sobj) && isset($sobj->id) && $sobj->id > 0 ) { // a field that represents a TUTOS object - $r .= '<input class="infoonly" readonly="readonly" id="'. $name .'" size="'.$size.'" maxlength="'.max(40,$size).'" name="_XX_'. $name .'fn" value="'. myentities($sobj->getFullname()) .'" '.$js.' />'; - $r .= '<input type="hidden" id="'.$name.'id" name="'.$name.'id" value="'.$sobj->id.'"/>'; + $r .= '<input autocomplete="off" class="infoonly" readonly="readonly" id="'. $name .'" size="'.$size.'" maxlength="'.max(40,$size).'" name="_XX_'. $name .'fn" value="'. myentities($sobj->getFullname()) .'" '.$js.' />'; + $r .= '<input autocomplete="off" type="hidden" id="'.$name.'id" name="'.$name.'id" value="'.$sobj->id.'"/>'; } else { // a field just filled with a string or nothing // no id is given or available if ( ! isset($obj->xfn[$name]) ) { $obj->xfn[$name] = ''; } - $r .= '<input id="'. $name .'" size="'.$size.'" maxlength="'.max(40,$size).'" name="'. $name .'fn" value="'. myentities($obj->xfn[$name]) .'" '. $js .' />'; - $r .= '<input type="hidden" id="'.$name.'id" name="_XX_'.$name.'id" value="-1"/>'; + $r .= '<input autocomplete="off" id="'. $name .'" size="'.$size.'" maxlength="'.max(40,$size).'" name="'. $name .'fn" value="'. myentities($obj->xfn[$name]) .'" '. $js .' />'; + $r .= '<input autocomplete="off" type="hidden" id="'.$name.'id" name="_XX_'.$name.'id" value="-1"/>'; } $r .= '<div id="'. $name .'-popup" class="autocomplete"></div>'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-02-20 09:16:44
|
Revision: 39 http://tutos.svn.sourceforge.net/tutos/?rev=39&view=rev Author: gokohnert Date: 2011-02-20 09:16:38 +0000 (Sun, 20 Feb 2011) Log Message: ----------- fix Modified Paths: -------------- trunk/php/expense/mtable.pinc Modified: trunk/php/expense/mtable.pinc =================================================================== --- trunk/php/expense/mtable.pinc 2011-02-20 09:03:09 UTC (rev 38) +++ trunk/php/expense/mtable.pinc 2011-02-20 09:16:38 UTC (rev 39) @@ -51,7 +51,7 @@ 'lang' => 'City', ); $table['expense']['country'] = array(type => 'VARCHAR', size => 3, constraints => '', Desc => 'ISO Country code'); -$table['expense']['quantity'] = array(type => 'float', constraints => 'NN', Desc => 'quantity'); +$table['expense']['quantity'] = array(type => 'float', constraints => '', Desc => 'quantity'); $table['expense']['gamount'] = array(type => 'float', constraints => 'NN', Desc => 'gross amount'); $table['expense']['currency'] = array(type => 'VARCHAR', size => 4, constraints => 'NN', Desc => 'currency for gross amount'); $table['expense']['deduction'] = array(type => 'float', constraints => '', Desc => 'possible deduction'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-02-20 09:03:15
|
Revision: 38 http://tutos.svn.sourceforge.net/tutos/?rev=38&view=rev Author: gokohnert Date: 2011-02-20 09:03:09 +0000 (Sun, 20 Feb 2011) Log Message: ----------- intermediate (not yet finished) expense updates Modified Paths: -------------- trunk/php/expense/de.p3 trunk/php/expense/en.p3 trunk/php/expense/expense.pinc trunk/php/expense/expense_ins.php trunk/php/expense/expense_new.php trunk/php/expense/expense_overview.php trunk/php/expense/mtable.pinc Added Paths: ----------- trunk/php/pdf2.pinc Modified: trunk/php/expense/de.p3 =================================================================== --- trunk/php/expense/de.p3 2011-02-19 21:11:37 UTC (rev 37) +++ trunk/php/expense/de.p3 2011-02-20 09:03:09 UTC (rev 38) @@ -36,6 +36,7 @@ $lang['ExpenseCategory'] = 'Art'; $lang['ExpenseReason'] = 'Anlass'; $lang['ExpensePeople'] = 'Personen'; +$lang['ExpenseQuantity'] = 'Menge'; $lang['ExpenseGAmountAll'] = 'Gesamtbruttobetrag'; $lang['ExpenseGAmount'] = 'Bruttobetrag'; $lang['ExpenseNAmount'] = 'Nettobetrag'; @@ -83,4 +84,4 @@ ### mode:iso-accents *** ### coding:utf-8 *** ### End: *** -?> +?> \ No newline at end of file Modified: trunk/php/expense/en.p3 =================================================================== --- trunk/php/expense/en.p3 2011-02-19 21:11:37 UTC (rev 37) +++ trunk/php/expense/en.p3 2011-02-20 09:03:09 UTC (rev 38) @@ -36,6 +36,7 @@ $lang['ExpenseCategory'] = 'Category'; $lang['ExpenseReason'] = 'Reason'; $lang['ExpensePeople'] = 'People'; +$lang['ExpenseQuantity'] = 'Quantity'; $lang['ExpenseGAmountAll'] = 'Overall Gross Amount'; $lang['ExpenseGAmount'] = 'Gross Amount'; $lang['ExpenseNAmount'] = 'Net Amount'; @@ -83,4 +84,4 @@ ### mode:iso-accents *** ### coding:utf-8 *** ### End: *** -?> +?> \ No newline at end of file Modified: trunk/php/expense/expense.pinc =================================================================== --- trunk/php/expense/expense.pinc 2011-02-19 21:11:37 UTC (rev 37) +++ trunk/php/expense/expense.pinc 2011-02-20 09:03:09 UTC (rev 38) @@ -129,6 +129,7 @@ $this->ref = null; $this->sup_id = -1; $this->supplier = null; + $this->quantity = 1.0; $this->gamount = 0.0; $this->currency = $tutos[currencies][0]; $this->deduction = 0.0; @@ -159,6 +160,7 @@ $this->adr_id = $r->get($pos, 'adr_id'); $this->name = $r->get($pos, 'name'); $this->description = $r->get($pos, "description"); + $this->quantity = $r->get($pos, "quantity"); $this->gamount = $r->get($pos, "gamount"); $this->currency = $r->get($pos, "currency"); $this->deduction = $r->get($pos, "deduction"); @@ -176,6 +178,9 @@ $this->creator = getObject($this->dbconn,$r->get($pos, "creator")); + if ($this->quantity == null) { + $this->quantity = 1.0; + } parent::read_result($r,$pos); return; } @@ -351,7 +356,7 @@ $this->read_reference(); - $n =str_replace("\n","<br />",myentities($this->gamount) .' '. $this->currency); + $n =str_replace("\n","<br />",myentities($this->gamount) .' '. $this->currency.'<br />'.$this->reason); $n =str_replace("\r","",$n); $n =str_replace("\\","\\\\",$n); $n =str_replace("'","\'",$n); @@ -424,13 +429,27 @@ } /** - * get the netamount + * get the gross amount per unit */ + function getGAmountPerUnit() { + return ($this->gamount / $this->quantity); + } + + /** + * get the netamount for all + */ function getNetAmount() { return $this->gamount - $this->getTax() - $this->deduction; } /** + * get the netamount per unit + */ + function getNetAmountPerUnit() { + return ($this->gamount - $this->getTax() - $this->deduction) / $this->quantity; + } + + /** * get the calcualted tax value */ function getTax() { @@ -452,6 +471,13 @@ } /** + * set the expense quantity + */ + function setQuantity($value) { + return $this->setIntField("quantity",$value,"ExpenseQuantity"); + } + + /** * set the expense reason */ function setReason($value) { @@ -625,6 +651,7 @@ $q->addFV("link_id",$this->link_id,"INT"); $q->addFV("adr_id",$this->adr_id,"INT"); $q->addFV("invoice",$this->invoice,"INT"); + $q->addFV("quantity",$this->quantity,"FLOAT"); $q->addFV("gamount",$this->gamount,"FLOAT"); $q->addFV("deduction",$this->deduction,"FLOAT"); $q->addFV("itax",$this->itax,"FLOAT"); Modified: trunk/php/expense/expense_ins.php =================================================================== --- trunk/php/expense/expense_ins.php 2011-02-19 21:11:37 UTC (rev 37) +++ trunk/php/expense/expense_ins.php 2011-02-20 09:03:09 UTC (rev 38) @@ -103,13 +103,24 @@ $u->setInvoice(trim($_POST['invoice'])); $gotourl= addUrlParameter($gotourl,"invoice=". UrlEncode($u->invoice),true); } + + if ( empty($_POST['gamount']) ) { + $msg .= sprintf($lang['Err0009'],$lang['ExpenseQuantity']) ."<br />"; + $gotourl = addBadField($gotourl,'quantity',true); +} else { + $u->setQuantity(trim($_POST['quantity'])); + $gotourl= addUrlParameter($gotourl,"quantity=". UrlEncode($u->quantity),true); +} + +if ( empty($_POST['gamount']) ) { $msg .= sprintf($lang['Err0009'],$lang['ExpenseGAmount']) ."<br />"; $gotourl = addBadField($gotourl,'gamount',true); } else { $u->setGAmount(trim($_POST['gamount'])); $gotourl= addUrlParameter($gotourl,"gamount=". UrlEncode($u->gamount),true); } + if ( isset($_POST['deduction']) ) { $u->setDeduction(trim($_POST['deduction'])); $gotourl= addUrlParameter($gotourl,"deduction=". UrlEncode($u->deduction),true); Modified: trunk/php/expense/expense_new.php =================================================================== --- trunk/php/expense/expense_new.php 2011-02-19 21:11:37 UTC (rev 37) +++ trunk/php/expense/expense_new.php 2011-02-20 09:03:09 UTC (rev 38) @@ -82,32 +82,41 @@ $r .= ' <td colspan="5"><input id="name" size="80" maxlength="'. $table['expense']['name'][size] .'" name="name" value="'. myentities($this->obj->name) ."\" /></td>\n"; $r .= "</tr>\n"; + if (!isset($this->hide['category']) || !$this->hide['category'] ) { + $r .= "<tr>\n"; + $r .= $this->showfieldc($lang['ExpenseCategory'],0,"category"); + $r .= " <td colspan=\"5\">\n"; + $r .= $this->obj->askCategory(); + $r .= " </td>\n"; + $r .= "</tr>\n"; + } else { + $this->addhidden("category",-1); + } $r .= "<tr>\n"; - $r .= $this->showfieldc($lang['ExpenseCategory'],0,"category"); - $r .= " <td>\n"; - #$r .= $this->obj->Category_Select("category",$this->obj->category); - $r .= $this->obj->askCategory(); - $r .= " </td>\n"; - $r .= "</tr>\n"; - - $r .= "<tr>\n"; $r .= $this->showfieldc($lang['ExpenseReason'],0,"reason"); $r .= ' <td colspan="5"><input id="reason" size="80" maxlength="'. $table['expense']['reason'][size] .'" name="reason" value="'. myentities($this->obj->reason) ."\" /></td>\n"; $r .= "</tr>\n"; + if (!isset($this->hide['people']) || !$this->hide['people'] ) { + $r .= "<tr>\n"; + $r .= $this->showfieldc($lang['ExpensePeople'],0,"people"); + $r .= ' <td colspan="5"><textarea id="people" rows="1" cols="60" name="people">'. $this->obj->people ."</textarea></td>\n"; + $r .= "</tr>\n"; + } $r .= "<tr>\n"; - $r .= $this->showfieldc($lang['ExpensePeople'],0,"people"); - $r .= ' <td colspan="5"><textarea id="people" rows="1" cols="60" name="people">'. $this->obj->people ."</textarea></td>\n"; + $r .= $this->showfieldc($lang['ExpenseQuantity'],0,"quantity"); + $check = ""check_all_float(this,'".$lang['DecPoint']."');\""; + $r .= ' <td colspan="5"><input id="quantity" size="10" maxlength="10" name="quantity" '.$check.' value="'. my_number_format($this->obj->quantity,2) ."\" />\n"; $r .= "</tr>\n"; $r .= "<tr>\n"; $r .= $this->showfieldc($lang['ExpenseGAmount'],1,"gamount"); $check = ""check_all_float(this,'".$lang['DecPoint']."');\""; - $r .= ' <td colspan="1"><input id="gamount" size="10" maxlength="10" name="gamount" '. $check.' value="'. my_number_format($this->obj->gamount,2) ."\" />\n"; + $r .= ' <td colspan="2"><input id="gamount" size="10" maxlength="10" name="gamount" '. $check.' value="'. my_number_format($this->obj->gamount,2) ."\" />\n"; $r .= Currency_Select("currency",$this->obj->currency); $r .= " </td>\n"; $r .= $this->showfieldc($lang['ExpenseITax'],0,"itax"); - $r .= " <td>\n"; + $r .= " <td colspan=\"2\">\n"; $r .= TAX_select("itax",$this->obj->itax); $r .= " </td>\n"; $r .= "</tr>\n"; @@ -115,7 +124,7 @@ $r .= "<tr>\n"; $r .= $this->showfieldc($lang['ExpenseDeduction'],0,"deduction"); $check = ""check_all_float(this,'".$lang['DecPoint']."');\""; - $r .= ' <td colspan="1"><input id="deduction" size="10" maxlength="10" name="deduction" '.$check.' value="'. my_number_format($this->obj->deduction,2) ."\" />\n"; + $r .= ' <td colspan="5"><input id="deduction" size="10" maxlength="10" name="deduction" '.$check.' value="'. my_number_format($this->obj->deduction,2) ."\" />\n"; $r .= " </td>\n"; $r .= "</tr>\n"; @@ -124,25 +133,23 @@ $r .= " <td colspan=\"2\">\n"; $r .= $this->obj->t_start->EnterDateTime("t_start"); $r .= " </td>\n"; - $r .= "</tr>\n"; - - $r .= "<tr>\n"; $r .= $this->showfieldc($lang['ExpenseEndTime'],0,"t_end"); $r .= " <td colspan=\"2\">\n"; - #$r .= $this->obj->t_end->EnterDateTime("t_end"); $r .= $this->obj->t_end->EnterDateTime("t_end",1,true); $r .= " </td>\n"; $r .= "</tr>\n"; + if (!isset($this->hide['mop']) || !$this->hide['mop'] ) { + $r .= "<tr>\n"; + $r .= $this->showfieldc($lang['ExpenseMOP'],0,"mop"); + $r .= " <td colspan=\"5\">\n"; + $r .= $this->obj->askMOP(); + $r .= " </td>\n"; + $r .= "</tr>\n"; + } else { + $this->addhidden("mop",-1); + } $r .= "<tr>\n"; - $r .= $this->showfieldc($lang['ExpenseMOP'],0,"mop"); - $r .= " <td>\n"; - #$r .= $this->obj->MOP_Select("mop",$this->obj->mop); - $r .= $this->obj->askMOP(); - $r .= " </td>\n"; - $r .= "</tr>\n"; - - $r .= "<tr>\n"; $r .= $this->showfieldc($lang['City'],0,"city"); $r .= ' <td colspan="5"><input id="city" size="80" maxlength="'. $table['expense']['city'][size] .'" name="city" value="'. myentities($this->obj->city) ."\" /></td>\n"; $r .= "</tr>\n"; @@ -218,20 +225,16 @@ } $this->obj->set_float_from_arg('gamount','gamount',$lang['ExpenseGAmount']); $this->obj->set_float_from_arg('deduction','deduction',$lang['ExpenseDeduction']); + $this->obj->set_float_from_arg('quantity','quantity',$lang['ExpenseQuantity']); + $this->obj->set_float_from_arg('itax','itax',$lang['ExpenseITax']); - if ( isset($_GET['itax']) ){ - $this->obj->itax = $_GET['itax']; - } - if ( isset($_GET['description']) ){ - $this->obj->description = trim($_GET['description']); - } - if ( isset($_GET['name']) ){ - $this->obj->name = trim($_GET['name']); - } - if ( isset($_GET['category']) ){ - $this->obj->category = $_GET['category']; - } + $this->obj->set_int_from_arg('category','category',$lang['ExpenseCategory']); + $this->obj->set_int_from_arg('mop','mop',$lang['ExpenseMOP']); + $this->obj->set_string_from_arg('description','description',$lang['ExpenseDescription']); + $this->obj->set_string_from_arg('name','name',$lang['ExpenseName']); + + $this->obj->set_string_from_arg('reason','reason',$lang['ExpenseReason']); $this->obj->set_string_from_arg('people','people',$lang['ExpensePeople']); $this->obj->set_string_from_arg('ciy','city',$lang['City']); @@ -240,9 +243,6 @@ if ( isset($_GET['currency']) ){ $this->obj->currency = trim($_GET['currency']); } - if ( isset($_GET['mop']) ){ - $this->obj->mop = $_GET['mop']; - } if ( isset($_GET['ccentre']) ){ $this->obj->ccentre = trim($_GET['ccentre']); } Modified: trunk/php/expense/expense_overview.php =================================================================== --- trunk/php/expense/expense_overview.php 2011-02-19 21:11:37 UTC (rev 37) +++ trunk/php/expense/expense_overview.php 2011-02-20 09:03:09 UTC (rev 38) @@ -93,25 +93,34 @@ $r .= "<tr>\n"; $r .= $this->orderHeader('name',$lang['ExpenseName'],$this->link2); if ($this->head['link_id']) { - $r .= $this->orderHeader('link_id',$lang['ExpenseReference'],$this->link2); + $r .= $this->orderHeader('',$lang['ExpenseReference'],$this->link2); $this->flds++; $this->preflds++; } if ($this->head['supplier']) { - $r .= $this->orderHeader('supplier',$lang['ExpenseSupplier'],$this->link2); + $r .= $this->orderHeader('',$lang['ExpenseSupplier'],$this->link2); $this->flds++; $this->preflds++; } - $r .= $this->orderHeader('adr_id',$lang['ExpenseAddress'],$this->link2); + $r .= $this->orderHeader('',$lang['ExpenseAddress'],$this->link2); if ($this->head['category']) { $r .= $this->orderHeader('category',$lang['ExpenseCategory'],$this->link2); $this->flds++; $this->preflds++; } - $r .= $this->orderHeader('',$lang['ExpenseGAmount'],$this->link2); + if ($this->head['quantity']) { + $r .= $this->orderHeader('quantity',$lang['ExpenseQuantity'],$this->link2); + $this->flds++; + $this->preflds++; + } + $r .= $this->orderHeader('gamount',$lang['ExpenseGAmount'],$this->link2); $r .= $this->orderHeader('',$lang['ExpenseITax'],$this->link2); - $r .= show_custom_overview_headers($this,'expense',$this->link2); - $r .= get_module_overview_header($this,'expense'); + if ($this->head['custom']) { + $r .= show_custom_overview_headers($this,'expense',$this->link2); + } + if ($this->head['mods']) { + $r .= get_module_overview_header($this,'expense'); + } if ( $tutos[massupdate] == 1 ) { $r .= ' <th nowrap="nowrap"><input type="checkbox" name="checkit" /></th>'."\n"; $this->flds++; @@ -151,8 +160,11 @@ $r .= " <td> ". $b->getAdrRefLink() ."</td>\n"; if ($this->head['category']) { - $r .= " <td> ". $b->getCategory() ."</td>\n"; + $r .= ' <td>'. $b->getCategory() ."</td>\n"; } + if ($this->head['quantity']) { + $r .= ' <td align="right">'. $b->quantity ."</td>\n"; + } $r .= ' <td align="right"> '. number_format($b->gamount,2,$lang['DecPoint'],$lang['ThousandPoint']) ." ". myentities($b->currency) ."</td>\n"; if ($b->itax != 0) { @@ -161,8 +173,12 @@ } else { $r .= " <td> </td>\n"; } - $r .= show_custom_overview_data($this,'expense',$b); - $r .= get_module_overview_data($this,$b); + if ($this->head['custom']) { + $r .= show_custom_overview_data($this,'expense',$b); + } + if ($this->head['mods']) { + $r .= get_module_overview_data($this,$b); + } if ( $tutos[massupdate] == 1 ) { $r .= " <td align=\"center\">\n"; if ( $b->mod_ok() ) { @@ -275,9 +291,29 @@ $this->filter = array(); $this->head['link_id'] = true; + $this->head['custom'] = true; + $this->head['mods'] = true; $this->head['supplier'] = true; $this->head['category'] = true; + $this->head['quantity'] = true; + if (isset($this->hide['category']) && $this->hide['category'] ) { + $this->head['category'] = false; + $this->link1 = addUrlParameter($this->link1,"hide[]=category"); + } + if (isset($this->hide['mop']) && $this->hide['mop'] ) { + $this->head['mop'] = false; + $this->link1 = addUrlParameter($this->link1,"hide[]=mop"); + } + if (isset($this->hide['custom']) && $this->hide['custom'] ) { + $this->head['custom'] = false; + $this->link1 = addUrlParameter($this->link1,"hide[]=custom"); + } + if (isset($this->hide['mods']) && $this->hide['mods'] ) { + $this->head['mods'] = false; + $this->link1 = addUrlParameter($this->link1,"hide[]=mods"); + } + $reftype = ""; $name = ""; $nsrn = ""; @@ -484,5 +520,5 @@ ?> <!-- SVN Info $Id$ - $Author$ - --> \ No newline at end of file +$Author$ +--> \ No newline at end of file Modified: trunk/php/expense/mtable.pinc =================================================================== --- trunk/php/expense/mtable.pinc 2011-02-19 21:11:37 UTC (rev 37) +++ trunk/php/expense/mtable.pinc 2011-02-20 09:03:09 UTC (rev 38) @@ -1,7 +1,12 @@ <?php -/* - * Copyright 1999 - 2010 by Gero Kohnert and ECOsoft.net +/** + * Copyright 1999 - 2011 by Gero Kohnert and ECOsoft.net * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. + * + * * Information about the tables and indices neccessary for this module * * SVN Info $Id$ @@ -46,6 +51,7 @@ 'lang' => 'City', ); $table['expense']['country'] = array(type => 'VARCHAR', size => 3, constraints => '', Desc => 'ISO Country code'); +$table['expense']['quantity'] = array(type => 'float', constraints => 'NN', Desc => 'quantity'); $table['expense']['gamount'] = array(type => 'float', constraints => 'NN', Desc => 'gross amount'); $table['expense']['currency'] = array(type => 'VARCHAR', size => 4, constraints => 'NN', Desc => 'currency for gross amount'); $table['expense']['deduction'] = array(type => 'float', constraints => '', Desc => 'possible deduction'); @@ -89,4 +95,4 @@ Desc => 'adress with expenses', ); -?> +?> \ No newline at end of file Added: trunk/php/pdf2.pinc =================================================================== --- trunk/php/pdf2.pinc (rev 0) +++ trunk/php/pdf2.pinc 2011-02-20 09:03:09 UTC (rev 38) @@ -0,0 +1,47 @@ +<?php +/** + * Copyright 2004 - 2011 by Gero Kohnert + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. + * + * base format for TUTOS pdf output (using tcpdf engine) + * + * SVN Info $Id: pdf.pinc 18 2011-02-15 14:56:42Z gokohnert $ + * $Author: gokohnert $ + */ + +if ($tutos[tcpdfpath] != '') { + if (!file_exists($tutos['base'] .'/'. $tutos[tcpdfpath].'/tcpdf.php')) { + die ("NO TCPDF support. <br />\nSee \$tutos[tcpdfpath] in config. <br />\nmissing:".$tutos['base'] ."/". $tutos[tcpdfpath].'/fpdf.php'); + } + require_once $tutos['base'] ."/". $tutos[tcpdfpath].'/tcpdf.php'; + require_once $tutos['base'] ."/". $tutos[tcpdfpath].'/config/lang/eng.php'; +} else { + return; +} + +class Tutospdf extends TCPDF { + /** + * Constructor + */ + function tutospdf(&$dbconn,$orientation='P',$format='xx') { + global $tutos,$current_user; + + $this->dbconn = &$dbconn; + if ($format == "xx") { + $format = $tutos[paperformat]; + } + # $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); + parent::__construct($orientation,'mm',$format, true, 'UTF-8', false); + $this->AliasNbPages(); + $this->setCreator("TCPDF and TUTOS Version ".$tutos[version]); + $this->setKeywords("TUTOS"); + $this->setDisplayMode('fullpage','continuous'); + $this->SetCompression(true); + $this->SetAutoPageBreak(true,20); + } + +} +?> \ No newline at end of file Property changes on: trunk/php/pdf2.pinc ___________________________________________________________________ Added: svn:mime-type + text/x-php Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-02-19 21:11:43
|
Revision: 37 http://tutos.svn.sourceforge.net/tutos/?rev=37&view=rev Author: gokohnert Date: 2011-02-19 21:11:37 +0000 (Sat, 19 Feb 2011) Log Message: ----------- database selection by servername Modified Paths: -------------- trunk/php/auth/auth_pam.pinc trunk/php/auth/auth_typo3.pinc trunk/php/auth/auth_x509.pinc trunk/php/config_default.pinc trunk/php/db.p3 trunk/php/login.pinc trunk/php/permission.p3 Modified: trunk/php/auth/auth_pam.pinc =================================================================== --- trunk/php/auth/auth_pam.pinc 2011-02-19 21:10:23 UTC (rev 36) +++ trunk/php/auth/auth_pam.pinc 2011-02-19 21:11:37 UTC (rev 37) @@ -1,7 +1,11 @@ <?php -/* - * Copyright 1999 - 2002 by Gero Kohnert +/** + * Copyright 1999 - 2011 by Gero Kohnert * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. + * * SVN Info $Id$ * $Author$ */ @@ -16,86 +20,89 @@ * @package BASE */ class auth_pam extends auth{ - /** - * init - */ - function auth_pam() { - global $tutos,$msg; - # - # Globally diable PWLOST SUPPORT - # - $tutos[pwlostsupport] = 0; - } - /** - * get the password - */ - function getpw() { - if ( isset($_POST['pw']) ) { - return $_POST['pw']; - } elseif ( isset($_GET['pw']) ) { - return $_GET['pw']; + /** + * init + */ + function auth_pam() { + global $tutos,$msg; + # + // Globally diable PWLOST SUPPORT + # + $tutos[pwlostsupport] = 0; } - return; - } - /** - * get the username - */ - function getuname() { - if ( isset($_POST['uname']) ) { - return trim($_POST['uname']); - } elseif ( isset($_GET['uname']) ) { - return trim($_GET['uname']); + /** + * get the password + */ + function getpw() { + if ( isset($_POST['pw']) ) { + return $_POST['pw']; + } elseif ( isset($_GET['pw']) ) { + return $_GET['pw']; + } + return; } - return; - } - /** - * Check for permmision - * using a DB query checked against PAM (Pluggable Auth Module) - */ - function check() { - global $current_user,$lang,$tutos; + /** + * get the username + */ + function getuname() { + if ( isset($_POST['uname']) ) { + return trim($_POST['uname']); + } elseif ( isset($_GET['uname']) ) { + return trim($_GET['uname']); + } + return; + } + /** + * Check for permmision + * using a DB query checked against PAM (Pluggable Auth Module) + */ + function check() { + global $current_user,$lang,$tutos; - $r = array(); + $r = array(); - if ( ! function_exists('pam_auth')) { - $r[0] = "PAM Auth not availabel"; - $r[1] = $r[0]; - return $r; - } + if ( ! function_exists('pam_auth')) { + $r[0] = "PAM Auth not availabel"; + $r[1] = $r[0]; + return $r; + } - $query = - "SELECT p.*, a.* , p.id as u_id, p.creator as cr_a, p.creation as cr_t FROM ". $this->dbconn->prefix ."people p, ". $this->dbconn->prefix ."addresses a ". - "WHERE login = ". $this->dbconn->String($this->getuname()). - " AND p.adr_id = a.id"; + $query = + "SELECT p.*, a.* , p.id as u_id, p.creator as cr_a, p.creation as cr_t FROM ". $this->dbconn->prefix ."people p, ". $this->dbconn->prefix ."addresses a ". + "WHERE login = ". $this->dbconn->String($this->getuname()). + " AND p.adr_id = a.id"; - $result = $this->dbconn->Exec($query); + $result = $this->dbconn->Exec($query); - if ( ! $result ) { - ReadLang($lang); - $r[0] = "No Result for ". $this->getuname() ." / ". $this->getpw(); - $r[1] = $lang['Err0026']; - return $r; - } + if ( ! $result ) { + ReadLang($lang); + $r[0] = "No Result for ". $this->getuname() ." / ". $this->getpw(); + $r[1] = $lang['Err0026']; + return $r; + } - if ( 1 != $result->numrows()) { - ReadLang($lang); - $r[0] = "not unique "; - $r[0] .= $result->numrows() ." Result for ". $this->getuname() ." / ". $this->getpw(); - $r[1] = $lang['Err0027']; - return $r; - } + if ( 1 != $result->numrows()) { + ReadLang($lang); + $r[0] = "not unique "; + $r[0] .= $result->numrows() ." Result for ". $this->getuname() ." / ". $this->getpw(); + $r[1] = $lang['Err0027']; + return $r; + } - $error = ""; - ini_set("pam_auth.servicename",$tutos[pamservice]); - if ( ! pam_auth($this->getuname(), $this->getpw(), &$error)) { - ReadLang($lang); - $r[0] = "PAM(". $tutos[pamservice].") ". $error ." : ". $this->getuname() ; - $r[1] = $lang['Err0027'] ." : ". $r[0]; - return $r; + $error = ""; + ini_set("pam_auth.servicename",$tutos[pamservice]); + if ( ! pam_auth($this->getuname(), $this->getpw(), &$error)) { + ReadLang($lang); + $r[0] = "PAM(". $tutos[pamservice].") ". $error ." : ". $this->getuname() ; + $r[1] = $lang['Err0027'] ." : ". $r[0]; + return $r; + } + $current_user= new tutos_user($this->dbconn); + $current_user->read_result($result,0); + $result->free(); + // we have been checked against pam so changing passwords is not possible + $_SESSION['pwl'] = false; + $_SESSION['pwc'] = false; } - $current_user= new tutos_user($this->dbconn); - $current_user->read_result($result,0); - $result->free(); - } } -?> +?> \ No newline at end of file Modified: trunk/php/auth/auth_typo3.pinc =================================================================== --- trunk/php/auth/auth_typo3.pinc 2011-02-19 21:10:23 UTC (rev 36) +++ trunk/php/auth/auth_typo3.pinc 2011-02-19 21:11:37 UTC (rev 37) @@ -1,7 +1,11 @@ <?php /* - * Copyright 2009 by Gero Kohnert + * Copyright 2009 - 2011 by Gero Kohnert * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. + * * SVN Info $Id$ * $Author$ */ @@ -20,8 +24,6 @@ * get the password */ function auth_typo3() { - $this->pwlostsupport = false; - $this->pwchangesupport = false; } /** * get the password @@ -83,7 +85,7 @@ $db->setUser($tutos['typo3dbuser']); $db->setPass($tutos['typo3dbpasswd']); $db->setType(DB_TYPE_MYSQL); # typo3 always uses mysql - $db->setRepository($this->dbconn->db->repository); + $db->setRepository($this->dbconn->db->repository); $dbc = $db->getConnection(); $db->dbconn = &$dbc; } else { @@ -129,6 +131,9 @@ $current_user= new tutos_user($this->dbconn); $current_user->read_result($result,0); $result->free(); + // we have been checked against typo3 so changing passwords is not possible + $_SESSION['pwl'] = false; + $_SESSION['pwc'] = false; } } ?> \ No newline at end of file Modified: trunk/php/auth/auth_x509.pinc =================================================================== --- trunk/php/auth/auth_x509.pinc 2011-02-19 21:10:23 UTC (rev 36) +++ trunk/php/auth/auth_x509.pinc 2011-02-19 21:11:37 UTC (rev 37) @@ -1,7 +1,11 @@ <?php -/* - * Copyright 1999 - 2010 by Gero Kohnert +/** + * Copyright 1999 - 2011 by Gero Kohnert * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; version 2 of the License. + * * SVN Info $Id$ * $Author$ * contributed by Markus Leist @@ -55,9 +59,9 @@ } $query = - "SELECT a.*, p.*,p.id as u_id ,p.creator as cr_a, p.creation as cr_t FROM ". $this->dbconn->prefix ."people p, ". $this->dbconn->prefix ."addresses a ". - "WHERE login = ". $this->dbconn->String($this->getuname()). - " AND p.adr_id = a.id"; + "SELECT a.*, p.*,p.id as u_id ,p.creator as cr_a, p.creation as cr_t FROM ". $this->dbconn->prefix ."people p, ". $this->dbconn->prefix ."addresses a ". + "WHERE login = ". $this->dbconn->String($this->getuname()). + " AND p.adr_id = a.id"; $result = $this->dbconn->Exec($query); Modified: trunk/php/config_default.pinc =================================================================== --- trunk/php/config_default.pinc 2011-02-19 21:10:23 UTC (rev 36) +++ trunk/php/config_default.pinc 2011-02-19 21:11:37 UTC (rev 37) @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2010 by Gero Kohnert + * Copyright 1999 - 2011 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -102,12 +102,17 @@ # The URL should point to the top of the installed system like # http://www.your.org/tutos # -$tutos[baseurl][0] = "http://localhost/tutos"; +$tutos[baseurl][0] = "http://tutos.mycompany.com/tutos"; # +# Uncomment the next line to limit the visibilty of the database to a given web server +# The database will only be visible when called on a server matching one of the names in the array +# Attention: if no database matches TUTOS will nevertheless use database 0 (so maybe do this on set 1) +# $tutos[servernames][0] = array('tutos.mycompany.com','localhost'); +# # You can add more database connections # by increasing the index from [0] to [1] etc. # and adding a whole new block. -# Do this in config.pinc only !! +# Do this in config.php only !! # # $tutos[dbname][1] = "tutos2"; # $tutos[dbtype][1] = 14; @@ -369,6 +374,11 @@ # $tutos[fpdfpath] = 'libs/fpdf'; # +# Path to the PDF Classes tcpdf.php http://www.tecnick.com +# (path is relative to TUTOS home) +# +$tutos[tcpdfpath] = 'libs/tcpdf'; +# # Path to the php-barcode library http://www.ashberg.de/php-barcode/download # (path is relative to TUTOS home) # Keep empty "" if the package is not installed Modified: trunk/php/db.p3 =================================================================== --- trunk/php/db.p3 2011-02-19 21:10:23 UTC (rev 36) +++ trunk/php/db.p3 2011-02-19 21:11:37 UTC (rev 37) @@ -34,6 +34,7 @@ define ('layouts',16); define ('dbprefix',17); define ('useok',18); +define ('servernames',19); define ('tables',30); define ('lang',31); @@ -164,6 +165,7 @@ define ('memcache_hosts',142); define ('smtpport',143); define ('help_need_login',144); +define ('tcpdfpath',145); // Permissions and Object IDS (see also user.pinc) NO CHANGES HERE ! // These are distinct IDS for the different Objcts in TUTOS Modified: trunk/php/login.pinc =================================================================== --- trunk/php/login.pinc 2011-02-19 21:10:23 UTC (rev 36) +++ trunk/php/login.pinc 2011-02-19 21:11:37 UTC (rev 37) @@ -71,34 +71,52 @@ $r .= "</tr><tr>\n"; $r .= $this->showfieldc($lang['Username'],0,"uname"); + $r .= ' <td><input id="uname" type="text" size="'. min($table['people']['login'][size],20) .'" maxlength="'. $table['people']['login'][size] .'" name="uname"'; if ( $tutos[authtype] == "x509") { - $r .= ' <td><input id="uname" type="text" size="'. min($table['people']['login'][size],20) .'" maxlength="'. $table['people']['login'][size] .'" name="uname" value="'.$_SERVER["SSL_CLIENT_S_DN_CN"].'" readonly="readonly" /></td>'; + $r .= ' value="'.$_SERVER["SSL_CLIENT_S_DN_CN"].'" readonly="readonly"'; } else { - $r .= ' <td><input id="uname" type="text" size="'. min($table['people']['login'][size],20) .'" maxlength="'. $table['people']['login'][size] .'" name="uname" value="" /></td>'; + $r .= ' value=""'; } + if ($tutos[debug] == 0) { + $r .= ' autocomplete="off"'; + } + $r .= ' /></td>'; $r .= "\n</tr><tr>\n"; $r .= $this->showfieldc($lang['Password'],0,"pw"); + $r .= ' <td><input id="pw" type="password" size="'. min($table['people']['pw'][size],20) .'" maxlength="'. $table['people']['pw'][size] .'" name="pw"'; if ( $tutos[authtype] == "x509") { - $r .= ' <td><input id="pw" type="password" size="'. min($table['people']['pw'][size],20) .'" maxlength="'. $table['people']['pw'][size] .'" name="pw" value="x509" />'; - } else { - $r .= ' <td><input id="pw" type="password" size="'. min($table['people']['pw'][size],20) .'" maxlength="'. $table['people']['pw'][size] .'" name="pw" />'; + $r .= ' value="x509" />'; } + $r .= ' /></td>'; if ( $this->db > -1 ) { $this->addHidden("dbnr",$this->db); $r .= "\n</td>\n"; } else { - $db = ""; + $db = ''; if ( count($tutos[dbname]) > 1 ) { $r .= "\n</td>\n</tr><tr>\n"; $r .= $this->showfieldc($lang['DB'],0,"dbnr"); $r .= " <td><select id=\"dbnr\" name=\"dbnr\">\n"; foreach ($tutos[dbname] as $i => $f) { + // check if db server is visible on webserver + if (isset($tutos[servernames][$i]) && is_array($tutos[servernames][$i]) && count($tutos[servernames][$i]) > 0) { + $stop = true; + foreach ($tutos[servernames][$i] as $s) { + if (preg_match('#'.$_SERVER['SERVER_NAME'].'$#i',$s)) { + $stop = false; + break; + } + } + if ($stop) continue; + } + $r .= ' <option value="'. $i .'"'. ($db == $i ? ' selected="selected"':'') .">". $tutos[dbalias][$i] ."</option>\n"; if ( isset($tutos[dbalias][$i]) ) { - $r .= ' <option value="'. $i .'"'. ($db == $i ? ' selected="selected"':'') .">". $tutos[dbalias][$i] ."</option>\n"; + $r .= $tutos[dbalias][$i]; } else { - $r .= ' <option value="'. $i .'"'. ($db == $i ? ' selected="selected"':'') .">". $tutos[dbname][$i] ."@". $tutos[dbhost][$i] ."</option>\n"; + $r .= $tutos[dbname][$i] .'@'. $tutos[dbhost][$i]; } + $r .= "</option>\n"; } $r .= "</select></td>\n"; } else { Modified: trunk/php/permission.p3 =================================================================== --- trunk/php/permission.p3 2011-02-19 21:10:23 UTC (rev 36) +++ trunk/php/permission.p3 2011-02-19 21:11:37 UTC (rev 37) @@ -1,6 +1,6 @@ <?php /** - * Copyright 1999 - 2010 by Gero Kohnert + * Copyright 1999 - 2011 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -305,6 +305,7 @@ $tutos['SESSID'] = $_REQUEST['TUTOS']; } + // no mailing possible so sending password is also not possible if ( $tutos[mailmode] == 0 ) { $tutos[pwlostsupport] = 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-02-19 21:10:29
|
Revision: 36 http://tutos.svn.sourceforge.net/tutos/?rev=36&view=rev Author: gokohnert Date: 2011-02-19 21:10:23 +0000 (Sat, 19 Feb 2011) Log Message: ----------- move hiding fixing to a more general layer / fixed datepicker language problem Modified Paths: -------------- trunk/php/layout/layout_base.pinc trunk/php/layout/new2_layout.pinc trunk/php/layout/new_layout.pinc trunk/php/timetrack/timetrack_new.php Modified: trunk/php/layout/layout_base.pinc =================================================================== --- trunk/php/layout/layout_base.pinc 2011-02-19 21:08:10 UTC (rev 35) +++ trunk/php/layout/layout_base.pinc 2011-02-19 21:10:23 UTC (rev 36) @@ -58,6 +58,25 @@ } $this->flds = 0; + // fieldnames that we should hide in output + // in some situations we limit the visible fields + $this->hide = array(); + + if (isset($_REQUEST['hide']) && is_array($_REQUEST['hide'])) { + foreach($_REQUEST['hide'] as $f) { + $this->hide[$f] = true; + } + } + + // fieldnames that we should fixate in forms + $this->fixate = array(); + + if (isset($_REQUEST['fix']) && is_array($_REQUEST['fix'])) { + foreach($_REQUEST['fix'] as $f) { + $this->fixate[$f] = true; + } + } + // layout specific $this->center = false; $this->css_class = "showbox"; @@ -151,6 +170,15 @@ $r .= '<![endif]-->'."\n"; $r .= ' <script type="text/javascript" language="JavaScript" src="'.$tutos['base'].'/html/js/jquery.bt.min.js"></script>'."\n"; + // Check the language for datepicker + $x = strtolower(substr($tutos[lang],0,2)); + if (in_array($x,array('de','es','fr','fi','it','hu','ja','nl','pl','pt','sv','ru'))) { + // do nothing + } elseif ($x == 'zh') { + $x = 'zh-TW'; + } else { + $x = 'en-GB'; + } $tutos['pagescript'] = " jQuery.bt.defaults.width = 200; jQuery.bt.defaults.positions = ['top','left','right','bottom']; @@ -171,7 +199,7 @@ jQuery.bt.defaults.padding = '0px'; $(function() { -$.datepicker.setDefaults( $.datepicker.regional[ \"".substr($tutos[lang],0,2)."\" ] ); +$.datepicker.setDefaults( $.datepicker.regional[ \"".$x."\" ] ); $.datepicker.setDefaults({autoSize:true,changeYear:true,changeMonth:true,showOtherMonths:true,showWeek:true,dateFormat:\"".TUTOS_Date_Time::getDateFormat()."\"}); });\n". $tutos['pagescript']; @@ -549,7 +577,10 @@ return "getHidden not implemented"; foreach ($this->hidden as $name => $value ) { } + foreach ($this->hide as $name => $value ) { + } $this->hidden = array(); + $this->hide = array(); } /** Modified: trunk/php/layout/new2_layout.pinc =================================================================== --- trunk/php/layout/new2_layout.pinc 2011-02-19 21:08:10 UTC (rev 35) +++ trunk/php/layout/new2_layout.pinc 2011-02-19 21:10:23 UTC (rev 36) @@ -359,6 +359,10 @@ foreach ($this->hidden as $v ) { $r .= '<input type="hidden" name="'. $v[0] .'" value="'. $v[1] ."\" />\n"; } + foreach ($this->hide as $i => $v ) { + if ($v == true) + $r .= '<input type="hidden" name="hide[]" value="'. $i ."\" />\n"; + } $this->hidden = array(); return $r; } Modified: trunk/php/layout/new_layout.pinc =================================================================== --- trunk/php/layout/new_layout.pinc 2011-02-19 21:08:10 UTC (rev 35) +++ trunk/php/layout/new_layout.pinc 2011-02-19 21:10:23 UTC (rev 36) @@ -788,7 +788,7 @@ if ( $urls != '' ) { - $r .= '<tr><th>'. $lang['URL'] ."</th></tr>\n"; + $r .= '<tr><th>'. $lang['Team'].'/'. $lang['URL'] ."</th></tr>\n"; $r .= $urls; } if ( 'help.php' != basename($_SERVER['SCRIPT_NAME']) ) { Modified: trunk/php/timetrack/timetrack_new.php =================================================================== --- trunk/php/timetrack/timetrack_new.php 2011-02-19 21:08:10 UTC (rev 35) +++ trunk/php/timetrack/timetrack_new.php 2011-02-19 21:10:23 UTC (rev 36) @@ -223,7 +223,6 @@ $this->obj = new Timetrack($this->dbconn); - $this->hide = array(); // // Mode // 0 = classical Timetrack @@ -235,11 +234,6 @@ } else { $this->mode = 0; } - if (isset($_GET['hide']) && is_array($_GET['hide'])) { - foreach($_GET['hide'] as $f) { - $this->hide[$f] = true; - } - } // read all open entries $q = 'SELECT * from '. $this->obj->tablename .' WHERE t_start is not null AND t_end is NULL and adr_id = '. $this->obj->worker->id; $this->res = $this->dbconn->Exec($q); @@ -356,5 +350,5 @@ ?> <!-- SVN Info $Id$ - $Author$ - --> +$Author$ +--> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-02-19 21:08:16
|
Revision: 35 http://tutos.svn.sourceforge.net/tutos/?rev=35&view=rev Author: gokohnert Date: 2011-02-19 21:08:10 +0000 (Sat, 19 Feb 2011) Log Message: ----------- chinese fix Modified Paths: -------------- trunk/php/group/tw.p3 trunk/php/group/zh.p3 trunk/php/installation/tw.p3 trunk/php/installation/zh.p3 trunk/php/invoice/tw.p3 trunk/php/invoice/zh.p3 trunk/php/testmanager/tw.p3 trunk/php/testmanager/zh.p3 Modified: trunk/php/group/tw.p3 =================================================================== --- trunk/php/group/tw.p3 2011-02-19 09:07:23 UTC (rev 34) +++ trunk/php/group/tw.p3 2011-02-19 21:08:10 UTC (rev 35) @@ -23,6 +23,7 @@ $lang['GroupDetail'] = "CRM 組別細節"; $lang['GroupOverview'] = "CRM 組別概況"; $lang['GroupMember'] = "成員"; +$lang['GroupMembers'] = "Members"; $lang['GroupMail'] = "向組別發送郵件"; $lang['GroupMailI'] = "向 %s 組別發送郵件"; $lang['GroupSearch'] = "CRM 組別搜尋"; Modified: trunk/php/group/zh.p3 =================================================================== --- trunk/php/group/zh.p3 2011-02-19 09:07:23 UTC (rev 34) +++ trunk/php/group/zh.p3 2011-02-19 21:08:10 UTC (rev 35) @@ -23,6 +23,7 @@ $lang['GroupDetail'] = "CRM 组别细节"; $lang['GroupOverview'] = "CRM 组别概況"; $lang['GroupMember'] = "成员"; +$lang['GroupMembers'] = "Members"; $lang['GroupMail'] = "向组别发送邮件"; $lang['GroupMailI'] = "向 %s 组别发送邮件"; $lang['GroupSearch'] = "CRM 组别搜索"; Modified: trunk/php/installation/tw.p3 =================================================================== --- trunk/php/installation/tw.p3 2011-02-19 09:07:23 UTC (rev 34) +++ trunk/php/installation/tw.p3 2011-02-19 21:08:10 UTC (rev 35) @@ -21,6 +21,8 @@ $lang['InstKey2'] = "發布識別碼"; $lang['InstalledBy'] = "安裝者"; $lang['SoldBy'] = "售貨員"; +$lang['InstDateTime'] = "installed at"; +$lang['SoldDateTime'] = "sold at"; $lang['Customer'] = "客戶/使用者"; $lang['InstLinkI'] = "檢視安裝工作"; $lang['InstCreateI'] = "建立新的 %s 安裝工作"; Modified: trunk/php/installation/zh.p3 =================================================================== --- trunk/php/installation/zh.p3 2011-02-19 09:07:23 UTC (rev 34) +++ trunk/php/installation/zh.p3 2011-02-19 21:08:10 UTC (rev 35) @@ -21,6 +21,8 @@ $lang['InstKey2'] = "发布识别码"; $lang['InstalledBy'] = "执行者"; $lang['SoldBy'] = "售货员"; +$lang['InstDateTime'] = "installed at"; +$lang['SoldDateTime'] = "sold at"; $lang['Customer'] = "客戶/用戶"; $lang['InstLinkI'] = "查看安装工作"; $lang['InstCreateI'] = "建立新的 %s 安装工作"; Modified: trunk/php/invoice/tw.p3 =================================================================== --- trunk/php/invoice/tw.p3 2011-02-19 09:07:23 UTC (rev 34) +++ trunk/php/invoice/tw.p3 2011-02-19 21:08:10 UTC (rev 35) @@ -81,5 +81,6 @@ &Y 將改為一個源對象的識別碼 &Z 將改為一個源全名"; $lang['InvoiceConfigHelpStateSTC'] = "活動狀態過渡控制模型"; +$lang['InvoiceConfigHelpBillableTT'] = 'Timetracking States that are allowed to be put into an invoice'; ?> Modified: trunk/php/invoice/zh.p3 =================================================================== --- trunk/php/invoice/zh.p3 2011-02-19 09:07:23 UTC (rev 34) +++ trunk/php/invoice/zh.p3 2011-02-19 21:08:10 UTC (rev 35) @@ -81,5 +81,6 @@ &Y 将改为一个源对象的识别码 &Z 将改为一个源全名"; $lang['InvoiceConfigHelpStateSTC'] = "活动状态过渡控制模型"; +$lang['InvoiceConfigHelpBillableTT'] = 'Timetracking States that are allowed to be put into an invoice'; ?> Modified: trunk/php/testmanager/tw.p3 =================================================================== --- trunk/php/testmanager/tw.p3 2011-02-19 09:07:23 UTC (rev 34) +++ trunk/php/testmanager/tw.p3 2011-02-19 21:08:10 UTC (rev 35) @@ -35,6 +35,7 @@ $lang['TestcaseResults'][3] = '未經測試'; $lang['TestcaseSearch'] = '測試案例搜索'; $lang['TestcaseSearchI'] = '搜索測試案例'; +$lang['TestcaseSelInfo'] = '(留空顯示所有)'; $lang['TestcaseUsed'] = '使用'; $lang['Testsuite'] = '測試套件'; @@ -58,6 +59,7 @@ $lang['TestsuiteLinkInfo'] = '%s 測試套件'; $lang['TestsuiteSearch'] = '測試套件搜索'; $lang['TestsuiteSearchI'] = '搜索測試套件'; +$lang['TestsuiteSelInfo'] = '(留空顯示所有)'; $lang['TestsuiteCSVExport'] = '導出 CSV 格式'; $lang['TestsuiteCSVExportI'] = '以 CSV 格式導出測試套件'; $lang['TestsuiteSimulate'] = '模擬試運行'; Modified: trunk/php/testmanager/zh.p3 =================================================================== --- trunk/php/testmanager/zh.p3 2011-02-19 09:07:23 UTC (rev 34) +++ trunk/php/testmanager/zh.p3 2011-02-19 21:08:10 UTC (rev 35) @@ -35,6 +35,7 @@ $lang['TestcaseResults'][3] = '未经测试'; $lang['TestcaseSearch'] = '测试案例搜寻'; $lang['TestcaseSearchI'] = '搜寻测试案例'; +$lang['TestcaseSelInfo'] = '(留空显示所有)'; $lang['TestcaseUsed'] = '使用'; $lang['Testsuite'] = '测试套件'; @@ -58,6 +59,7 @@ $lang['TestsuiteLinkInfo'] = '%s 测试套件'; $lang['TestsuiteSearch'] = '测试套件搜寻'; $lang['TestsuiteSearchI'] = '搜寻测试套件'; +$lang['TestsuiteSelInfo'] = '(留空显示所有)'; $lang['TestsuiteCSVExport'] = '导出 CSV 格式'; $lang['TestsuiteCSVExportI'] = '以 CSV 格式导出测试套件'; $lang['TestsuiteSimulate'] = '模拟试运行'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-02-19 09:07:29
|
Revision: 34 http://tutos.svn.sourceforge.net/tutos/?rev=34&view=rev Author: gokohnert Date: 2011-02-19 09:07:23 +0000 (Sat, 19 Feb 2011) Log Message: ----------- chinese updates Modified Paths: -------------- branches/1.7/php/bugtracking/tw.p3 branches/1.7/php/bugtracking/zh.p3 branches/1.7/php/group/tw.p3 branches/1.7/php/installation/tw.p3 branches/1.7/php/installation/zh.p3 branches/1.7/php/invoice/tw.p3 branches/1.7/php/localization/tw.p3 branches/1.7/php/localization/zh.p3 Modified: branches/1.7/php/bugtracking/tw.p3 =================================================================== --- branches/1.7/php/bugtracking/tw.p3 2011-02-18 15:03:23 UTC (rev 33) +++ branches/1.7/php/bugtracking/tw.p3 2011-02-19 09:07:23 UTC (rev 34) @@ -81,12 +81,14 @@ $lang['BugMedium'] = "如何檢測/報告"; $lang['BugFollowup'] = '跟進'; $lang['BugFollowBy'] = '跟進'; +$lang['BugNoMail'] = 'prevent emails'; +$lang['BugNoMailI'] = 'prevent sending emails to %s !'; $lang['BugTrack'] = "毛病 追蹤"; $lang['BugTrackInfo'] = "毛病 追蹤資料庫"; -$lang['EmailNew毛病'] = "@REFTYPE@ @REF@ -- @NAME@ 的新 毛病 / @SHORT@"; -$lang['EmailChanges毛病'] = "@REFTYPE@ @REF@ -- 毛病 @NAME@ 更改"; +$lang['EmailNewBug'] = "@REFTYPE@ @REF@ -- @NAME@ 的新 毛病 / @SHORT@"; +$lang['EmailChangesBug'] = "@REFTYPE@ @REF@ -- 毛病 @NAME@ 更改"; $lang['EmailStillOpen'] = "@REFTYPE@ @REF@ -- 毛病 @NAME@ 仍然 @STATE@"; $lang['BugConfig'] = "配置毛病跟踪"; @@ -111,7 +113,11 @@ $lang['BugConfigHelpClosedStates'] = '毛病狀況差不多完結'; $lang['BugConfigHelpWarnStates'] = '倘若長時間在激活狀態會觸發警告。 請參考以上 "EmailStillOpen" 的選項。'; +$lang['BugConfigHelpFreeTarget'] = 'Allow free selection of target task or project'; +$lang['BugConfigHelpNoMail'] = 'Allow to prevent the sending of emails for changes/creation. +A notice about prevented emails will be added to the each changelog entry.'; +$lang['BugConfigHelpFinishState'] = 'State to set when automatically closing a bug (when booking time)'; $lang['perm'][usebugtracking] = "使用毛病 追蹤"; -$lang['bug'] = &$lang['Bug']; +$lang['bugtracking'] = &$lang['Bug']; ?> Modified: branches/1.7/php/bugtracking/zh.p3 =================================================================== --- branches/1.7/php/bugtracking/zh.p3 2011-02-18 15:03:23 UTC (rev 33) +++ branches/1.7/php/bugtracking/zh.p3 2011-02-19 09:07:23 UTC (rev 34) @@ -81,6 +81,8 @@ $lang['BugMedium'] = "如何检测/报告"; $lang['BugFollowup'] = '跟进'; $lang['BugFollowBy'] = '跟进'; +$lang['BugNoMail'] = 'prevent emails'; +$lang['BugNoMailI'] = 'prevent sending emails to %s !'; $lang['BugTrack'] = "故障跟踪"; $lang['BugTrackInfo'] = "故障跟踪资料库"; @@ -111,7 +113,11 @@ $lang['BugConfigHelpClosedStates'] = '故障状况差不多完结'; $lang['BugConfigHelpWarnStates'] = '倘若长时间在激活状态会触发警告。 请参考以上 "EmailStillOpen" 的选项。'; +$lang['BugConfigHelpFreeTarget'] = 'Allow free selection of target task or project'; +$lang['BugConfigHelpNoMail'] = 'Allow to prevent the sending of emails for changes/creation. +A notice about prevented emails will be added to the each changelog entry.'; +$lang['BugConfigHelpFinishState'] = 'State to set when automatically closing a bug (when booking time)'; $lang['perm'][usebugtracking] = "使用故障 追踪"; -$lang['bug'] = &$lang['Bug']; +$lang['bugtracking'] = &$lang['Bug']; ?> Modified: branches/1.7/php/group/tw.p3 =================================================================== --- branches/1.7/php/group/tw.p3 2011-02-18 15:03:23 UTC (rev 33) +++ branches/1.7/php/group/tw.p3 2011-02-19 09:07:23 UTC (rev 34) @@ -23,6 +23,7 @@ $lang['GroupDetail'] = "CRM 組別細節"; $lang['GroupOverview'] = "CRM 組別概況"; $lang['GroupMember'] = "成員"; +$lang['GroupMembers'] = "Members"; $lang['GroupMail'] = "向組別發送郵件"; $lang['GroupMailI'] = "向 %s 組別發送郵件"; $lang['GroupSearch'] = "CRM 組別搜尋"; Modified: branches/1.7/php/installation/tw.p3 =================================================================== --- branches/1.7/php/installation/tw.p3 2011-02-18 15:03:23 UTC (rev 33) +++ branches/1.7/php/installation/tw.p3 2011-02-19 09:07:23 UTC (rev 34) @@ -21,6 +21,8 @@ $lang['InstKey2'] = "發布識別碼"; $lang['InstalledBy'] = "安裝者"; $lang['SoldBy'] = "售貨員"; +$lang['InstDateTime'] = "installed at"; +$lang['SoldDateTime'] = "sold at"; $lang['Customer'] = "客戶/使用者"; $lang['InstLinkI'] = "檢視安裝工作"; $lang['InstCreateI'] = "建立新的 %s 安裝工作"; Modified: branches/1.7/php/installation/zh.p3 =================================================================== --- branches/1.7/php/installation/zh.p3 2011-02-18 15:03:23 UTC (rev 33) +++ branches/1.7/php/installation/zh.p3 2011-02-19 09:07:23 UTC (rev 34) @@ -21,6 +21,8 @@ $lang['InstKey2'] = "发布识别码"; $lang['InstalledBy'] = "执行者"; $lang['SoldBy'] = "售货员"; +$lang['InstDateTime'] = "installed at"; +$lang['SoldDateTime'] = "sold at"; $lang['Customer'] = "客戶/用戶"; $lang['InstLinkI'] = "查看安装工作"; $lang['InstCreateI'] = "建立新的 %s 安装工作"; Modified: branches/1.7/php/invoice/tw.p3 =================================================================== --- branches/1.7/php/invoice/tw.p3 2011-02-18 15:03:23 UTC (rev 33) +++ branches/1.7/php/invoice/tw.p3 2011-02-19 09:07:23 UTC (rev 34) @@ -81,5 +81,6 @@ &Y 將改為一個源對象的識別碼 &Z 將改為一個源全名"; $lang['InvoiceConfigHelpStateSTC'] = "活動狀態過渡控制模型"; +$lang['InvoiceConfigHelpBillableTT'] = 'Timetracking States that are allowed to be put into an invoice'; ?> Modified: branches/1.7/php/localization/tw.p3 =================================================================== --- branches/1.7/php/localization/tw.p3 2011-02-18 15:03:23 UTC (rev 33) +++ branches/1.7/php/localization/tw.p3 2011-02-19 09:07:23 UTC (rev 34) @@ -57,6 +57,7 @@ $lang['changeapp'] = "查看或更改會議(%s - %s)"; $lang['seeapp'] = "查看會議細節(%s - %s)"; $lang['AllEntries'] = "查看所有 %s 輸入"; +$lang['Comment'] = 'comment'; # $lang['DateTimePHP'] = "Y年m月d日 H:i T"; $lang['DateTimeStr'] = "%Y/%m/%d %H:%M %Z"; @@ -85,6 +86,7 @@ $lang['Delete'] = "刪除"; $lang['Change'] = "變更"; $lang['Modify'] = "修改"; +$lang['Copy'] = 'Copy'; $lang['created'] = "設立"; $lang['DateTimeFrom'] = "從"; $lang['DateTimeTill'] = "至"; @@ -148,6 +150,7 @@ $lang['NavBack'] = "上一頁"; $lang['NavNext'] = "下一頁"; $lang['NavLast'] = "末頁"; +$lang['NavBackTo'] = 'back to "%s"'; $lang['DecPoint'] = "."; $lang['ThousandPoint'] = ","; $lang['yes'] = "是"; @@ -423,6 +426,10 @@ $lang['Tasks'] = "任務"; $lang['TaskDetail'] = "任務細節"; $lang['TaskCreate'] = "建立任務"; +$lang['TaskCopy'] = 'Copy task %s'; +$lang['TaskCopyTree'] = 'Copy subtasks ?'; +$lang['TaskCopyRes'] = 'Copy Resourcesn ?'; +$lang['TaskShiftDates'] = 'Shift Dates ?'; $lang['TaskNewSubtask'] = "新的子任務"; $lang['TaskCreateInfo'] = "建立 %s 的子任務"; $lang['TaskDelete'] = "刪除任務 %s"; @@ -737,6 +744,8 @@ $lang['AdminMainConfigI'] = 'TUTOS 配置'; $lang['AdminCustomizeLang'] = '自定'; $lang['AdminCustomizeLangI'] = '自定語言文件'; +$lang['AdminCustomTable'] = 'Custom Fields'; +$lang['AdminCustomTableI'] = 'Info about Custom Fields'; $lang['AdminModules'] = '模塊'; $lang['AdminModulesI'] = '所有 TUTOS 模塊名單'; Modified: branches/1.7/php/localization/zh.p3 =================================================================== --- branches/1.7/php/localization/zh.p3 2011-02-18 15:03:23 UTC (rev 33) +++ branches/1.7/php/localization/zh.p3 2011-02-19 09:07:23 UTC (rev 34) @@ -57,6 +57,7 @@ $lang['changeapp'] = "查看或更改会议(%s - %s)"; $lang['seeapp'] = "查看会议细节(%s - %s)"; $lang['AllEntries'] = "查看所有 %s 输入"; +$lang['Comment'] = 'comment'; # $lang['DateTimePHP'] = "Y年m月d日 H:i T"; $lang['DateTimeStr'] = "%Y/%m/%d %H:%M %Z"; @@ -85,6 +86,7 @@ $lang['Delete'] = "删除"; $lang['Change'] = "更改"; $lang['Modify'] = "修正"; +$lang['Copy'] = 'Copy'; $lang['created'] = "建立"; $lang['DateTimeFrom'] = "从"; $lang['DateTimeTill'] = "至"; @@ -148,6 +150,7 @@ $lang['NavBack'] = "上一頁"; $lang['NavNext'] = "下一頁"; $lang['NavLast'] = "末頁"; +$lang['NavBackTo'] = 'back to "%s"'; $lang['DecPoint'] = "."; $lang['ThousandPoint'] = ","; $lang['yes'] = "是"; @@ -423,6 +426,10 @@ $lang['Tasks'] = "任务"; $lang['TaskDetail'] = "任务细节"; $lang['TaskCreate'] = "建立任务"; +$lang['TaskCopy'] = 'Copy task %s'; +$lang['TaskCopyTree'] = 'Copy subtasks ?'; +$lang['TaskCopyRes'] = 'Copy Resourcesn ?'; +$lang['TaskShiftDates'] = 'Shift Dates ?'; $lang['TaskNewSubtask'] = "新的子任务"; $lang['TaskCreateInfo'] = "建立 %s 的子任务"; $lang['TaskDelete'] = "刪除任务 %s"; @@ -737,6 +744,8 @@ $lang['AdminMainConfigI'] = 'TUTOS 配置'; $lang['AdminCustomizeLang'] = '自定'; $lang['AdminCustomizeLangI'] = '自定语言文件'; +$lang['AdminCustomTable'] = 'Custom Fields'; +$lang['AdminCustomTableI'] = 'Info about Custom Fields'; $lang['AdminModules'] = '模块'; $lang['AdminModulesI'] = '所有 TUTOS 模块名单'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-02-18 15:03:29
|
Revision: 33 http://tutos.svn.sourceforge.net/tutos/?rev=33&view=rev Author: gokohnert Date: 2011-02-18 15:03:23 +0000 (Fri, 18 Feb 2011) Log Message: ----------- fix datepickers limitations Modified Paths: -------------- trunk/php/layout/layout_base.pinc Modified: trunk/php/layout/layout_base.pinc =================================================================== --- trunk/php/layout/layout_base.pinc 2011-02-18 07:44:39 UTC (rev 32) +++ trunk/php/layout/layout_base.pinc 2011-02-18 15:03:23 UTC (rev 33) @@ -171,7 +171,7 @@ jQuery.bt.defaults.padding = '0px'; $(function() { -$.datepicker.setDefaults( $.datepicker.regional[ \"".$tutos[lang]."\" ] ); +$.datepicker.setDefaults( $.datepicker.regional[ \"".substr($tutos[lang],0,2)."\" ] ); $.datepicker.setDefaults({autoSize:true,changeYear:true,changeMonth:true,showOtherMonths:true,showWeek:true,dateFormat:\"".TUTOS_Date_Time::getDateFormat()."\"}); });\n". $tutos['pagescript']; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-02-18 07:44:45
|
Revision: 32 http://tutos.svn.sourceforge.net/tutos/?rev=32&view=rev Author: gokohnert Date: 2011-02-18 07:44:39 +0000 (Fri, 18 Feb 2011) Log Message: ----------- missing initalization Modified Paths: -------------- trunk/php/task.pinc Modified: trunk/php/task.pinc =================================================================== --- trunk/php/task.pinc 2011-02-18 07:42:14 UTC (rev 31) +++ trunk/php/task.pinc 2011-02-18 07:44:39 UTC (rev 32) @@ -2206,6 +2206,7 @@ $res = $user->dbconn->Exec($q); $n = $res->numrows(); $a = 0; + $tasklist = array(); while ($a < $n) { $x = new task($user->dbconn); $x->read_result($res,$a); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-02-18 07:42:20
|
Revision: 31 http://tutos.svn.sourceforge.net/tutos/?rev=31&view=rev Author: gokohnert Date: 2011-02-18 07:42:14 +0000 (Fri, 18 Feb 2011) Log Message: ----------- fix Modified Paths: -------------- trunk/php/testmanager/testmanager.pinc Modified: trunk/php/testmanager/testmanager.pinc =================================================================== --- trunk/php/testmanager/testmanager.pinc 2011-02-18 07:21:18 UTC (rev 30) +++ trunk/php/testmanager/testmanager.pinc 2011-02-18 07:42:14 UTC (rev 31) @@ -1320,6 +1320,8 @@ $t = myentities($this->name); $t = str_replace("\\","\\\\",$t); + $t = str_replace("\r"," ",$t); + $t = str_replace("\n"," ",$t); $t = str_replace("'","\'",$t); $h = ''; @@ -2756,4 +2758,4 @@ $tutos['classes'][usetestsuite] = 'Testsuite'; $tutos['classes'][usetestcase] = 'Testcase'; $tutos['classes'][usetestrun] = 'Testrun'; -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-02-18 07:21:25
|
Revision: 30 http://tutos.svn.sourceforge.net/tutos/?rev=30&view=rev Author: gokohnert Date: 2011-02-18 07:21:18 +0000 (Fri, 18 Feb 2011) Log Message: ----------- fix Modified Paths: -------------- trunk/php/testmanager/testmanager.pinc Modified: trunk/php/testmanager/testmanager.pinc =================================================================== --- trunk/php/testmanager/testmanager.pinc 2011-02-17 14:48:04 UTC (rev 29) +++ trunk/php/testmanager/testmanager.pinc 2011-02-18 07:21:18 UTC (rev 30) @@ -1327,6 +1327,9 @@ $h = myentities($lang[$this->ref->getType()] ." ".$this->ref->getFullName())." → "; } $h = preg_replace("#\r\n#"," ",$h); + $h = str_replace("\r"," ",$h); + $h = str_replace("\n"," ",$h); + $h = str_replace("'","\'",$h); $r = ''; $r .= '<table class="popupinfo">'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-02-17 14:48:12
|
Revision: 29 http://tutos.svn.sourceforge.net/tutos/?rev=29&view=rev Author: gokohnert Date: 2011-02-17 14:48:04 +0000 (Thu, 17 Feb 2011) Log Message: ----------- fix Modified Paths: -------------- trunk/php/testmanager/testmanager.pinc Modified: trunk/php/testmanager/testmanager.pinc =================================================================== --- trunk/php/testmanager/testmanager.pinc 2011-02-17 07:55:52 UTC (rev 28) +++ trunk/php/testmanager/testmanager.pinc 2011-02-17 14:48:04 UTC (rev 29) @@ -410,19 +410,19 @@ $this->read_reference(); $n1 = $this->getSteps(); - $n1 =str_replace("\n","<br />",$n1); - $n1 =str_replace("\r","",$n1); - $n1 =str_replace("\\","\\\\",$n1); - $n1 =str_replace("'","\'",$n1); + $n1 = str_replace("\n","<br />",$n1); + $n1 = str_replace("\r","",$n1); + $n1 = str_replace("\\","\\\\",$n1); + $n1 = str_replace("'","\'",$n1); - $n2 =str_replace("\n","<br />",$this->getExpected()); - $n2 =str_replace("\r","",$n2); - $n2 =str_replace("\\","\\\\",$n2); - $n2 =str_replace("'","\'",$n2); + $n2 = str_replace("\n","<br />",$this->getExpected()); + $n2 = str_replace("\r","",$n2); + $n2 = str_replace("\\","\\\\",$n2); + $n2 = str_replace("'","\'",$n2); $t = myentities($this->name); - $t =str_replace("\n","<br />",$t); - $t =str_replace("\r","",$t); + $t = str_replace("\n","<br />",$t); + $t = str_replace("\r","",$t); $t = str_replace("\\","\\\\",$t); $t = str_replace("'","\'",$t); @@ -432,6 +432,9 @@ $h = $this->ref_id; } $h = preg_replace("#\r\n#"," ",$h); + $h = str_replace("\r"," ",$h); + $h = str_replace("\n"," ",$h); + $h = str_replace("'","\'",$h); $r = ''; $r .= '<table class="popupinfo">'; @@ -870,7 +873,7 @@ // assigned bugs $r .= ' <td colspan="1" class="inputrow">'; if ($this->activ == 1) { - $r .= makelink('bugtracking/bug_new.php?medium=7&pid='.$baseobj->id.'&bug_testcaseid='.$this->id.'&reporterid='.$current_user->id.'&description='.UrlEncode($this->comment), $lang['BugCreate'],'','','bug'); + $r .= makelink('bugtracking/bug_new.php?medium=7&pid='.$baseobj->id.'&bugtracking_testcaseid='.$this->id.'&reporterid='.$current_user->id.'&description='.UrlEncode($this->comment), $lang['BugCreate'],'','','bug'); } else { $r .= $lang['BugCreate']; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-02-17 07:55:58
|
Revision: 28 http://tutos.svn.sourceforge.net/tutos/?rev=28&view=rev Author: gokohnert Date: 2011-02-17 07:55:52 +0000 (Thu, 17 Feb 2011) Log Message: ----------- fix Modified Paths: -------------- trunk/php/report-engine/rep_freemind/rep_freemind.pinc Modified: trunk/php/report-engine/rep_freemind/rep_freemind.pinc =================================================================== --- trunk/php/report-engine/rep_freemind/rep_freemind.pinc 2011-02-16 21:12:13 UTC (rev 27) +++ trunk/php/report-engine/rep_freemind/rep_freemind.pinc 2011-02-17 07:55:52 UTC (rev 28) @@ -250,7 +250,7 @@ $r .= $this->showexpense($this->obj); } - if ( isset(USESCRUMSPRINT) && $this->user->feature_ok(USESCRUMSPRINT,PERM_SEE) ) { + if ( defined(USESCRUMSPRINT) && $this->user->feature_ok(USESCRUMSPRINT,PERM_SEE) ) { loadmodule("scrumsprint"); ScrumSprint::obj_read($this->obj); $r .= $this->showsprints($this->obj); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-02-16 21:12:19
|
Revision: 27 http://tutos.svn.sourceforge.net/tutos/?rev=27&view=rev Author: gokohnert Date: 2011-02-16 21:12:13 +0000 (Wed, 16 Feb 2011) Log Message: ----------- new translations by Yan, SY FUNG. Added Paths: ----------- trunk/php/testmanager/tw.p3 trunk/php/testmanager/zh.p3 trunk/php/ticker/tw.p3 trunk/php/ticker/zh.p3 Added: trunk/php/testmanager/tw.p3 =================================================================== --- trunk/php/testmanager/tw.p3 (rev 0) +++ trunk/php/testmanager/tw.p3 2011-02-16 21:12:13 UTC (rev 27) @@ -0,0 +1,126 @@ +<?php +# $Id: tw.p3,v 1.23 2010/08/16 09:15:13 gokohnert Exp $ +# +# ========================= NOTE ======================== +# Please put site specific extensions and changes +# to TUTOS language files in a file called "tw_custom.p3" +# or "lang_custom.p3" (for all languages) +# using the same format like here +# ======================================================= + +# Testmanager +$lang['Testcase'] = '測試用例'; +$lang['Testcases'] = '測試用例'; +$lang['TestcaseRef'] = '參考'; +$lang['TestcaseName'] = '名稱'; +$lang['TestcaseSteps'] = '步驟'; +$lang['TestcaseExpected'] = '預期成果'; +$lang['TestcaseVersion'] = '版本'; +$lang['TestcasePosition'] = '位置'; +$lang['TestcaseComment'] = '評論結果'; +$lang['TestcaseCreation'] = '新增一個測試用例'; +$lang['TestcaseCreate'] = '新增一個測試用例'; +$lang['TestcaseCreateInfo'] = '新增一個測試用例至%s'; +$lang['TestcaseDetail'] = '測試用例內容'; +$lang['TestcaseOverview'] = '測試用例概況'; +$lang['TestcaseDelete'] = '刪除這個測試用例'; +$lang['TestcaseDeleteI'] = '刪除這個測試用例%s'; +$lang['TestcaseMod'] = '修改這個測試用例'; +$lang['TestcaseLinkInfo'] = '一個 %s 測試用例'; +$lang['TestcaseResult'] = '結果'; +$lang['TestcaseResults'][-1] = '開始'; +$lang['TestcaseResults'][0] = '失敗'; +$lang['TestcaseResults'][1] = '通過'; +$lang['TestcaseResults'][2] = '跳過'; +$lang['TestcaseResults'][3] = '未經測試'; +$lang['TestcaseSearch'] = '測試案例搜索'; +$lang['TestcaseSearchI'] = '搜索測試案例'; +$lang['TestcaseUsed'] = '使用'; + +$lang['Testsuite'] = '測試套件'; +$lang['Testsuites'] = '測試套件'; +$lang['TestsuiteRef'] = '參考'; +$lang['TestsuiteCreation'] = '建立測試套件'; +$lang['TestsuiteCreate'] = '添加測試套件'; +$lang['TestsuiteCreateInfo'] = '為 %s 建立測試套件'; +$lang['TestsuiteDetail'] = '測試套件內容'; +$lang['TestsuiteOverview'] = '測試套件概況'; +$lang['TestsuiteName'] = '名稱'; +$lang['TestsuiteDesc'] = '說明'; +$lang['TestsuiteVersion'] = '版本'; +$lang['TestsuiteNewVersion'] = '新版本'; +$lang['TestsuiteNewVersionI'] = '為 %s 建立新版本'; +$lang['TestsuitePosition'] = '定位'; +$lang['TestsuiteStats'] = '統計'; +$lang['TestsuiteDelete'] = '刪除測試套件'; +$lang['TestsuiteDeleteI'] = '刪除 %s 測試套件'; +$lang['TestsuiteMod'] = '修改測試套件'; +$lang['TestsuiteLinkInfo'] = '%s 測試套件'; +$lang['TestsuiteSearch'] = '測試套件搜索'; +$lang['TestsuiteSearchI'] = '搜索測試套件'; +$lang['TestsuiteCSVExport'] = '導出 CSV 格式'; +$lang['TestsuiteCSVExportI'] = '以 CSV 格式導出測試套件'; +$lang['TestsuiteSimulate'] = '模擬試運行'; +$lang['TestsuiteSimulateI'] = '模擬測試套件試運行'; +$lang['TestSuiteCopy'] = '複製測試套件'; +$lang['TestsuiteCopyOf'] = '複製'; +$lang['TestsuiteState'] = '狀況'; +$lang['TestsuiteStates'][0] = '未定義'; +$lang['TestsuiteStates'][1] = '工作中'; +$lang['TestsuiteStates'][2] = '發布'; +$lang['TestsuiteImport'] = '以 CSV 格式導入測試套件式'; +$lang['TestsuiteTest'] = '只預覽 CSV 文件'; + +$lang['Testrun'] = '試運行'; +$lang['Testruns'] = '試運行'; +$lang['TestrunRun'] = '運行測試'; +$lang['TestrunRef'] = '參考'; +$lang['TestrunName'] = '名稱'; +$lang['TestrunDesc'] = '說明'; +$lang['TestrunStats'] = '統計'; +$lang['TestrunTestTime'] = '測試時間'; +$lang['TestrunState'] = '狀況'; +$lang['TestrunStates'][0] = '未定義'; +$lang['TestrunStates'][1] = '始動'; +$lang['TestrunStates'][2] = '已關閉'; +$lang['TestrunSuiteB'] = '測試套件根基'; +$lang['TestrunSuiteR'] = '測試套件運行'; +$lang['TestrunCreate'] = '建立測試運行'; +$lang['TestrunCreateInfo'] = '建立基於 %s 的測試運行'; +$lang['TestrunDetail'] = '測試運行詳情'; +$lang['TestrunDelete'] = '刪除測試運行'; +$lang['TestrunDeleteI'] = '刪除這個 %s 測試運行'; +$lang['TestrunMod'] = '修改測試運行'; +$lang['TestrunSearch'] = '測試運行搜索'; +$lang['TestrunSearchI'] = '搜索測試運行'; +$lang['TestrunLastMod'] = '%s : %s 截至 %s'; +$lang['TestrunOverview'] = '測試運行概況'; +$lang['TestrunSelInfo'] = '(留空顯示所有)'; +$lang['TestrunStatistics'] = '統計'; +$lang['TestrunStatisticsI'] = '燃盡統計'; +$lang['TestrunRetest'] = '--> 建立複檢'; +$lang['TestrunRetestBase'] = '複檢基於'; +$lang['TestrunRetested'] = '複檢於'; +$lang['TestrunOldComment'] = '上次運行評論:'; +$lang['TestrunBurndown'] = '測試延燒圖'; +$lang['TestrunBurndownY'] = '# 測試用例'; +$lang['TestrunSignature'] = '署名'; + +$lang['Testmanager_Err001'] = '測試運行 "%s". 狀態是 %s. 沒有發生任何變化 !'; +$lang['Testmanager_Err002'] = '為 %s 保持現有的測試協議 %s'; +$lang['Testmanager_Err003'] = '複製基礎測試套件 %s 到 %s'; +$lang['Testmanager_Err004'] = '自動設置狀態 %s 到 %s'; +$lang['Testmanager_Err005'] = '你不可以開始測試運行'; +$lang['Testmanager_Err006'] = '測試用例已在測試運行中始動. 不允許修改 !'; +$lang['Testmanager_Err007'] = '測試套件已在測試運行中始動. 不允許修改 !'; +$lang['Testmanager_Err008'] = '測試套件已發布. 不允許修改 !'; +$lang['Testmanager_Err009'] = '句子: %s >> 第一串字符太長 %s > 80'; +$lang['Testmanager_Err010'] = '這將使新版本'.$lang['Testsuite'].' 和所有 '.$lang['Testsuites'].' 和 '.$lang['Testcases'].' 以下'; + +$lang['perm'][usetestsuite] = '使用測試套件'; +$lang['perm'][usetestcase] = '使用測試用例'; +$lang['perm'][usetestrun] = '使用測試運行'; +$lang['testsuite'] = &$lang['Testsuite']; +$lang['testcase'] = &$lang['Testcase']; +$lang['testrun'] = &$lang['Testrun']; +?> Property changes on: trunk/php/testmanager/tw.p3 ___________________________________________________________________ Added: svn:mime-type + text/x-php Added: svn:eol-style + native Added: trunk/php/testmanager/zh.p3 =================================================================== --- trunk/php/testmanager/zh.p3 (rev 0) +++ trunk/php/testmanager/zh.p3 2011-02-16 21:12:13 UTC (rev 27) @@ -0,0 +1,126 @@ +<?php +# $Id: zh.p3,v 1.23 2010/08/16 09:15:13 gokohnert Exp $ +# +# ========================= NOTE ======================== +# Please put site specific extensions and changes +# to TUTOS language files in a file called "zh_custom.p3" +# or "lang_custom.p3" (for all languages) +# using the same format like here +# ======================================================= + +# Testmanager +$lang['Testcase'] = '测试用例'; +$lang['Testcases'] = '测试用例'; +$lang['TestcaseRef'] = '参考'; +$lang['TestcaseName'] = '名称'; +$lang['TestcaseSteps'] = '步骤'; +$lang['TestcaseExpected'] = '预期成果'; +$lang['TestcaseVersion'] = '版本'; +$lang['TestcasePosition'] = '位置'; +$lang['TestcaseComment'] = '评论结果'; +$lang['TestcaseCreation'] = '新增一个测试用例'; +$lang['TestcaseCreate'] = '新增一个测试用例'; +$lang['TestcaseCreateInfo'] = '新增一个测试用例至%s'; +$lang['TestcaseDetail'] = '测试用例內容'; +$lang['TestcaseOverview'] = '测试用例概概况'; +$lang['TestcaseDelete'] = '刪除这个测试用例'; +$lang['TestcaseDeleteI'] = '刪除这个测试用例%s'; +$lang['TestcaseMod'] = '修改这个测试用例'; +$lang['TestcaseLinkInfo'] = '一个 %s 测试用例'; +$lang['TestcaseResult'] = '结果'; +$lang['TestcaseResults'][-1] = '开始'; +$lang['TestcaseResults'][0] = '失败'; +$lang['TestcaseResults'][1] = '通过'; +$lang['TestcaseResults'][2] = '跳过'; +$lang['TestcaseResults'][3] = '未经测试'; +$lang['TestcaseSearch'] = '测试案例搜寻'; +$lang['TestcaseSearchI'] = '搜寻测试案例'; +$lang['TestcaseUsed'] = '使用'; + +$lang['Testsuite'] = '测试套件'; +$lang['Testsuites'] = '测试套件'; +$lang['TestsuiteRef'] = '参考'; +$lang['TestsuiteCreation'] = '建立测试套件'; +$lang['TestsuiteCreate'] = '添加测试套件'; +$lang['TestsuiteCreateInfo'] = '为 %s 建立测试套件'; +$lang['TestsuiteDetail'] = '测试套件內容'; +$lang['TestsuiteOverview'] = '测试套件概況'; +$lang['TestsuiteName'] = '名称'; +$lang['TestsuiteDesc'] = '说明'; +$lang['TestsuiteVersion'] = '版本'; +$lang['TestsuiteNewVersion'] = '新版本'; +$lang['TestsuiteNewVersionI'] = '为 %s 建立新版本'; +$lang['TestsuitePosition'] = '定位'; +$lang['TestsuiteStats'] = '统计'; +$lang['TestsuiteDelete'] = '刪除测试套件'; +$lang['TestsuiteDeleteI'] = '刪除 %s 测试套件'; +$lang['TestsuiteMod'] = '修改测试套件'; +$lang['TestsuiteLinkInfo'] = '%s 测试套件'; +$lang['TestsuiteSearch'] = '测试套件搜寻'; +$lang['TestsuiteSearchI'] = '搜寻测试套件'; +$lang['TestsuiteCSVExport'] = '导出 CSV 格式'; +$lang['TestsuiteCSVExportI'] = '以 CSV 格式导出测试套件'; +$lang['TestsuiteSimulate'] = '模拟试运行'; +$lang['TestsuiteSimulateI'] = '模拟测试套件试运行'; +$lang['TestSuiteCopy'] = '复制测试套件'; +$lang['TestsuiteCopyOf'] = '复制'; +$lang['TestsuiteState'] = '狀況'; +$lang['TestsuiteStates'][0] = '未定义'; +$lang['TestsuiteStates'][1] = '工作中'; +$lang['TestsuiteStates'][2] = '发布'; +$lang['TestsuiteImport'] = '以 CSV 格式导入测试套件式'; +$lang['TestsuiteTest'] = '只预览 CSV 文件'; + +$lang['Testrun'] = '试运行'; +$lang['Testruns'] = '试运行'; +$lang['TestrunRun'] = '运行测试'; +$lang['TestrunRef'] = '参考'; +$lang['TestrunName'] = '名称'; +$lang['TestrunDesc'] = '说明'; +$lang['TestrunStats'] = '统计'; +$lang['TestrunTestTime'] = '测试时间'; +$lang['TestrunState'] = '狀況'; +$lang['TestrunStates'][0] = '未定义'; +$lang['TestrunStates'][1] = '始动'; +$lang['TestrunStates'][2] = '已关闭'; +$lang['TestrunSuiteB'] = '测试套件根基'; +$lang['TestrunSuiteR'] = '测试套件运行'; +$lang['TestrunCreate'] = '建立测试运行'; +$lang['TestrunCreateInfo'] = '建立基於 %s 的测试运行'; +$lang['TestrunDetail'] = '测试运行詳情'; +$lang['TestrunDelete'] = '刪除测试运行'; +$lang['TestrunDeleteI'] = '刪除这个 %s 测试运行'; +$lang['TestrunMod'] = '修改测试运行'; +$lang['TestrunSearch'] = '测试运行搜寻'; +$lang['TestrunSearchI'] = '搜寻测试运行'; +$lang['TestrunLastMod'] = '%s : %s 截至 %s'; +$lang['TestrunOverview'] = '测试运行概況'; +$lang['TestrunSelInfo'] = '(留空显示所有)'; +$lang['TestrunStatistics'] = '统计'; +$lang['TestrunStatisticsI'] = '燃盡统计'; +$lang['TestrunRetest'] = '--> 建立复检'; +$lang['TestrunRetestBase'] = '复检基於'; +$lang['TestrunRetested'] = '复检於'; +$lang['TestrunOldComment'] = '上次运行评论:'; +$lang['TestrunBurndown'] = '测试燃盡图'; +$lang['TestrunBurndownY'] = '# 测试用例'; +$lang['TestrunSignature'] = '署名'; + +$lang['Testmanager_Err001'] = '测试运行 "%s". 状态是 %s. 沒有发生任何变化 !'; +$lang['Testmanager_Err002'] = '为 %s 保持现有的测试协议 %s'; +$lang['Testmanager_Err003'] = '复制基礎测试套件 %s 到 %s'; +$lang['Testmanager_Err004'] = '自动设置状态 %s 到 %s'; +$lang['Testmanager_Err005'] = '你不可以开始测试运行'; +$lang['Testmanager_Err006'] = '测试用例已在测试运行中始动. 不允许修改 !'; +$lang['Testmanager_Err007'] = '测试套件已在测试运行中始动. 不允许修改 !'; +$lang['Testmanager_Err008'] = '测试套件已发布. 不允许修改 !'; +$lang['Testmanager_Err009'] = '句子: %s >> 第一串字符太长 %s > 80'; +$lang['Testmanager_Err010'] = '这将使新版本'.$lang['Testsuite'].' 和所有 '.$lang['Testsuites'].' 和 '.$lang['Testcases'].' 以下'; + +$lang['perm'][usetestsuite] = '使用测试套件'; +$lang['perm'][usetestcase] = '使用测试用例'; +$lang['perm'][usetestrun] = '使用测试运行'; +$lang['testsuite'] = &$lang['Testsuite']; +$lang['testcase'] = &$lang['Testcase']; +$lang['testrun'] = &$lang['Testrun']; +?> Property changes on: trunk/php/testmanager/zh.p3 ___________________________________________________________________ Added: svn:mime-type + text/x-php Added: svn:eol-style + native Added: trunk/php/ticker/tw.p3 =================================================================== --- trunk/php/ticker/tw.p3 (rev 0) +++ trunk/php/ticker/tw.p3 2011-02-16 21:12:13 UTC (rev 27) @@ -0,0 +1,15 @@ +<?php +# $Id: tw.p3,v 1.2 2002/11/05 19:57:49 gokohnert Exp $ +# +# ========================= NOTE ======================== +# Please put site specific extensions and changes +# to TUTOS language files in a file called "tw_custom.p3" +# or "lang_custom.p3" (for all languages) +# using the same format like here +# ======================================================= + +# Newsticker +$lang['NewsTicker'] = "新聞速遞"; + +$lang['perm'][useticker] = "使用 新聞速遞"; +?> Property changes on: trunk/php/ticker/tw.p3 ___________________________________________________________________ Added: svn:mime-type + text/x-php Added: svn:eol-style + native Added: trunk/php/ticker/zh.p3 =================================================================== --- trunk/php/ticker/zh.p3 (rev 0) +++ trunk/php/ticker/zh.p3 2011-02-16 21:12:13 UTC (rev 27) @@ -0,0 +1,15 @@ +<?php +# $Id: zh.p3,v 1.2 2002/11/05 19:57:49 gokohnert Exp $ +# +# ========================= NOTE ======================== +# Please put site specific extensions and changes +# to TUTOS language files in a file called "zh_custom.p3" +# or "lang_custom.p3" (for all languages) +# using the same format like here +# ======================================================= + +# Newsticker +$lang['NewsTicker'] = "使用 新闻速递"; + +$lang['perm'][useticker] = "使用 新闻速递"; +?> Property changes on: trunk/php/ticker/zh.p3 ___________________________________________________________________ Added: svn:mime-type + text/x-php Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-02-16 21:02:11
|
Revision: 26 http://tutos.svn.sourceforge.net/tutos/?rev=26&view=rev Author: gokohnert Date: 2011-02-16 21:02:05 +0000 (Wed, 16 Feb 2011) Log Message: ----------- fix html Modified Paths: -------------- trunk/php/stuff/stuff.pinc Modified: trunk/php/stuff/stuff.pinc =================================================================== --- trunk/php/stuff/stuff.pinc 2011-02-16 21:01:06 UTC (rev 25) +++ trunk/php/stuff/stuff.pinc 2011-02-16 21:02:05 UTC (rev 26) @@ -516,11 +516,11 @@ $url = 'stuff/stuff_new.php?refid='. $obj->id; if ($obj->getType() == 'expense' ) { - $url = addUrlParameter($url,'price='.$obj->gamount,true); - $url = addUrlParameter($url,'currency='.$obj->currency,true); - $url = addUrlParameter($url,'ownerid='.$obj->adr_id,true); - $url = addUrlParameter($url,'p_date='.$obj->t_start->getYYYYMMDD(),true); - $url = addUrlParameter($url,'name='.$obj->name,true); + $url = addUrlParameter($url,'price='.$obj->gamount,false); + $url = addUrlParameter($url,'currency='.$obj->currency,false); + $url = addUrlParameter($url,'ownerid='.$obj->adr_id,false); + $url = addUrlParameter($url,'p_date='.$obj->t_start->getYYYYMMDD(),false); + $url = addUrlParameter($url,'name='.$obj->name,false); $x = array( url => $url, confirm => false, text => ($text == '' ? $lang['StuffCreate2']:$text), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-02-16 21:01:13
|
Revision: 25 http://tutos.svn.sourceforge.net/tutos/?rev=25&view=rev Author: gokohnert Date: 2011-02-16 21:01:06 +0000 (Wed, 16 Feb 2011) Log Message: ----------- fixes on expense module Modified Paths: -------------- trunk/php/expense/expense.pinc trunk/php/expense/expense_ins.php trunk/php/expense/expense_new.php trunk/php/expense/expense_show.php Modified: trunk/php/expense/expense.pinc =================================================================== --- trunk/php/expense/expense.pinc 2011-02-16 18:39:55 UTC (rev 24) +++ trunk/php/expense/expense.pinc 2011-02-16 21:01:06 UTC (rev 25) @@ -67,16 +67,16 @@ foreach($lang['ExpenseCategories'] as $i => $f) { $r .= '<option value="'. $i .'"'; if ( $i == $default ) { - $r .= " selected "; + $r .= ' selected="selected" '; } $r .= ">". $f ."</option>\n"; } if ( $any > 0 ) { $r .= '<option value="-1"'; if ( -1 == $default ) { - $r .= " selected "; + $r .= ' selected="selected" '; } - $r .= ">". $lang['any'] ."</option>\n"; + $r .= '>'. $lang['any'] ."</option>\n"; } $r .= "</select>\n"; return $r; @@ -92,14 +92,14 @@ foreach($lang['ExpenseMOPs'] as $i => $f) { $r .= '<option value="'. $i .'"'; if ( $i == $default ) { - $r .= " selected "; + $r .= ' selected="selected" '; } $r .= ">". $f ."</option>\n"; } if ( $any > 0 ) { $r .= '<option value="-1"'; if ( -1 == $default ) { - $r .= " selected "; + $r .= ' selected="selected" '; } $r .= ">". $lang['any'] ."</option>\n"; } @@ -791,7 +791,7 @@ case 'ExpenseReference': case 'ExpenseInvoice': $x = resolve_history_obj($f,$this->dbconn); - break; + break; case 'ExpenseCategory': $x = resolve_history_lgarr ($f,'ExpenseCategories'); break; @@ -801,7 +801,7 @@ case 'ExpenseStartTime': case 'ExpenseEndTime': $x = resolve_history_datetime($f,$this->dbconn,false); - break; + break; default: return null; } Modified: trunk/php/expense/expense_ins.php =================================================================== --- trunk/php/expense/expense_ins.php 2011-02-16 18:39:55 UTC (rev 24) +++ trunk/php/expense/expense_ins.php 2011-02-16 21:01:06 UTC (rev 25) @@ -48,6 +48,7 @@ } if ( empty($_POST['name']) ) { $msg .= sprintf($lang['Err0009'],$lang['ExpenseName']) ."<br />"; + $gotourl = addBadField($gotourl,'name',true); } else { $u->setName(trim($_POST['name'])); $gotourl= addUrlParameter($gotourl,"name=". UrlEncode($u->name),true); @@ -97,19 +98,14 @@ $gotourl= addUrlParameter($gotourl,"link_id=". $u->link_id,true); $u->read_reference(); } -if ( empty($_POST['adr_id']) ) { - $msg .= "No Address ID given !<br />"; -} else { - $u->setAdrReference($_POST['adr_id']); - $gotourl= addUrlParameter($gotourl,"adr_id=". $u->adr_id,true); - $u->read_adr_reference(); -} + if ( isset($_POST['invoice']) ) { $u->setInvoice(trim($_POST['invoice'])); $gotourl= addUrlParameter($gotourl,"invoice=". UrlEncode($u->invoice),true); } if ( empty($_POST['gamount']) ) { $msg .= sprintf($lang['Err0009'],$lang['ExpenseGAmount']) ."<br />"; + $gotourl = addBadField($gotourl,'gamount',true); } else { $u->setGAmount(trim($_POST['gamount'])); $gotourl= addUrlParameter($gotourl,"gamount=". UrlEncode($u->gamount),true); @@ -147,6 +143,8 @@ if ( isset($_POST['sfn']) ) { if ( empty($_POST['sfn']) ) { $u->setSupplier(-1); + $msg .= sprintf($lang['Err0009'],$lang['ExpenseSupplier']) ."<br />"; + $gotourl = addBadField($gotourl,'s',true); } else { $x = check_field($_POST['sfn'],"sfn","sl","cd"); if (is_object($x)) { @@ -159,6 +157,25 @@ $gotourl= addUrlParameter($gotourl,"sid=". $_POST['sid'],true); } +// recipe +if ( isset($_POST['afn']) ) { + if ( empty($_POST['afn']) ) { + $u->setAdrReference(-1); + $msg .= sprintf($lang['Err0009'],$lang['ExpenseAddress']) ."<br />"; + $gotourl = addBadField($gotourl,'a',true); + } else { + $x = check_field($_POST['afn'],"afn","al","a"); + if (is_object($x)) { + $u->setAdrReference($x->id); + $u->read_adr_reference(); + $gotourl= addUrlParameter($gotourl,"aid=". $x->id,true); + } + } +} else if ( isset($_POST['aid']) ) { + $u->setAdrReference($_POST['aid']); + $u->read_adr_reference(); + $gotourl= addUrlParameter($gotourl,"aid=". $_POST['aid'],true); +} # # Parse additional custom fields Modified: trunk/php/expense/expense_new.php =================================================================== --- trunk/php/expense/expense_new.php 2011-02-16 18:39:55 UTC (rev 24) +++ trunk/php/expense/expense_new.php 2011-02-16 21:01:06 UTC (rev 25) @@ -50,12 +50,15 @@ if ($this->obj->id == -1) { $r .= ($this->obj->ref != null ? $lang[$this->obj->ref->getType()]:'') ." ". $this->obj->getRefLink() ."\n"; $this->addhidden("link_id",$this->obj->link_id); - } else { + } else if (count($this->obj->plist) > 1) { $r .= " <select name=\"link_id\">\n"; foreach ($this->obj->plist as $i => $f) { - $r .= " <option value=\"". $i ."\"". ($i == $this->obj->link_id ? " selected>* ":">") . $lang[$f->getType()] .": ". $f->getFullName() ."</option>\n"; + $r .= " <option value=\"". $i ."\"". ($i == $this->obj->link_id ? ' selected="selected">* ':'>') . $lang[$f->getType()] .": ". $f->getFullName() ."</option>\n"; } $r .= " </select>\n"; + } else { + $r .= ($this->obj->ref != null ? $lang[$this->obj->ref->getType()]:'') ." ". $this->obj->getRefLink() ."\n"; + $this->addhidden("link_id",$this->obj->link_id); } $r .= " </td>\n"; $r .= "</tr>\n"; @@ -68,16 +71,15 @@ $r .= "</tr>\n"; $r .= "<tr>\n"; - $r .= $this->showfieldc($lang['ExpenseAddress'],1,"adr_id"); + $r .= $this->showfieldc($lang['ExpenseAddress'],1,"aid"); $r .= " <td colspan=\"5\">\n"; - $r .= $lang[$this->obj->adr_ref->getType()] ." ". $this->obj->adr_ref->getLink() . "\n"; - $this->addhidden("adr_id",$this->obj->adr_ref->id); + $r .= select_from_array_or_input($this->obj,'a',$this->obj->adr_ref,0,'a'); $r .= " </td>\n"; $r .= "</tr>\n"; $r .= "<tr>\n"; $r .= $this->showfieldc($lang['ExpenseName'],1,"name"); - $r .= " <td colspan=\"5\"><input id=\"name\" size=\"80\" maxlength=\"". $table['expense']['name'][size] ."\" name=\"name\" value=\"". myentities($this->obj->name) ."\"></td>\n"; + $r .= ' <td colspan="5"><input id="name" size="80" maxlength="'. $table['expense']['name'][size] .'" name="name" value="'. myentities($this->obj->name) ."\" /></td>\n"; $r .= "</tr>\n"; $r .= "<tr>\n"; @@ -90,18 +92,18 @@ $r .= "<tr>\n"; $r .= $this->showfieldc($lang['ExpenseReason'],0,"reason"); - $r .= " <td colspan=\"5\"><input id=\"reason\" size=\"80\" maxlength=\"". $table['expense']['reason'][size] ."\" name=\"reason\" value=\"". myentities($this->obj->reason) ."\"></td>\n"; + $r .= ' <td colspan="5"><input id="reason" size="80" maxlength="'. $table['expense']['reason'][size] .'" name="reason" value="'. myentities($this->obj->reason) ."\" /></td>\n"; $r .= "</tr>\n"; $r .= "<tr>\n"; $r .= $this->showfieldc($lang['ExpensePeople'],0,"people"); - $r .= " <td colspan=\"5\"><textarea id=\"people\" rows=\"1\" cols=\"60\" name=\"people\">". $this->obj->people ."</textarea></td>\n"; + $r .= ' <td colspan="5"><textarea id="people" rows="1" cols="60" name="people">'. $this->obj->people ."</textarea></td>\n"; $r .= "</tr>\n"; $r .= "<tr>\n"; $r .= $this->showfieldc($lang['ExpenseGAmount'],1,"gamount"); $check = ""check_all_float(this,'".$lang['DecPoint']."');\""; - $r .= ' <td colspan="1"><input size="10" maxlength="10" name="gamount" '. $check.' value="'. my_number_format($this->obj->gamount,2) ."\">\n"; + $r .= ' <td colspan="1"><input id="gamount" size="10" maxlength="10" name="gamount" '. $check.' value="'. my_number_format($this->obj->gamount,2) ."\" />\n"; $r .= Currency_Select("currency",$this->obj->currency); $r .= " </td>\n"; $r .= $this->showfieldc($lang['ExpenseITax'],0,"itax"); @@ -113,7 +115,8 @@ $r .= "<tr>\n"; $r .= $this->showfieldc($lang['ExpenseDeduction'],0,"deduction"); $check = ""check_all_float(this,'".$lang['DecPoint']."');\""; - $r .= ' <td colspan="1"><input size="10" maxlength="10" name="deduction" '.$check.' value="'. my_number_format($this->obj->deduction,2) ."\">\n"; + $r .= ' <td colspan="1"><input id="deduction" size="10" maxlength="10" name="deduction" '.$check.' value="'. my_number_format($this->obj->deduction,2) ."\" />\n"; + $r .= " </td>\n"; $r .= "</tr>\n"; $r .= "<tr>\n"; @@ -141,7 +144,7 @@ $r .= "<tr>\n"; $r .= $this->showfieldc($lang['City'],0,"city"); - $r .= " <td colspan=\"5\"><input id=\"city\" size=\"80\" maxlength=\"". $table['expense']['city'][size] ."\" name=\"city\" value=\"". myentities($this->obj->city) ."\"></td>\n"; + $r .= ' <td colspan="5"><input id="city" size="80" maxlength="'. $table['expense']['city'][size] .'" name="city" value="'. myentities($this->obj->city) ."\" /></td>\n"; $r .= "</tr>\n"; $r .= "<tr>\n"; @@ -153,12 +156,12 @@ $r .= "<tr>\n"; $r .= $this->showfieldc($lang['ExpenseCCentre'],0,"ccentre"); - $r .= " <td colspan=\"5\"><input id=\"ccentre\" size=\"80\" maxlength=\"". $table['expense']['ccentre'][size] ."\" name=\"ccentre\" value=\"". myentities($this->obj->ccentre) ."\"></td>\n"; + $r .= ' <td colspan="5"><input id="ccentre" size="80" maxlength="'. $table['expense']['ccentre'][size] .'" name="ccentre" value="'. myentities($this->obj->ccentre) ."\" /></td>\n"; $r .= "</tr>\n"; $r .= "<tr>\n"; $r .= $this->showfield($lang['ExpenseDescription'],0,"description"); - $r .= " <td colspan=\"5\"><textarea id=\"description\" rows=\"10\" cols=\"60\" name=\"description\">". $this->obj->description ."</textarea></td>\n"; + $r .= ' <td colspan="5"><textarea id="description" rows="10" cols="60" name="description">'. $this->obj->description ."</textarea></td>\n"; $r .= "</tr>\n"; // Edit additional custom fields @@ -177,6 +180,7 @@ $r .= $this->DataTableEnd(); $r .= hiddenFormElements(); $r .= $this->getHidden(); + $r .= $this->markBadFields(); $r .= "</form>\n"; $r .= $this->setfocus("expensenew.name"); $r .= $lang['FldsRequired'] ."\n"; @@ -209,18 +213,12 @@ if ( isset($_GET['link_id']) ){ $this->obj->link_id = $_GET['link_id']; } - if ( isset($_GET['adr_id']) ){ - $this->obj->adr_id = $_GET['adr_id']; - } if ( isset($_GET['invoice']) ){ $this->obj->invoice = $_GET['invoice']; } - if ( isset($_GET['gamount']) ){ - $this->obj->gamount = $_GET['gamount']; - } - if ( isset($_GET['deduction']) ){ - $this->obj->deduction = $_GET['deduction']; - } + $this->obj->set_float_from_arg('gamount','gamount',$lang['ExpenseGAmount']); + $this->obj->set_float_from_arg('deduction','deduction',$lang['ExpenseDeduction']); + if ( isset($_GET['itax']) ){ $this->obj->itax = $_GET['itax']; } @@ -233,18 +231,12 @@ if ( isset($_GET['category']) ){ $this->obj->category = $_GET['category']; } - if ( isset($_GET['reason']) ){ - $this->obj->reason = trim($_GET['reason']); - } - if ( isset($_GET['people']) ){ - $this->obj->people = trim($_GET['people']); - } - if ( isset($_GET['city']) ){ - $this->obj->city = trim($_GET['city']); - } - if ( isset($_GET['country']) ){ - $this->obj->country = trim($_GET['country']); - } + + $this->obj->set_string_from_arg('reason','reason',$lang['ExpenseReason']); + $this->obj->set_string_from_arg('people','people',$lang['ExpensePeople']); + $this->obj->set_string_from_arg('ciy','city',$lang['City']); + $this->obj->set_string_from_arg('country','country',$lang['Country']); + if ( isset($_GET['currency']) ){ $this->obj->currency = trim($_GET['currency']); } @@ -254,13 +246,13 @@ if ( isset($_GET['ccentre']) ){ $this->obj->ccentre = trim($_GET['ccentre']); } - if ( isset($_GET['t_start']) ) { - $this->obj->t_start->setDateTime($_GET['t_start']); - } - if ( isset($_GET['t_end']) ) { - $this->obj->t_end->setDateTime($_GET['t_end']); - } + $this->obj->set_datetime_from_arg('t_start','t_start',$lang['ExpenseStartTime']); + $this->obj->set_datetime_from_arg('t_end','t_end',$lang['ExpenseEndTime']); + + preset_from_array_or_input($this->obj,'adr_ref','a'); + preset_from_array_or_input($this->obj,'supplier','s'); + if (($this->obj->id < 0) && !$this->user->feature_ok(useexpenses,PERM_NEW) ) { $msg .= sprintf($lang['Err0054'],$lang[$this->obj->getType()]); $this->stop = true; @@ -306,5 +298,5 @@ ?> <!-- SVN Info $Id$ - $Author$ - --> \ No newline at end of file +$Author$ +--> \ No newline at end of file Modified: trunk/php/expense/expense_show.php =================================================================== --- trunk/php/expense/expense_show.php 2011-02-16 18:39:55 UTC (rev 24) +++ trunk/php/expense/expense_show.php 2011-02-16 21:01:06 UTC (rev 25) @@ -48,7 +48,7 @@ $r .= "<tr>\n"; $r .= $this->showfield($lang['ExpenseName']); - $r .= "<td colspan=\"3\"><b><font size=\"+1\">". myentities($this->obj->name) ."</font><b></td>"; + $r .= "<td colspan=\"3\"><b><font size=\"+1\">". myentities($this->obj->name) ."</font></b></td>"; $r .= "</tr>\n"; $r .= "<tr>\n"; @@ -98,7 +98,7 @@ $r .= "<tr>\n"; $r .= $this->showfield($lang['ExpenseNAmount']); $r .= "<td colspan=\"3\"><b>". number_format($this->obj->getNetAmount(),2,$lang['DecPoint'],$lang['ThousandPoint']) - ." ". myentities($this->obj->currency) ."<b></td>"; + ." ". myentities($this->obj->currency) ."</b></td>"; $r .= "</tr>\n"; $r .= $this->showfield_data_row($this->obj,$table['expense']['t_start'],3,1); @@ -206,5 +206,5 @@ ?> <!-- SVN Info $Id$ - $Author$ - --> \ No newline at end of file +$Author$ +--> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-02-16 18:40:01
|
Revision: 24 http://tutos.svn.sourceforge.net/tutos/?rev=24&view=rev Author: gokohnert Date: 2011-02-16 18:39:55 +0000 (Wed, 16 Feb 2011) Log Message: ----------- fix missing layout on first popup Modified Paths: -------------- trunk/html/default.css trunk/html/nuke.css trunk/php/admin_sync.php trunk/php/database_show.php trunk/php/layout/layout_base.pinc trunk/php/layout/new2_layout.pinc trunk/php/layout/new_layout.pinc trunk/php/webelements.p3 trunk/robots.txt Property Changed: ---------------- trunk/ trunk/robots.txt Property changes on: trunk ___________________________________________________________________ Modified: svn:ignore - *.list *.zip tmp cron.log apache_2.conf apache.conf tutos.spec lang_custom.p3 check.sh replace.sh testinst.sh repository + *.list *.zip tmp cron.log apache_2.conf apache.conf tutos.spec lang_custom.p3 check.sh replace.sh testinst.sh repository config.pinc.* Modified: trunk/html/default.css =================================================================== --- trunk/html/default.css 2011-02-16 16:17:56 UTC (rev 23) +++ trunk/html/default.css 2011-02-16 18:39:55 UTC (rev 24) @@ -63,13 +63,18 @@ font-size: xx-small; } +#loginform TABLE { + min-width: 200px; + max-width: 270px; +} TD.motd { background-image: url(../html/tutos_bg.png); background-repeat: no-repeat; background-position: center; font-family: monospace; - height: 255px; + min-height: 280px; + min-width: 370px; white-space: pre; } Modified: trunk/html/nuke.css =================================================================== --- trunk/html/nuke.css 2011-02-16 16:17:56 UTC (rev 23) +++ trunk/html/nuke.css 2011-02-16 18:39:55 UTC (rev 24) @@ -78,12 +78,12 @@ } .message { - background: #feeeee; + background: #feeeee; color: black; } .info { - background: #eeeefe; + background: #eeeefe; color: black; } @@ -498,7 +498,7 @@ border-style: solid; color: black; font-size: 9pt; - background: white; + background: white; } INPUT:disabled { @@ -534,17 +534,17 @@ * menu colring */ .menu_text_active { - color: black; + color: black; } .sf-menu li { /* background: #BDD2FF; */ } .sf-menu li li { - background: #dAdAcA; + background: #dAdAcA; } .sf-menu li li li { - background: #DDD; + background: #DDD; } .menu_active, @@ -552,9 +552,9 @@ .sf-vertical a:focus, .sf-vertical a:hover, .sf-vertical a:active, .sf-menu ul li:hover, .sf-menu ul li.sfHover, .sf-menu ul a:focus, .sf-menu ul a:hover, .sf-menu ul a:active { - background: #ffff72; - outline: 0; + background: #ffff72; + outline: 0; } -/* EOF */ +/* EOF */ \ No newline at end of file Modified: trunk/php/admin_sync.php =================================================================== --- trunk/php/admin_sync.php 2011-02-16 16:17:56 UTC (rev 23) +++ trunk/php/admin_sync.php 2011-02-16 18:39:55 UTC (rev 24) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2001 - 2010 by Gero Kohnert + * Copyright 2001 - 2011 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -140,7 +140,8 @@ return $q; } - /* --------------------------------------------------------------------------- + + /** * Copy a selection of objects */ Function copy_selected(&$dbconn1,&$dbconn2) { @@ -266,6 +267,7 @@ $dbconn1->db->save(); return $r; } + /** * */ @@ -328,6 +330,7 @@ $dbconn2->Commit("WORK"); return $r; } + /** * info 3 */ @@ -364,6 +367,7 @@ $dbconn2->Close(); return $r; } + /** * Show infos , test input and ask to continue */ @@ -518,6 +522,7 @@ $dbconn2->Close(); return $r; } + /** * Step 0 */ @@ -661,6 +666,11 @@ $msg .= "Source and target must be different !"; $this->step = 1; } + + if ($tutos[usesync] != 1) { + $msg .= $lang['FeatureOff']."<br />\n"; + $this->stop = true; + } if ( $this->user->admin == 0 ) { $msg .= "Only admins are allowed to see this<br />"; if ( $tutos[demo] == 1 ) { @@ -685,5 +695,5 @@ ?> <!-- SVN Info $Id$ - $Author$ - --> \ No newline at end of file +$Author$ +--> \ No newline at end of file Modified: trunk/php/database_show.php =================================================================== --- trunk/php/database_show.php 2011-02-16 16:17:56 UTC (rev 23) +++ trunk/php/database_show.php 2011-02-16 18:39:55 UTC (rev 24) @@ -1,6 +1,6 @@ <?php /** - * Copyright 2001 - 2010 by Gero Kohnert + * Copyright 2001 - 2011 by Gero Kohnert * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -183,13 +183,14 @@ ); $this->addMenu($x); - $x = array( url => 'admin_sync.php', - text => $lang['AdminDBSync'], - info => $lang['AdminDBSync'], - category => array('database','support',usedbs) - ); - $this->addMenu($x); - + if ($tutos[usesync] == 1) { + $x = array( url => 'admin_sync.php', + text => $lang['AdminDBSync'], + info => $lang['AdminDBSync'], + category => array('database','support',usedbs) + ); + $this->addMenu($x); + } if ( is_object($this->obj) && $this->obj->is_supported() ) { $x = array( url => 'admin/update.php?id='. $this->obj->id , text => $lang['DBUpdate'], @@ -220,5 +221,5 @@ ?> <!-- SVN Info $Id$ - $Author$ - --> \ No newline at end of file +$Author$ +--> \ No newline at end of file Modified: trunk/php/layout/layout_base.pinc =================================================================== --- trunk/php/layout/layout_base.pinc 2011-02-16 16:17:56 UTC (rev 23) +++ trunk/php/layout/layout_base.pinc 2011-02-16 18:39:55 UTC (rev 24) @@ -151,8 +151,8 @@ $r .= '<![endif]-->'."\n"; $r .= ' <script type="text/javascript" language="JavaScript" src="'.$tutos['base'].'/html/js/jquery.bt.min.js"></script>'."\n"; - $tutos['pagescript'] .= " -jQuery.bt.defaults.width = 400; + $tutos['pagescript'] = " +jQuery.bt.defaults.width = 200; jQuery.bt.defaults.positions = ['top','left','right','bottom']; jQuery.bt.defaults.padding = 0; jQuery.bt.defaults.shadow = true; @@ -167,11 +167,13 @@ jQuery.bt.defaults.spikeLength = 18; jQuery.bt.defaults.fill = '#222'; jQuery.bt.defaults.cssStyles = { width: 'auto'}; +jQuery.bt.defaults.windowMargin = '0px'; +jQuery.bt.defaults.padding = '0px'; $(function() { $.datepicker.setDefaults( $.datepicker.regional[ \"".$tutos[lang]."\" ] ); $.datepicker.setDefaults({autoSize:true,changeYear:true,changeMonth:true,showOtherMonths:true,showWeek:true,dateFormat:\"".TUTOS_Date_Time::getDateFormat()."\"}); -});\n"; +});\n". $tutos['pagescript']; return $r; } Modified: trunk/php/layout/new2_layout.pinc =================================================================== --- trunk/php/layout/new2_layout.pinc 2011-02-16 16:17:56 UTC (rev 23) +++ trunk/php/layout/new2_layout.pinc 2011-02-16 18:39:55 UTC (rev 24) @@ -357,7 +357,7 @@ Function getHidden() { $r = ''; foreach ($this->hidden as $v ) { - $r .= '<input id="'. preg_replace('#\[\]#','',$v[0]) .'" type="hidden" name="'. $v[0] .'" value="'. $v[1] ."\" />\n"; + $r .= '<input type="hidden" name="'. $v[0] .'" value="'. $v[1] ."\" />\n"; } $this->hidden = array(); return $r; @@ -1229,9 +1229,6 @@ foreach ($tutos[loadedmodules] as $m) { $pinfo .= '<tr><td>'.$tutos[modules][$m][name].'</td><td><span class="smaller">'. $tutos[modules][$m][Desc].'</span></td></tr>'; } - # $pinfo .= '<tr><td>'.$lang['ScrumLogRCap'].': '. hour_format($this->capacity).' '.$lang['hours'].'</td></tr>'; - # $pinfo .= '<tr><td>'.$lang['ScrumLogPrio'].':<span style="'.$this->getPrioColor($this->prio).'"> '. $this->prio ." </span></td></tr>"; - $pinfo .= "</table>"; $tutos['pagescript'] .= "$('#tutosversion').bt('".addslashes($pinfo)."');\n"; } Modified: trunk/php/layout/new_layout.pinc =================================================================== --- trunk/php/layout/new_layout.pinc 2011-02-16 16:17:56 UTC (rev 23) +++ trunk/php/layout/new_layout.pinc 2011-02-16 18:39:55 UTC (rev 24) @@ -370,7 +370,7 @@ Function getHidden() { $r = ''; foreach ($this->hidden as $v ) { - $r .= '<input id="'. preg_replace('#\[\]#','',$v[0]) .'" type="hidden" name="'. $v[0] .'" value="'. $v[1] ."\" />\n"; + $r .= '<input type="hidden" name="'. $v[0] .'" value="'. $v[1] ."\" />\n"; } $this->hidden = array(); return $r; Modified: trunk/php/webelements.p3 =================================================================== --- trunk/php/webelements.p3 2011-02-16 16:17:56 UTC (rev 23) +++ trunk/php/webelements.p3 2011-02-16 18:39:55 UTC (rev 24) @@ -422,7 +422,7 @@ case 'integer': case 'double': $msg .= $a; - break; + break; case 'object': if ($a instanceof tutos_base) { $msg .= '<'.$a->getType().'>'; @@ -1770,7 +1770,7 @@ $ma = base64_encode(serialize($ma)); if (!isset($obj->search_id)) $obj->search_id = -1; $js = ' '; - $js .= " "clearme('".$name."-popup')\""; + # $js .= " "clearme('".$name."-popup')\""; $js .= " "EnableInputField('".$name."')\""; if ( is_object($sobj) && isset($sobj->id) && $sobj->id > 0 ) { // a field that represents a TUTOS object Modified: trunk/robots.txt =================================================================== --- trunk/robots.txt 2011-02-16 16:17:56 UTC (rev 23) +++ trunk/robots.txt 2011-02-16 18:39:55 UTC (rev 24) @@ -1,4 +1,4 @@ -# $Id: robots.txt,v 1.1 2005/05/23 12:18:51 gokohnert Exp $ +# $Id$ # User-agent: * Disallow: /cgi-bin/ Property changes on: trunk/robots.txt ___________________________________________________________________ Added: svn:keywords + Id This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gok...@us...> - 2011-02-16 16:18:04
|
Revision: 23 http://tutos.svn.sourceforge.net/tutos/?rev=23&view=rev Author: gokohnert Date: 2011-02-16 16:17:56 +0000 (Wed, 16 Feb 2011) Log Message: ----------- struggling with some js event queue / IE popups Modified Paths: -------------- trunk/html/default.css trunk/html/js/jquery.bt.min.js trunk/html/js/tutos.js trunk/php/installation/installation.pinc trunk/php/layout/layout_base.pinc trunk/php/layout/new2_layout.pinc trunk/php/mytutos.php trunk/php/task.pinc trunk/php/webelements.p3 Added Paths: ----------- trunk/html/js/excanvas.js Modified: trunk/html/default.css =================================================================== --- trunk/html/default.css 2011-02-16 12:32:09 UTC (rev 22) +++ trunk/html/default.css 2011-02-16 16:17:56 UTC (rev 23) @@ -193,7 +193,7 @@ } UL.ajaxpopup { - position: absolute; +/* position: absolute; */ background: white; margin-top: -2px; margin-left: 0px; @@ -217,7 +217,7 @@ } .popupinfo PRE { - font-size: 7pt; + font-size: 8pt; margin-top: 0; margin-bottom: 0; } Added: trunk/html/js/excanvas.js =================================================================== --- trunk/html/js/excanvas.js (rev 0) +++ trunk/html/js/excanvas.js 2011-02-16 16:17:56 UTC (rev 23) @@ -0,0 +1,924 @@ +// Copyright 2006 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +// Known Issues: +// +// * Patterns are not implemented. +// * Radial gradient are not implemented. The VML version of these look very +// different from the canvas one. +// * Clipping paths are not implemented. +// * Coordsize. The width and height attribute have higher priority than the +// width and height style values which isn't correct. +// * Painting mode isn't implemented. +// * Canvas width/height should is using content-box by default. IE in +// Quirks mode will draw the canvas using border-box. Either change your +// doctype to HTML5 +// (http://www.whatwg.org/specs/web-apps/current-work/#the-doctype) +// or use Box Sizing Behavior from WebFX +// (http://webfx.eae.net/dhtml/boxsizing/boxsizing.html) +// * Non uniform scaling does not correctly scale strokes. +// * Optimize. There is always room for speed improvements. + +// Only add this code if we do not already have a canvas implementation +if (!document.createElement('canvas').getContext) { + +(function() { + + // alias some functions to make (compiled) code shorter + var m = Math; + var mr = m.round; + var ms = m.sin; + var mc = m.cos; + var abs = m.abs; + var sqrt = m.sqrt; + + // this is used for sub pixel precision + var Z = 10; + var Z2 = Z / 2; + + /** + * This funtion is assigned to the <canvas> elements as element.getContext(). + * @this {HTMLElement} + * @return {CanvasRenderingContext2D_} + */ + function getContext() { + return this.context_ || + (this.context_ = new CanvasRenderingContext2D_(this)); + } + + var slice = Array.prototype.slice; + + /** + * Binds a function to an object. The returned function will always use the + * passed in {@code obj} as {@code this}. + * + * Example: + * + * g = bind(f, obj, a, b) + * g(c, d) // will do f.call(obj, a, b, c, d) + * + * @param {Function} f The function to bind the object to + * @param {Object} obj The object that should act as this when the function + * is called + * @param {*} var_args Rest arguments that will be used as the initial + * arguments when the function is called + * @return {Function} A new function that has bound this + */ + function bind(f, obj, var_args) { + var a = slice.call(arguments, 2); + return function() { + return f.apply(obj, a.concat(slice.call(arguments))); + }; + } + + var G_vmlCanvasManager_ = { + init: function(opt_doc) { + if (/MSIE/.test(navigator.userAgent) && !window.opera) { + var doc = opt_doc || document; + // Create a dummy element so that IE will allow canvas elements to be + // recognized. + doc.createElement('canvas'); + doc.attachEvent('onreadystatechange', bind(this.init_, this, doc)); + } + }, + + init_: function(doc) { + // create xmlns + if (!doc.namespaces['g_vml_']) { + doc.namespaces.add('g_vml_', 'urn:schemas-microsoft-com:vml', + '#default#VML'); + + } + if (!doc.namespaces['g_o_']) { + doc.namespaces.add('g_o_', 'urn:schemas-microsoft-com:office:office', + '#default#VML'); + } + + // Setup default CSS. Only add one style sheet per document + if (!doc.styleSheets['ex_canvas_']) { + var ss = doc.createStyleSheet(); + ss.owningElement.id = 'ex_canvas_'; + ss.cssText = 'canvas{display:inline-block;overflow:hidden;' + + // default size is 300x150 in Gecko and Opera + 'text-align:left;width:300px;height:150px}' + + 'g_vml_\\:*{behavior:url(#default#VML)}' + + 'g_o_\\:*{behavior:url(#default#VML)}'; + + } + + // find all canvas elements + var els = doc.getElementsByTagName('canvas'); + for (var i = 0; i < els.length; i++) { + this.initElement(els[i]); + } + }, + + /** + * Public initializes a canvas element so that it can be used as canvas + * element from now on. This is called automatically before the page is + * loaded but if you are creating elements using createElement you need to + * make sure this is called on the element. + * @param {HTMLElement} el The canvas element to initialize. + * @return {HTMLElement} the element that was created. + */ + initElement: function(el) { + if (!el.getContext) { + + el.getContext = getContext; + + // Remove fallback content. There is no way to hide text nodes so we + // just remove all childNodes. We could hide all elements and remove + // text nodes but who really cares about the fallback content. + el.innerHTML = ''; + + // do not use inline function because that will leak memory + el.attachEvent('onpropertychange', onPropertyChange); + el.attachEvent('onresize', onResize); + + var attrs = el.attributes; + if (attrs.width && attrs.width.specified) { + // TODO: use runtimeStyle and coordsize + // el.getContext().setWidth_(attrs.width.nodeValue); + el.style.width = attrs.width.nodeValue + 'px'; + } else { + el.width = el.clientWidth; + } + if (attrs.height && attrs.height.specified) { + // TODO: use runtimeStyle and coordsize + // el.getContext().setHeight_(attrs.height.nodeValue); + el.style.height = attrs.height.nodeValue + 'px'; + } else { + el.height = el.clientHeight; + } + //el.getContext().setCoordsize_() + } + return el; + } + }; + + function onPropertyChange(e) { + var el = e.srcElement; + + switch (e.propertyName) { + case 'width': + el.style.width = el.attributes.width.nodeValue + 'px'; + el.getContext().clearRect(); + break; + case 'height': + el.style.height = el.attributes.height.nodeValue + 'px'; + el.getContext().clearRect(); + break; + } + } + + function onResize(e) { + var el = e.srcElement; + if (el.firstChild) { + el.firstChild.style.width = el.clientWidth + 'px'; + el.firstChild.style.height = el.clientHeight + 'px'; + } + } + + G_vmlCanvasManager_.init(); + + // precompute "00" to "FF" + var dec2hex = []; + for (var i = 0; i < 16; i++) { + for (var j = 0; j < 16; j++) { + dec2hex[i * 16 + j] = i.toString(16) + j.toString(16); + } + } + + function createMatrixIdentity() { + return [ + [1, 0, 0], + [0, 1, 0], + [0, 0, 1] + ]; + } + + function matrixMultiply(m1, m2) { + var result = createMatrixIdentity(); + + for (var x = 0; x < 3; x++) { + for (var y = 0; y < 3; y++) { + var sum = 0; + + for (var z = 0; z < 3; z++) { + sum += m1[x][z] * m2[z][y]; + } + + result[x][y] = sum; + } + } + return result; + } + + function copyState(o1, o2) { + o2.fillStyle = o1.fillStyle; + o2.lineCap = o1.lineCap; + o2.lineJoin = o1.lineJoin; + o2.lineWidth = o1.lineWidth; + o2.miterLimit = o1.miterLimit; + o2.shadowBlur = o1.shadowBlur; + o2.shadowColor = o1.shadowColor; + o2.shadowOffsetX = o1.shadowOffsetX; + o2.shadowOffsetY = o1.shadowOffsetY; + o2.strokeStyle = o1.strokeStyle; + o2.globalAlpha = o1.globalAlpha; + o2.arcScaleX_ = o1.arcScaleX_; + o2.arcScaleY_ = o1.arcScaleY_; + o2.lineScale_ = o1.lineScale_; + } + + function processStyle(styleString) { + var str, alpha = 1; + + styleString = String(styleString); + if (styleString.substring(0, 3) == 'rgb') { + var start = styleString.indexOf('(', 3); + var end = styleString.indexOf(')', start + 1); + var guts = styleString.substring(start + 1, end).split(','); + + str = '#'; + for (var i = 0; i < 3; i++) { + str += dec2hex[Number(guts[i])]; + } + + if (guts.length == 4 && styleString.substr(3, 1) == 'a') { + alpha = guts[3]; + } + } else { + str = styleString; + } + + return {color: str, alpha: alpha}; + } + + function processLineCap(lineCap) { + switch (lineCap) { + case 'butt': + return 'flat'; + case 'round': + return 'round'; + case 'square': + default: + return 'square'; + } + } + + /** + * This class implements CanvasRenderingContext2D interface as described by + * the WHATWG. + * @param {HTMLElement} surfaceElement The element that the 2D context should + * be associated with + */ + function CanvasRenderingContext2D_(surfaceElement) { + this.m_ = createMatrixIdentity(); + + this.mStack_ = []; + this.aStack_ = []; + this.currentPath_ = []; + + // Canvas context properties + this.strokeStyle = '#000'; + this.fillStyle = '#000'; + + this.lineWidth = 1; + this.lineJoin = 'miter'; + this.lineCap = 'butt'; + this.miterLimit = Z * 1; + this.globalAlpha = 1; + this.canvas = surfaceElement; + + var el = surfaceElement.ownerDocument.createElement('div'); + el.style.width = surfaceElement.clientWidth + 'px'; + el.style.height = surfaceElement.clientHeight + 'px'; + el.style.overflow = 'hidden'; + el.style.position = 'absolute'; + surfaceElement.appendChild(el); + + this.element_ = el; + this.arcScaleX_ = 1; + this.arcScaleY_ = 1; + this.lineScale_ = 1; + } + + var contextPrototype = CanvasRenderingContext2D_.prototype; + contextPrototype.clearRect = function() { + this.element_.innerHTML = ''; + }; + + contextPrototype.beginPath = function() { + // TODO: Branch current matrix so that save/restore has no effect + // as per safari docs. + this.currentPath_ = []; + }; + + contextPrototype.moveTo = function(aX, aY) { + var p = this.getCoords_(aX, aY); + this.currentPath_.push({type: 'moveTo', x: p.x, y: p.y}); + this.currentX_ = p.x; + this.currentY_ = p.y; + }; + + contextPrototype.lineTo = function(aX, aY) { + var p = this.getCoords_(aX, aY); + this.currentPath_.push({type: 'lineTo', x: p.x, y: p.y}); + + this.currentX_ = p.x; + this.currentY_ = p.y; + }; + + contextPrototype.bezierCurveTo = function(aCP1x, aCP1y, + aCP2x, aCP2y, + aX, aY) { + var p = this.getCoords_(aX, aY); + var cp1 = this.getCoords_(aCP1x, aCP1y); + var cp2 = this.getCoords_(aCP2x, aCP2y); + bezierCurveTo(this, cp1, cp2, p); + }; + + // Helper function that takes the already fixed cordinates. + function bezierCurveTo(self, cp1, cp2, p) { + self.currentPath_.push({ + type: 'bezierCurveTo', + cp1x: cp1.x, + cp1y: cp1.y, + cp2x: cp2.x, + cp2y: cp2.y, + x: p.x, + y: p.y + }); + self.currentX_ = p.x; + self.currentY_ = p.y; + } + + contextPrototype.quadraticCurveTo = function(aCPx, aCPy, aX, aY) { + // the following is lifted almost directly from + // http://developer.mozilla.org/en/docs/Canvas_tutorial:Drawing_shapes + + var cp = this.getCoords_(aCPx, aCPy); + var p = this.getCoords_(aX, aY); + + var cp1 = { + x: this.currentX_ + 2.0 / 3.0 * (cp.x - this.currentX_), + y: this.currentY_ + 2.0 / 3.0 * (cp.y - this.currentY_) + }; + var cp2 = { + x: cp1.x + (p.x - this.currentX_) / 3.0, + y: cp1.y + (p.y - this.currentY_) / 3.0 + }; + + bezierCurveTo(this, cp1, cp2, p); + }; + + contextPrototype.arc = function(aX, aY, aRadius, + aStartAngle, aEndAngle, aClockwise) { + aRadius *= Z; + var arcType = aClockwise ? 'at' : 'wa'; + + var xStart = aX + mc(aStartAngle) * aRadius - Z2; + var yStart = aY + ms(aStartAngle) * aRadius - Z2; + + var xEnd = aX + mc(aEndAngle) * aRadius - Z2; + var yEnd = aY + ms(aEndAngle) * aRadius - Z2; + + // IE won't render arches drawn counter clockwise if xStart == xEnd. + if (xStart == xEnd && !aClockwise) { + xStart += 0.125; // Offset xStart by 1/80 of a pixel. Use something + // that can be represented in binary + } + + var p = this.getCoords_(aX, aY); + var pStart = this.getCoords_(xStart, yStart); + var pEnd = this.getCoords_(xEnd, yEnd); + + this.currentPath_.push({type: arcType, + x: p.x, + y: p.y, + radius: aRadius, + xStart: pStart.x, + yStart: pStart.y, + xEnd: pEnd.x, + yEnd: pEnd.y}); + + }; + + contextPrototype.rect = function(aX, aY, aWidth, aHeight) { + this.moveTo(aX, aY); + this.lineTo(aX + aWidth, aY); + this.lineTo(aX + aWidth, aY + aHeight); + this.lineTo(aX, aY + aHeight); + this.closePath(); + }; + + contextPrototype.strokeRect = function(aX, aY, aWidth, aHeight) { + var oldPath = this.currentPath_; + this.beginPath(); + + this.moveTo(aX, aY); + this.lineTo(aX + aWidth, aY); + this.lineTo(aX + aWidth, aY + aHeight); + this.lineTo(aX, aY + aHeight); + this.closePath(); + this.stroke(); + + this.currentPath_ = oldPath; + }; + + contextPrototype.fillRect = function(aX, aY, aWidth, aHeight) { + var oldPath = this.currentPath_; + this.beginPath(); + + this.moveTo(aX, aY); + this.lineTo(aX + aWidth, aY); + this.lineTo(aX + aWidth, aY + aHeight); + this.lineTo(aX, aY + aHeight); + this.closePath(); + this.fill(); + + this.currentPath_ = oldPath; + }; + + contextPrototype.createLinearGradient = function(aX0, aY0, aX1, aY1) { + var gradient = new CanvasGradient_('gradient'); + gradient.x0_ = aX0; + gradient.y0_ = aY0; + gradient.x1_ = aX1; + gradient.y1_ = aY1; + return gradient; + }; + + contextPrototype.createRadialGradient = function(aX0, aY0, aR0, + aX1, aY1, aR1) { + var gradient = new CanvasGradient_('gradientradial'); + gradient.x0_ = aX0; + gradient.y0_ = aY0; + gradient.r0_ = aR0; + gradient.x1_ = aX1; + gradient.y1_ = aY1; + gradient.r1_ = aR1; + return gradient; + }; + + contextPrototype.drawImage = function(image, var_args) { + var dx, dy, dw, dh, sx, sy, sw, sh; + + // to find the original width we overide the width and height + var oldRuntimeWidth = image.runtimeStyle.width; + var oldRuntimeHeight = image.runtimeStyle.height; + image.runtimeStyle.width = 'auto'; + image.runtimeStyle.height = 'auto'; + + // get the original size + var w = image.width; + var h = image.height; + + // and remove overides + image.runtimeStyle.width = oldRuntimeWidth; + image.runtimeStyle.height = oldRuntimeHeight; + + if (arguments.length == 3) { + dx = arguments[1]; + dy = arguments[2]; + sx = sy = 0; + sw = dw = w; + sh = dh = h; + } else if (arguments.length == 5) { + dx = arguments[1]; + dy = arguments[2]; + dw = arguments[3]; + dh = arguments[4]; + sx = sy = 0; + sw = w; + sh = h; + } else if (arguments.length == 9) { + sx = arguments[1]; + sy = arguments[2]; + sw = arguments[3]; + sh = arguments[4]; + dx = arguments[5]; + dy = arguments[6]; + dw = arguments[7]; + dh = arguments[8]; + } else { + throw Error('Invalid number of arguments'); + } + + var d = this.getCoords_(dx, dy); + + var w2 = sw / 2; + var h2 = sh / 2; + + var vmlStr = []; + + var W = 10; + var H = 10; + + // For some reason that I've now forgotten, using divs didn't work + vmlStr.push(' <g_vml_:group', + ' coordsize="', Z * W, ',', Z * H, '"', + ' coordorigin="0,0"' , + ' style="width:', W, 'px;height:', H, 'px;position:absolute;'); + + // If filters are necessary (rotation exists), create them + // filters are bog-slow, so only create them if abbsolutely necessary + // The following check doesn't account for skews (which don't exist + // in the canvas spec (yet) anyway. + + if (this.m_[0][0] != 1 || this.m_[0][1]) { + var filter = []; + + // Note the 12/21 reversal + filter.push('M11=', this.m_[0][0], ',', + 'M12=', this.m_[1][0], ',', + 'M21=', this.m_[0][1], ',', + 'M22=', this.m_[1][1], ',', + 'Dx=', mr(d.x / Z), ',', + 'Dy=', mr(d.y / Z), ''); + + // Bounding box calculation (need to minimize displayed area so that + // filters don't waste time on unused pixels. + var max = d; + var c2 = this.getCoords_(dx + dw, dy); + var c3 = this.getCoords_(dx, dy + dh); + var c4 = this.getCoords_(dx + dw, dy + dh); + + max.x = m.max(max.x, c2.x, c3.x, c4.x); + max.y = m.max(max.y, c2.y, c3.y, c4.y); + + vmlStr.push('padding:0 ', mr(max.x / Z), 'px ', mr(max.y / Z), + 'px 0;filter:progid:DXImageTransform.Microsoft.Matrix(', + filter.join(''), ", sizingmethod='clip');") + } else { + vmlStr.push('top:', mr(d.y / Z), 'px;left:', mr(d.x / Z), 'px;'); + } + + vmlStr.push(' ">' , + '<g_vml_:image src="', image.src, '"', + ' style="width:', Z * dw, 'px;', + ' height:', Z * dh, 'px;"', + ' cropleft="', sx / w, '"', + ' croptop="', sy / h, '"', + ' cropright="', (w - sx - sw) / w, '"', + ' cropbottom="', (h - sy - sh) / h, '"', + ' />', + '</g_vml_:group>'); + + this.element_.insertAdjacentHTML('BeforeEnd', + vmlStr.join('')); + }; + + contextPrototype.stroke = function(aFill) { + var lineStr = []; + var lineOpen = false; + var a = processStyle(aFill ? this.fillStyle : this.strokeStyle); + var color = a.color; + var opacity = a.alpha * this.globalAlpha; + + var W = 10; + var H = 10; + + lineStr.push('<g_vml_:shape', + ' filled="', !!aFill, '"', + ' style="position:absolute;width:', W, 'px;height:', H, 'px;"', + ' coordorigin="0 0" coordsize="', Z * W, ' ', Z * H, '"', + ' stroked="', !aFill, '"', + ' path="'); + + var newSeq = false; + var min = {x: null, y: null}; + var max = {x: null, y: null}; + + for (var i = 0; i < this.currentPath_.length; i++) { + var p = this.currentPath_[i]; + var c; + + switch (p.type) { + case 'moveTo': + c = p; + lineStr.push(' m ', mr(p.x), ',', mr(p.y)); + break; + case 'lineTo': + lineStr.push(' l ', mr(p.x), ',', mr(p.y)); + break; + case 'close': + lineStr.push(' x '); + p = null; + break; + case 'bezierCurveTo': + lineStr.push(' c ', + mr(p.cp1x), ',', mr(p.cp1y), ',', + mr(p.cp2x), ',', mr(p.cp2y), ',', + mr(p.x), ',', mr(p.y)); + break; + case 'at': + case 'wa': + lineStr.push(' ', p.type, ' ', + mr(p.x - this.arcScaleX_ * p.radius), ',', + mr(p.y - this.arcScaleY_ * p.radius), ' ', + mr(p.x + this.arcScaleX_ * p.radius), ',', + mr(p.y + this.arcScaleY_ * p.radius), ' ', + mr(p.xStart), ',', mr(p.yStart), ' ', + mr(p.xEnd), ',', mr(p.yEnd)); + break; + } + + + // TODO: Following is broken for curves due to + // move to proper paths. + + // Figure out dimensions so we can do gradient fills + // properly + if (p) { + if (min.x == null || p.x < min.x) { + min.x = p.x; + } + if (max.x == null || p.x > max.x) { + max.x = p.x; + } + if (min.y == null || p.y < min.y) { + min.y = p.y; + } + if (max.y == null || p.y > max.y) { + max.y = p.y; + } + } + } + lineStr.push(' ">'); + + if (!aFill) { + var lineWidth = this.lineScale_ * this.lineWidth; + + // VML cannot correctly render a line if the width is less than 1px. + // In that case, we dilute the color to make the line look thinner. + if (lineWidth < 1) { + opacity *= lineWidth; + } + + lineStr.push( + '<g_vml_:stroke', + ' opacity="', opacity, '"', + ' joinstyle="', this.lineJoin, '"', + ' miterlimit="', this.miterLimit, '"', + ' endcap="', processLineCap(this.lineCap), '"', + ' weight="', lineWidth, 'px"', + ' color="', color, '" />' + ); + } else if (typeof this.fillStyle == 'object') { + var fillStyle = this.fillStyle; + var angle = 0; + var focus = {x: 0, y: 0}; + + // additional offset + var shift = 0; + // scale factor for offset + var expansion = 1; + + if (fillStyle.type_ == 'gradient') { + var x0 = fillStyle.x0_ / this.arcScaleX_; + var y0 = fillStyle.y0_ / this.arcScaleY_; + var x1 = fillStyle.x1_ / this.arcScaleX_; + var y1 = fillStyle.y1_ / this.arcScaleY_; + var p0 = this.getCoords_(x0, y0); + var p1 = this.getCoords_(x1, y1); + var dx = p1.x - p0.x; + var dy = p1.y - p0.y; + angle = Math.atan2(dx, dy) * 180 / Math.PI; + + // The angle should be a non-negative number. + if (angle < 0) { + angle += 360; + } + + // Very small angles produce an unexpected result because they are + // converted to a scientific notation string. + if (angle < 1e-6) { + angle = 0; + } + } else { + var p0 = this.getCoords_(fillStyle.x0_, fillStyle.y0_); + var width = max.x - min.x; + var height = max.y - min.y; + focus = { + x: (p0.x - min.x) / width, + y: (p0.y - min.y) / height + }; + + width /= this.arcScaleX_ * Z; + height /= this.arcScaleY_ * Z; + var dimension = m.max(width, height); + shift = 2 * fillStyle.r0_ / dimension; + expansion = 2 * fillStyle.r1_ / dimension - shift; + } + + // We need to sort the color stops in ascending order by offset, + // otherwise IE won't interpret it correctly. + var stops = fillStyle.colors_; + stops.sort(function(cs1, cs2) { + return cs1.offset - cs2.offset; + }); + + var length = stops.length; + var color1 = stops[0].color; + var color2 = stops[length - 1].color; + var opacity1 = stops[0].alpha * this.globalAlpha; + var opacity2 = stops[length - 1].alpha * this.globalAlpha; + + var colors = []; + for (var i = 0; i < length; i++) { + var stop = stops[i]; + colors.push(stop.offset * expansion + shift + ' ' + stop.color); + } + + // When colors attribute is used, the meanings of opacity and o:opacity2 + // are reversed. + lineStr.push('<g_vml_:fill type="', fillStyle.type_, '"', + ' method="none" focus="100%"', + ' color="', color1, '"', + ' color2="', color2, '"', + ' colors="', colors.join(','), '"', + ' opacity="', opacity2, '"', + ' g_o_:opacity2="', opacity1, '"', + ' angle="', angle, '"', + ' focusposition="', focus.x, ',', focus.y, '" />'); + } else { + lineStr.push('<g_vml_:fill color="', color, '" opacity="', opacity, + '" />'); + } + + lineStr.push('</g_vml_:shape>'); + + this.element_.insertAdjacentHTML('beforeEnd', lineStr.join('')); + }; + + contextPrototype.fill = function() { + this.stroke(true); + } + + contextPrototype.closePath = function() { + this.currentPath_.push({type: 'close'}); + }; + + /** + * @private + */ + contextPrototype.getCoords_ = function(aX, aY) { + var m = this.m_; + return { + x: Z * (aX * m[0][0] + aY * m[1][0] + m[2][0]) - Z2, + y: Z * (aX * m[0][1] + aY * m[1][1] + m[2][1]) - Z2 + } + }; + + contextPrototype.save = function() { + var o = {}; + copyState(this, o); + this.aStack_.push(o); + this.mStack_.push(this.m_); + this.m_ = matrixMultiply(createMatrixIdentity(), this.m_); + }; + + contextPrototype.restore = function() { + copyState(this.aStack_.pop(), this); + this.m_ = this.mStack_.pop(); + }; + + function matrixIsFinite(m) { + for (var j = 0; j < 3; j++) { + for (var k = 0; k < 2; k++) { + if (!isFinite(m[j][k]) || isNaN(m[j][k])) { + return false; + } + } + } + return true; + } + + function setM(ctx, m, updateLineScale) { + if (!matrixIsFinite(m)) { + return; + } + ctx.m_ = m; + + if (updateLineScale) { + // Get the line scale. + // Determinant of this.m_ means how much the area is enlarged by the + // transformation. So its square root can be used as a scale factor + // for width. + var det = m[0][0] * m[1][1] - m[0][1] * m[1][0]; + ctx.lineScale_ = sqrt(abs(det)); + } + } + + contextPrototype.translate = function(aX, aY) { + var m1 = [ + [1, 0, 0], + [0, 1, 0], + [aX, aY, 1] + ]; + + setM(this, matrixMultiply(m1, this.m_), false); + }; + + contextPrototype.rotate = function(aRot) { + var c = mc(aRot); + var s = ms(aRot); + + var m1 = [ + [c, s, 0], + [-s, c, 0], + [0, 0, 1] + ]; + + setM(this, matrixMultiply(m1, this.m_), false); + }; + + contextPrototype.scale = function(aX, aY) { + this.arcScaleX_ *= aX; + this.arcScaleY_ *= aY; + var m1 = [ + [aX, 0, 0], + [0, aY, 0], + [0, 0, 1] + ]; + + setM(this, matrixMultiply(m1, this.m_), true); + }; + + contextPrototype.transform = function(m11, m12, m21, m22, dx, dy) { + var m1 = [ + [m11, m12, 0], + [m21, m22, 0], + [dx, dy, 1] + ]; + + setM(this, matrixMultiply(m1, this.m_), true); + }; + + contextPrototype.setTransform = function(m11, m12, m21, m22, dx, dy) { + var m = [ + [m11, m12, 0], + [m21, m22, 0], + [dx, dy, 1] + ]; + + setM(this, m, true); + }; + + /******** STUBS ********/ + contextPrototype.clip = function() { + // TODO: Implement + }; + + contextPrototype.arcTo = function() { + // TODO: Implement + }; + + contextPrototype.createPattern = function() { + return new CanvasPattern_; + }; + + // Gradient / Pattern Stubs + function CanvasGradient_(aType) { + this.type_ = aType; + this.x0_ = 0; + this.y0_ = 0; + this.r0_ = 0; + this.x1_ = 0; + this.y1_ = 0; + this.r1_ = 0; + this.colors_ = []; + } + + CanvasGradient_.prototype.addColorStop = function(aOffset, aColor) { + aColor = processStyle(aColor); + this.colors_.push({offset: aOffset, + color: aColor.color, + alpha: aColor.alpha}); + }; + + function CanvasPattern_() {} + + // set up externs + G_vmlCanvasManager = G_vmlCanvasManager_; + CanvasRenderingContext2D = CanvasRenderingContext2D_; + CanvasGradient = CanvasGradient_; + CanvasPattern = CanvasPattern_; + +})(); + +} // if Property changes on: trunk/html/js/excanvas.js ___________________________________________________________________ Added: svn:executable + * Modified: trunk/html/js/jquery.bt.min.js =================================================================== --- trunk/html/js/jquery.bt.min.js 2011-02-16 12:32:09 UTC (rev 22) +++ trunk/html/js/jquery.bt.min.js 2011-02-16 16:17:56 UTC (rev 23) @@ -3,6 +3,6 @@ * @desc a tooltips/baloon-help plugin for jQuery * * @author Jeff Robbins - Lullabot - http://www.lullabot.com - * @version 0.9.1 (2/15/2009) + * @version 0.9.5-rc1 (5/20/2009) */ -jQuery.fn.bt=function(content,options){if(typeof content!="string"){var contentSelect=true;options=content;content=false}else{var contentSelect=false}if(jQuery.fn.hoverIntent&&jQuery.bt.defaults.trigger=="hover"){jQuery.bt.defaults.trigger="hoverIntent"}return this.each(function(index){var opts=jQuery.extend(false,jQuery.bt.defaults,options);opts.spikeLength=numb(opts.spikeLength);opts.spikeGirth=numb(opts.spikeGirth);opts.overlap=numb(opts.overlap);var ajaxTimeout=false;if(opts.killTitle){$(this).find("[title]").andSelf().each(function(){if(!$(this).attr("bt-xTitle")){$(this).attr("bt-xTitle",$(this).attr("title")).attr("title","")}})}if(typeof opts.trigger=="string"){opts.trigger=[opts.trigger]}if(opts.trigger[0]=="hoverIntent"){var hoverOpts=$.extend(opts.hoverIntentOpts,{over:function(){this.btOn()},out:function(){this.btOff()}});$(this).hoverIntent(hoverOpts)}else{if(opts.trigger[0]=="hover"){$(this).hover(function(){this.btOn()},function(){this.btOff()})}else{if(opts.trigger[0]=="now"){if($(this).hasClass("bt-active")){this.btOff()}else{this.btOn()}}else{if(opts.trigger[0]=="none"){}else{if(opts.trigger.length>1&&opts.trigger[0]!=opts.trigger[1]){$(this).bind(opts.trigger[0],function(){this.btOn()}).bind(opts.trigger[1],function(){this.btOff()})}else{$(this).bind(opts.trigger[0],function(){if($(this).hasClass("bt-active")){this.btOff()}else{this.btOn()}})}}}}}this.btOn=function(){if(typeof $(this).data("bt-box")=="object"){this.btOff()}opts.preShow.apply(this);$(jQuery.bt.vars.closeWhenOpenStack).btOff();$(this).addClass("bt-active "+opts.activeClass);if(contentSelect&&opts.ajaxPath==null){if(opts.killTitle){$(this).attr("title",$(this).attr("bt-xTitle"))}content=eval(opts.contentSelector);if(opts.killTitle){$(this).attr("title","")}}if(opts.ajaxPath!=null&&content==false){if(typeof opts.ajaxPath=="object"){var url=eval(opts.ajaxPath[0]);url+=opts.ajaxPath[1]?" "+opts.ajaxPath[1]:""}else{var url=opts.ajaxPath}var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off)}var cacheData=opts.ajaxCache?$(document.body).data("btCache-"+url.replace(/\./g,"")):null;if(typeof cacheData=="string"){content=selector?jQuery("<div/>").append(cacheData.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):cacheData}else{var target=this;var ajaxOpts=jQuery.extend(false,{type:opts.ajaxType,data:opts.ajaxData,cache:opts.ajaxCache,url:url,complete:function(XMLHttpRequest,textStatus){if(textStatus=="success"||textStatus=="notmodified"){if(opts.ajaxCache){$(document.body).data("btCache-"+url.replace(/\./g,""),XMLHttpRequest.responseText)}ajaxTimeout=false;content=selector?jQuery("<div/>").append(XMLHttpRequest.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):XMLHttpRequest.responseText}else{if(textStatus=="timeout"){ajaxTimeout=true}content=opts.ajaxError.replace(/%error/g,XMLHttpRequest.statusText)}if($(target).hasClass("bt-active")){target.btOn()}}},opts.ajaxData);$.ajax(ajaxOpts);content=opts.ajaxLoading}}var offsetParent=$(this).offsetParent();var pos=$(this).btPosition();var top=numb(pos.top)+numb($(this).css("margin-top"));var left=numb(pos.left)+numb($(this).css("margin-left"));var width=$(this).outerWidth();var height=$(this).outerHeight();if(typeof content=="object"){content=$(content).clone(true).show()}var $text=$('<div class="bt-content"></div>').append(content).css({padding:opts.padding,position:"absolute",width:opts.width,zIndex:opts.textzIndex}).css(opts.cssStyles);var $box=$('<div class="bt-wrapper"></div>').append($text).addClass(opts.cssClass).css({position:"absolute",width:opts.width,zIndex:opts.wrapperzIndex}).appendTo(offsetParent);if($.fn.bgiframe){$text.bgiframe();$box.bgiframe()}$(this).data("bt-box",$box);var scrollTop=numb($(document).scrollTop());var scrollLeft=numb($(document).scrollLeft());var docWidth=numb($(window).width());var docHeight=numb($(window).height());var winRight=scrollLeft+docWidth;var winBottom=scrollTop+docHeight;var space=new Object();space.top=$(this).offset().top-scrollTop;space.bottom=docHeight-(($(this).offset().top+height)-scrollTop);space.left=$(this).offset().left-scrollLeft;space.right=docWidth-(($(this).offset().left+width)-scrollLeft);var textOutHeight=numb($text.outerHeight());var textOutWidth=numb($text.outerWidth());if(opts.positions.constructor==String){opts.positions=opts.positions.replace(/ /,"").split(",")}if(opts.positions[0]=="most"){var position="top";for(var pig in space){position=space[pig]>space[position]?pig:position}}else{for(var x in opts.positions){var position=opts.positions[x];if((position=="left"||position=="right")&&space[position]>textOutWidth+opts.spikeLength){break}else{if((position=="top"||position=="bottom")&&space[position]>textOutHeight+opts.spikeLength){break}}}}var horiz=left+((width-textOutWidth)*0.5);var vert=top+((height-textOutHeight)*0.5);var animDist=opts.animate?numb(opts.distance):0;var points=new Array();var textTop,textLeft,textRight,textBottom,textTopSpace,textBottomSpace,textLeftSpace,textRightSpace,crossPoint,textCenter,spikePoint;switch(position){case"top":$text.css("margin-bottom",opts.spikeLength+"px");$box.css({top:(top-$text.outerHeight(true)-animDist)+opts.overlap,left:horiz});textRightSpace=(winRight-opts.windowMargin)-($text.offset().left+$text.outerWidth(true));var xShift=0;if(textRightSpace<0){$box.css("left",(numb($box.css("left"))+textRightSpace)+"px");xShift-=textRightSpace}textLeftSpace=($text.offset().left+numb($text.css("margin-left")))-(scrollLeft+opts.windowMargin);if(textLeftSpace<0){$box.css("left",(numb($box.css("left"))-textLeftSpace)+"px");xShift+=textLeftSpace}textTop=$text.btPosition().top+numb($text.css("margin-top"));textLeft=$text.btPosition().left+numb($text.css("margin-left"));textRight=textLeft+$text.outerWidth();textBottom=textTop+$text.outerHeight();textCenter={x:textLeft+($text.outerWidth()*opts.centerPointX),y:textTop+($text.outerHeight()*opts.centerPointY)};points[points.length]=spikePoint={y:textBottom+opts.spikeLength,x:((textRight-textLeft)*0.5)+xShift,type:"spike"};crossPoint=findIntersectX(spikePoint.x,spikePoint.y,textCenter.x,textCenter.y,textBottom);crossPoint.x=crossPoint.x<textLeft+opts.spikeGirth/2+opts.cornerRadius?textLeft+opts.spikeGirth/2+opts.cornerRadius:crossPoint.x;crossPoint.x=crossPoint.x>(textRight-opts.spikeGirth/2)-opts.cornerRadius?(textRight-opts.spikeGirth/2)-opts.CornerRadius:crossPoint.x;points[points.length]={x:crossPoint.x-(opts.spikeGirth/2),y:textBottom,type:"join"};points[points.length]={x:textLeft,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:textTop,type:"corner"};points[points.length]={x:textRight,y:textTop,type:"corner"};points[points.length]={x:textRight,y:textBottom,type:"corner"};points[points.length]={x:crossPoint.x+(opts.spikeGirth/2),y:textBottom,type:"join"};points[points.length]=spikePoint;break;case"left":$text.css("margin-right",opts.spikeLength+"px");$box.css({top:vert+"px",left:((left-$text.outerWidth(true)-animDist)+opts.overlap)+"px"});textBottomSpace=(winBottom-opts.windowMargin)-($text.offset().top+$text.outerHeight(true));var yShift=0;if(textBottomSpace<0){$box.css("top",(numb($box.css("top"))+textBottomSpace)+"px");yShift-=textBottomSpace}textTopSpace=($text.offset().top+numb($text.css("margin-top")))-(scrollTop+opts.windowMargin);if(textTopSpace<0){$box.css("top",(numb($box.css("top"))-textTopSpace)+"px");yShift+=textTopSpace}textTop=$text.btPosition().top+numb($text.css("margin-top"));textLeft=$text.btPosition().left+numb($text.css("margin-left"));textRight=textLeft+$text.outerWidth();textBottom=textTop+$text.outerHeight();textCenter={x:textLeft+($text.outerWidth()*opts.centerPointX),y:textTop+($text.outerHeight()*opts.centerPointY)};points[points.length]=spikePoint={x:textRight+opts.spikeLength,y:((textBottom-textTop)*0.5)+yShift,type:"spike"};crossPoint=findIntersectY(spikePoint.x,spikePoint.y,textCenter.x,textCenter.y,textRight);crossPoint.y=crossPoint.y<textTop+opts.spikeGirth/2+opts.cornerRadius?textTop+opts.spikeGirth/2+opts.cornerRadius:crossPoint.y;crossPoint.y=crossPoint.y>(textBottom-opts.spikeGirth/2)-opts.cornerRadius?(textBottom-opts.spikeGirth/2)-opts.cornerRadius:crossPoint.y;points[points.length]={x:textRight,y:crossPoint.y+opts.spikeGirth/2,type:"join"};points[points.length]={x:textRight,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:textTop,type:"corner"};points[points.length]={x:textRight,y:textTop,type:"corner"};points[points.length]={x:textRight,y:crossPoint.y-opts.spikeGirth/2,type:"join"};points[points.length]=spikePoint;break;case"bottom":$text.css("margin-top",opts.spikeLength+"px");$box.css({top:(top+height+animDist)-opts.overlap,left:horiz});textRightSpace=(winRight-opts.windowMargin)-($text.offset().left+$text.outerWidth(true));var xShift=0;if(textRightSpace<0){$box.css("left",(numb($box.css("left"))+textRightSpace)+"px");xShift-=textRightSpace}textLeftSpace=($text.offset().left+numb($text.css("margin-left")))-(scrollLeft+opts.windowMargin);if(textLeftSpace<0){$box.css("left",(numb($box.css("left"))-textLeftSpace)+"px");xShift+=textLeftSpace}textTop=$text.btPosition().top+numb($text.css("margin-top"));textLeft=$text.btPosition().left+numb($text.css("margin-left"));textRight=textLeft+$text.outerWidth();textBottom=textTop+$text.outerHeight();textCenter={x:textLeft+($text.outerWidth()*opts.centerPointX),y:textTop+($text.outerHeight()*opts.centerPointY)};points[points.length]=spikePoint={x:((textRight-textLeft)*0.5)+xShift,y:0,type:"spike"};crossPoint=findIntersectX(spikePoint.x,spikePoint.y,textCenter.x,textCenter.y,textTop);crossPoint.x=crossPoint.x<textLeft+opts.spikeGirth/2+opts.cornerRadius?textLeft+opts.spikeGirth/2+opts.cornerRadius:crossPoint.x;crossPoint.x=crossPoint.x>(textRight-opts.spikeGirth/2)-opts.cornerRadius?(textRight-opts.spikeGirth/2)-opts.cornerRadius:crossPoint.x;points[points.length]={x:crossPoint.x+opts.spikeGirth/2,y:textTop,type:"join"};points[points.length]={x:textRight,y:textTop,type:"corner"};points[points.length]={x:textRight,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:textTop,type:"corner"};points[points.length]={x:crossPoint.x-(opts.spikeGirth/2),y:textTop,type:"join"};points[points.length]=spikePoint;break;case"right":$text.css("margin-left",(opts.spikeLength+"px"));$box.css({top:vert+"px",left:((left+width+animDist)-opts.overlap)+"px"});textBottomSpace=(winBottom-opts.windowMargin)-($text.offset().top+$text.outerHeight(true));var yShift=0;if(textBottomSpace<0){$box.css("top",(numb($box.css("top"))+textBottomSpace)+"px");yShift-=textBottomSpace}textTopSpace=($text.offset().top+numb($text.css("margin-top")))-(scrollTop+opts.windowMargin);if(textTopSpace<0){$box.css("top",(numb($box.css("top"))-textTopSpace)+"px");yShift+=textTopSpace}textTop=$text.btPosition().top+numb($text.css("margin-top"));textLeft=$text.btPosition().left+numb($text.css("margin-left"));textRight=textLeft+$text.outerWidth();textBottom=textTop+$text.outerHeight();textCenter={x:textLeft+($text.outerWidth()*opts.centerPointX),y:textTop+($text.outerHeight()*opts.centerPointY)};points[points.length]=spikePoint={x:0,y:((textBottom-textTop)*0.5)+yShift,type:"spike"};crossPoint=findIntersectY(spikePoint.x,spikePoint.y,textCenter.x,textCenter.y,textLeft);crossPoint.y=crossPoint.y<textTop+opts.spikeGirth/2+opts.cornerRadius?textTop+opts.spikeGirth/2+opts.cornerRadius:crossPoint.y;crossPoint.y=crossPoint.y>(textBottom-opts.spikeGirth/2)-opts.cornerRadius?(textBottom-opts.spikeGirth/2)-opts.cornerRadius:crossPoint.y;points[points.length]={x:textLeft,y:crossPoint.y-opts.spikeGirth/2,type:"join"};points[points.length]={x:textLeft,y:textTop,type:"corner"};points[points.length]={x:textRight,y:textTop,type:"corner"};points[points.length]={x:textRight,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:crossPoint.y+opts.spikeGirth/2,type:"join"};points[points.length]=spikePoint;break}var canvas=$('<canvas width="'+(numb($text.outerWidth(true))+opts.strokeWidth*2)+'" height="'+(numb($text.outerHeight(true))+opts.strokeWidth*2)+'"></canvas>').appendTo($box).css({position:"absolute",top:$text.btPosition().top,left:$text.btPosition().left,zIndex:opts.boxzIndex}).get(0);if(typeof G_vmlCanvasManager!="undefined"){canvas=G_vmlCanvasManager.initElement(canvas)}if(opts.cornerRadius>0){var newPoints=new Array();var newPoint;for(var i=0;i<points.length;i++){if(points[i].type=="corner"){newPoint=betweenPoint(points[i],points[(i-1)%points.length],opts.cornerRadius);newPoint.type="arcStart";newPoints[newPoints.length]=newPoint;newPoints[newPoints.length]=points[i];newPoint=betweenPoint(points[i],points[(i+1)%points.length],opts.cornerRadius);newPoint.type="arcEnd";newPoints[newPoints.length]=newPoint}else{newPoints[newPoints.length]=points[i]}}points=newPoints}var ctx=canvas.getContext("2d");drawIt.apply(ctx,[points],opts.strokeWidth);ctx.fillStyle=opts.fill;if(opts.shadow){ctx.shadowOffsetX=2;ctx.shadowOffsetY=2;ctx.shadowBlur=5;ctx.shadowColor=opts.shadowColor}ctx.closePath();ctx.fill();if(opts.strokeWidth>0){ctx.shadowColor="rgba(0, 0, 0, 0)";ctx.lineWidth=opts.strokeWidth;ctx.strokeStyle=opts.strokeStyle;ctx.beginPath();drawIt.apply(ctx,[points],opts.strokeWidth);ctx.closePath();ctx.stroke()}if(opts.animate){$box.css({opacity:0.1})}$box.css({visibility:"visible"});if(opts.overlay){var overlay=$('<div class="bt-overlay"></div>').css({position:"absolute",backgroundColor:"blue",top:top,left:left,width:width,height:height,opacity:".2"}).appendTo(offsetParent);$(this).data("overlay",overlay)}var animParams={opacity:1};if(opts.animate){switch(position){case"top":animParams.top=$box.btPosition().top+opts.distance;break;case"left":animParams.left=$box.btPosition().left+opts.distance;break;case"bottom":animParams.top=$box.btPosition().top-opts.distance;break;case"right":animParams.left=$box.btPosition().left-opts.distance;break}$box.animate(animParams,{duration:opts.speed,easing:opts.easing})}if((opts.ajaxPath!=null&&opts.ajaxCache==false)||ajaxTimeout){content=false}if(opts.clickAnywhereToClose){jQuery.bt.vars.clickAnywhereStack.push(this);$(document).click(jQuery.bt.docClick)}if(opts.closeWhenOthersOpen){jQuery.bt.vars.closeWhenOpenStack.push(this)}opts.postShow.apply(this)};this.btOff=function(){opts.preHide.apply(this);var box=$(this).data("bt-box");var overlay=$(this).data("bt-overlay");if(typeof box=="object"){$(box).remove();$(this).removeData("bt-box")}if(typeof overlay=="object"){$(overlay).remove();$(this).removeData("bt-overlay")}jQuery.bt.vars.clickAnywhereStack=arrayRemove(jQuery.bt.vars.clickAnywhereStack,this);jQuery.bt.vars.closeWhenOpenStack=arrayRemove(jQuery.bt.vars.closeWhenOpenStack,this);opts.postHide.apply(this);$(this).removeClass("bt-active "+opts.activeClass)};var refresh=this.btRefresh=function(){this.btOff();this.btOn()}});function drawIt(points,strokeWidth){this.moveTo(points[0].x,points[0].y);for(i=1;i<points.length;i++){if(points[i-1].type=="arcStart"){this.quadraticCurveTo(round5(points[i].x,strokeWidth),round5(points[i].y,strokeWidth),round5(points[(i+1)%points.length].x,strokeWidth),round5(points[(i+1)%points.length].y,strokeWidth));i++}else{this.lineTo(round5(points[i].x,strokeWidth),round5(points[i].y,strokeWidth))}}}function round5(num,strokeWidth){var ret;strokeWidth=numb(strokeWidth);if(strokeWidth%2){ret=num}else{ret=Math.round(num-0.5)+0.5}return ret}function numb(num){return parseInt(num)||0}function arrayRemove(arr,elem){var x,newArr=new Array();for(x in arr){if(arr[x]!=elem){newArr.push(arr[x])}}return newArr}function betweenPoint(point1,point2,dist){var y,x;if(point1.x==point2.x){y=point1.y<point2.y?point1.y+dist:point1.y-dist;return{x:point1.x,y:y}}else{if(point1.y==point2.y){x=point1.x<point2.x?point1.x+dist:point1.x-dist;return{x:x,y:point1.y}}}}function centerPoint(arcStart,corner,arcEnd){var x=corner.x==arcStart.x?arcEnd.x:arcStart.x;var y=corner.y==arcStart.y?arcEnd.y:arcStart.y;var startAngle,endAngle;if(arcStart.x<arcEnd.x){if(arcStart.y>arcEnd.y){startAngle=(Math.PI/180)*180;endAngle=(Math.PI/180)*90}else{startAngle=(Math.PI/180)*90;endAngle=0}}else{if(arcStart.y>arcEnd.y){startAngle=(Math.PI/180)*270;endAngle=(Math.PI/180)*180}else{startAngle=0;endAngle=(Math.PI/180)*270}}return{x:x,y:y,type:"center",startAngle:startAngle,endAngle:endAngle}}function findIntersect(r1x1,r1y1,r1x2,r1y2,r2x1,r2y1,r2x2,r2y2){if(r2x1==r2x2){return findIntersectY(r1x1,r1y1,r1x2,r1y2,r2x1)}if(r2y1==r2y2){return findIntersectX(r1x1,r1y1,r1x2,r1y2,r2y1)}var r1m=(r1y1-r1y2)/(r1x1-r1x2);var r1b=r1y1-(r1m*r1x1);var r2m=(r2y1-r2y2)/(r2x1-r2x2);var r2b=r2y1-(r2m*r2x1);var x=(r2b-r1b)/(r1m-r2m);var y=r1m*x+r1b;return{x:x,y:y}}function findIntersectY(r1x1,r1y1,r1x2,r1y2,x){if(r1y1==r1y2){return{x:x,y:r1y1}}var r1m=(r1y1-r1y2)/(r1x1-r1x2);var r1b=r1y1-(r1m*r1x1);var y=r1m*x+r1b;return{x:x,y:y}}function findIntersectX(r1x1,r1y1,r1x2,r1y2,y){if(r1x1==r1x2){return{x:r1x1,y:y}}var r1m=(r1y1-r1y2)/(r1x1-r1x2);var r1b=r1y1-(r1m*r1x1);var x=(y-r1b)/r1m;return{x:x,y:y}}};jQuery.fn.btPosition=function(){function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0}var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,"marginTop");offset.left-=num(this,"marginLeft");parentOffset.top+=num(offsetParent,"borderTopWidth");parentOffset.left+=num(offsetParent,"borderLeftWidth");results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left}}return results};jQuery.fn.btOn=function(){return this.each(function(index){if($.isFunction(this.btOn)){this.btOn()}})};jQuery.fn.btOff=function(){return this.each(function(index){if($.isFunction(this.btOff)){this.btOff()}})};jQuery.bt={};jQuery.bt.vars={clickAnywhereStack:[],closeWhenOpenStack:[]};jQuery.bt.docClick=function(e){if(!e){var e=window.event}if(!$(e.target).parents().andSelf().filter(".bt-wrapper, .bt-active").length){$(jQuery.bt.vars.clickAnywhereStack).btOff();$(document).unbind("click",jQuery.bt.docClick)}};jQuery.bt.defaults={trigger:"hover",clickAnywhereToClose:true,closeWhenOthersOpen:false,width:"200px",padding:"10px",spikeGirth:10,spikeLength:15,overlap:0,overlay:false,killTitle:true,textzIndex:9999,boxzIndex:9998,wrapperzIndex:9997,positions:["most"],fill:"rgb(255, 255, 102)",windowMargin:10,strokeWidth:1,strokeStyle:"#000",cornerRadius:5,centerPointX:0.5,centerPointY:0.5,shadow:false,shadowOffsetX:2,shadowOffsetY:2,shadowBlur:3,shadowColor:"#000",animate:false,distance:15,easing:"swing",speed:200,cssClass:"",cssStyles:{},activeClass:"bt-active",contentSelector:"$(this).attr('title')",ajaxPath:null,ajaxError:"<strong>ERROR:</strong> <em>%error</em>",ajaxLoading:"<blink>Loading...</blink>",ajaxData:{},ajaxType:"GET",ajaxCache:true,ajaxOpts:{},preShow:function(){return},postShow:function(){return},preHide:function(){return},postHide:function(){return},hoverIntentOpts:{interval:300,timeout:500}}; \ No newline at end of file +jQuery.bt={version:"0.9.5-rc1"};(function($){jQuery.fn.bt=function(content,options){if(typeof content!="string"){var contentSelect=true;options=content;content=false;}else{var contentSelect=false;}if(jQuery.fn.hoverIntent&&jQuery.bt.defaults.trigger=="hover"){jQuery.bt.defaults.trigger="hoverIntent";}return this.each(function(index){var opts=jQuery.extend(false,jQuery.bt.defaults,jQuery.bt.options,options);opts.spikeLength=numb(opts.spikeLength);opts.spikeGirth=numb(opts.spikeGirth);opts.overlap=numb(opts.overlap);var ajaxTimeout=false;if(opts.killTitle){$(this).find("[title]").andSelf().each(function(){if(!$(this).attr("bt-xTitle")){$(this).attr("bt-xTitle",$(this).attr("title")).attr("title","");}});}if(typeof opts.trigger=="string"){opts.trigger=[opts.trigger];}if(opts.trigger[0]=="hoverIntent"){var hoverOpts=jQuery.extend(opts.hoverIntentOpts,{over:function(){this.btOn();},out:function(){this.btOff();}});$(this).hoverIntent(hoverOpts);}else{if(opts.trigger[0]=="hover"){$(this).hover(function(){this.btOn();},function(){this.btOff();});}else{if(opts.trigger[0]=="now"){if($(this).hasClass("bt-active")){this.btOff();}else{this.btOn();}}else{if(opts.trigger[0]=="none"){}else{if(opts.trigger.length>1&&opts.trigger[0]!=opts.trigger[1]){$(this).bind(opts.trigger[0],function(){this.btOn();}).bind(opts.trigger[1],function(){this.btOff();});}else{$(this).bind(opts.trigger[0],function(){if($(this).hasClass("bt-active")){this.btOff();}else{this.btOn();}});}}}}}this.btOn=function(){if(typeof $(this).data("bt-box")=="object"){this.btOff();}opts.preBuild.apply(this);$(jQuery.bt.vars.closeWhenOpenStack).btOff();$(this).addClass("bt-active "+opts.activeClass);if(contentSelect&&opts.ajaxPath==null){if(opts.killTitle){$(this).attr("title",$(this).attr("bt-xTitle"));}content=$.isFunction(opts.contentSelector)?opts.contentSelector.apply(this):eval(opts.contentSelector);if(opts.killTitle){$(this).attr("title","");}}if(opts.ajaxPath!=null&&content==false){if(typeof opts.ajaxPath=="object"){var url=eval(opts.ajaxPath[0]);url+=opts.ajaxPath[1]?" "+opts.ajaxPath[1]:"";}else{var url=opts.ajaxPath;}var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}var cacheData=opts.ajaxCache?$(document.body).data("btCache-"+url.replace(/\./g,"")):null;if(typeof cacheData=="string"){content=selector?$("<div/>").append(cacheData.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):cacheData;}else{var target=this;var ajaxOpts=jQuery.extend(false,{type:opts.ajaxType,data:opts.ajaxData,cache:opts.ajaxCache,url:url,complete:function(XMLHttpRequest,textStatus){if(textStatus=="success"||textStatus=="notmodified"){if(opts.ajaxCache){$(document.body).data("btCache-"+url.replace(/\./g,""),XMLHttpRequest.responseText);}ajaxTimeout=false;content=selector?$("<div/>").append(XMLHttpRequest.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):XMLHttpRequest.responseText;}else{if(textStatus=="timeout"){ajaxTimeout=true;}content=opts.ajaxError.replace(/%error/g,XMLHttpRequest.statusText);}if($(target).hasClass("bt-active")){target.btOn();}}},opts.ajaxOpts);jQuery.ajax(ajaxOpts);content=opts.ajaxLoading;}}var shadowMarginX=0;var shadowMarginY=0;var shadowShiftX=0;var shadowShiftY=0;if(opts.shadow&&!shadowSupport()){opts.shadow=false;jQuery.extend(opts,opts.noShadowOpts);}if(opts.shadow){if(opts.shadowBlur>Math.abs(opts.shadowOffsetX)){shadowMarginX=opts.shadowBlur*2;}else{shadowMarginX=opts.shadowBlur+Math.abs(opts.shadowOffsetX);}shadowShiftX=(opts.shadowBlur-opts.shadowOffsetX)>0?opts.shadowBlur-opts.shadowOffsetX:0;if(opts.shadowBlur>Math.abs(opts.shadowOffsetY)){shadowMarginY=opts.shadowBlur*2;}else{shadowMarginY=opts.shadowBlur+Math.abs(opts.shadowOffsetY);}shadowShiftY=(opts.shadowBlur-opts.shadowOffsetY)>0?opts.shadowBlur-opts.shadowOffsetY:0;}if(opts.offsetParent){var offsetParent=$(opts.offsetParent);var offsetParentPos=offsetParent.offset();var pos=$(this).offset();var top=numb(pos.top)-numb(offsetParentPos.top)+numb($(this).css("margin-top"))-shadowShiftY;var left=numb(pos.left)-numb(offsetParentPos.left)+numb($(this).css("margin-left"))-shadowShiftX;}else{var offsetParent=($(this).css("position")=="absolute")?$(this).parents().eq(0).offsetParent():$(this).offsetParent();var pos=$(this).btPosition();var top=numb(pos.top)+numb($(this).css("margin-top"))-shadowShiftY;var left=numb(pos.left)+numb($(this).css("margin-left"))-shadowShiftX;}var width=$(this).btOuterWidth();var height=$(this).outerHeight();if(typeof content=="object"){var original=content;var clone=$(original).clone(true).show();var origClones=$(original).data("bt-clones")||[];origClones.push(clone);$(original).data("bt-clones",origClones);$(clone).data("bt-orig",original);$(this).data("bt-content-orig",{original:original,clone:clone});content=clone;}if(typeof content=="null"||content==""){return;}var $text=$('<div class="bt-content"></div>').append(content).css({padding:opts.padding,position:"absolute",width:(opts.shrinkToFit?"auto":opts.width),zIndex:opts.textzIndex,left:shadowShiftX,top:shadowShiftY}).css(opts.cssStyles);var $box=$('<div class="bt-wrapper"></div>').append($text).addClass(opts.cssClass).css({position:"absolute",width:opts.width,zIndex:opts.wrapperzIndex,visibility:"hidden"}).appendTo(offsetParent);if(jQuery.fn.bgiframe){$text.bgiframe();$box.bgiframe();}$(this).data("bt-box",$box);var scrollTop=numb($(document).scrollTop());var scrollLeft=numb($(document).scrollLeft());var docWidth=numb($(window).width());var docHeight=numb($(window).height());var winRight=scrollLeft+docWidth;var winBottom=scrollTop+docHeight;var space=new Object();var thisOffset=$(this).offset();space.top=thisOffset.top-scrollTop;space.bottom=docHeight-((thisOffset+height)-scrollTop);space.left=thisOffset.left-scrollLeft;space.right=docWidth-((thisOffset.left+width)-scrollLeft);var textOutHeight=numb($text.outerHeight());var textOutWidth=numb($text.btOuterWidth());if(opts.positions.constructor==String){opts.positions=opts.positions.replace(/ /,"").split(",");}if(opts.positions[0]=="most"){var position="top";for(var pig in space){position=space[pig]>space[position]?pig:position;}}else{for(var x in opts.positions){var position=opts.positions[x];if((position=="left"||position=="right")&&space[position]>textOutWidth+opts.spikeLength){break;}else{if((position=="top"||position=="bottom")&&space[position]>textOutHeight+opts.spikeLength){break;}}}}var horiz=left+((width-textOutWidth)*0.5);var vert=top+((height-textOutHeight)*0.5);var points=new Array();var textTop,textLeft,textRight,textBottom,textTopSpace,textBottomSpace,textLeftSpace,textRightSpace,crossPoint,textCenter,spikePoint;switch(position){case"top":$text.css("margin-bottom",opts.spikeLength+"px");$box.css({top:(top-$text.outerHeight(true))+opts.overlap,left:horiz});textRightSpace=(winRight-opts.windowMargin)-($text.offset().left+$text.btOuterWidth(true));var xShift=shadowShiftX;if(textRightSpace<0){$box.css("left",(numb($box.css("left"))+textRightSpace)+"px");xShift-=textRightSpace;}textLeftSpace=($text.offset().left+numb($text.css("margin-left")))-(scrollLeft+opts.windowMargin);if(textLeftSpace<0){$box.css("left",(numb($box.css("left"))-textLeftSpace)+"px");xShift+=textLeftSpace;}textTop=$text.btPosition().top+numb($text.css("margin-top"));textLeft=$text.btPosition().left+numb($text.css("margin-left"));textRight=textLeft+$text.btOuterWidth();textBottom=textTop+$text.outerHeight();textCenter={x:textLeft+($text.btOuterWidth()*opts.centerPointX),y:textTop+($text.outerHeight()*opts.centerPointY)};points[points.length]=spikePoint={y:textBottom+opts.spikeLength,x:((textRight-textLeft)*0.5)+xShift,type:"spike"};crossPoint=findIntersectX(spikePoint.x,spikePoint.y,textCenter.x,textCenter.y,textBottom);crossPoint.x=crossPoint.x<textLeft+opts.spikeGirth/2+opts.cornerRadius?textLeft+opts.spikeGirth/2+opts.cornerRadius:crossPoint.x;crossPoint.x=crossPoint.x>(textRight-opts.spikeGirth/2)-opts.cornerRadius?(textRight-opts.spikeGirth/2)-opts.CornerRadius:crossPoint.x;points[points.length]={x:crossPoint.x-(opts.spikeGirth/2),y:textBottom,type:"join"};points[points.length]={x:textLeft,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:textTop,type:"corner"};points[points.length]={x:textRight,y:textTop,type:"corner"};points[points.length]={x:textRight,y:textBottom,type:"corner"};points[points.length]={x:crossPoint.x+(opts.spikeGirth/2),y:textBottom,type:"join"};points[points.length]=spikePoint;break;case"left":$text.css("margin-right",opts.spikeLength+"px");$box.css({top:vert+"px",left:((left-$text.btOuterWidth(true))+opts.overlap)+"px"});textBottomSpace=(winBottom-opts.windowMargin)-($text.offset().top+$text.outerHeight(true));var yShift=shadowShiftY;if(textBottomSpace<0){$box.css("top",(numb($box.css("top"))+textBottomSpace)+"px");yShift-=textBottomSpace;}textTopSpace=($text.offset().top+numb($text.css("margin-top")))-(scrollTop+opts.windowMargin);if(textTopSpace<0){$box.css("top",(numb($box.css("top"))-textTopSpace)+"px");yShift+=textTopSpace;}textTop=$text.btPosition().top+numb($text.css("margin-top"));textLeft=$text.btPosition().left+numb($text.css("margin-left"));textRight=textLeft+$text.btOuterWidth();textBottom=textTop+$text.outerHeight();textCenter={x:textLeft+($text.btOuterWidth()*opts.centerPointX),y:textTop+($text.outerHeight()*opts.centerPointY)};points[points.length]=spikePoint={x:textRight+opts.spikeLength,y:((textBottom-textTop)*0.5)+yShift,type:"spike"};crossPoint=findIntersectY(spikePoint.x,spikePoint.y,textCenter.x,textCenter.y,textRight);crossPoint.y=crossPoint.y<textTop+opts.spikeGirth/2+opts.cornerRadius?textTop+opts.spikeGirth/2+opts.cornerRadius:crossPoint.y;crossPoint.y=crossPoint.y>(textBottom-opts.spikeGirth/2)-opts.cornerRadius?(textBottom-opts.spikeGirth/2)-opts.cornerRadius:crossPoint.y;points[points.length]={x:textRight,y:crossPoint.y+opts.spikeGirth/2,type:"join"};points[points.length]={x:textRight,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:textBottom,type:"corner"};points[points.length]={x:textLeft,y:textTop,type:"corner"};points[points.length]={x:textRight,y:textTop,type:"corner"};points[points.length]={x:textRight,y:crossPoint.y-opts.spikeGirth/2,type:"join"};points[points.length]=spikePoint;break;case"bottom":$text.css("margin-top",opts.spikeLength+"px");$box.css({top:(top+height)-opts.overlap,left:horiz});textRightSpace=(winRight-opts.windowMargin)-($text.offset().left+$text.btOuterWidth(true));var xShift=shadowShiftX;if(textRightSpace<0){$box.css("left",(numb($box.css("left"))+textRightSpace)+"px");xShift-=textRightSpace;}textLeftSpace=($text.offset().left+numb($text.css("margin-left")))-(scrollLeft+opts.windowMargin);if(textLeftSpace<0){$box.css("left",(numb($box.css("left"))-textLeftSpace)+"px");xShift+=textLeftSpace;}textTop=$text.btPosition().top+numb($text.css("margin-top"));textLeft=$text.btPosition().left+numb($text.css("margin-left"));textRight=textLeft+$text.btOuterWidth();textBottom=textTop+$text.outerHeight();textCenter={x:textLeft+($text.btOuterWidth()*opts.centerPointX),y:textTop+($text.outerHeight()*opts.centerPointY)};points[points.length]=spikePoint={x:((textRight-textLeft)*0.5)+xShift,y:shadowShiftY,type:"spike"};crossPoint=findIntersectX(spikePoint.x,spikePoint.y,textCenter.x,textCenter.y,textTop);crossPoint.x=crossPoint.x<textLeft+opts.spikeGirth/2+opts.cornerRadius?textLeft+opts.spikeGirth/2+opts.cornerRadius:crossPoint.x;crossPoint.x=crossPoint.x>(textRight-opts.spikeGirth/2)-opts.cornerRadius?(textRight-opts.spikeGirth/2)-opts.cornerRadius:crossPoint.x;po... [truncated message content] |