forked from extern/egroupware
Remove rte_features from preferences
This commit is contained in:
parent
e10905988a
commit
579b4f6923
@ -144,9 +144,7 @@ var et2_htmlarea = (function(){ "use strict"; return et2_inputWidget.extend([et2
|
||||
"insertdatetime advlist lists textcolor wordcount imagetools ",
|
||||
"colorpicker textpattern help paste code searchreplace tabfocus"
|
||||
],
|
||||
toolbar: "formatselect | fontselect fontsizeselect | bold italic strikethrough forecolor backcolor | "+
|
||||
"link | alignleft aligncenter alignright alignjustify | numlist "+
|
||||
"bullist outdent indent | removeformat | image",
|
||||
toolbar: et2_htmlarea.TOOLBAR_SIMPLE,
|
||||
block_formats: "Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;"+
|
||||
"Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre",
|
||||
font_formats: "Andale Mono=andale mono,times;Arial=arial,helvetica,"+
|
||||
@ -271,8 +269,7 @@ var et2_htmlarea = (function(){ "use strict"; return et2_inputWidget.extend([et2
|
||||
menubar: parseInt(rte_menubar) && this.menubar ? true : typeof rte_menubar != 'undefined' ? false : this.menubar
|
||||
};
|
||||
|
||||
var mode = this.mode || egw.preference('rte_features', 'common');
|
||||
switch (mode)
|
||||
switch (this.mode)
|
||||
{
|
||||
case 'simple':
|
||||
settings.toolbar = et2_htmlarea.TOOLBAR_SIMPLE;
|
||||
|
4
api/templates/default/css/htmlarea.css
Normal file
4
api/templates/default/css/htmlarea.css
Normal file
@ -0,0 +1,4 @@
|
||||
.tox.tox-tinymce .tox-mbtn {height: 16px; font-size: 11px;}
|
||||
.tox.tox-tinymce .tox-toolbar__group {padding: 0;}
|
||||
.tox.tox-tinymce .tox-tbtn {font-size: 11px;}
|
||||
.tox.tox-tinymce .tox-tbtn--bespoke .tox-tbtn__select-label{width: 4em;}
|
@ -16,7 +16,7 @@
|
||||
/*@import url("../../js/etemplate/lib/jsdifflib/diffview.css");*/
|
||||
/*@import url("../../../vendor/bower-asset/cropper/dist/cropper.min.css");*/
|
||||
/*@import url("css/flags.css");*/
|
||||
|
||||
/*@import url("css/htmlarea.css");*/
|
||||
/**
|
||||
* Top level
|
||||
*/
|
||||
@ -2993,4 +2993,4 @@ tr.disableIfNoEPL {
|
||||
opacity: 0.5;
|
||||
pointer-events: none;
|
||||
}
|
||||
.inactive_blur > * {opacity: 0.4; filter:blur(2px); pointer-events: none;}
|
||||
.inactive_blur > * {opacity: 0.4; filter:blur(2px); pointer-events: none;}
|
||||
|
@ -116,11 +116,10 @@ class preferences_hooks
|
||||
$GLOBALS['egw_info']['user']['preferences']['common']['rte_font_unit']);
|
||||
}
|
||||
$rte_toolbar_list = array (
|
||||
'undo', 'redo', 'formatselect', 'fontselect', 'fontsizeselect',
|
||||
'bold', 'italic', 'strikethrough', 'forecolor', 'backcolor',
|
||||
'undo', 'redo', 'bold', 'italic', 'strikethrough', 'forecolor', 'backcolor',
|
||||
'link', 'alignleft', 'aligncenter', 'alignright', 'alignjustify',
|
||||
'numlist', 'bullist', 'outdent', 'indent', 'ltr', 'rtl',
|
||||
'removeformat', 'code', 'image', 'searchreplace'
|
||||
'removeformat', 'code', 'image', 'searchreplace','formatselect', 'fontselect', 'fontsizeselect'
|
||||
);
|
||||
$rte_toolbar_selOptions = array();
|
||||
foreach ($rte_toolbar_list as $toolbar)
|
||||
@ -133,6 +132,14 @@ class preferences_hooks
|
||||
'app' => 'api'
|
||||
);
|
||||
}
|
||||
|
||||
if (!$GLOBALS['egw_info']['user']['preferences']['common']['rte_toolbar'])
|
||||
{
|
||||
$GLOBALS['egw']->preferences->add('common', 'rte_toolbar', 'fontselect,fontsizeselect,bold,italic,forecolor,backcolor,'.
|
||||
'alignleft,aligncenter,alignright,alignjustify,numlist,bullist'.
|
||||
',outdent,indent,link,image', 'user');
|
||||
$GLOBALS['egw']->preferences->save_repository(true);
|
||||
}
|
||||
// Settings array for this app
|
||||
$settings = array(
|
||||
array(
|
||||
@ -417,15 +424,6 @@ class preferences_hooks
|
||||
'admin' => '1',
|
||||
'default' => '1',
|
||||
),
|
||||
'rte_features' => array(
|
||||
'type' => 'select',
|
||||
'label' => 'Features of the editor',
|
||||
'name' => 'rte_features',
|
||||
'values' => array('simple'=>'simple','extended'=>'regular','advanced'=>'everything'),
|
||||
'help' => 'How many toolbar buttons are available',
|
||||
'admin' => false,
|
||||
'default'=> 'extended'
|
||||
),
|
||||
'rte_toolbar' => array(
|
||||
'type' => 'taglist',
|
||||
'label' => 'Enabled features in toolbar',
|
||||
|
Loading…
Reference in New Issue
Block a user