Authored by qinchao

mha

... ... @@ -74,25 +74,27 @@
<style>
.node-container{
position: absolute;
position: relative;
//position: absolute;
z-index: 9999;
width: 300px;
height: 80px;
height: 100px;
border: 1px solid #999;
border-radius: 6px;
border-radius: 3px;
overflow: hidden;
position: relative;
}
.node-container .node-container-title{
color: white;
font-size: 2em;
float:left;
height:20px;
height:40px;
}
.node-container .node-container-content{
margin-top:30px;
margin-top:40px;
height: 100%;
background-color: white;
}
... ... @@ -100,10 +102,11 @@
float:right;
}
.node-container .node-container-title-button-div button{
.node-container .node-container-title-button-div span{
margin-top:3px;
margin-left:3px;
margin-right:3px;
width:20px;
//width:20px;
}
... ... @@ -191,22 +194,29 @@
getHtml: function(cfg){
var model = cfg.model;
var container = Util.createDOM('<div class="node-container"></div>');
var title = Util.createDOM('<div class="node-container-title">'+model.id+'</div>');
var title = Util.createDOM('<div class="node-container-title">'+model.label+'</div>');
container.appendChild(title);
var buttonDiv = Util.createDOM('<div class="node-container-title-button-div"></div>');
var btn = Util.createDOM('<button>I</button>');
btn.addEventListener('click', function(){
alert(222);
});
buttonDiv.appendChild(btn);
if(!model.disabledFlag){
var buttonDiv = Util.createDOM('<div class="node-container-title-button-div"></div>');
var btn = Util.createDOM('' +
' <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>' +
' ');
btn.addEventListener('click', function(){
alert(1111);
});
buttonDiv.appendChild(btn);
btn = Util.createDOM('' +
' <span class="glyphicon glyphicon-minus" aria-hidden="true"></span>' +
'');
btn.addEventListener('click', function(){
alert(222);
});
buttonDiv.appendChild(btn);
container.appendChild(buttonDiv);
}
btn = Util.createDOM('<button >X</button>');
btn.addEventListener('click', function(){
alert(1111);
});
buttonDiv.appendChild(btn);
container.appendChild(buttonDiv);
var content = Util.createDOM('<div class="node-container-content">'+model.ip+'</div>');
container.appendChild(content);
... ... @@ -234,7 +244,7 @@
}).color( function(obj){
var rst;
if(obj.disabledFlag){
rst = '#CCC';
rst = '#aaa';
}else{
if(obj.noMaster==1){
//rst = '#F90426';
... ...