flymis/WebRoot/dojojs/src/widget/RadioGroup.js

(开头部分) 6KB

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

/*
	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.RadioGroup");

dojo.require("dojo.lang.common");
dojo.require("dojo.event.browser");
dojo.require("dojo.html.selection");
dojo.require("dojo.widget.*");
dojo.require("dojo.widget.HtmlWidget");

// summary:
// 	Widget that provides useful/common functionality that may be desirable
// 	when interacting with ul/ol html lists.
//	
// The core behaviour of the lists this widget manages is expected to be determined
// by the css class names defined: 
// 	
// 	 "radioGroup" - Applied to main ol or ul 
//	 "selected"	- Applied to the currently selected li, if any.
//   "itemContent" - Applied to the content contained in a li, this widget embeds a span 
//					within each <li></li> to contain the contents of the li.
// This widget was mostly developed under supervision/guidance from Tom Trenka.
dojo.widget.defineWidget(
	"dojo.widget.RadioGroup", 
	dojo.widget.HtmlWidget,
	function(){
		//	summary
		//	Initializes all properties for the widget.
		
		// Node: Currently selected li, if any
		this.selectedItem=null;
		// Node array: Array of li nodes being managed by widget
		this.items=[];
		// String array: List of optional ids specifying which li's should be selected by default
		this.selected=[];
		
		// String: Css class applied to main ol or ul, value is "radioGroup"
		this.groupCssClass="radioGroup";
		// String: Css class applied to the currently selected li, if any. value of "selected"
		this.selectedCssClass="selected";
		// String: Css class Applied to the content contained in a li, this widget embeds a span 
		// within each <li></li> to contain the contents of the li. value is "itemContent"
		this.itemContentCssClass="itemContent";
	},
	{
		isContainer:false,
		templatePath: null,
		templateCssPath: null,
		
		postCreate:function(){
			// summary: Parses content of widget and sets up the default state of any 
			// default selections / etc. The onSelect function will also be fired for any
后面还有 144 行代码,购买后查看完整代码

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

AI 解读 AI

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

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