Tags:
create new tag
, view all tags

Pop Up Calculator Add-On

Add a popup calculator to a TWiki skin

Introduction

Addressing a community of Engineers on an intranet, it is valuable to offer a popup calculator. This particular one is nice-looking and works in any modern browser (IE, Firefox) and operating system (Windows, Linux).

We got permission from the author to redistribute it: More... Close

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[at]kriostech.com

Usage

1. Add a calc link in any TWiki page using this code:

%INCLUDE{ "%SYSTEMWEB%.PopUpCalculatorAddOn" section="javascript" }%
%INCLUDE{ "%SYSTEMWEB%.PopUpCalculatorAddOn" section="link" }%

This will produce a link like this:

calc

Notes:

  • The "javascript" section should be included only once; omit this include in case the calendar has been added to the skin.
  • The "link" section can be included as many times as needed. In case of the "link" section include you can build your own link text or link button, make sure the link target (e.g. anchor href parameter) points to: javascript:openPopupWin('%PUBURL%/%SYSTEMWEB%/PopUpCalculatorAddOn/popup.html')

2. Add a calc link to the skin's header so that it is available on all TWiki pages:

Follow the add-on instructions below, or add a calc link in your WebTopBar as described in TWiki:Support.ReplaceJumpWithSearch.

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 directory
  • Edit your templates/twiki.pattern.tmpl, look where it defines SCRIPT, and add:
%TMPL:DEF{"script"}%
<script type="text/javascript">
<!-- <pre> HIDE
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));
}
// </pre> HIDE -->
</script>
  • Edit your TWiki.WebTopBar and somewhere add the following code:
<a href="javascript:openPopupWin('%PUBURL%/%SYSTEMWEB%/PopUpCalculatorAddOn/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
Copyright: © 2004 TWiki:Main.GillesEricDescamps
© 2005-2010 TWiki:TWiki.TWikiContributor
License: GPL (GNU General Public License)
Add-on Version: 2010-12-13 (v1.1)
Change History:  
2010-12-13: TWikibug:Item6530: Doc improvements, changing TWIKIWEB to SYSTEMWEB -- TWiki:Main.PeterThoeny
2004-11-17: Initial version
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
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

Topic attachments
I Attachment Action Size Date Who Comment
GIFgif Calculator.gif manage 15.3 K 14 Dec 2010 - 07:48 TWikiAdminUser Saved by install script
GIFgif bg_silver2.gif manage 0.8 K 14 Dec 2010 - 07:48 TWikiAdminUser Saved by install script
GIFgif bg_silver3d.gif manage 0.2 K 14 Dec 2010 - 07:48 TWikiAdminUser Saved by install script
GIFgif bg_silver3dd.gif manage 0.2 K 14 Dec 2010 - 07:48 TWikiAdminUser Saved by install script
Cascading Style Sheet filecss calculator.css manage 7.3 K 14 Dec 2010 - 07:48 TWikiAdminUser Saved by install script
GIFgif creative.gif manage 1.3 K 14 Dec 2010 - 07:48 TWikiAdminUser Saved by install script
HTMLhtml popup.html manage 46.8 K 14 Dec 2010 - 07:48 TWikiAdminUser Saved by install script
HTMLhtml scientific_calculator.html manage 56.1 K 14 Dec 2010 - 07:48 TWikiAdminUser Saved by install script
SWF (Shockwave Flash)swf sound.swf manage 0.8 K 14 Dec 2010 - 07:48 TWikiAdminUser Saved by install script
GIFgif sunflower.gif manage 1.5 K 14 Dec 2010 - 07:48 TWikiAdminUser Saved by install script

Physics WebpagesRHUL WebpagesCampus Connect • Royal Holloway, University of London, Egham, Surrey TW20 0EX; Tel/Fax +44 (0)1784 434455/437520

Topic revision: r2 - 01 Oct 2012 - TWikiAdminUser

 
This site is powered by the TWiki collaboration platformCopyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding RHUL Physics Department TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.PopUpCalculatorAddOn.