forked from extern/egroupware
Remove unsupported skins from CKEditor
This commit is contained in:
parent
57803951c5
commit
8708d598ff
@ -72,14 +72,6 @@ class CkEditorConfig
|
|||||||
$labels = array(
|
$labels = array(
|
||||||
'kama' => lang('kama theme'),
|
'kama' => lang('kama theme'),
|
||||||
'moono' => lang('moono theme (default)'),
|
'moono' => lang('moono theme (default)'),
|
||||||
'moonocolor' => lang('moono color theme'),
|
|
||||||
'moono-dark' => lang('dark moono theme'),
|
|
||||||
'Moono_blue' => lang('blue moono theme'),
|
|
||||||
'bootstrapck' => lang('bootstrap theme for ckeditor'),
|
|
||||||
'icy_orange' => lang('icy-orange theme for ckeditor'),
|
|
||||||
'office2013' => lang('office-2013 theme for ckeditor'),
|
|
||||||
'minimalist' => lang('Minimalist theme'),
|
|
||||||
'flat' => lang('Flat theme')
|
|
||||||
);
|
);
|
||||||
$skins = array();
|
$skins = array();
|
||||||
|
|
||||||
@ -98,6 +90,10 @@ class CkEditorConfig
|
|||||||
}
|
}
|
||||||
uasort($skins, 'strcasecmp');
|
uasort($skins, 'strcasecmp');
|
||||||
|
|
||||||
|
// flat skin is reserved for mobile template, although we are not
|
||||||
|
// supporting it on desktop (becuase FF has problem with action icons)
|
||||||
|
if (!\EGroupware\Api\Header\UserAgent::mobile()) unset($skins['flat']);
|
||||||
|
|
||||||
// return our default "moono" first
|
// return our default "moono" first
|
||||||
return isset($skins['moono']) ? array('moono' => $skins['moono'])+$skins : $skins;
|
return isset($skins['moono']) ? array('moono' => $skins['moono'])+$skins : $skins;
|
||||||
}
|
}
|
||||||
@ -220,26 +216,16 @@ class CkEditorConfig
|
|||||||
$skin = "kama";
|
$skin = "kama";
|
||||||
//if (EGroupware\Api\Header\UserAgent::type()=='firefox' || EGroupware\Api\Header\UserAgent::type()=='msie') $skin='moonocolor';
|
//if (EGroupware\Api\Header\UserAgent::type()=='firefox' || EGroupware\Api\Header\UserAgent::type()=='msie') $skin='moonocolor';
|
||||||
break;
|
break;
|
||||||
|
// no longer supported by egw
|
||||||
|
case 'flat':
|
||||||
case 'silver':
|
case 'silver':
|
||||||
case 'moono-dark':
|
case 'moono-dark':
|
||||||
$skin = "moono-dark";
|
|
||||||
break;
|
|
||||||
case 'icy_orange':
|
case 'icy_orange':
|
||||||
$skin = "icy_orange";
|
case 'bootstrapck':
|
||||||
break;
|
|
||||||
case 'bootstrapck': // no longer support by egw
|
|
||||||
case 'Moono_blue':
|
case 'Moono_blue':
|
||||||
case 'office2013':
|
case 'office2013':
|
||||||
case 'office2003':
|
case 'office2003':
|
||||||
case 'moonocolor':
|
case 'moonocolor':
|
||||||
$skin = "moonocolor";
|
|
||||||
break;
|
|
||||||
case 'minimalist':
|
|
||||||
$skin = "minimalist";
|
|
||||||
break;
|
|
||||||
case 'flat':
|
|
||||||
$skin = "flat";
|
|
||||||
break;
|
|
||||||
case 'moono':
|
case 'moono':
|
||||||
case 'default':
|
case 'default':
|
||||||
default:
|
default:
|
||||||
@ -251,6 +237,7 @@ class CkEditorConfig
|
|||||||
{
|
{
|
||||||
$skin = "moono"; //this is the basic skin for ckeditor
|
$skin = "moono"; //this is the basic skin for ckeditor
|
||||||
}
|
}
|
||||||
|
// Skin used for mobile template
|
||||||
self::$skin = \EGroupware\Api\Header\UserAgent::mobile()?'flat':$skin;
|
self::$skin = \EGroupware\Api\Header\UserAgent::mobile()?'flat':$skin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user