Changeset 2802 for trunk/admin
- Timestamp:
- 05/18/10 09:41:04 (14 years ago)
- Location:
- trunk/admin
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/inc/class.uiapplications.inc.php
r2691 r2802 282 282 if ($_POST['delete']) 283 283 { 284 return $this->delete(); 284 echo $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'java_script' ] .= "<script>ExpressoLivre.link( '{$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.delete&start=' )}{$start}&app_name={$app_name}' );</script>"; 285 exit; 285 286 } 286 287 … … 300 301 )); 301 302 302 $GLOBALS['phpgw']->redirect_link('/#index.php','menuaction=admin.uiapplications.get_list&start='.$start); 303 $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'java_script' ] .= "<script>ExpressoLivre.link( '{$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.get_list&start='.$start)}' );</script>"; 304 exit; 303 305 } 304 306 } … … 354 356 if ($GLOBALS['phpgw']->acl->check('applications_access',8,'admin')) 355 357 { 356 $GLOBALS['phpgw']->redirect_link('/ #');358 $GLOBALS['phpgw']->redirect_link('/'); 357 359 } 358 360 $app_name = get_var('app_name',array('POST','GET')); … … 365 367 $this->bo->delete($app_name); 366 368 } 367 $GLOBALS['phpgw']->redirect_link('/ #index.php','menuaction=admin.uiapplications.get_list&start='.$start);369 $GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiapplications.get_list&start='.$start); 368 370 } 369 371 -
trunk/admin/inc/class.uicategories.inc.php
r2686 r2802 418 418 unset($values); 419 419 } 420 } 421 if ($redirect_) 422 $GLOBALS['phpgw']->redirect_link('/#index.php',$link_data); 420 } 421 if ($redirect_) 422 { 423 $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'java_script' ] .= "<script>ExpressoLivre.link( '{$GLOBALS[ 'phpgw' ] -> link('/index.php',$link_data)}' );</script>"; 424 exit; 425 } 423 426 424 427 } … … 427 430 428 431 $this->set_langs(); 429 // if ExpressoMail 1.2 has been installed and enabled, show the plugin using AJAX.430 if($GLOBALS['phpgw_info']['server']['cal_expressoMail']) {431 $this->template_dir = 'calendar/templates/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['template_set'];432 $module_name = 'expressoMail'.(str_replace("1.","1_",$GLOBALS['phpgw_info']['server']['cal_expressoMail']));433 if($GLOBALS['phpgw_info']['user']['apps'][$module_name]){434 $ldap_manager = CreateObject('contactcenter.bo_ldap_manager');435 $_SESSION['phpgw_info']['expressomail']['user'] = $GLOBALS['phpgw_info']['user'];436 $_SESSION['phpgw_info']['expressomail']['user']['owner'] = $GLOBALS['phpgw_info']['user']['account_id'];437 $_SESSION['phpgw_info']['expressomail']['server'] = $GLOBALS['phpgw_info']['server'];438 $_SESSION['phpgw_info']['expressomail']['ldap_server'] = $ldap_manager ? $ldap_manager->srcs[1] : null;439 // Carrega todos scripts necessarios440 $scripts = "<script src='".$module_name."/js/connector.js' type='text/javascript'></script>".441 442 443 // Fim444 $this->template->set_var('scripts',$scripts);445 $this->template->set_var('template_set', $this->template_dir);446 }447 }448 // FIM if.432 // if ExpressoMail 1.2 has been installed and enabled, show the plugin using AJAX. 433 if($GLOBALS['phpgw_info']['server']['cal_expressoMail']) { 434 $this->template_dir = 'calendar/templates/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['template_set']; 435 $module_name = 'expressoMail'.(str_replace("1.","1_",$GLOBALS['phpgw_info']['server']['cal_expressoMail'])); 436 if($GLOBALS['phpgw_info']['user']['apps'][$module_name]){ 437 $ldap_manager = CreateObject('contactcenter.bo_ldap_manager'); 438 $_SESSION['phpgw_info']['expressomail']['user'] = $GLOBALS['phpgw_info']['user']; 439 $_SESSION['phpgw_info']['expressomail']['user']['owner'] = $GLOBALS['phpgw_info']['user']['account_id']; 440 $_SESSION['phpgw_info']['expressomail']['server'] = $GLOBALS['phpgw_info']['server']; 441 $_SESSION['phpgw_info']['expressomail']['ldap_server'] = $ldap_manager ? $ldap_manager->srcs[1] : null; 442 // Carrega todos scripts necessarios 443 $scripts = "<script src='".$module_name."/js/connector.js' type='text/javascript'></script>". 444 "<script type='text/javascript'>var DEFAULT_URL = '".$module_name."/controller.php?action=';</script> ". 445 "<script src='".$this->template_dir."/js/search.js' type='text/javascript'></script>"; 446 // Fim 447 $this->template->set_var('scripts',$scripts); 448 $this->template->set_var('template_set', $this->template_dir); 449 } 450 } 451 // FIM if. 449 452 450 453 $this->template->set_file(array('form' => 'category_form.tpl')); … … 567 570 if (!$this->cat_id || $_POST['cancel']) 568 571 { 569 $GLOBALS['phpgw']->redirect_link('/#index.php',$link_data); 572 $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'java_script' ] .= "<script>ExpressoLivre.link( '{$GLOBALS[ 'phpgw' ] -> link('/index.php',$link_data)}' );</script>"; 573 exit; 570 574 } 571 575 … … 580 584 $this->bo->delete($this->cat_id,False); 581 585 } 582 $GLOBALS['phpgw']->redirect_link('/#index.php',$link_data); 586 $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'java_script' ] .= "<script>ExpressoLivre.link( '{$GLOBALS[ 'phpgw' ] -> link('/index.php',$link_data)}' );</script>"; 587 exit; 583 588 } 584 589 $this->template->set_file(array('category_delete' => 'delete_cat.tpl')); -
trunk/admin/inc/class.uiconfig.inc.php
r2686 r2802 126 126 if(!$errors) 127 127 { 128 $GLOBALS['phpgw']->redirect_link('/#admin/'); 128 $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'java_script' ] .= "<script>ExpressoLivre.link( '{$GLOBALS[ 'phpgw' ] -> link('/admin/')}' );</script>"; 129 exit; 129 130 } 130 131 } -
trunk/admin/inc/class.uimainscreen.inc.php
r2703 r2802 24 24 25 25 $html = createObject('phpgwapi.html'); 26 $section = addslashes($_ POST['section']);27 $select_lang = addslashes($_ POST['select_lang']);26 $section = addslashes($_REQUEST['section']); 27 $select_lang = addslashes($_REQUEST['select_lang']); 28 28 $message = addslashes($_POST['message']); 29 29 … … 41 41 $acl_ok['loginhelp'] = True; 42 42 } 43 if ($_POST['cancel'] && !isset($_POST['message']) || 44 43 44 if ($_POST['cancel'] && !isset($_POST['message']) || !count($acl_ok) || $_POST['submit'] && !isset($acl_ok[$section])) 45 45 { 46 46 $GLOBALS['phpgw']->redirect_link('/admin/index.php'); … … 56 56 $GLOBALS['phpgw']->db->query("DELETE FROM phpgw_lang WHERE message_id='$section" . "_message' AND app_name='" 57 57 . "$section' AND lang='$select_lang'",__LINE__,__FILE__); 58 58 59 $GLOBALS['phpgw']->db->query("INSERT INTO phpgw_lang (message_id,app_name,lang,content)VALUES ('$section" . "_message','$section','$select_lang','" 59 60 . $message . "')",__LINE__,__FILE__); 60 $feedback_message = '<center>'.lang('message has been updated').'</center>'; 61 62 $section = '';61 62 $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'java_script' ] .= "<script>ExpressoLivre.link( '{$GLOBALS[ 'phpgw' ] -> link( '/index.php','menuaction=admin.uimainscreen.index' ) }§ion={$section}&saved=true' );</script>"; 63 exit; 63 64 } 64 65 if ($_POST['cancel']) // back to section/lang-selection … … 86 87 } 87 88 88 89 90 89 if ( array_key_exists( 'saved', $_GET ) && $_GET[ 'saved' ] == 'true' ) 90 { 91 $feedback_message = '<center>'.lang('message has been updated').'</center>'; 92 $section = ''; 93 } 94 91 95 if (empty($section)) 92 96 { … … 126 130 { 127 131 $select_section .= ' <option value="'.$key.'"'. 128 ($key == $_ POST['section'] ? ' selected' : '') . '>' .132 ($key == $_REQUEST['section'] ? ' selected' : '') . '>' . 129 133 ($key == 'mainscreen' ? lang('Main screen') : lang($key)) . "</option>\n"; 130 134 } … … 136 140 $tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color); 137 141 $GLOBALS['phpgw']->template->set_var('tr_color',$tr_color); 138 $GLOBALS['phpgw']->template->set_var('value','<input type="submit" value="' . lang('Edit') 142 $GLOBALS['phpgw']->template->set_var('value','<input type="button" value="' . lang('Edit') 143 . '" onclick="ExpressoLivre.link( \'' . $GLOBALS[ 'phpgw' ] -> link( '/index.php','menuaction=admin.uimainscreen.index' ) 144 . '\' + \'§ion=\' + escape( this.form.section.item( 1 ).value ) + \'&select_lang=\' + escape( this.form.select_lang.item( 1 ).value ) )' 139 145 . '"><input type="button" name="cancel" value="'. lang('cancel') .'" onclick="ExpressoLivre.link( \'' . $GLOBALS[ 'phpgw' ] -> link( '/admin/index.php' ) . '\' )">'); 140 146 $GLOBALS['phpgw']->template->fp('rows','row_2',True); … … 148 154 $current_message = $GLOBALS['phpgw']->db->f('content'); 149 155 150 if($_POST['htmlarea']) 151 { 152 $text_or_htmlarea=$html->htmlarea('message',stripslashes($current_message)); 153 $htmlarea_button='<input type="submit" name="no-htmlarea" onclick="self.location.href=\''.$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index&htmlarea=true').'\'" value="'.lang('disable WYSIWYG-editor').'">'; 156 if($_REQUEST['htmlarea']) 157 { 158 //$text_or_htmlarea=$html->htmlarea('message',stripslashes($current_message)); 159 160 include_once("news_admin/inc/fckeditor.php"); 161 $oFCKeditor = new FCKeditor( 'message' ); 162 163 $webserver_url = $GLOBALS['phpgw_info']['server']['webserver_url']; 164 $webserver_url = ( !empty($webserver_url) ) ? $webserver_url : '/'; 165 166 if(strrpos($webserver_url,'/') === false || strrpos($webserver_url,'/') != (strlen($webserver_url)-1)) 167 $webserver_url .= '/'; 168 169 $oFCKeditor->BasePath = $webserver_url . 'news_admin/templates/default/fckeditor/'; 170 $oFCKeditor->ToolbarSet = 'Basic'; 171 $oFCKeditor->Value = $current_message; 172 173 $text_or_htmlarea = $oFCKeditor->Create( ); 174 175 $htmlarea_button='<input type="button" name="no-htmlarea" onclick="ExpressoLivre.link( \''.$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index&htmlarea=true§ion=' . $section ) . '\');" value="'.lang('disable WYSIWYG-editor').'">'; 154 176 } 155 177 else 156 178 { 157 158 $htmlarea_button='<input type="submit" name="htmlarea" onclick="self.location.href=\''.$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index&htmlarea=true').'\'" value="'.lang('activate WYSIWYG-editor').'">';179 $text_or_htmlarea='<textarea name="message" style="width:100%; min-width:350px; height:300px;" wrap="virtual">' . stripslashes($current_message) . '</textarea>'; 180 $htmlarea_button='<input type="button" name="htmlarea" onclick="ExpressoLivre.link( \''.$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index&htmlarea=true§ion=' . $section ) . '\' );" value="'.lang('activate WYSIWYG-editor').'">'; 159 181 160 182 } … … 163 185 //$GLOBALS['phpgw']->common->phpgw_header(); 164 186 //echo parse_navbar(); 165 187 166 188 $GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index')); 167 189 $GLOBALS['phpgw']->template->set_var('select_lang',$select_lang); … … 184 206 $GLOBALS['phpgw']->template->set_var('tr_color',$tr_color); 185 207 $GLOBALS['phpgw']->template->set_var('value','<input type="submit" name="submit" value="' . lang('Save') 186 . '"><input type=" submit" name="cancel" value="'. lang('cancel') .'">'.$htmlarea_button);208 . '"><input type="button" name="cancel" value="'. lang('cancel') .'" onclick="ExpressoLivre.link( \'' . $GLOBALS[ 'phpgw' ] -> link( '/index.php','menuaction=admin.uimainscreen.index' ) . '\' )">'.$htmlarea_button); 187 209 $GLOBALS['phpgw']->template->fp('rows','row_2',True); 188 210 } -
trunk/admin/templates/classic/config.tpl
r1517 r2802 1 1 <!-- BEGIN header --> 2 <script> 3 function FCKeditor_OnComplete( editorInstance ) 4 { 5 editorInstance.LinkedField.form.onsubmit = function( ) 6 { 7 document.getElementById( 'newsettings[agree_term]' ).value = FCKeditorAPI.GetInstance( editorInstance.Name ).GetHTML( ); 8 return ExpressoLivre.form( editorInstance.LinkedField.form ); 9 }; 10 } 11 </script> 2 12 <form method="POST" action="{action_url}"> 3 13 <table align="center" width="85%" callspacing="0" style="{ border: 1px solid #000000; }"> -
trunk/admin/templates/default/application_form.tpl
r2703 r2802 2 2 {error} 3 3 <br> 4 <form action="{form_action}" method="POST" >4 <form action="{form_action}" method="POST" onsubmit="return ExpressoLivre.form( this );"> 5 5 {hidden_vars} 6 6 <div align="center"> … … 14 14 <tr> 15 15 <td nowrap> 16 <input type=" submit" name="save" value="{lang_save_button}"> 16 <input type="button" name="save" value="{lang_save_button}" onclick="this.type='submit'" /> 17 17 <input type="button" name="cancel" value="{lang_cancel_button}" onclick="ExpressoLivre.link( '{cancel_button}' )" /> 18 18 </td> 19 19 <td align="right"> 20 20 <!-- BEGIN delete_button --> 21 <input type=" submit" name="delete" value="{lang_delete_button}">21 <input type="button" name="delete" value="{lang_delete_button}" onclick="this.type='submit'" /> 22 22 <!-- END delete_button --> 23 23 </td> -
trunk/admin/templates/default/category_form.tpl
r2703 r2802 7 7 <center> 8 8 {message}<br> 9 <form name="edit_cat" action="{action_url}" method="POST" >9 <form name="edit_cat" action="{action_url}" method="POST" onsubmit="return ExpressoLivre.form( this );"> 10 10 <table border="0" width="80%" cellspacing="2" cellpadding="2"> 11 11 {hidden_vars} -
trunk/admin/templates/default/config.tpl
r2703 r2802 1 1 <!-- BEGIN header --> 2 <script> 3 function FCKeditor_OnComplete( editorInstance ) 4 { 5 editorInstance.LinkedField.form.onsubmit = function( ) 6 { 7 document.getElementById( 'newsettings[agree_term]' ).value = FCKeditorAPI.GetInstance( editorInstance.Name ).GetHTML( ); 8 return ExpressoLivre.form( editorInstance.LinkedField.form ); 9 }; 10 } 11 </script> 2 12 <form method="POST" action="{action_url}"> 3 13 <table align="center" width="85%" callspacing="0"> -
trunk/admin/templates/default/delete_cat.tpl
r2703 r2802 2 2 <!-- BEGIN form --> 3 3 <br> 4 <form method="POST" action="{action_url}" >4 <form method="POST" action="{action_url}" onsubmit="return ExpressoLivre.form( this );"> 5 5 {hidden_vars} 6 6 <table border="0" with="65%" cellpadding="2" cellspacing="2" align="center"> … … 17 17 <!-- BEGIN delete --> 18 18 <td align="center"> 19 <input type=" submit" name="confirm" value="{lang_yes}">19 <input type="button" name="confirm" value="{lang_yes}" onclick="this.type = 'submit'" /> 20 20 </td> 21 21 <td align="center"> … … 25 25 <!-- BEGIN done --> 26 26 <td align="center"> 27 <input type=" submit" name="cancel" value="{lang_ok}">27 <input type="button" name="cancel" value="{lang_ok}" onclick="this.type = 'submit'" /> 28 28 </td> 29 29 <!-- END done --> -
trunk/admin/templates/default/delete_common.tpl
r2703 r2802 2 2 <p> 3 3 <center> 4 <form action="{form_action}" method="POST" >4 <form action="{form_action}" method="POST" onsubmit="return ExpressoLivre.form( this );"> 5 5 {hidden_vars} 6 6 <table align="center" border="0" width="55%" cols="2"> -
trunk/admin/templates/default/mainscreen_message.tpl
r1362 r2802 1 1 <!-- BEGIN form --> 2 2 <div align="center">{error_message}</div> 3 <form method="POST" action="{form_action}" >3 <form method="POST" action="{form_action}" onsubmit="return ExpressoLivre.form( this );"> 4 4 <table border="0" align="center" > 5 5 <input type="hidden" name="select_lang" value="{select_lang}">
Note: See TracChangeset
for help on using the changeset viewer.