--- a/src/pyams_skin/resources/js/myams.js Fri Sep 29 12:07:52 2017 +0200
+++ b/src/pyams_skin/resources/js/myams.js Fri Sep 29 12:18:31 2017 +0200
@@ -4454,7 +4454,8 @@
var link = $(this);
MyAMS.skin.bigBox({
title: ams.i18n.WARNING,
- content: '<i class="text-danger fa fa-2x fa-bell shake animated"></i> ' + ams.i18n.DELETE_WARNING,
+ content: '<i class="text-danger fa fa-fw fa-bell"></i> ' + ams.i18n.DELETE_WARNING,
+ status: 'info',
buttons: ams.i18n.BTN_OK_CANCEL
}, function(button) {
if (button === ams.i18n.BTN_OK) {
@@ -4992,9 +4993,11 @@
var request = xhr();
if (request && (typeof(request.addEventListener) === "function")) {
var that = this;
- request.addEventListener("progress", function(evt) {
- that.progress(evt);
- }, false);
+ if (that && that.progress) {
+ request.addEventListener("progress", function (evt) {
+ that.progress(evt);
+ }, false);
+ }
}
return request;
}
@@ -5110,7 +5113,7 @@
title : "<i class='fa fa-sign-out txt-color-orangeDark'></i> " + ams.i18n.LOGOUT +
" <span class='txt-color-orangeDark'><strong>" + $('#show-shortcut').text() + "</strong></span> ?",
content : ams.i18n.LOGOUT_COMMENT,
- buttons : '['+ams.i18n.BTN_NO+']['+ams.i18n.BTN_YES+']'
+ buttons : ams.i18n.BTN_YES_NO
}, function(ButtonPressed) {
if (ButtonPressed === ams.i18n.BTN_YES) {
ams.root.addClass('animated fadeOutUp');
@@ -5199,28 +5202,32 @@
// Standard AJAX or browser URL call
// Convert %23 chars to #
href = href.replace(/\%23/, '#');
- var target = link.data('ams-target');
- if (target) {
- ams.form.confirmChangedForm(target, function () {
- ams.skin.loadURL(href, target, link.data('ams-link-options'), link.data('ams-link-callback'));
- });
+ if (e.ctrlKey) {
+ window.open(href);
} else {
- ams.form.confirmChangedForm(function () {
- if (href.startsWith('#')) {
- if (href !== location.hash) {
- if (ams.root.hasClass('mobile-view-activated')) {
- ams.root.removeClass('hidden-menu');
- window.setTimeout(function () {
+ var target = link.data('ams-target');
+ if (target) {
+ ams.form.confirmChangedForm(target, function () {
+ ams.skin.loadURL(href, target, link.data('ams-link-options'), link.data('ams-link-callback'));
+ });
+ } else {
+ ams.form.confirmChangedForm(function () {
+ if (href.startsWith('#')) {
+ if (href !== location.hash) {
+ if (ams.root.hasClass('mobile-view-activated')) {
+ ams.root.removeClass('hidden-menu');
+ window.setTimeout(function () {
+ window.location.hash = href;
+ }, 50);
+ } else {
window.location.hash = href;
- }, 50);
- } else {
- window.location.hash = href;
+ }
}
+ } else {
+ window.location = href;
}
- } else {
- window.location = href;
- }
- });
+ });
+ }
}
}
});