主页面
来源:互联网 发布:数据截取 编辑:程序博客网 时间:2024/04/29 23:38
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="${path}/style/themes/default/easyui.css"/>
<script> function getRootPath(){ return '${path}';};</script>
<script src="${path}/js/jquery.js" type="text/javascript" language="javascript"></script>
<script type="text/javascript" src="${path}/js/jquery.easyui.min.js"></script>
<script src="${path}/js/main.js" type="text/javascript"></script>
<style>
#tabs .tabs-panels .panel{margin-top:-15px;}
.imgStyle{
margin-top:-10px;
}
.lay_topfixed {
height: 32px;
width:288px;
position: relative;
z-index: 400;
border: 1px solid #A6AAAD;
}
.lay_topfixed_inner {
left: 0;
position: fixed;
bottom:0;
width: 15%;
z-index: 400;
}
.gb_toolbar {
background-color: #e6effe;
color: #FFFFFF;
font-size: 14px;
height: 33px;
width:188px;
position: relative;
z-index: 500;
margin-bottom:18px;
}
.gb_toolbar a{
float:right;
text-decoration:none;
}
.app_main{
border:1px solid #a6aaad;
height:258px;
position:absolute;
z-index:800;
top:-259px;
left:5px;
width:188px;
background-color:#b3dfda;
margin-left:5px;
}
.app_main a {
text-decoration: none;
}
</style>
</head>
<body class="easyui-layout">
<div region="north" border="false" style="height:60px;background:#B3DFDA;">
</div>
<div region="west" split="true" title="West" style="width:220px;">
asdasdas
</div>
<div region="south" border="false" style="height:100px;background:#A9FACD;">
</div>
<div region="center" title="Main Title">
<div id="tabs">
<div title="tabs1">
tabs1<br/>tabs1<br/>tabs1<br/>tabs1<br/>tabs1<br/>tabs1<br/>tabs1<br/>tabs1<br/>tabs1<br/>tabs1<br/>tabs1<br/>tabs1<br/>tabs1<br/>tabs1<br/>tabs1<br/>tabs1<br/>tabs1<
</div>
</div>
</div>
<div id="mm" class="easyui-menu" style="width:150px;">
<div id="mm-tabclose">关闭</div>
<div id="mm-tabcloseall">全部关闭</div>
<div id="mm-tabcloseother">除此之外全部关闭</div>
<div class="menu-sep"></div>
<div id="mm-tabcloseright">当前页右侧全部关闭</div>
<div id="mm-tabcloseleft">当前页左侧全部关闭</div>
</div>
</body>
</html>
main.js
$(function(){
$("#tabs").tabs({});
});
function addTab(title, href,icon){
var tt = $('#tabs');
if (tt.tabs('exists', title)){//如果tab已经存在,则选中并刷新该tab
tt.tabs('select', title);
refreshTab({tabTitle:title,url:href});
} else {
if (href){
var content = '<iframe scrolling="auto" frameborder="0" src="'+href+'" style="width:100%;height:100%;"></iframe>';
} else {
var content = '未实现';
}
tt.tabs('add',{
title:title,
closable:true,
content:content,
iconCls:icon||'icon-default'
});
tabClose(tt);
}
}
/**
* 刷新tab
* @cfg
*example: {tabTitle:'tabTitle',url:'refreshUrl'}
*如果tabTitle为空,则默认刷新当前选中的tab
*如果url为空,则默认以原来的url进行reload
*/
function refreshTab(cfg){
var refresh_tab = cfg.tabTitle?$('#tabs').tabs('getTab',cfg.tabTitle):$('#tabs').tabs('getSelected');
if(refresh_tab && refresh_tab.find('iframe').length > 0){
var _refresh_ifram = refresh_tab.find('iframe')[0];
var refresh_url = cfg.url?cfg.url:_refresh_ifram.src;
//_refresh_ifram.src = refresh_url;
_refresh_ifram.contentWindow.location.href=refresh_url;
}
}
function tabClose(tt){
/*双击关闭TAB选项卡*/
$(".tabs-inner").dblclick(function(){
var subtitle = $(this).children("span").text();
tt.tabs('close',subtitle);
})
$(".tabs-inner").bind('contextmenu',function(e){
$('#mm').menu('show', {
left: e.pageX,
top: e.pageY
});
var subtitle =$(this).children("span").text();
$('#mm').data("currtab",subtitle);
return false;
});
//绑定右键菜单事件
//关闭当前
$('#mm-tabclose').click(function(){
var currtab_title = $('#mm').data("currtab");
tt.tabs('close',currtab_title);
})
//全部关闭
$('#mm-tabcloseall').click(function(){
$('.tabs-inner span').each(function(i,n){
var t = $(n).text();
tt.tabs('close',t);
});
});
//关闭除当前之外的TAB
$('#mm-tabcloseother').click(function(){
var currtab_title = $('#mm').data("currtab");
$('.tabs-inner span').each(function(i,n){
var t = $(n).text();
if(t!=currtab_title)
tt.tabs('close',t);
});
});
//关闭当前右侧的TAB
$('#mm-tabcloseright').click(function(){
var nextall = $('.tabs-selected').nextAll();
if(nextall.length==0){
msgShow('系统提示','后边没有啦~~','error');
//alert('后边没有啦~~');
return false;
}
nextall.each(function(i,n){
var t=$('a:eq(0) span',$(n)).text();
tt.tabs('close',t);
});
return false;
});
//关闭当前左侧的TAB
$('#mm-tabcloseleft').click(function(){
var prevall = $('.tabs-selected').prevAll();
if(prevall.length==0){
//alert('到头了,前边没有啦~~');
return false;
}
prevall.each(function(i,n){
var t=$('a:eq(0) span',$(n)).text();
tt.tabs('close',t);
});
return false;
});
}
/************dialog**************/
var default_left;
var default_top;
function opendl(istitle,iscontent,ismodal,iswidth){
$('#bglog').html(iscontent);
$('#bglog').dialog({
width:iswidth,
title:istitle,
modal:ismodal,
onOpen:function(){
//dialog原始left
default_left=$(this).panel('options').left;
//dialog原始top
default_top=$(this).panel('options').top;
},
onMove:function(left,top){ //鼠标拖动时事件
var body_width=document.body.offsetWidth;//body的宽度
var body_height=document.body.offsetHeight;//body的高度
var dd_width= $(this).panel('options').width;//dialog的宽度
var dd_height= $(this).panel('options').height;//dialog的高度
if(left<1||left>(body_width-dd_width)||top<1||top>(body_height-dd_height)){
$(this).dialog('move',{
left:default_left,
top:default_top
});
}
}
});
$("#bglog").parent().bgiframe();
}
function closedl(){
$("#bglog").dialog('close');
}
- 主页面
- 主页面
- 主页面
- 主页面
- 主页面
- 主页面
- 更新网站主页面
- 主页面弹出问题
- main主页面设置
- 操作主页面设置
- extjs 主页面
- winform 主页面最大化
- bolg主页面
- qq主页面
- 主页面Demo
- 弹出页面传值回主页面
- Android 仿QQ主页面
- CSDN博客主页面设置
- 浅析linux printk的实现
- 代码审查工具 StyleCop
- 程序员心中的“高山”与“大河”(一)
- 黑马程序员____数组复制
- 高性价比是移动应用成功的秘密 付费游戏通常每小时的成本不过几分钱
- 主页面
- jsp,servlet学习--实例:输出所有的表单数据
- 我已建成全球最大的信息通信网络
- 编程方法术语集
- C++ Templates 第十六章 模板与继承 例子
- jsp,servlet学习--读取HTTP请求头
- JAVA程序中也可能会发生内存泄露的问题
- 灰度图像腐蚀(vc实现)
- GetCheckedRadioButton