part way through adding tooltip functionality
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 8 Mar 2011 21:19:43 +0000 (21:19 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 8 Mar 2011 21:19:43 +0000 (21:19 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@280 01035d8c-6547-0410-b346-abe4f91aad63

mini-asterisk-gui2/network.html
mini-asterisk-gui2/network.js
mini-asterisk-gui2/tooltips.js [new file with mode: 0644]

index d5a8bf2701e5f3ed872991ad06d2a38fa8248d59..bdb347be8177c27ee520130ccd0691c103003e3e 100644 (file)
@@ -8,6 +8,7 @@
 <link rel="stylesheet" href="tooltip.css" type="text/css" />
 <script type="text/javascript" src="minicommon.js"></script>
 <script type="text/javascript" src="tooltip.js"></script>
+<script type="text/javascript" src="tooltips.js"></script>
 <script type="text/javascript" src="menu.js"></script>
 <script type="text/javascript" src="network.js"></script>
 <script type="text/javascript">
@@ -18,6 +19,8 @@
 
 <body onload="initialise()">
 
+  <div id="tooltips"></div></td>
+
   <table align="center" width=800>
   <tr>
     <td><div id="menu"></div></td>
         <tr><td>Netmask:</td><td><input type="text" name="netmask" onBlur="isIP(this)"></td></tr>
         <tr><td>Gateway:</td><td><input type="text" name="gateway" onBlur="isIP(this)"></td></tr>
         <tr><td>DNS:</td><td><input type="text" name="dns" onBlur="isIP(this)"></td></tr>
-        <tr onMouseOver="popUp(event,'network_backdoor')" onmouseout="popUp(event,'network_backdoor')">
+        <tr onMouseOver="popUp(event,'network_backdoor')" onMouseOut="popUp(event,'network_backdoor')">
           <td>Emergency IP:</td><td><input type="text" name="backdoor" onBlur="isIP(this)"></td>
         </tr>
-        <tr onMouseOver="popUp(event,'network_internet')" onmouseout="popUp(event,'network_internet')">
+        <tr onMouseOver="popUp(event,'network_internet')" onMouseOut="popUp(event,'network_internet')">
          <td>Internet Connection:</td>
-         <td><div id="internet" >
-         <span style="margin-left: 4px;font-weight:bold">&nbsp;</span></div></td>
+         <td><div id="internet"></div></td>
         </tr>
-        <tr><td><input id="networkapply" type="submit" value="Apply"></td></tr>
+        <tr><td><input type="submit" value="Apply"></td></tr>
       </table>
     </form>
 
index 653a47ab07a7f2068d50889a1f7be1896a8a5558..f1a2ed9ae378ee584bc7b2f903e94db7779fd8a1 100644 (file)
@@ -12,6 +12,8 @@ var dhcp;
 
 function initialise() {
     mainMenu();
+    var html = toolTips[0] + toolTips[1];
+    document.getElementById('tooltips').innerHTML = html;
 
     // kick off cascading CGIs, initialisePage() will be called when complete
 
diff --git a/mini-asterisk-gui2/tooltips.js b/mini-asterisk-gui2/tooltips.js
new file mode 100644 (file)
index 0000000..658c1f8
--- /dev/null
@@ -0,0 +1,68 @@
+var toolTips = [
+'<div id="network_internet" class="tip">A tick means your phone system can reach the Internet.  You need the Internet for VOIP calls and software upgrades.  If you have a problem reaching the Internet check your Network settings, in particular Gateway and DNS.</div>',
+
+'<div id="network_backdoor" class="tip">Emergency backdoor IP. Useful if you get locked out of the main network connection, for example due to DHCP problems on your network or a configuration mistake.  Write this number down somewhere!</div>',
+
+'<div id="phone_reception" class="tip">If ticked this phone will ring when some one calls the phone system from an outside Analog or VOIP Line.  More than one phone can be ticked.  You can answer a call on another ringing phone by dialling *8 on your phone - see FAQ for details.</div>',
+
+'<div id="phone_update_reception" class="tip">Press this button to lock in any changes you have made to the Reception check-boxes above.</div>',
+
+'<div id="phone_anphone" class="tip">Analog Phone: Normal telephone plugged into a port on your phone system.</div>', 
+
+'<div id="phone_ipphone" class="tip"> IP Phone plugged into your network.</div>',
+
+'<div id="phone_line" class="tip"> Analog Phone Line: Analog telephone line plugged into a port on your phone system.</div>',
+
+'<div id="phone_voipline" class="tip"> VOIP Phone Line: Make and receive phone calls over the Internet.</div>',
+
+'<div id="phone_system" class="tip">Important information about your Phone System.</div>',
+
+'<div id="phone_ipaddress" class="tip">The address of your Phone System on your network.  Use this address to connect IP Phones to your Phone System.</div>',
+
+'<div id="phone_phones" class="tip">List of phones connected to your Phone System.  You can connect Analog or IP Phones to your system. When IP Phones are configured correctly, they appear on this list.  If an IP phone is not configured correctly, it will not appear on this list.  Analog phones require hardware to be installed in your Phone system.</div>',
+
+'<div id="phone_lines" class="tip">List of phone lines available. Phone lines are used to make and receive outside calls. You can use regular Analog phone lines or VOIP.  VOIP phone lines require an account with an Internet Telephone Service Provider.  Analog phone lines require hardware to be installed in your Phone System.</div>',
+
+'<div id="phone_ext" class="tip">Dial this number to call this phone</div>',
+
+'<div id="phone_line_prefix" class="tip">Dial 0 for an Analog outside line.  For example to call 5551234 dial 05551234.  Don\'t pause after the 0, just dial 0 and the outside number together.</div>',
+
+'<div id="phone_port_phone" class="tip">Port (socket) on the rear of your Phone System.  Plug the phone into this Port.</div>',
+
+'<div id="phone_port_line" class="tip">Port (socket) on the rear of your Phone System.  Plug the phone line into this Port.</div>',
+
+'<div id="phone_ipphone_ip" class="tip">IP Address of this phone on your network</div>',
+
+'<div id="phone_voipline_ip" class="tip">IP Address of the VOIP Internet Telephone Service Provider</div>',
+
+'<div id="phone_voipline_prefix" class="tip">Dial 1 for a VOIP outside line.  For example to call 5551234 dial 15551234. Don\'t pause after the 1, just dial 1 and the outside number together.</div>',
+
+'<div id="phone_addipphone" class="tip">Instructions and help on adding a new IP phone</div>',
+
+'<div id="phone_addvoipline" class="tip">Instructions and help on VOIP Line set up</div>',
+
+'<div id="ipphones_ipphones" class="tip">List of possible IP phones.  For a new phone choose any Available number.  Refresh this page to update</div>',
+
+'<div id="ipphones_connected" class="tip">The IP phone is connected to your phone system and ready to use</div>',
+
+'<div id="ipphones_notconnected" class="tip">No IP phone is connected.  Either no IP phone is present, or the IP phone has not been set up.</div>',
+
+'<div id="voiplines_voiplines" class="tip"> A VOIP line allows you to make and receive phones calls over the Internet.  Normally a VOIP line is provided by an Internet Telephony Service Provider (ITSP).  They will give you an account, which includes the user and password details that you can fill in below.  Refresh this page on your browser to see if your VOIP line is working.  </div>',
+
+'<div id="voiplines_provider" class="tip">Your Internet Telephony Service Provider. They will give you an account with a user name and password.</div>',
+
+'<div id="voiplines_user" class="tip">Your account name with your Internet Telephony Service Provider</div>',
+
+'<div id="voiplines_pass" class="tip">The password for your Internet Telephony Service Provider account</div>',
+
+'<div id="voiplines_host" class="tip">The Internet address of your Internet Telephony Service Provider.  This will usually be filled in automatically.</div>',
+
+'<div id="voiplines_status" class="tip">A tick means you are connected to your Internet Telephony Service Provider.  Refresh your browser to update.</div>',
+
+'<div id="admin_restart" class="tip">Press this button to restart your phone system.  This is the same as turning the power off and back on. </div>',
+
+'<div id="admin_upgrade" class="tip">Press this button to install the latest version of Mini Asterisk.  An Mini Asterisk upgrade requires an Internet connection.</div>',
+
+'<div id="admin_firmware" class="tip">Enter the URL of a firmware update script.  This option can be used to install new firmware on your Phone System.  Installing new firmware requires an Internet connection.  The full URL Must be entered, e.g. http://rowetel.com/ucasterisk/mini/test.sh</div>' 
+];
+