mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 08:09:02 +01:00
Fix couple of issues regarding AB country and region selections:
- Use taglist-state widget for US state selector - Make sure falg class only gets added for select-country widget - Fix some styling
This commit is contained in:
parent
613a49799c
commit
2010850c16
@ -89,10 +89,19 @@ input.et2_radiobox {
|
||||
top: 0;
|
||||
padding-top: 0;
|
||||
}
|
||||
#addressbook-edit_adr_one_locality,#addressbook-edit_adr_two_locality {
|
||||
margin-left:5px;
|
||||
#addressbook-edit_adr_one_locality,
|
||||
#addressbook-edit_adr_two_locality,
|
||||
#addressbook-edit_adr_one_postalcode,
|
||||
#addressbook-edit_adr_two_postalcode{
|
||||
padding-top:5px;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
#addressbook-edit_adr_one_postalcode,
|
||||
#addressbook-edit_adr_two_postalcode{
|
||||
margin-right: -4px;
|
||||
}
|
||||
div.city_state_postcode #addressbook-edit_adr_two_postalcode,
|
||||
div.city_state_postcode #addressbook-edit_adr_one_postalcode {margin-right: 5px !important;}
|
||||
#addressbook-edit_role {
|
||||
margin-right: 5px;
|
||||
}
|
||||
@ -121,4 +130,9 @@ select#addressbook-index_col_filter\[tid\] {
|
||||
}
|
||||
#addressbook-edit .chzn-container .chzn-results {max-height: 110px}
|
||||
|
||||
#addressbook-index_nm .chzn-drop {width:auto;}
|
||||
#addressbook-index_nm .chzn-drop {width:auto;}
|
||||
#addressbook-edit_adr_one_region, #addressbook-edit_adr_two_region {
|
||||
width: 130px;
|
||||
vertical-align: middle;
|
||||
margin-left: 3px;
|
||||
}
|
@ -71,7 +71,7 @@
|
||||
<url-phone id="tel_assistent" tabindex="23" class="et2_fullWidth"/>
|
||||
<radio statustext="select phone number as prefered way of contact" id="tel_prefer" options="tel_assistent,&hearts;"/>
|
||||
<description for="adr_one_locality" value="city" />
|
||||
<hbox>
|
||||
<hbox class="city_state_postcode">
|
||||
<textbox statustext="ZIP Code" id="adr_one_postalcode" tabindex="13" width="24%" maxlength="64" autocomplete="postal-code"/>
|
||||
<textbox statustext="City" id="adr_one_locality" tabindex="14" maxlength="64" width="70%" autocomplete="address-level2"/>
|
||||
</hbox>
|
||||
@ -82,7 +82,7 @@
|
||||
<url-phone id="tel_fax" tabindex="24" class="et2_fullWidth" autocomplete="fax" />
|
||||
<radio statustext="select phone number as prefered way of contact" id="tel_prefer" options="tel_fax,&hearts;"/>
|
||||
<description for="adr_one_countryname" value="country"/>
|
||||
<vbox width="100%">
|
||||
<vbox class="city_state_postcode" width="100%">
|
||||
<menulist class="et2_fullWidth">
|
||||
<menupopup type="select-country" submit="1" tags="true" width="100%" class="countrySelect et2_fullWidth" id="adr_one_countrycode" tabindex="15" onchange="app.addressbook.show_custom_country(this);" options="Select one,0,1" autocomplete="country"/>
|
||||
</menulist>
|
||||
@ -95,7 +95,7 @@
|
||||
<url-phone id="tel_other" tabindex="25" class="et2_fullWidth" autocomplete="tel" />
|
||||
<radio statustext="select phone number as prefered way of contact" id="tel_prefer" options="tel_other,&hearts;"/>
|
||||
<description value="Region"/>
|
||||
<taglist-state statustext="State" maxSelection="1" multiple="toggle" editModeEnabled="false" country_code="$cont[adr_one_countrycode]" id="adr_one_region" tabindex="16" maxlength="64" class="et2_fullWidth" autocomplete="address-level1"/>
|
||||
<taglist-state class="city_state_postcode et2_fullWidth" statustext="State" maxSelection="1" multiple="toggle" editModeEnabled="false" country_code="$cont[adr_one_countrycode]" id="adr_one_region" tabindex="16" maxlength="64"/>
|
||||
<description/>
|
||||
</row>
|
||||
<row disabled="!@addr_format=city_state_postcode">
|
||||
@ -105,7 +105,7 @@
|
||||
<description value="City"/>
|
||||
<hbox>
|
||||
<textbox statustext="City" id="adr_one_locality" size="30" maxlength="64" tabindex="13" autocomplete="address-level2"/>
|
||||
<textbox statustext="State" id="adr_one_region" size="3" maxlength="64" tabindex="14" autocomplete="address-level1"/>
|
||||
<taglist-state statustext="State" maxSelection="1" multiple="toggle" editModeEnabled="false" country_code="$cont[adr_one_countrycode]" id="adr_one_region" tabindex="14" width="130"/>
|
||||
<textbox statustext="ZIP Code" id="adr_one_postalcode" size="5" maxlength="64" tabindex="15" autocomplete="postal-code"/>
|
||||
</hbox>
|
||||
<description/>
|
||||
@ -227,7 +227,7 @@
|
||||
<url-phone id="tel_fax_home" tabindex="29" class="et2_fullWidth" autocomplete="section-two fax tel" />
|
||||
<radio statustext="select phone number as prefered way of contact" id="tel_prefer" options="tel_fax_home,&hearts;"/>
|
||||
<description for="adr_two_locality" value="city"/>
|
||||
<hbox>
|
||||
<hbox class="city_state_postcode">
|
||||
<textbox statustext="ZIP Code" id="adr_two_postalcode" tabindex="34" width="24%" maxlength="64" autocomplete="section-two postal-code" />
|
||||
<textbox statustext="City" id="adr_two_locality" maxlength="64" tabindex="36" width="70%" autocomplete="section-two address-level2" />
|
||||
</hbox>
|
||||
@ -238,7 +238,7 @@
|
||||
<url-phone id="tel_pager" tabindex="30" class="et2_fullWidth"/>
|
||||
<radio statustext="select phone number as prefered way of contact" id="tel_prefer" options="tel_pager,&hearts;"/>
|
||||
<description for="adr_two_countryname" value="country"/>
|
||||
<vbox width="100%">
|
||||
<vbox width="100%" class="city_state_postcode">
|
||||
<menulist class="et2_fullWidth">
|
||||
<menupopup type="select-country" tabindex="37" tags="true" width="100%" class="countrySelect et2_fullWidth" id="adr_two_countrycode" onchange="app.addressbook.show_custom_country(this);" options="Select one,0,1" autocomplete="section-two country" />
|
||||
</menulist>
|
||||
@ -251,7 +251,7 @@
|
||||
<date id="bday" tabindex="31" options="Y-m-d" year_range="c-90:c+2" class="et2_fullWidth"/>
|
||||
<description/>
|
||||
<description value="Region"/>
|
||||
<taglist-state statustext="State" maxSelection="1" multiple="toggle" editModeEnabled="false" country_code="$cont[adr_two_region]" id="adr_two_region" tabindex="38" maxlength="64" class="et2_fullWidth" autocomplete="section-two address-level1" />
|
||||
<taglist-state statustext="State" maxSelection="1" multiple="toggle" editModeEnabled="false" country_code="$cont[adr_two_countrycode]" id="adr_two_region" tabindex="38" maxlength="64" class="et2_fullWidth city_state_postcode"/>
|
||||
<description/>
|
||||
</row>
|
||||
<row disabled="!@addr_format=city_state_postcode">
|
||||
@ -261,7 +261,7 @@
|
||||
<description value="City"/>
|
||||
<hbox>
|
||||
<textbox statustext="City" id="adr_two_locality" size="30" maxlength="64" autocomplete="section-two address-level2" />
|
||||
<textbox statustext="State" id="adr_two_region" size="3" maxlength="64" autocomplete="section-two address-level1"/>
|
||||
<taglist-state maxSelection="1" multiple="toggle" editModeEnabled="false" country_code="$cont[adr_one_countrycode]" statustext="State" id="adr_two_region" width="130" autocomplete="section-two address-level1"/>
|
||||
<textbox statustext="ZIP Code" id="adr_two_postalcode" size="5" maxlength="64" autocomplete="section-two postal-code" />
|
||||
</hbox>
|
||||
<description/>
|
||||
|
@ -108,8 +108,19 @@ input.et2_radiobox {
|
||||
padding-top: 0;
|
||||
}
|
||||
#addressbook-edit_adr_one_locality,
|
||||
#addressbook-edit_adr_two_locality {
|
||||
margin-left: 5px;
|
||||
#addressbook-edit_adr_two_locality,
|
||||
#addressbook-edit_adr_one_postalcode,
|
||||
#addressbook-edit_adr_two_postalcode {
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
#addressbook-edit_adr_one_postalcode,
|
||||
#addressbook-edit_adr_two_postalcode {
|
||||
margin-right: -4px;
|
||||
}
|
||||
div.city_state_postcode #addressbook-edit_adr_two_postalcode,
|
||||
div.city_state_postcode #addressbook-edit_adr_one_postalcode {
|
||||
margin-right: 5px !important;
|
||||
}
|
||||
#addressbook-edit_role {
|
||||
margin-right: 5px;
|
||||
@ -146,6 +157,12 @@ select#addressbook-index_col_filter\[tid\] {
|
||||
#addressbook-index_nm .chzn-drop {
|
||||
width: auto;
|
||||
}
|
||||
#addressbook-edit_adr_one_region,
|
||||
#addressbook-edit_adr_two_region {
|
||||
width: 130px;
|
||||
vertical-align: middle;
|
||||
margin-left: 3px;
|
||||
}
|
||||
@media all {
|
||||
/* #############################################################################
|
||||
|
||||
|
@ -239,18 +239,23 @@ var et2_selectbox = (function(){ "use strict"; return et2_inputWidget.extend(
|
||||
var valid = this._super.apply(this, arguments);
|
||||
var selected = this.input.siblings().find('a.chzn-single');
|
||||
var val = _value && _value.selected ? _value.selected : this.value;
|
||||
if (selected && selected.length == 1 && val)
|
||||
switch (this._type)
|
||||
{
|
||||
selected.removeClass (function (index, className) {
|
||||
return (className.match (/(^|\s)flag-\S+/g) || []).join(' ');
|
||||
});
|
||||
selected.find('span.img').remove();
|
||||
selected.prepend('<span class="img"></span>');
|
||||
selected.addClass('et2_country-select flag-'+ val.toLowerCase());
|
||||
}
|
||||
else if(selected)
|
||||
{
|
||||
selected.removeClass('et2_country-select');
|
||||
case 'select-country':
|
||||
if (selected && selected.length == 1 && val)
|
||||
{
|
||||
selected.removeClass (function (index, className) {
|
||||
return (className.match (/(^|\s)flag-\S+/g) || []).join(' ');
|
||||
});
|
||||
selected.find('span.img').remove();
|
||||
selected.prepend('<span class="img"></span>');
|
||||
selected.addClass('et2_country-select flag-'+ val.toLowerCase());
|
||||
}
|
||||
else if(selected)
|
||||
{
|
||||
selected.removeClass('et2_country-select');
|
||||
}
|
||||
break;
|
||||
}
|
||||
return valid;
|
||||
},
|
||||
|
@ -1131,6 +1131,7 @@ table.egwGridView_grid .et2_taglist_thumbnail .et2_taglist_thumbnail_img {
|
||||
/* Toggle single / multiple */
|
||||
.et2_taglist_toggle {
|
||||
position: relative;
|
||||
overflow: visible !important;
|
||||
}
|
||||
.et2_taglist_toggle > div.ms-ctn {
|
||||
display: inline-block;
|
||||
@ -1215,11 +1216,9 @@ div .et2_taglist_single:not(.et2_taglist_small) div.ms-sel-ctn div.ms-sel-item {
|
||||
}
|
||||
.et2_taglist.et2_taglist_toggle div.ms-ctn input {
|
||||
border:none;
|
||||
background-color: #fafafa;
|
||||
}
|
||||
.et2_taglist.et2_taglist_single .ms-ctn.form-control {
|
||||
border-radius: 3px;
|
||||
background-color: #fafafa;
|
||||
|
||||
}
|
||||
.et2_taglist_single.et2_taglist_category .ms-sel-item > span:first-child {
|
||||
padding: 0;
|
||||
@ -1262,7 +1261,7 @@ div .et2_taglist_small.et2_taglist_single div.ms-sel-ctn div.ms-sel-item {
|
||||
.et2_taglist_small.ui-state-hover,
|
||||
.et2_taglist_small.ui-state-active {
|
||||
max-height: none;
|
||||
min-width: 15em;
|
||||
min-width: 10em;
|
||||
background: white;
|
||||
z-index: 5;
|
||||
margin-top: 0px;
|
||||
|
Loading…
Reference in New Issue
Block a user