aboutsummaryrefslogtreecommitdiff
path: root/js/lib
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-06-18 19:56:33 -0400
committerBrett Profitt <brett.profitt@gmail.com>2011-06-18 19:56:33 -0400
commitec7b94a64aef23b85866ecdac8e8acc712d29bb6 (patch)
treea108205c3fa0b694d8ce0ebaafd259480d6b530a /js/lib
parentc80ba5aa03264dd64c20ed8ae222e87f9371a44d (diff)
parent2b68a4d217c35a5587c462620789493cf2804ba2 (diff)
downloadelgg-ec7b94a64aef23b85866ecdac8e8acc712d29bb6.tar.gz
elgg-ec7b94a64aef23b85866ecdac8e8acc712d29bb6.tar.bz2
Merge branch 'master' of github.com:Elgg/Elgg
Diffstat (limited to 'js/lib')
-rw-r--r--js/lib/security.js4
-rw-r--r--js/lib/ui.js3
-rw-r--r--js/lib/userpicker.js4
3 files changed, 6 insertions, 5 deletions
diff --git a/js/lib/security.js b/js/lib/security.js
index fa0a6f7ef..486347b88 100644
--- a/js/lib/security.js
+++ b/js/lib/security.js
@@ -21,8 +21,8 @@ elgg.security.setToken = function(json) {
$('[name=__elgg_ts]').val(json.__elgg_ts);
$('[name=__elgg_token]').val(json.__elgg_token);
- //also update all links
- $('[href]').each(function() {
+ // also update all links that contain tokens and time stamps
+ $('[href*="__elgg_ts"][href*="__elgg_token"]').each(function() {
this.href = this.href
.replace(/__elgg_ts=\d*/, '__elgg_ts=' + json.__elgg_ts)
.replace(/__elgg_token=[0-9a-f]*/, '__elgg_token=' + json.__elgg_token);
diff --git a/js/lib/ui.js b/js/lib/ui.js
index 16f1f969c..692311d73 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');
@@ -220,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/js/lib/userpicker.js b/js/lib/userpicker.js
index 475af150f..826bf21a0 100644
--- a/js/lib/userpicker.js
+++ b/js/lib/userpicker.js
@@ -75,9 +75,9 @@ elgg.userpicker.removeUser = function(link, guid) {
elgg.userpicker.getSearchParams = function(e) {
if ($(e).closest('.elgg-user-picker').find('[name=match_on]').attr('checked')) {
- return {'match_on[]': 'friends'};
+ return {'match_on[]': 'friends', 'term' : e.term};
} else {
- return {'match_on[]': 'users'};
+ return {'match_on[]': 'users', 'term' : e.term};
}
}