diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2012-03-13 02:55:17 +0100 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2012-03-13 02:55:17 +0100 |
commit | 6b01d7be9ac4cb014166a523297cfdc5c1e4eabe (patch) | |
tree | be74715ea2d838345ec87486d17e4ff453706a2a | |
parent | dd0daa6e33bad82f02333e9df36850042604cc63 (diff) | |
download | nextcloud-server-6b01d7be9ac4cb014166a523297cfdc5c1e4eabe.tar.gz nextcloud-server-6b01d7be9ac4cb014166a523297cfdc5c1e4eabe.zip |
Fixed NOTE property UI.
-rw-r--r-- | apps/contacts/js/contacts.js | 10 | ||||
-rw-r--r-- | apps/contacts/templates/part.contact.php | 6 |
2 files changed, 11 insertions, 5 deletions
diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js index 21246e1108c..13d71be384d 100644 --- a/apps/contacts/js/contacts.js +++ b/apps/contacts/js/contacts.js @@ -558,7 +558,7 @@ Contacts={ var name = container.data('element'); console.log('saveProperty: ' + name); var fields = container.find('input.contacts_property,select.contacts_property').serializeArray(); - var q = container.find('input.contacts_property,select.contacts_property').serialize(); + var q = container.find('input.contacts_property,select.contacts_property,textarea.contacts_property').serialize(); if(q == '' || q == undefined) { console.log('Couldn\'t serialize elements.'); Contacts.UI.loading(container, false); @@ -662,7 +662,13 @@ Contacts={ } else if(type == 'single') { var proptype = Contacts.UI.propertyTypeFor(obj); console.log('deleteProperty, hiding: ' + proptype); - $('dl dt[data-element="'+proptype+'"],dd[data-element="'+proptype+'"]').hide(); + if(proptype == 'NOTE') { + Contacts.UI.propertyContainerFor(obj).hide(); + Contacts.UI.propertyContainerFor(obj).data('checksum', ''); + } else { + $('dl dt[data-element="'+proptype+'"],dd[data-element="'+proptype+'"]').hide(); + $('dl dd[data-element="'+proptype+'"]').data('checksum', ''); + } $('#contacts_propertymenu a[data-type="'+proptype+'"]').parent().show(); Contacts.UI.loading(obj, false); } else { diff --git a/apps/contacts/templates/part.contact.php b/apps/contacts/templates/part.contact.php index 87ee40e99f5..a3b4917ae98 100644 --- a/apps/contacts/templates/part.contact.php +++ b/apps/contacts/templates/part.contact.php @@ -66,9 +66,9 @@ $id = isset($_['id']) ? $_['id'] : ''; <dd style="display:none;" class="propertycontainer" id="categories_value" data-element="CATEGORIES"><input id="categories" required="required" name="value[CATEGORIES]" type="text" class="contacts_property" style="width:16em;" name="value" value="" placeholder="<?php echo $l->t('Categories'); ?>" /><a class="delete" onclick="$(this).tipsy('hide');Contacts.UI.Card.deleteProperty(this, 'single');" title="<?php echo $l->t('Delete'); ?>"></a><a class="action edit" onclick="$(this).tipsy('hide');OCCategories.edit();" title="<?php echo $l->t('Edit categories'); ?>"></a></dd> </dl> </fieldset> - <fieldset id="note" class="formfloat propertycontainer" style="display:none;" data-element="NOTE"> - <legend><?php echo $l->t('Note'); ?></legend> - <textarea class="contacts_property note" name="value"></textarea> + <fieldset id="note" class="formfloat propertycontainer contactpart" style="display:none;" data-element="NOTE"> + <legend><?php echo $l->t('Note'); ?><a class="delete" onclick="$(this).tipsy('hide');Contacts.UI.Card.deleteProperty(this, 'single');" title="<?php echo $l->t('Delete'); ?>"></a></legend> + <textarea class="contacts_property note" name="value" cols="60" rows="10"></textarea> </fieldset> </form> </div> |