Skip to content

Commit

Permalink
Merge pull request #950 from derUli/improvement/change-logo
Browse files Browse the repository at this point in the history
Improvement/change logo
  • Loading branch information
derUli committed Nov 26, 2020
2 parents 6ab449d + 22d97ca commit 4b15b7d
Show file tree
Hide file tree
Showing 129 changed files with 5,208 additions and 4,465 deletions.
7 changes: 7 additions & 0 deletions doc/changelog.txt
Expand Up @@ -2,6 +2,13 @@

Neue Features:
* Favicons können gelöscht werden
* Logo-Upload verbessert
* Maximale Größe von Bildern kann konfiguriert werden
* Bootstrap Tooltips

Neue API-methoden:
* Path::normalize(string $path): string
* Path::resolveAndNormalize(string $path): string

===== Neues in UliCMS 2020.4 =====

Expand Down
110 changes: 55 additions & 55 deletions ulicms/UliCMSVersion.php
@@ -1,55 +1,55 @@
<?php

declare(strict_types=1);

class UliCMSVersion
{
public function __construct()
{
$this->codename = "Spooky Andean Condor";
$this->releaseYear = 2020;
$this->buildDate = 0; // {InsertBuildDate}
$this->internalVersion = [
2021,
1
];

$this->update = "";
}

public function getReleaseYear(): string
{
return strval($this->releaseYear);
}

// returns the codename of this UliCMS release
public function getCodeName(): string
{
return $this->codename;
}

// returns the version number
public function getInternalVersion(): array
{
return $this->internalVersion;
}

// Returns the full version number as string
public function getInternalVersionAsString(): string
{
return implode(".", $this->internalVersion);
}

public function getBuildTimestamp(): int
{
return $this->buildDate;
}

public function getBuildDate(): string
{
return strftime("%x %X", $this->getBuildTimestamp());
}
}

// For backwards compatiblity
class_alias("UliCMSVersion", "ulicms_version");
<?php

declare(strict_types=1);

class UliCMSVersion
{
public function __construct()
{
$this->codename = "Spooky Andean Condor";
$this->releaseYear = 2020;
$this->buildDate = 0; // {InsertBuildDate}
$this->internalVersion = [
2021,
1
];

$this->update = "";
}

public function getReleaseYear(): string
{
return strval($this->releaseYear);
}

// returns the codename of this UliCMS release
public function getCodeName(): string
{
return $this->codename;
}

// returns the version number
public function getInternalVersion(): array
{
return $this->internalVersion;
}

// Returns the full version number as string
public function getInternalVersionAsString(): string
{
return implode(".", $this->internalVersion);
}

public function getBuildTimestamp(): int
{
return $this->buildDate;
}

public function getBuildDate(): string
{
return strftime("%x %X", $this->getBuildTimestamp());
}
}

// For backwards compatiblity
class_alias("UliCMSVersion", "ulicms_version");
4 changes: 4 additions & 0 deletions ulicms/admin/css/modern.scss
Expand Up @@ -132,6 +132,10 @@ fieldset[disabled] {
margin-bottom: 10px;
}

#backend-logo{
display: inline-block;
}

.btn-toolbar {
.btn {
margin-left: 5px;
Expand Down
17 changes: 14 additions & 3 deletions ulicms/admin/fm/config/config.php
Expand Up @@ -2,6 +2,10 @@

define("RESPONSIVE_FM", true);
include_once "../../init.php";

use UliCMS\Helpers\ImageScaleHelper;

$dimensions = ImageScaleHelper::getMaxImageDimensions();
$version = "9.14.0";

if (session_id() == '') {
Expand All @@ -18,6 +22,13 @@
}
}

$language = getSystemLanguage();

$languageFile = dirname(__FILE__ . "/../lang/${language}.php");
if (!file_exists($languageFile)) {
$language = "en_EN";
}

mb_internal_encoding('UTF-8');
mb_http_output('UTF-8');
mb_http_input('UTF-8');
Expand Down Expand Up @@ -227,7 +238,7 @@
| default language file name
|--------------------------------------------------------------------------
*/
'default_language' => getSystemLanguage(),
'default_language' => $language,
/*
|--------------------------------------------------------------------------
| Icon theme
Expand Down Expand Up @@ -264,8 +275,8 @@
// set maximum pixel width and/or maximum pixel height for all images
// If you set a maximum width or height, oversized images are converted to those limits. Images smaller than the limit(s) are unaffected
// if you don't need a limit set both to 0
'image_max_width' => 2560,
'image_max_height' => 0,
'image_max_width' => $dimensions ? $dimensions[0]: 0,
'image_max_height' => $dimensions ? $dimensions[1]: 0,
'image_max_mode' => 'auto',
/*
# $option: 0 / exact = defined size;
Expand Down
20 changes: 12 additions & 8 deletions ulicms/admin/inc/footer.php
Expand Up @@ -3,41 +3,45 @@
use function UliCMS\HTML\icon;

$menuTranslation = new JsTranslation(
[
[
"logout",
"on",
"off"
],
"MenuTranslation"
"MenuTranslation"
);
$menuTranslation->render();

$globalTranslation = new JsTranslation(
[
[
"all",
"copied_to_clipboard_success",
"copied_to_clipboard_failed"
],
"GlobalTranslation"
"GlobalTranslation"
);
$globalTranslation->render();

$passwordSecurityTranslation = new JSTranslation(
[
[
"short_pass",
"bad_pass",
"good_pass",
"strong_pass",
"contains_username",
"enter_pass",
],
"PasswordSecurityTranslation"
"PasswordSecurityTranslation"
);
$passwordSecurityTranslation->render();
?>
<div id="msgcontainer">
<img id="loading" src="gfx/loading.gif" alt="Bitte warten..."
style="display: none;">
<img
id="loading"
src="gfx/loading.gif"
alt="<?php translate("loading_alt"); ?>"
style="display: none;"
>
</div>
<div id="message">
<br />
Expand Down
34 changes: 23 additions & 11 deletions ulicms/admin/inc/header.php
Expand Up @@ -54,21 +54,21 @@
"../node_modules/zenscroll/zenscroll-min.js",
"../lib/js/global.js",
);

if (is_logged_in()) {
$scripts[] = "../node_modules/jscolor-picker/jscolor.min.js";
}

$scripts = apply_filter($scripts, "admin_head_scripts");

foreach ($scripts as $script) {
enqueueScriptFile($script);
}

if (is_logged_in()) {
echo Script::fromFile("ckeditor/ckeditor.js");
}

combinedScriptHtml();

require "inc/touch_icons.php";
Expand All @@ -89,7 +89,7 @@
$styles[] = "../node_modules/jquery-datetimepicker/build/jquery.datetimepicker.min.css";

$styles = apply_filter($styles, "admin_head_styles");

foreach ($styles as $style) {
enqueueStylesheet($style);
}
Expand Down Expand Up @@ -133,7 +133,12 @@ class="container main <?php
?>">
<div class="row menubar">
<div class="col-xs-7">
<a href="../" title="<?php translate("goto_frontend"); ?>"><img
<a
href="../"
title="<?php translate("goto_frontend"); ?>"
id="backend-logo"
data-placement="bottom"
><img
src="<?php Template::escape($admin_logo); ?>" alt="UliCMS"
class="img-responsive"></a>
</div>
Expand All @@ -144,7 +149,10 @@ class="img-responsive"></a>
<div class="row pull-right top-right-icons">
<div class="<?php esc($colClass); ?>">
<a href="#" class="has-pointer" id="menu-clear-cache"
data-url="<?php echo ModuleHelper::buildMethodCallUrl("PerformanceSettingsController", "clearCache", "clear_cache=1"); ?>">
data-url="<?php echo ModuleHelper::buildMethodCallUrl("PerformanceSettingsController", "clearCache", "clear_cache=1"); ?>"
title="<?php translate("clear_cache"); ?>"
data-placement="bottom"
>
<i class="fas fa-broom"></i></a>
<a href="#" id="menu-clear-cache-loading" style="display: none;"><i class="fa fa-spinner fa-spin"></i></a>
</div>
Expand All @@ -153,7 +161,11 @@ class="img-responsive"></a>
$count = Comment::getUnreadCount(); ?>
<div class="<?php esc($colClass); ?>">
<div class="comment-counter">
<a href="<?php echo ModuleHelper::buildActionURL("comments_manage"); ?>"><i class="fa fa-comments"></i>
<a href="<?php echo ModuleHelper::buildActionURL("comments_manage"); ?>"
title="<?php translate("comments"); ?>"
data-placement="bottom"
>
<i class="fa fa-comments"></i>
<?php
if ($count) {
?>
Expand All @@ -171,8 +183,8 @@ class="img-responsive"></a>
</div>
</div>
<?php
} ?>
}
?>
</div>
</div>
<div class="main-content">

1 change: 1 addition & 0 deletions ulicms/admin/scripts/global.js
Expand Up @@ -35,6 +35,7 @@ $(document).ready(() => {
$(() => {
const body = $("body");
const language = $("html").data("select2-language");
bindTooltips($(body));
bootbox.setDefaults({
locale: $("html").data("select2-language")
});
Expand Down
7 changes: 4 additions & 3 deletions ulicms/admin/scripts/utils/ajax.js
Expand Up @@ -11,12 +11,12 @@ const bindAjaxLinks = (root) => {
$(root).find("a.is-ajax").click((event) => {
event.preventDefault();
event.stopPropagation();

const target = $(event.currentTarget);
const originalUrl = target.attr("href");
let url = `${originalUrl}&only_content=true`;
if(target.hasClass("full-minified")){

if (target.hasClass("full-minified")) {
url += "&full_minified=true"
}

Expand Down Expand Up @@ -71,6 +71,7 @@ const bindContentEvents = (contentContainer) => {
initSelect2(contentContainer);
addCssClassToInputs(contentContainer);
initBootstrapToggle(contentContainer);
bindTooltips($("body"));
};

const initRemoteAlerts = (rootElement) => {
Expand Down
9 changes: 8 additions & 1 deletion ulicms/admin/scripts/utils/fx.js
Expand Up @@ -31,4 +31,11 @@ const setWaitCursor = () => {

const setDefaultCursor = () => {
$('body').css('cursor', 'auto');
};
};

const bindTooltips = (root) => {
if (isTouchDevice()) {
return;
}
$(root).find("*[title]").tooltip();
}

0 comments on commit 4b15b7d

Please sign in to comment.