|
@ -16,7 +16,7 @@ import {luckysheetupdateCell} from './updateCell'; |
|
|
import insertFormula from './insertFormula'; |
|
|
import insertFormula from './insertFormula'; |
|
|
import sheetmanage from './sheetmanage'; |
|
|
import sheetmanage from './sheetmanage'; |
|
|
import luckysheetPostil from './postil'; |
|
|
import luckysheetPostil from './postil'; |
|
|
import { isRealNum, isRealNull, isEditMode, hasPartMC } from '../global/validate'; |
|
|
import { isRealNum, isRealNull, isEditMode, hasPartMC, checkIsAllowEdit } from '../global/validate'; |
|
|
import tooltip from '../global/tooltip'; |
|
|
import tooltip from '../global/tooltip'; |
|
|
import editor from '../global/editor'; |
|
|
import editor from '../global/editor'; |
|
|
import { genarate, update, is_date } from '../global/format'; |
|
|
import { genarate, update, is_date } from '../global/format'; |
|
@ -119,6 +119,11 @@ const menuButton = { |
|
|
|
|
|
|
|
|
//格式刷
|
|
|
//格式刷
|
|
|
$("#luckysheet-icon-paintformat").click(function(e){ |
|
|
$("#luckysheet-icon-paintformat").click(function(e){ |
|
|
|
|
|
// *如果禁止前台编辑,则中止下一步操作
|
|
|
|
|
|
if (!checkIsAllowEdit()) { |
|
|
|
|
|
tooltip.info("", locale().pivotTable.errorNotAllowEdit); |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
e.stopPropagation(); |
|
|
e.stopPropagation(); |
|
|
let _locale = locale(); |
|
|
let _locale = locale(); |
|
|
let locale_paint = _locale.paint; |
|
|
let locale_paint = _locale.paint; |
|
@ -174,6 +179,11 @@ const menuButton = { |
|
|
_this.luckysheetPaintSingle = true; |
|
|
_this.luckysheetPaintSingle = true; |
|
|
}); |
|
|
}); |
|
|
$("#luckysheet-icon-paintformat").dblclick(function(){ |
|
|
$("#luckysheet-icon-paintformat").dblclick(function(){ |
|
|
|
|
|
// *如果禁止前台编辑,则中止下一步操作
|
|
|
|
|
|
if (!checkIsAllowEdit()) { |
|
|
|
|
|
tooltip.info("", locale().pivotTable.errorNotAllowEdit); |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
let _locale = locale(); |
|
|
let _locale = locale(); |
|
|
let locale_paint = _locale.paint; |
|
|
let locale_paint = _locale.paint; |
|
|
if(Store.luckysheet_select_save == null || Store.luckysheet_select_save.length == 0){ |
|
|
if(Store.luckysheet_select_save == null || Store.luckysheet_select_save.length == 0){ |
|
@ -779,6 +789,11 @@ const menuButton = { |
|
|
|
|
|
|
|
|
//交替颜色
|
|
|
//交替颜色
|
|
|
$menuButton.find(".luckysheet-icon-alternateformat").click(function(){ |
|
|
$menuButton.find(".luckysheet-icon-alternateformat").click(function(){ |
|
|
|
|
|
// *如果禁止前台编辑,则中止下一步操作
|
|
|
|
|
|
if (!checkIsAllowEdit()) { |
|
|
|
|
|
tooltip.info("", locale().pivotTable.errorNotAllowEdit); |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
$menuButton.hide(); |
|
|
$menuButton.hide(); |
|
|
luckysheetContainerFocus(); |
|
|
luckysheetContainerFocus(); |
|
|
|
|
|
|
|
@ -927,7 +942,11 @@ const menuButton = { |
|
|
|
|
|
|
|
|
//边框设置
|
|
|
//边框设置
|
|
|
$("#luckysheet-icon-border-all").click(function(){ |
|
|
$("#luckysheet-icon-border-all").click(function(){ |
|
|
|
|
|
// *如果禁止前台编辑,则中止下一步操作
|
|
|
|
|
|
if (!checkIsAllowEdit()) { |
|
|
|
|
|
tooltip.info("", locale().pivotTable.errorNotAllowEdit); |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
if(!checkProtectionFormatCells(Store.currentSheetIndex)){ |
|
|
if(!checkProtectionFormatCells(Store.currentSheetIndex)){ |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
@ -1085,6 +1104,11 @@ const menuButton = { |
|
|
|
|
|
|
|
|
// border choose menu
|
|
|
// border choose menu
|
|
|
$menuButton.find(".luckysheet-cols-menuitem").click(function(){ |
|
|
$menuButton.find(".luckysheet-cols-menuitem").click(function(){ |
|
|
|
|
|
// *如果禁止前台编辑,则中止下一步操作
|
|
|
|
|
|
if (!checkIsAllowEdit()) { |
|
|
|
|
|
tooltip.info("", locale().pivotTable.errorNotAllowEdit); |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
$menuButton.hide(); |
|
|
$menuButton.hide(); |
|
|
luckysheetContainerFocus(); |
|
|
luckysheetContainerFocus(); |
|
|
|
|
|
|
|
@ -1226,7 +1250,6 @@ const menuButton = { |
|
|
|
|
|
|
|
|
//合并单元格
|
|
|
//合并单元格
|
|
|
$("#luckysheet-icon-merge-button").click(function(){ |
|
|
$("#luckysheet-icon-merge-button").click(function(){ |
|
|
|
|
|
|
|
|
if(!checkProtectionNotEnable(Store.currentSheetIndex)){ |
|
|
if(!checkProtectionNotEnable(Store.currentSheetIndex)){ |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
@ -3128,7 +3151,9 @@ const menuButton = { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if(Store.allowEdit===false){ |
|
|
// *如果禁止前台编辑,则中止下一步操作
|
|
|
|
|
|
if (!checkIsAllowEdit()) { |
|
|
|
|
|
tooltip.info("", locale().pivotTable.errorNotAllowEdit); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -3175,6 +3200,11 @@ const menuButton = { |
|
|
jfrefreshgrid(d, Store.luckysheet_select_save, allParam, false); |
|
|
jfrefreshgrid(d, Store.luckysheet_select_save, allParam, false); |
|
|
}, |
|
|
}, |
|
|
updateFormat_mc: function(d, foucsStatus){ |
|
|
updateFormat_mc: function(d, foucsStatus){ |
|
|
|
|
|
// *如果禁止前台编辑,则中止下一步操作
|
|
|
|
|
|
if (!checkIsAllowEdit()) { |
|
|
|
|
|
tooltip.info("", locale().pivotTable.errorNotAllowEdit); |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
let cfg = $.extend(true, {}, Store.config); |
|
|
let cfg = $.extend(true, {}, Store.config); |
|
|
if(cfg["merge"] == null){ |
|
|
if(cfg["merge"] == null){ |
|
|
cfg["merge"] = {}; |
|
|
cfg["merge"] = {}; |
|
|