You are here: TWiki> Plugins Web>PopUpCalculatorAddOn (2006-11-04, PeterThoeny)
Tags:
create new tag
, view all tags

Pop Up Calculator Add-On

Addressing a community of Engineers on an intranet, I find it valuable to offer a popup calculator. This particular one is nice-looking and works no matter your browser (ie / firefox) / operating system (MS-windows / linux).

I got permission from the author to redistribute it:

Subject:    Re: permission to reproduce ScientificCalculator ?
Date:    Tue, 16 Nov 2004 16:12:40 -0500
From:    Kriostech <info@kriostech.com>
To:    Gilles-Eric Descamps

Hi Eric,

Thank you for your interest in the Scientific Calculator.
Yes, you can upload the zip file for non-commercial use.

[...]

Thanks,
Inchul
---------------------------------
KriosTech
http://www.kriostech.com
53 Woodstream Blvd. Unit 9
Woodbridge, ON, Canada
L4L 7Y8
Phone: (905) 265-7369
Fax: (905) 265-0340
Email: info@kriostech.com
Calculator

Usage

Put a calc link in your WebTopBar as described in ReplaceJumpWithSearch

Here's a working one (Thanks to MartinCleaver)

calc

Add-On Installation Instructions

Note: You do not need to install anything on the browser to use this add-on. The following instructions are for the administrator who installs the add-on on the server where TWiki is running.

  • Download the ZIP file from the Add-on Home (see below)
  • Unzip PopUpCalculatorAddOn.zip in your twiki pub directory as pub/ScientificCalculator2.1
  • unpack it as pub/ScientificCalculator2.1
  • edit your templates/twiki.pattern.tmpl, look where it defines SCRIPT, and add:
%TMPL:DEF{"script"}%
<script type="text/javascript">
<!-- HIDE
/*****************************/
/*      openPopupWin         */
/*****************************/
var popupWin;
function openPopupWin(addr)
{ if(popupWin)
    popupWin.close();
  var chasm = screen.availWidth;
  var mount = screen.availHeight;
  var w = 240;
  var h = 410;
                                                                                                                                   
  popupWin=window.open(addr,'popupWin','status=no, width=' + w + ',height=' + h + ',left='
                           + ((chasm - w - 10) * .5) + ',top=' + ((mount - h - 30) * .5));
}
// -->
</script>
  • edit your TWiki/WebTopBar and somewhere add the following code:
<A href="javascript:openPopupWin('/twiki/pub/ScientificCalculator2.1/popup.html')">calc</a>
  • Et voila, you now have a popup calculator on all your pages. Enjoy.

Add-On Info

  • Set SHORTDESCRIPTION = Add a popup calculator to a TWiki skin

Add-on Author: TWiki:Main/GillesEricDescamps
Add-on Version: 17 Nov 2004 (v1.000)
Change History:  
17 Nov 2004: Initial version
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
License: GPL (for the single line of html code wink )
Add-on Home: http://TWiki.org/cgi-bin/view/Plugins/PopUpCalculatorAddOn
Feedback: http://TWiki.org/cgi-bin/view/Plugins/PopUpCalculatorAddOnDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/PopUpCalculatorAddOnAppraisal

Related Topic: TWikiAddOns

-- TWiki:Main/GillesEricDescamps - 17 Nov 2004

Topic attachments
I Attachment Action Size Date Who Comment
gifgif Calculator.gif manage 15.3 K 2004-11-17 - 07:24 GillesEricDescamps ScreenShot
zipzip ScientificCalculator.zip manage 24.6 K 2004-11-17 - 07:25 GillesEricDescamps The package
Topic revision: r3 - 2006-11-04 - 05:22:01 - PeterThoeny
 
TWIKI.NET
This site is powered by the TWiki collaboration platform
Ideas, requests, problems regarding TWiki? Send feedback
Copyright © 1999-2009 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.