mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-12-01 13:24:10 +01:00
Contacts: Misc. js and css fixes.
This commit is contained in:
parent
0224d3a941
commit
9ae6a23e04
@ -29,14 +29,14 @@
|
||||
top: -8px;
|
||||
left: -6px;
|
||||
}
|
||||
#content textarea { font-family: inherit; }
|
||||
#contact textarea { font-family: inherit; }
|
||||
|
||||
#content ::-moz-placeholder, #content input:-moz-placeholder, #content input[placeholder], #content input:placeholder, #content input:-ms-input-placeholder, #content input::-webkit-input-placeholder, #content input:-moz-placeholder {
|
||||
#contact ::-moz-placeholder, #contact input:-moz-placeholder, #contact input[placeholder], #contact input:placeholder, #contact input:-ms-input-placeholder, #contact input::-webkit-input-placeholder, #contact input:-moz-placeholder {
|
||||
color: #bbb;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
#content input:not([type="checkbox"]), #content select:not(.button), #content textarea {
|
||||
#contact input:not([type="checkbox"]), #contact select:not(.button), #contact textarea {
|
||||
background-color: #fefefe; border: 1px solid #fff !important;
|
||||
-moz-appearance:none !important; -webkit-appearance: none !important;
|
||||
-moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none;
|
||||
@ -44,17 +44,17 @@
|
||||
-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
|
||||
float: left;
|
||||
}
|
||||
#content input[type="button"]:hover, #content select:hover, #content select:focus, #content select:active, #content input[type="button"]:focus, #content .button:hover, button:hover { background-color:#fff; color:#333; }
|
||||
#contact input[type="button"]:hover, #contact select:hover, #contact select:focus, #contact select:active, #contact input[type="button"]:focus, #contact .button:hover, button:hover { background-color:#fff; color:#333; }
|
||||
|
||||
#content fieldset, #content div, #content span, #content section {
|
||||
#contact fieldset, #contact div, #contact span, #contact section {
|
||||
-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
|
||||
}
|
||||
#content fieldset.editor {
|
||||
#contact fieldset.editor {
|
||||
padding:4px;
|
||||
border: 1px solid #1d2d44;
|
||||
-moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; outline:none;
|
||||
}
|
||||
#content input:invalid, #content input:hover:not([type="checkbox"]), #content input:active:not([type="checkbox"]), #content input:focus:not([type="checkbox"]), #content input.active, #content textarea:focus, #content textarea:hover {
|
||||
#contact input:invalid, #contact input:hover:not([type="checkbox"]), #contact input:active:not([type="checkbox"]), #contact input:focus:not([type="checkbox"]), #contact input.active, #contact textarea:focus, #contact textarea:hover {
|
||||
border: 1px solid silver !important;
|
||||
-moz-border-radius:.3em; -webkit-border-radius:.3em; border-radius:.3em;
|
||||
outline:none; float: left;
|
||||
@ -316,7 +316,7 @@ ul.propertylist { width: 450px; }
|
||||
.propertylist li > input[type="checkbox"].impp { clear: none; }
|
||||
.propertylist li > label.xab { display: block; color: #bbb; float:left; clear: both; padding: 0.5em 0 0 2.5em; }
|
||||
.propertylist li > label.xab:hover { color: #777; }
|
||||
#rightcontent label, #rightcontent dt, #rightcontent th, #rightcontent .label {
|
||||
#contact label, #contact dt, #contact th, #contact .label {
|
||||
float: left;
|
||||
font-size: 0.7em; font-weight: bold;
|
||||
color: #bbb !important;
|
||||
@ -325,9 +325,9 @@ ul.propertylist { width: 450px; }
|
||||
box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
}
|
||||
#rightcontent label:hover, #rightcontent dt:hover, #rightcontent input.label:hover { color: #777 !important; }
|
||||
#rightcontent input.label, #rightcontent input.label { margin:-2px; }
|
||||
#rightcontent input.label:hover, #rightcontent input.label:active { border: 0 none !important; border-radius: 0; cursor: pointer; }
|
||||
#contact label:hover, #contact dt:hover, #contact input.label:hover { color: #777 !important; }
|
||||
#contact input.label, #contact input.label { margin:-2px; }
|
||||
#contact input.label:hover, #contact input.label:active { border: 0 none !important; border-radius: 0; cursor: pointer; }
|
||||
.typelist[type="button"] { float: left; max-width: 8em; 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; }
|
||||
@ -411,6 +411,12 @@ ul.propertylist { width: 450px; }
|
||||
cursor: pointer;
|
||||
z-index: 1001;
|
||||
}
|
||||
/* Those dang Germans and their long sentences ;) */
|
||||
label[for="import_upload_start"] {
|
||||
display: inline-block;
|
||||
max-width: 16em;
|
||||
white-space: pre-line;
|
||||
}
|
||||
.import-upload-button {
|
||||
background-image: url("%webroot%/core/img/actions/upload.svg");
|
||||
background-position: center center;
|
||||
|
16
js/app.js
16
js/app.js
@ -319,6 +319,8 @@ OC.Contacts = OC.Contacts || {
|
||||
|
||||
// Keep error messaging at one place to be able to replace it.
|
||||
$(document).bind('status.contact.error', function(e, data) {
|
||||
console.warn(data.message);
|
||||
console.trace();
|
||||
OC.notify({message:data.message});
|
||||
});
|
||||
|
||||
@ -428,19 +430,19 @@ OC.Contacts = OC.Contacts || {
|
||||
});
|
||||
|
||||
$(document).bind('request.contact.export', function(e, data) {
|
||||
var id = parseInt(data.id);
|
||||
var id = String(data.id);
|
||||
console.log('contact', data.id, 'request.contact.export');
|
||||
document.location.href = OC.linkTo('contacts', 'export.php') + '?' + $.param(data);
|
||||
});
|
||||
|
||||
$(document).bind('request.contact.close', function(e, data) {
|
||||
var id = parseInt(data.id);
|
||||
var id = String(data.id);
|
||||
console.log('contact', data.id, 'request.contact.close');
|
||||
self.closeContact(id);
|
||||
});
|
||||
|
||||
$(document).bind('request.contact.delete', function(e, data) {
|
||||
var id = parseInt(data.contactid);
|
||||
var id = String(data.contactid);
|
||||
console.log('contact', data, 'request.contact.delete');
|
||||
self.closeContact(id);
|
||||
self.contacts.delayedDelete(data);
|
||||
@ -1289,7 +1291,7 @@ OC.Contacts = OC.Contacts || {
|
||||
});
|
||||
|
||||
$(document).on('keyup', function(event) {
|
||||
if(!$(event.target).is('body')) {
|
||||
if(!$(event.target).is('body') || event.isPropagationStopped()) {
|
||||
return;
|
||||
}
|
||||
var keyCode = Math.max(event.keyCode, event.which);
|
||||
@ -1455,7 +1457,6 @@ OC.Contacts = OC.Contacts || {
|
||||
{
|
||||
text: t('contacts', 'OK'),
|
||||
click:function() {
|
||||
console.log(this, $(this).find('input'));
|
||||
var name = $(this).find('input').val();
|
||||
if(name.trim() === '') {
|
||||
return false;
|
||||
@ -1471,9 +1472,9 @@ OC.Contacts = OC.Contacts || {
|
||||
}
|
||||
}
|
||||
});
|
||||
console.log('this?', this);
|
||||
$(this).ocdialog('close');
|
||||
}
|
||||
},
|
||||
defaultButton: true
|
||||
},
|
||||
{
|
||||
text: t('contacts', 'Cancel'),
|
||||
@ -1486,6 +1487,7 @@ OC.Contacts = OC.Contacts || {
|
||||
close: function(event, ui) {
|
||||
$(this).ocdialog('destroy').remove();
|
||||
$('#add_group_dialog').remove();
|
||||
self.$contactList.removeClass('dim');
|
||||
},
|
||||
open: function(event, ui) {
|
||||
$dlg.find('input').focus();
|
||||
|
@ -379,12 +379,11 @@ OC.Contacts = OC.Contacts || {};
|
||||
}
|
||||
var obj = null;
|
||||
var element = null;
|
||||
var args = [], q = '';
|
||||
var args = [];
|
||||
if(params.obj) {
|
||||
obj = params.obj;
|
||||
args = this.argumentsFor(obj);
|
||||
args['parameters'] = this.parametersFor(obj);
|
||||
q = this.queryStringFor(obj);
|
||||
element = this.propertyTypeFor(obj);
|
||||
} else {
|
||||
args = params;
|
||||
@ -392,9 +391,7 @@ OC.Contacts = OC.Contacts || {};
|
||||
var value = utils.isArray(params.value)
|
||||
? $.param(params.value)
|
||||
: encodeURIComponent(params.value);
|
||||
q = 'id=' + this.id + '&value=' + value + '&name=' + element;
|
||||
}
|
||||
console.log('q', q);
|
||||
console.log('args', args);
|
||||
var self = this;
|
||||
this.setAsSaving(obj, true);
|
||||
@ -1800,8 +1797,12 @@ OC.Contacts = OC.Contacts || {};
|
||||
if(!utils.isArray(data)) {
|
||||
this.currentContact = null;
|
||||
//self.$contactList.show();
|
||||
var contact = this.findById(data.contactid);
|
||||
this.deletionQueue.push(contact);
|
||||
if(data instanceof Contact) {
|
||||
this.deletionQueue.push(data);
|
||||
} else {
|
||||
var contact = this.findById(data.contactid);
|
||||
this.deletionQueue.push(contact);
|
||||
}
|
||||
} else if(utils.isArray(data)) {
|
||||
$.each(data, function(idx, contact) {
|
||||
console.log('delayedDelete, meta:', contact);
|
||||
|
Loading…
Reference in New Issue
Block a user