1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2025-01-30 19:52:17 +01:00

Contacts: Improve firstrun.

This commit is contained in:
Thomas Tanghus 2012-09-06 16:35:46 +02:00
parent 09f7b632d4
commit 4852932fb5
3 changed files with 10 additions and 6 deletions

View File

@ -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:hover { background-color: #1d2d44; }
#contacts_propertymenu li a:hover { color: #fff } #contacts_propertymenu li a:hover { color: #fff }
#card { width: auto; font-size: 10px; /*max-width: 70em; border: thin solid lightgray; display: block;*/ } #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; } #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; } #card input[type="text"].contacts_property,input[type="email"].contacts_property,input[type="url"].contacts_property { width: 14em; float: left; font-weight: bold; }

View File

@ -369,8 +369,9 @@ OC.Contacts={
} }
// Make sure proper DOM is loaded. // Make sure proper DOM is loaded.
if(!$('#card').length && newid) { if(newid) {
console.log('Loading card DOM'); console.log('Loading card DOM');
localLoadContact(newid, bookid);
$('#firstrun').hide(); $('#firstrun').hide();
$('#card').show(); $('#card').show();
} else if(!newid) { } else if(!newid) {
@ -379,9 +380,6 @@ OC.Contacts={
$('#firstrun').show(); $('#firstrun').show();
$('#card').hide(); $('#card').hide();
} }
else {
localLoadContact(newid, bookid);
}
$('#contacts h3[data-id="'+bookid+'"]').addClass('active'); $('#contacts h3[data-id="'+bookid+'"]').addClass('active');
}, },
setEnabled:function(enabled) { setEnabled:function(enabled) {

View File

@ -1,6 +1,10 @@
<div id="appsettings" class="popup bottomleft hidden"></div> <div id="appsettings" class="popup bottomleft hidden"></div>
<div id="firstrun" <?php if($_['has_contacts']) { echo 'class="hidden"';} ?>> <div id="firstrun" <?php if($_['has_contacts']) { echo 'class="hidden"';} ?>>
<?php echo $l->t('You have no contacts in your addressbook.') ?> <?php echo $l->t('<h3>You have no contacts in your addressbook.</h3>'
. '<p>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.<br />You can also import by clicking '
. 'on the import button at the bottom of the list.</p>') ?>
<div id="selections"> <div id="selections">
<input type="button" value="<?php echo $l->t('Add contact') ?>" onclick="OC.Contacts.Card.editNew()" /> <input type="button" value="<?php echo $l->t('Add contact') ?>" onclick="OC.Contacts.Card.editNew()" />
</div> </div>