diff --git a/css/contacts.css b/css/contacts.css
index d7c9a6bf..483df219 100644
--- a/css/contacts.css
+++ b/css/contacts.css
@@ -32,7 +32,7 @@
#card input[type="text"].contacts_property,input[type="email"].contacts_property,input[type="url"].contacts_property { width: 14em; float: left; font-weight: bold; }
.categories { float: left; width: 16em; }
-#card input[type="text"],input[type="email"],input[type="url"],input[type="tel"],input[type="date"], select, textarea { background-color: #fefefe; border: 0 !important; -webkit-appearance:none !important; -moz-appearance:none !important; -webkit-box-sizing:none !important; -moz-box-sizing:none !important; box-sizing:none !important; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; -moz-border-radius: 0px; -webkit-border-radius: 0px; border-radius: 0px; float: left; }
+#card input[type="checkbox"].contacts_property,input[type="text"],input[type="email"],input[type="url"],input[type="tel"],input[type="date"], select, textarea { background-color: #fefefe; border: 0 !important; -moz-appearance:none !important; -webkit-box-sizing:none !important; -moz-box-sizing:none !important; box-sizing:none !important; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; -moz-border-radius: 0px; -webkit-border-radius: 0px; border-radius: 0px; float: left; }
#card input[type="text"]:hover, input[type="text"]:focus, input[type="text"]:active,input[type="email"]:hover,input[type="url"]:hover,input[type="tel"]:hover,input[type="date"]:hover,input[type="date"],input[type="date"]:hover,input[type="date"]:active,input[type="date"]:active,input[type="date"]:active,input[type="email"]:active,input[type="url"]:active,input[type="tel"]:active, select:hover, select:focus, select:active, textarea:focus, textarea:hover { border: 0 !important; -webkit-appearance:textfield; -moz-appearance:textfield; -webkit-box-sizing:content-box; -moz-box-sizing:content-box; box-sizing:content-box; background:#fff; color:#333; border:1px solid #ddd; -moz-box-shadow:0 1px 1px #ddd, 0 2px 0 #bbb inset; -webkit-box-shadow:0 1px 1px #ddd, 0 1px 0 #bbb inset; box-shadow:0 1px 1px #ddd, 0 1px 0 #bbb inset; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; outline:none; float: left; }
textarea { width: 80%; min-height: 5em; min-width: 30em; margin: 0 !important; padding: 0 !important; outline: 0 !important;}
dl.form { width: 100%; float: left; clear: right; margin: 0; padding: 0; cursor: normal; }
@@ -72,11 +72,11 @@ label:hover, dt:hover { color: #333; }
#name { /*position: absolute; top: 0px; left: 0px;*/ min-width: 25em; height: 2em; clear: right; display: block; }
#identityprops { /*position: absolute; top: 2.5em; left: 0px;*/ }
#contact_photo { float: left; margin: 1em; }
-#contact_identity { min-width: 30em; }
+#contact_identity { min-width: 30em; padding: 0.5em;}
.contactsection { position: relative; float: left; width: 35em; padding: 0.5em; height: auto; }
#cropbox { margin: auto; }
-#contacts_details_photo_wrapper { width: 200px; }
+#contacts_details_photo_wrapper { width: 150px; }
#contacts_details_photo_wrapper.wait { opacity: 0.6; filter:alpha(opacity=0.6); z-index:1000; background: url('%webroot%/core/img/loading.gif') no-repeat center center; cursor: wait; }
.contacts_details_photo { border-radius: 0.5em; border: thin solid #bbb; margin: 0.3em; background: url('%webroot%/core/img/loading.gif') no-repeat center center; -moz-box-shadow: 0 1px 3px #777; -webkit-box-shadow: 0 1px 3px #777; box-shadow: 0 1px 3px #777; opacity: 1; }
.contacts_details_photo:hover { background: #fff; cursor: default; }
@@ -120,9 +120,10 @@ input[type="checkbox"] { width: 20px; height: 20px; vertical-align: bottom; }
.propertylist { clear: none; max-width: 28em; }
.propertylist li.propertycontainer { white-space: nowrap; min-width: 35em; /*max-width: 30em;*/ display: block; clear: right; }
.propertycontainer[data-element="EMAIL"] > input[type="email"],.propertycontainer[data-element="TEL"] > input[type="text"] { min-width: 12em !important; float: left; }
-.propertylist li > input[type="checkbox"],input[type="radio"] { float: left; clear: left; width: 20px; height: 20px; vertical-align: middle; }
+.propertylist li > input[type="checkbox"],input[type="radio"] { float: left; clear: left; width: 16px; height: 16px; vertical-align: middle; padding: 0; }
.propertylist li > select { float: left; max-width: 8em; }
-.typelist[type="button"] { float: left; max-width: 10em; border: 0; background-color: #fff; color: #bbb} /* for multiselect */
+.propertylist li > label.xab { display: block; color: #bbb; float:left; clear: both; padding: 0.5em 0 0 2.5em; }
+.typelist[type="button"] { float: left; max-width: 10em; border: 0; background-color: #fff; color: #bbb; box-shadow: none; } /* for multiselect */
.typelist[type="button"]:hover { color: #777; } /* for multiselect */
.addresslist { clear: both; font-weight: bold; }
#ninjahelp { position: absolute; bottom: 0; left: 0; right: 0; padding: 1em; margin: 1em; opacity: 0.9; }
diff --git a/js/contacts.js b/js/contacts.js
index 8f52ec88..38f81213 100644
--- a/js/contacts.js
+++ b/js/contacts.js
@@ -1231,6 +1231,7 @@ OC.Contacts={
$(this.photo).load(function () {
$('img.contacts_details_photo').remove()
$(this).addClass('contacts_details_photo');
+ wrapper.css('width', $(this).get(0).width + 10);
wrapper.removeClass('loading').removeClass('wait');
$(this).insertAfter($('#phototools')).fadeIn();
}).error(function () {
@@ -1304,8 +1305,11 @@ OC.Contacts={
var emaillist = $('#emaillist');
for(var mail in this.data.EMAIL) {
this.addMail();
- //$('#emaillist li:first-child').clone().appendTo($('#emaillist')).show();
- var curemail = emaillist.find('li:last-child');
+ emaillist.find('li:last-child').find('select').multiselect('destroy');
+ var curemail = emaillist.find('li.propertycontainer:last-child');
+ if(typeof this.data.EMAIL[mail].label != 'undefined') {
+ curemail.prepend('');
+ }
curemail.data('checksum', this.data.EMAIL[mail]['checksum'])
curemail.find('input[type="email"]').val(this.data.EMAIL[mail]['value']);
for(var param in this.data.EMAIL[mail]['parameters']) {
@@ -1363,18 +1367,22 @@ OC.Contacts={
var phonelist = $('#phonelist');
for(var phone in this.data.TEL) {
this.addPhone();
- phonelist.find('li:last-child').find('select').multiselect('destroy');
- phonelist.find('li:last-child').data('checksum', this.data.TEL[phone]['checksum'])
- phonelist.find('li:last-child').find('input[type="text"]').val(this.data.TEL[phone]['value']);
+ var curphone = phonelist.find('li.propertycontainer:last-child');
+ if(typeof this.data.TEL[phone].label != 'undefined') {
+ curphone.prepend('');
+ }
+ curphone.find('select').multiselect('destroy');
+ curphone.data('checksum', this.data.TEL[phone]['checksum'])
+ curphone.find('input[type="text"]').val(this.data.TEL[phone]['value']);
for(var param in this.data.TEL[phone]['parameters']) {
if(param.toUpperCase() == 'PREF') {
- phonelist.find('li:last-child').find('input[type="checkbox"]').attr('checked', 'checked');
+ curphone.find('input[type="checkbox"]').attr('checked', 'checked');
}
else if(param.toUpperCase() == 'TYPE') {
for(ptype in this.data.TEL[phone]['parameters'][param]) {
var found = false;
var pt = this.data.TEL[phone]['parameters'][param][ptype];
- phonelist.find('li:last-child').find('select option').each(function() {
+ curphone.find('select option').each(function() {
//if ($(this).val().toUpperCase() == pt.toUpperCase()) {
if ($.inArray($(this).val().toUpperCase(), pt.toUpperCase().split(',')) > -1) {
$(this).attr('selected', 'selected');
@@ -1382,12 +1390,12 @@ OC.Contacts={
}
});
if(!found) {
- phonelist.find('li:last-child').find('select option:last-child').after('');
+ curphone.find('select option:last-child').after('');
}
}
}
}
- phonelist.find('li:last-child').find('select').multiselect({
+ curphone.find('select').multiselect({
noneSelectedText: t('contacts', 'Select type'),
header: false,
selectedList: 4,
diff --git a/lib/app.php b/lib/app.php
index f6ce213c..e222c608 100644
--- a/lib/app.php
+++ b/lib/app.php
@@ -129,6 +129,7 @@ class OC_Contacts_App {
return array(
'WORK' => $l->t('Work'),
'HOME' => $l->t('Home'),
+ 'OTHER' => $l->t('Other'),
);
case 'TEL':
return array(
@@ -141,6 +142,7 @@ class OC_Contacts_App {
'FAX' => $l->t('Fax'),
'VIDEO' => $l->t('Video'),
'PAGER' => $l->t('Pager'),
+ 'OTHER' => $l->t('Other'),
);
case 'EMAIL':
return array(
diff --git a/lib/vcard.php b/lib/vcard.php
index 8c38f1ba..5bc3d04b 100644
--- a/lib/vcard.php
+++ b/lib/vcard.php
@@ -562,6 +562,12 @@ class OC_Contacts_VCard{
foreach($object->children as $property){
$temp = self::structureProperty($property);
if(!is_null($temp)) {
+ if(isset($object->{$property->group . '.X-ABLABEL'})) {
+ $temp['label'] = $object->{$property->group . '.X-ABLABEL'}->value;
+ if($temp['label'] == '_$!!$_') {
+ $temp['label'] = OC_Contacts_App::$l10n->t('Other');
+ }
+ }
if(array_key_exists($property->name, $details)) {
$details[$property->name][] = $temp;
}
@@ -612,7 +618,7 @@ class OC_Contacts_VCard{
// Faulty entries by kaddressbook
// Actually TYPE=PREF is correct according to RFC 2426
// but this way is more handy in the UI. Tanghus.
- if($parameter->name == 'TYPE' && $parameter->value == 'PREF') {
+ if($parameter->name == 'TYPE' && strtoupper($parameter->value) == 'PREF') {
$parameter->name = 'PREF';
$parameter->value = '1';
}