From: Ben Klang Date: Thu, 4 Mar 2010 20:17:33 +0000 (-0500) Subject: Shout: Make the editAction form a lot prettier X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=00914402570a271384df4797714cc4f06e5d0671;p=horde.git Shout: Make the editAction form a lot prettier --- diff --git a/shout/templates/dialplan/edit.inc b/shout/templates/dialplan/edit.inc index 58c6d9082..e38c0451d 100644 --- a/shout/templates/dialplan/edit.inc +++ b/shout/templates/dialplan/edit.inc @@ -2,8 +2,10 @@
-
-
SAVE
+
+ Current Digit +
+
1
2
@@ -17,9 +19,9 @@
8
9

-
*
+
*
0
-
#
+
#

Default Action
@@ -36,11 +38,18 @@ function editAction(digit) { if ($('selectActionForm') == null) { curDigit = digit; + $('digitGraphic').src = 'getImageDir('shout'); ?>/digit-'+digit+'.png'; + // Draw the selectActionForm - $('editAction').show(); - while ((e = $('editAction').childNodes[0]) != null) { - $('editAction').removeChild(e); + $('editActionOverlay').show(); + while ((e = $('selectAction').childNodes[0]) != null) { + $('selectAction').removeChild(e); } + var p = document.createElement('p'); + p.id = 'actionPrompt'; + var text = document.createTextNode(''); + p.appendChild(text); + $('selectAction').appendChild(p); var form = document.createElement('form'); form.id = 'selectActionForm'; form.setAttribute('onChange', 'editAction('+digit+')'); @@ -54,10 +63,7 @@ function editAction(digit) select.appendChild(option); }); form.appendChild(select); - $('editAction').appendChild(form); - var div = document.createElement('div'); - div.id = 'editActionFormContainer'; - $('editAction').appendChild(div); + $('selectAction').appendChild(form); } else { var action = null; // Draw the options for this action @@ -68,7 +74,7 @@ function editAction(digit) }); var params = $H({'action': action}); var actionForm; - new Ajax.Updater('editActionFormContainer', ajax_url + 'getActionForm', + new Ajax.Updater('editAction', ajax_url + 'getActionForm', { method: 'post', parameters: params @@ -90,7 +96,7 @@ function saveAction(digit) while ((e = $('editAction').childNodes[0]) != null) { $('editAction').removeChild(e); } - $('editAction').hide(); + $('editActionOverlay').hide(); } }); } @@ -171,7 +177,7 @@ function getMetaRow(name, value) return row; } -$('editAction').hide(); +$('editActionOverlay').hide(); new Ajax.Request(ajax_url + 'getMenuInfo', { method: 'post', diff --git a/shout/themes/graphics/digit-1.png b/shout/themes/graphics/digit-1.png new file mode 100644 index 000000000..db3995660 Binary files /dev/null and b/shout/themes/graphics/digit-1.png differ diff --git a/shout/themes/graphics/digit-2.png b/shout/themes/graphics/digit-2.png new file mode 100644 index 000000000..530ff3dfc Binary files /dev/null and b/shout/themes/graphics/digit-2.png differ diff --git a/shout/themes/graphics/digit-3.png b/shout/themes/graphics/digit-3.png new file mode 100644 index 000000000..3b0eded6c Binary files /dev/null and b/shout/themes/graphics/digit-3.png differ diff --git a/shout/themes/graphics/digit-4.png b/shout/themes/graphics/digit-4.png new file mode 100644 index 000000000..4dbbc2aa5 Binary files /dev/null and b/shout/themes/graphics/digit-4.png differ diff --git a/shout/themes/graphics/digit-5.png b/shout/themes/graphics/digit-5.png new file mode 100644 index 000000000..c038293b7 Binary files /dev/null and b/shout/themes/graphics/digit-5.png differ diff --git a/shout/themes/graphics/digit-6.png b/shout/themes/graphics/digit-6.png new file mode 100644 index 000000000..576b25a0b Binary files /dev/null and b/shout/themes/graphics/digit-6.png differ diff --git a/shout/themes/graphics/digit-7.png b/shout/themes/graphics/digit-7.png new file mode 100644 index 000000000..71a1492c3 Binary files /dev/null and b/shout/themes/graphics/digit-7.png differ diff --git a/shout/themes/graphics/digit-8.png b/shout/themes/graphics/digit-8.png new file mode 100644 index 000000000..82c8e23a8 Binary files /dev/null and b/shout/themes/graphics/digit-8.png differ diff --git a/shout/themes/graphics/digit-9.png b/shout/themes/graphics/digit-9.png new file mode 100644 index 000000000..cbbfd3d56 Binary files /dev/null and b/shout/themes/graphics/digit-9.png differ diff --git a/shout/themes/graphics/digit-octothorpe.png b/shout/themes/graphics/digit-octothorpe.png new file mode 100644 index 000000000..2dceffae9 Binary files /dev/null and b/shout/themes/graphics/digit-octothorpe.png differ diff --git a/shout/themes/graphics/digit-star.png b/shout/themes/graphics/digit-star.png new file mode 100644 index 000000000..582d4399a Binary files /dev/null and b/shout/themes/graphics/digit-star.png differ diff --git a/shout/themes/graphics/transparency.png b/shout/themes/graphics/transparency.png new file mode 100644 index 000000000..a7a693fe7 Binary files /dev/null and b/shout/themes/graphics/transparency.png differ diff --git a/shout/themes/screen.css b/shout/themes/screen.css index 9ceef3479..9355d7459 100644 --- a/shout/themes/screen.css +++ b/shout/themes/screen.css @@ -83,7 +83,7 @@ ul { #digitpad { width: 300px; - height: 400px; + height: 456px; margin-left: auto; margin-right: auto; position: relative; @@ -105,7 +105,7 @@ ul { } #defaultAction { - width: 288px; + width: 284px; height: 38px; border-top: 4px solid #aaa; border-left: 4px solid #aaa; @@ -128,13 +128,26 @@ ul { color: #666; } -#editAction { +#editActionOverlay { width: 290px; - height: 440px; - margin: 5px; + height: 444px; + padding: 5px; position: absolute; top: 0px; left: 0px; - background: #0f0; - /*display: none;*/ + background-image: url('graphics/transparency.png'); +} + +#digitGraphic { + float: left; + margin: 0px 5px 5px 5px; +} + +#actionPrompt { + font-weight: bold; + margin-bottom: 5px; +} + +#editAction { + margin: 5px; } \ No newline at end of file