blob: bd1a6865f2cc4872e2efbdcbde5eb5cf8e68726a (
plain)
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
|
//// $Id$
var Redirect = {
onLoad : function() {
var params = window.arguments[0];
$('txtExampleUrl').value = params.inn.url;
$('txtPattern').value = params.inn.url;
$('txtRedirectUrl').value = params.inn.redirect || '';
},
onAccept : function() {
var params = window.arguments[0];
params.out.pattern = $('txtPattern').value;
params.out.patternType = 'Wildcard';
params.out.redirectUrl = $('txtRedirectUrl').value;
params.out.onlyIfLinkExists = $('chkOnlyIfLinkExists').checked;
return true;
},
testPattern : function() {
try {
alert(RedirectorCommon.wildcardMatch($('txtPattern').value, $('txtExampleUrl').value));
} catch(e) {alert(e);}
}
};
|