mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-01-30 19:52:17 +01:00
Merge branch 'master' into multi_app_dir
This commit is contained in:
commit
7009e70bf5
@ -31,8 +31,9 @@ dl.form { width: 100%; float: left; clear: right; margin: 0; padding: 0; }
|
||||
.form dt { display: table-cell; clear: left; float: left; width: 7em; margin: 0; padding: 0.8em 0.5em 0 0; text-align:right; text-overflow:ellipsis; o-text-overflow: ellipsis; vertical-align: text-bottom; color: #bbb;/* white-space: pre-wrap; white-space: -moz-pre-wrap !important; white-space: -pre-wrap; white-space: -o-pre-wrap;*/ }
|
||||
.form dd { display: table-cell; clear: right; float: left; margin: 0; padding: 0px; white-space: nowrap; vertical-align: text-bottom; }
|
||||
label:hover, dt:hover { color: #333; }
|
||||
#address.form dt { min-width: 5em; }
|
||||
#address.form dl { min-width: 10em; }
|
||||
/*::-webkit-input-placeholder { color: #bbb; }
|
||||
:-moz-placeholder { color: #bbb; }
|
||||
:-ms-input-placeholder { color: #bbb; }*/
|
||||
.droptarget { margin: 0.5em; padding: 0.5em; border: thin solid #ccc; -moz-border-radius:.3em; -webkit-border-radius:.3em; border-radius:.3em; }
|
||||
.droppable { margin: 0.5em; padding: 0.5em; border: thin dashed #333; -moz-border-radius:.3em; -webkit-border-radius:.3em; border-radius:.3em; }
|
||||
.loading { background: url('%webroot%/core/img/loading.gif') no-repeat center !important; /*cursor: progress; */ cursor: wait; }
|
||||
@ -79,10 +80,17 @@ label:hover, dt:hover { color: #333; }
|
||||
#addressdisplay { padding: 0.5em; }
|
||||
dl.addresscard { background-color: #fff; float: left; width: auto; margin: 0 0.3em 0.3em 0.3em; padding: 0; border: 0; }
|
||||
dl.addresscard dd {}
|
||||
dl.addresscard dt { padding: 0.3em; font-weight: bold; clear: both; color: #bbb;}
|
||||
dl.addresscard dt { padding: 0.3em; font-weight: bold; clear: both; color: #aaa; }
|
||||
dl.addresscard dt:hover { color:#777; }
|
||||
dl.addresscard dd > ul { margin: 0.3em; padding: 0.3em; }
|
||||
dl.addresscard .action { float: right; }
|
||||
#address dt { width: 30%; white-space:nowrap; }
|
||||
#address dd { width: 66%; }
|
||||
#address input { width: 12em; padding: 0.6em 0.5em 0.4em; }
|
||||
#address input:-moz-placeholder { color: #aaa; }
|
||||
#address input::-webkit-input-placeholder { color: #aaa; }
|
||||
#address input:-ms-input-placeholder { color: #aaa; }
|
||||
#address input:placeholder { color: #aaa; }
|
||||
#adr_type {} /* Select */
|
||||
#adr_pobox {}
|
||||
#adr_extended {}
|
||||
|
@ -1281,7 +1281,7 @@ Contacts={
|
||||
},
|
||||
Addressbooks:{
|
||||
droptarget:undefined,
|
||||
droptext:t('contacts', 'Drop a VCF file to import contacts.'),
|
||||
droptext:t('contacts', 'Drop a VCF file<br />to import contacts.'),
|
||||
overview:function(){
|
||||
if($('#chooseaddressbook_dialog').dialog('isOpen') == true){
|
||||
$('#chooseaddressbook_dialog').dialog('moveToTop');
|
||||
@ -1290,7 +1290,7 @@ Contacts={
|
||||
$.getJSON(OC.filePath('contacts', 'ajax', 'chooseaddressbook.php'), function(jsondata){
|
||||
if(jsondata.status == 'success'){
|
||||
$('#addressbook_dialog').html(jsondata.data.page).find('#chooseaddressbook_dialog').dialog({
|
||||
width : 600,
|
||||
minWidth : 600,
|
||||
close : function(event, ui) {
|
||||
$(this).dialog('destroy').remove();
|
||||
$('#addressbook_dialog').remove();
|
||||
|
@ -23,16 +23,16 @@
|
||||
minLength: 0,
|
||||
source: function( request, response ) {
|
||||
var matcher = new RegExp( $.ui.autocomplete.escapeRegex(request.term), "i" );
|
||||
response( select.children( "option" ).map(function() {
|
||||
response( select.children('option').map(function() {
|
||||
var text = $( this ).text();
|
||||
if ( this.value && ( !request.term || matcher.test(text) ) )
|
||||
return {
|
||||
label: text.replace(
|
||||
new RegExp(
|
||||
"(?![^&;]+;)(?!<[^<>]*)(" +
|
||||
'(?![^&;]+;)(?!<[^<>]*)(' +
|
||||
$.ui.autocomplete.escapeRegex(request.term) +
|
||||
")(?![^<>]*>)(?![^&;]+;)", "gi"
|
||||
), "<strong>$1</strong>" ),
|
||||
')(?![^<>]*>)(?![^&;]+;)', 'gi'
|
||||
), '<strong>$1</strong>'),
|
||||
value: text,
|
||||
option: this
|
||||
};
|
||||
@ -42,17 +42,17 @@
|
||||
self.input.val($(ui.item.option).text());
|
||||
self.input.trigger('change');
|
||||
ui.item.option.selected = true;
|
||||
self._trigger( "selected", event, {
|
||||
self._trigger('selected', event, {
|
||||
item: ui.item.option
|
||||
});
|
||||
},
|
||||
change: function( event, ui ) {
|
||||
if ( !ui.item ) {
|
||||
var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( $(this).val() ) + "$", "i" ),
|
||||
var matcher = new RegExp( '^' + $.ui.autocomplete.escapeRegex( $(this).val() ) + '$', 'i' ),
|
||||
valid = false;
|
||||
self.input.val($(this).val());
|
||||
//self.input.trigger('change');
|
||||
select.children( "option" ).each(function() {
|
||||
select.children('option').each(function() {
|
||||
if ( $( this ).text().match( matcher ) ) {
|
||||
this.selected = valid = true;
|
||||
return false;
|
||||
@ -62,36 +62,41 @@
|
||||
// remove invalid value, as it didn't match anything
|
||||
$( this ).val( "" );
|
||||
select.val( "" );
|
||||
input.data( "autocomplete" ).term = "";
|
||||
input.data('autocomplete').term = '';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
.addClass( "ui-widget ui-widget-content ui-corner-left" );
|
||||
.addClass('ui-widget ui-widget-content ui-corner-left');
|
||||
|
||||
input.data( "autocomplete" )._renderItem = function( ul, item ) {
|
||||
return $( "<li></li>" )
|
||||
.data( "item.autocomplete", item )
|
||||
.append( "<a>" + item.label + "</a>" )
|
||||
input.data('autocomplete')._renderItem = function( ul, item ) {
|
||||
return $('<li></li>')
|
||||
.data('item.autocomplete', item )
|
||||
.append('<a>' + item.label + '</a>')
|
||||
.appendTo( ul );
|
||||
};
|
||||
$.each(this.options, function(key, value) {
|
||||
self._setOption(key, value);
|
||||
});
|
||||
|
||||
input.dblclick(function() {
|
||||
// pass empty string as value to search for, displaying all results
|
||||
input.autocomplete('search', '');
|
||||
});
|
||||
|
||||
if(this.options['showButton']) {
|
||||
this.button = $( "<button type='button'> </button>" )
|
||||
.attr( "tabIndex", -1 )
|
||||
.attr( "title", "Show All Items" )
|
||||
this.button = $('<button type="button"> </button>')
|
||||
.attr('tabIndex', -1 )
|
||||
.attr('title', 'Show All Items')
|
||||
.insertAfter( input )
|
||||
.addClass('svg')
|
||||
.addClass('action')
|
||||
.addClass('combo-button')
|
||||
.click(function() {
|
||||
// close if already visible
|
||||
if ( input.autocomplete( "widget" ).is( ":visible" ) ) {
|
||||
input.autocomplete( "close" );
|
||||
if ( input.autocomplete('widget').is(':visible') ) {
|
||||
input.autocomplete('close');
|
||||
return;
|
||||
}
|
||||
|
||||
@ -99,7 +104,7 @@
|
||||
$( this ).blur();
|
||||
|
||||
// pass empty string as value to search for, displaying all results
|
||||
input.autocomplete( "search", "" );
|
||||
input.autocomplete('search', '');
|
||||
input.focus();
|
||||
});
|
||||
}
|
||||
|
@ -24,18 +24,17 @@ foreach(isset($adr['parameters']['TYPE'])?array($adr['parameters']['TYPE']):arra
|
||||
<dd>
|
||||
<input type="text" id="adr_pobox" name="value[ADR][0]" placeholder="<?php echo $l->t('PO Box'); ?>" value="<?php echo isset($adr['value'][0])?$adr['value'][0]:''; ?>">
|
||||
</dd>
|
||||
<dt>
|
||||
<label class="label" for="adr_street"><?php echo $l->t('Street address'); ?></label>
|
||||
</dt>
|
||||
<dd>
|
||||
<input type="text" id="adr_street" name="value[ADR][2]" placeholder="<?php echo $l->t('Street and number'); ?>" value="<?php echo isset($adr['value'][2])?$adr['value'][2]:''; ?>">
|
||||
</dd>
|
||||
<dt>
|
||||
<label class="label" for="adr_extended"><?php echo $l->t('Extended'); ?></label>
|
||||
</dt>
|
||||
<dd>
|
||||
<input type="text" id="adr_extended" name="value[ADR][1]" placeholder="<?php echo $l->t('Extended'); ?>" value="<?php echo isset($adr['value'][1])?$adr['value'][1]:''; ?>">
|
||||
</dd>
|
||||
<dt>
|
||||
<label class="label" for="adr_street"><?php echo $l->t('Street'); ?></label>
|
||||
</dt>
|
||||
<dd>
|
||||
<input type="text" id="adr_street" name="value[ADR][2]" placeholder="<?php echo $l->t('Street'); ?>" value="<?php echo isset($adr['value'][2])?$adr['value'][2]:''; ?>">
|
||||
<input type="text" id="adr_extended" name="value[ADR][1]" placeholder="<?php echo $l->t('Apartment number etc.'); ?>" value="<?php echo isset($adr['value'][1])?$adr['value'][1]:''; ?>">
|
||||
</dd>
|
||||
<dt>
|
||||
<label class="label" for="adr_city"><?php echo $l->t('City'); ?></label>
|
||||
@ -47,13 +46,13 @@ foreach(isset($adr['parameters']['TYPE'])?array($adr['parameters']['TYPE']):arra
|
||||
<label class="label" for="adr_region"><?php echo $l->t('Region'); ?></label>
|
||||
</dt>
|
||||
<dd>
|
||||
<input type="text" id="adr_region" name="value[ADR][4]" placeholder="<?php echo $l->t('Region'); ?>" value="<?php echo isset($adr['value'][4])?$adr['value'][4]:''; ?>">
|
||||
<input type="text" id="adr_region" name="value[ADR][4]" placeholder="<?php echo $l->t('E.g. state or province'); ?>" value="<?php echo isset($adr['value'][4])?$adr['value'][4]:''; ?>">
|
||||
</dd>
|
||||
<dt>
|
||||
<label class="label" for="adr_zipcode"><?php echo $l->t('Zipcode'); ?></label>
|
||||
</dt>
|
||||
<dd>
|
||||
<input type="text" id="adr_zipcode" name="value[ADR][5]" placeholder="<?php echo $l->t('Zipcode'); ?>" value="<?php echo isset($adr['value'][5])?$adr['value'][5]:''; ?>">
|
||||
<input type="text" id="adr_zipcode" name="value[ADR][5]" placeholder="<?php echo $l->t('Postal code'); ?>" value="<?php echo isset($adr['value'][5])?$adr['value'][5]:''; ?>">
|
||||
</dd>
|
||||
<dt>
|
||||
<label class="label" for="adr_country"><?php echo $l->t('Country'); ?></label>
|
||||
|
@ -22,7 +22,7 @@ if(OCP\App::isEnabled('files_encryption')) {
|
||||
echo OCP\html_select_options($contacts_options, $contacts_options[0]['id'], array('value'=>'id', 'label'=>'displayname'));
|
||||
?>
|
||||
</select>
|
||||
<span id="import_drop_target" class="droptarget float"><?php echo $l->t("Drop a VCF file to import contacts."); ?> (Max. <?php echo $_['uploadMaxHumanFilesize']; ?>)</span>
|
||||
<span id="import_drop_target" class="droptarget float"><?php echo $l->t("Drop a VCF file<br />to import contacts."); ?> (Max. <?php echo $_['uploadMaxHumanFilesize']; ?>)</span>
|
||||
<a class="svg upload float" title="<?php echo $l->t('Select from HD'); ?>">
|
||||
<input class="float" id="import_upload_start" type="file" accept="text/*" name="importfile" /></a>
|
||||
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $_['uploadMaxFilesize'] ?>" id="max_upload">
|
||||
@ -36,5 +36,7 @@ if(OCP\App::isEnabled('files_encryption')) {
|
||||
<?php } ?>
|
||||
</td>
|
||||
<script type="text/javascript">
|
||||
Contacts.UI.Addressbooks.loadImportHandlers();
|
||||
$(document).ready(function(){
|
||||
Contacts.UI.Addressbooks.loadImportHandlers();
|
||||
});
|
||||
</script>
|
Loading…
x
Reference in New Issue
Block a user