Skip to content

Commit 5b5bbea

Browse files
javadevValentyn Kolesnikov
authored and
Valentyn Kolesnikov
committed
Released web site.
0 parents  commit 5b5bbea

12 files changed

+1305
-0
lines changed

files/bootstrap.min.css

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

files/bootstrap.min.js

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

files/csvsup.js

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
function getExampleXml(n) {
2+
n = (n || 1) - 1;
3+
var s = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!--Anagrafica del clienti del mercato-->\r\n<anagrafica>\r\n\t<testata>\r\n\t\t<nomemercato id=\"007\">Mercato di test</nomemercato>\r\n\t\t<data>Giovedi 18 dicembre 2003 16.05.29</data>\r\n\t</testata>\r\n\t<record>\r\n\t\t<codice_cliente>5</codice_cliente>\r\n\t\t<rag_soc>Miami American Cafe</rag_soc>\r\n\t\t<codice_fiscale>IT07654930130</codice_fiscale>\r\n\t\t<indirizzo tipo=\"casa\">Viale Carlo Espinasse 5, Como</indirizzo>\r\n\t\t<num_prodotti>13</num_prodotti>\r\n\t</record>\r\n\t<record>\r\n\t\t<codice_cliente>302</codice_cliente>\r\n\t\t<rag_soc>Filiberto Gilardi</rag_soc>\r\n\t\t<codice_fiscale>IT87654770157</codice_fiscale>\r\n\t\t<indirizzo tipo=\"ufficio\">Via Biancospini 20, Messina</indirizzo>\r\n\t\t<num_prodotti>8</num_prodotti>\r\n\t</record>\r\n\t<record>\r\n\t\t<codice_cliente>1302</codice_cliente>\r\n\t\t<rag_soc>Eidon</rag_soc>\r\n\t\t<codice_fiscale>IT887511231</codice_fiscale>\r\n\t\t<indirizzo tipo=\"ufficio\">Via Bassini 17/2, Milano</indirizzo>\r\n\t\t<num_prodotti>18</num_prodotti>\r\n\t</record>\r\n\t<record>\r\n\t\t<codice_cliente>202</codice_cliente>\r\n\t\t<rag_soc>SkillNet</rag_soc>\r\n\t\t<codice_fiscale>IT887642131</codice_fiscale>\r\n\t\t<indirizzo tipo=\"ufficio\">Via Chiasserini 11A, Milano</indirizzo>\r\n\t\t<num_prodotti>24</num_prodotti>\r\n\t</record>\r\n\t<record>\r\n\t\t<codice_cliente>12</codice_cliente>\r\n\t\t<rag_soc>Eidon</rag_soc>\r\n\t\t<codice_fiscale>IT04835710965</codice_fiscale>\r\n\t\t<indirizzo tipo=\"casa\">Via Cignoli 17/2, Roma</indirizzo>\r\n\t\t<num_prodotti>1112</num_prodotti>\r\n\t</record>\r\n\t<record>\r\n\t\t<codice_cliente>5</codice_cliente>\r\n\t\t<rag_soc>Miami American Cafe</rag_soc>\r\n\t\t<codice_fiscale>IT07654930130</codice_fiscale>\r\n\t\t<indirizzo tipo=\"casa\">Viale Carlo Espinasse 5, Como</indirizzo>\r\n\t\t<num_prodotti>13</num_prodotti> \r\n\t</record>\r\n\t<record>\r\n\t\t<codice_cliente>302</codice_cliente>\r\n\t\t<rag_soc>Filiberto Gilardi</rag_soc>\r\n\t\t<codice_fiscale>IT87654770157</codice_fiscale>\r\n\t\t<indirizzo tipo=\"ufficio\">Via Biancospini 20, Messina</indirizzo>\r\n\t\t<num_prodotti>8</num_prodotti>\r\n\t</record>\r\n\t<record>\r\n\t\t<codice_cliente>1302</codice_cliente>\r\n\t\t<rag_soc>Eidon</rag_soc>\r\n\t\t<codice_fiscale>IT887511231</codice_fiscale>\r\n\t\t<indirizzo tipo=\"ufficio\">Via Bassini 17/2, Milano</indirizzo>\r\n\t\t<num_prodotti>18</num_prodotti>\r\n\t</record>\r\n\t<record>\r\n\t\t<codice_cliente>202</codice_cliente>\r\n\t\t<rag_soc>SkillNet</rag_soc>\r\n\t\t<codice_fiscale>IT887642131</codice_fiscale>\r\n\t\t<indirizzo tipo=\"ufficio\">Via Chiasserini 11A, Milano</indirizzo>\r\n\t\t<num_prodotti>24</num_prodotti>\r\n\t</record>\r\n\t<record>\r\n\t\t<codice_cliente>202</codice_cliente>\r\n\t\t<rag_soc>SkillNet</rag_soc>\r\n\t\t<codice_fiscale>IT887642131</codice_fiscale>\r\n\t\t<indirizzo tipo=\"ufficio\">Via Chiasserini 11A, Milano</indirizzo>\r\n\t\t<num_prodotti>24</num_prodotti>\r\n\t</record>\r\n\t<record>\r\n\t\t<codice_cliente>12</codice_cliente>\r\n\t\t<rag_soc>Eidon</rag_soc>\r\n\t\t<codice_fiscale>IT04835710965</codice_fiscale>\r\n\t\t<indirizzo tipo=\"casa\">Via Cignoli 17/2, Roma</indirizzo>\r\n\t\t<num_prodotti>1112</num_prodotti>\r\n </record>\r\n</anagrafica>";
4+
return s
5+
}
6+
7+
function getExampleJson(n) {
8+
n = (n || 1) - 1;
9+
var s = ["[\n" + " {\n" + " \"id\":1," + " \"name\":\"Johnson, Smith, and Jones Co.\",\n" + " \"amount\":345.33," + " \"Remark\":\"Pays on time\"\n" + " },\n" + " {\n" + " \"id\":2," + " \"name\":\"Sam \\\"Mad Dog\\\" Smith\",\n" + " \"amount\":993.44," + " \"Remark\":\"\"\n" + " },\n" + " {\n" + " \"id\":3," + " \"name\":\"Barney & Company\",\n" + " \"amount\":0," + " \"Remark\":\"Great to work with\\nand always pays with cash.\"\n" + " },\n" + " {\n" + " \"id\":4," + " \"name\":\"Johnson's Automotive\",\n" + " \"amount\":2344," + " \"Remark\":\"\"\n" + " }\n" + "]\n", "{ \"data\" : [\n" + " {" + " \"id\":1," + " \"name\":\"Johnson, Smith, and Jones Co.\"" + " },\n" + " {" + " \"id\":2," + " \"name\":\"Sam \\\"Mad Dog\\\" Smith\"" + " },\n" + " {" + " \"id\":3," + " \"name\":\"Barney & Company\"" + " },\n" + " {" + " \"id\":4," + " \"name\":\"Johnson's Automotive\"" + " }\n" + "] }\n", "{ \"race\" : \n" + " { \"entries\" : [\n" + " {" + " \"id\":11," + " \"name\":\"Johnson, Smith, and Jones Co.\"" + " },\n" + " {" + " \"id\":22," + " \"name\":\"Sam \\\"Mad Dog\\\" Smith\"" + " },\n" + " {" + " \"id\":33," + " \"name\":\"Barney & Company\"" + " },\n" + " {" + " \"id\":44," + " \"name\":\"Johnson's Automotive\"" + " }\n" + "] }\n}\n", "{\n" + " \"id\":1," + " \"name\":\"Johnson, Smith, and Jones Co.\"," + " \"amount\":345.33," + " \"Remark\":\"Pays on time\"\n" + "}\n", "[\n" + " [" + " 1," + " \"Johnson, Smith, and Jones Co.\"," + " 345.33" + " ],\n" + " [" + " 99," + " \"Acme Food Inc.\"," + " 2993.55" + " ]\n" + "]"];
10+
return s[n]
11+
}
12+
13+
function loadScript(url) {
14+
var s = document.createElement("script");
15+
s.type = "text/javascript";
16+
s.id = "dynScriptTemp";
17+
s.src = url;
18+
document.getElementsByTagName("head")[0].appendChild(s)
19+
}
20+
21+
function loadScriptAndRun(url) {
22+
if (!url.indexOf('?') == 0) {
23+
url = '?' + url
24+
}
25+
loadScript("https://xml-json.herokuapp.com/" + url)
26+
}
27+
28+
function loadDataAndRun(data) {
29+
document.getElementById('txt1').value = data.html.join("\n");
30+
document.getElementById('btnRun').click()
31+
}
32+
33+
function loadURL(url) {
34+
if (url.trim() == "") {
35+
alert("Missing URL");
36+
return false
37+
}
38+
loadScriptAndRun("?callback=loadDataAndRun&url=" + encodeURIComponent(url))
39+
}
40+
41+
function saveOutput(text, fn, doctype) {
42+
var blob = new Blob([text], {
43+
type: "text/plain;charset=utf-8"
44+
});
45+
saveAs(blob, fn)
46+
}
47+
48+
function saveFile(text, ext, fnId) {
49+
var eol = "\r\n";
50+
var fn = document.getElementById(fnId).value.trim();
51+
if (fn == "") {
52+
fn = document.getElementById(fnId).value = "convertjson"
53+
}
54+
if (document.getElementById("eol")) eol = document.getElementById("eol").value || eol;
55+
if (eol == "LF") eol = "\n";
56+
if (eol == "CRLF") eol = "\r\n";
57+
var v = text.replace(/\r\n|\r|\n/gm, eol);
58+
saveOutput(v, fn + "." + ext, null)
59+
}
60+
61+
function clearPage() {
62+
if (storageSup && storageSup.has_html5_storage()) {
63+
sessionStorage.setItem("clearPressed", "Y")
64+
}
65+
window.location.reload(true)
66+
}
67+
68+
function setCheckboxes(name, tf) {
69+
var j;
70+
var fld;
71+
for (j = 0; j < CSV.maxColumnsFound; j++) {
72+
fld = document.getElementById(name + (j + 1));
73+
if (!fld) continue;
74+
fld.checked = tf
75+
}
76+
}

files/filesaver.js

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
/* FileSaver.js
2+
* A saveAs() FileSaver implementation.
3+
* 1.3.2
4+
* 2016-06-16 18:25:19
5+
*
6+
* By Eli Grey, http://eligrey.com
7+
* License: MIT
8+
* See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md
9+
*/
10+
11+
/*global self */
12+
/*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */
13+
14+
/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
15+
16+
var saveAs = saveAs || (function(view) {
17+
"use strict";
18+
// IE <10 is explicitly unsupported
19+
if (typeof view === "undefined" || typeof navigator !== "undefined" && /MSIE [1-9]\./.test(navigator.userAgent)) {
20+
return;
21+
}
22+
var
23+
doc = view.document
24+
// only get URL when necessary in case Blob.js hasn't overridden it yet
25+
, get_URL = function() {
26+
return view.URL || view.webkitURL || view;
27+
}
28+
, save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a")
29+
, can_use_save_link = "download" in save_link
30+
, click = function(node) {
31+
var event = new MouseEvent("click");
32+
node.dispatchEvent(event);
33+
}
34+
, is_safari = /constructor/i.test(view.HTMLElement) || view.safari
35+
, is_chrome_ios =/CriOS\/[\d]+/.test(navigator.userAgent)
36+
, throw_outside = function(ex) {
37+
(view.setImmediate || view.setTimeout)(function() {
38+
throw ex;
39+
}, 0);
40+
}
41+
, force_saveable_type = "application/octet-stream"
42+
// the Blob API is fundamentally broken as there is no "downloadfinished" event to subscribe to
43+
, arbitrary_revoke_timeout = 1000 * 40 // in ms
44+
, revoke = function(file) {
45+
var revoker = function() {
46+
if (typeof file === "string") { // file is an object URL
47+
get_URL().revokeObjectURL(file);
48+
} else { // file is a File
49+
file.remove();
50+
}
51+
};
52+
setTimeout(revoker, arbitrary_revoke_timeout);
53+
}
54+
, dispatch = function(filesaver, event_types, event) {
55+
event_types = [].concat(event_types);
56+
var i = event_types.length;
57+
while (i--) {
58+
var listener = filesaver["on" + event_types[i]];
59+
if (typeof listener === "function") {
60+
try {
61+
listener.call(filesaver, event || filesaver);
62+
} catch (ex) {
63+
throw_outside(ex);
64+
}
65+
}
66+
}
67+
}
68+
, auto_bom = function(blob) {
69+
// prepend BOM for UTF-8 XML and text/* types (including HTML)
70+
// note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF
71+
if (/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) {
72+
return new Blob([String.fromCharCode(0xFEFF), blob], {type: blob.type});
73+
}
74+
return blob;
75+
}
76+
, FileSaver = function(blob, name, no_auto_bom) {
77+
if (!no_auto_bom) {
78+
blob = auto_bom(blob);
79+
}
80+
// First try a.download, then web filesystem, then object URLs
81+
var
82+
filesaver = this
83+
, type = blob.type
84+
, force = type === force_saveable_type
85+
, object_url
86+
, dispatch_all = function() {
87+
dispatch(filesaver, "writestart progress write writeend".split(" "));
88+
}
89+
// on any filesys errors revert to saving with object URLs
90+
, fs_error = function() {
91+
if ((is_chrome_ios || (force && is_safari)) && view.FileReader) {
92+
// Safari doesn't allow downloading of blob urls
93+
var reader = new FileReader();
94+
reader.onloadend = function() {
95+
var url = is_chrome_ios ? reader.result : reader.result.replace(/^data:[^;]*;/, 'data:attachment/file;');
96+
var popup = view.open(url, '_blank');
97+
if(!popup) view.location.href = url;
98+
url=undefined; // release reference before dispatching
99+
filesaver.readyState = filesaver.DONE;
100+
dispatch_all();
101+
};
102+
reader.readAsDataURL(blob);
103+
filesaver.readyState = filesaver.INIT;
104+
return;
105+
}
106+
// don't create more object URLs than needed
107+
if (!object_url) {
108+
object_url = get_URL().createObjectURL(blob);
109+
}
110+
if (force) {
111+
view.location.href = object_url;
112+
} else {
113+
var opened = view.open(object_url, "_blank");
114+
if (!opened) {
115+
// Apple does not allow window.open, see https://developer.apple.com/library/safari/documentation/Tools/Conceptual/SafariExtensionGuide/WorkingwithWindowsandTabs/WorkingwithWindowsandTabs.html
116+
view.location.href = object_url;
117+
}
118+
}
119+
filesaver.readyState = filesaver.DONE;
120+
dispatch_all();
121+
revoke(object_url);
122+
}
123+
;
124+
filesaver.readyState = filesaver.INIT;
125+
126+
if (can_use_save_link) {
127+
object_url = get_URL().createObjectURL(blob);
128+
setTimeout(function() {
129+
save_link.href = object_url;
130+
save_link.download = name;
131+
click(save_link);
132+
dispatch_all();
133+
revoke(object_url);
134+
filesaver.readyState = filesaver.DONE;
135+
});
136+
return;
137+
}
138+
139+
fs_error();
140+
}
141+
, FS_proto = FileSaver.prototype
142+
, saveAs = function(blob, name, no_auto_bom) {
143+
if(no_auto_bom===undefined)no_auto_bom=true;
144+
return new FileSaver(blob, name || blob.name || "download", no_auto_bom);
145+
}
146+
;
147+
// IE 10+ (native saveAs)
148+
if (typeof navigator !== "undefined" && navigator.msSaveOrOpenBlob) {
149+
return function(blob, name, no_auto_bom) {
150+
name = name || blob.name || "download";
151+
152+
if (!no_auto_bom) {
153+
blob = auto_bom(blob);
154+
}
155+
return navigator.msSaveOrOpenBlob(blob, name);
156+
};
157+
}
158+
159+
FS_proto.abort = function(){};
160+
FS_proto.readyState = FS_proto.INIT = 0;
161+
FS_proto.WRITING = 1;
162+
FS_proto.DONE = 2;
163+
164+
FS_proto.error =
165+
FS_proto.onwritestart =
166+
FS_proto.onprogress =
167+
FS_proto.onwrite =
168+
FS_proto.onabort =
169+
FS_proto.onerror =
170+
FS_proto.onwriteend =
171+
null;
172+
173+
return saveAs;
174+
}(
175+
typeof self !== "undefined" && self
176+
|| typeof window !== "undefined" && window
177+
|| this.content
178+
));
179+
// `self` is undefined in Firefox for Android content script context
180+
// while `this` is nsIContentFrameMessageManager
181+
// with an attribute `content` that corresponds to the window
182+
183+
if (typeof module !== "undefined" && module.exports) {
184+
module.exports.saveAs = saveAs;
185+
} else if ((typeof define !== "undefined" && define !== null) && (define.amd !== null)) {
186+
define("FileSaver.js", function() {
187+
return saveAs;
188+
});
189+
}

files/jquery.min.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

files/localread.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
function ieReadLocalFile(that,callback,encoding) {
2+
if(!that.value)return;
3+
if(that.value.length<=0)return;
4+
var request;
5+
if (window.XMLHttpRequest && false) {
6+
request=new XMLHttpRequest();
7+
}
8+
else {
9+
request=new ActiveXObject("Msxml2.XMLHTTP");
10+
}
11+
var fn=that.value;
12+
request.open('get', fn, true);
13+
request.onreadystatechange = function()
14+
{
15+
if (request.readyState == 4 && (request.status == 200 || request.status==0)) {
16+
callback(request.responseText);
17+
}
18+
}
19+
request.send();
20+
}
21+
22+
function readLocalFile(that,callback,encoding)
23+
{
24+
var reader = new FileReader();
25+
26+
if(that.files && that.files[0]){
27+
var reader = new FileReader();
28+
reader.onload = function (e) {
29+
callback(e.target.result);
30+
};
31+
reader.readAsText(that.files[0],encoding);
32+
}
33+
}
34+
35+
function loadTextFile(f,callback)
36+
{
37+
var encoding=null;
38+
if(document && document.getElementById("txtEncoding")) {
39+
encoding=document.getElementById("txtEncoding").value;
40+
}
41+
(window.FileReader ? readLocalFile(f, callback, encoding) : ieReadLocalFile(f, callback, encoding));
42+
}

files/nav.css

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#header {
2+
background-color:#191970 !important;
3+
}
4+
5+
.navbar {
6+
border-radius:0px !important;
7+
}
8+
9+
.navbar-nav>.open>a {
10+
background-color:#191970 !important;
11+
}
12+
13+
#parentNav {
14+
color:#e0ffff;
15+
}
16+
17+
#parentNav:focus {
18+
background-color:#4682b4 !important;
19+
border-top-right-radius:30px;
20+
border-top-left-radius:30px;
21+
}
22+
23+
#parentNav:hover {
24+
color:#adff2f;
25+
}
26+
27+
#parentNav:active {
28+
background-color:#4682b4 !important;
29+
}
30+
31+
#childContainerNav {
32+
background-color:#F5F5F5 !important;
33+
border-bottom-right-radius:30px !important;
34+
border-bottom-left-radius:30px !important;
35+
padding-left:15px !important;
36+
padding-right:15px !important;
37+
}
38+
39+
#childNav {
40+
color:black !important;
41+
}
42+
43+
#childNav:hover {
44+
color:#008b8b !important;
45+
font-style: italic !important;;
46+
}
47+
48+
.navbar-toggle {
49+
background-color:#4682b4 !important;
50+
}
51+
52+
.title {
53+
color:white !important;
54+
text-decoration:none !important;
55+
}
56+
57+
.center {
58+
text-align:center !important;
59+
}

0 commit comments

Comments
 (0)