titlepane.js

来自「struts hibernet spring」· JavaScript 代码 · 共 62 行

JS
62
字号
/*	Copyright (c) 2004-2006, The Dojo Foundation	All Rights Reserved.	Licensed under the Academic Free License version 2.1 or above OR the	modified BSD license. For more information on Dojo licensing, see:		http://dojotoolkit.org/community/licensing.shtml*/dojo.provide("dojo.widget.TitlePane");dojo.require("dojo.widget.*");dojo.require("dojo.widget.ContentPane");dojo.require("dojo.html.style");dojo.require("dojo.lfx.*");dojo.widget.defineWidget(	"dojo.widget.TitlePane",	dojo.widget.ContentPane,{	labelNode: "",	labelNodeClass: "",	containerNodeClass: "",	label: "",		open: true,	templatePath: dojo.uri.dojoUri("src/widget/templates/TitlePane.html"),	postCreate: function() {		if (this.label) {			this.labelNode.appendChild(document.createTextNode(this.label));		}		if (this.labelNodeClass) {			dojo.html.addClass(this.labelNode, this.labelNodeClass);		}			if (this.containerNodeClass) {			dojo.html.addClass(this.containerNode, this.containerNodeClass);		}			if (!this.open) {			dojo.html.hide(this.containerNode);		}		dojo.widget.TitlePane.superclass.postCreate.apply(this, arguments);	},	onLabelClick: function() {		if (this.open) {			dojo.lfx.wipeOut(this.containerNode, 250).play();			this.open=false;		} else {			dojo.lfx.wipeIn(this.containerNode, 250).play();			this.open=true;		}	},	setLabel: function(label) {		this.labelNode.innerHTML=label;	}});

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?