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

Add placeholder to name and focus it. Fix #237

This commit is contained in:
Thomas Tanghus 2013-10-29 21:19:10 +01:00
parent ac114ee53c
commit 85a16f8241
2 changed files with 3 additions and 3 deletions

View File

@ -1021,7 +1021,7 @@ OC.Contacts = OC.Contacts || {
self.$firstRun.hide(); self.$firstRun.hide();
self.$contactList.show(); self.$contactList.show();
self.tmpcontact = self.contacts.addContact(groupprops); self.tmpcontact = self.contacts.addContact(groupprops);
self.tmpcontact.prependTo(self.$contactList.find('tbody')).show(); self.tmpcontact.prependTo(self.$contactList.find('tbody')).show().find('.fullname').focus();
self.$rightContent.scrollTop(0); self.$rightContent.scrollTop(0);
self.hideActions(); self.hideActions();
}; };
@ -1401,7 +1401,7 @@ OC.Contacts = OC.Contacts || {
console.log('selected element', $listElement); console.log('selected element', $listElement);
window.location.hash = this.currentid; window.location.hash = this.currentid;
self.jumpToContact(self.currentid); self.jumpToContact(self.currentid);
$contactelem.insertAfter($listElement).show(); $contactelem.insertAfter($listElement).show().find('.fullname').focus();
$listElement.hide(); $listElement.hide();
setTimeout(function() { setTimeout(function() {
$(window).bind('hashchange', self.hashChange); $(window).bind('hashchange', self.hashChange);

View File

@ -230,7 +230,7 @@
<a class="favorite action {favorite}"></a> <a class="favorite action {favorite}"></a>
</div> </div>
<div class="singleproperties"> <div class="singleproperties">
<input data-element="fn" class="fullname value propertycontainer" type="text" name="value" value="{name}" required /> <input data-element="fn" class="fullname value propertycontainer" type="text" name="value" value="{name}" placeholder="<?php p($l->t('Name')); ?>" required />
<a class="action edit"></a> <a class="action edit"></a>
<fieldset class="n hidden editor propertycontainer" data-element="n"> <fieldset class="n hidden editor propertycontainer" data-element="n">
<ul> <ul>