From 23e3c445d49b5e46e8d3c81c5350cb48e7ee64b9 Mon Sep 17 00:00:00 2001 From: Ben Klang Date: Thu, 10 Nov 2005 05:45:29 +0000 Subject: [PATCH] Broke out applications and args. Beginning work on +/- functionality git-svn-id: https://svn.alkaloid.net/gpl/shout/trunk@84 06cd67b6-e706-0410-b29e-9de616bca6e9 --- andrew.webprj | 94 +++++++++++++++++----------------- lib/Driver/ldap.php | 17 ++++-- lib/api.php | 2 +- templates/dialplan/contexttree.inc | 14 ++++- templates/dialplan/extensiondetail.inc | 7 +-- templates/users/userlist.inc | 6 +-- 6 files changed, 82 insertions(+), 58 deletions(-) diff --git a/andrew.webprj b/andrew.webprj index fdd45f686..c5128ec9a 100644 --- a/andrew.webprj +++ b/andrew.webprj @@ -1,53 +1,53 @@ - + -//w3c//dtd xhtml 1.0 strict//en - + - - + + - - + + - + - + - + - + - - + + - + - - + + - - - - + + + + @@ -55,60 +55,60 @@ - + - - + + - + - - + + - - - - + + + + - + - + + - - + - - - + + + - + - + - - + + - - + + templates/ toolbars/ - + Ben Klang ben@alkaloid.net No Debugger @@ -119,10 +119,10 @@ - - - - + + + + diff --git a/lib/Driver/ldap.php b/lib/Driver/ldap.php index b2c91681a..0b73804f3 100644 --- a/lib/Driver/ldap.php +++ b/lib/Driver/ldap.php @@ -373,13 +373,24 @@ for $context")); $token2++; # Get Application and args - $application = substr($line, $token2); + $application = substr($line, $token2, $token3 - $token2); - #$args = strpos($) + if ($token3) { + $application = substr($line, $token2, $token3 - $token2); + $args = substr($line, $token3); + $args = preg_replace('/^\(/', '', $args); + $args = preg_replace('/\)$/', '', $args); + } else { + # This application must not have any args + $application = substr($line, $token2); + $args = ''; + } # Merge all that data into the returning array - $dialplans[$context]['extensions'][$extension][$priority] = + $dialplans[$context]['extensions'][$extension][$priority]['application'] = $application; + $dialplans[$context]['extensions'][$extension][$priority]['args'] = + $args; $j++; } diff --git a/lib/api.php b/lib/api.php index 484ab7afd..2437a0831 100644 --- a/lib/api.php +++ b/lib/api.php @@ -30,7 +30,7 @@ function _shout_perms() $perms['tree']['shout']['superadmin'] = false; $perms['title']['shout:superadmin'] = _("Super Administrator"); - $contexts= $shout->getContexts(); +// $contexts = $shout->getContexts(); $perms['tree']['shout']['contexts'] = false; $perms['title']['shout:contexts'] = _("Contexts"); diff --git a/templates/dialplan/contexttree.inc b/templates/dialplan/contexttree.inc index 6b40cc4f4..b957c40fa 100644 --- a/templates/dialplan/contexttree.inc +++ b/templates/dialplan/contexttree.inc @@ -34,13 +34,25 @@ function activatePriority(exten, prio) function deactivatePriority() { - if (curPrio) { + if (curPrio && document.getElementById('pButtons-'+curExten+'-'+curPrio)) { document.getElementById('pButtons-'+curExten+'-'+curPrio).className = 'pButtons'; document.getElementById('pNumber-'+curExten+'-'+curPrio).className = 'pElement'; document.getElementById('pApp-'+curExten+'-'+curPrio).className = 'pElement'; document.getElementById('pArgs-'+curExten+'-'+curPrio).className = 'pElement'; } } + +function addRow() { + if (!curExten || !curPrio) { + alert('No extension or priority selected.'); + } + + tmpPrio = curPrio + 1; + while(o = document.getElementById('pNumber-'+tmpexten+'-'+tmpPrio)) { + + tmpPrio++; + } +} --> diff --git a/templates/dialplan/extensiondetail.inc b/templates/dialplan/extensiondetail.inc index 426273a0b..994c109ed 100644 --- a/templates/dialplan/extensiondetail.inc +++ b/templates/dialplan/extensiondetail.inc @@ -32,7 +32,7 @@ if(!isset($dialplan['extensions'])) { id=""> $application) { + foreach($priorities as $priority => $data) { ?> - + @@ -66,7 +67,7 @@ if(!isset($dialplan['extensions'])) { id="" name=""> - + diff --git a/templates/users/userlist.inc b/templates/users/userlist.inc index f5f6e7ec2..f81680cb1 100644 --- a/templates/users/userlist.inc +++ b/templates/users/userlist.inc @@ -1,9 +1,9 @@ -
- Context: +
+ Context:
- +
-- 2.11.0
Extension Name