|
@@ -50,7 +50,8 @@ const STATE = {
|
|
|
addingProject: false,
|
|
addingProject: false,
|
|
|
addingFolder: false,
|
|
addingFolder: false,
|
|
|
deleting: false,
|
|
deleting: false,
|
|
|
- importing: false
|
|
|
|
|
|
|
+ importing: false,
|
|
|
|
|
+ moving: false,
|
|
|
};
|
|
};
|
|
|
const projTreeObj = {
|
|
const projTreeObj = {
|
|
|
tree: null,
|
|
tree: null,
|
|
@@ -508,6 +509,7 @@ const projTreeObj = {
|
|
|
}
|
|
}
|
|
|
projTreeObj.moveTo(selected, null, parent, next, null, action);
|
|
projTreeObj.moveTo(selected, null, parent, next, null, action);
|
|
|
$.bootstrapLoading.end();
|
|
$.bootstrapLoading.end();
|
|
|
|
|
+ STATE.moving = false;
|
|
|
projTreeObj.emitTreeChange();
|
|
projTreeObj.emitTreeChange();
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -551,10 +553,15 @@ const projTreeObj = {
|
|
|
this.doAfterTreeOpr({selected, parent, next, projectMap}, 'downLevel');
|
|
this.doAfterTreeOpr({selected, parent, next, projectMap}, 'downLevel');
|
|
|
},
|
|
},
|
|
|
upMove: function () {
|
|
upMove: function () {
|
|
|
|
|
+ if (STATE.moving) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ STATE.moving = true;
|
|
|
let selected = projTreeObj.tree.selected,
|
|
let selected = projTreeObj.tree.selected,
|
|
|
parent = selected.parent,
|
|
parent = selected.parent,
|
|
|
next = selected.preSibling(),
|
|
next = selected.preSibling(),
|
|
|
projectMap = {};
|
|
projectMap = {};
|
|
|
|
|
+ //$('#upMove').addClass('disabled');
|
|
|
//更新前前兄弟
|
|
//更新前前兄弟
|
|
|
let prepre = selected.preSibling().preSibling();
|
|
let prepre = selected.preSibling().preSibling();
|
|
|
if (prepre) {
|
|
if (prepre) {
|
|
@@ -568,10 +575,15 @@ const projTreeObj = {
|
|
|
this.doAfterTreeOpr({selected, parent, next, projectMap});
|
|
this.doAfterTreeOpr({selected, parent, next, projectMap});
|
|
|
},
|
|
},
|
|
|
downMove: function () {
|
|
downMove: function () {
|
|
|
|
|
+ if (STATE.moving) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ STATE.moving = true;
|
|
|
let selected = projTreeObj.tree.selected,
|
|
let selected = projTreeObj.tree.selected,
|
|
|
parent = selected.parent,
|
|
parent = selected.parent,
|
|
|
next = selected.nextSibling.nextSibling,
|
|
next = selected.nextSibling.nextSibling,
|
|
|
projectMap = {};
|
|
projectMap = {};
|
|
|
|
|
+ //$('#downMove').addClass('disabled');
|
|
|
//更新前兄弟
|
|
//更新前兄弟
|
|
|
let pre = selected.preSibling();
|
|
let pre = selected.preSibling();
|
|
|
if (pre) {
|
|
if (pre) {
|