PageSourceSearch

https://web.rosknroll.fi/rosknroll/js/dhtmlxSuite/sources/dhtmlxGr…/codebase/excells/dhtmlxgrid_excell_link.js

js rosknroll.fi collected 2026-09-26 03:00:12 UTC 2,174 bytes, 78 lines download raw bytes

1/*
2Product Name: dhtmlxSuite 
3Version: 5.1.0 
4Edition: Professional 
5License: content of this file is covered by DHTMLX Commercial or Enterprise license. Usage without proper license is prohibited. To obtain it contact [email protected]
6Copyright UAB Dinamenta http://www.dhtmlx.com
7*/
8
9
10/*
11HTML Link eXcell v.1.0  for dhtmlxGrid 
12(c)DHTMLX LTD. 2005
13
14
15The corresponding  cell value in XML should be a "^" delimited list of following values:
161st - Link Text 
172nd - URL (optional)
183rd - target (optional, default is _blank)
19
20Samples:
21<cell>Stephen King</cell>
22<cell>Stephen King^http://www.stephenking.com/</cell>
23<cell>Stephen King^http://www.stephenking.com/^_self</cell>
24*/
25
26/**
27*	@desc: link editor
28*	@returns: dhtmlxGrid cell editor object
29*	@type: public
30*/
31
32function eXcell_link(cell){
33	this.cell = cell;
34    this.grid = this.cell.parentNode.grid;
35    this.isDisabled=function(){return true;}
36	this.edit = function(){}
37	this.getValue = function(){
38		if(this.cell.firstChild.getAttribute){
39			var target = this.cell.firstChild.getAttribute("target")
40			return this.cell.firstChild.innerHTML+"^"+this.cell.firstChild.getAttribute("href")+(target?("^"+target):"");
41		}
42
43		else
44			return "";
45	}
46	this.setValue = function(val){
47		if((typeof(val)!="number") && (!val || val.toString()._dhx_trim()=="")){		
48			this.setCValue("&nbsp;",valsAr);			
49			return (this.cell._clearCell=true);
50		}
51		var valsAr = val.split("^");
52		if(valsAr.length==1)
53			valsAr[1] = "";
54		else{
55			if(valsAr.length>1){
56				valsAr[1] = "href='"+valsAr[1]+"'";
57				if(valsAr.length==3)
58					valsAr[1]+= " target='"+valsAr[2]+"'";
59				else
60					valsAr[1]+= " target='_blank'";
61			}
62		}
63
64		this.setCValue("<a "+valsAr[1]+" onclick='(_isIE?event:arguments[0]).cancelBubble = true;'>"+valsAr[0]+"</a>",valsAr);
65	}
66}
67
68eXcell_link.prototype = new eXcell;
69eXcell_link.prototype.getTitle=function(){
70	var z=this.cell.firstChild;
71	return ((z&&z.tagName)?z.getAttribute("href"):"");
72}
73eXcell_link.prototype.getContent=function(){
74	var z=this.cell.firstChild;
75	return ((z&&z.tagName)?z.innerHTML:"");
76}
77//(c)dhtmlx ltd. www.dhtmlx.com
78

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.