Commit c1f21a6c authored by Patrick Müller's avatar Patrick Müller

Merge branch 'dev'

parents ef04db5e 8f7534a6
......@@ -9,12 +9,14 @@ define('controls/cache/Settings', [
'qui/QUI',
'qui/controls/Control',
'qui/controls/buttons/Button',
'qui/controls/windows/Confirm',
'Ajax',
'Locale',
'css!controls/cache/Settings.css'
], function (QUI, QUIControl, QUIButton, Ajax, QUILocale) {
], function (QUI, QUIControl, QUIButton, QUIConfirm, Ajax, QUILocale) {
"use strict";
var lg = 'quiqqer/quiqqer';
......@@ -25,7 +27,8 @@ define('controls/cache/Settings', [
Type : 'controls/cache/Settings',
Binds: [
'$onImport'
'$onImport',
'$confirmCacheClearDialog'
],
initialize: function (Settings) {
......@@ -63,16 +66,7 @@ define('controls/cache/Settings', [
text : QUILocale.get(lg, 'quiqqer.settings.cache.clear.complete'),
textimage: 'fa fa-trash-o',
events : {
onClick: function (Btn) {
Btn.setAttribute('textimage', 'fa fa-spinner fa-spin');
self.clear(
{complete: true},
function () {
Btn.setAttribute('textimage', 'fa fa-trash-o');
}
);
}
onClick: this.$confirmCacheClearDialog
}
}).inject(ClearCacheBody);
......@@ -154,6 +148,50 @@ define('controls/cache/Settings', [
}).inject(PurgeCacheBody);
},
/**
* Confirm the clearing of the complete QUIQQER cache
*/
$confirmCacheClearDialog: function () {
var self = this;
new QUIConfirm({
maxHeight: 300,
maxWidth : 700,
autoclose: false,
information: QUILocale.get(lg, 'quiqqer.settings.cache.clear.complete.confirm.information'),
title : QUILocale.get(lg, 'quiqqer.settings.cache.clear.complete'),
texticon : 'fa fa-exclamation-triangle',
text : QUILocale.get(lg, 'quiqqer.settings.cache.clear.complete.confirm.text'),
icon : 'fa fa-trash-o',
cancel_button: {
text : QUILocale.get(lg, 'cancel'),
textimage: 'icon-remove fa fa-remove'
},
ok_button : {
'class:' : 'btn btn-red',
text : QUILocale.get(lg, 'quiqqer.settings.cache.clear.complete.confirm.submit'),
textimage: 'icon-ok fa fa-trash-o'
},
events : {
onOpen : function (Win) {
Win.getButton('submit').getElm().addClass('btn-red');
},
onSubmit: function (Win) {
Win.Loader.show();
self.clear(
{complete: true},
function () {
Win.close();
}
);
}
}
}).open();
},
/**
* Clear the cache
......
......@@ -2628,6 +2628,17 @@
<locale name="quiqqer.settings.cache.clear.complete">
<de><![CDATA[Kompletten Cache leeren]]></de>
</locale>
<locale name="quiqqer.settings.cache.clear.complete.confirm.information">
<de><![CDATA[Durch das Leeren des kompletten QUIQQER Caches können ggf. größere Datenmengen gelöscht werden, deren Neuerstellung eine längere Zeit benötigt. Dies kann dazu führen, dass Ihre Website in diesem Zeitraum erheblich langsamer ist.]]></de>
</locale>
<locale name="quiqqer.settings.cache.clear.complete.confirm.text">
<de><![CDATA[Sind Sie sicher, dass der komplette QUIQQER Cache gelöscht werden soll?]]></de>
</locale>
<locale name="quiqqer.settings.cache.clear.complete.confirm.submit">
<de><![CDATA[Jetzt kompletten QUIQQER Cache löschen]]></de>
</locale>
<locale name="quiqqer.settings.cache.clear.quiqqer">
<de><![CDATA[Kompletten QUIQQER Cache leeren]]></de>
</locale>
......
......@@ -1047,10 +1047,10 @@ You can also ignore the console user permissions check with '--ignore-file-permi
<en><![CDATA[Company]]></en>
</locale>
<locale name="message.clear.cache.successful">
<en><![CDATA[Cache successful cleared.]]></en>
<en><![CDATA[Cache cleared successfully.]]></en>
</locale>
<locale name="message.clear.cache.purged">
<en><![CDATA[Cache successful purged.]]></en>
<en><![CDATA[Cache purged successfully.]]></en>
</locale>
<locale name="message.unknown.root.group">
<en><![CDATA[Unknown ROOT group. Please contact an administrator.]]></en>
......@@ -2572,6 +2572,15 @@ You can also ignore the console user permissions check with '--ignore-file-permi
<locale name="quiqqer.settings.cache.clear.quiqqer">
<en><![CDATA[Clear complete QUIQQER cache]]></en>
</locale>
<locale name="quiqqer.settings.cache.clear.complete.confirm.information">
<en><![CDATA[By clearing the entire QUIQQER cache, larger amounts of data can be deleted, whose re-creation may require a longer time. This can cause your website to be considerably slower during this period.]]></en>
</locale>
<locale name="quiqqer.settings.cache.clear.complete.confirm.text">
<en><![CDATA[Are you sure you want to clear the entire QUIQQER cache?]]></en>
</locale>
<locale name="quiqqer.settings.cache.clear.complete.confirm.submit">
<en><![CDATA[Clear complete QUIQQER cache now]]></en>
</locale>
<locale name="quiqqer.settings.cache.quiqqer.title">
<en><![CDATA[QUIQQER System Cache]]></en>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment