⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 json_demo.js

📁 zapatec suite 最新版 20070204,非常棒的ajax widgets 工具包
💻 JS
字号:
/** * @fileoverview Part of Zapatec Load Grid from URL demo. * * <pre> * Copyright (c) 2004-2007 by Zapatec, Inc. * http://www.zapatec.com * 1700 MLK Way, Berkeley, California, * 94709, U.S.A. * All rights reserved. * </pre> *//* $Id: json_demo.js 7323 2007-06-01 21:05:51Z alex $ *//** * Grid object. * @private */var objGrid;/** * Initializes grid from external source. * * @private * @param strUrl - source URL * @param strSourceType - source type: 'json/url', 'xml/url' or 'html/url' * @param strTheme - theme name */function loadGrid(strUrl, strSourceType, strTheme) {	objGrid = new Zapatec.Grid({		// Use specified URL as source		source: strUrl,		sourceType: strSourceType,		// Put the grid into element with id "gridContainer"		container: 'gridContainer',		// Use specified theme		theme: strTheme,		// Display filter out forms		filterOut: [			// Filter Date			{				// Use first column				column: 0,				// Put checkboxes into element with id "filterDate"				container: 'filterDate'			},			// Filter Account			{				// Use second column				column: 1,				// Use custom function filterOutAccount to display checkboxes				callback: filterOutAccount			}		]	});}/** * Displays checkboxes to filter out Account. * @private */function filterOutAccount(arrUniqueColumnValues) {	var strHtml = '';	for (var iVal = 0; iVal < arrUniqueColumnValues.length; iVal++) {		strHtml +=		 '<div>' + arrUniqueColumnValues[iVal].value +		 ' <input type="checkbox" checked onclick="' +		 arrUniqueColumnValues[iVal].onclick + '"/></div>';	}	document.getElementById('filterAccount').innerHTML = strHtml;}/** * Called when "Debits" button is clicked. Limits range of Amount to positive * numbers. * @private */function limitRangeDebits(form) {	if (objGrid) {		objGrid.limitRange({			column: 4,			min: 0,			max: Infinity		});	}}/** * Called when "Credits" button is clicked. Limits range of Amount to negative * numbers. * @private */function limitRangeCredits(form) {	if (objGrid) {		objGrid.limitRange({			column: 4,			min: -Infinity,			max: 0		});	}}

⌨️ 快捷键说明

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