diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2012-04-27 10:34:45 +0200 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2012-04-27 10:35:31 +0200 |
commit | 768041b6cba5e8d4614e17d2ad492c855ec740a0 (patch) | |
tree | 0bb6f66ec10bb19618ff1b92bee538ee8bc0c9d2 /apps | |
parent | 18c11ec81b9fbfcad2567966036a26cb694a0c03 (diff) | |
download | nextcloud-server-768041b6cba5e8d4614e17d2ad492c855ec740a0.tar.gz nextcloud-server-768041b6cba5e8d4614e17d2ad492c855ec740a0.zip |
Contacts: Added convinience method for notifications.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/contacts/js/contacts.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js index 48ebecefbb5..e649e1744c3 100644 --- a/apps/contacts/js/contacts.js +++ b/apps/contacts/js/contacts.js @@ -12,6 +12,14 @@ String.prototype.strip_tags = function(){ Contacts={ UI:{ + notification:function(msg, ndata) { + $('#notification').text(msg); + if(data) { + $('#notification').data(ndata[0],ndata[1]); + } + $('#notification').fadeIn(); + setTimeout($('#notification').fadeOut(), 10000); + }, notImplemented:function() { OC.dialogs.alert(t('contacts', 'Sorry, this functionality has not been implemented yet'), t('contacts', 'Not implemented')); }, @@ -1536,6 +1544,10 @@ $(document).ready(function(){ OCCategories.changed = Contacts.UI.Card.categoriesChanged; OCCategories.app = 'contacts'; + $('#notification').click(function(){ + $('#notification').fadeOut(); + }); + $('#chooseaddressbook').click(function(){ Contacts.UI.Addressbooks.overview(); return false; |