Click to select which address book to add to.

This commit is contained in:
Thomas Tanghus 2012-06-24 16:03:10 +02:00
parent b182e6c86a
commit 5393c0cfed
2 changed files with 5 additions and 2 deletions

View File

@ -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;}

View File

@ -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;
});