[Jaws-commits] r9729 - in branches/0.8/jaws/html/gadgets/UrlMapper: . languages resources schema templates

afz at jaws-project.com afz at jaws-project.com
Thu Oct 30 12:49:38 UTC 2008


Author: afz
Date: 2008-10-30 12:49:37 +0000 (Thu, 30 Oct 2008)
New Revision: 9729

Modified:
   branches/0.8/jaws/html/gadgets/UrlMapper/AdminAjax.php
   branches/0.8/jaws/html/gadgets/UrlMapper/AdminHTML.php
   branches/0.8/jaws/html/gadgets/UrlMapper/AdminModel.php
   branches/0.8/jaws/html/gadgets/UrlMapper/Info.php
   branches/0.8/jaws/html/gadgets/UrlMapper/languages/de.php
   branches/0.8/jaws/html/gadgets/UrlMapper/languages/en.php
   branches/0.8/jaws/html/gadgets/UrlMapper/languages/es.php
   branches/0.8/jaws/html/gadgets/UrlMapper/languages/fa.php
   branches/0.8/jaws/html/gadgets/UrlMapper/languages/it.php
   branches/0.8/jaws/html/gadgets/UrlMapper/languages/ja.php
   branches/0.8/jaws/html/gadgets/UrlMapper/languages/nl.php
   branches/0.8/jaws/html/gadgets/UrlMapper/languages/pt-br.php
   branches/0.8/jaws/html/gadgets/UrlMapper/languages/ru.php
   branches/0.8/jaws/html/gadgets/UrlMapper/languages/tr.php
   branches/0.8/jaws/html/gadgets/UrlMapper/languages/zh.php
   branches/0.8/jaws/html/gadgets/UrlMapper/resources/script.js
   branches/0.8/jaws/html/gadgets/UrlMapper/schema/schema.xml
   branches/0.8/jaws/html/gadgets/UrlMapper/templates/Maps.html
Log:
Working on UrlMapper gadget in progress...

Modified: branches/0.8/jaws/html/gadgets/UrlMapper/AdminAjax.php
===================================================================
--- branches/0.8/jaws/html/gadgets/UrlMapper/AdminAjax.php	2008-10-30 03:37:34 UTC (rev 9728)
+++ branches/0.8/jaws/html/gadgets/UrlMapper/AdminAjax.php	2008-10-30 12:49:37 UTC (rev 9729)
@@ -1,10 +1,11 @@
 <?php
 /**
- * Registry AJAX API
+ * UrlMapper AJAX API
  *
  * @category   Ajax
- * @package    Registry
+ * @package    UrlMapper
  * @author     Pablo Fischer <pablo at pablo.com.mx>
+ * @author     Ali Fazelzadeh <afz at php.net>
  * @copyright  2006-2008 Jaws Development Group
  * @license    http://www.gnu.org/copyleft/lesser.html
  */
@@ -40,21 +41,16 @@
      * Returns the total maps of a certain action in a certain gadget
      *
      * @access  public
-     * @param   string  $action  Action name
      * @param   string  $gadget  Gadget name so we get sure we don't return the same action
      *                           maps of another gadget
+     * @param   string  $action  Action name
      * @return  array   Maps that an action has
      */
-    function GetMapsOfAction($action, $gadget)
+    function GetMapsOfAction($gadget, $action)
     {
         //Now get the custom maps
-        $model = $GLOBALS['app']->LoadGadget('UrlMapper', 'AdminModel');
-        $customMaps = $model->GetCustomMaps($gadget, $action);
-
-        if (count($customMaps) > 0) {
-            return $customMaps;
-        }
-        return false;
+        $gHTML = $GLOBALS['app']->LoadGadget('UrlMapper', 'AdminHTML');
+        return $gHTML->GetMaps($gadget, $action);
     }
 
     /**
@@ -100,17 +96,14 @@
      * Deletes a map
      *
      * @access  public
-     * @param   int      $id       Map's ID
-     * @return  boolean  Success/Failure
+     * @param   int     $id Map's ID
+     * @return  boolean Success/Failure
      */
     function DeleteMap($id)
     {
         $this->CheckSession('UrlMapper', 'ManageUrlMapper');
         $model = $GLOBALS['app']->LoadGadget('UrlMapper', 'AdminModel');
         $res = $model->DeleteMap($id);
-        if (!Jaws_Error::IsError($res)) {
-            $model->UpdateCustomMaps();
-        }
         return $GLOBALS['app']->Session->PopLastResponse();
     }
 
@@ -118,10 +111,10 @@
      * Returns the map route (no additional information) of a certain map
      *
      * @access  public
-     * @param   int      $id       Map ID
-     * @return  string   Map route
+     * @param   int     $id Map ID
+     * @return  string  Map route
      */
-    function GetCustomMap($id)
+    function GetMap($id)
     {
         $this->CheckSession('UrlMapper', 'ManageUrlMapper');
         $model = $GLOBALS['app']->LoadGadget('UrlMapper', 'AdminModel');

Modified: branches/0.8/jaws/html/gadgets/UrlMapper/AdminHTML.php
===================================================================
--- branches/0.8/jaws/html/gadgets/UrlMapper/AdminHTML.php	2008-10-30 03:37:34 UTC (rev 9728)
+++ branches/0.8/jaws/html/gadgets/UrlMapper/AdminHTML.php	2008-10-30 12:49:37 UTC (rev 9729)
@@ -5,6 +5,7 @@
  * @category   Gadget
  * @package    UrlMapper
  * @author     Pablo Fischer <pablo at pablo.com.mx>
+ * @author     Ali Fazelzadeh <afz at php.net>
  * @copyright  2006-2008 Jaws Development Group
  * @license    http://www.gnu.org/copyleft/lesser.html
  */
@@ -21,6 +22,18 @@
     }
 
     /**
+     * Calls default admin action
+     *
+     * @access  public
+     * @return  string  Template content
+     */
+    function Admin()
+    {
+        $this->CheckPermission('ManageUrlMapper');
+        return $this->Maps();
+    }
+
+    /**
      * Prepares the menubar
      *
      * @access  public
@@ -29,7 +42,6 @@
      */
     function MenuBar($action_selected)
     {
-        $this->CheckPermission('ManageUrlMapper');
         $actions = array('Admin', 'Properties', 'Aliases');
         if (!in_array($action_selected, $actions)) {
             $action_selected = 'Admin';
@@ -48,6 +60,150 @@
     }
 
     /**
+     * Prepares the data (an array) of maps for gadget action
+     *
+     * @access  public
+     * @param   string  $gadget  gadget name
+     * @param   string  $action  action name
+     * @return  array   Data
+     */
+    function GetMaps($gadget, $action)
+    {
+        $model = $GLOBALS['app']->LoadGadget('UrlMapper', 'AdminModel');
+        $maps  = $model->GetActionMaps($gadget, $action);
+        if (Jaws_Error::IsError($maps)) {
+            return array();
+        }
+
+        $newData = array();
+        foreach($maps as $map) {
+            $mapData = array();
+            $mapData['map'] = $map['map'];
+            $actions = '';
+            if ($this->GetPermission('EditMaps')) {
+                if ($map['custom']) {
+                    $link =& Piwi::CreateWidget('Link', _t('GLOBAL_EDIT'),
+                                                "javascript: editMap(this, '".$map['id']."');",
+                                                STOCK_EDIT);
+                    $actions.= $link->Get().'&nbsp;';
+                    $link =& Piwi::CreateWidget('Link', _t('GLOBAL_DELETE'),
+                                                "javascript: deleteMap(this, '".$map['id']."');",
+                                                STOCK_DELETE);
+                    $actions.= $link->Get().'&nbsp;';
+                } else {
+                    $link =& Piwi::CreateWidget('Link', _t('STOCK_NEW'),
+                                                "javascript: addMap(this, '".$map['id']."');",
+                                                STOCK_EDIT);
+                    $actions.= $link->Get().'&nbsp;';
+                }
+            }
+            $mapData['actions'] = $actions;
+            $newData[] = $mapData;
+        }
+        return $newData;
+    }
+
+    /**
+     * Prepares a clean template for showing the maps
+     *
+     * @access  public
+     * @return  string  XHTML of Datagrid
+     */
+    function MapsDatagrid()
+    {
+        $datagrid =& Piwi::CreateWidget('DataGrid', array());
+        $datagrid->setID('maps_datagrid');
+
+        $datagrid->addColumn(Piwi::CreateWidget('Column', _t('URLMAPPER_MAPS'), null, false));
+        $colActions = Piwi::CreateWidget('Column', _t('GLOBAL_ACTIONS'), null, false);
+        $colActions->SetStyle('width: 80px; white-space:nowrap;');
+        $datagrid->addColumn($colActions);
+
+        $datagrid->SetStyle('margin-top: 0px; width: 100%;');
+        return $datagrid->Get();
+    }
+
+    /**
+     * Returns the Maps UI
+     *
+     * @access  public
+     * @return  string  Template content
+     */
+    function Maps()
+    {
+        $this->AjaxMe('script.js');
+        $tpl = new Jaws_Template('gadgets/UrlMapper/templates/');
+        $tpl->Load('Maps.html');
+        $tpl->SetBlock('UrlMapper');
+
+        // Menubar
+        $tpl->SetVariable('menubar', $this->MenuBar('Admin'));
+
+        //Combo for gadgets
+        $model = $GLOBALS['app']->LoadGadget('Jms', 'AdminModel');
+        $gadgets = $model->GetGadgetsList(null, true, true, true);
+        $comboGadgets =& Piwi::CreateWidget('Combo', 'gadgets_combo');
+        $comboGadgets->SetStyle('width: 200px;');
+        foreach($gadgets as $gadget) {
+            $comboGadgets->AddOption($gadget['name'], $gadget['realname']);
+        }
+        $comboGadgets->AddEvent(ON_CHANGE, 'javascript: rebuildActionCombo();');
+        $tpl->SetVariable('lbl_gadgets', _t('GLOBAL_GADGETS'));
+        $tpl->SetVariable('combo_gadgets', $comboGadgets->Get());
+
+        //Combo for actions
+        $comboActions =& Piwi::CreateWidget('Combo', 'actions_combo');
+        $comboActions->SetSize(20);
+        $comboActions->SetStyle('width: 200px; height: 280px;');
+        $comboActions->AddEvent(ON_CHANGE, 'javascript: showActionMaps();');
+        $tpl->SetVariable('lbl_actions', _t('GLOBAL_ACTIONS'));
+        $tpl->SetVariable('combo_actions', $comboActions->Get());
+
+        $cancelMap =& Piwi::CreateWidget('Button',
+                                         'cancel_map',
+                                         _t('GLOBAL_CANCEL'),
+                                         STOCK_CANCEL);
+        $cancelMap->SetStyle('display: none;');
+        $tpl->SetVariable('cancel_map', $cancelMap->Get());
+
+        $saveMap =& Piwi::CreateWidget('Button',
+                                       'save_map',
+                                       _t('GLOBAL_SAVE'),
+                                       STOCK_SAVE);
+        $saveMap->SetStyle('display: none;');
+        $tpl->SetVariable('save_map',   $saveMap->Get());
+
+        $tpl->SetVariable('lbl_maps',    _t('URLMAPPER_MAPS'));
+        $tpl->SetVariable('datagrid', $this->MapsDatagrid());
+
+        //route entry
+        $routeEntry =& Piwi::CreateWidget('Entry', 'map_route', '');
+        $routeEntry->SetStyle('direction: ltr; width: 220px;');
+        $tpl->SetVariable('map_route', _t('URLMAPPER_MAPS_ROUTE'));
+        $tpl->SetVariable('map_route_entry', $routeEntry->Get());
+
+        $regexpEntry =& Piwi::CreateWidget('Entry', 'map_regexp', '');
+        $regexpEntry->SetStyle('direction: ltr; width: 220px;');
+        $tpl->SetVariable('map_regexp', _t('URLMAPPER_MAPS_REGEXP'));
+        $tpl->SetVariable('map_regexp_entry', $regexpEntry->Get());
+
+        $tpl->SetVariable('noMapsMsg',   _t('URLMAPPER_NO_MAPS'));
+        $tpl->SetVariable('editMsg',     _t('GLOBAL_EDIT'));
+        $tpl->SetVariable('addMsg',      _t('URLMAPPER_ADD_A_MAP'));
+        $tpl->SetVariable('deleteMsg',   _t('GLOBAL_DELETE'));
+        $tpl->SetVariable('editStock',   STOCK_EDIT);
+        $tpl->SetVariable('addStock',    STOCK_ADD);
+        $tpl->SetVariable('deleteStock', STOCK_DELETE);
+        $tpl->SetVariable('addMap_title',     _t('URLMAPPER_MAPS_ADD_TITLE'));
+        $tpl->SetVariable('editMap_title',    _t('URLMAPPER_MAPS_EDIT_TITLE'));
+        $tpl->SetVariable('confirmMapDelete', _t('URLMAPPER_MAPS_CONFIRM_DELETE'));
+        $tpl->SetVariable('noActionsMsg',  _t('URLMAPPER_MAP_NO_ACTIONS'));
+
+        $tpl->ParseBlock('UrlMapper');
+        return $tpl->Get();
+    }
+
+    /**
      * Prepares the aliases UI
      *
      * @access  public
@@ -217,103 +373,4 @@
         $tpl->ParseBlock('Properties');
         return $tpl->Get();
     }
-
-    /**
-     * Returns the admin template of UrlMapper
-     *
-     * @access  public
-     * @return  string  Template content
-     */
-    function Admin()
-    {
-        $this->AjaxMe('script.js');
-        $tpl = new Jaws_Template('gadgets/UrlMapper/templates/');
-        $tpl->Load('Maps.html');
-        $tpl->SetBlock('UrlMapper');
-
-        //Combo for actions
-        $comboActions =& Piwi::CreateWidget('Combo', 'actions');
-        $comboActions->SetSize(20);
-        $comboActions->SetStyle('width: 200px; height: 280px;');
-
-        //Combo for gadgets
-        $model = $GLOBALS['app']->LoadGadget('Jms', 'AdminModel');
-        $gadgets = $model->GetGadgetsList(null, true, true, true);
-
-        $comboGadgets =& Piwi::CreateWidget('Combo', 'gadgets_combo');
-        $comboGadgets->SetStyle('width: 200px;');
-        foreach($gadgets as $gadget) {
-            $comboGadgets->AddOption($gadget['name'], $gadget['realname']);
-        }
-        $comboGadgets->AddEvent(ON_CHANGE, 'javascript: rebuildActionCombo();');
-
-        $cancelMap =& Piwi::CreateWidget('Button', 'cancel_map', _t('GLOBAL_CANCEL'), STOCK_CANCEL);
-        $cancelMap->SetStyle('display: none;');
-
-        $saveMap =& Piwi::CreateWidget('Button', 'save_map', _t('GLOBAL_SAVE'), STOCK_SAVE);
-        $saveMap->SetStyle('display: none;');
-
-        $tpl->SetVariable('lbl_gadgets', _t('GLOBAL_GADGETS'));
-        $tpl->SetVariable('lbl_actions', _t('GLOBAL_ACTIONS'));
-        $tpl->SetVariable('lbl_maps',    _t('URLMAPPER_MAPS'));
-        $tpl->SetVariable('noMapsMsg',  _t('URLMAPPER_NO_MAPS'));
-        $tpl->SetVariable('editMsg',    _t('GLOBAL_EDIT'));
-        $tpl->SetVariable('addMsg',     _t('URLMAPPER_ADD_A_MAP'));
-        $tpl->SetVariable('deleteMsg',  _t('GLOBAL_DELETE'));
-        $tpl->SetVariable('editStock', STOCK_EDIT);
-        $tpl->SetVariable('addStock', STOCK_ADD);
-        $tpl->SetVariable('deleteStock', STOCK_DELETE);
-        $tpl->SetVariable('noActionsMsg', _t('URLMAPPER_MAP_NO_ACTIONS'));
-        $tpl->SetVariable('combo_gadgets', $comboGadgets->Get());
-        $tpl->SetVariable('combo_actions', $comboActions->Get());
-        $tpl->SetVariable('cancel_map', $cancelMap->Get());
-        $tpl->SetVariable('save_map', $saveMap->Get());
-        $tpl->SetVariable('menubar', $this->MenuBar('Admin'));
-
-        //route entry
-        $routeEntry =& Piwi::CreateWidget('Entry', 'map_route', '');
-        $routeEntry->SetStyle('direction: ltr; width: 220px;');
-
-        $regEntry =& Piwi::CreateWidget('Entry', 'map_reg', '');
-        $regEntry->SetStyle('direction: ltr; width: 220px;');
-
-        $tpl->SetVariable('datagrid', $this->DatagridTemplate());
-
-        $tpl->SetVariable('map_route', _t('URLMAPPER_EDITOR_MAP_ROUTE'));
-        $tpl->SetVariable('map_reg', _t('URLMAPPER_EDITOR_MAP_REG'));
-        $tpl->SetVariable('paramName', _t('URLMAPPER_EDITOR_PARAM_NAME'));
-        $tpl->SetVariable('paramType', _t('URLMAPPER_EDITOR_PARAM_TYPE'));
-        $tpl->SetVariable('paramLength', _t('URLMAPPER_EDITOR_PARAM_LENGTH'));
-        $tpl->SetVariable('editing', _t('URLMAPPER_EDITOR_EDITING'));
-        $tpl->SetVariable('examples', _t('URLMAPPER_EDITOR_EXAMPLES'));
-        $tpl->SetVariable('doc_length', _t('URLMAPPER_EDITOR_DOC_LENGTH'));
-        $tpl->SetVariable('map_route_entry', $routeEntry->Get());
-        $tpl->SetVariable('map_reg_entry', $regEntry->Get());
-        for($i=1; $i<=4; $i++) {
-            $tpl->SetBlock('UrlMapper/examples');
-            $tpl->SetVariable('map_example', _t('URLMAPPER_EDITOR_EXAMPLES_'.$i));
-            $tpl->ParseBlock('UrlMapper/examples');
-        }
-
-        $tpl->ParseBlock('UrlMapper');
-        return $tpl->Get();
-    }
-
-    /**
-     * Prepares a clean template for showing the maps
-     *
-     * @access  public
-     * @return  string  XHTML of template
-     */
-    function DatagridTemplate()
-    {
-        $datagrid =& Piwi::CreateWidget('DataGrid', array());
-        $datagrid->setID('map_grid');
-        $datagrid->usePager(false);
-        $datagrid->addColumn(Piwi::CreateWidget('Column', _t('URLMAPPER_MAPS')));
-        $datagrid->addColumn(Piwi::CreateWidget('Column', _t('GLOBAL_ACTIONS')));
-        $datagrid->setStyle('width: 100%; padding: 0px; margin: 0px;');
-
-        return $datagrid->Get();
-    }
 }
\ No newline at end of file

Modified: branches/0.8/jaws/html/gadgets/UrlMapper/AdminModel.php
===================================================================
--- branches/0.8/jaws/html/gadgets/UrlMapper/AdminModel.php	2008-10-30 03:37:34 UTC (rev 9728)
+++ branches/0.8/jaws/html/gadgets/UrlMapper/AdminModel.php	2008-10-30 12:49:37 UTC (rev 9729)
@@ -5,6 +5,7 @@
  * @category   GadgetModel
  * @package    UrlMapper
  * @author     Pablo Fischer <pablo at pablo.com.mx>
+ * @author     Ali Fazelzadeh <afz at php.net>
  * @copyright  2006-2008 Jaws Development Group
  * @license    http://www.gnu.org/copyleft/lesser.html
  */
@@ -47,7 +48,6 @@
         }
 
         // Registry keys.
-
         return true;
     }
 
@@ -308,15 +308,14 @@
         $params['action'] = $action;
         $params['map']    = $map;
         $params['script'] = $file;
-        $params['key']    = md5(uniqid(rand(), true)) . time() . floor(microtime()*1000);
         $params['regexp'] = $regexp;
         $params['custom'] = true;
 
         $sql = '
-            INSERT INTO [[custom_maps]]
-                ([gadget], [gadget_action], [map], [script_file], [secret_key], [regexp], [custom])
+            INSERT INTO [[url_maps]]
+                ([gadget], [action], [map], [regexp], [script], [custom])
             VALUES
-                ({gadget}, {action}, {map}, {script}, {key}, {regexp}, {custom})';
+                ({gadget}, {action}, {map}, {regexp}, {script}, {custom})';
 
         $result = $GLOBALS['db']->query($sql, $params);
         if (Jaws_Error::IsError($result)) {
@@ -332,15 +331,17 @@
      * Deletes a map
      *
      * @access   public
-     * @param    int       $id       Map's ID
-     * @return   boolean   Success/Failure
+     * @param    int        $id Map's ID
+     * @return   boolean    Success/Failure
      */
     function DeleteMap($id)
     {
         $params       = array();
         $params['id'] = $id;
 
-        $sql = 'DELETE FROM [[custom_maps]] WHERE [id] = {id}';
+        $sql = '
+            DELETE FROM [[url_maps]]
+            WHERE [id] = {id}';
 
         $result = $GLOBALS['db']->query($sql, $params);
         if (Jaws_Error::IsError($result)) {
@@ -368,7 +369,7 @@
         $params['regexp'] = $regexp;
 
         $sql = '
-            UPDATE [[custom_maps]] SET
+            UPDATE [[url_maps]] SET
                 [map]    = {map},
                 [regexp] = {regexp}
             WHERE [id] = {id}';
@@ -384,14 +385,14 @@
     }
 
     /**
-     * Returns the custom_maps of a certain gadget/action stored in the DB
+     * Returns the maps of a certain gadget/action stored in the DB
      *
      * @access  public
      * @param   string  $gadget   Gadget's name (FS name)
      * @param   string  $action   Gadget's action to use
      * @return  array   Array of custom maps
      */
-    function GetCustomMaps($gadget, $action)
+    function GetActionMaps($gadget, $action)
     {
         $params = array();
         $params['gadget'] = $gadget;
@@ -400,13 +401,14 @@
         $sql = '
             SELECT
                 [id], [map], [custom]
-            FROM [[custom_maps]]
+            FROM [[url_maps]]
             WHERE
                 [gadget] = {gadget}
               AND
-                [gadget_action] = {action}';
+                [action] = {action}';
 
-        $result = $GLOBALS['db']->queryAll($sql, $params);
+        $types = array('integer', 'text', 'boolean');
+        $result = $GLOBALS['db']->queryAll($sql, $params, $types);
         if (Jaws_Error::IsError($result)) {
             return array();
         }
@@ -428,10 +430,11 @@
 
         $sql = '
             SELECT
-                [map], [regexp]
-            FROM [[custom_maps]]
+                [map], [regexp], [custom]
+            FROM [[url_maps]]
             WHERE [id] = {id}';
 
+        $types = array('text', 'text', 'boolean');
         $result = $GLOBALS['db']->queryRow($sql, $params);
         if (Jaws_Error::IsError($result)) {
             return false;
@@ -459,8 +462,8 @@
 
         $sql = '
             SELECT
-                [gadget], [gadget_action], [map], [script_file], [secret_key]
-            FROM [[custom_maps]]';
+                [gadget], [action], [map], [script]
+            FROM [[url_maps]]';
 
         $result = $GLOBALS['db']->queryAll($sql);
         if (Jaws_Error::IsError($result)) {
@@ -470,9 +473,9 @@
         $GLOBALS['app']->Map->Reset();
         foreach ($result as $r) {
             $GLOBALS['app']->Map->Connect($r['gadget'],
-                                          $r['gadget_action'],
+                                          $r['action'],
                                           $r['map'],
-                                          $r['script_file'],
+                                          $r['script'],
                                           null, //reqs
                                           null, //extraparams
                                           $r['secret_key'],

Modified: branches/0.8/jaws/html/gadgets/UrlMapper/Info.php
===================================================================
--- branches/0.8/jaws/html/gadgets/UrlMapper/Info.php	2008-10-30 03:37:34 UTC (rev 9728)
+++ branches/0.8/jaws/html/gadgets/UrlMapper/Info.php	2008-10-30 12:49:37 UTC (rev 9729)
@@ -5,6 +5,7 @@
  * @category   GadgetInfo
  * @package    UrlMapper
  * @author     Pablo Fischer <pablo at pablo.com.mx>
+ * @author     Ali Fazelzadeh <afz at php.net>
  * @copyright  2006-2008 Jaws Development Group
  * @license    http://www.gnu.org/copyleft/lesser.html
  */
@@ -24,7 +25,10 @@
         $this->Doc('gadget/UrlMapper');
         $this->SetAttribute('core_gadget', true);
 
-        $acls = array('ManageUrlMapper');
+        $acls = array(
+            'ManageUrlMapper',
+            'EditMaps',
+        );
         $this->PopulateACLs($acls);
     }
 }
\ No newline at end of file

Modified: branches/0.8/jaws/html/gadgets/UrlMapper/languages/de.php
===================================================================
--- branches/0.8/jaws/html/gadgets/UrlMapper/languages/de.php	2008-10-30 03:37:34 UTC (rev 9728)
+++ branches/0.8/jaws/html/gadgets/UrlMapper/languages/de.php	2008-10-30 12:49:37 UTC (rev 9729)
@@ -19,20 +19,20 @@
 define('_DE_URLMAPPER_NO_MAPS', "Keine Maps gefunden");
 define('_DE_URLMAPPER_MAPS', "Maps");
 define('_DE_URLMAPPER_MAP_NO_ACTIONS', "Keine Aktion für diese Map");
-define('_DE_URLMAPPER_EDITOR_MAP_ROUTE', "Map route");
-define('_DE_URLMAPPER_EDITOR_PARAM_NAME', "Name");
-define('_DE_URLMAPPER_EDITOR_PARAM_TYPE', "Typ");
-define('_DE_URLMAPPER_EDITOR_PARAM_LENGTH', "Länge");
-define('_DE_URLMAPPER_EDITOR_PARAM_TYPE_CONSTANT', "Konstant");
-define('_DE_URLMAPPER_EDITOR_PARAM_TYPE_STRING', "String");
-define('_DE_URLMAPPER_EDITOR_PARAM_TYPE_ANY', "Alphanumerisch");
-define('_DE_URLMAPPER_EDITOR_PARAM_TYPE_NUM', "Numerisch");
-define('_DE_URLMAPPER_EDITOR_EDITING', "Bearbeiten");
-define('_DE_URLMAPPER_EDITOR_EXAMPLES', "Routenbeispiel");
-define('_DE_URLMAPPER_EDITOR_EXAMPLES_1', "Produkte");
-define('_DE_URLMAPPER_EDITOR_EXAMPLES_2', "Produkte/{Produkte}");
-define('_DE_URLMAPPER_EDITOR_EXAMPLES_3', "Produkte/Kategorie/{Kategorie}");
-define('_DE_URLMAPPER_EDITOR_EXAMPLES_4', "Produkte/Kategorie/Hinzufuegen");
+define('_DE_URLMAPPER_MAPS_MAP_ROUTE', "Map route");
+define('_DE_URLMAPPER_MAPS_PARAM_NAME', "Name");
+define('_DE_URLMAPPER_MAPS_PARAM_TYPE', "Typ");
+define('_DE_URLMAPPER_MAPS_PARAM_LENGTH', "Länge");
+define('_DE_URLMAPPER_MAPS_PARAM_TYPE_CONSTANT', "Konstant");
+define('_DE_URLMAPPER_MAPS_PARAM_TYPE_STRING', "String");
+define('_DE_URLMAPPER_MAPS_PARAM_TYPE_ANY', "Alphanumerisch");
+define('_DE_URLMAPPER_MAPS_PARAM_TYPE_NUM', "Numerisch");
+define('_DE_URLMAPPER_MAPS_EDITING', "Bearbeiten");
+define('_DE_URLMAPPER_MAPS_EXAMPLES', "Routenbeispiel");
+define('_DE_URLMAPPER_MAPS_EXAMPLES_1', "Produkte");
+define('_DE_URLMAPPER_MAPS_EXAMPLES_2', "Produkte/{Produkte}");
+define('_DE_URLMAPPER_MAPS_EXAMPLES_3', "Produkte/Kategorie/{Kategorie}");
+define('_DE_URLMAPPER_MAPS_EXAMPLES_4', "Produkte/Kategorie/Hinzufuegen");
 define('_DE_URLMAPPER_SETTINGS_MAP_TO_USE', "Zu benutzende Map");
 define('_DE_URLMAPPER_SETTINGS_MAP_TO_USE_BOTH', "Lade standard & benutzerdefinierte Maps");
 define('_DE_URLMAPPER_SETTINGS_MAP_TO_USE_CORE', "Lade nur standard Maps");

Modified: branches/0.8/jaws/html/gadgets/UrlMapper/languages/en.php
===================================================================
--- branches/0.8/jaws/html/gadgets/UrlMapper/languages/en.php	2008-10-30 03:37:34 UTC (rev 9728)
+++ branches/0.8/jaws/html/gadgets/UrlMapper/languages/en.php	2008-10-30 12:49:37 UTC (rev 9729)
@@ -15,20 +15,19 @@
 define('_EN_URLMAPPER_MAP_NO_ACTIONS', "No actions for this map");
 
 /** Map editor strings */
-define('_EN_URLMAPPER_EDITOR_MAP_ROUTE', "Map route");
-define('_EN_URLMAPPER_EDITOR_PARAM_NAME', "Name");
-define('_EN_URLMAPPER_EDITOR_PARAM_TYPE', "Type");
-define('_EN_URLMAPPER_EDITOR_PARAM_LENGTH', "Length");
-define('_EN_URLMAPPER_EDITOR_PARAM_TYPE_CONSTANT', "Constant");
-define('_EN_URLMAPPER_EDITOR_PARAM_TYPE_STRING', "String");
-define('_EN_URLMAPPER_EDITOR_PARAM_TYPE_ANY', "Alphanumeric");
-define('_EN_URLMAPPER_EDITOR_PARAM_TYPE_NUM', "Numeric");
-define('_EN_URLMAPPER_EDITOR_EDITING', "Editing");
-define('_EN_URLMAPPER_EDITOR_EXAMPLES', "Route examples");
-define('_EN_URLMAPPER_EDITOR_EXAMPLES_1', "products");
-define('_EN_URLMAPPER_EDITOR_EXAMPLES_2', "products/{product}");
-define('_EN_URLMAPPER_EDITOR_EXAMPLES_3', "products/category/{category}");
-define('_EN_URLMAPPER_EDITOR_EXAMPLES_4', "products/category/add");
+define('_EN_URLMAPPER_MAPS_ADD_TITLE', "Add Map");
+define('_EN_URLMAPPER_MAPS_EDIT_TITLE', "Edit Map");
+define('_EN_URLMAPPER_MAPS_ROUTE', "Map route");
+define('_EN_URLMAPPER_MAPS_REGEXP', "Regular expression");
+define('_EN_URLMAPPER_MAPS_PARAM_NAME', "Name");
+define('_EN_URLMAPPER_MAPS_PARAM_TYPE', "Type");
+define('_EN_URLMAPPER_MAPS_PARAM_LENGTH', "Length");
+define('_EN_URLMAPPER_MAPS_PARAM_TYPE_CONSTANT', "Constant");
+define('_EN_URLMAPPER_MAPS_PARAM_TYPE_STRING', "String");
+define('_EN_URLMAPPER_MAPS_PARAM_TYPE_ANY', "Alphanumeric");
+define('_EN_URLMAPPER_MAPS_PARAM_TYPE_NUM', "Numeric");
+define('_EN_URLMAPPER_MAPS_EDITING', "Editing");
+define('_EN_URLMAPPER_MAPS_CONFIRM_DELETE', "Delete this Map?");
 
 /** Properties **/
 define('_EN_URLMAPPER_SETTINGS_MAP_TO_USE', "Maps to use");

Modified: branches/0.8/jaws/html/gadgets/UrlMapper/languages/es.php
===================================================================
--- branches/0.8/jaws/html/gadgets/UrlMapper/languages/es.php	2008-10-30 03:37:34 UTC (rev 9728)
+++ branches/0.8/jaws/html/gadgets/UrlMapper/languages/es.php	2008-10-30 12:49:37 UTC (rev 9729)
@@ -19,20 +19,20 @@
 define('_ES_URLMAPPER_NO_MAPS', "No se encontraron mapas");
 define('_ES_URLMAPPER_MAPS', "Mapas");
 define('_ES_URLMAPPER_MAP_NO_ACTIONS', "No hay acciones para este mapa");
-define('_ES_URLMAPPER_EDITOR_MAP_ROUTE', "Ruta del mapa");
-define('_ES_URLMAPPER_EDITOR_PARAM_NAME', "Nombre");
-define('_ES_URLMAPPER_EDITOR_PARAM_TYPE', "Tipo");
-define('_ES_URLMAPPER_EDITOR_PARAM_LENGTH', "Longitud");
-define('_ES_URLMAPPER_EDITOR_PARAM_TYPE_CONSTANT', "Constante");
-define('_ES_URLMAPPER_EDITOR_PARAM_TYPE_STRING', "Cadena");
-define('_ES_URLMAPPER_EDITOR_PARAM_TYPE_ANY', "Alfanumérico");
-define('_ES_URLMAPPER_EDITOR_PARAM_TYPE_NUM', "Numérico");
-define('_ES_URLMAPPER_EDITOR_EDITING', "Editando");
-define('_ES_URLMAPPER_EDITOR_EXAMPLES', "Ejemplos de rutas");
-define('_ES_URLMAPPER_EDITOR_EXAMPLES_1', "productos");
-define('_ES_URLMAPPER_EDITOR_EXAMPLES_2', "productos/{producto}");
-define('_ES_URLMAPPER_EDITOR_EXAMPLES_3', "productos/categoria/{categoria}");
-define('_ES_URLMAPPER_EDITOR_EXAMPLES_4', "productos/categoria/agregar");
+define('_ES_URLMAPPER_MAPS_MAP_ROUTE', "Ruta del mapa");
+define('_ES_URLMAPPER_MAPS_PARAM_NAME', "Nombre");
+define('_ES_URLMAPPER_MAPS_PARAM_TYPE', "Tipo");
+define('_ES_URLMAPPER_MAPS_PARAM_LENGTH', "Longitud");
+define('_ES_URLMAPPER_MAPS_PARAM_TYPE_CONSTANT', "Constante");
+define('_ES_URLMAPPER_MAPS_PARAM_TYPE_STRING', "Cadena");
+define('_ES_URLMAPPER_MAPS_PARAM_TYPE_ANY', "Alfanumérico");
+define('_ES_URLMAPPER_MAPS_PARAM_TYPE_NUM', "Numérico");
+define('_ES_URLMAPPER_MAPS_EDITING', "Editando");
+define('_ES_URLMAPPER_MAPS_EXAMPLES', "Ejemplos de rutas");
+define('_ES_URLMAPPER_MAPS_EXAMPLES_1', "productos");
+define('_ES_URLMAPPER_MAPS_EXAMPLES_2', "productos/{producto}");
+define('_ES_URLMAPPER_MAPS_EXAMPLES_3', "productos/categoria/{categoria}");
+define('_ES_URLMAPPER_MAPS_EXAMPLES_4', "productos/categoria/agregar");
 define('_ES_URLMAPPER_SETTINGS_MAP_TO_USE', "Mapas a usar");
 define('_ES_URLMAPPER_SETTINGS_MAP_TO_USE_BOTH', "Cargar mapas predeterminados y los mapas personalizados");
 define('_ES_URLMAPPER_SETTINGS_MAP_TO_USE_CORE', "Cargar solo mapas predeterminados");

Modified: branches/0.8/jaws/html/gadgets/UrlMapper/languages/fa.php
===================================================================
--- branches/0.8/jaws/html/gadgets/UrlMapper/languages/fa.php	2008-10-30 03:37:34 UTC (rev 9728)
+++ branches/0.8/jaws/html/gadgets/UrlMapper/languages/fa.php	2008-10-30 12:49:37 UTC (rev 9729)
@@ -19,20 +19,20 @@
 define('_FA_URLMAPPER_NO_MAPS', "هیچ نگاشتی پیدا نشد");
 define('_FA_URLMAPPER_MAPS', "نگاشت‌ها");
 define('_FA_URLMAPPER_MAP_NO_ACTIONS', "هیچ عمل روی این نگاشت تعریف نشده");
-define('_FA_URLMAPPER_EDITOR_MAP_ROUTE', "مسیردهی نگاشت");
-define('_FA_URLMAPPER_EDITOR_PARAM_NAME', "نام");
-define('_FA_URLMAPPER_EDITOR_PARAM_TYPE', "نوع");
-define('_FA_URLMAPPER_EDITOR_PARAM_LENGTH', "طول");
-define('_FA_URLMAPPER_EDITOR_PARAM_TYPE_CONSTANT', "ثابت");
-define('_FA_URLMAPPER_EDITOR_PARAM_TYPE_STRING', "رشته حرفی");
-define('_FA_URLMAPPER_EDITOR_PARAM_TYPE_ANY', "الفبا عددى");
-define('_FA_URLMAPPER_EDITOR_PARAM_TYPE_NUM', "عددی");
-define('_FA_URLMAPPER_EDITOR_EDITING', "ویرایش");
-define('_FA_URLMAPPER_EDITOR_EXAMPLES', "مثالهای مسیردهی");
-define('_FA_URLMAPPER_EDITOR_EXAMPLES_1', "محصولات");
-define('_FA_URLMAPPER_EDITOR_EXAMPLES_2', "محصولات/{محصول}");
-define('_FA_URLMAPPER_EDITOR_EXAMPLES_3', "محصولات/مقوله/{مقوله}");
-define('_FA_URLMAPPER_EDITOR_EXAMPLES_4', "محصولات/مقوله/افزودن");
+define('_FA_URLMAPPER_MAPS_MAP_ROUTE', "مسیردهی نگاشت");
+define('_FA_URLMAPPER_MAPS_PARAM_NAME', "نام");
+define('_FA_URLMAPPER_MAPS_PARAM_TYPE', "نوع");
+define('_FA_URLMAPPER_MAPS_PARAM_LENGTH', "طول");
+define('_FA_URLMAPPER_MAPS_PARAM_TYPE_CONSTANT', "ثابت");
+define('_FA_URLMAPPER_MAPS_PARAM_TYPE_STRING', "رشته حرفی");
+define('_FA_URLMAPPER_MAPS_PARAM_TYPE_ANY', "الفبا عددى");
+define('_FA_URLMAPPER_MAPS_PARAM_TYPE_NUM', "عددی");
+define('_FA_URLMAPPER_MAPS_EDITING', "ویرایش");
+define('_FA_URLMAPPER_MAPS_EXAMPLES', "مثالهای مسیردهی");
+define('_FA_URLMAPPER_MAPS_EXAMPLES_1', "محصولات");
+define('_FA_URLMAPPER_MAPS_EXAMPLES_2', "محصولات/{محصول}");
+define('_FA_URLMAPPER_MAPS_EXAMPLES_3', "محصولات/مقوله/{مقوله}");
+define('_FA_URLMAPPER_MAPS_EXAMPLES_4', "محصولات/مقوله/افزودن");
 define('_FA_URLMAPPER_SETTINGS_MAP_TO_USE', "نگاشت فعال");
 define('_FA_URLMAPPER_SETTINGS_MAP_TO_USE_BOTH', "بارگذاری نگاشت پیش فرض و نگاشت اختصاصی خودم");
 define('_FA_URLMAPPER_SETTINGS_MAP_TO_USE_CORE', "بارگذاری فقط نگاشتهای پیش فرض");

Modified: branches/0.8/jaws/html/gadgets/UrlMapper/languages/it.php
===================================================================
--- branches/0.8/jaws/html/gadgets/UrlMapper/languages/it.php	2008-10-30 03:37:34 UTC (rev 9728)
+++ branches/0.8/jaws/html/gadgets/UrlMapper/languages/it.php	2008-10-30 12:49:37 UTC (rev 9729)
@@ -19,20 +19,20 @@
 define('_IT_URLMAPPER_NO_MAPS', "Non è stata trovata alcuna mappa");
 define('_IT_URLMAPPER_MAPS', "Mappe");
 define('_IT_URLMAPPER_MAP_NO_ACTIONS', "Nessuna azione per questa mappa");
-define('_IT_URLMAPPER_EDITOR_MAP_ROUTE', "Percorso Mappa");
-define('_IT_URLMAPPER_EDITOR_PARAM_NAME', "Nome");
-define('_IT_URLMAPPER_EDITOR_PARAM_TYPE', "Tipo");
-define('_IT_URLMAPPER_EDITOR_PARAM_LENGTH', "Lunghezza");
-define('_IT_URLMAPPER_EDITOR_PARAM_TYPE_CONSTANT', "Costante");
-define('_IT_URLMAPPER_EDITOR_PARAM_TYPE_STRING', "Stringa");
-define('_IT_URLMAPPER_EDITOR_PARAM_TYPE_ANY', "Alfanumerico");
-define('_IT_URLMAPPER_EDITOR_PARAM_TYPE_NUM', "Numerico");
-define('_IT_URLMAPPER_EDITOR_EDITING', "Modifica");
-define('_IT_URLMAPPER_EDITOR_EXAMPLES', "Percorsi di esempio");
-define('_IT_URLMAPPER_EDITOR_EXAMPLES_1', "products");
-define('_IT_URLMAPPER_EDITOR_EXAMPLES_2', "products/{product}");
-define('_IT_URLMAPPER_EDITOR_EXAMPLES_3', "products/category/{category}");
-define('_IT_URLMAPPER_EDITOR_EXAMPLES_4', "products/category/add");
+define('_IT_URLMAPPER_MAPS_MAP_ROUTE', "Percorso Mappa");
+define('_IT_URLMAPPER_MAPS_PARAM_NAME', "Nome");
+define('_IT_URLMAPPER_MAPS_PARAM_TYPE', "Tipo");
+define('_IT_URLMAPPER_MAPS_PARAM_LENGTH', "Lunghezza");
+define('_IT_URLMAPPER_MAPS_PARAM_TYPE_CONSTANT', "Costante");
+define('_IT_URLMAPPER_MAPS_PARAM_TYPE_STRING', "Stringa");
+define('_IT_URLMAPPER_MAPS_PARAM_TYPE_ANY', "Alfanumerico");
+define('_IT_URLMAPPER_MAPS_PARAM_TYPE_NUM', "Numerico");
+define('_IT_URLMAPPER_MAPS_EDITING', "Modifica");
+define('_IT_URLMAPPER_MAPS_EXAMPLES', "Percorsi di esempio");
+define('_IT_URLMAPPER_MAPS_EXAMPLES_1', "products");
+define('_IT_URLMAPPER_MAPS_EXAMPLES_2', "products/{product}");
+define('_IT_URLMAPPER_MAPS_EXAMPLES_3', "products/category/{category}");
+define('_IT_URLMAPPER_MAPS_EXAMPLES_4', "products/category/add");
 define('_IT_URLMAPPER_SETTINGS_MAP_TO_USE', "Mappe da usare");
 define('_IT_URLMAPPER_SETTINGS_MAP_TO_USE_BOTH', "Carica mappe predefinite e mappe personalizzate");
 define('_IT_URLMAPPER_SETTINGS_MAP_TO_USE_CORE', "Carica solo le mappe predefinite");

Modified: branches/0.8/jaws/html/gadgets/UrlMapper/languages/ja.php
===================================================================
--- branches/0.8/jaws/html/gadgets/UrlMapper/languages/ja.php	2008-10-30 03:37:34 UTC (rev 9728)
+++ branches/0.8/jaws/html/gadgets/UrlMapper/languages/ja.php	2008-10-30 12:49:37 UTC (rev 9729)
@@ -15,20 +15,20 @@
 define('_JA_URLMAPPER_MAP_NO_ACTIONS', "このマップの操作はありません");
 
 /** Map editor strings */
-define('_JA_URLMAPPER_EDITOR_MAP_ROUTE', "マップルート");
-define('_JA_URLMAPPER_EDITOR_PARAM_NAME', "名前");
-define('_JA_URLMAPPER_EDITOR_PARAM_TYPE', "種類");
-define('_JA_URLMAPPER_EDITOR_PARAM_LENGTH', "場が差");
-define('_JA_URLMAPPER_EDITOR_PARAM_TYPE_CONSTANT', "Constant");
-define('_JA_URLMAPPER_EDITOR_PARAM_TYPE_STRING', "文字列");
-define('_JA_URLMAPPER_EDITOR_PARAM_TYPE_ANY', "英数字");
-define('_JA_URLMAPPER_EDITOR_PARAM_TYPE_NUM', "数字");
-define('_JA_URLMAPPER_EDITOR_EDITING', "編集中");
-define('_JA_URLMAPPER_EDITOR_EXAMPLES', "ルート例");
-define('_JA_URLMAPPER_EDITOR_EXAMPLES_1', "products");
-define('_JA_URLMAPPER_EDITOR_EXAMPLES_2', "products/{product}");
-define('_JA_URLMAPPER_EDITOR_EXAMPLES_3', "products/category/{category}");
-define('_JA_URLMAPPER_EDITOR_EXAMPLES_4', "products/category/add");
+define('_JA_URLMAPPER_MAPS_MAP_ROUTE', "マップルート");
+define('_JA_URLMAPPER_MAPS_PARAM_NAME', "名前");
+define('_JA_URLMAPPER_MAPS_PARAM_TYPE', "種類");
+define('_JA_URLMAPPER_MAPS_PARAM_LENGTH', "場が差");
+define('_JA_URLMAPPER_MAPS_PARAM_TYPE_CONSTANT', "Constant");
+define('_JA_URLMAPPER_MAPS_PARAM_TYPE_STRING', "文字列");
+define('_JA_URLMAPPER_MAPS_PARAM_TYPE_ANY', "英数字");
+define('_JA_URLMAPPER_MAPS_PARAM_TYPE_NUM', "数字");
+define('_JA_URLMAPPER_MAPS_EDITING', "編集中");
+define('_JA_URLMAPPER_MAPS_EXAMPLES', "ルート例");
+define('_JA_URLMAPPER_MAPS_EXAMPLES_1', "products");
+define('_JA_URLMAPPER_MAPS_EXAMPLES_2', "products/{product}");
+define('_JA_URLMAPPER_MAPS_EXAMPLES_3', "products/category/{category}");
+define('_JA_URLMAPPER_MAPS_EXAMPLES_4', "products/category/add");
 
 /** Properties **/
 define('_JA_URLMAPPER_SETTINGS_MAP_TO_USE', "使用するマップ");

Modified: branches/0.8/jaws/html/gadgets/UrlMapper/languages/nl.php
===================================================================
--- branches/0.8/jaws/html/gadgets/UrlMapper/languages/nl.php	2008-10-30 03:37:34 UTC (rev 9728)
+++ branches/0.8/jaws/html/gadgets/UrlMapper/languages/nl.php	2008-10-30 12:49:37 UTC (rev 9729)
@@ -19,20 +19,20 @@
 define('_NL_URLMAPPER_NO_MAPS', "Geen maps gevonden");
 define('_NL_URLMAPPER_MAPS', "Maps");
 define('_NL_URLMAPPER_MAP_NO_ACTIONS', "Geen acties voor map");
-define('_NL_URLMAPPER_EDITOR_MAP_ROUTE', "Map route");
-define('_NL_URLMAPPER_EDITOR_PARAM_NAME', "Naam");
-define('_NL_URLMAPPER_EDITOR_PARAM_TYPE', "Type");
-define('_NL_URLMAPPER_EDITOR_PARAM_LENGTH', "Lengte");
-define('_NL_URLMAPPER_EDITOR_PARAM_TYPE_CONSTANT', "Constante");
-define('_NL_URLMAPPER_EDITOR_PARAM_TYPE_STRING', "Tekst");
-define('_NL_URLMAPPER_EDITOR_PARAM_TYPE_ANY', "Alfanumeriek");
-define('_NL_URLMAPPER_EDITOR_PARAM_TYPE_NUM', "Numeriek");
-define('_NL_URLMAPPER_EDITOR_EDITING', "Wijzigen");
-define('_NL_URLMAPPER_EDITOR_EXAMPLES', "Route voorbeelden");
-define('_NL_URLMAPPER_EDITOR_EXAMPLES_1', "producten");
-define('_NL_URLMAPPER_EDITOR_EXAMPLES_2', "producten/{product}");
-define('_NL_URLMAPPER_EDITOR_EXAMPLES_3', "producten/categorie/{category}");
-define('_NL_URLMAPPER_EDITOR_EXAMPLES_4', "producten/categorie/toevoegen");
+define('_NL_URLMAPPER_MAPS_MAP_ROUTE', "Map route");
+define('_NL_URLMAPPER_MAPS_PARAM_NAME', "Naam");
+define('_NL_URLMAPPER_MAPS_PARAM_TYPE', "Type");
+define('_NL_URLMAPPER_MAPS_PARAM_LENGTH', "Lengte");
+define('_NL_URLMAPPER_MAPS_PARAM_TYPE_CONSTANT', "Constante");
+define('_NL_URLMAPPER_MAPS_PARAM_TYPE_STRING', "Tekst");
+define('_NL_URLMAPPER_MAPS_PARAM_TYPE_ANY', "Alfanumeriek");
+define('_NL_URLMAPPER_MAPS_PARAM_TYPE_NUM', "Numeriek");
+define('_NL_URLMAPPER_MAPS_EDITING', "Wijzigen");
+define('_NL_URLMAPPER_MAPS_EXAMPLES', "Route voorbeelden");
+define('_NL_URLMAPPER_MAPS_EXAMPLES_1', "producten");
+define('_NL_URLMAPPER_MAPS_EXAMPLES_2', "producten/{product}");
+define('_NL_URLMAPPER_MAPS_EXAMPLES_3', "producten/categorie/{category}");
+define('_NL_URLMAPPER_MAPS_EXAMPLES_4', "producten/categorie/toevoegen");
 define('_NL_URLMAPPER_SETTINGS_MAP_TO_USE', "Maps om te gebruiken");
 define('_NL_URLMAPPER_SETTINGS_MAP_TO_USE_BOTH', "Laad standaard maps en mijn aangepaste maps");
 define('_NL_URLMAPPER_SETTINGS_MAP_TO_USE_CORE', "Laad alleen standaard maps");

Modified: branches/0.8/jaws/html/gadgets/UrlMapper/languages/pt-br.php
===================================================================
--- branches/0.8/jaws/html/gadgets/UrlMapper/languages/pt-br.php	2008-10-30 03:37:34 UTC (rev 9728)
+++ branches/0.8/jaws/html/gadgets/UrlMapper/languages/pt-br.php	2008-10-30 12:49:37 UTC (rev 9729)
@@ -19,20 +19,20 @@
 define('_PT-BR_URLMAPPER_NO_MAPS', "Nenhum mapa encontrado");
 define('_PT-BR_URLMAPPER_MAPS', "Mapas");
 define('_PT-BR_URLMAPPER_MAP_NO_ACTIONS', "Este mapa não possui opções");
-define('_PT-BR_URLMAPPER_EDITOR_MAP_ROUTE', "Map de rotas");
-define('_PT-BR_URLMAPPER_EDITOR_PARAM_NAME', "Nome");
-define('_PT-BR_URLMAPPER_EDITOR_PARAM_TYPE', "Tipo");
-define('_PT-BR_URLMAPPER_EDITOR_PARAM_LENGTH', "Comprimento");
-define('_PT-BR_URLMAPPER_EDITOR_PARAM_TYPE_CONSTANT', "Constante");
-define('_PT-BR_URLMAPPER_EDITOR_PARAM_TYPE_STRING', "String");
-define('_PT-BR_URLMAPPER_EDITOR_PARAM_TYPE_ANY', "Alfa-numérico");
-define('_PT-BR_URLMAPPER_EDITOR_PARAM_TYPE_NUM', "Numérico");
-define('_PT-BR_URLMAPPER_EDITOR_EDITING', "Editando");
-define('_PT-BR_URLMAPPER_EDITOR_EXAMPLES', "Exemplos de rota");
-define('_PT-BR_URLMAPPER_EDITOR_EXAMPLES_1', "products");
-define('_PT-BR_URLMAPPER_EDITOR_EXAMPLES_2', "products/{product}");
-define('_PT-BR_URLMAPPER_EDITOR_EXAMPLES_3', "products/category/{category}");
-define('_PT-BR_URLMAPPER_EDITOR_EXAMPLES_4', "products/category/add");
+define('_PT-BR_URLMAPPER_MAPS_MAP_ROUTE', "Map de rotas");
+define('_PT-BR_URLMAPPER_MAPS_PARAM_NAME', "Nome");
+define('_PT-BR_URLMAPPER_MAPS_PARAM_TYPE', "Tipo");
+define('_PT-BR_URLMAPPER_MAPS_PARAM_LENGTH', "Comprimento");
+define('_PT-BR_URLMAPPER_MAPS_PARAM_TYPE_CONSTANT', "Constante");
+define('_PT-BR_URLMAPPER_MAPS_PARAM_TYPE_STRING', "String");
+define('_PT-BR_URLMAPPER_MAPS_PARAM_TYPE_ANY', "Alfa-numérico");
+define('_PT-BR_URLMAPPER_MAPS_PARAM_TYPE_NUM', "Numérico");
+define('_PT-BR_URLMAPPER_MAPS_EDITING', "Editando");
+define('_PT-BR_URLMAPPER_MAPS_EXAMPLES', "Exemplos de rota");
+define('_PT-BR_URLMAPPER_MAPS_EXAMPLES_1', "products");
+define('_PT-BR_URLMAPPER_MAPS_EXAMPLES_2', "products/{product}");
+define('_PT-BR_URLMAPPER_MAPS_EXAMPLES_3', "products/category/{category}");
+define('_PT-BR_URLMAPPER_MAPS_EXAMPLES_4', "products/category/add");
 define('_PT-BR_URLMAPPER_SETTINGS_MAP_TO_USE', "Usar Mapas");
 define('_PT-BR_URLMAPPER_SETTINGS_MAP_TO_USE_BOTH', "Carregar mapas e padrão e os meus mapas");
 define('_PT-BR_URLMAPPER_SETTINGS_MAP_TO_USE_CORE', "Carregar somente mapas padrão");

Modified: branches/0.8/jaws/html/gadgets/UrlMapper/languages/ru.php
===================================================================
--- branches/0.8/jaws/html/gadgets/UrlMapper/languages/ru.php	2008-10-30 03:37:34 UTC (rev 9728)
+++ branches/0.8/jaws/html/gadgets/UrlMapper/languages/ru.php	2008-10-30 12:49:37 UTC (rev 9729)
@@ -19,20 +19,20 @@
 define('_RU_URLMAPPER_NO_MAPS', "Карт нет");
 define('_RU_URLMAPPER_MAPS', "Карты");
 define('_RU_URLMAPPER_MAP_NO_ACTIONS', "Нет действий для этой карты");
-define('_RU_URLMAPPER_EDITOR_MAP_ROUTE', "Маршрут");
-define('_RU_URLMAPPER_EDITOR_PARAM_NAME', "Имя");
-define('_RU_URLMAPPER_EDITOR_PARAM_TYPE', "Тип");
-define('_RU_URLMAPPER_EDITOR_PARAM_LENGTH', "Длина");
-define('_RU_URLMAPPER_EDITOR_PARAM_TYPE_CONSTANT', "Константа");
-define('_RU_URLMAPPER_EDITOR_PARAM_TYPE_STRING', "Строка");
-define('_RU_URLMAPPER_EDITOR_PARAM_TYPE_ANY', "Буквенно-цифровой");
-define('_RU_URLMAPPER_EDITOR_PARAM_TYPE_NUM', "Цифровой");
-define('_RU_URLMAPPER_EDITOR_EDITING', "Редактирование");
-define('_RU_URLMAPPER_EDITOR_EXAMPLES', "Примеры маршрутов");
-define('_RU_URLMAPPER_EDITOR_EXAMPLES_1', "products");
-define('_RU_URLMAPPER_EDITOR_EXAMPLES_2', "products/{product}");
-define('_RU_URLMAPPER_EDITOR_EXAMPLES_3', "products/category/{category}");
-define('_RU_URLMAPPER_EDITOR_EXAMPLES_4', "products/category/add");
+define('_RU_URLMAPPER_MAPS_MAP_ROUTE', "Маршрут");
+define('_RU_URLMAPPER_MAPS_PARAM_NAME', "Имя");
+define('_RU_URLMAPPER_MAPS_PARAM_TYPE', "Тип");
+define('_RU_URLMAPPER_MAPS_PARAM_LENGTH', "Длина");
+define('_RU_URLMAPPER_MAPS_PARAM_TYPE_CONSTANT', "Константа");
+define('_RU_URLMAPPER_MAPS_PARAM_TYPE_STRING', "Строка");
+define('_RU_URLMAPPER_MAPS_PARAM_TYPE_ANY', "Буквенно-цифровой");
+define('_RU_URLMAPPER_MAPS_PARAM_TYPE_NUM', "Цифровой");
+define('_RU_URLMAPPER_MAPS_EDITING', "Редактирование");
+define('_RU_URLMAPPER_MAPS_EXAMPLES', "Примеры маршрутов");
+define('_RU_URLMAPPER_MAPS_EXAMPLES_1', "products");
+define('_RU_URLMAPPER_MAPS_EXAMPLES_2', "products/{product}");
+define('_RU_URLMAPPER_MAPS_EXAMPLES_3', "products/category/{category}");
+define('_RU_URLMAPPER_MAPS_EXAMPLES_4', "products/category/add");
 define('_RU_URLMAPPER_SETTINGS_MAP_TO_USE', "Использовать карты");
 define('_RU_URLMAPPER_SETTINGS_MAP_TO_USE_BOTH', "Загружать карты по умолчанию и мои карты");
 define('_RU_URLMAPPER_SETTINGS_MAP_TO_USE_CORE', "Загружать только карты по умолчанию");

Modified: branches/0.8/jaws/html/gadgets/UrlMapper/languages/tr.php
===================================================================
--- branches/0.8/jaws/html/gadgets/UrlMapper/languages/tr.php	2008-10-30 03:37:34 UTC (rev 9728)
+++ branches/0.8/jaws/html/gadgets/UrlMapper/languages/tr.php	2008-10-30 12:49:37 UTC (rev 9729)
@@ -19,20 +19,20 @@
 define('_TR_URLMAPPER_NO_MAPS', "Harita bulunamadı");
 define('_TR_URLMAPPER_MAPS', "Haritalar");
 define('_TR_URLMAPPER_MAP_NO_ACTIONS', "Bu harita için bir eylem yok");
-define('_TR_URLMAPPER_EDITOR_MAP_ROUTE', "Harita yönlendirme");
-define('_TR_URLMAPPER_EDITOR_PARAM_NAME', "İsim");
-define('_TR_URLMAPPER_EDITOR_PARAM_TYPE', "Tür");
-define('_TR_URLMAPPER_EDITOR_PARAM_LENGTH', "Uzunluk");
-define('_TR_URLMAPPER_EDITOR_PARAM_TYPE_CONSTANT', "Sabit");
-define('_TR_URLMAPPER_EDITOR_PARAM_TYPE_STRING', "Dizgi");
-define('_TR_URLMAPPER_EDITOR_PARAM_TYPE_ANY', "Alfasayısal");
-define('_TR_URLMAPPER_EDITOR_PARAM_TYPE_NUM', "Sayısal");
-define('_TR_URLMAPPER_EDITOR_EDITING', "Düzenleme");
-define('_TR_URLMAPPER_EDITOR_EXAMPLES', "Yönlendirme örnekleri");
-define('_TR_URLMAPPER_EDITOR_EXAMPLES_1', "ürünler");
-define('_TR_URLMAPPER_EDITOR_EXAMPLES_2', "ürünler/{ürün}");
-define('_TR_URLMAPPER_EDITOR_EXAMPLES_3', "ürünler/kategori/{kategori}");
-define('_TR_URLMAPPER_EDITOR_EXAMPLES_4', "ürünler/kategori/ekle");
+define('_TR_URLMAPPER_MAPS_MAP_ROUTE', "Harita yönlendirme");
+define('_TR_URLMAPPER_MAPS_PARAM_NAME', "İsim");
+define('_TR_URLMAPPER_MAPS_PARAM_TYPE', "Tür");
+define('_TR_URLMAPPER_MAPS_PARAM_LENGTH', "Uzunluk");
+define('_TR_URLMAPPER_MAPS_PARAM_TYPE_CONSTANT', "Sabit");
+define('_TR_URLMAPPER_MAPS_PARAM_TYPE_STRING', "Dizgi");
+define('_TR_URLMAPPER_MAPS_PARAM_TYPE_ANY', "Alfasayısal");
+define('_TR_URLMAPPER_MAPS_PARAM_TYPE_NUM', "Sayısal");
+define('_TR_URLMAPPER_MAPS_EDITING', "Düzenleme");
+define('_TR_URLMAPPER_MAPS_EXAMPLES', "Yönlendirme örnekleri");
+define('_TR_URLMAPPER_MAPS_EXAMPLES_1', "ürünler");
+define('_TR_URLMAPPER_MAPS_EXAMPLES_2', "ürünler/{ürün}");
+define('_TR_URLMAPPER_MAPS_EXAMPLES_3', "ürünler/kategori/{kategori}");
+define('_TR_URLMAPPER_MAPS_EXAMPLES_4', "ürünler/kategori/ekle");
 define('_TR_URLMAPPER_SETTINGS_MAP_TO_USE', "Kullanılan haritalar");
 define('_TR_URLMAPPER_SETTINGS_MAP_TO_USE_BOTH', "Varsayılan haritaları ve özel haritalarımı yükle");
 define('_TR_URLMAPPER_SETTINGS_MAP_TO_USE_CORE', "Yalnızca varsayılan haritaları yükle");

Modified: branches/0.8/jaws/html/gadgets/UrlMapper/languages/zh.php
===================================================================
--- branches/0.8/jaws/html/gadgets/UrlMapper/languages/zh.php	2008-10-30 03:37:34 UTC (rev 9728)
+++ branches/0.8/jaws/html/gadgets/UrlMapper/languages/zh.php	2008-10-30 12:49:37 UTC (rev 9729)
@@ -15,20 +15,20 @@
 define('_ZH_URLMAPPER_MAP_NO_ACTIONS', "这个地图没有作用");
 
 /** Map editor strings */
-define('_ZH_URLMAPPER_EDITOR_MAP_ROUTE', "地图路线");
-define('_ZH_URLMAPPER_EDITOR_PARAM_NAME', "名称");
-define('_ZH_URLMAPPER_EDITOR_PARAM_TYPE', "类型");
-define('_ZH_URLMAPPER_EDITOR_PARAM_LENGTH', "长度");
-define('_ZH_URLMAPPER_EDITOR_PARAM_TYPE_CONSTANT', "常数");
-define('_ZH_URLMAPPER_EDITOR_PARAM_TYPE_STRING', "一行");
-define('_ZH_URLMAPPER_EDITOR_PARAM_TYPE_ANY', "文字字数");
-define('_ZH_URLMAPPER_EDITOR_PARAM_TYPE_NUM', "数字的");
-define('_ZH_URLMAPPER_EDITOR_EDITING', "编辑");
-define('_ZH_URLMAPPER_EDITOR_EXAMPLES', "路线示例");
-define('_ZH_URLMAPPER_EDITOR_EXAMPLES_1', "产品");
-define('_ZH_URLMAPPER_EDITOR_EXAMPLES_2', "产品/{product}");
-define('_ZH_URLMAPPER_EDITOR_EXAMPLES_3', "产品/分类/{category}");
-define('_ZH_URLMAPPER_EDITOR_EXAMPLES_4', "产品/分类/添加");
+define('_ZH_URLMAPPER_MAPS_MAP_ROUTE', "地图路线");
+define('_ZH_URLMAPPER_MAPS_PARAM_NAME', "名称");
+define('_ZH_URLMAPPER_MAPS_PARAM_TYPE', "类型");
+define('_ZH_URLMAPPER_MAPS_PARAM_LENGTH', "长度");
+define('_ZH_URLMAPPER_MAPS_PARAM_TYPE_CONSTANT', "常数");
+define('_ZH_URLMAPPER_MAPS_PARAM_TYPE_STRING', "一行");
+define('_ZH_URLMAPPER_MAPS_PARAM_TYPE_ANY', "文字字数");
+define('_ZH_URLMAPPER_MAPS_PARAM_TYPE_NUM', "数字的");
+define('_ZH_URLMAPPER_MAPS_EDITING', "编辑");
+define('_ZH_URLMAPPER_MAPS_EXAMPLES', "路线示例");
+define('_ZH_URLMAPPER_MAPS_EXAMPLES_1', "产品");
+define('_ZH_URLMAPPER_MAPS_EXAMPLES_2', "产品/{product}");
+define('_ZH_URLMAPPER_MAPS_EXAMPLES_3', "产品/分类/{category}");
+define('_ZH_URLMAPPER_MAPS_EXAMPLES_4', "产品/分类/添加");
 
 /** Properties **/
 define('_ZH_URLMAPPER_SETTINGS_MAP_TO_USE', "地图使用");

Modified: branches/0.8/jaws/html/gadgets/UrlMapper/resources/script.js
===================================================================
--- branches/0.8/jaws/html/gadgets/UrlMapper/resources/script.js	2008-10-30 03:37:34 UTC (rev 9728)
+++ branches/0.8/jaws/html/gadgets/UrlMapper/resources/script.js	2008-10-30 12:49:37 UTC (rev 9729)
@@ -4,6 +4,7 @@
  * @category   Ajax
  * @package    UrlMapper
  * @author     Pablo Fischer <pablo at pablo.com.mx>
+ * @author     Ali Fazelzadeh <afz at php.net>
  * @copyright  2006-2008 Jaws Development Group
  * @license    http://www.gnu.org/copyleft/lesser.html
  */
@@ -83,7 +84,7 @@
     while(combo.options.length != 0) {
         combo.options[0] = null;
     }
-    var aliases = urlMapperSync.getaliases();
+    var aliases = urlmapperSync.getaliases();
     if (aliases != false) {
         var i =0;
         aliases.each(function(value, index) {  
@@ -110,7 +111,7 @@
  */
 function editAlias(id)
 {
-    var alias = urlMapperSync.getalias(id);
+    var alias = urlmapperSync.getalias(id);
     if (alias != false) {
         $('type').selectedIndex = 0;
         updateLinkType('custom');
@@ -127,9 +128,9 @@
 {
     var urlField = ($('type').value) == 'internal' ? 'internal_url' : 'custom_url';
     if ($('alias_id').value == '-') {
-        urlMapperAsync.addalias($('alias').value, $(urlField).value);
+        urlmapperAsync.addalias($('alias').value, $(urlField).value);
     } else {
-        urlMapperAsync.updatealias($('alias_id').value, $('alias').value, $(urlField).value);
+        urlmapperAsync.updatealias($('alias_id').value, $('alias').value, $(urlField).value);
     }      
 }
 
@@ -140,7 +141,7 @@
 {
     var aliasCombo = $('alias-combo');
     if (aliasCombo.selectedIndex != -1) {
-        urlMapperAsync.deletealias(aliasCombo.value);
+        urlmapperAsync.deletealias(aliasCombo.value);
     } 
 }
 
@@ -156,7 +157,7 @@
     }
     
     if (combo.value != '-NONE-') {
-        var internalLinks = urlMapperSync.getinternallinks(combo.value);
+        var internalLinks = urlmapperSync.getinternallinks(combo.value);
         if (internalLinks != false) {
             internalLinks.each(function(value, index) {  
                 var op = new Option(value['title'], value['url']);
@@ -192,7 +193,7 @@
  */
 function updateSettings(form)
 {
-    urlMapperAsync.updatesettings(form.elements['enabled'].value,
+    urlmapperAsync.updatesettings(form.elements['enabled'].value,
                                   form.elements['use_aliases'].value,
                                   form.elements['to_use'].value,
                                   form.elements['extension'].value);
@@ -201,130 +202,82 @@
 /**
  * Adds a new map
  */
-function addMap(gadget, actionName)
+function addMap2(gadget, actionName)
 {
-    urlMapperAsync.addmap(gadget, actionName, $('map_route').value, $('map_reg').value);
+    urlmapperAsync.addmap(gadget, actionName, $('map_route').value, $('map_reg').value);
 }
 
 /**
  * Updates a map
  */
-function updateMap(gadget, actionName, extraParam)
+function updateMap2(gadget, actionName, extraParam)
 {
-    urlMapperAsync.updatemap(extraParam, $('map_route').value, $('map_reg').value);
+    urlmapperAsync.updatemap(extraParam, $('map_route').value, $('map_reg').value);
 }
 
 /**
- * Deletes a map
+ * Prepares the UI to add a map
  */
-function deleteMap(gadget, actionName, mapID)
+function addMap(element, mid)
 {
-    urlMapperAsync.deletemap(mapID);
+    selectedMap = null;
+    $('legend_title').innerHTML = addMap_title;
+
+    unselectDataGridRow();
+
+    showWorkingNotification();
+    var mapInfo = urlmapperSync.getmap(selectedMap);
+    $('map_route').value  = mapInfo['map'];
+    $('map_regexp').value = mapInfo['regexp'];
+    hideWorkingNotification();
 }
 
 /**
- * Prepares the UI to add/edit a map
+ * Prepares the UI to edit a map
  */
-function mapEditor(gadget, actionName, actionToDo, extraParam)
+function editMap(element, mid)
 {
-    
-    //Do some changes..
-    $('gadget_name').innerHTML = gadget;
-    $('gadget_action').innerHTML = actionName;    
-    //Show the cancel stuff
-    $('cancel_map').style.display = 'inline';
-    $('cancel_map').onclick = function() {
-        showActionMaps(gadget, actionName);
-    }
+    selectedMap = mid;
+    $('legend_title').innerHTML = editMap_title;
 
-    $('save_map').style.display = 'inline';
-    if (actionToDo == 'newMap') {
-        var mapRoute = urlMapperSync.getcustommap(extraParam);
-        $('save_map').onclick = function() {
-            addMap(gadget, actionName);
-        }
-        $('map_route').value = gadget.toLowerCase() + '/' + actionName.toLowerCase();
-        $('map_reg').value = mapRoute['regexp'];
-    } else {
-        var mapRoute = urlMapperSync.getcustommap(extraParam);
-        if (mapRoute != false) {
-          $('map_route').value = mapRoute['map'];
-          $('map_reg').value = mapRoute['regexp'];
-          $('save_map').onclick = function() {
-              updateMap(gadget, actionName, extraParam);
-          }
-        }
-    }
+    selectDataGridRow(element.parentNode.parentNode);
 
+    showWorkingNotification();
+    var mapInfo = urlmapperSync.getmap(selectedMap);
+    $('map_route').value  = mapInfo['map'];
+    $('map_regexp').value = mapInfo['regexp'];
+    hideWorkingNotification();
 }
 
 /**
+ * Deletes a map
+ */
+function deleteMap(element, mid)
+{
+    selectDataGridRow(element.parentNode.parentNode);
+    if (confirm(confirmMapDelete)) {
+        urlmapperAsync.deletemap(mid);
+    }
+    unselectDataGridRow();
+}
+
+/**
  * Prepares a datagrid with maps of each action
  */
-function showActionMaps(gadget, actionName)
+function showActionMaps()
 {
-    $('body_map_grid').innerHTML = '';
+    if (jawsTrim($('gadgets_combo').value) == '' ||
+        jawsTrim($('actions_combo').value) == '') return;
+
+    resetGrid('maps_datagrid', '');
+    showWorkingNotification();
     //Get maps of this action and gadget
-    var maps = urlMapperSync.getmapsofaction(actionName, gadget);
-    counter = 0;
-    if (maps != false) {
-        maps.each(function(value, index) {  
-            if (value['map'] != undefined) {
-                var row  = document.createElement('tr');
-                var col  = document.createElement('td');
-                
-                var textNode  = document.createTextNode(value['map'] + '  ');
-                col.appendChild(textNode);
-                               
-                if (counter % 2 == 0) {
-                    row.style.backgroundColor = evenColor;
-                } else {
-                    row.style.backgroundColor = oddColor;
-                }
-                row.appendChild(col);
-                
-                var actionsCol = document.createElement('td');
-                actionsCol.align = 'center';
-                row.appendChild(actionsCol);
-                
-                if (value['custom'] == true) {
-                    var editLink = createImageLink(editStock, 'javascript: mapEditor("' + gadget + '", "' + actionName + 
-                                                   '", "editMap", ' + value['id'] + ')', editMsg, true);
-                    var deleteLink = createImageLink(deleteStock, 'javascript: deleteMap("' + gadget + '", "' + actionName + 
-                                                     '", ' + value['id'] + ')', deleteMsg);
-                    
-                    actionsCol.appendChild(editLink);
-                    actionsCol.appendChild(deleteLink);                   
-                } else {
-                    var addLink = createImageLink(addStock, 'javascript: mapEditor("' + gadget + '", "' + actionName + 
-                                                   '", "newMap", ' + value['id'] + ')', addMsg, true);
-                    actionsCol.appendChild(addLink);
-                }
-                
-                $('body_map_grid').appendChild(row);
-                counter++;
-            }
-        });
-    } else {
-        var row  = document.createElement('tr');
-        var col  = document.createElement('td');
-        row.style.backgroundColor = evenColor;
-        col.innerHTML = noMapsMsg;
-        col.colSpan = 2;
-        col.align  = 'center';
-        row.appendChild(col);
+    var result = urlmapperSync.getmapsofaction($('gadgets_combo').value, $('actions_combo').value);
+    resetGrid('maps_datagrid', result);
+    hideWorkingNotification();
 
-        $('body_map_grid').appendChild(row);
-    }
-    $('save_map').style.display = 'inline';
-    $('cancel_map').style.display = 'inline';
-
     $('map_route').value = '';
-    $('map_reg').value = '';
-
-    $('save_map').onclick = function() {
-        addMap(gadget, actionName);
-    }
+    $('map_regexp').value = '';
 }
 
 /**
@@ -332,14 +285,11 @@
  */
 function rebuildActionCombo()
 {
-    while($('actions').options.length != 0) {
-        $('actions').options[0] = null;
-    }
+    $('actions_combo').options.length = 0;
     fillActionCombo();
-    //$('work_area').innerHTML = '';
     $('save_map').style.display = 'none';
     $('cancel_map').style.display = 'none';
-    $('body_map_grid').innerHTML = '';
+    resetGrid('maps_datagrid', '');
 }
 
 /**
@@ -349,7 +299,7 @@
 {
     showWorkingNotification();
     var selectedGadget = $('gadgets_combo').value;
-    var actions        = urlMapperSync.getgadgetactions(selectedGadget);
+    var actions        = urlmapperSync.getgadgetactions(selectedGadget);
 
     var counter = 0;
     actions.each(function(value, index) {
@@ -361,25 +311,56 @@
         } else {
             op.style.backgroundColor = oddColor;
         }
-        $('actions').options[$('actions').options.length] = op;    
+        $('actions_combo').options[$('actions_combo').options.length] = op;    
         counter++;
     });
-    $('actions').onclick = function() {
-        showActionMaps($('gadgets_combo').value, this.value);
-    }
     hideWorkingNotification();
 }
 
-var urlMapperAsync = new urlmapperadminajax(UrlMapperCallback);
-urlMapperAsync.serverErrorFunc = Jaws_Ajax_ServerError;
+/**
+ * Select DataGrid row
+ *
+ */
+function selectDataGridRow(rowElement)
+{
+    if (selectedRow) {
+        selectedRow.style.backgroundColor = selectedRowColor;
+    }
+    selectedRowColor = rowElement.style.backgroundColor;
+    rowElement.style.backgroundColor = '#ffffcc';
+    selectedRow = rowElement;
+}
 
-var urlMapperSync  = new urlmapperadminajax();
-urlMapperSync.serverErrorFunc = Jaws_Ajax_ServerError;
+/**
+ * Unselect DataGrid row
+ *
+ */
+function unselectDataGridRow()
+{
+    if (selectedRow) {
+        selectedRow.style.backgroundColor = selectedRowColor;
+    }
+    selectedRow = null;
+    selectedRowColor = null;
+}
 
+var urlmapperAsync = new urlmapperadminajax(UrlMapperCallback);
+urlmapperAsync.serverErrorFunc = Jaws_Ajax_ServerError;
+
+var urlmapperSync  = new urlmapperadminajax();
+urlmapperSync.serverErrorFunc = Jaws_Ajax_ServerError;
+
 var evenColor = '#fff';
 var oddColor  = '#edf3fe';
 
+//Current map
+var selectedMap = null;
+
 var cacheMapTemplate = null;
 var cacheEditorMapTemplate = null;
 
 var aliasesComboDiv = null;
+
+//Which row selected in DataGrid
+var selectedRow = null;
+var selectedRowColor = null;

Modified: branches/0.8/jaws/html/gadgets/UrlMapper/schema/schema.xml
===================================================================
--- branches/0.8/jaws/html/gadgets/UrlMapper/schema/schema.xml	2008-10-30 03:37:34 UTC (rev 9728)
+++ branches/0.8/jaws/html/gadgets/UrlMapper/schema/schema.xml	2008-10-30 12:49:37 UTC (rev 9729)
@@ -4,118 +4,112 @@
  <name><variable>database</variable></name>
 
  <table>
-  <name><variable>table_prefix</variable>custom_maps</name>
-  <declaration>
+    <name><variable>table_prefix</variable>url_maps</name>
+    <was><variable>table_prefix</variable>custom_maps</was>
+    <declaration>
 
-   <field>
-    <name>id</name>
-    <type>integer</type>
-    <notnull>true</notnull>
-    <autoincrement>true</autoincrement>
-   </field>
+        <field>
+            <name>id</name>
+            <type>integer</type>
+            <notnull>true</notnull>
+            <autoincrement>true</autoincrement>
+        </field>
 
-   <field>
-    <name>gadget</name>
-    <type>text</type>
-    <length>32</length>
-    <notnull>true</notnull>
-    <default></default>
-   </field>
+        <field>
+            <name>gadget</name>
+            <type>text</type>
+            <length>32</length>
+            <notnull>true</notnull>
+            <default></default>
+        </field>
 
-   <field>
-    <name>gadget_action</name>
-    <was>action</was>
-    <type>text</type>
-    <length>120</length>
-    <notnull>true</notnull>
-    <default></default>
-   </field>
+        <field>
+            <name>action</name>
+            <was>gadget_action</was>
+            <type>text</type>
+            <length>120</length>
+            <notnull>true</notnull>
+            <default></default>
+        </field>
 
-   <field>
-    <name>map</name>
-    <type>text</type>
-    <length>120</length>
-    <notnull>true</notnull>
-    <default></default>
-   </field>
+        <field>
+            <name>map</name>
+            <type>text</type>
+            <length>120</length>
+            <notnull>true</notnull>
+            <default></default>
+        </field>
 
-   <field>
-    <name>script_file</name>
-    <type>text</type>
-    <length>10</length>
-    <notnull>true</notnull>
-    <default>index.php</default>
-   </field>
-
-   <field>
-     <name>secret_key</name>
-     <type>text</type>
-     <length>48</length>
-     <notnull>true</notnull>
-     <default></default>
-   </field>
+        <field>
+            <name>regexp</name>
+            <type>text</type>
+            <length>120</length>
+            <notnull>true</notnull>
+            <default></default>
+        </field>
    
-   <field>
-     <name>regexp</name>
-     <type>text</type>
-     <length>120</length>
-     <notnull>true</notnull>
-     <default></default>
-   </field>
-   
-   <field>
-     <name>custom</name>
-     <type>boolean</type>
-     <default>false</default>
-   </field>
+        <field>
+            <name>script</name>
+            <was>script_file</was>
+            <type>text</type>
+            <length>10</length>
+            <notnull>true</notnull>
+            <default>index.php</default>
+        </field>
 
-  </declaration>
+        <field>
+            <name>custom</name>
+            <type>boolean</type>
+            <default>false</default>
+        </field>
+
+    </declaration>
  </table>
 
  <table>
-  <name><variable>table_prefix</variable>url_aliases</name>
-  <declaration>
+    <name><variable>table_prefix</variable>url_aliases</name>
+    <declaration>
 
-   <field>
-    <name>id</name>
-    <type>integer</type>
-    <notnull>true</notnull>
-    <autoincrement>true</autoincrement>
-   </field>
+        <field>
+            <name>id</name>
+            <type>integer</type>
+            <notnull>true</notnull>
+            <autoincrement>true</autoincrement>
+        </field>
 
-   <field>
-    <name>real_url</name>
-    <type>text</type>
-    <length>120</length>
-    <notnull>true</notnull>
-    <default></default>
-   </field>
+        <field>
+            <name>real_url</name>
+            <type>text</type>
+            <length>120</length>
+            <notnull>true</notnull>
+            <default></default>
+        </field>
 
-   <field>
-    <name>alias_url</name>
-    <type>text</type>
-    <length>120</length>
-    <notnull>true</notnull>
-    <default></default>
-   </field>
+        <field>
+            <name>alias_url</name>
+            <type>text</type>
+            <length>120</length>
+            <notnull>true</notnull>
+            <default></default>
+        </field>
 
-   <field>
-     <name>alias_hash</name>
-     <type>text</type>
-     <length>32</length>
-     <notnull>true</notnull>
-     <default></default>
-   </field>
+        <field>
+            <name>alias_hash</name>
+            <type>text</type>
+            <length>32</length>
+            <notnull>true</notnull>
+            <default></default>
+        </field>
 
-   <index>
-     <name><variable>table_prefix</variable>url_aliases_hash</name>
-     <unique>true</unique>
-     <field>
-       <name>alias_hash</name>
-     </field>
-   </index>
+        <index>
+            <name><variable>table_prefix</variable>url_aliases_hash</name>
+            <unique>true</unique>
+            <field>
+                <name>alias_hash</name>
+            </field>
+        </index>
 
-  </declaration>
+        </declaration>
  </table>
 
 </database>

Modified: branches/0.8/jaws/html/gadgets/UrlMapper/templates/Maps.html
===================================================================
--- branches/0.8/jaws/html/gadgets/UrlMapper/templates/Maps.html	2008-10-30 03:37:34 UTC (rev 9728)
+++ branches/0.8/jaws/html/gadgets/UrlMapper/templates/Maps.html	2008-10-30 12:49:37 UTC (rev 9729)
@@ -1,15 +1,5 @@
 <!-- BEGIN UrlMapper -->
 {menubar}
-<script type="text/javascript">
-  var noMapsMsg    = "{noMapsMsg}";
-  var addMsg       = "{addMsg}";
-  var editMsg      = "{editMsg}";
-  var deleteMsg    = "{deleteMsg}";
-  var noActionsMsg = "{noActionsMsg}";
-  var addStock     = "{addStock}";
-  var editStock    = "{editStock}";
-  var deleteStock  = "{deleteStock}";
-</script>
 <table style="width: 100%; border: 0px solid #ccc; padding: 0px; border-spacing: 0.1px;">
   <!-- big work area -->
   <tr>
@@ -31,30 +21,27 @@
     <td style="width: 230px;" valign="top">
       <fieldset>
       <legend id="legend_title">{legend_title}</legend>
-        <form id="editor_form" name="editor_form" action="{base_script}" method="post">
-            <label for="map_route">{map_route}:</label><br/>{map_route_entry}<br />
-            <label for="map_reg">{map_reg}:</label><br/>{map_reg_entry}<br />
-        </form>
+        <label for="map_route">{map_route}:</label><br/>{map_route_entry}<br />
+        <label for="map_regexp">{map_regexp}:</label><br/>{map_regexp_entry}<br />
+        <div id="buttons">{cancel_map}{save_map}</div>
       </fieldset>
-      <div id="map_example">
-      {examples}<br />
-      <ul>
-      <!-- BEGIN examples -->
-        <li>{map_example}</li>
-      <!-- END examples -->
-      </ul>
-      </div>
     </td>
   </tr>
 </table>
-<table style="width: 100%;">
-  <tr>
-    <td id="buttons">
-      {cancel_map}{add_map}{save_map}
-    </td>
-  </tr>
-</table>
 <script type="text/javascript">
-fillActionCombo();
+  var noMapsMsg     = "{noMapsMsg}";
+  var addMsg        = "{addMsg}";
+  var editMsg       = "{editMsg}";
+  var noActionsMsg  = "{noActionsMsg}";
+  var addMap_title     = "{addMap_title}";
+  var editMap_title    = "{editMap_title}";
+  var confirmMapDelete = "{confirmMapDelete}";
+  fillActionCombo();
+
+  $('maps_datagrid').objectName = urlmapperSync;
+  JawsDataGrid.name = 'maps_datagrid';
+  resetGrid('maps_datagrid', '');
+
+  $('legend_title').innerHTML = addMap_title;
 </script>
-<!-- END UrlMapper -->
+<!-- END UrlMapper -->
\ No newline at end of file



More information about the Jaws-commits mailing list