bug fix
This commit is contained in:
parent
b28791eb31
commit
c4ce4b6f7f
|
@ -4,9 +4,9 @@ var editors = {
|
||||||
_removeAllMarker: function () {
|
_removeAllMarker: function () {
|
||||||
var removeData = $("#dialogCloseEditor").data("removeData");
|
var removeData = $("#dialogCloseEditor").data("removeData");
|
||||||
if (removeData && removeData.length > 0) {
|
if (removeData && removeData.length > 0) {
|
||||||
removeData.splice(0, 1);
|
var removeIndex = removeData.splice(0, 1);
|
||||||
$("#dialogCloseEditor").data("removeData", removeData);
|
$("#dialogCloseEditor").data("removeData", removeData);
|
||||||
$(".edit-panel .tabs .ico-close:eq(0)").click();
|
$(".edit-panel .tabs > div[data-index=" + removeIndex + "] .ico-close").click();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
init: function () {
|
init: function () {
|
||||||
|
@ -70,6 +70,7 @@ var editors = {
|
||||||
},
|
},
|
||||||
removeBefore: function (id) {
|
removeBefore: function (id) {
|
||||||
if (id === 'startPage') { // 当前关闭的 tab 是起始页
|
if (id === 'startPage') { // 当前关闭的 tab 是起始页
|
||||||
|
editors._removeAllMarker();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,6 +78,7 @@ var editors = {
|
||||||
for (var i = 0, ii = editors.data.length; i < ii; i++) {
|
for (var i = 0, ii = editors.data.length; i < ii; i++) {
|
||||||
if (editors.data[i].id === id) {
|
if (editors.data[i].id === id) {
|
||||||
if (editors.data[i].editor.doc.isClean()) {
|
if (editors.data[i].editor.doc.isClean()) {
|
||||||
|
editors._removeAllMarker();
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
$("#dialogCloseEditor").dialog("open", $(".edit-panel .tabs > div[data-index="
|
$("#dialogCloseEditor").dialog("open", $(".edit-panel .tabs > div[data-index="
|
||||||
|
@ -90,8 +92,6 @@ var editors = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
removeAfter: function (id, nextId) {
|
removeAfter: function (id, nextId) {
|
||||||
editors._removeAllMarker();
|
|
||||||
|
|
||||||
if ($(".edit-panel .tabs > div").length === 0) {
|
if ($(".edit-panel .tabs > div").length === 0) {
|
||||||
// 全部 tab 都关闭时才 disables 菜单中“全部关闭”的按钮
|
// 全部 tab 都关闭时才 disables 菜单中“全部关闭”的按钮
|
||||||
menu.disabled(['close-all']);
|
menu.disabled(['close-all']);
|
||||||
|
|
Loading…
Reference in New Issue