ClassLibraryWeiBao/IZWebFileManager/resources/FolderTree.js

(开头部分) 8KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

FolderTree = function (controllerId, clientId, uniqueId, expandImage, collapseImage, noExpandImage) {
	this._clientId = clientId;
	this._uniqueId = uniqueId;
	this._expandImage = expandImage;
	this._collapseImage = collapseImage;
	this._noExpandImage = noExpandImage;
	this._selectedNode = null;
    this._controller = eval('WFM_' + controllerId);
}

FolderTree.prototype = {
	getController : function() {return this._controller;},
	
	ToggleExpand : function (nodeId) {
		this._ToggleExpand(nodeId, this.PopulateCallback, null, this.PopulateError);
	},
	
	_ToggleExpand : function (nodeId, eventCallback, externalContext, errorCallback) {
		var node = this._getNode (nodeId);
		if(!node) return true;

		var nodeSpan = this._getChildNodesSpan (nodeId);
		var expand = node._expand || node._refresh || nodeSpan.style.display == "none";

		if(expand && node._populating) return false;
		
		if (node._refresh || (nodeSpan.style.display == "none" && nodeSpan.innerHTML.length == 0)) {
			node._populating = true;
			var nodePath = node.attributes["nodepath"].value;
			this.PopulateNode (nodePath, eventCallback, {'folderTree':this,'node':node,'nodeSpan':nodeSpan,'nodeId':nodeId,'nodePath':nodePath,'externalContext':externalContext}, errorCallback);
			return false;
		}
		
		node._expand = false;
		
		var image = this._getNodeImg (nodeId);
		if(nodeSpan.innerHTML == "*") {
			image.src = this._noExpandImage;
			nodeSpan.style.display = "none";
		} else {
			nodeSpan.style.display = expand ? "block" : "none";
			image.src = expand ? this._collapseImage : this._expandImage;
		}
		return true;
	},

	PopulateError : function (data, ctx){
		ctx.folderTree.PopulateCallback (data, ctx);
	},

	PopulateCallback : function (data, ctx)
	{
		ctx.node._refresh = false;
		ctx.node._populating = false;
		if(data == "*")
			ctx.nodeSpan.style.display = "none";
		ctx.nodeSpan.innerHTML = data;
		ctx.folderTree._ToggleExpand (ctx.nodeId, null, null, null);
	},
	
后面还有 254 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。