-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathfieldDecoration.xml
More file actions
43 lines (39 loc) · 1.43 KB
/
Copy pathfieldDecoration.xml
File metadata and controls
43 lines (39 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?xml version="1.0" encoding="windows-1252" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<j:set var="jvar_n" value="place_call:${ref}"/>
<a id="${jvar_n}" onclick="placeCallString('${ref}')" name="${jvar_n}">
<img border="0" src="images/icons/phone.gifx" title="Place Call" alt="Place Call"/>
</a>
<script>
function placeCallString(reference) {
alert('You pushed the button.');
var phoneNumber = g_form.getValue(reference.split('.')[1]);
alert(phoneNumber);
if(phoneNumber =='')
alert('This field is empty.');
else
window.open('callto:' + phoneNumber,'_call');
}
</script>
</j:jelly>
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:evaluate var="jvar_guid" expression="gs.generateGUID(this);"/>
<j:set var="jvar_n" value="show_lync_${jvar_guid}:${ref}"/>
<a class="ref-button btn btn-default btn-ref" style="padding:5px 6px 7px;" id="${jvar_n}" onclick="invokeCall('${ref}');">
<img border="0" src="/lync_call.gifx" title="${gs.getMessage('Lync Call')}"/>
</a>
<script>
function invokeCall(reference) {
var tck = g_form.getValue('number');
if(tck.indexOf('INC') >= 0){
var url = 'tel:+1' + g_form.getReference('caller_id').phone;
}
else{
var url = 'tel:+1' + g_form.getReference('u_user').phone;
}
var w = getTopWindow();
w.open(url, '_self');
}
</script>
</j:jelly>