From 50a787d97dd18be567652a09daa6998368158764 Mon Sep 17 00:00:00 2001 From: brettp Date: Thu, 28 Apr 2011 21:20:47 +0000 Subject: Fixes #3408. During token refresh, only touching hrefs that contain __elgg_ts and __elgg_token to avoid changing selector-only hrefs since fragment-only hrefs are normalized by the browser. Not sure how this didn't show up until now. git-svn-id: http://code.elgg.org/elgg/trunk@9049 36083f99-b078-4883-b0ff-0f9b5a30f544 --- js/lib/ui.js | 1 + 1 file changed, 1 insertion(+) (limited to 'js/lib/ui.js') diff --git a/js/lib/ui.js b/js/lib/ui.js index 16f1f969c..85ca8caf1 100644 --- a/js/lib/ui.js +++ b/js/lib/ui.js @@ -36,6 +36,7 @@ elgg.ui.init = function () { elgg.ui.toggles = function(event) { event.preventDefault(); + // @todo might want to switch this to elgg.getSelectorFromUrlFragment(). var target = $(this).toggleClass('elgg-state-active').attr('href'); $(target).slideToggle('medium'); -- cgit v1.2.3 From 52ad7afda5a1f4001155227d2d96ddf04f8a28d1 Mon Sep 17 00:00:00 2001 From: cash Date: Wed, 18 May 2011 01:58:37 +0000 Subject: Fixes #3385 rel now used for the confirm text so that title can be used separately git-svn-id: http://code.elgg.org/elgg/trunk@9099 36083f99-b078-4883-b0ff-0f9b5a30f544 --- js/lib/ui.js | 2 +- views/default/output/confirmlink.php | 4 ++-- views/default/page/elements/header.php | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'js/lib/ui.js') diff --git a/js/lib/ui.js b/js/lib/ui.js index 85ca8caf1..692311d73 100644 --- a/js/lib/ui.js +++ b/js/lib/ui.js @@ -221,7 +221,7 @@ elgg.ui.initHoverMenu = function(parent) { * @return void */ elgg.ui.requiresConfirmation = function(e) { - var confirmText = $(this).attr('title') || elgg.echo('question:areyousure'); + var confirmText = $(this).attr('rel') || elgg.echo('question:areyousure'); if (!confirm(confirmText)) { e.preventDefault(); } diff --git a/views/default/output/confirmlink.php b/views/default/output/confirmlink.php index 967094113..5059a656e 100644 --- a/views/default/output/confirmlink.php +++ b/views/default/output/confirmlink.php @@ -13,7 +13,8 @@ * @uses $vars['text_encode'] Encode special characters? (false) */ -$confirm = elgg_extract('confirm', $vars, elgg_echo('question:areyousure')); +$vars['rel'] = elgg_extract('confirm', $vars, elgg_echo('question:areyousure')); +$vars['rel'] = addslashes($vars['rel']); $encode = elgg_extract('text_encode', $vars, false); // always generate missing action tokens @@ -36,7 +37,6 @@ if (isset($vars['class'])) { } else { $vars['class'] = 'elgg-requires-confirmation'; } -//$vars['onclick'] = "return confirm('" . addslashes($confirm) . "')"; unset($vars['encode_text']); unset($vars['text']); diff --git a/views/default/page/elements/header.php b/views/default/page/elements/header.php index 2361644f2..1a1f5d211 100644 --- a/views/default/page/elements/header.php +++ b/views/default/page/elements/header.php @@ -1,8 +1,8 @@