|
|
@@ -971,15 +971,18 @@ var p5UI_TableAjax_generateFunctionNode = function(funObj, rowPK, props) {
|
|
|
return function(val, fieldPK, row) {
|
|
|
// console.log('FieldWidget: pk('+fieldPK+') run function to render field('+_fieldName+') with value('+val+') ', fieldProps);
|
|
|
var link = '',
|
|
|
- linkPrefix = '',
|
|
|
a = null,
|
|
|
dbg = false;
|
|
|
if (!val.length) return '';
|
|
|
- var linkPrefix = '';
|
|
|
- if ('http' == val.substr(0, 4)) linkPrefix = '';
|
|
|
- //else if ('ftp' == val.substr(0, 3))
|
|
|
- else linkPrefix = 'http://';
|
|
|
- link = linkPrefix + val;
|
|
|
+ if ('index.php' == val.substr(0, 9) || 'procesy5.php' == val.substr(0, 12)) {
|
|
|
+ link = window.location.protocol + '//' + window.location.hostname
|
|
|
+ link += window.location.pathname.split('/').slice(0, -1).join('/')
|
|
|
+ link += '/' + val
|
|
|
+ } else {
|
|
|
+ if ('http' == val.substr(0, 4)) link = val
|
|
|
+ //else if ('ftp' == val.substr(0, 3))
|
|
|
+ else link = 'http://' + val
|
|
|
+ }
|
|
|
|
|
|
var linkErrors = validate({www_link: link}, {www_link: {url: true}});
|
|
|
if (linkErrors) {
|