1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-11-29 11:24:11 +01:00

Contacts: Forgot to save NOTE

This commit is contained in:
Thomas Tanghus 2012-12-11 02:27:37 +01:00
parent b0f1407495
commit 9d448872b9
3 changed files with 16 additions and 6 deletions

View File

@ -399,6 +399,8 @@ input.propertytype { float: left; font-size: .8em; width: 8em !important; text-a
.adr.editor input.value.zip { width: 5em; } .adr.editor input.value.zip { width: 5em; }
.adr.editor input.value.city { width: 10em; } .adr.editor input.value.city { width: 10em; }
.note { margin-left: 120px; }
#rightcontent footer { padding: 1em; width: 100%; -moz-box-sizing: border-box; box-sizing: border-box; clear: both; } #rightcontent footer { padding: 1em; width: 100%; -moz-box-sizing: border-box; box-sizing: border-box; clear: both; }
#rightcontent footer > { display: inline-block; } #rightcontent footer > { display: inline-block; }
/* contact list */ /* contact list */

View File

@ -46,20 +46,21 @@ OC.Contacts = OC.Contacts || {};
case 'TITLE': case 'TITLE':
case 'ORG': case 'ORG':
case 'BDAY': case 'BDAY':
case 'NOTE':
this.$fullelem.find('[data-element="' + name.toLowerCase() + '"]').addClass('new').show(); this.$fullelem.find('[data-element="' + name.toLowerCase() + '"]').addClass('new').show();
$option.prop('disabled', true); $option.prop('disabled', true);
break; break;
case 'TEL': case 'TEL':
case 'URL': case 'URL':
case 'EMAIL': case 'EMAIL':
$elem = this.renderStandardProperty(name.toLowerCase()); var $elem = this.renderStandardProperty(name.toLowerCase());
var $list = this.$fullelem.find('ul.' + name.toLowerCase()); var $list = this.$fullelem.find('ul.' + name.toLowerCase());
$list.show(); $list.show();
$list.append($elem); $list.append($elem);
$elem.find('input.value').addClass('new'); $elem.find('input.value').addClass('new');
break; break;
case 'ADR': case 'ADR':
$elem = this.renderAddressProperty(); var $elem = this.renderAddressProperty();
var $list = this.$fullelem.find('ul.' + name.toLowerCase()); var $list = this.$fullelem.find('ul.' + name.toLowerCase());
$list.show(); $list.show();
$list.append($elem); $list.append($elem);
@ -279,6 +280,7 @@ OC.Contacts = OC.Contacts || {};
case 'BDAY': case 'BDAY':
case 'ORG': case 'ORG':
case 'TITLE': case 'TITLE':
case 'NOTE':
self.data[element][0] = { self.data[element][0] = {
name: element, name: element,
value: value, value: value,
@ -448,8 +450,13 @@ OC.Contacts = OC.Contacts || {};
if($(obj).hasClass('propertycontainer')) { if($(obj).hasClass('propertycontainer')) {
q += '&value=' + encodeURIComponent($(obj).val()); q += '&value=' + encodeURIComponent($(obj).val());
} else { } else {
q += '&' + this.propertyContainerFor(obj) var $elements = this.propertyContainerFor(obj)
.find('input.value,select.value,textarea.value,.parameter').serialize(); .find('input.value,select.value,textarea.value,.parameter');
if($elements.length > 1) {
q += '&' + $elements.serialize();
} else {
q += '&value=' + encodeURIComponent($elements.val());
}
} }
return q; return q;
} }
@ -556,8 +563,9 @@ OC.Contacts = OC.Contacts || {};
$.datepicker.parseDate('yy-mm-dd', $.datepicker.parseDate('yy-mm-dd',
this.getPreferredValue('BDAY', '').substring(0, 10))) this.getPreferredValue('BDAY', '').substring(0, 10)))
: '', : '',
note: this.getPreferredValue('NOTE', ''),
} }
: {id: '', favorite: '', name: '', nickname: '', title: '', org: '', bday: '', n0: '', n1: '', n2: '', n3: '', n4: ''}; : {id:'', favorite:'', name:'', nickname:'', title:'', org:'', bday:'', note:'', n0:'', n1:'', n2:'', n3:'', n4:''};
this.$fullelem = this.$fullTemplate.octemplate(values).data('contactobject', this); this.$fullelem = this.$fullTemplate.octemplate(values).data('contactobject', this);
this.$fullelem.find('.tooltipped.rightwards.onfocus').tipsy({trigger: 'focus', gravity: 'w'}); this.$fullelem.find('.tooltipped.rightwards.onfocus').tipsy({trigger: 'focus', gravity: 'w'});
this.$fullelem.on('submit', function() { this.$fullelem.on('submit', function() {

View File

@ -257,7 +257,7 @@
</li> </li>
<li> <li>
<section class="note propertycontainer" data-element="note"> <section class="note propertycontainer" data-element="note">
<textarea class="value" placeholder="<?php echo $l->t('Notes go here...'); ?>"></textarea> <textarea class="value" placeholder="<?php echo $l->t('Notes go here...'); ?>">{note}</textarea>
</section> </section>
</li> </li>
</ul> </ul>