mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-03-17 11:13:45 +00:00
修改操作按钮定位位置问题
This commit is contained in:
parent
29ddcbb7b2
commit
6666469435
@ -222,27 +222,26 @@
|
|||||||
var oEvent = arguments.callee.caller.arguments[0] || event;
|
var oEvent = arguments.callee.caller.arguments[0] || event;
|
||||||
oEvent.stopPropagation();
|
oEvent.stopPropagation();
|
||||||
var offset = $(that).offset();
|
var offset = $(that).offset();
|
||||||
|
var top=offset.top-$(window).scrollTop();
|
||||||
var index = $(that).parents('tr').data('index');
|
var index = $(that).parents('tr').data('index');
|
||||||
$('.layui-nav-child').each(function (key) {
|
$('.layui-nav-child').each(function (key) {
|
||||||
if (key != index) {
|
if (key != index) {
|
||||||
$(this).hide();
|
$(this).hide();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if($(document).height() < offset.top+$(that).next('ul').height()){
|
if($(document).height() < top+$(that).next('ul').height()){
|
||||||
$(that).next('ul').css({
|
$(that).next('ul').css({
|
||||||
'padding': 10,
|
'padding': 10,
|
||||||
'top': offset.top-$(that).next('ul').height()-30,
|
'top': - ($(that).parent('td').height() / 2 + $(that).height() + $(that).next('ul').height()/2),
|
||||||
'min-width': 'inherit',
|
'min-width': 'inherit',
|
||||||
'left': offset.left - $(that).width() / 2,
|
'position': 'absolute'
|
||||||
'position': 'fixed'
|
|
||||||
}).toggle();
|
}).toggle();
|
||||||
}else{
|
}else{
|
||||||
$(that).next('ul').css({
|
$(that).next('ul').css({
|
||||||
'padding': 10,
|
'padding': 10,
|
||||||
'top': offset.top + 30,
|
'top':$(that).parent('td').height() / 2 + $(that).height(),
|
||||||
'min-width': 'inherit',
|
'min-width': 'inherit',
|
||||||
'left': offset.left - $(that).width() / 2,
|
'position': 'absolute'
|
||||||
'position': 'fixed'
|
|
||||||
}).toggle();
|
}).toggle();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -198,23 +198,32 @@
|
|||||||
$(document).click(function (e) {
|
$(document).click(function (e) {
|
||||||
$('.layui-nav-child').hide();
|
$('.layui-nav-child').hide();
|
||||||
})
|
})
|
||||||
function dropdown(that) {
|
function dropdown(that){
|
||||||
var oEvent = arguments.callee.caller.arguments[0] || event;
|
var oEvent = arguments.callee.caller.arguments[0] || event;
|
||||||
oEvent.stopPropagation();
|
oEvent.stopPropagation();
|
||||||
var offset = $(that).offset();
|
var offset = $(that).offset();
|
||||||
|
var top=offset.top-$(window).scrollTop();
|
||||||
var index = $(that).parents('tr').data('index');
|
var index = $(that).parents('tr').data('index');
|
||||||
$('.layui-nav-child').each(function (key) {
|
$('.layui-nav-child').each(function (key) {
|
||||||
if (key != index) {
|
if (key != index) {
|
||||||
$(this).hide();
|
$(this).hide();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
if($(document).height() < top+$(that).next('ul').height()){
|
||||||
$(that).next('ul').css({
|
$(that).next('ul').css({
|
||||||
'padding': 10,
|
'padding': 10,
|
||||||
'top': offset.top + 30,
|
'top': - ($(that).parent('td').height() / 2 + $(that).height() + $(that).next('ul').height()/2),
|
||||||
'min-width': 'inherit',
|
'min-width': 'inherit',
|
||||||
'left': offset.left - $(that).width() / 2,
|
'position': 'absolute'
|
||||||
'position': 'fixed'
|
|
||||||
}).toggle();
|
}).toggle();
|
||||||
|
}else{
|
||||||
|
$(that).next('ul').css({
|
||||||
|
'padding': 10,
|
||||||
|
'top':$(that).parent('td').height() / 2 + $(that).height(),
|
||||||
|
'min-width': 'inherit',
|
||||||
|
'position': 'absolute'
|
||||||
|
}).toggle();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
{/block}
|
{/block}
|
||||||
|
|||||||
@ -214,23 +214,32 @@
|
|||||||
$(document).click(function (e) {
|
$(document).click(function (e) {
|
||||||
$('.layui-nav-child').hide();
|
$('.layui-nav-child').hide();
|
||||||
})
|
})
|
||||||
function dropdown(that) {
|
function dropdown(that){
|
||||||
var oEvent = arguments.callee.caller.arguments[0] || event;
|
var oEvent = arguments.callee.caller.arguments[0] || event;
|
||||||
oEvent.stopPropagation();
|
oEvent.stopPropagation();
|
||||||
var offset = $(that).offset();
|
var offset = $(that).offset();
|
||||||
|
var top=offset.top-$(window).scrollTop();
|
||||||
var index = $(that).parents('tr').data('index');
|
var index = $(that).parents('tr').data('index');
|
||||||
$('.layui-nav-child').each(function (key) {
|
$('.layui-nav-child').each(function (key) {
|
||||||
if (key != index) {
|
if (key != index) {
|
||||||
$(this).hide();
|
$(this).hide();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
if($(document).height() < top+$(that).next('ul').height()){
|
||||||
$(that).next('ul').css({
|
$(that).next('ul').css({
|
||||||
'padding': 10,
|
'padding': 10,
|
||||||
'top': offset.top + 30,
|
'top': - ($(that).parent('td').height() / 2 + $(that).height() + $(that).next('ul').height()/2),
|
||||||
'min-width': 'inherit',
|
'min-width': 'inherit',
|
||||||
'left': offset.left - $(that).width() / 2,
|
'position': 'absolute'
|
||||||
'position': 'fixed'
|
|
||||||
}).toggle();
|
}).toggle();
|
||||||
|
}else{
|
||||||
|
$(that).next('ul').css({
|
||||||
|
'padding': 10,
|
||||||
|
'top':$(that).parent('td').height() / 2 + $(that).height(),
|
||||||
|
'min-width': 'inherit',
|
||||||
|
'position': 'absolute'
|
||||||
|
}).toggle();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$('.js-group-btn').on('click',function(){
|
$('.js-group-btn').on('click',function(){
|
||||||
$('.js-group-btn').css({zIndex:1});
|
$('.js-group-btn').css({zIndex:1});
|
||||||
|
|||||||
@ -139,23 +139,32 @@
|
|||||||
$(document).click(function (e) {
|
$(document).click(function (e) {
|
||||||
$('.layui-nav-child').hide();
|
$('.layui-nav-child').hide();
|
||||||
})
|
})
|
||||||
function dropdown(that) {
|
function dropdown(that){
|
||||||
var oEvent = arguments.callee.caller.arguments[0] || event;
|
var oEvent = arguments.callee.caller.arguments[0] || event;
|
||||||
oEvent.stopPropagation();
|
oEvent.stopPropagation();
|
||||||
var offset = $(that).offset();
|
var offset = $(that).offset();
|
||||||
|
var top=offset.top-$(window).scrollTop();
|
||||||
var index = $(that).parents('tr').data('index');
|
var index = $(that).parents('tr').data('index');
|
||||||
$('.layui-nav-child').each(function (key) {
|
$('.layui-nav-child').each(function (key) {
|
||||||
if (key != index) {
|
if (key != index) {
|
||||||
$(this).hide();
|
$(this).hide();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
if($(document).height() < top+$(that).next('ul').height()){
|
||||||
$(that).next('ul').css({
|
$(that).next('ul').css({
|
||||||
'padding': 10,
|
'padding': 10,
|
||||||
'top': offset.top + 30,
|
'top': - ($(that).parent('td').height() / 2 + $(that).height() + $(that).next('ul').height()/2),
|
||||||
'min-width': 'inherit',
|
'min-width': 'inherit',
|
||||||
'left': offset.left - $(that).width() / 2,
|
'position': 'absolute'
|
||||||
'position': 'fixed'
|
|
||||||
}).toggle();
|
}).toggle();
|
||||||
|
}else{
|
||||||
|
$(that).next('ul').css({
|
||||||
|
'padding': 10,
|
||||||
|
'top':$(that).parent('td').height() / 2 + $(that).height(),
|
||||||
|
'min-width': 'inherit',
|
||||||
|
'position': 'absolute'
|
||||||
|
}).toggle();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
layList.search('search',function(where){
|
layList.search('search',function(where){
|
||||||
layList.reload(where);
|
layList.reload(where);
|
||||||
|
|||||||
@ -87,7 +87,6 @@ class PHPExcelService
|
|||||||
*/
|
*/
|
||||||
public function setExcelContent($list=null)
|
public function setExcelContent($list=null)
|
||||||
{
|
{
|
||||||
self::$PHPExcel = new \PHPExcel();
|
|
||||||
$sheet=self::$PHPExcel->getActiveSheet();
|
$sheet=self::$PHPExcel->getActiveSheet();
|
||||||
foreach(self::$data as $key=>$val){
|
foreach(self::$data as $key=>$val){
|
||||||
$row=self::$cellKey[$key];
|
$row=self::$cellKey[$key];
|
||||||
@ -178,7 +177,6 @@ class PHPExcelService
|
|||||||
self::$title=$title;
|
self::$title=$title;
|
||||||
if(empty($Name)) $Name=time();
|
if(empty($Name)) $Name=time();
|
||||||
//设置Excel属性
|
//设置Excel属性
|
||||||
self::$PHPExcel = new \PHPExcel();
|
|
||||||
self::$PHPExcel ->getProperties()
|
self::$PHPExcel ->getProperties()
|
||||||
->setCreator("Neo")
|
->setCreator("Neo")
|
||||||
->setLastModifiedBy("Neo")
|
->setLastModifiedBy("Neo")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user