SOURCE CODE: Uize.Templates.Calculator (view docs)

<%@ input ({idPrefix:'string'}) %><%/* Module Meta Data
  type: Template
  importance: 2
  codeCompleteness: 100
  docCompleteness: 100
*/%><%/*?
  Introduction
    The =Uize.Templates.Calculator= module generates HTML that can be used for instances of the =Uize.Widget.Calculator= class.

    *DEVELOPERS:* `Chris van Rensburg`

    The =Uize.Templates.Calculator= module is a JavaScript Template Module that is automatically generated by a build script from a companion =Uize.Templates.Calculator.js.jst= JavaScript Template (.jst) file.

  Static Methods
    Uize.Templates.Calculator.process
      Returns a string, being the generated HTML that is to be used by an instance of the =Uize.Widget.Calculator= class (or subclass).

      SYNTAX
      ..............................................................
      widgetHtmlSTR = Uize.Templates.Calculator.process (inputOBJ);
      ..............................................................

      The value of the =inputOBJ= parameter should be an object of the form...

      ........................
      {
        idPrefix: idPrefixSTR
      }
      ........................

      idPrefix
        A string, specifying the value of the =idPrefix= state property of the widget instance that uses this module to generate its HTML.

  Static Properties
    Uize.Templates.Calculator.input
      An object, describing the allowed properties of the =inputOBJ= parameter of the =Uize.Templates.Calculator.process= static method.
*/%><div id="<% .idPrefix %>" class="calculator">
  <input id="<% .idPrefix %>_entry-input" type="text" class="entry"/><br/>

  <div class="buttonShell operatorButton operatorButtonNegate">
    <a id="<% .idPrefix %>_negate" href="javascript://" class="button" title="negate / invert sign">+/-</a>
  </div>
  <div class="buttonShell memoryButton memoryButtonPlus">
    <a id="<% .idPrefix %>_memoryPlus" href="javascript://" class="button" title="memory plus">M+</a>
  </div>
  <div class="buttonShell memoryButton memoryButtonMinus">
    <a id="<% .idPrefix %>_memoryMinus" href="javascript://" class="button" title="memory minus">M-</a>
  </div>
  <div class="buttonShell memoryButton memoryButtonRecall">
    <a id="<% .idPrefix %>_memoryRecall" href="javascript://" class="button" title="mempry recall">MR</a>
  </div>
  <div class="buttonShell memoryButton memoryButtonClear">
    <a id="<% .idPrefix %>_memoryClear" href="javascript://" class="button" title="memory clear">MC</a>
  </div>
  <br style="clear:left;"/>

  <div class="buttonShell operatorButton operatorButtonPercent">
    <a id="<% .idPrefix %>_percent" href="javascript://" class="button" title="percent">%</a>
  </div>
  <div class="buttonShell digitButton digitButton7">
    <a id="<% .idPrefix %>_digit7" href="javascript://" class="button">7</a>
  </div>
  <div class="buttonShell digitButton digitButton8">
    <a id="<% .idPrefix %>_digit8" href="javascript://" class="button">8</a>
  </div>
  <div class="buttonShell digitButton digitButton9">
    <a id="<% .idPrefix %>_digit9" href="javascript://" class="button">9</a>
  </div>
  <div class="buttonShell operatorButton operatorButtonBasic operatorButtonDivide">
    <a id="<% .idPrefix %>_divide" href="javascript://" class="button" title="divide">&divide;</a>
  </div>
  <br style="clear:left;"/>

  <div class="buttonShell operatorButton operatorButtonSquareRoot">
    <a id="<% .idPrefix %>_squareRoot" href="javascript://" class="button" title="square root">&radic;</a>
  </div>
  <div class="buttonShell digitButton digitButton4">
    <a id="<% .idPrefix %>_digit4" href="javascript://" class="button">4</a>
  </div>
  <div class="buttonShell digitButton digitButton5">
    <a id="<% .idPrefix %>_digit5" href="javascript://" class="button">5</a>
  </div>
  <div class="buttonShell digitButton digitButton6">
    <a id="<% .idPrefix %>_digit6" href="javascript://" class="button">6</a>
  </div>
  <div class="buttonShell operatorButton operatorButtonBasic operatorButtonMultiply">
    <a id="<% .idPrefix %>_multiply" href="javascript://" class="button" title="multiply / times">&times;</a>
  </div>
  <br style="clear:left;"/>

  <div class="buttonShell operatorButton operatorButtonClearEntry">
    <a id="<% .idPrefix %>_clearEntry" href="javascript://" class="button" title="clear entry">CE</a>
  </div>
  <div class="buttonShell digitButton digitButton1">
    <a id="<% .idPrefix %>_digit1" href="javascript://" class="button">1</a>
  </div>
  <div class="buttonShell digitButton digitButton2">
    <a id="<% .idPrefix %>_digit2" href="javascript://" class="button">2</a>
  </div>
  <div class="buttonShell digitButton digitButton3">
    <a id="<% .idPrefix %>_digit3" href="javascript://" class="button">3</a>
  </div>
  <div class="buttonShell operatorButton operatorButtonBasic operatorButtonSubtract">
    <a id="<% .idPrefix %>_subtract" href="javascript://" class="button" title="minus / subtract">-</a>
  </div>
  <br style="clear:left;"/>

  <div class="buttonShell operatorButton operatorButtonClear">
    <a id="<% .idPrefix %>_clear" href="javascript://" class="button" title="clear all">C</a>
  </div>
  <div class="buttonShell digitButton digitButton0">
    <a id="<% .idPrefix %>_digit0" href="javascript://" class="button">0</a>
  </div>
  <div class="buttonShell digitButton digitButtonPoint">
    <a id="<% .idPrefix %>_point" href="javascript://" class="button" title="decimal point">.</a>
  </div>
  <div class="buttonShell operatorButtonBasic operatorButtonEquals">
    <a id="<% .idPrefix %>_equals" href="javascript://" class="button" title="equals / calculate result">=</a>
  </div>
  <div class="buttonShell operatorButton operatorButtonBasic operatorButtonAdd">
    <a id="<% .idPrefix %>_add" href="javascript://" class="button" title="plus / add">+</a>
  </div>
  <br style="clear:left;"/>
</div>