rbrindley: branch rbrindley/vmenus_revamp r4442 - in /team/rbrindley/vmenus_r...

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Fri Jan 16 14:20:15 CST 2009


Author: rbrindley
Date: Fri Jan 16 14:20:14 2009
New Revision: 4442

URL: http://svn.digium.com/svn-view/asterisk-gui?view=rev&rev=4442
Log:

- added input fields for .command spans in vmenus
- added input fields for .name and .command spans in the vmenu .new
- reverted children() to find() for '.command > span' in addAction
- implemented click delegators for all 3 new input fields


Modified:
    team/rbrindley/vmenus_revamp/config/js/menus2.js
    team/rbrindley/vmenus_revamp/config/menus2.html

Modified: team/rbrindley/vmenus_revamp/config/js/menus2.js
URL: http://svn.digium.com/svn-view/asterisk-gui/team/rbrindley/vmenus_revamp/config/js/menus2.js?view=diff&rev=4442&r1=4441&r2=4442
==============================================================================
--- team/rbrindley/vmenus_revamp/config/js/menus2.js (original)
+++ team/rbrindley/vmenus_revamp/config/js/menus2.js Fri Jan 16 14:20:14 2009
@@ -34,7 +34,7 @@
 	var new_vmenu = vmenu_template.clone();
 	var action = actions[action_id];
 
-	new_vmenu.children('.command').html(action.command);
+	new_vmenu.find('.command > span').html(action.command);
 	new_vmenu.find('.name > span').html(action.name);
 	new_vmenu.find('.name > input')
 		.attr('value', action.name)

Modified: team/rbrindley/vmenus_revamp/config/menus2.html
URL: http://svn.digium.com/svn-view/asterisk-gui/team/rbrindley/vmenus_revamp/config/menus2.html?view=diff&rev=4442&r1=4441&r2=4442
==============================================================================
--- team/rbrindley/vmenus_revamp/config/menus2.html (original)
+++ team/rbrindley/vmenus_revamp/config/menus2.html Fri Jan 16 14:20:14 2009
@@ -243,7 +243,10 @@
 			<span class="extension">Extension: <input type="text" value="6000" /></span>
 			<div class="vmenu">
 				<div class="vmenu_item template">
-					<span class="command"></span>
+					<span class="command">
+						<span></span>
+						<input class="autocomplete" type="text" />
+					</span>
 					<span class="number"></span>
 					<span class="name">
 						<span></span>
@@ -251,9 +254,15 @@
 					</span>
 				</div>
 				<div class="vmenu_item new">
-					<span class="command" title="Click here to utilize the Custom action and write your own command.">&lt;click to edit&gt;</span>
+					<span class="command" title="Click here to utilize the Custom action and write your own command.">
+						<span>&lt;click to edit&gt;</span>
+						<input class="autocomplete" type="text" />
+					</span>
 					<span class="number">&nbsp;</span>
-					<span class="name" title="Click here to insert an action.">&lt;new&gt;</span>
+					<span class="name" title="Click here to insert an action.">
+						<span>&lt;new&gt;</span>
+						<input class="autocomplete" type="text" />
+					</span>
 				</div>
 			</div>
 		</div>
@@ -402,11 +411,26 @@
 						.focus()
 						.select();
 			})
-			.delegate('dblclick','.vmenu_item:not(.new) .command', function (e) {
+			.delegate('dblclick','.vmenu_item:not(.new) .command span', function (e) {
+				$(e.target).parent()
+					.children().toggle().end()
+					.children('input')
+						.focus()
+						.select();
 			})
-			.delegate('click','.vmenu .new .name', function (e) {
+			.delegate('click','.vmenu .new .name span', function (e) {
+				$(e.target).parent()
+					.children().toggle().end()
+					.children('input')
+						.focus()
+						.select();
 			})
-			.delegate('click','.vmenu .new .command', function (e) {
+			.delegate('click','.vmenu .new .command span', function (e) {
+				$(e.target).parent()
+					.children().toggle().end()
+					.children('input')
+						.focus()
+						.select();
 		});
 
 		//generate the actions list
@@ -430,7 +454,7 @@
 				var action = actions[id];
 
 				var vmenu = vmenu_template.clone();
-				vmenu.children('.command').html(action.command);
+				vmenu.find('.command > span').html(action.command);
 				vmenu.find('.name > span').html(action.name);
 
 				$(ui.item).html(vmenu.html())




More information about the asterisk-gui-commits mailing list