Commit 2c39bc8e authored by webchick's avatar webchick
Browse files

#801158 by casey: Fixed Dashboard adds customise dashboard link every time block is added.

parent 4c94e681
......@@ -5,9 +5,11 @@
* Implementation of Drupal.behaviors for dashboard.
*/
Drupal.behaviors.dashboard = {
attach: function () {
$('#dashboard').prepend('<div class="customize"><ul class="action-links"><li><a href="#">' + Drupal.t('Customize dashboard') + '</a></li></ul><div class="canvas"></div></div>');
$('#dashboard .customize .action-links a').click(Drupal.behaviors.dashboard.enterCustomizeMode);
attach: function (context, settings) {
$('#dashboard', context).once(function () {
$(this).prepend('<div class="customize"><ul class="action-links"><li><a href="#">' + Drupal.t('Customize dashboard') + '</a></li></ul><div class="canvas"></div></div>');
$('.customize .action-links a', this).click(Drupal.behaviors.dashboard.enterCustomizeMode);
});
Drupal.behaviors.dashboard.addPlaceholders();
if (Drupal.settings.dashboard.launchCustomize) {
Drupal.behaviors.dashboard.enterCustomizeMode();
......
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