瀏覽代碼

cond regex

a.binder 8 年之前
父節點
當前提交
9871e9af77
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      SE/se-lib/TableAjax.php.TableAjax.js

+ 5 - 2
SE/se-lib/TableAjax.php.TableAjax.js

@@ -485,8 +485,11 @@ var TableAjax = function() {
 							$.each(_fieldProps._tsSimpleLink.aliasMap, function(i, v) {
 								// console.log('simpleLink aliasMap fldName:', fldName, 'i:', i, 'v:', v, 'row['+v+']', row[v], 'val', val, 'typeof val', typeof val);
 								if (undefined !== row[v]) {
-									//valLink = valLink.replace(new RegExp('\{' + i + '\}', 'g'), row[v]);
-									 valLink = valLink.replace(new RegExp('\{' + i + '\}', 'g'),   row[v].replace('"','') ).replace('&&','%26'); //naprawa <a href="mailto:?subject=W spr. p
+									if( fldName == 'LINK_PROBLEMS' ) {
+										valLink = valLink.replace(new RegExp('\{' + i + '\}', 'g'), row[v].replace('"','') ).replace('&&','%26'); //naprawa <a href="mailto:?subject=W spr. p
+									} else {
+										valLink = valLink.replace(new RegExp('\{' + i + '\}', 'g'), row[v]);
+									}
 								}
 							});
 						}