JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"
>
<html lang="en">
<head>
<script type='text/javascript'>
var _container_div = {
style : {
margin : '2px',
padding : '2px',
border : '1px solid black',
backgroundColor : 'red'
},
};
var _top_bar = {
style : {
height : '20px',
margin : '2px',
padding : '2px',
border : '1px solid black',
backgroundColor : 'red'
},
};
var _button_div = {
syle : {
position: 'absolute',
padding : '2px',
right : 0,
top : 0
}
};
var global_settings = {
show_x : true,
show_min: true,
allow_drag: true,
zIndex : true,
images : {
close : 'close.gif',
min : 'min.gif',
max : 'max.gif',
resize : 'resize.gif',
restore : 'restore.gif'
},
top_bar : _top_bar,
button_div : _button_div,
container_div : _container_div
}
function popup_lasley(place_el,__height,__width,__settings){
this.settings = global_settings;
this.window = {
height : __height,
width : __width
};
this.settings.top_bar.style.width = __width;
var containerDiv = document.createElement('div');
var __top = __draw_top();
containerDiv.appendChild(__top);
place_el.appendChild(containerDiv);
}
function __draw_top(){
var containerDiv = document.createElement('div');
var buttonDiv = document.createElement('div');
__apply_settings(containerDiv,this.settings.top_bar);
if(global_settings.show_x)
buttonDiv.appendChild(__create_img(global_settings.images.close));
containerDiv.appendChild(buttonDiv);
__apply_settings(buttonDiv,this.settings.button_div);
return containerDiv;
}
function __apply_settings(__el,apply_settings){
try{
for(settingKey in...