fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [9228] property: invoice


From: Sigurd Nes
Subject: [Fmsystem-commits] [9228] property: invoice
Date: Wed, 25 Apr 2012 19:02:57 +0000

Revision: 9228
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9228
Author:   sigurdne
Date:     2012-04-25 19:02:56 +0000 (Wed, 25 Apr 2012)
Log Message:
-----------
property: invoice

Modified Paths:
--------------
    trunk/property/inc/class.uiinvoice2.inc.php
    trunk/property/js/portico/ajax_invoice.js
    trunk/property/js/portico/ajax_workorder_edit.js

Added Paths:
-----------
    trunk/property/js/tinybox2/
    trunk/property/js/tinybox2/advanced.html
    trunk/property/js/tinybox2/ajax.html
    trunk/property/js/tinybox2/images/
    trunk/property/js/tinybox2/images/close.png
    trunk/property/js/tinybox2/images/preload.gif
    trunk/property/js/tinybox2/images/rhino.jpg
    trunk/property/js/tinybox2/index.html
    trunk/property/js/tinybox2/packed.js
    trunk/property/js/tinybox2/post.php
    trunk/property/js/tinybox2/style.css
    trunk/property/js/tinybox2/tinybox.js

Modified: trunk/property/inc/class.uiinvoice2.inc.php
===================================================================
--- trunk/property/inc/class.uiinvoice2.inc.php 2012-04-25 16:44:54 UTC (rev 
9227)
+++ trunk/property/inc/class.uiinvoice2.inc.php 2012-04-25 19:02:56 UTC (rev 
9228)
@@ -396,6 +396,8 @@
 
                        self::add_javascript('property', 'portico', 
'ajax_invoice.js');
                        self::add_javascript('property', 'yahoo', 
'invoice2.index.js');
+                       self::add_javascript('property', 'tinybox2', 
'packed.js');
+                       
$GLOBALS['phpgw']->css->add_external_file('property/js/tinybox2/style.css');
 
                        $GLOBALS['phpgw']->xslttpl->add_file(array('invoice2'));
                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('data' => $data));

Modified: trunk/property/js/portico/ajax_invoice.js
===================================================================
--- trunk/property/js/portico/ajax_invoice.js   2012-04-25 16:44:54 UTC (rev 
9227)
+++ trunk/property/js/portico/ajax_invoice.js   2012-04-25 19:02:56 UTC (rev 
9228)
@@ -658,17 +658,38 @@
 //------------
 
 function load_order( id ){
-//     var order_id = $("#order_id").val( );
-       $("#curtain").show();
-       $("#popupBox").fadeIn("slow");
        var oArgs = {menuaction: 'property.uiinvoice.view_order', order_id: id, 
nonavbar: true, lean: true};
        var requestUrl = phpGWLink('index.php', oArgs);
 
-       var htmlString = "";
-       htmlString += "<iframe  width=\"100%\" height=\"100%\" src = \"" + 
requestUrl + "\" ><p>Your browser does not support iframes.</p></iframe>";
-       $("#popupBox").html( htmlString );
+       TINY.box.show({iframe:requestUrl, 
boxid:'frameless',width:750,height:450,fixed:false,maskid:'darkmask',maskopacity:40,
 mask:true, animate:true, close: true,closejs:function(){closeJS_local()}});
+//     $("#curtain").show();
+//     $("#popupBox").fadeIn("slow");
+//     var htmlString = "";
+//     htmlString += "<iframe  width=\"100%\" height=\"100%\" src = \"" + 
requestUrl + "\" ><p>Your browser does not support iframes.</p></iframe>";
+//     $("#popupBox").html( htmlString );
 }
 
+function closeJS_local()
+{
+       var line_id = $("#line_id").val( );
+       var voucher_id_orig = $("#voucher_id").val();
+       $("#curtain").hide();
+       $("#popupBox").hide();
+       update_form_values(line_id, voucher_id_orig)
+}
+
+function closeJS_remote()
+{
+       TINY.box.hide();
+/*
+       var line_id = $("#line_id").val( );
+       var voucher_id_orig = $("#voucher_id").val();
+       $("#curtain").hide();
+       $("#popupBox").hide();
+       update_form_values(line_id, voucher_id_orig)
+*/
+}
+
 function hide_popupBox( ){
        var line_id = $("#line_id").val( );
        var voucher_id_orig = $("#voucher_id").val();

Modified: trunk/property/js/portico/ajax_workorder_edit.js
===================================================================
--- trunk/property/js/portico/ajax_workorder_edit.js    2012-04-25 16:44:54 UTC 
(rev 9227)
+++ trunk/property/js/portico/ajax_workorder_edit.js    2012-04-25 19:02:56 UTC 
(rev 9228)
@@ -65,7 +65,8 @@
                                        
                                        if(ok)
                                        {
-                                               parent.hide_popupBox();
+                                               parent.closeJS_remote();
+                                       //      parent.hide_popupBox();
                                        }
                                }
                        }
@@ -74,7 +75,8 @@
 
        $("#workorder_cancel").live("submit", function(e){
                e.preventDefault();
-               parent.hide_popupBox();
+               parent.closeJS_remote();
+//             parent.hide_popupBox();
        });
 
 });

Added: trunk/property/js/tinybox2/advanced.html
===================================================================
--- trunk/property/js/tinybox2/advanced.html                            (rev 0)
+++ trunk/property/js/tinybox2/advanced.html    2012-04-25 19:02:56 UTC (rev 
9228)
@@ -0,0 +1,2 @@
+<p>This content came from an Ajax request. Using TinyBox you can easily <a 
href="javascript:TINY.box.size(450,350,1)">expand</a> or <a 
href="javascript:TINY.box.size(200,150)">contract</a> a popup on the fly. You 
can even <a href="javascript:TINY.box.hide()">close it</a> or press ESC.</p>
+<p><a href="javascript:TINY.box.fill('Static Content')">Click here</a> to load 
some static HTML or <a href="javascript:TINY.box.fill('ajax.html',1,0,1)">click 
here</a> to load an external HTML table.</p>
\ No newline at end of file

Added: trunk/property/js/tinybox2/ajax.html
===================================================================
--- trunk/property/js/tinybox2/ajax.html                                (rev 0)
+++ trunk/property/js/tinybox2/ajax.html        2012-04-25 19:02:56 UTC (rev 
9228)
@@ -0,0 +1,37 @@
+<table width="400" cellpadding="3" cellspacing="3" border="1" 
bgcolor="#eeeeee">
+       <tr>
+               <th>Table Header</th>
+               <th>Table Header</th>
+               <th>Table Header</th>
+       </tr>
+       <tr>
+               <td>Table Cell</td>
+               <td>Table Cell</td>
+               <td>Table Cell</td>
+       </tr>
+       <tr>
+               <td>Table Cell</td>
+               <td>Table Cell</td>
+               <td>Table Cell</td>
+       </tr>
+       <tr>
+               <td>Table Cell</td>
+               <td>Table Cell</td>
+               <td>Table Cell</td>
+       </tr>
+       <tr>
+               <td>Table Cell</td>
+               <td>Table Cell</td>
+               <td>Table Cell</td>
+       </tr>
+       <tr>
+               <td>Table Cell</td>
+               <td>Table Cell</td>
+               <td>Table Cell</td>
+       </tr>
+       <tr>
+               <td>Table Cell</td>
+               <td>Table Cell</td>
+               <td>Table Cell</td>
+       </tr>
+</table>
\ No newline at end of file

Added: trunk/property/js/tinybox2/images/close.png
===================================================================
(Binary files differ)


Property changes on: trunk/property/js/tinybox2/images/close.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/property/js/tinybox2/images/preload.gif
===================================================================
(Binary files differ)


Property changes on: trunk/property/js/tinybox2/images/preload.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/property/js/tinybox2/images/rhino.jpg
===================================================================
(Binary files differ)


Property changes on: trunk/property/js/tinybox2/images/rhino.jpg
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/property/js/tinybox2/index.html
===================================================================
--- trunk/property/js/tinybox2/index.html                               (rev 0)
+++ trunk/property/js/tinybox2/index.html       2012-04-25 19:02:56 UTC (rev 
9228)
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml";>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>TinyBox2 - JavaScript Modal Windows</title>
+<link rel="stylesheet" href="style.css" />
+<script type="text/javascript" src="tinybox.js"></script>
+</head>
+<body>
+<div id="testdiv">
+       <h1>TinyBox2 JavaScript Modal Windows</h1>
+       <h2>For complete details visit <a 
href="http://www.scriptiny.com/2011/03/javascript-modal-windows/";>scriptiny.com</a>.</h2>
+       <ul>
+               <li onclick="TINY.box.show({html:'This is a 
warning!',animate:false,close:false,boxid:'error',top:5})">No Animation, No 
Close Button, Auto Width/Height, Custom Styling</li>
+               <li 
onclick="TINY.box.show({url:'post.php',post:'id=16',width:200,height:100,opacity:20,topsplit:3})">Ajax
 Post, Fixed Width/Height, Light Mask, Custom Vertical Split</li>
+               <li onclick="TINY.box.show({html:'The entry has been updated 
successfully!',animate:false,close:false,mask:false,boxid:'success',autohide:2,top:-14,left:-17})">Custom
 Position, No Mask, Auto-Hide</li>
+               <li 
onclick="TINY.box.show({iframe:'http://www.scriptiny.com/',boxid:'frameless',width:750,height:450,fixed:false,maskid:'bluemask',maskopacity:40,closejs:function(){closeJS()}})">iFrame,
 Blue Mask, Absolute Position, Frameless, Close Callback</li>
+               <li 
onclick="TINY.box.show({url:'advanced.html',width:300,height:150})">Ajax, 
Advanced Functions</li>
+               <li 
onclick="TINY.box.show({image:'images/rhino.jpg',boxid:'frameless',animate:true,openjs:function(){openJS()}})">Image,
 Load Callback</li>
+       </ul>
+       <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed commodo 
metus non diam luctus facilisis. Aenean vel urna ante, eu porta nunc. 
Vestibulum facilisis, tortor vitae semper iaculis, metus elit dictum leo, vitae 
suscipit leo augue id felis. Nam pretium tempus justo vel tempor. Pellentesque 
at cursus tellus. Pellentesque tincidunt ornare odio in lacinia. Aenean eget 
tristique ligula. Maecenas malesuada nunc at turpis lacinia consequat dignissim 
mi euismod. Fusce ornare magna vitae neque viverra condimentum. Vestibulum 
sollicitudin lacus placerat mi ornare vulputate. Vestibulum facilisis eros ut 
magna tincidunt sed viverra nisl tincidunt. Vivamus et tempus tellus. 
Vestibulum ultricies, libero nec lacinia ornare, nunc ligula dictum purus, id 
molestie arcu sapien et nulla. Sed sed quam ante, nec vestibulum ipsum. 
Phasellus ullamcorper iaculis lectus non fermentum. Nam tempor feugiat lacinia. 
Phasellus eu gravida sapien.</p>
+       <p>Cras fringilla nulla non nisi ullamcorper non ultrices est dictum. 
Vivamus rhoncus eros id dui viverra dictum in eget elit. Fusce dignissim ante 
ut erat sollicitudin ut pulvinar turpis malesuada. In scelerisque est 
scelerisque orci suscipit sed viverra nulla imperdiet. Proin eleifend rutrum 
mi, quis cursus sapien pretium vitae. Vestibulum ante ipsum primis in faucibus 
orci luctus et ultrices posuere cubilia Curae; Nunc non mauris ante, et posuere 
diam. Aliquam congue elit ac nunc luctus a mollis lectus iaculis. Aliquam 
consequat malesuada posuere. Maecenas orci orci, accumsan nec suscipit ac, 
interdum vel augue. Donec ut risus orci. Mauris purus elit, cursus id tincidunt 
vel, posuere eu ligula. Ut sed eros et ipsum rutrum sagittis. Vestibulum tellus 
felis, varius in cursus ac, venenatis id lorem. Nullam nec leo nibh. Praesent 
interdum ligula et metus sollicitudin auctor. Vestibulum accumsan nulla non 
dolor mollis mattis. In vulputate venenatis elit et pharetra.</p>
+       <p>Duis et velit lectus. Cras leo justo, accumsan et eleifend sit amet, 
consequat quis dui. Donec sed est non libero ultrices commodo sed et augue. 
Quisque vestibulum iaculis augue feugiat sollicitudin. Phasellus scelerisque 
tristique elit faucibus varius. Suspendisse lacinia, ante quis consectetur 
varius, erat mauris rutrum massa, id dignissim erat lacus eleifend justo. Etiam 
quis dolor libero. Pellentesque iaculis, velit eget bibendum adipiscing, quam 
augue fermentum lacus, ut ultrices velit urna at est. Fusce nulla enim, commodo 
vitae sodales non, molestie non eros. Sed vitae rutrum ipsum. Donec ac nulla id 
dolor lacinia laoreet ut at neque. Proin consectetur velit at dolor hendrerit 
luctus. Curabitur vehicula pharetra purus, eget malesuada tortor posuere nec. 
Aenean non velit ipsum, ac scelerisque eros. Praesent pretium viverra vehicula. 
Suspendisse hendrerit varius ante, quis rhoncus dui volutpat non.</p>
+       <p>Ut eros quam, mattis et vestibulum in, porta vitae nisl. Ut quis 
felis ipsum, non iaculis sapien. Phasellus sed nisi nulla, in vestibulum nisl. 
Donec turpis tellus, rutrum ut porta at, mattis eu nisl. Nulla facilisi. Cras 
auctor, sem quis sagittis scelerisque, ligula turpis adipiscing mi, vitae 
elementum elit mi sit amet felis. Nulla sapien magna, rhoncus a tincidunt ac, 
tempor id nunc. Nunc sit amet leo in magna pellentesque posuere ut et diam. 
Proin sollicitudin, est ut malesuada consectetur, magna arcu lacinia felis, et 
faucibus nisl diam ut quam. Ut consequat malesuada massa, vitae gravida tortor 
consectetur id. Praesent at risus ultrices ligula pretium pellentesque et 
vulputate ipsum. Morbi ante ante, placerat ac iaculis ac, sagittis nec felis. 
Sed vel nisl leo, ac dictum lectus. Nunc sodales urna non nisl ornare vitae 
viverra lorem molestie. Pellentesque sit amet risus id turpis tempor interdum. 
Phasellus sagittis dignissim iaculis. Ut quis dictum mauris. Integer vitae sem 
ac est blandit hendrerit. Vivamus ultricies, nibh vel ullamcorper eleifend, 
ante libero laoreet enim, nec fringilla dui lacus ut mi.</p>
+       <p>In feugiat, magna eu volutpat dictum, sem sapien mollis elit, at 
sollicitudin metus odio eu orci. Mauris egestas rutrum bibendum. Etiam sit amet 
erat quis nisl sodales egestas. Quisque eu velit urna, id faucibus orci. Cras 
sagittis tincidunt blandit. Donec id suscipit sem. Sed vitae purus in nisi 
consequat pretium fermentum non quam. Sed at orci libero. Mauris et felis 
lacus. Nulla ut turpis ligula, quis vulputate felis. Sed nulla risus, dictum et 
sagittis eu, venenatis vitae dui. Vestibulum luctus lectus quis arcu mollis in 
dignissim leo suscipit. Cras justo neque, ultricies et interdum eget, rhoncus 
non erat. Vestibulum eget dolor nisi, eget adipiscing orci. Sed tortor ligula, 
hendrerit ut hendrerit in, fermentum cursus nisi. Pellentesque ante ligula, 
consectetur quis pellentesque eu, tristique quis arcu. Aenean porta, nisl nec 
sagittis fringilla, leo eros facilisis lorem, vel iaculis augue lorem ut 
lectus. Mauris sit amet velit et sapien aliquam dapibus et id quam. Lorem ipsum 
dolor sit amet, consectetur adipiscing elit. </p>
+</div>
+<script type="text/javascript">
+function openJS(){alert('loaded')}
+function closeJS(){alert('closed')}
+</script>
+</body>
+</html>

Added: trunk/property/js/tinybox2/packed.js
===================================================================
--- trunk/property/js/tinybox2/packed.js                                (rev 0)
+++ trunk/property/js/tinybox2/packed.js        2012-04-25 19:02:56 UTC (rev 
9228)
@@ -0,0 +1 @@
+TINY={};TINY.box=function(){var 
j,m,b,g,v,p=0;return{show:function(o){v={opacity:70,close:1,animate:1,fixed:1,mask:1,maskid:'',boxid:'',topsplit:2,url:0,post:0,height:0,width:0,html:0,iframe:0};for(s
 in 
o){v[s]=o[s]}if(!p){j=document.createElement('div');j.className='tbox';p=document.createElement('div');p.className='tinner';b=document.createElement('div');b.className='tcontent';m=document.createElement('div');m.className='tmask';g=document.createElement('div');g.className='tclose';g.v=0;document.body.appendChild(m);document.body.appendChild(j);j.appendChild(p);p.appendChild(b);m.onclick=g.onclick=TINY.box.hide;window.onresize=TINY.box.resize}else{j.style.display='none';clearTimeout(p.ah);if(g.v){p.removeChild(g);g.v=0}}p.id=v.boxid;m.id=v.maskid;j.style.position=v.fixed?'fixed':'absolute';if(v.html&&!v.animate){p.style.backgroundImage='none';b.innerHTML=v.html;b.style.display='';p.style.width=v.width?v.width+'px':'auto';p.style.height=v.height?v.height+'px':'auto'}else{b.style.display='none';if(!v.animate&&v.width&&v.height){p.style.width=v.width+'px';p.style.height=v.height+'px'}else{p.style.width=p.style.height='100px'}}if(v.mask){this.mask();this.alpha(m,1,v.opacity)}else{this.alpha(j,1,100)}if(v.autohide){p.ah=setTimeout(TINY.box.hide,1000*v.autohide)}else{document.onkeyup=TINY.box.esc}},fill:function(c,u,k,a,w,h){if(u){if(v.image){var
 i=new 
Image();i.onload=function(){w=w||i.width;h=h||i.height;TINY.box.psh(i,a,w,h)};i.src=v.image}else
 if(v.iframe){this.psh('<iframe src="'+v.iframe+'" width="'+v.width+'" 
frameborder="0" height="'+v.height+'"></iframe>',a,w,h)}else{var 
x=window.XMLHttpRequest?new XMLHttpRequest():new 
ActiveXObject('Microsoft.XMLHTTP');x.onreadystatechange=function(){if(x.readyState==4&&x.status==200){p.style.backgroundImage='';TINY.box.psh(x.responseText,a,w,h)}};if(k){x.open('POST',c,true);x.setRequestHeader('Content-type','application/x-www-form-urlencoded');x.send(k)}else{x.open('GET',c,true);x.send(null)}}}else{this.psh(c,a,w,h)}},psh:function(c,a,w,h){if(typeof
 c=='object'){b.appendChild(c)}else{b.innerHTML=c}var 
x=p.style.width,y=p.style.height;if(!w||!h){p.style.width=w?w+'px':'';p.style.height=h?h+'px':'';b.style.display='';if(!h){h=parseInt(b.offsetHeight)}if(!w){w=parseInt(b.offsetWidth)}b.style.display='none'}p.style.width=x;p.style.height=y;this.size(w,h,a)},esc:function(e){e=e||window.event;if(e.keyCode==27){TINY.box.hide()}},hide:function(){TINY.box.alpha(j,-1,0,3);document.onkeypress=null;if(v.closejs){v.closejs()}},resize:function(){TINY.box.pos();TINY.box.mask()},mask:function(){m.style.height=this.total(1)+'px';m.style.width=this.total(0)+'px'},pos:function(){var
 t;if(typeof 
v.top!='undefined'){t=v.top}else{t=(this.height()/v.topsplit)-(j.offsetHeight/2);t=t<20?20:t}if(!v.fixed&&!v.top){t+=this.top()}j.style.top=t+'px';j.style.left=typeof
 
v.left!='undefined'?v.left+'px':(this.width()/2)-(j.offsetWidth/2)+'px'},alpha:function(e,d,a){clearInterval(e.ai);if(d){e.style.opacity=0;e.style.filter='alpha(opacity=0)';e.style.display='block';TINY.box.pos()}e.ai=setInterval(function(){TINY.box.ta(e,a,d)},20)},ta:function(e,a,d){var
 
o=Math.round(e.style.opacity*100);if(o==a){clearInterval(e.ai);if(d==-1){e.style.display='none';e==j?TINY.box.alpha(m,-1,0,2):b.innerHTML=p.style.backgroundImage=''}else{if(e==m){this.alpha(j,1,100)}else{j.style.filter='';TINY.box.fill(v.html||v.url,v.url||v.iframe||v.image,v.post,v.animate,v.width,v.height)}}}else{var
 
n=a-Math.floor(Math.abs(a-o)*.5)*d;e.style.opacity=n/100;e.style.filter='alpha(opacity='+n+')'}},size:function(w,h,a){if(a){clearInterval(p.si);var
 
wd=parseInt(p.style.width)>w?-1:1,hd=parseInt(p.style.height)>h?-1:1;p.si=setInterval(function(){TINY.box.ts(w,wd,h,hd)},20)}else{p.style.backgroundImage='none';if(v.close){p.appendChild(g);g.v=1}p.style.width=w+'px';p.style.height=h+'px';b.style.display='';this.pos();if(v.openjs){v.openjs()}}},ts:function(w,wd,h,hd){var
 
cw=parseInt(p.style.width),ch=parseInt(p.style.height);if(cw==w&&ch==h){clearInterval(p.si);p.style.backgroundImage='none';b.style.display='block';if(v.close){p.appendChild(g);g.v=1}if(v.openjs){v.openjs()}}else{if(cw!=w){p.style.width=(w-Math.floor(Math.abs(w-cw)*.6)*wd)+'px'}if(ch!=h){p.style.height=(h-Math.floor(Math.abs(h-ch)*.6)*hd)+'px'}this.pos()}},top:function(){return
 
document.documentElement.scrollTop||document.body.scrollTop},width:function(){return
 
self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},height:function(){return
 
self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},total:function(d){var
 b=document.body,e=document.documentElement;return 
d?Math.max(Math.max(b.scrollHeight,e.scrollHeight),Math.max(b.clientHeight,e.clientHeight)):Math.max(Math.max(b.scrollWidth,e.scrollWidth),Math.max(b.clientWidth,e.clientWidth))}}}();
\ No newline at end of file

Added: trunk/property/js/tinybox2/post.php
===================================================================
--- trunk/property/js/tinybox2/post.php                         (rev 0)
+++ trunk/property/js/tinybox2/post.php 2012-04-25 19:02:56 UTC (rev 9228)
@@ -0,0 +1 @@
+You posted ID <?php echo $_POST['id']; ?>.
\ No newline at end of file

Added: trunk/property/js/tinybox2/style.css
===================================================================
--- trunk/property/js/tinybox2/style.css                                (rev 0)
+++ trunk/property/js/tinybox2/style.css        2012-04-25 19:02:56 UTC (rev 
9228)
@@ -0,0 +1,23 @@
+body {font:12px/1.4 Verdana,Arial; background:#eee; height:100%; margin:25px 
0; padding:0}
+h1 {font:30px 'Trebuchet MS',Verdana; margin:0}
+h2 {font-size:12px; font-weight:normal; font-style:italic; margin:0 0 20px}
+p {margin:0 0 14px}
+ul {margin:0; padding-left:20px}
+#testdiv {width:600px; margin:0px auto; border:1px solid #ccc; padding:20px 
25px 12px; background:#fff}
+ul {list-style:none; margin-bottom:12px; padding:0}
+li {font:14px Georgia,Verdana; margin-bottom:4px; padding:8px 10px 9px; 
border:1px solid #ccc; background:#eee; cursor:pointer}
+li:hover {border:1px solid #bbb; background:#e3e3e3}
+
+.tbox {position:absolute; display:none; padding:14px 17px; z-index:900}
+.tinner {padding:15px; -moz-border-radius:5px; border-radius:5px; 
background:#fff url(images/preload.gif) no-repeat 50% 50%; border-right:1px 
solid #333; border-bottom:1px solid #333}
+.tmask {position:absolute; display:none; top:0px; left:0px; height:100%; 
width:100%; background:#000; z-index:800}
+.tclose {position:absolute; top:0px; right:0px; width:30px; height:30px; 
cursor:pointer; background:url(images/close.png) no-repeat}
+.tclose:hover {background-position:0 -30px}
+
+#error {background:#ff6969; color:#fff; text-shadow:1px 1px #cf5454; 
border-right:1px solid #000; border-bottom:1px solid #000; padding:0}
+#error .tcontent {padding:10px 14px 11px; border:1px solid #ffb8b8; 
-moz-border-radius:5px; border-radius:5px}
+#success {background:#2ea125; color:#fff; text-shadow:1px 1px #1b6116; 
border-right:1px solid #000; border-bottom:1px solid #000; padding:10; 
-moz-border-radius:0; border-radius:0}
+#bluemask {background:#4195aa}
+#darkmask {background:##000000}
+#frameless {padding:0}
+#frameless .tclose {left:6px}

Added: trunk/property/js/tinybox2/tinybox.js
===================================================================
--- trunk/property/js/tinybox2/tinybox.js                               (rev 0)
+++ trunk/property/js/tinybox2/tinybox.js       2012-04-25 19:02:56 UTC (rev 
9228)
@@ -0,0 +1,134 @@
+TINY={};
+
+TINY.box=function(){
+       var j,m,b,g,v,p=0;
+       return{
+               show:function(o){
+                       
v={opacity:70,close:1,animate:1,fixed:1,mask:1,maskid:'',boxid:'',topsplit:2,url:0,post:0,height:0,width:0,html:0,iframe:0};
+                       for(s in o){v[s]=o[s]}
+                       if(!p){
+                               j=document.createElement('div'); 
j.className='tbox';
+                               p=document.createElement('div'); 
p.className='tinner';
+                               b=document.createElement('div'); 
b.className='tcontent';
+                               m=document.createElement('div'); 
m.className='tmask';
+                               g=document.createElement('div'); 
g.className='tclose'; g.v=0;
+                               document.body.appendChild(m); 
document.body.appendChild(j); j.appendChild(p); p.appendChild(b);
+                               m.onclick=g.onclick=TINY.box.hide; 
window.onresize=TINY.box.resize
+                       }else{
+                               j.style.display='none'; clearTimeout(p.ah); 
if(g.v){p.removeChild(g); g.v=0}
+                       }
+                       p.id=v.boxid; m.id=v.maskid; 
j.style.position=v.fixed?'fixed':'absolute';
+                       if(v.html&&!v.animate){
+                               p.style.backgroundImage='none'; 
b.innerHTML=v.html; b.style.display='';
+                               p.style.width=v.width?v.width+'px':'auto'; 
p.style.height=v.height?v.height+'px':'auto'
+                       }else{
+                               b.style.display='none'; 
+                               if(!v.animate&&v.width&&v.height){
+                                       p.style.width=v.width+'px'; 
p.style.height=v.height+'px'
+                               }else{
+                                       p.style.width=p.style.height='100px'
+                               }
+                       }
+                       if(v.mask){this.mask(); 
this.alpha(m,1,v.opacity)}else{this.alpha(j,1,100)}
+                       
if(v.autohide){p.ah=setTimeout(TINY.box.hide,1000*v.autohide)}else{document.onkeyup=TINY.box.esc}
+               },
+               fill:function(c,u,k,a,w,h){
+                       if(u){
+                               if(v.image){
+                                       var i=new Image(); 
i.onload=function(){w=w||i.width; h=h||i.height; TINY.box.psh(i,a,w,h)}; 
i.src=v.image
+                               }else if(v.iframe){
+                                       this.psh('<iframe src="'+v.iframe+'" 
width="'+v.width+'" frameborder="0" height="'+v.height+'"></iframe>',a,w,h)
+                               }else{
+                                       var x=window.XMLHttpRequest?new 
XMLHttpRequest():new ActiveXObject('Microsoft.XMLHTTP');
+                                       x.onreadystatechange=function(){
+                                               
if(x.readyState==4&&x.status==200){p.style.backgroundImage=''; 
TINY.box.psh(x.responseText,a,w,h)}
+                                       };
+                                       if(k){
+                       x.open('POST',c,true); 
x.setRequestHeader('Content-type','application/x-www-form-urlencoded'); 
x.send(k)
+                                       }else{
+                                       x.open('GET',c,true); x.send(null)
+                                       }
+                               }
+                       }else{
+                               this.psh(c,a,w,h)
+                       }
+               },
+               psh:function(c,a,w,h){
+                       if(typeof 
c=='object'){b.appendChild(c)}else{b.innerHTML=c}
+                       var x=p.style.width, y=p.style.height;
+                       if(!w||!h){
+                               p.style.width=w?w+'px':''; 
p.style.height=h?h+'px':''; b.style.display='';
+                               if(!h){h=parseInt(b.offsetHeight)}
+                               if(!w){w=parseInt(b.offsetWidth)}
+                               b.style.display='none'
+                       }
+                       p.style.width=x; p.style.height=y;
+                       this.size(w,h,a)
+               },
+               esc:function(e){e=e||window.event; 
if(e.keyCode==27){TINY.box.hide()}},
+               hide:function(){TINY.box.alpha(j,-1,0,3); 
document.onkeypress=null; if(v.closejs){v.closejs()}},
+               resize:function(){TINY.box.pos(); TINY.box.mask()},
+               mask:function(){m.style.height=this.total(1)+'px'; 
m.style.width=this.total(0)+'px'},
+               pos:function(){
+                       var t;
+                       if(typeof 
v.top!='undefined'){t=v.top}else{t=(this.height()/v.topsplit)-(j.offsetHeight/2);
 t=t<20?20:t}
+                       if(!v.fixed&&!v.top){t+=this.top()}
+                       j.style.top=t+'px'; 
+                       j.style.left=typeof 
v.left!='undefined'?v.left+'px':(this.width()/2)-(j.offsetWidth/2)+'px'
+               },
+               alpha:function(e,d,a){
+                       clearInterval(e.ai);
+                       if(d){e.style.opacity=0; 
e.style.filter='alpha(opacity=0)'; e.style.display='block'; TINY.box.pos()}
+                       e.ai=setInterval(function(){TINY.box.ta(e,a,d)},20)
+               },
+               ta:function(e,a,d){
+                       var o=Math.round(e.style.opacity*100);
+                       if(o==a){
+                               clearInterval(e.ai);
+                               if(d==-1){
+                                       e.style.display='none';
+                                       
e==j?TINY.box.alpha(m,-1,0,2):b.innerHTML=p.style.backgroundImage=''
+                               }else{
+                                       if(e==m){
+                                               this.alpha(j,1,100)
+                                       }else{
+                                               j.style.filter='';
+                                               
TINY.box.fill(v.html||v.url,v.url||v.iframe||v.image,v.post,v.animate,v.width,v.height)
+                                       }
+                               }
+                       }else{
+                               var n=a-Math.floor(Math.abs(a-o)*.5)*d;
+                               e.style.opacity=n/100; 
e.style.filter='alpha(opacity='+n+')'
+                       }
+               },
+               size:function(w,h,a){
+                       if(a){
+                               clearInterval(p.si); var 
wd=parseInt(p.style.width)>w?-1:1, hd=parseInt(p.style.height)>h?-1:1;
+                               
p.si=setInterval(function(){TINY.box.ts(w,wd,h,hd)},20)
+                       }else{
+                               p.style.backgroundImage='none'; 
if(v.close){p.appendChild(g); g.v=1}
+                               p.style.width=w+'px'; p.style.height=h+'px'; 
b.style.display=''; this.pos();
+                               if(v.openjs){v.openjs()}
+                       }
+               },
+               ts:function(w,wd,h,hd){
+                       var cw=parseInt(p.style.width), 
ch=parseInt(p.style.height);
+                       if(cw==w&&ch==h){
+                               clearInterval(p.si); 
p.style.backgroundImage='none'; b.style.display='block'; 
if(v.close){p.appendChild(g); g.v=1}
+                               if(v.openjs){v.openjs()}
+                       }else{
+                               
if(cw!=w){p.style.width=(w-Math.floor(Math.abs(w-cw)*.6)*wd)+'px'}
+                               
if(ch!=h){p.style.height=(h-Math.floor(Math.abs(h-ch)*.6)*hd)+'px'}
+                               this.pos()
+                       }
+               },
+               top:function(){return 
document.documentElement.scrollTop||document.body.scrollTop},
+               width:function(){return 
self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},
+               height:function(){return 
self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},
+               total:function(d){
+                       var b=document.body, e=document.documentElement;
+                       return 
d?Math.max(Math.max(b.scrollHeight,e.scrollHeight),Math.max(b.clientHeight,e.clientHeight)):
+                       
Math.max(Math.max(b.scrollWidth,e.scrollWidth),Math.max(b.clientWidth,e.clientWidth))
+               }
+       }
+}();
\ No newline at end of file




reply via email to

[Prev in Thread] Current Thread [Next in Thread]