summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2012-04-27 14:22:12 +0200
committerGeorg Ehrke <dev@georgswebsite.de>2012-04-27 14:22:12 +0200
commit0aaf6d16a54f697fc51e075a3308716c1bc95762 (patch)
tree0dcfc56913af2bb8ea97cbab3209d9e90edd6e7b
parent993d655aad8be57f4421fa787fc573bcfcc417e1 (diff)
parent768041b6cba5e8d4614e17d2ad492c855ec740a0 (diff)
downloadnextcloud-server-0aaf6d16a54f697fc51e075a3308716c1bc95762.tar.gz
nextcloud-server-0aaf6d16a54f697fc51e075a3308716c1bc95762.zip
Merge branch 'master' into movable_apps_2
-rw-r--r--apps/contacts/js/contacts.js12
-rw-r--r--apps/contacts/js/jquery.combobox.js21
-rw-r--r--apps/contacts/templates/part.no_contacts.php3
3 files changed, 26 insertions, 10 deletions
diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js
index 7e0fe8b41cf..edb7da70407 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;
diff --git a/apps/contacts/js/jquery.combobox.js b/apps/contacts/js/jquery.combobox.js
index f46d7c14c18..25f0f094296 100644
--- a/apps/contacts/js/jquery.combobox.js
+++ b/apps/contacts/js/jquery.combobox.js
@@ -53,13 +53,13 @@
return false;
}
});
- /*if ( !valid ) {
+ if ( !self.options['editable'] && !valid ) {
// remove invalid value, as it didn't match anything
$( this ).val( "" );
select.val( "" );
input.data( "autocomplete" ).term = "";
return false;
- }*/
+ }
}
}
})
@@ -93,13 +93,14 @@
input.autocomplete( "search", "" );
input.focus();
});*/
+ this.options['editable'] = true;
$.each(this.options, function(key, value) {
self._setOption(key, value);
});
},
destroy: function() {
this.input.remove();
- this.button.remove();
+ //this.button.remove();
this.element.show();
$.Widget.prototype.destroy.call( this );
},
@@ -113,26 +114,29 @@
},
_setOption: function( key, value ) {
switch( key ) {
- case "id":
+ case 'id':
this.options['id'] = value;
this.input.attr('id', value);
break;
- case "name":
+ case 'name':
this.options['name'] = value;
this.input.attr('name', value);
break;
- case "attributes":
+ case 'attributes':
var input = this.input;
$.each(this.options['attributes'], function(key, value) {
input.attr(key, value);
});
break;
- case "classes":
+ case 'classes':
var input = this.input;
$.each(this.options['classes'], function(key, value) {
input.addClass(value);
});
break;
+ case 'editable':
+ this.options['editable'] = value;
+ break;
}
// In jQuery UI 1.8, you have to manually invoke the _setOption method from the base widget
$.Widget.prototype._setOption.apply( this, arguments );
@@ -141,7 +145,8 @@
},
options: {
id: null,
- name: null
+ name: null,
+ editable: true
},
});
})( jQuery );
diff --git a/apps/contacts/templates/part.no_contacts.php b/apps/contacts/templates/part.no_contacts.php
index 6c21511e867..5faa481bc3c 100644
--- a/apps/contacts/templates/part.no_contacts.php
+++ b/apps/contacts/templates/part.no_contacts.php
@@ -1,8 +1,7 @@
<div id="firstrun">
<?php echo $l->t('You have no contacts in your addressbook.') ?>
<div id="selections">
- <input type="button" value="<?php echo $l->t('Import contacts') ?>" onclick="Contacts.UI.Addressbooks.doImport()" />
<input type="button" value="<?php echo $l->t('Add contact') ?>" onclick="Contacts.UI.Card.editNew()" />
- <input type="button" value="<?php echo $l->t('Edit addressbooks') ?>" onclick="Contacts.UI.Addressbooks.overview()" />
+ <input type="button" value="<?php echo $l->t('Configure addressbooks') ?>" onclick="Contacts.UI.Addressbooks.overview()" />
</div>
</div>