dojox/layout/FloatingPane浮动面板小部件
来源:互联网 发布:开淘宝店需要交费吗 编辑:程序博客网 时间:2024/06/05 10:38
该小部件让contentPane内容面板浮动,并且通过拖拽标题可以移动该面板。该小部件提供了最小化、最大化、关闭、可调整大小的功能。我们可以在浮动面板里面放置html元素,来显示在面板上。
注解:有时html元素的布局与样式需要配合bootstrap来使用,效果更好。注意的是创建小部件时有时需要引入相应的CSS样式,否则显示会有问题。
例如:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>浮动面板</title>
<link rel="stylesheet" type="text/css" href="http://localhost/arcgis_js_v43_api/arcgis_js_api/library/4.3/4.3/esri/css/main.css"/>
<link rel="stylesheet" type="text/css" href="http://localhost/arcgis_js_v43_api/arcgis_js_api/library/4.3/4.3/dijit/themes/soria/soria.css"/>
<link rel="stylesheet" type="text/css" href="http://localhost/arcgis_js_v43_api/arcgis_js_api/library/4.3/4.3/dojox/layout/resources/FloatingPane.css"/>
<script type="text/javascript" src="http://localhost/arcgis_js_v43_api/arcgis_js_api/library/4.3/4.3/init.js"></script>
<style type="text/css">
html,body{ margin: 0px;padding:0px;width:100%;height:100%}
</style>
<script type="text/javascript">
require(["dojo/_base/window",
"dojo/_base/declare",
"dojox/layout/FloatingPane",
"dojo/dom-construct",
"dojo/on",
"dojo/domReady!"],
function(Win,declare,FloatingPane,domConstruct,on)
{
var divNode=domConstruct.create("div",{},Win.body());
var b = "<div id='wrj_lb' style='width:99%;height:575px;margin-left: 2px;'>"
+"<div id='querydiv'>"
+"<div class='input-group' style='margin-top: 2px;'>"
+"<input name='s' id='search' type='text' placeholder='输入查询信息...' class='form-control input-sm' style='width:200px;height:21px;color: #547088; margin-left: 15px;font-size: 14px;'>"
+"<select id = 'select' name='s.asasas' style='color: #999999;font-size: 14px; height: 27px;margin-left:7px;width:200px;'>"
+"<option value=''>请选择设备</option>"
+"<option value='0'>无人机</option>"
+"<option value='1'>地面设备</option>"
+"</select>"
+"</div>"
+"</div>"
+"<div id='asdsdas'>"
+"<div style='margin-top: 2px;'>"
+"<input type='text' placeholder='请选择第一个时间...' id='date1' name='s.kssj' style='color: #547088;width:200px;margin-left: 15px;height:21px;font-size: 14px;'>"
+"<input type='text' ' placeholder='请选择第二个时间...' id='date2' name='s.jssj' style='color: #547088;width:196px;margin-left: 7px;margin-bottom: 4px;height:21px;font-size: 14px;'>"
+"<a class='input-group-addon btn btn-info' id='sousuo' style='width:407px;background-color: #16C3FC;'><i class='glyphicon glyphicon-search'>查询</i>"
+"</a>"
+"</div>"
+"</div>"
+"<div id='datagird' style='width:99%;height:480px;margin-left: 2px;margin-top: 35px;'>"
+"</div>"
+"</div>";
var floatPane=new FloatingPane(
{
id:"myFloatPane",
title:"浮动面板",
resizable:true,//是否允许调整大小
closable:true,//关闭按钮
dockable:false,//最小化后的停靠
content:b,
style:"width:450px;height:600px;top:2%;left:50px;overflow:hidden;padding:0px;z-index:999",
//通过在对象内绑定事件
close:function()
{
alert("浮动面板被关闭!");
this.destroyRecursive();//销毁浮动面板机内容
}
},divNode);
floatPane.startup();//完成创建
});
</script>
</head>
<body class="soria">
</body>
</html>
效果图:
- dojox/layout/FloatingPane浮动面板小部件
- 浮动部件
- dojox/grid/EnhancedGrid数据格网小部件
- dojox.layout.contentpane 中addonload的bug
- DOJO-dojox.layout.TableContainer(实现表单布局)
- dojox
- 小部件
- 小部件
- dojox.grid.DataGrid 编程篇(1) -- Layout设计
- 自己写的浮动面板
- 小浮动
- layout获取中间面板标题
- SharePoint 部件通过EditorPart自定义属性面板
- Android小部件介绍
- Android天气小部件
- android 窗口小部件
- Widgets窗口小部件
- Android小部件AppWidget
- 【设想】如何打造一个高逼格的云运维平台?
- 【自用】javanote170726(数组、二位数组,简单选择排序和冒泡排序、字符串基础)
- 通过代码描述Java类中的各成分加载顺序和内存存放位置
- micropython的list应用
- JavaScript的属性和方法
- dojox/layout/FloatingPane浮动面板小部件
- Linux学习总结(38)——Linux超实用的30个命令
- Coursera算法课程中如何在eclipse中调用外部库stdlib.jar
- 基于Aspectj的注解操作
- 【代码笔记】iOS-自定义switch
- Missing URI template variable 'employeeNumber' for method parameter of type String
- 基本数据类型知识点整理
- 2017 Multi-University Training Contest
- 自定义Dialog弹框和其背景阴影显示