Shout: Begin new dialplan edit UI
authorBen Klang <ben@alkaloid.net>
Sun, 28 Feb 2010 17:01:22 +0000 (12:01 -0500)
committerBen Klang <ben@alkaloid.net>
Sun, 28 Feb 2010 17:01:52 +0000 (12:01 -0500)
shout/dialplan.php [new file with mode: 0644]
shout/templates/dialplan/show.inc [new file with mode: 0644]
shout/themes/graphics/digit-bg.png [new file with mode: 0644]
shout/themes/screen.css

diff --git a/shout/dialplan.php b/shout/dialplan.php
new file mode 100644 (file)
index 0000000..a801ed2
--- /dev/null
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Copyright 2010 Alkaloid Networks LLC (http://projects.alkaloid.net)
+ *
+ * See the enclosed file COPYING for license information (BSD). If you
+ * did not receive this file, see
+ * http://www.opensource.org/licenses/bsd-license.php.
+ *
+ * @author  Ben Klang <ben@alkaloid.net>
+ */
+
+require_once dirname(__FILE__) . '/lib/Application.php';
+$shout = Horde_Registry::appInit('shout');
+
+require_once SHOUT_BASE . '/lib/Forms/ExtensionForm.php';
+
+//$action = Horde_Util::getFormData('action');
+$action = 'show';
+$context = $_SESSION['shout']['context'];
+
+Horde::addScriptFile('prototype.js', 'horde');
+
+require SHOUT_TEMPLATES . '/common-header.inc';
+require SHOUT_TEMPLATES . '/menu.inc';
+
+$notification->notify();
+
+require SHOUT_TEMPLATES . '/dialplan/' . $action . '.inc';
+
+require $registry->get('templates', 'horde') . '/common-footer.inc';
diff --git a/shout/templates/dialplan/show.inc b/shout/templates/dialplan/show.inc
new file mode 100644 (file)
index 0000000..9123402
--- /dev/null
@@ -0,0 +1,40 @@
+<script type="text/javascript">
+<!--
+function editAction(digit)
+{
+    $('digitAction').show();
+}
+
+function saveAction(digit)
+{
+    $('digitAction').hide();
+}
+// -->
+</script>
+
+<div id="digitpad">
+  <div id="digitAction">
+      <div onClick="saveAction('x');">SAVE</div>
+  </div>
+  <div class="digit" onClick="editAction('1');"><span class="digitLabel">1</span></div>
+  <div class="digit" onClick="editAction('2');"><span class="digitLabel">2</span></div>
+  <div class="digit" onClick="editAction('3');"><span class="digitLabel">3</span></div>
+  <br style="clear:both;">
+  <div class="digit" onClick="editAction('4');"><span class="digitLabel">4</span></div>
+  <div class="digit" onClick="editAction('5');"><span class="digitLabel">5</span></div>
+  <div class="digit" onClick="editAction('6');"><span class="digitLabel">6</span></div>
+  <br style="clear:both;">
+  <div class="digit" onClick="editAction('7');"><span class="digitLabel">7</span></div>
+  <div class="digit" onClick="editAction('8');"><span class="digitLabel">8</span></div>
+  <div class="digit" onClick="editAction('9');"><span class="digitLabel">9</span></div>
+  <br style="clear:both;">
+  <div class="digit" onClick="editAction('*');"><span class="digitLabel">*</span></div>
+  <div class="digit" onClick="editAction('0');"><span class="digitLabel">0</span></div>
+  <div class="digit" onClick="editAction('#');"><span class="digitLabel">#</span></div>
+</div>
+
+<script type="text/javascript">
+<!--
+$('digitAction').hide();
+// -->
+</script>
\ No newline at end of file
diff --git a/shout/themes/graphics/digit-bg.png b/shout/themes/graphics/digit-bg.png
new file mode 100644 (file)
index 0000000..bb819d8
Binary files /dev/null and b/shout/themes/graphics/digit-bg.png differ
index c936348..ed9f31a 100644 (file)
@@ -68,4 +68,42 @@ ul {
     font-style: italic;
 }
 
+#digitpad {
+    width: 300px;
+    height: 400px;
+    margin-left: auto;
+    margin-right: auto;
+    position: relative;
+}
+
+.digit {
+    width: 84px;
+    height: 84px;
+    float: left;
+    border-top: 4px solid #aaa;
+    border-left: 4px solid #aaa;
+    border-right: 4px solid #444;
+    border-bottom: 4px solid #444;
+    padding: 3px;
+    margin: 1px;
+    background-image: url('graphics/digit-bg.png');
+}
 
+.digitLabel {
+    font-style: italic;
+    font-family: Sans-serif;
+    font-weight: bold;
+    font-size: 1.5em;
+    color: #666;
+}
+
+#digitAction {
+    width: 290px;
+    height: 390px;
+    margin: 5px;
+    position: absolute;
+    top: 0px;
+    left: 0px;
+    background: #0f0;
+    /*display: none;*/
+}
\ No newline at end of file