mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-29 19:33:54 +01:00
* Addressbook: allow to configure sending fax via email by replacing the number with an email address
This commit is contained in:
parent
adac91d79b
commit
9fe09ef09b
@ -450,6 +450,7 @@ select the type of conversion: addressbook de Typ der Umwandlung auswählen:
|
||||
select where you want to store / retrieve contacts admin de Auswählen wo Sie Adressen speichern möchten
|
||||
selected contacts addressbook de ausgewählte Kontakte
|
||||
send emailcopy to receiver addressbook de Versendet eine Kopie der E-Mail zu dem Empfänger
|
||||
send fax via email by replacing fax number with an email address addressbook de Fax per Email senden durch ersetzen der Faxnummer mit einer Email Adresse
|
||||
send succeeded to %1 common de erfolgreich versandt an
|
||||
seperator addressbook de Feldtrenner
|
||||
set full name and file as field in contacts of all users (either all or only empty values) admin de Setzt vollen Namen und eigene Sortierung in Kontakten aller Benutzer (entweder alle oder nur leere Werte)
|
||||
|
@ -450,6 +450,7 @@ select the type of conversion: addressbook en Select the type of conversion:
|
||||
select where you want to store / retrieve contacts admin en Select where contacts should be stored / retrieved.
|
||||
selected contacts addressbook en Selected contacts
|
||||
send emailcopy to receiver addressbook en Send email copy to receiver
|
||||
send fax via email by replacing fax number with an email address addressbook en Send fax via email by replacing fax number with an email address
|
||||
send succeeded to %1 common en Send succeeded to %1
|
||||
seperator addressbook en Separator
|
||||
set full name and file as field in contacts of all users (either all or only empty values) admin en Set full name and 'fileas' field in contacts of all users. Either all or only empty values.
|
||||
|
@ -20,6 +20,13 @@
|
||||
<description value="Size of popup (WxH, eg.400x300, if a popup should be used)" label="%s:"/>
|
||||
<textbox id="newsettings[call_popup]" size="10"/>
|
||||
</row>
|
||||
<row>
|
||||
<description value="Send fax via email by replacing fax number with an email address" label="%s:"/>
|
||||
<hbox>
|
||||
<textbox id="newsettings[fax_email_regexp]" blur="(.*)"/>
|
||||
<textbox id="newsettings[fax_email]" blur="$1@fax.local"/>
|
||||
</hbox>
|
||||
</row>
|
||||
<row>
|
||||
<description value="GeoLocation integration" span="all" class="subHeader"/>
|
||||
</row>
|
||||
|
@ -79,7 +79,7 @@
|
||||
</row>
|
||||
<row disabled="@addr_format=city_state_postcode">
|
||||
<description for="tel_fax" value="fax"/>
|
||||
<url-phone id="tel_fax" tabindex="24" class="et2_fullWidth" autocomplete="fax" />
|
||||
<url-fax 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 class="city_state_postcode" width="100%">
|
||||
@ -112,7 +112,7 @@
|
||||
</row>
|
||||
<row disabled="!@addr_format=city_state_postcode">
|
||||
<description for="tel_fax" value="fax"/>
|
||||
<url-phone id="tel_fax" tabindex="24" class="et2_fullWidth" autocomplete="fax" />
|
||||
<url-fax 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%" tabindex="16">
|
||||
@ -226,7 +226,7 @@
|
||||
</row>
|
||||
<row disabled="@addr_format=city_state_postcode">
|
||||
<description for="tel_fax_home" value="fax"/>
|
||||
<url-phone id="tel_fax_home" tabindex="29" class="et2_fullWidth" autocomplete="section-two fax tel" />
|
||||
<url-fax 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 class="city_state_postcode">
|
||||
@ -258,7 +258,7 @@
|
||||
</row>
|
||||
<row disabled="!@addr_format=city_state_postcode">
|
||||
<description for="tel_fax_home" value="fax"/>
|
||||
<url-phone id="tel_fax_home" class="et2_fullWidth" autocomplete="fax tel" />
|
||||
<url-fax id="tel_fax_home" class="et2_fullWidth" autocomplete="fax tel" />
|
||||
<radio statustext="select phone number as prefered way of contact" id="tel_prefer" options="tel_fax_home,&hearts;"/>
|
||||
<description value="City"/>
|
||||
<hbox>
|
||||
|
@ -142,7 +142,7 @@
|
||||
<url-phone id="${row}[tel_cell]" readonly="true" class="telNumbers" statustext="Mobile phone"/>
|
||||
<url-phone id="${row}[tel_home]" readonly="true" class="telNumbers" statustext="Home phone"/>
|
||||
<url-phone id="${row}[tel_cell_private]" readonly="true" class="telNumbers" statustext="Mobile phone (private)"/>
|
||||
<url-phone id="${row}[tel_fax]" readonly="true" statustext="Fax"/>
|
||||
<url-fax id="${row}[tel_fax]" readonly="true" statustext="Fax"/>
|
||||
<url-phone id="${row}[tel_prefered]" readonly="true" class="telNumbers" statustext="$row_cont[tel_prefer_label]"/>
|
||||
</vbox>
|
||||
<vbox>
|
||||
|
@ -8,7 +8,6 @@
|
||||
* @link http://www.egroupware.org
|
||||
* @author Nathan Gray
|
||||
* @copyright Nathan Gray 2011
|
||||
* @version $Id$
|
||||
*/
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
@ -93,6 +92,7 @@ var et2_url = /** @class */ (function (_super_1) {
|
||||
this._button.attr("href", _value).attr("target", "_blank").addClass("url");
|
||||
break;
|
||||
case "url-phone":
|
||||
case "url-fax":
|
||||
if (_value) {
|
||||
if (typeof _value == 'function') {
|
||||
this._button.click(this, _value).addClass("phone").show();
|
||||
@ -128,6 +128,12 @@ var et2_url = /** @class */ (function (_super_1) {
|
||||
et2_url.prototype.get_link = function (type, value) {
|
||||
if (!value)
|
||||
return false;
|
||||
// convert fax numbers to email, if configured
|
||||
if (type === 'url-fax' && this.egw().config('fax_email') &&
|
||||
(value = value.replace('♥', '').replace('(0)', '').replace(/[^0-9+]/g, ''))) {
|
||||
value = value.replace(new RegExp(this.egw().config('fax_email_regexp') || '(.*)'), this.egw().config('fax_email'));
|
||||
type = 'url-email';
|
||||
}
|
||||
switch (type) {
|
||||
case "url":
|
||||
// Silently use http if no protocol
|
||||
@ -135,6 +141,7 @@ var et2_url = /** @class */ (function (_super_1) {
|
||||
value = "http://" + value;
|
||||
break;
|
||||
case "url-phone":
|
||||
case "url-fax":
|
||||
// Clean number
|
||||
value = value.replace('♥', '').replace('(0)', '');
|
||||
value = value.replace(/[abc]/gi, 2).replace(/[def]/gi, 3).replace(/[ghi]/gi, 4).replace(/[jkl]/gi, 5).replace(/[mno]/gi, 6);
|
||||
@ -274,7 +281,7 @@ var et2_url = /** @class */ (function (_super_1) {
|
||||
et2_url.EMAIL_PREG = new RegExp(/^(([^\042',<][^,<]+|\042[^\042]+\042|\'[^\']+\'|"(?:[^"\\]|\\.)*")\s?<)?[^\x00-\x20()\xe2\x80\x8b<>@,;:\042\[\]\x80-\xff]+@([a-z0-9ÄÖÜäöüß](|[a-z0-9ÄÖÜäöüß_-]*[a-z0-9ÄÖÜäöüß])\.)+[a-z]{2,}>?$/i);
|
||||
return et2_url;
|
||||
}(et2_widget_textbox_1.et2_textbox));
|
||||
et2_core_widget_1.et2_register_widget(et2_url, ["url", "url-email", "url-phone"]);
|
||||
et2_core_widget_1.et2_register_widget(et2_url, ["url", "url-email", "url-phone", "url-fax"]);
|
||||
/**
|
||||
* et2_url_ro is the readonly implementation of the url, email & phone.
|
||||
* It renders things as links, when possible
|
||||
@ -323,6 +330,7 @@ var et2_url_ro = /** @class */ (function (_super_1) {
|
||||
this.span.attr("href", link).attr("target", "_blank");
|
||||
break;
|
||||
case "url-phone":
|
||||
case "url-fax":
|
||||
if (typeof link == 'function') {
|
||||
this.span.off('click.et2_url');
|
||||
this.span.on('click.et2_url', link);
|
||||
@ -464,5 +472,5 @@ var et2_url_ro = /** @class */ (function (_super_1) {
|
||||
et2_url_ro.email_cache = [];
|
||||
return et2_url_ro;
|
||||
}(et2_core_valueWidget_1.et2_valueWidget));
|
||||
et2_core_widget_1.et2_register_widget(et2_url_ro, ["url_ro", "url-email_ro", "url-phone_ro"]);
|
||||
et2_core_widget_1.et2_register_widget(et2_url_ro, ["url_ro", "url-email_ro", "url-phone_ro", "url-fax_ro"]);
|
||||
//# sourceMappingURL=et2_widget_url.js.map
|
||||
|
@ -7,7 +7,6 @@
|
||||
* @link http://www.egroupware.org
|
||||
* @author Nathan Gray
|
||||
* @copyright Nathan Gray 2011
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/*egw:uses
|
||||
@ -129,6 +128,7 @@ class et2_url extends et2_textbox
|
||||
this._button.attr("href", _value).attr("target", "_blank").addClass("url");
|
||||
break;
|
||||
case "url-phone":
|
||||
case "url-fax":
|
||||
if(_value) {
|
||||
if(typeof _value == 'function')
|
||||
{
|
||||
@ -168,6 +168,14 @@ class et2_url extends et2_textbox
|
||||
|
||||
get_link(type, value) {
|
||||
if(!value) return false;
|
||||
// convert fax numbers to email, if configured
|
||||
if (type === 'url-fax' && this.egw().config('fax_email') &&
|
||||
(value = value.replace('♥','').replace('(0)','').replace(/[^0-9+]/g, '')))
|
||||
{
|
||||
value = value.replace(new RegExp(this.egw().config('fax_email_regexp')||'(.*)'),
|
||||
this.egw().config('fax_email'));
|
||||
type = 'url-email';
|
||||
}
|
||||
switch(type)
|
||||
{
|
||||
case "url":
|
||||
@ -175,6 +183,7 @@ class et2_url extends et2_textbox
|
||||
if(value.indexOf("://") == -1) value = "http://"+value;
|
||||
break;
|
||||
case "url-phone":
|
||||
case "url-fax":
|
||||
// Clean number
|
||||
value = value.replace('♥','').replace('(0)','');
|
||||
value = value.replace(/[abc]/gi,2).replace(/[def]/gi,3).replace(/[ghi]/gi,4).replace(/[jkl]/gi,5).replace(/[mno]/gi,6);
|
||||
@ -289,7 +298,7 @@ class et2_url extends et2_textbox
|
||||
return res;
|
||||
}
|
||||
}
|
||||
et2_register_widget(et2_url, ["url", "url-email", "url-phone"]);
|
||||
et2_register_widget(et2_url, ["url", "url-email", "url-phone", "url-fax"]);
|
||||
|
||||
/**
|
||||
* et2_url_ro is the readonly implementation of the url, email & phone.
|
||||
@ -363,6 +372,7 @@ class et2_url_ro extends et2_valueWidget
|
||||
this.span.attr("href", link).attr("target", "_blank");
|
||||
break;
|
||||
case "url-phone":
|
||||
case "url-fax":
|
||||
if(typeof link == 'function')
|
||||
{
|
||||
this.span.off('click.et2_url');
|
||||
@ -522,5 +532,5 @@ class et2_url_ro extends et2_valueWidget
|
||||
this.span.attr('title',_values.statustext ? _values.statustext : this.options.statustext);
|
||||
}
|
||||
}
|
||||
et2_register_widget(et2_url_ro, ["url_ro", "url-email_ro", "url-phone_ro"]);
|
||||
et2_register_widget(et2_url_ro, ["url_ro", "url-email_ro", "url-phone_ro", "url-fax_ro"]);
|
||||
|
||||
|
@ -256,7 +256,7 @@ class Config
|
||||
'checkfornewversion','checkappversions','email_address_format', // admin >> site config
|
||||
'site_title','login_logo_file','login_logo_url','login_logo_title','favicon_file',
|
||||
'markuntranslated','link_list_thumbnail','enabled_spellcheck','debug_minify',
|
||||
'call_link','call_popup','geolocation_url', // addressbook
|
||||
'call_link','call_popup','fax_email','fax_email_regexp','geolocation_url', // addressbook
|
||||
'hide_birthdays','calview_no_consolidate', 'egw_tutorial_disable','fw_mobile_app_list'), // calendar
|
||||
'projectmanager' => array('hours_per_workday', 'duration_units'),
|
||||
'manual' => array('manual_remote_egw_url'),
|
||||
|
Loading…
Reference in New Issue
Block a user