aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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