ResizableTextarea.js
资源名称:oa.rar [点击查看]
上传用户:kimgenplus
上传日期:2016-06-05
资源大小:20877k
文件大小:3k
源码类别:
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.ResizableTextarea");
- dojo.require("dojo.widget.*");
- dojo.require("dojo.widget.LayoutContainer");
- dojo.require("dojo.widget.ResizeHandle");
- dojo.widget.defineWidget("dojo.widget.ResizableTextarea", dojo.widget.HtmlWidget, {templateString:"<div>nt<div style="border: 2px solid black; width: 90%; height: 200px;"nttdojoAttachPoint="rootLayoutNode">ntt<div dojoAttachPoint="textAreaContainerNode" ntttstyle="border: 0px; margin: 0px; overflow: hidden;">ntt</div>ntt<div dojoAttachPoint="statusBarContainerNode" class="statusBar">nttt<div dojoAttachPoint="statusLabelNode" nttttclass="statusPanel"nttttstyle="padding-right: 0px; z-index: 1;">drag to resize</div>nttt<div dojoAttachPoint="resizeHandleNode"></div>ntt</div>nt</div>n</div>n", templateCssString:"div.statusBar {ntbackground-color: ThreeDFace;ntheight: 28px;ntpadding: 1px;ntoverflow: hidden;ntfont-size: 12px;n}nndiv.statusPanel {ntbackground-color: ThreeDFace;ntborder: 1px solid;ntborder-color: ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow;ntmargin: 1px;ntpadding: 2px 6px;n}n", templateCssPath:dojo.uri.moduleUri("dojo.widget", "templates/ResizableTextarea.css"), fillInTemplate:function (args, frag) {
- this.textAreaNode = this.getFragNodeRef(frag).cloneNode(true);
- dojo.body().appendChild(this.domNode);
- this.rootLayout = dojo.widget.createWidget("LayoutContainer", {minHeight:50, minWidth:100}, this.rootLayoutNode);
- this.textAreaContainer = dojo.widget.createWidget("LayoutContainer", {layoutAlign:"client"}, this.textAreaContainerNode);
- this.rootLayout.addChild(this.textAreaContainer);
- this.textAreaContainer.domNode.appendChild(this.textAreaNode);
- with (this.textAreaNode.style) {
- width = "100%";
- height = "100%";
- }
- this.statusBar = dojo.widget.createWidget("LayoutContainer", {layoutAlign:"bottom", minHeight:28}, this.statusBarContainerNode);
- this.rootLayout.addChild(this.statusBar);
- this.statusLabel = dojo.widget.createWidget("LayoutContainer", {layoutAlign:"client", minWidth:50}, this.statusLabelNode);
- this.statusBar.addChild(this.statusLabel);
- this.resizeHandle = dojo.widget.createWidget("ResizeHandle", {targetElmId:this.rootLayout.widgetId}, this.resizeHandleNode);
- this.statusBar.addChild(this.resizeHandle);
- }});