BUG-14843 Process Tracker - Menu Sticks
I added the menu item in the remove event when the windows is closed.
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
var stagesmap=function(){
|
var stagesmap=function(){
|
||||||
|
var menu_edit_items = [];
|
||||||
this.data={
|
this.data={
|
||||||
load:function(){
|
load:function(){
|
||||||
var r = new leimnud.module.rpc.xmlhttp({
|
var r = new leimnud.module.rpc.xmlhttp({
|
||||||
@@ -227,8 +228,8 @@ var stagesmap=function(){
|
|||||||
});
|
});
|
||||||
if(this.options.rw===true)
|
if(this.options.rw===true)
|
||||||
{
|
{
|
||||||
var menu = new this.parent.module.app.menuRight();
|
this.menuEdit = new this.parent.module.app.menuRight();
|
||||||
menu.make({
|
this.menuEdit.make({
|
||||||
target:a,
|
target:a,
|
||||||
width:201,
|
width:201,
|
||||||
theme:this.options.theme,
|
theme:this.options.theme,
|
||||||
@@ -319,8 +320,8 @@ var stagesmap=function(){
|
|||||||
},args:index})}
|
},args:index})}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
menu_edit = menu;
|
menu_edit_items.push(this.menuEdit);
|
||||||
this.observers.menu.register(menu.remove,menu);
|
this.observers.menu.register(this.menuEdit.remove,this.menuEdit);
|
||||||
}
|
}
|
||||||
this.panels.editor.elements.content.appendChild(a);
|
this.panels.editor.elements.content.appendChild(a);
|
||||||
a.appendChild(b);
|
a.appendChild(b);
|
||||||
@@ -370,6 +371,11 @@ var stagesmap=function(){
|
|||||||
},args:[a,c,index,options.object.drag]}),
|
},args:[a,c,index,options.object.drag]}),
|
||||||
|
|
||||||
finish :this.parent.closure({instance:this,method:function(div,divC,uid,drag){
|
finish :this.parent.closure({instance:this,method:function(div,divC,uid,drag){
|
||||||
|
for(var j=0;j<this.data.db.stages.length;j++){
|
||||||
|
if(menu_edit_items[j].options.target.textContent == options.label){
|
||||||
|
menu_edit = menu_edit_items[j];
|
||||||
|
}
|
||||||
|
}
|
||||||
if(!drag.moved){return false;}
|
if(!drag.moved){return false;}
|
||||||
var pos = this.parent.dom.position(div);
|
var pos = this.parent.dom.position(div);
|
||||||
var h=pos;
|
var h=pos;
|
||||||
|
|||||||
@@ -70,7 +70,14 @@ var editStagesMap = function(sProcessUID) {
|
|||||||
fx :{modal:true,opacity:true,blinkToFront:false,fadeIn:false,drag:false}
|
fx :{modal:true,opacity:true,blinkToFront:false,fadeIn:false,drag:false}
|
||||||
};
|
};
|
||||||
oPanel.events = {
|
oPanel.events = {
|
||||||
remove: function() { delete(oPanel); menu_add.remove(); menu_edit.menu(); }.extend(this)
|
remove: function() {
|
||||||
|
delete(oPanel);
|
||||||
|
if(menu_edit.maked === true){
|
||||||
|
menu_edit.remove();
|
||||||
|
} else if (menu_add.maked === true) {
|
||||||
|
menu_add.remove();
|
||||||
|
}
|
||||||
|
}.extend(this)
|
||||||
};
|
};
|
||||||
oPanel.make();
|
oPanel.make();
|
||||||
oPanel.loader.show();
|
oPanel.loader.show();
|
||||||
|
|||||||
Reference in New Issue
Block a user