diff --git a/css/contacts.css b/css/contacts.css index 1d02b372..8de68fbf 100644 --- a/css/contacts.css +++ b/css/contacts.css @@ -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 {} diff --git a/js/contacts.js b/js/contacts.js index e15dc027..35d4a4a2 100644 --- a/js/contacts.js +++ b/js/contacts.js @@ -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
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(); diff --git a/js/jquery.combobox.js b/js/jquery.combobox.js index f12d1d7d..d9959eb6 100644 --- a/js/jquery.combobox.js +++ b/js/jquery.combobox.js @@ -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" - ), "$1" ), + ')(?![^<>]*>)(?![^&;]+;)', 'gi' + ), '$1'), 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 $( "
  • " ) - .data( "item.autocomplete", item ) - .append( "" + item.label + "" ) + input.data('autocomplete')._renderItem = function( ul, item ) { + return $('
  • ') + .data('item.autocomplete', item ) + .append('' + item.label + '') .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 = $( "" ) - .attr( "tabIndex", -1 ) - .attr( "title", "Show All Items" ) + this.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(); }); } diff --git a/templates/part.edit_address_dialog.php b/templates/part.edit_address_dialog.php index 8b342503..7684795f 100644 --- a/templates/part.edit_address_dialog.php +++ b/templates/part.edit_address_dialog.php @@ -24,18 +24,17 @@ foreach(isset($adr['parameters']['TYPE'])?array($adr['parameters']['TYPE']):arra
    +
    + +
    + +
    - -
    -
    - -
    -
    - +
    @@ -47,13 +46,13 @@ foreach(isset($adr['parameters']['TYPE'])?array($adr['parameters']['TYPE']):arra
    - +
    - +
    diff --git a/templates/part.importaddressbook.php b/templates/part.importaddressbook.php index 6702262f..0e2956dd 100644 --- a/templates/part.importaddressbook.php +++ b/templates/part.importaddressbook.php @@ -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')); ?> - t("Drop a VCF file to import contacts."); ?> (Max. ) + t("Drop a VCF file
    to import contacts."); ?> (Max. )
    @@ -36,5 +36,7 @@ if(OCP\App::isEnabled('files_encryption')) { \ No newline at end of file