summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-06-24 16:03:10 +0200
committerThomas Tanghus <thomas@tanghus.net>2012-06-24 16:03:10 +0200
commit5393c0cfedf9ab07276e43e02fbe75e397671df0 (patch)
tree75ae6291d2a4112f255de90769bf9f2d8b6a92bb /apps
parentb182e6c86a8ca0ef4e74f134bbb29e1db1fc5497 (diff)
downloadnextcloud-server-5393c0cfedf9ab07276e43e02fbe75e397671df0.tar.gz
nextcloud-server-5393c0cfedf9ab07276e43e02fbe75e397671df0.zip
Click to select which address book to add to.
Diffstat (limited to 'apps')
-rw-r--r--apps/contacts/css/contacts.css2
-rw-r--r--apps/contacts/js/contacts.js5
2 files changed, 5 insertions, 2 deletions
diff --git a/apps/contacts/css/contacts.css b/apps/contacts/css/contacts.css
index 6c65db2b772..fb5bcb2b70c 100644
--- a/apps/contacts/css/contacts.css
+++ b/apps/contacts/css/contacts.css
@@ -5,7 +5,7 @@
#leftcontent a { padding: 0 0 0 25px; }
#rightcontent { top: 3.5em !important; padding-top: 5px; }
#leftcontent h3 { cursor: pointer; -moz-transition: background 300ms ease 0s; background: none no-repeat scroll 1em center #eee; border-bottom: 1px solid #ddd; border-top: 1px solid #fff; display: block; max-width: 100%; padding: 0.5em 0.8em; color: #666; text-shadow: 0 1px 0 #f8f8f8; font-size: 1.2em; }
-#leftcontent h3:hover { background-color: #DBDBDB; border-bottom: 1px solid #CCCCCC; border-top: 1px solid #D4D4D4; color: #333333; }
+#leftcontent h3:hover,#leftcontent h3:active,#leftcontent h3.active { background-color: #DBDBDB; border-bottom: 1px solid #CCCCCC; border-top: 1px solid #D4D4D4; color: #333333; }
#contacts { position: fixed; background: #fff; max-width: 100%; width: 20em; left: 12.5em; top: 3.7em; bottom: 3em; overflow: auto; padding: 0; margin: 0; }
.contacts a { height: 23px; display: block; left: 12.5em; margin: 0 0 0 0; padding: 0 0 0 25px; }
#bottomcontrols { padding: 0; bottom:0px; height:2.8em; width: 20em; margin:0; background:#eee; border-top:1px solid #ccc; position:fixed; -moz-box-shadow: 0 -3px 3px -3px #000; -webkit-box-shadow: 0 -3px 3px -3px #000; box-shadow: 0 -3px 3px -3px #000;}
diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js
index 0654976a6dd..0325b2cec2a 100644
--- a/apps/contacts/js/contacts.js
+++ b/apps/contacts/js/contacts.js
@@ -310,10 +310,11 @@ Contacts={
editNew:function(){ // add a new contact
this.id = ''; this.fn = ''; this.fullname = ''; this.givname = ''; this.famname = ''; this.addname = ''; this.honpre = ''; this.honsuf = '';
//Contacts.UI.Card.add(t('contacts', 'Contact')+';'+t('contacts', 'New')+';;;', t('contacts', 'New Contact'), '', true);
- Contacts.UI.Card.add(';;;;;', '', '', true);
+ Contacts.UI.Card.add(';;;;;', '', this.bookid, true);
return false;
},
add:function(n, fn, aid, isnew){ // add a new contact
+ aid = aid?aid:$('#contacts h3.active').first().data('id');
var localAddcontact = function(n, fn, aid, isnew) {
$.post(OC.filePath('contacts', 'ajax', 'addcontact.php'), { n: n, fn: fn, aid: aid, isnew: isnew },
function(jsondata) {
@@ -1605,6 +1606,8 @@ $(document).ready(function(){
});
$(document).on('click', '.addressbook', function(event){
+ $('#contacts h3').removeClass('active');
+ $(this).addClass('active');
$(this).next().slideToggle(300);
return false;
});