Changeset 2876
- Timestamp:
- 05/28/10 09:36:15 (14 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/inc/class.uiconfig.inc.php
r2866 r2876 185 185 186 186 if($appname=="admin") { 187 /* 188 * FCK editor to agree term 189 */ 190 include_once("news_admin/inc/fckeditor.php"); 191 $oFCKeditor = new FCKeditor('newsettings[agree_term]');//CreateObject('news_admin.fckeditor','newsettings[agree_term]'); 192 193 $webserver_url = $GLOBALS['phpgw_info']['server']['webserver_url']; 194 $webserver_url = ( !empty($webserver_url) ) ? $webserver_url : '/'; 195 196 if(strrpos($webserver_url,'/') === false || strrpos($webserver_url,'/') != (strlen($webserver_url)-1)) 197 $webserver_url .= '/'; 198 199 $oFCKeditor->BasePath = $webserver_url . 'news_admin/templates/default/fckeditor/'; 200 $oFCKeditor->ToolbarSet = 'Basic'; 201 $oFCKeditor->Value = isset($GLOBALS['phpgw_info']['server']['agree_term']) ? $GLOBALS['phpgw_info']['server']['agree_term'] : ''; 202 $t->set_var('agree_term_input',$oFCKeditor->Create()); 187 $t->set_var('agree_term_input', '<textarea name="newsettings[agree_term]" id="agree_term">' 188 . (isset($GLOBALS['phpgw_info']['server']['agree_term']) ? $GLOBALS['phpgw_info']['server']['agree_term'] : '') 189 . '</textarea>'); 203 190 } 204 191 $t->set_var('title',lang('Site Configuration')); -
trunk/admin/inc/class.uimainscreen.inc.php
r2802 r2876 23 23 { 24 24 25 $html = createObject('phpgwapi.html');25 //$html = createObject('phpgwapi.html'); 26 26 $section = addslashes($_REQUEST['section']); 27 27 $select_lang = addslashes($_REQUEST['select_lang']); … … 95 95 if (empty($section)) 96 96 { 97 $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); 98 //$GLOBALS['phpgw']->common->phpgw_header(); 99 //echo parse_navbar(); 97 100 98 $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); 99 //$GLOBALS['phpgw']->common->phpgw_header(); 100 //echo parse_navbar(); 101 102 103 $GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index')); 101 $GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index')); 104 102 $GLOBALS['phpgw']->template->set_var('tr_color',$GLOBALS['phpgw_info']['theme']['th_bg']); 105 103 $GLOBALS['phpgw']->template->set_var('value',' '); … … 140 138 $tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color); 141 139 $GLOBALS['phpgw']->template->set_var('tr_color',$tr_color); 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 ) )' 145 . '"><input type="button" name="cancel" value="'. lang('cancel') .'" onclick="ExpressoLivre.link( \'' . $GLOBALS[ 'phpgw' ] -> link( '/admin/index.php' ) . '\' )">'); 140 $GLOBALS['phpgw']->template->set_var('value', 141 '<input type="button" value="' 142 . lang('Edit') . '" onclick="ExpressoLivre.link( \'' 143 . $GLOBALS[ 'phpgw' ] -> link( '/index.php','menuaction=admin.uimainscreen.index' ) 144 . '\' + \'§ion=\' + escape( this.form.section.item( 1 ).value )' 145 . ' + \'&select_lang=\' + escape( this.form.select_lang.item( 1 ).value ) )' 146 . '">' 147 . '<input type="button" name="cancel" value="' 148 . lang('cancel') . '" onclick="ExpressoLivre.link( \'' 149 . $GLOBALS[ 'phpgw' ] -> link( '/admin/index.php' ) 150 . '\' )">' 151 ); 146 152 $GLOBALS['phpgw']->template->fp('rows','row_2',True); 147 153 } 148 154 else 149 155 { 150 $GLOBALS['phpgw']->db->query("SELECT content FROM phpgw_lang WHERE lang='$select_lang' AND message_id='$section" 156 $GLOBALS['phpgw']->template->set_block('message','edit','edit'); 157 $GLOBALS['phpgw']->template->set_block('message','edit_script','edit_script'); 158 159 $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin'); 160 161 $GLOBALS['phpgw']->db->query("SELECT content FROM phpgw_lang WHERE lang='$select_lang' AND message_id='$section" 151 162 . "_message'",__LINE__,__FILE__); 152 163 $GLOBALS['phpgw']->db->next_record(); 153 154 $current_message = $GLOBALS['phpgw']->db->f('content');155 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').'">';176 }177 else178 {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').'">';181 182 }183 184 $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');185 //$GLOBALS['phpgw']->common->phpgw_header();186 //echo parse_navbar();187 164 188 165 $GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index')); 189 166 $GLOBALS['phpgw']->template->set_var('select_lang',$select_lang); 190 167 $GLOBALS['phpgw']->template->set_var('section',$section); 191 $GLOBALS['phpgw']->template->set_var('tr_color',$GLOBALS['phpgw_info']['theme']['th_bg']); 192 $GLOBALS['phpgw']->template->set_var('value',' '); 193 $GLOBALS['phpgw']->template->fp('rows','row_2',True); 168 $GLOBALS['phpgw']->template->set_var('message', '<textarea name="message"></textarea>'); 194 169 195 $ tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);196 $GLOBALS['phpgw']->template-> set_var('tr_color',$tr_color);170 $GLOBALS['phpgw']->template->fp('scripts','edit_script',True); 171 $GLOBALS['phpgw']->template->fp('rows','edit',True); 197 172 198 199 $GLOBALS['phpgw']->template->set_var('value',$text_or_htmlarea); 200 201 202 203 $GLOBALS['phpgw']->template->fp('rows','row_2',True); 173 $GLOBALS['phpgw']->template->set_var( 'value', 174 '<input type="submit" name="submit" value="' 175 . lang('Save') . '">' 176 . '<input type="button" name="cancel" value="'. lang('cancel') 177 .'" onclick="ExpressoLivre.link( \'' 178 . $GLOBALS[ 'phpgw' ] -> link( '/index.php','menuaction=admin.uimainscreen.index' ) 179 . '\' )">' 180 ); 204 181 205 $tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);206 $GLOBALS['phpgw']->template->set_var('tr_color',$tr_color);207 $GLOBALS['phpgw']->template->set_var('value','<input type="submit" name="submit" value="' . lang('Save')208 . '"><input type="button" name="cancel" value="'. lang('cancel') .'" onclick="ExpressoLivre.link( \'' . $GLOBALS[ 'phpgw' ] -> link( '/index.php','menuaction=admin.uimainscreen.index' ) . '\' )">'.$htmlarea_button);209 182 $GLOBALS['phpgw']->template->fp('rows','row_2',True); 210 183 } -
trunk/admin/templates/classic/config.tpl
r2802 r2876 1 1 <!-- BEGIN header --> 2 2 <script> 3 function FCKeditor_OnComplete( editorInstance)3 function send_form( pForm ) 4 4 { 5 editorInstance.LinkedField.form.onsubmit = function( ) 5 ExpressoLivre.events.fire.onunload( ); 6 return ExpressoLivre.form( pForm ); 7 } 8 9 ExpressoLivre.events.onload( function( ) 10 { 11 CKEDITOR.replace( "agree_term", 6 12 { 7 document.getElementById( 'newsettings[agree_term]' ).value = FCKeditorAPI.GetInstance( editorInstance.Name ).GetHTML( ); 8 return ExpressoLivre.form( editorInstance.LinkedField.form ); 9 }; 10 } 13 toolbar : 14 [ 15 [ 'Styles', 'Format' ], 16 [ 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList' ] 17 ] 18 } ); 19 } ); 20 21 ExpressoLivre.events.onunload( function( ) 22 { 23 CKEDITOR.instances.agree_term.destroy( ); 24 } ); 11 25 </script> 12 <form method="POST" action="{action_url}" >26 <form method="POST" action="{action_url}" onsubmit="return send_form( this );"> 13 27 <table align="center" width="85%" callspacing="0" style="{ border: 1px solid #000000; }"> 14 28 <tr class="th"> … … 197 211 <td colspan="2" align="center"> 198 212 <input type="submit" name="submit" value="{lang_submit}"> 199 <input type=" submit" name="cancel" value="{lang_cancel}">213 <input type="button" name="cancel" value="{lang_cancel}" onclick="ExpressoLivre.link( '{cancel_button}' )" /> 200 214 <br> 201 215 </td> -
trunk/admin/templates/classic/mainscreen_message.tpl
r1362 r2876 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 send_form( this );"> 4 4 <table border="0" align="center" > 5 5 <input type="hidden" name="select_lang" value="{select_lang}"> -
trunk/admin/templates/default/config.tpl
r2802 r2876 1 1 <!-- BEGIN header --> 2 2 <script> 3 function FCKeditor_OnComplete( editorInstance)3 function send_form( pForm ) 4 4 { 5 editorInstance.LinkedField.form.onsubmit = function( ) 5 ExpressoLivre.events.fire.onunload( ); 6 return ExpressoLivre.form( pForm ); 7 } 8 9 ExpressoLivre.events.onload( function( ) 10 { 11 CKEDITOR.replace( "agree_term", 6 12 { 7 document.getElementById( 'newsettings[agree_term]' ).value = FCKeditorAPI.GetInstance( editorInstance.Name ).GetHTML( ); 8 return ExpressoLivre.form( editorInstance.LinkedField.form ); 9 }; 10 } 13 toolbar : 14 [ 15 [ 'Styles', 'Format' ], 16 [ 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList' ] 17 ] 18 } ); 19 } ); 20 21 ExpressoLivre.events.onunload( function( ) 22 { 23 CKEDITOR.instances.agree_term.destroy( ); 24 } ); 11 25 </script> 12 <form method="POST" action="{action_url}" >26 <form method="POST" action="{action_url}" onsubmit="return send_form( this );"> 13 27 <table align="center" width="85%" callspacing="0"> 14 28 <tr class="th"> -
trunk/admin/templates/default/mainscreen_message.tpl
r2802 r2876 1 1 <!-- BEGIN form --> 2 <div align="center">{error_message}</div> 3 <form method="POST" action="{form_action}" onsubmit="return ExpressoLivre.form( this );">2 {scripts} 3 <form method="POST" action="{form_action}" onsubmit="return send_form( this );"> 4 4 <table border="0" align="center" > 5 <input type="hidden" name="select_lang" value="{select_lang}">6 <input type="hidden" name="section" value="{section}">5 <input type="hidden" name="select_lang" value="{select_lang}"> 6 <input type="hidden" name="section" value="{section}"> 7 7 {rows} 8 8 </table> … … 36 36 </tr> 37 37 <!-- END row_2 --> 38 <!-- BEGIN edit --> 39 <tr > 40 <td colspan="2"> 41 <br /> 42 {message} 43 <br /> 44 </td> 45 </tr> 46 <!-- END edit --> 47 <!-- BEGIN edit_script --> 48 <script> 49 function send_form( pForm ) 50 { 51 ExpressoLivre.events.fire.onunload( ); 52 return ExpressoLivre.form( pForm ); 53 } 54 55 ExpressoLivre.events.onload( function( ) 56 { 57 CKEDITOR.replace( "message", 58 { 59 toolbar : 60 [ 61 [ 'Styles', 'Format' ], 62 [ 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList' ] 63 ], 64 width : 500 65 } ); 66 } ); 67 68 ExpressoLivre.events.onunload( function( ) 69 { 70 CKEDITOR.instances.message.destroy( ); 71 } ); 72 </script> 73 <!-- END edit_script --> -
trunk/phpgwapi/inc/class.common.inc.php
r2857 r2876 403 403 . '</script>'; 404 404 405 $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'ckeditor', 'ckeditor', NULL, true ); 405 406 $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'wz_dragdrop', 'wz_dragdrop', NULL, true ); 406 407 $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'expressoAjax', 'expressoAjax', NULL, true );
Note: See TracChangeset
for help on using the changeset viewer.