Changeset 2686


Ignore:
Timestamp:
05/03/10 10:43:25 (14 years ago)
Author:
rodsouza
Message:

Ticket #1058 - Removendo reload de alguns itens do 'admin'.

Location:
trunk
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/inc/class.uiaccess_history.inc.php

    r2419 r2686  
    140140                } 
    141141        } 
     142?> 
  • trunk/admin/inc/class.uiaccounts.inc.php

    r2 r2686  
    527527                                'hidden_vars' => '<input type="hidden" name="account_id" value="'.$_GET['account_id'].'">', 
    528528                                'yes'         => lang('Yes'), 
    529                                 'no'          => lang('No') 
     529                                'no'          => lang('No'), 
     530                                'no_button' => $GLOBALS[ 'phpgw' ] -> link( '/', 'menuaction=admin.uiaccounts.list_groups' ) 
    530531                        ); 
    531532                        $p->set_var($var); 
  • trunk/admin/inc/class.uiapplications.inc.php

    r2419 r2686  
    3434                        if ($GLOBALS['phpgw']->acl->check('applications_access',1,'admin')) 
    3535                        { 
    36                                 $GLOBALS['phpgw']->redirect_link('/index.php'); 
     36                                $GLOBALS['phpgw']->redirect_link('/#'); 
    3737                        } 
    3838                        $can_add    = !$GLOBALS['phpgw']->acl->check('applications_access',2,'admin'); 
     
    112112                        $GLOBALS['phpgw']->template->set_var('lang_enabled',lang('Enabled')); 
    113113 
    114                         $GLOBALS['phpgw']->template->set_var('new_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.add')); 
     114                        $GLOBALS['phpgw']->template->set_var('new_action',$GLOBALS['phpgw']->link('/','menuaction=admin.uiapplications.add')); 
    115115                        $GLOBALS['phpgw']->template->set_var('lang_note',lang('(To install new applications use<br><a href="setup/" target="setup">Setup</a> [Manage Applications] !!!)')); 
    116116                        $GLOBALS['phpgw']->template->set_var('lang_add',lang('add')); 
     
    123123                                $GLOBALS['phpgw']->template->set_var('name',$app['title']); 
    124124 
    125                                 $GLOBALS['phpgw']->template->set_var('edit',$can_edit ? '<a href="' . $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.edit&app_name=' . urlencode($app['name'])) . '&start='.$start.'"> ' . lang('Edit') . ' </a>' : '&nbsp;'); 
    126                                 $GLOBALS['phpgw']->template->set_var('delete',$can_delete ? '<a href="' . $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.delete&app_name=' . urlencode($app['name'])) . '&start='.$start.'"> ' . lang('Delete') . ' </a>' : '&nbsp;'); 
     125                                $GLOBALS['phpgw']->template->set_var('edit',$can_edit ? '<a href="' . $GLOBALS['phpgw']->link('/','menuaction=admin.uiapplications.edit&app_name=' . urlencode($app['name'])) . '&start='.$start.'"> ' . lang('Edit') . ' </a>' : '&nbsp;'); 
     126                                $GLOBALS['phpgw']->template->set_var('delete',$can_delete ? '<a href="' . $GLOBALS['phpgw']->link('/','menuaction=admin.uiapplications.delete&app_name=' . urlencode($app['name'])) . '&start='.$start.'"> ' . lang('Delete') . ' </a>' : '&nbsp;'); 
    127127 
    128128                                if ($app['status']) 
     
    162162                        if ($GLOBALS['phpgw']->acl->check('applications_access',2,'admin')) 
    163163                        { 
    164                                 $GLOBALS['phpgw']->redirect_link('/index.php'); 
     164                                $GLOBALS['phpgw']->redirect_link('/#'); 
    165165                        } 
    166166                        $start = get_var('start',array('POST','GET')); 
     
    174174                        if ($_POST['cancel']) 
    175175                        { 
    176                                 $GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiapplications.get_list&start='.$start); 
     176                                $GLOBALS['phpgw']->redirect_link('/#index.php','menuaction=admin.uiapplications.get_list&start='.$start); 
    177177                        } 
    178178 
     
    206206                                        )); 
    207207 
    208                                         $GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiapplications.get_list&start='.$start); 
     208                                        $GLOBALS['phpgw']->redirect_link('/#index.php','menuaction=admin.uiapplications.get_list&start='.$start); 
    209209                                        $GLOBALS['phpgw']->common->phpgw_exit(); 
    210210                                } 
     
    231231 
    232232                        $GLOBALS['phpgw']->template->set_var('hidden_vars','<input type="hidden" name="start" value="'.$start.'">'); 
    233                         $GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.add')); 
     233                        $GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/','menuaction=admin.uiapplications.add')); 
    234234 
    235235                        $this->display_row(lang('application name'),'<input name="n_app_name" value="' . $n_app_name . '">'); 
     
    255255 
    256256                        $GLOBALS['phpgw']->template->set_var('lang_save_button',lang('Add')); 
     257 
    257258                        $GLOBALS['phpgw']->template->set_var('lang_cancel_button',lang('Cancel')); 
     259                        $GLOBALS['phpgw']->template->set_var( 'cancel_button', $GLOBALS[ 'phpgw' ] -> link( '/', 'menuaction=admin.uiapplications.get_list' ) ); 
     260 
    258261                        $GLOBALS['phpgw']->template->pparse('phpgw_body','form'); 
    259262                } 
     
    263266                        if ($GLOBALS['phpgw']->acl->check('applications_access',4,'admin')) 
    264267                        { 
    265                                 $GLOBALS['phpgw']->redirect_link('/index.php'); 
     268                                $GLOBALS['phpgw']->redirect_link('/#'); 
    266269                        } 
    267270                        $app_name = get_var('app_name',array('POST','GET')); 
     
    274277                        if ($_POST['cancel']) 
    275278                        { 
    276                                 $GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiapplications.get_list&start='.$start); 
     279                                $GLOBALS['phpgw']->redirect_link('/#index.php','menuaction=admin.uiapplications.get_list&start='.$start); 
    277280                        } 
    278281                         
     
    297300                                        )); 
    298301 
    299                                         $GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiapplications.get_list&start='.$start); 
     302                                        $GLOBALS['phpgw']->redirect_link('/#index.php','menuaction=admin.uiapplications.get_list&start='.$start); 
    300303                                } 
    301304                        } 
     
    328331                        $GLOBALS['phpgw']->template->set_var('lang_status',lang('Status')); 
    329332                        $GLOBALS['phpgw']->template->set_var('lang_save_button',lang('Save')); 
     333 
    330334                        $GLOBALS['phpgw']->template->set_var('lang_cancel_button',lang('Cancel')); 
     335                        $GLOBALS['phpgw']->template->set_var( 'cancel_button', $GLOBALS[ 'phpgw' ] -> link( '/', 'menuaction=admin.uiapplications.get_list' ) ); 
     336 
    331337                        $GLOBALS['phpgw']->template->set_var('lang_delete_button',lang('Delete')); 
    332338 
     
    348354                        if ($GLOBALS['phpgw']->acl->check('applications_access',8,'admin')) 
    349355                        { 
    350                                 $GLOBALS['phpgw']->redirect_link('/index.php'); 
     356                                $GLOBALS['phpgw']->redirect_link('/#'); 
    351357                        } 
    352358                        $app_name = get_var('app_name',array('POST','GET')); 
     
    359365                                        $this->bo->delete($app_name); 
    360366                                } 
    361                                 $GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiapplications.get_list&start='.$start); 
     367                                $GLOBALS['phpgw']->redirect_link('/#index.php','menuaction=admin.uiapplications.get_list&start='.$start); 
    362368                        } 
    363369 
     
    373379 
    374380                        $GLOBALS['phpgw']->template->set_var('messages',lang('Are you sure you want to delete the application %1 ?',$GLOBALS['phpgw_info']['apps'][$app_name]['title'])); 
    375                         $GLOBALS['phpgw']->template->set_var('no',lang('No')); 
     381 
     382                        $GLOBALS['phpgw']->template->set_var( 'no', lang('No')); 
     383                        $GLOBALS['phpgw']->template->set_var( 'no_button', $GLOBALS[ 'phpgw' ] -> link( '/', 'menuaction=admin.uiapplications.get_list' ) ); 
     384 
    376385                        $GLOBALS['phpgw']->template->set_var('yes',lang('Yes')); 
    377386                        $GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.delete')); 
     
    385394                        if ($GLOBALS['phpgw']->acl->check('applications_access',16,'admin')) 
    386395                        { 
    387                                 $GLOBALS['phpgw']->redirect_link('/index.php'); 
     396                                $GLOBALS['phpgw']->redirect_link('/'); 
    388397                        } 
    389398                        if (!is_object($GLOBALS['phpgw']->hooks)) 
     
    393402                        $GLOBALS['phpgw']->hooks->register_all_hooks(); 
    394403                         
    395                         $GLOBALS['phpgw']->redirect_link('/admin/index.php'); 
     404                        $GLOBALS['phpgw']->redirect_link('/admin/'); 
    396405                } 
    397406        } 
  • trunk/admin/inc/class.uicategories.inc.php

    r2419 r2686  
    3838                        if ($GLOBALS['phpgw']->acl->check('global_categories_access',1,'admin')) 
    3939                        { 
    40                                 $GLOBALS['phpgw']->redirect_link('/index.php'); 
     40                                $GLOBALS['phpgw']->redirect_link( '/#' ); 
    4141                        } 
    4242 
     
    157157                        if ($_POST['add']) 
    158158                        { 
    159                                 $GLOBALS['phpgw']->redirect_link('/index.php',$link_data); 
     159                                $GLOBALS['phpgw']->redirect_link('/#index.php',$link_data); 
    160160                        } 
    161161 
    162162                        if ($_POST['done']) 
    163163                        { 
    164                                 $GLOBALS['phpgw']->redirect_link('/admin/index.php'); 
     164                                $GLOBALS['phpgw']->redirect_link( '/#admin/' ); 
    165165                        } 
    166166         
     
    204204                        $this->template->set_var('template_set',$this->template_dir); 
    205205 
     206                        $this->template->set_var( 'add_button', $GLOBALS[ 'phpgw' ] -> link( '/index.php', $link_data ) ); 
     207                        $this->template->set_var( 'done_button', $GLOBALS[ 'phpgw' ] -> link( '/admin/' ) ); 
     208 
    206209                        $link_data['menuaction'] = 'admin.uicategories.index'; 
    207210                        $this->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php',$link_data)); 
     
    370373                        if (!$this->acl_add && $cat_parent == 0 || !$this->acl_add_sub && $cat_parent != 0) 
    371374                        { 
    372                                 $GLOBALS['phpgw']->redirect_link('/index.php'); 
     375                                $GLOBALS['phpgw']->redirect_link( '/#' ); 
    373376                        } 
    374377                        if ($_POST['cancel'] || $this->cat_id && !$this->acl_edit || $this->cat_id && 
    375378                                (!$this->acl_add && $cat_parent == 0 || !$this->acl_add_sub && $cat_parent != 0)) 
    376379                        { 
    377                                 $GLOBALS['phpgw']->redirect_link('/index.php',$link_data); 
     380                                $GLOBALS['phpgw']->redirect_link('/#index.php',$link_data); 
    378381                        } 
    379382 
     
    417420                                        } 
    418421                                        if ($redirect_) 
    419                                                 $GLOBALS['phpgw']->redirect_link('/index.php',$link_data); 
     422                                                $GLOBALS['phpgw']->redirect_link('/#index.php',$link_data); 
    420423 
    421424                        } 
     
    447450                        $this->template->set_file(array('form' => 'category_form.tpl')); 
    448451 
     452                        $this->template->set_var( 'cancel_button', $GLOBALS[ 'phpgw' ] -> link( '/index.php', $link_data ) ); 
     453 
    449454                        if ($this->cat_id) 
    450455                        { 
     
    487492                                $link_data['menuaction'] = 'admin.uicategories.delete'; 
    488493 
    489                                 $this->template->set_var('delete','<form method="POST" action="' . $GLOBALS['phpgw']->link('/index.php',$link_data) 
    490                                         . '"><input type="submit" value="' . lang('Delete') .'"></form>'); 
     494                                $this->template->set_var( 'lang_delete', lang('Delete') ); 
     495                                $this->template->set_var( 'delete_button', $GLOBALS[ 'phpgw' ] -> link( '/index.php', $link_data ) ); 
    491496                        } 
    492497                        else 
     
    552557                        if (!$this->acl_delete) 
    553558                        { 
    554                                 $GLOBALS['phpgw']->redirect_link('/index.php'); 
     559                                $GLOBALS['phpgw']->redirect_link('/#'); 
    555560                        } 
    556561                        $link_data = array 
     
    562567                        if (!$this->cat_id || $_POST['cancel']) 
    563568                        { 
    564                                 $GLOBALS['phpgw']->redirect_link('/index.php',$link_data); 
     569                                $GLOBALS['phpgw']->redirect_link('/#index.php',$link_data); 
    565570                        } 
    566571 
     
    575580                                        $this->bo->delete($this->cat_id,False); 
    576581                                } 
    577                                 $GLOBALS['phpgw']->redirect_link('/index.php',$link_data); 
     582                                $GLOBALS['phpgw']->redirect_link('/#index.php',$link_data); 
    578583                        } 
    579584                        $this->template->set_file(array('category_delete' => 'delete_cat.tpl')); 
     585 
     586                        $this -> template -> set_var( 'no_button', $GLOBALS[ 'phpgw' ] -> link( '/index.php', $link_data ) ); 
    580587 
    581588                        if ($this->appname) 
  • trunk/admin/inc/class.uiconfig.inc.php

    r2419 r2686  
    2020                        if ($GLOBALS['phpgw']->acl->check('site_config_access',1,'admin')) 
    2121                        { 
    22                                 $GLOBALS['phpgw']->redirect_link('/index.php'); 
     22                                $GLOBALS['phpgw']->redirect_link('/#'); 
    2323                        } 
    2424 
     
    4747                                case '': 
    4848                                        /* This keeps the admin from getting into what is a setup-only config */ 
    49                                         $GLOBALS['phpgw']->redirect_link('/admin/index.php'); 
     49                                        $GLOBALS['phpgw']->redirect_link('/#admin/'); 
    5050                                        break; 
    5151                                default: 
     
    7272                        if ($_POST['cancel'] || $_POST['submit'] && $GLOBALS['phpgw']->acl->check('site_config_access',2,'admin')) 
    7373                        { 
    74                                 $GLOBALS['phpgw']->redirect_link('/admin/index.php'); 
     74                                $GLOBALS['phpgw']->redirect_link('/#admin/'); 
    7575                        } 
    7676 
     
    126126                                if(!$errors) 
    127127                                { 
    128                                         $GLOBALS['phpgw']->redirect_link('/admin/index.php'); 
     128                                        $GLOBALS['phpgw']->redirect_link('/#admin/'); 
    129129                                } 
    130130                        } 
     
    288288 
    289289                        $t->set_var('lang_submit', $GLOBALS['phpgw']->acl->check('site_config_access',2,'admin') ? lang('Cancel') : lang('Save')); 
     290 
    290291                        $t->set_var('lang_cancel', lang('Cancel')); 
     292                        $t->set_var( 'cancel_button', $GLOBALS[ 'phpgw' ] -> link( '/admin/' ) ); 
     293 
    291294                        $t->pfp('out','footer'); 
    292295                } 
  • trunk/admin/inc/class.uiserver.inc.php

    r2 r2686  
    356356                                        'messages' => lang('Are you sure you want to delete this server?'), 
    357357                                        'no' => lang('No'), 
     358                                        'no_button' => $GLOBALS[ 'phpgw' ] -> link( '/', 'menuaction=admin.uiserver.list_servers' ), 
    358359                                        'yes' => lang('Yes'), 
    359360                                )); 
  • trunk/admin/templates/default/application_form.tpl

    r2 r2686  
    1515   <td nowrap> 
    1616    <input type="submit" name="save" value="{lang_save_button}"> &nbsp; 
    17     <input type="submit" name="cancel" value="{lang_cancel_button}"> 
     17    <input type="button" name="cancel" value="{lang_cancel_button}" onclick="XLink( '{cancel_button}' )" /> 
    1818   </td> 
    1919   <td align="right">&nbsp; 
  • trunk/admin/templates/default/applications.tpl

    r2 r2686  
    2929  <tr> 
    3030   <td align="left" nobreak> 
    31     <form method="POST" action="{new_action}"> 
    32      <input type="submit" value="{lang_add}">  
    33     </form> 
     31    <input type="button" value="{lang_add}" onclick="XLink( '{new_action}' )" /> 
    3432   </td> 
    3533   <td> 
  • trunk/admin/templates/default/category_form.tpl

    r662 r2686  
    77<center> 
    88{message}<br> 
     9<form name="edit_cat" action="{action_url}" method="POST"> 
    910<table border="0" width="80%" cellspacing="2" cellpadding="2">  
    10 <form name="edit_cat" action="{actionurl}" method="POST"> 
    1111{hidden_vars} 
    1212        <tr class="th"> 
     
    6060        <input type="hidden" id="idgroup" name="idgroup" value="{cat_id_group}"> 
    6161        <td><input onclick="return verifyCatOwners('td_group')" type="submit" name="save" value="{lang_save}"></td> 
    62                 <td><form method="POST" action="{cancel_url}"><input type="submit" name="cancel" value="{lang_cancel}"></form></td> 
    63                 <td align="right">{delete}</td> 
     62                <td><input type="button" name="cancel" value="{lang_cancel}" onclick="XLink( '{cancel_button}' )" /></td> 
     63                <td align="right"><input type="button" name="delete" value="{lang_delete}" onclick="XLink( '{delete_button}' )" /></td> 
    6464        </tr> 
    6565</table> 
  • trunk/admin/templates/default/config.tpl

    r2640 r2686  
    236236    <td colspan="2" align="center"> 
    237237      <input type="submit" name="submit" value="{lang_submit}"> 
    238       <input type="submit" name="cancel" value="{lang_cancel}"> 
     238      <input type="button" name="cancel" value="{lang_cancel}" onclick="XLink( '{cancel_button}' )"> 
    239239                  <br> 
    240240    </td> 
  • trunk/admin/templates/default/delete_cat.tpl

    r2 r2686  
    2020                                </td> 
    2121                                <td align="center"> 
    22                                         <input type="submit" name="cancel" value="{lang_no}"> 
     22                                        <input type="button" name="cancel" value="{lang_no}" onclick="XLink( '{no_button}' )"> 
    2323                                </td> 
    2424<!-- END delete --> 
  • trunk/admin/templates/default/delete_common.tpl

    r2 r2686  
    88   <tr> 
    99    <td width="50%" align="center"> 
    10      <input type="submit" name="no" value="{no}"> 
     10     <input type="button" name="no" value="{no}" onclick="XLink( '{no_button}' )" > 
    1111    </td> 
    1212    <td width="50%" align="center"> 
  • trunk/admin/templates/default/listcats.tpl

    r2419 r2686  
    5757                        <tr valign="bottom" height="50"> 
    5858                                <td> 
    59                                         <form method="POST" action="{action_url}"> 
    60                                                 <input type="submit" name="add" value="{lang_add}"> &nbsp; 
    61                                                 <input type="submit" name="done" value="{lang_cancel}"> 
    62                                         </form> 
     59                                        <!form method="POST" action="{action_url}"> 
     60                                                <input type="button" name="add" value="{lang_add}" onclick="XLink( '{add_button}' )" /> &nbsp; 
     61                                                <input type="button" name="done" value="{lang_cancel}" onclick="XLink( '{done_button}' )" /> 
     62                                        <!/form> 
    6363                                </td> 
    6464                                <td colspan="5">&nbsp;</td> 
  • trunk/phpgwapi/inc/class.phpgw.inc.php

    r2439 r2686  
    166166                        else 
    167167                        { 
    168                                 Header("Location: $url"); 
     168                                Header("Location: {$url}"); 
    169169                                print("\n\n"); 
    170170                                exit; 
  • trunk/phpgwapi/inc/class.sessions.inc.php

    r1464 r2686  
    11761176                        { 
    11771177                                $webserver_url_count = strlen($GLOBALS['phpgw_info']['server']['webserver_url'])-1; 
    1178                                 if(substr($GLOBALS['phpgw_info']['server']['webserver_url'] ,$webserver_url_count,1) != '/' && $url_firstchar != '/') 
    1179                                 { 
    1180                                         $url = $GLOBALS['phpgw_info']['server']['webserver_url'] .'/'. $url; 
    1181                                 } 
    1182                                 else 
    1183                                 { 
    1184                                         $url = $GLOBALS['phpgw_info']['server']['webserver_url'] . $url; 
    1185                                 } 
     1178                                if ( ! ( substr($GLOBALS['phpgw_info']['server']['webserver_url'] ,$webserver_url_count,1) != '/' && $url_firstchar != '/' ) ) 
     1179                                        $url = substr( $url, 1 ); 
     1180 
     1181                                $url = "{$GLOBALS['phpgw_info']['server']['webserver_url']}/{$url}"; 
    11861182                        } 
    11871183 
  • trunk/phpgwapi/js/tools/xlink.js

    r2679 r2686  
    1111        function _click( _action, _cache ) 
    1212        { 
    13  
    1413                if ( _action.indexOf( window.location.host ) < 0 ) 
    1514                        _action = window.location.protocol + '//' + window.location.host + _action; 
Note: See TracChangeset for help on using the changeset viewer.