Ckeditor - dokoncan toolbar - vec - manj

This commit is contained in:
pero1203 2022-08-26 15:10:55 +02:00
parent 78fb906b56
commit e6e5ad9508
8 changed files with 1595 additions and 1524 deletions

View File

@ -206,6 +206,7 @@ lang('alternative_email_delete');
lang('srv_anketa_deleted_restore_confirm');
lang('srv_data_deleted_restore_confirm');
lang('more2');
lang('less2');
//LOKACIJA

View File

@ -1509,7 +1509,7 @@ function create_editor (id, focus) {
// Dodamo gumb vec
editor.addCommand("advanced_editor_show", {
exec: function(edt) {
advanced_editor_show();
$('#'+edt.id+'_toolbox').addClass('advanced');
}
});
@ -1519,6 +1519,19 @@ function create_editor (id, focus) {
name: "More",
});
// Dodamo gumb manj
editor.addCommand("advanced_editor_hide", {
exec: function(edt) {
$('#'+edt.id+'_toolbox').removeClass('advanced');
}
});
editor.ui.addButton('Less', {
label: lang['less2'],
command: 'advanced_editor_hide',
name: "Less",
});
//namestitev editorja za tekst pri obveščanju
if(gup('a') == 'alert' && focus == false){
CKEDITOR.config.width = 560;
@ -1663,7 +1676,7 @@ function editor_display (spremenljivka) {
// Dodamo gumb vec
editor.addCommand("advanced_editor_show", {
exec: function(edt) {
advanced_editor_show();
$('#'+edt.id+'_toolbox').addClass('advanced');
}
});
editor.ui.addButton('More', {
@ -1672,6 +1685,19 @@ function editor_display (spremenljivka) {
name: "More",
});
// Dodamo gumb manj
editor.addCommand("advanced_editor_hide", {
exec: function(edt) {
$('#'+edt.id+'_toolbox').removeClass('advanced');
}
});
editor.ui.addButton('Less', {
label: lang['less2'],
command: 'advanced_editor_hide',
name: "Less",
});
//v kolikor je default vrednost potem naredimo selectAll
var def = $('#naslov_'+spremenljivka).attr("default");
if( def == 1) {

View File

@ -954,12 +954,16 @@ function inline_load_editor (_this) {
}
}
// Prikazemo / skrijemo napredne gumbe za editor
function advanced_editor_show(){
/*$('#cke_43, #cke_47, #cke_51').show();
$('#cke_41').hide();*/
$('.cke_toolbar:nth-child(10)').hide();
$('.cke_toolbar:nth-child(12), .cke_toolbar:nth-child(13), .cke_toolbar:nth-child(14)').show();
// Prikazemo napredne gumbe za editor
function advanced_editor_show(editor_id){
$('#'+editor_id+'_toolbox').addClass('advanced');
}
// Skrijemo napredne gumbe za editor
function advanced_editor_hide(editor_id){
$('#'+editor_id+'_toolbox').removeClass('advanced');
}
function inline_load_editor_hotspot (_this, vre_id) {

View File

@ -25,19 +25,17 @@ CKEDITOR.editorConfig = function (config) {
config.toolbar = [
{name: 'source', items: ['Source']},
{name: 'clipboard', items: ['Undo', 'Redo', 'PasteText','RemoveFormat']},
{name: 'clipboard', items: ['Undo', 'Redo', 'PasteText']},
{name: 'font-type', items: ['Font']},
{name: 'font-size', items: ['FontSize']},
{name: 'basicstyles', items: ['Bold', 'Italic', 'Underline']},
{name: 'colors', items: ['TextColor', 'BGColor']},
{name: 'align', items: ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock']},
{name: 'list', items: ['NumberedList', 'BulletedList']},
{name: 'links', items: ['Link', 'Unlink', 'Image']},
{name: 'links', items: ['Link', 'Unlink', 'Image', 'SpecialChar']},
{name: 'other', items: ['HorizontalRule', 'Abbr']},
{name: 'more', items: ['More']},
'/',
{name: 'other', items: ['Scayt', 'Strike', 'SpecialChar']},
{name: 'vec', items:['Styles', 'Format', 'Outdent', 'Indent', 'HorizontalRule']},
{name: 'insert', items: ['CreateDiv', 'Table', 'IFrame', 'Youtube', 'Abbr']},
{name: 'less', items: ['Less']},
];
/*config.toolbar = [

View File

@ -2774,6 +2774,7 @@ $lang = array (
"SurveyMetaOnly" => "Prikaži survey samo meta adminom",
"other" => "Ostalo",
"more2" => "Več",
"less2" => "Manj",
"srv_analiza_info" => "Podatki",
"srv_analiza_stVprasanj" => "Vprašanj",
"srv_analiza_stVariable" => "Spremenljivk",

View File

@ -2748,6 +2748,7 @@ $lang = array (
"SurveyMetaOnly" => "Show survey to meta admins only",
"other" => "Other",
"more2" => "More",
"less2" => "Less",
"srv_analiza_info" => "Data",
"srv_analiza_stVprasanj" => "Questions",
"srv_analiza_stVariable" => "Variables",

File diff suppressed because it is too large Load Diff

View File

@ -29,18 +29,11 @@ div.button_holder.editor_button_holder{
}
.cke_toolbox span:nth-child(1),
.cke_toolbox span:nth-child(2),
.cke_toolbox span:nth-child(3),
.cke_toolbox span:nth-child(4),
.cke_toolbox span:nth-child(5),
.cke_toolbox span:nth-child(6),
.cke_toolbox span:nth-child(7),
.cke_toolbox span:nth-child(8),
.cke_toolbox span:nth-child(9){
// Toolbox - osnovni
.cke_toolbox{
}
.cke_toolbox span:nth-child(10){
span:nth-child(11),
span:nth-child(12){
.cke_button_icon{
display: none;
}
@ -48,30 +41,58 @@ div.button_holder.editor_button_holder{
display: inline;
padding-left: 0;
}
}
//.cke_toolbox span:nth-child(11),
.cke_toolbox span:nth-child(12),
.cke_toolbox span:nth-child(13),
.cke_toolbox span:nth-child(14){
display: none;
}
}
/*
#cke_43,
#cke_47,
#cke_51{
display: none;
}
// Gumb vec
#cke_42{
.cke_button_icon{
.cke_button__specialchar,
.cke_button__bgcolor,
span:nth-child(7),
span:nth-child(8),
span:nth-child(10),
span:nth-child(12){
display: none;
}
.cke_button_label{
display: inline;
padding-left: 0;
}
}*/
.cke_button__textcolor:after,
.cke_button__image_icon:after{
background-color: rgb(191, 191, 191);
border-color: rgb(191, 191, 191);
content: "";
position: absolute;
height: 18px;
width: 0;
border-right: 1px solid #bcbcbc;
margin-top: 4px;
top: 0;
right: -3px;
}
.cke_button__more:after,
.cke_button__less:after{
display: none;
}
}
// Toolbox - napredni
.cke_toolbox.advanced{
span:nth-child(11){
display: none;
}
.cke_button__specialchar,
.cke_button__bgcolor,
span:nth-child(7),
span:nth-child(8),
span:nth-child(10),
span:nth-child(12){
display: block;
}
.cke_button__textcolor:after,
.cke_button__image_icon:after{
display: none;
}
}