summaryrefslogtreecommitdiffstats
path: root/core/js/js.js
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2017-01-24 07:47:14 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2017-04-25 20:47:17 +0200
commitd091793ceb1ab2a60133608e844e1d83a5de19f2 (patch)
tree12c4c5863c5ede094a78c534e03d6718823abb04 /core/js/js.js
parentdb94b5d4af711f6e18aac0c9d4b0357a3b9123d1 (diff)
downloadnextcloud-server-d091793ceb1ab2a60133608e844e1d83a5de19f2.tar.gz
nextcloud-server-d091793ceb1ab2a60133608e844e1d83a5de19f2.zip
Contacts menu
* load list of contacts from the server * show last message of each contact Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'core/js/js.js')
-rw-r--r--core/js/js.js17
1 files changed, 15 insertions, 2 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 95c00dd6448..03d831567d3 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -654,8 +654,13 @@ var OCP = {},
/**
* For menu toggling
* @todo Write documentation
+ *
+ * @param {jQuery} $toggle
+ * @param {jQuery} $menuEl
+ * @param {function|undefined} toggle callback invoked everytime the menu is opened
+ * @returns {undefined}
*/
- registerMenu: function($toggle, $menuEl) {
+ registerMenu: function($toggle, $menuEl, toggle) {
var self = this;
$menuEl.addClass('menu');
$toggle.on('click.menu', function(event) {
@@ -671,7 +676,7 @@ var OCP = {},
// close it
self.hideMenus();
}
- $menuEl.slideToggle(OC.menuSpeed);
+ $menuEl.slideToggle(OC.menuSpeed, toggle);
OC._currentMenu = $menuEl;
OC._currentMenuToggle = $toggle;
});
@@ -1473,8 +1478,16 @@ function initCore() {
});
}
+ function setupContactsMenu() {
+ new OC.ContactsMenu({
+ el: $('#contactsmenu .menu'),
+ trigger: $('#contactsmenu .menutoggle')
+ });
+ }
+
setupMainMenu();
setupUserMenu();
+ setupContactsMenu();
// move triangle of apps dropdown to align with app name triangle
// 2 is the additional offset between the triangles