From 4852932fb584bcb91aaf9492ff77486f8ef2fd04 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Thu, 6 Sep 2012 16:35:46 +0200 Subject: [PATCH] Contacts: Improve firstrun. --- css/contacts.css | 4 +++- js/contacts.js | 6 ++---- templates/part.no_contacts.php | 6 +++++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/css/contacts.css b/css/contacts.css index b475b50d..98838d67 100644 --- a/css/contacts.css +++ b/css/contacts.css @@ -31,7 +31,9 @@ button.control { float: left; margin: 0.2em 0 0 1em; height: 2.4em; width: 2.4em #contacts_propertymenu li:hover { background-color: #1d2d44; } #contacts_propertymenu li a:hover { color: #fff } #card { width: auto; font-size: 10px; /*max-width: 70em; border: thin solid lightgray; display: block;*/ } -#firstrun { width: 100%; position: absolute; top: 5em; left: 0; text-align: center; font-weight:bold; font-size:1.5em; color:#777; } +#firstrun { position: relative; top: 25%; left: 20%; right: 20%; width: 50%; font-weight:bold; text-align: center; color: #777; } +#firstrun h3 { font-size:1.5em; text-align: center; margin-bottom: 1em; } +#firstrun p { font-size:1.2em; text-align: } #firstrun #selections { font-size:0.8em; margin: 2em auto auto auto; clear: both; } #card input[type="text"].contacts_property,input[type="email"].contacts_property,input[type="url"].contacts_property { width: 14em; float: left; font-weight: bold; } diff --git a/js/contacts.js b/js/contacts.js index c26a1730..b8b39d6a 100644 --- a/js/contacts.js +++ b/js/contacts.js @@ -369,8 +369,9 @@ OC.Contacts={ } // Make sure proper DOM is loaded. - if(!$('#card').length && newid) { + if(newid) { console.log('Loading card DOM'); + localLoadContact(newid, bookid); $('#firstrun').hide(); $('#card').show(); } else if(!newid) { @@ -379,9 +380,6 @@ OC.Contacts={ $('#firstrun').show(); $('#card').hide(); } - else { - localLoadContact(newid, bookid); - } $('#contacts h3[data-id="'+bookid+'"]').addClass('active'); }, setEnabled:function(enabled) { diff --git a/templates/part.no_contacts.php b/templates/part.no_contacts.php index b27bb332..5b9affff 100644 --- a/templates/part.no_contacts.php +++ b/templates/part.no_contacts.php @@ -1,6 +1,10 @@
> - t('You have no contacts in your addressbook.') ?> + t('

You have no contacts in your addressbook.

' + . '

You can import VCF files by dragging them to the contacts list and either ' + . 'drop them on an addressbook to import into it, or on an empty spot to create ' + . 'a new addressbook and import into that.
You can also import by clicking ' + . 'on the import button at the bottom of the list.

') ?>