aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-04-07 02:08:17 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-04-07 02:08:17 +0000
commitb0e834d9124b4ee7d374e54eaa60942ca5e8b3c7 (patch)
treec58ec5f3b34edfb166fb48ad4a270ac29193dfa8 /js
parenta9e6be34cb830106377de20ddf59a5b536ca47ec (diff)
downloadelgg-b0e834d9124b4ee7d374e54eaa60942ca5e8b3c7.tar.gz
elgg-b0e834d9124b4ee7d374e54eaa60942ca5e8b3c7.tar.bz2
Fixes #3278 Login popup aligned to right side of button.
git-svn-id: http://code.elgg.org/elgg/trunk@8948 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'js')
-rw-r--r--js/lib/ui.js22
1 files changed, 21 insertions, 1 deletions
diff --git a/js/lib/ui.js b/js/lib/ui.js
index 0e6634020..c988b8590 100644
--- a/js/lib/ui.js
+++ b/js/lib/ui.js
@@ -245,5 +245,25 @@ elgg.ui.likesPopupHandler = function(hook, type, params, options) {
return null;
};
+/**
+ * Repositions the login popup
+ *
+ * @param {String} hook 'getOptions'
+ * @param {String} type 'ui.popup'
+ * @param {Object} params An array of info about the target and source.
+ * @param {Object} options Options to pass to
+ *
+ * @return {Object}
+ */
+elgg.ui.likesLoginHandler = function(hook, type, params, options) {
+ if (params.target.attr('id') == 'login-dropdown-box') {
+ options.my = 'right top';
+ options.at = 'right bottom';
+ return options;
+ }
+ return null;
+};
+
elgg.register_hook_handler('init', 'system', elgg.ui.init);
-elgg.register_hook_handler('getOptions', 'ui.popup', elgg.ui.likesPopupHandler); \ No newline at end of file
+elgg.register_hook_handler('getOptions', 'ui.popup', elgg.ui.likesPopupHandler);
+elgg.register_hook_handler('getOptions', 'ui.popup', elgg.ui.likesLoginHandler); \ No newline at end of file