1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
| wind = {
id : 0,
zIndex : 0,
left : 0,
top : 0,
maxMin : 0,
init : function() {
$('#window_'+wind.id+' .topWindow').parent('div').draggable({
start : function(event, ui) {
wind.zIndex++;
$(this).css('z-index', wind.zIndex);
},
});
},
newWind : function(left, top) {
wind.id ++;
var content = '',
$('body').append(wind.newWindow(content));
wind.left = left;
wind.top = top;
$('#window_'+wind.id).css('left', wind.left);
$('#window_'+wind.id).css('top', wind.top);
return;
},
newWindow : function(content) {
var xhtml = '';
xhtml += '<div class="window" id="window_'+wind.id+'" style="z-Index: ' + (wind.zIndex + 1) + ';">';
xhtml += '<div class="topWindow">';
xhtml += '<div class="minimizeButtom_actMan windowButtons">_</div>';
xhtml += '<div class="maximizeButtom_actMan windowButtons">+</div>';
xhtml += '<div class="closeButtom_actMan windowButtons">X</div>';
xhtml += '</div>';
xhtml += '<div class="middleWindow">';
xhtml += content;
xhtml += '</div>';
xhtml += '<div class="bottomWindow"></div>';
xhtml += '</div>';
return xhtml;
},
}; |
Partager