1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-01 13:24:10 +01:00

Contacts: Added convinience method for notifications.

This commit is contained in:
Thomas Tanghus 2012-04-27 10:34:45 +02:00
parent 845cf4b51a
commit d8cf49215a

View File

@ -12,6 +12,14 @@ String.prototype.strip_tags = function(){
Contacts={ Contacts={
UI:{ UI:{
notification:function(msg, ndata) {
$('#notification').text(msg);
if(data) {
$('#notification').data(ndata[0],ndata[1]);
}
$('#notification').fadeIn();
setTimeout($('#notification').fadeOut(), 10000);
},
notImplemented:function() { notImplemented:function() {
OC.dialogs.alert(t('contacts', 'Sorry, this functionality has not been implemented yet'), t('contacts', 'Not implemented')); 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.changed = Contacts.UI.Card.categoriesChanged;
OCCategories.app = 'contacts'; OCCategories.app = 'contacts';
$('#notification').click(function(){
$('#notification').fadeOut();
});
$('#chooseaddressbook').click(function(){ $('#chooseaddressbook').click(function(){
Contacts.UI.Addressbooks.overview(); Contacts.UI.Addressbooks.overview();
return false; return false;