web/popups/calculator.html
author Stefan Hühner <stefan.huehner@openbravo.com>
Wed, 09 Mar 2011 00:28:31 +0100
changeset 11128 78bdd4129fe5
parent 4495 794612123584
permissions -rw-r--r--
Fix performance regression in dal-startup introduced by cset 3e4e4993fee9
That cset changed the license header of the hbm.xml template file which led
to the double inclusion of the content into the template doubling its size
and affecting dal-startup time severly (15-30s slower). This fix reverts to the
earlier runtime by using a placeholder string which doesn't overlap with text
from the license header.
carlos@0
     1
<!--
carlos@0
     2
Title: Tigra Calculator
carlos@0
     3
URL: http://www.softcomplex.com/products/tigra_calculator/
carlos@0
     4
Version: 1.0
carlos@0
     5
Date: 04/14/2003 (mm/dd/yyyy)
carlos@0
     6
Note: Permission given to use this script in ANY kind of applications if
carlos@0
     7
   header lines are left unchanged.
carlos@0
     8
Note: Script consists of two files: calculator.js and calculator.html
carlos@0
     9
-->
carlos@0
    10
carlos@0
    11
<html>
carlos@0
    12
<head>
david@3131
    13
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
carlos@0
    14
	<title>Calculator</title>
david@3113
    15
	<link rel="shortcut icon" href="../../web/images/favicon.ico" type="image/x-icon" />
carlos@0
    16
</head>
carlos@0
    17
<body topmargin="10" marginheight="10" leftmargin="10" marginwidth="10" onload="on_load()" onunload="T.t_load=false" bgcolor="#343434">
carlos@0
    18
<form name="calc">
carlos@0
    19
<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
carlos@0
    20
<tr>
carlos@0
    21
	<td align="center" style="height: 44px">
carlos@0
    22
	
carlos@0
    23
	<table cellpadding="0" cellspacing="0" border="0" style="width: 198px; height: 29px">
carlos@0
    24
		<tr>
carlos@0
    25
			<td style="height: 29px; width: 16px; background-image: url(../images/calculator/displayLeft.png)"></td>
carlos@0
    26
			<td style="height: 29px; width: 166px; background-image: url(../images/calculator/displayFill.png)">
carlos@0
    27
				<input type="text" name="monitor" value="0" size="16" maxlength="16" dir="rtl" onfocus="document.body.focus()" 
carlos@0
    28
					style="width: 166px; height: 24px; font-size: 20px; color: #e3f4fe; background: transparent; 
carlos@0
    29
						border: none; margin: 0px; padding: 0px; line-height: 24px; 
carlos@0
    30
						font-family: tahoma, verdana, arial, helvetica, sans-serif;">
carlos@0
    31
			</td>
carlos@0
    32
			<td style="height: 29px; width: 16px; background-image: url(../images/calculator/displayRight.png)"></td>
carlos@0
    33
		</tr>
carlos@0
    34
	</table>
carlos@0
    35
	
carlos@0
    36
	</td>
carlos@0
    37
</tr>
carlos@0
    38
<tr>
carlos@0
    39
	<td style="height: 7px">
carlos@0
    40
	</td>
carlos@0
    41
</tr>
carlos@0
    42
<tr>
carlos@0
    43
	<td align="center">
carlos@0
    44
	<table cellpadding="0" cellspacing="1" border="0">
carlos@0
    45
	<tr align="center">
carlos@0
    46
		<td><a href="#"><img src="../images/calculator/0_1.png" border="0" alt="7" width="38" height="27"></a></td>
carlos@0
    47
		<td><a href="#"><img src="../images/calculator/1_1.png" border="0" alt="8" width="38" height="27"></a></td>
carlos@0
    48
		<td><a href="#"><img src="../images/calculator/2_1.png" border="0" alt="9" width="38" height="27"></a></td>
carlos@0
    49
		<td width="3"></td>
carlos@0
    50
		<td><a href="#"><img src="../images/calculator/3_1.png" border="0" alt="divide" width="38" height="27"></a></td>
carlos@0
    51
		<td><a href="#"><img src="../images/calculator/4_1.png" border="0" alt="clear" width="38" height="27"></a></td>
carlos@0
    52
	</tr>
carlos@0
    53
	<tr align="center">
carlos@0
    54
		<td><a href="#"><img src="../images/calculator/5_1.png" border="0" alt="4" width="38" height="27"></a></td>
carlos@0
    55
		<td><a href="#"><img src="../images/calculator/6_1.png" border="0" alt="5" width="38" height="27"></a></td>
carlos@0
    56
		<td><a href="#"><img src="../images/calculator/7_1.png" border="0" alt="6" width="38" height="27"></a></td>
carlos@0
    57
		<td width="3"></td>
carlos@0
    58
		<td><a href="#"><img src="../images/calculator/8_1.png" border="0" alt="multiply" width="38" height="27"></a></td>
carlos@0
    59
		<td><a href="#"><img src="../images/calculator/9_1.png" border="0" alt="extract square root" width="38" height="27"></a></td>
carlos@0
    60
	</tr>
carlos@0
    61
	<tr align="center">
carlos@0
    62
		<td><a href="#"><img src="../images/calculator/10_1.png" border="0" alt="1" width="38" height="27"></a></td>
carlos@0
    63
		<td><a href="#"><img src="../images/calculator/11_1.png" border="0" alt="2" width="38" height="27"></a></td>
carlos@0
    64
		<td><a href="#"><img src="../images/calculator/12_1.png" border="0" alt="3" width="38" height="27"></a></td>
carlos@0
    65
		<td width="3"></td>
carlos@0
    66
		<td><a href="#"><img src="../images/calculator/13_1.png" border="0" alt="substruct" width="38" height="27"></a></td>
carlos@0
    67
		<td><a href="#"><img src="../images/calculator/14_1.png" border="0" alt="show result" width="38" height="27"></a></td>
carlos@0
    68
	</tr>
carlos@0
    69
	<tr align="center">
carlos@0
    70
		<td><a href="#"><img src="../images/calculator/15_1.png" border="0" alt="0" width="38" height="27"></a></td>
carlos@0
    71
		<td><a href="#"><img src="../images/calculator/16_1.png" border="0" alt="change sign" width="38" height="27"></a></td>
carlos@0
    72
		<td><a href="#"><img src="../images/calculator/17_1.png" border="0" alt="decimal point" width="38" height="27"></a></td>
carlos@0
    73
		<td width="3"></td>
david@2684
    74
		<td colspan="2"><a href="#"><img src="../images/calculator/18_1.png" border="0" alt="add" width="77" height="27" onclick="try { top.opener.changeToEditingMode('force'); } catch (e) {}"></a></td>	
carlos@0
    75
	</tr>
carlos@0
    76
	</table> 		
carlos@0
    77
	</td>
carlos@0
    78
</tr>
carlos@0
    79
</table>
carlos@0
    80
</form>
carlos@0
    81
<script language="JavaScript">
carlos@0
    82
var arr_zn = ["7","8","9","sqr","C","4","5","6","*","/","1","2","3","+","-","0","z",".","="],
carlos@0
    83
carlos@0
    84
T = self.opener.TCR, a_img = [], i, j, l;
carlos@0
    85
function ch_img(v1, v2) {
carlos@0
    86
	document.images[v1].src = '../images/calculator/'+v1+'_'+v2+'.png'; 
carlos@0
    87
}
carlos@0
    88
function on_load() {
carlos@0
    89
	T.TCRmntr('C');
carlos@0
    90
	T.t_load = true;
carlos@0
    91
	if (T.control_obj.value == '') from_p = '0';
stefan@4495
    92
	else from_p = T.control_obj_value_calc_format;
carlos@0
    93
	document.forms[0].elements[0].value = from_p;
carlos@0
    94
}
carlos@0
    95
for (i = 0; i < document.links.length; i++) {
carlos@0
    96
	l = document.links[i];
carlos@0
    97
	l.onmousedown = Function("ch_img(" + i + ",0)")
carlos@0
    98
	l.onmouseout = Function("ch_img(" + i + ",1)")
carlos@0
    99
	l.onmouseup = l.onmouseover = Function("ch_img(" + i + ",2)")
carlos@0
   100
	l.onclick = l.ondblclick = Function("T.TCRmntr('" + arr_zn[i] + "')");
carlos@0
   101
}
carlos@0
   102
</script>
carlos@0
   103
</body></html>