Merge pull request #4 from Turbo87/master

JS Cleanup
pull/8/head
cunimb 2015-01-21 12:31:27 +01:00
commit 54f9519116
3 zmienionych plików z 1244 dodań i 1246 usunięć

2196
cunimb.js

Plik diff jest za duży Load Diff

Wyświetl plik

@ -1,10 +1,10 @@
/* /*
_____ _ _ __ _____ _ _ __
/ ____| (_) | | / _| / ____| (_) | | / _|
| | _ _ _ __ _ _ __ ___ | |__ | |_ _ __ | | _ _ _ __ _ _ __ ___ | |__ | |_ _ __
| | | | | | '_ \| | '_ ` _ \| '_ \ | _| '__| | | | | | | '_ \| | '_ ` _ \| '_ \ | _| '__|
| |___| |_| | | | | | | | | | | |_) | _ | | | | | |___| |_| | | | | | | | | | | |_) | _ | | | |
\_____\__,_|_| |_|_|_| |_| |_|_.__/ (_) |_| |_| \_____\__,_|_| |_|_|_| |_| |_|_.__/ (_) |_| |_|
*/ */
@ -29,82 +29,80 @@ html, body {
} }
.yel { .yel {
background: #FF9; background: #FF9;
} }
.whi { .whi {
background: #FFF; background: #FFF;
} }
.lright { .lright {
// border-radius: 10px 0 10px 10px; // border-radius: 10px 0 10px 10px;
top: 25px; top: 25px;
right: 0px; right: 0px;
} }
.lleft { .lleft {
// border-radius: 0 10px 10px 10px; // border-radius: 0 10px 10px 10px;
left: 75px; left: 75px;
top: 35px; top: 35px;
} }
.acright { .acright {
// border-radius: 10px 0 0 10px; // border-radius: 10px 0 0 10px;
top: 45px; top: 45px;
right: 180px; right: 180px;
} }
.acleft { .acleft {
// border-radius: 0 10px 10px 0; // border-radius: 0 10px 10px 0;
top: 35px; top: 35px;
left: 255px; left: 255px;
} }
.pr { .pr {
float:right; float:right;
}
#ac {
position:absolute;
display: none;
color: black;
background-color: white;
border-color: black;
border-width: 1px;
border-style: solid;
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
line-height: 15px;
font-weight: bold;
padding: 5px;
z-index:15;
} }
#ac {
position:absolute;
display: none;
color: black;
background-color: white;
border-color: black;
border-width: 1px;
border-style: solid;
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
line-height: 15px;
font-weight: bold;
padding: 5px;
z-index:15;
}
.cgv { .cgv {
width: 20px; width: 20px;
} }
.cgn { .cgn {
width: 45px; width: 45px;
font-family: "Times New Roman", Times, serif; font-family: "Times New Roman", Times, serif;
font-style:normal; font-style:normal;
overflow: hidden; overflow: hidden;
display: inline-block; display: inline-block;
white-space: nowrap; white-space: nowrap;
} }
.cgc { .cgc {
width: 9px; width: 9px;
} }
.cga { .cga {
width: 43px; width: 43px;
font-family: "Times New Roman", Times, serif; font-family: "Times New Roman", Times, serif;
font-style:normal; font-style:normal;
text-align: right; text-align: right;
overflow: hidden; overflow: hidden;
display: inline-block; display: inline-block;
white-space: nowrap; white-space: nowrap;
@ -112,11 +110,11 @@ background: #FFF;
#divInfoac { #divInfoac {
position:absolute; position:absolute;
left: 90px; left: 90px;
top: 15px; top: 15px;
width: 170px; width: 170px;
height: 15px; height: 15px;
} }
@ -144,59 +142,59 @@ div.divInfoclass {
width: 180px; width: 180px;
overflow: hidden; overflow: hidden;
cursor: default; cursor: default;
z-index:20; z-index:20;
} }
#ett1 { #ett1 {
height:25px; height:25px;
background-color:cyan; background-color:cyan;
} }
#ett2 { #ett2 {
height:22px; height:22px;
background-color:white; background-color:white;
} }
#dtable { #dtable {
position: absolute; position: absolute;
top: 47px; top: 47px;
bottom: 0px; bottom: 0px;
left: 0px; left: 0px;
right: 0px; right: 0px;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
} }
#popup { #popup {
top:20%; top:20%;
left: 50%; left: 50%;
margin-left: -150px; margin-left: -150px;
padding:20px; padding:20px;
width: 10px; width: 10px;
height: 10px; height: 10px;
border: 1px solid #000000; border: 1px solid #000000;
background-color: #FFFFFF; background-color: #FFFFFF;
display:none; display:none;
position: fixed; position: fixed;
z-index:99; z-index:99;
overflow:hidden; overflow:hidden;
-moz-border-radius: 20px; -moz-border-radius: 20px;
-webkit-border-radius: 20px; -webkit-border-radius: 20px;
border-radius: 20px; border-radius: 20px;
-moz-box-shadow: 20px 20px 10px 0px #656565; -moz-box-shadow: 20px 20px 10px 0px #656565;
-webkit-box-shadow: 20px 20px 10px 0px #656565; -webkit-box-shadow: 20px 20px 10px 0px #656565;
-o-box-shadow: 20px 20px 10px 0px #656565; -o-box-shadow: 20px 20px 10px 0px #656565;
box-shadow: 20px 20px 10px 0px #656565; box-shadow: 20px 20px 10px 0px #656565;
filter:progid:DXImageTransform.Microsoft.Shadow(color=#656565, Direction=134, Strength=10); filter:progid:DXImageTransform.Microsoft.Shadow(color=#656565, Direction=134, Strength=10);
} }
.tt { .tt {
border-collapse:collapse; border-collapse:collapse;
border-spacing: 0; border-spacing: 0;
} }
.tt th,td { .tt th,td {
padding: 1px; padding: 1px;
} }

116
util.js
Wyświetl plik

@ -5,16 +5,16 @@
* @return {XMLHttpRequest|Null} * @return {XMLHttpRequest|Null}
*/ */
function createXmlHttpRequest() { function createXmlHttpRequest() {
try { try {
if (typeof ActiveXObject != 'undefined') { if (typeof ActiveXObject != 'undefined') {
return new ActiveXObject('Microsoft.XMLHTTP'); return new ActiveXObject('Microsoft.XMLHTTP');
} else if (window["XMLHttpRequest"]) { } else if (window["XMLHttpRequest"]) {
return new XMLHttpRequest(); return new XMLHttpRequest();
} }
} catch (e) { } catch (e) {
changeStatus(e); changeStatus(e);
} }
return null; return null;
}; };
/** /**
@ -25,59 +25,59 @@ function createXmlHttpRequest() {
* @param {Function} callback The function to call once retrieved. * @param {Function} callback The function to call once retrieved.
*/ */
function downloadUrl(url, callback) { function downloadUrl(url, callback) {
var status = -1; var status = -1;
var request = createXmlHttpRequest(); var request = createXmlHttpRequest();
if (!request) { if (!request) {
return false; return false;
} }
request.onreadystatechange = function() { request.onreadystatechange = function() {
if (request.readyState == 4) { if (request.readyState == 4) {
try { try {
status = request.status; status = request.status;
} catch (e) { } catch (e) {
// Usually indicates request timed out in FF. // Usually indicates request timed out in FF.
} }
if (status == 200) { if (status == 200) {
callback(request.responseXML, request.status); callback(request.responseXML, request.status);
request.onreadystatechange = function() {}; request.onreadystatechange = function() {};
} }
} }
} }
request.open('GET', url, true); request.open('GET', url, true);
try { try {
request.send(null); request.send(null);
} catch (e) { } catch (e) {
changeStatus(e); changeStatus(e);
} }
}; };
function downloadUrltxt(url, callback) { function downloadUrltxt(url, callback) {
var status = -1; var status = -1;
var request = createXmlHttpRequest(); var request = createXmlHttpRequest();
if (!request) { if (!request) {
return false; return false;
} }
request.onreadystatechange = function() { request.onreadystatechange = function() {
if (request.readyState == 4) { if (request.readyState == 4) {
try { try {
status = request.status; status = request.status;
} catch (e) { } catch (e) {
// Usually indicates request timed out in FF. // Usually indicates request timed out in FF.
} }
if (status == 200) { if (status == 200) {
callback(request.responseText, request.status); callback(request.responseText, request.status);
request.onreadystatechange = function() {}; request.onreadystatechange = function() {};
} }
} }
} }
request.open('GET', url, true); request.open('GET', url, true);
try { try {
request.send(null); request.send(null);
} catch (e) { } catch (e) {
changeStatus(e); changeStatus(e);
} }
}; };