DemoItem.js
资源名称:oa.rar [点击查看]
上传用户:kimgenplus
上传日期:2016-06-05
资源大小:20877k
文件大小:4k
源码类别:
OA系统
开发平台:
Java
- /*
- 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.demoEngine.DemoItem");
- dojo.require("dojo.widget.*");
- dojo.require("dojo.widget.HtmlWidget");
- dojo.widget.defineWidget("my.widget.demoEngine.DemoItem", dojo.widget.HtmlWidget, {templateString:"<div dojoAttachPoint="domNode">nt<div dojoAttachPoint="summaryBoxNode">ntt<table width="100%" cellspacing="0" cellpadding="0">nttt<tbody>ntttt<tr>nttttt<td dojoAttachPoint="screenshotTdNode" valign="top" width="1%">ntttttt<img dojoAttachPoint="thumbnailImageNode" dojoAttachEvent="onclick: onSelectDemo" />nttttt</td>nttttt<td dojoAttachPoint="summaryContainerNode" valign="top">ntttttt<h1 dojoAttachPoint="nameNode">ntttttt</h1>ntttttt<div dojoAttachPoint="summaryNode">nttttttt<p dojoAttachPoint="descriptionNode"></p>nttttttt<div dojoAttachPoint="viewDemoLinkNode"><img dojoAttachPoint="viewDemoImageNode"/ dojoAttachEvent="onclick: onSelectDemo"></div>ntttttt</div>nttttt</td>ntttt</tr>nttt</tbody>ntt</table>nt</div>n</div>n", templateCssString:".demoItemSummaryBox {ntbackground: #efefef;ntborder:1px solid #dae3ee;n}nn.demoItemScreenshot {ntpadding:0.65em;ntwidth:175px;ntborder-right:1px solid #fafafa;nttext-align:center;ntcursor: pointer;n}nn.demoItemWrapper{ntmargin-bottom:1em;n}nn.demoItemWrapper a:link, .demoItemWrapper a:visited {ntcolor:#a6238f;nttext-decoration:none;n}nn.demoItemSummaryContainer {ntborder-left:1px solid #ddd;n}nn.demoItemSummaryContainer h1 {ntbackground-color:#e8e8e8;ntborder-bottom: 1px solid #e6e6e6;ntcolor:#738fb9;ntmargin:1px;ntpadding:0.5em;ntfont-family:"Lucida Grande", "Tahoma", serif;ntfont-size:1.25em;ntfont-weight:normal;n}nn.demoItemSummaryContainer h1 .packageSummary {ntdisplay:block;ntcolor:#000;ntfont-size:10px;ntmargin-top:2px;n}nn.demoItemSummaryContainer .demoItemSummary{ntpadding:1em;n}nn.demoItemSummaryContainer .demoItemSummary p {ntfont-size:0.85em;ntpadding:0;ntmargin:0;n}nn.demoItemView {nttext-align:right;ntcursor: pointer;n}n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "demoEngine/templates/DemoItem.css"), postCreate:function () {
- dojo.html.addClass(this.domNode, this.domNodeClass);
- dojo.html.addClass(this.summaryBoxNode, this.summaryBoxClass);
- dojo.html.addClass(this.screenshotTdNode, this.screenshotTdClass);
- dojo.html.addClass(this.summaryContainerNode, this.summaryContainerClass);
- dojo.html.addClass(this.summaryNode, this.summaryClass);
- dojo.html.addClass(this.viewDemoLinkNode, this.viewDemoLinkClass);
- this.nameNode.appendChild(document.createTextNode(this.name));
- this.descriptionNode.appendChild(document.createTextNode(this.description));
- this.thumbnailImageNode.src = this.thumbnail;
- this.thumbnailImageNode.name = this.name;
- this.viewDemoImageNode.src = this.viewDemoImage;
- this.viewDemoImageNode.name = this.name;
- }, onSelectDemo:function () {
- }}, "", function () {
- this.demo = "";
- this.domNodeClass = "demoItemWrapper";
- this.summaryBoxNode = "";
- this.summaryBoxClass = "demoItemSummaryBox";
- this.nameNode = "";
- this.thumbnailImageNode = "";
- this.viewDemoImageNode = "";
- this.screenshotTdNode = "";
- this.screenshotTdClass = "demoItemScreenshot";
- this.summaryContainerNode = "";
- this.summaryContainerClass = "demoItemSummaryContainer";
- this.summaryNode = "";
- this.summaryClass = "demoItemSummary";
- this.viewDemoLinkNode = "";
- this.viewDemoLinkClass = "demoItemView";
- this.descriptionNode = "";
- this.name = "Some Demo";
- this.description = "This is the description of this demo.";
- this.thumbnail = "images/test_thumb.gif";
- this.viewDemoImage = "images/viewDemo.png";
- });