summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwebchick2014-10-03 16:04:47 (GMT)
committerwebchick2014-10-03 16:04:47 (GMT)
commit383521f2513c31358a05335905bfd9987ea4d2d9 (patch)
tree022e799c5bbeb43f660c2216f837abbbc6f63f46
parent76b8f62c2680cfa5faf60a05b9aeb430f614df55 (diff)
Issue #2349569 by dmsmidt, valgibson, nod_, 2suns, yoroy, Bojhan, marcvangend: Fixed 'Back to site' link does not work as expected.
-rw-r--r--core/modules/toolbar/js/escapeAdmin.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/core/modules/toolbar/js/escapeAdmin.js b/core/modules/toolbar/js/escapeAdmin.js
index 554d6a7..0544a40 100644
--- a/core/modules/toolbar/js/escapeAdmin.js
+++ b/core/modules/toolbar/js/escapeAdmin.js
@@ -28,11 +28,14 @@
Drupal.behaviors.escapeAdmin = {
attach: function () {
var $toolbarEscape = $('[data-toolbar-escape-admin]').once('escapeAdmin');
- if ($toolbarEscape.length) {
- if (pathInfo.currentPathIsAdmin && escapeAdminPath !== null) {
+ if ($toolbarEscape.length && pathInfo.currentPathIsAdmin) {
+ if (escapeAdminPath !== null) {
$toolbarEscape.attr('href', escapeAdminPath);
- $toolbarEscape.closest('.toolbar-tab').removeClass('hidden');
}
+ else {
+ $toolbarEscape.text(Drupal.t('Home'));
+ }
+ $toolbarEscape.closest('.toolbar-tab').removeClass('hidden');
}
}
};