fixed design of upload form
This commit is contained in:
parent
336cf391aa
commit
985195124a
@ -202,7 +202,14 @@ x3d, X3D {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
form.upload label{
|
||||
text-align:right;
|
||||
display:inline-block;
|
||||
width: 400px;
|
||||
}
|
||||
form.upload input,form.upload select{
|
||||
width: 250px;
|
||||
}
|
||||
/* #### Desktops #### */
|
||||
@media screen and (max-height: 1032px) {
|
||||
#x3dom-3dprev-canvas {
|
||||
|
216
css/normalize.css
vendored
216
css/normalize.css
vendored
@ -1,11 +1,11 @@
|
||||
/*! normalize.css v1.1.2 | MIT License | git.io/normalize */
|
||||
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
|
||||
|
||||
/* ==========================================================================
|
||||
HTML5 display definitions
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Correct `block` display not defined in IE 6/7/8/9 and Firefox 3.
|
||||
* Correct `block` display not defined in IE 8/9.
|
||||
*/
|
||||
|
||||
article,
|
||||
@ -24,15 +24,13 @@ summary {
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3.
|
||||
* Correct `inline-block` display not defined in IE 8/9.
|
||||
*/
|
||||
|
||||
audio,
|
||||
canvas,
|
||||
video {
|
||||
display: inline-block;
|
||||
*display: inline;
|
||||
*zoom: 1;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -46,11 +44,12 @@ audio:not([controls]) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Address styling not present in IE 7/8/9, Firefox 3, and Safari 4.
|
||||
* Known issue: no IE 6 support.
|
||||
* Address `[hidden]` styling not present in IE 8/9.
|
||||
* Hide the `template` element in IE, Safari, and Firefox < 22.
|
||||
*/
|
||||
|
||||
[hidden] {
|
||||
[hidden],
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@ -59,34 +58,19 @@ audio:not([controls]) {
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using
|
||||
* `em` units.
|
||||
* 1. Set default font family to sans-serif.
|
||||
* 2. Prevent iOS text size adjust after orientation change, without disabling
|
||||
* user zoom.
|
||||
*/
|
||||
|
||||
html {
|
||||
font-size: 100%; /* 1 */
|
||||
font-family: sans-serif; /* 1 */
|
||||
-ms-text-size-adjust: 100%; /* 2 */
|
||||
-webkit-text-size-adjust: 100%; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Address `font-family` inconsistency between `textarea` and other form
|
||||
* elements.
|
||||
*/
|
||||
|
||||
html,
|
||||
button,
|
||||
input,
|
||||
select,
|
||||
textarea {
|
||||
font-family: sans-serif;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address margins handled incorrectly in IE 6/7.
|
||||
* Remove default margin.
|
||||
*/
|
||||
|
||||
body {
|
||||
@ -97,6 +81,14 @@ body {
|
||||
Links
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the gray background color from active links in IE 10.
|
||||
*/
|
||||
|
||||
a {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address `outline` inconsistency between Chrome and other browsers.
|
||||
*/
|
||||
@ -119,9 +111,8 @@ a:hover {
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Address font sizes and margins set differently in IE 6/7.
|
||||
* Address font sizes within `section` and `article` in Firefox 4+, Safari 5,
|
||||
* and Chrome.
|
||||
* Address variable `h1` font-size and margin within `section` and `article`
|
||||
* contexts in Firefox 4+, Safari 5, and Chrome.
|
||||
*/
|
||||
|
||||
h1 {
|
||||
@ -129,33 +120,8 @@ h1 {
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.5em;
|
||||
margin: 0.83em 0;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.17em;
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 1em;
|
||||
margin: 1.33em 0;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 0.83em;
|
||||
margin: 1.67em 0;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 0.67em;
|
||||
margin: 2.33em 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address styling not present in IE 7/8/9, Safari 5, and Chrome.
|
||||
* Address styling not present in IE 8/9, Safari 5, and Chrome.
|
||||
*/
|
||||
|
||||
abbr[title] {
|
||||
@ -163,7 +129,7 @@ abbr[title] {
|
||||
}
|
||||
|
||||
/**
|
||||
* Address style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome.
|
||||
* Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
|
||||
*/
|
||||
|
||||
b,
|
||||
@ -171,10 +137,6 @@ strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 1em 40px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address styling not present in Safari 5 and Chrome.
|
||||
*/
|
||||
@ -185,7 +147,6 @@ dfn {
|
||||
|
||||
/**
|
||||
* Address differences between Firefox and other browsers.
|
||||
* Known issue: no IE 6/7 normalization.
|
||||
*/
|
||||
|
||||
hr {
|
||||
@ -195,7 +156,7 @@ hr {
|
||||
}
|
||||
|
||||
/**
|
||||
* Address styling not present in IE 6/7/8/9.
|
||||
* Address styling not present in IE 8/9.
|
||||
*/
|
||||
|
||||
mark {
|
||||
@ -204,16 +165,7 @@ mark {
|
||||
}
|
||||
|
||||
/**
|
||||
* Address margins set differently in IE 6/7.
|
||||
*/
|
||||
|
||||
p,
|
||||
pre {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct font family set oddly in IE 6, Safari 4/5, and Chrome.
|
||||
* Correct font family set oddly in Safari 5 and Chrome.
|
||||
*/
|
||||
|
||||
code,
|
||||
@ -221,7 +173,6 @@ kbd,
|
||||
pre,
|
||||
samp {
|
||||
font-family: monospace, serif;
|
||||
_font-family: 'courier new', monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
@ -230,27 +181,15 @@ samp {
|
||||
*/
|
||||
|
||||
pre {
|
||||
white-space: pre;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address CSS quotes not supported in IE 6/7.
|
||||
* Set consistent quote types.
|
||||
*/
|
||||
|
||||
q {
|
||||
quotes: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address `quotes` property not supported in Safari 4.
|
||||
*/
|
||||
|
||||
q:before,
|
||||
q:after {
|
||||
content: '';
|
||||
content: none;
|
||||
quotes: "\201C" "\201D" "\2018" "\2019";
|
||||
}
|
||||
|
||||
/**
|
||||
@ -281,57 +220,16 @@ sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Lists
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Address margins set differently in IE 6/7.
|
||||
*/
|
||||
|
||||
dl,
|
||||
menu,
|
||||
ol,
|
||||
ul {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin: 0 0 0 40px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address paddings set differently in IE 6/7.
|
||||
*/
|
||||
|
||||
menu,
|
||||
ol,
|
||||
ul {
|
||||
padding: 0 0 0 40px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct list images handled incorrectly in IE 7.
|
||||
*/
|
||||
|
||||
nav ul,
|
||||
nav ol {
|
||||
list-style: none;
|
||||
list-style-image: none;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Embedded content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3.
|
||||
* 2. Improve image quality when scaled in IE 7.
|
||||
* Remove border when inside `a` element in IE 8/9.
|
||||
*/
|
||||
|
||||
img {
|
||||
border: 0; /* 1 */
|
||||
-ms-interpolation-mode: bicubic; /* 2 */
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -347,7 +245,7 @@ svg:not(:root) {
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11.
|
||||
* Address margin not present in IE 8/9 and Safari 5.
|
||||
*/
|
||||
|
||||
figure {
|
||||
@ -358,14 +256,6 @@ figure {
|
||||
Forms
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Correct margin displayed oddly in IE 6/7.
|
||||
*/
|
||||
|
||||
form {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Define consistent border, margin, and padding.
|
||||
*/
|
||||
@ -377,37 +267,36 @@ fieldset {
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct color not being inherited in IE 6/7/8/9.
|
||||
* 2. Correct text not wrapping in Firefox 3.
|
||||
* 3. Correct alignment displayed oddly in IE 6/7.
|
||||
* 1. Correct `color` not being inherited in IE 8/9.
|
||||
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
|
||||
*/
|
||||
|
||||
legend {
|
||||
border: 0; /* 1 */
|
||||
padding: 0;
|
||||
white-space: normal; /* 2 */
|
||||
*margin-left: -7px; /* 3 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct font size not being inherited in all browsers.
|
||||
* 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5,
|
||||
* and Chrome.
|
||||
* 3. Improve appearance and consistency in all browsers.
|
||||
* 1. Correct font family not being inherited in all browsers.
|
||||
* 2. Correct font size not being inherited in all browsers.
|
||||
* 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
|
||||
*/
|
||||
|
||||
button,
|
||||
input,
|
||||
select,
|
||||
textarea {
|
||||
font-size: 100%; /* 1 */
|
||||
margin: 0; /* 2 */
|
||||
vertical-align: baseline; /* 3 */
|
||||
*vertical-align: middle; /* 3 */
|
||||
font-family: inherit; /* 1 */
|
||||
font-size: 100%; /* 2 */
|
||||
margin: 0; /* 3 */
|
||||
}
|
||||
input, select, textarea {
|
||||
box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address Firefox 3+ setting `line-height` on `input` using `!important` in
|
||||
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
|
||||
* the UA stylesheet.
|
||||
*/
|
||||
|
||||
@ -419,7 +308,7 @@ input {
|
||||
/**
|
||||
* Address inconsistent `text-transform` inheritance for `button` and `select`.
|
||||
* All other form control elements do not inherit `text-transform` values.
|
||||
* Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+.
|
||||
* Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.
|
||||
* Correct `select` style inheritance in Firefox 4+ and Opera.
|
||||
*/
|
||||
|
||||
@ -434,8 +323,6 @@ select {
|
||||
* 2. Correct inability to style clickable `input` types in iOS.
|
||||
* 3. Improve usability and consistency of cursor style between image-type
|
||||
* `input` and others.
|
||||
* 4. Remove inner spacing in IE 7 without affecting normal text inputs.
|
||||
* Known issue: inner spacing remains in IE 6.
|
||||
*/
|
||||
|
||||
button,
|
||||
@ -444,7 +331,6 @@ input[type="reset"],
|
||||
input[type="submit"] {
|
||||
-webkit-appearance: button; /* 2 */
|
||||
cursor: pointer; /* 3 */
|
||||
*overflow: visible; /* 4 */
|
||||
}
|
||||
|
||||
/**
|
||||
@ -457,18 +343,14 @@ html input[disabled] {
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Address box sizing set to content-box in IE 8/9.
|
||||
* 2. Remove excess padding in IE 8/9.
|
||||
* 3. Remove excess padding in IE 7.
|
||||
* Known issue: excess padding remains in IE 6.
|
||||
* 1. Address box sizing set to `content-box` in IE 8/9/10.
|
||||
* 2. Remove excess padding in IE 8/9/10.
|
||||
*/
|
||||
|
||||
input[type="checkbox"],
|
||||
input[type="radio"] {
|
||||
box-sizing: border-box; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
*height: 13px; /* 3 */
|
||||
*width: 13px; /* 3 */
|
||||
}
|
||||
|
||||
/**
|
||||
@ -495,7 +377,7 @@ input[type="search"]::-webkit-search-decoration {
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove inner padding and border in Firefox 3+.
|
||||
* Remove inner padding and border in Firefox 4+.
|
||||
*/
|
||||
|
||||
button::-moz-focus-inner,
|
||||
@ -505,7 +387,7 @@ input::-moz-focus-inner {
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Remove default vertical scrollbar in IE 6/7/8/9.
|
||||
* 1. Remove default vertical scrollbar in IE 8/9.
|
||||
* 2. Improve readability and alignment in all browsers.
|
||||
*/
|
||||
|
||||
|
49
helpfiles/licenses.html
Normal file
49
helpfiles/licenses.html
Normal file
@ -0,0 +1,49 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
|
||||
Remove this if you use the .htaccess -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
|
||||
<title>licenses</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="Adrian">
|
||||
|
||||
<meta name="viewport" content="width=device-width; initial-scale=1.0">
|
||||
|
||||
<!-- Replace favicon.ico & apple-touch-icon.png in the root of your domain and delete these references -->
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>
|
||||
<header>
|
||||
<h1>licenses</h1>
|
||||
</header>
|
||||
<!--<nav>
|
||||
<p>
|
||||
<a href="/">Home</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="/contact">Contact</a>
|
||||
</p>
|
||||
</nav>-->
|
||||
|
||||
<div>
|
||||
<h1>Help about Licensing</h1>
|
||||
each skin needs a open Source License to be able to upload here.<br>
|
||||
with the open source license other people are free to use and modify the skin.<br>
|
||||
if you dont want to make it public under such a license you should look for another Database to upload it.
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<p>
|
||||
© Copyright by Adrian
|
||||
</p>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
72
js/main.js
72
js/main.js
@ -18,6 +18,11 @@ function uploadSkin(e) {
|
||||
e.stopPropagation();
|
||||
var author = this.author.value;
|
||||
var name = this.name.value;
|
||||
if (this.license.options[this.license.selectedIndex].defaultSelected){
|
||||
alert("please select a license first!");
|
||||
return false;
|
||||
}
|
||||
|
||||
var license = this.license.value;
|
||||
var img = this.img.value;
|
||||
xhr.request(this.action, "author=" + author + "&name=" + name + "&license=" + license + "&img=" + img, uploaded);
|
||||
@ -90,39 +95,70 @@ function handleFileSelect(evt) {
|
||||
var form = document.createElement('form');
|
||||
form.action = "upload.php";
|
||||
form.method = "get";
|
||||
form.className ="upload";
|
||||
form.addEventListener('submit', uploadSkin, false);
|
||||
form.addEventListener('reset', abort, false);
|
||||
var titel = document.createElement('span');
|
||||
var titel = document.createElement('label');
|
||||
titel.innerHTML = "Name: <input type='text' placeholder='please enter a name' name='name' required><br>";
|
||||
//titel Ende
|
||||
var eigenschaften = document.createElement('span');
|
||||
var author = document.createElement('lable');
|
||||
//var eigenschaften = document.createElement('span');
|
||||
var author = document.createElement('label');
|
||||
author.innerHTML = "Author: <input type='text' placeholder='enter the name of the Author' name='author' required>";
|
||||
var license = document.createElement('lable');
|
||||
var license = document.createElement('label');
|
||||
var licenseselect = document.createElement('select');
|
||||
licenseselect.name = "license";
|
||||
//var br = document.createElement('br');
|
||||
var NeuerEintrag = new Option("Please select your license", "0", true, true);
|
||||
licenseselect.options[licenseselect.length] = NeuerEintrag;
|
||||
for(index in Licenses){
|
||||
var NeuerEintrag = new Option(Licenses[index].name, Licenses[index].id, false, true);
|
||||
|
||||
var NeuerEintrag = new Option(Licenses[index].name, Licenses[index].id, false, false);
|
||||
licenseselect.options[licenseselect.length] = NeuerEintrag;
|
||||
|
||||
}
|
||||
license.innerHTML +="License:";
|
||||
license.innerHTML +="License: ";
|
||||
license.insertBefore(licenseselect, null);
|
||||
license.innerHTML +="{helplink}";
|
||||
eigenschaften.insertBefore(author, null);
|
||||
eigenschaften.insertBefore(document.createElement('br'), null);
|
||||
eigenschaften.insertBefore(license, null);
|
||||
eigenschaften.insertBefore(document.createElement('br'), null);
|
||||
eigenschaften.innerHTML += "Mime Type: " + Datei.type + "<br>" + "Size: " + Datei.size / 1024 + " Kb<br>" + "<input type='hidden' value='" + img.src + "' name='img'>" +
|
||||
"<button type='submit' class='addimg'>Upload!</button><button type='reset' class='abort'>discard!</button>";
|
||||
|
||||
licenseHelp =document.createElement('a');
|
||||
licenseHelp.href="javascript:showHelp('licenses');";
|
||||
//licenseHelp.addEventListener('click',function(){showHelp('licenses');return false;}, true);
|
||||
licenseHelp.className = "helplink";
|
||||
licenseHelp.innerHTML = "help";
|
||||
|
||||
var mimeElem = document.createElement('label');
|
||||
mimeElem.innerHTML="Mime Type: <input value='" + Datei.type + "' disabled>";
|
||||
|
||||
|
||||
var sizeElem = document.createElement('label');
|
||||
var size = Datei.size / 1024;
|
||||
size = size.toFixed(2);
|
||||
sizeElem.innerHTML += "Size: <input value='" + size + " Kb' disabled>";
|
||||
|
||||
var imgElem=document.createElement('input');
|
||||
imgElem.name='img';
|
||||
imgElem.type ="hidden";
|
||||
imgElem.value = img.src;
|
||||
|
||||
var submitButtons = document.createElement('div');
|
||||
submitButtons.innerHTML = "<button type='submit' class='addimg'>Upload!</button><button type='reset' class='abort'>discard!</button>";
|
||||
//Eigenschaften ende
|
||||
block.insertBefore(img, null);
|
||||
//das bild ins div schieben.
|
||||
form.insertBefore(titel, null);
|
||||
//titel einfügen
|
||||
form.insertBefore(eigenschaften, null);
|
||||
//zu guter letzt die Eigenschaften
|
||||
|
||||
form.insertBefore(author, null);
|
||||
form.insertBefore(document.createElement('br'), null);
|
||||
form.insertBefore(license, null);
|
||||
form.insertBefore(licenseHelp, null);
|
||||
form.insertBefore(document.createElement('br'), null);
|
||||
form.insertBefore(sizeElem, null);
|
||||
form.insertBefore(document.createElement('br'), null);
|
||||
form.insertBefore(mimeElem, null);
|
||||
form.insertBefore(document.createElement('br'), null);
|
||||
form.insertBefore(imgElem, null);
|
||||
//form.insertBefore(document.createElement('br'), null);
|
||||
form.insertBefore(submitButtons, null);
|
||||
block.insertBefore(form, null);
|
||||
//zu guter letzt die Eigenschaften
|
||||
document.getElementById('skinlist').insertBefore(block, document.getElementById("dnd"));
|
||||
@ -396,7 +432,7 @@ function getScreenshot() {
|
||||
|
||||
function dateFormat(mysqldate) {
|
||||
var date = Date.createFromMysql(mysqldate);
|
||||
console.debug(date);
|
||||
//console.debug(date);
|
||||
return mysqldate;
|
||||
//todo! shuld output something like "just now" or "today at 17:30" or "12.12.12"
|
||||
}
|
||||
@ -443,4 +479,8 @@ function showLicenseInfo(id){
|
||||
TINY.box.show({html:license.text,boxid:'frameless',width:750,height:450,fixed:false,maskid:'bluemask',maskopacity:40});
|
||||
}
|
||||
}
|
||||
function showHelp(about){
|
||||
TINY.box.show({iframe:"/helpfiles/"+about+".html",boxid:'frameless',width:400,height:300,fixed:false,maskid:'bluemask',maskopacity:40});
|
||||
|
||||
}
|
||||
getLicenses();
|
Loading…
x
Reference in New Issue
Block a user