Compare commits
No commits in common. "a811b68e464496ad888104bf050e3b48b8b30826" and "1fcf16cbe51e22f35833c131f47ff906c4b53f80" have entirely different histories.
a811b68e46
...
1fcf16cbe5
10
.htaccess
10
.htaccess
|
|
@ -1,16 +1,16 @@
|
||||||
#W³asna strona b³êdu 400
|
#W³asna strona b³êdu 400
|
||||||
ErrorDocument 400 "http://firestorm.pl/404.html"
|
ErrorDocument 400 "/404.html"
|
||||||
|
|
||||||
#W³asna strona b³êdu 401
|
#W³asna strona b³êdu 401
|
||||||
ErrorDocument 401 "http://firestorm.pl/404.html"
|
ErrorDocument 401 "/404.html"
|
||||||
|
|
||||||
#W³asna strona b³êdu 403
|
#W³asna strona b³êdu 403
|
||||||
ErrorDocument 403 "http://firestorm.pl/404.html"
|
ErrorDocument 403 "/404.html"
|
||||||
|
|
||||||
#W³asna strona b³êdu 404
|
#W³asna strona b³êdu 404
|
||||||
ErrorDocument 404 "http://firestorm.pl/404.html"
|
ErrorDocument 404 "/404.html"
|
||||||
|
|
||||||
#W³asna strona b³êdu 500
|
#W³asna strona b³êdu 500
|
||||||
ErrorDocument 500 "http://firestorm.pl/404.html"
|
ErrorDocument 500 "/404.html"
|
||||||
|
|
||||||
Options -Indexes
|
Options -Indexes
|
||||||
374
conv.html
374
conv.html
|
|
@ -1,374 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<meta name="description" content="">
|
|
||||||
<meta name="author" content="Adrian Hinz">
|
|
||||||
|
|
||||||
<title>FireStorm Converter</title>
|
|
||||||
<link href="images/favicon.ico" rel="icon" type="image/x-icon" />
|
|
||||||
<!-- Bootstrap Core CSS -->
|
|
||||||
<link href="css/bootstrap.min.css" rel="stylesheet">
|
|
||||||
|
|
||||||
<!-- Custom CSS -->
|
|
||||||
<link href="css/one-page-wonder.css" rel="stylesheet">
|
|
||||||
<!-- Slider CSS -->
|
|
||||||
<link href="css/slider.css" rel="stylesheet">
|
|
||||||
<style>
|
|
||||||
#RC .slider-selection {
|
|
||||||
background: red;
|
|
||||||
}
|
|
||||||
#RC .slider-handle {
|
|
||||||
background: red;
|
|
||||||
}
|
|
||||||
#GC .slider-selection {
|
|
||||||
background: green;
|
|
||||||
}
|
|
||||||
#GC .slider-handle {
|
|
||||||
background: green;
|
|
||||||
}
|
|
||||||
#BC .slider-selection {
|
|
||||||
background: blue;
|
|
||||||
}
|
|
||||||
#BC .slider-handle {
|
|
||||||
background: blue;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
|
||||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
|
||||||
<!--[if lt IE 9]>
|
|
||||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
|
||||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
|
||||||
<![endif]-->
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<!-- Page Content -->
|
|
||||||
<div style="padding-left:15px; padding-right:15px;">
|
|
||||||
<div class="well">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<h2>Converter</h2>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-lg-6">
|
|
||||||
<div class="well" style="background-color:#fff; border-left: 5px solid #777;">
|
|
||||||
<h4 class="text-primary">Zamiana daty</h4>
|
|
||||||
<form class="form-inline">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="time_input">Timestamp lub data w formacie 'YYYY-MM-DD H:M:S'</label>
|
|
||||||
<input type="text" class="form-control" id="time_input" placeholder="YYYY-MM-DD H:M:S">
|
|
||||||
</div>
|
|
||||||
<button class="btn btn-info" onClick="return convert_time();">Przelicz</button>
|
|
||||||
</form>
|
|
||||||
<code id="time_conv" class="bg-warning" style="font-size:16px;"></code>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-6">
|
|
||||||
<div class="well" style="background-color:#fff; border-left: 5px solid #777;">
|
|
||||||
<h4 class="text-primary">Color Picker</h4>
|
|
||||||
<form class="form-inline">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="time_input">Kod koloru: </label>
|
|
||||||
<input type="text" class="form-control" id="color_input" placeholder="#FF0000">
|
|
||||||
</div>
|
|
||||||
<button class="btn btn-info" onClick="return show_color();">Pokaż</button>
|
|
||||||
</form>
|
|
||||||
<br />
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div id="color_display" style="background-color:#f00; border:1px dotted #000; height:50px;"> </div>
|
|
||||||
<br/>
|
|
||||||
<code style="font-size:16px;">rgb(<span class="color_r">255</span>, <span class="color_g">0</span>, <span class="color_b">0</span>)</code>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="col-md-1">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="col-md-9">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-2">
|
|
||||||
R (<span class="color_r">255</span>)
|
|
||||||
</div>
|
|
||||||
<div class="col-md-8">
|
|
||||||
<input type="text" class="span2" value="" data-slider-min="0" data-slider-max="255" data-slider-step="1" data-slider-value="255" data-slider-id="RC" id="R" data-slider-tooltip="hide" data-slider-handle="round" >
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-2">
|
|
||||||
G (<span class="color_g">0</span>)
|
|
||||||
</div>
|
|
||||||
<div class="col-md-8">
|
|
||||||
<input type="text" class="span2" value="" data-slider-min="0" data-slider-max="255" data-slider-step="1" data-slider-value="0" data-slider-id="GC" id="G" data-slider-tooltip="hide" data-slider-handle="round" >
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-2">
|
|
||||||
B (<span class="color_b">0</span>)
|
|
||||||
</div>
|
|
||||||
<div class="col-md-8">
|
|
||||||
<input type="text" class="span2" value="" data-slider-min="0" data-slider-max="255" data-slider-step="1" data-slider-value="0" data-slider-id="BC" id="B" data-slider-tooltip="hide" data-slider-handle="round" >
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-lg-6">
|
|
||||||
<div class="well" style="background-color:#fff; border-left: 5px solid #777;">
|
|
||||||
<h4 class="text-primary">Konwerter liczb</h4>
|
|
||||||
<form class="form-inline">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="time_input">Dane wejściowe: </label>
|
|
||||||
<input type="text" class="form-control" id="numbers_input" placeholder="">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<label class="radio-inline">
|
|
||||||
<input type="radio" name="inlineRadioOptions" id="radio_hex" value="hex"> HEX
|
|
||||||
</label>
|
|
||||||
<label class="radio-inline">
|
|
||||||
<input type="radio" name="inlineRadioOptions" id="radio_dec" value="dec" checked="checked"> DEC
|
|
||||||
</label>
|
|
||||||
<label class="radio-inline">
|
|
||||||
<input type="radio" name="inlineRadioOptions" id="radio_oct" value="oct"> OCT
|
|
||||||
</label>
|
|
||||||
<label class="radio-inline">
|
|
||||||
<input type="radio" name="inlineRadioOptions" id="radio_bin" value="bin"> BIN
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<button class="btn btn-info" onClick="return convert_numbers();">Przelicz</button>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
<code id="numbers_output" style="font-size:16px;"></code>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-lg-6">
|
|
||||||
<div class="well" style="background-color:#fff; border-left: 5px solid #777;">
|
|
||||||
<h4 class="text-primary">Konwerter Base64</h4>
|
|
||||||
<form class="form-horizontal">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="base64RadioOptions" class="col-md-2">Dane wejściowe: </label>
|
|
||||||
<div class="col-md-10">
|
|
||||||
<label class="radio-inline">
|
|
||||||
<input type="radio" name="base64RadioOptions" id="radio_hex" value="text" checked="checked"> Text
|
|
||||||
</label>
|
|
||||||
<label class="radio-inline">
|
|
||||||
<input type="radio" name="base64RadioOptions" id="radio_dec" value="base64"> Base64
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="col-md-10">
|
|
||||||
<textarea class="form-control" rows="3" id="base64_text" style="font-family: monospace, monospace;"></textarea>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-2">
|
|
||||||
<button class="btn btn-info" onClick="return convert_base64();">Przelicz</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
<label>Dane wyjściowe:</label>
|
|
||||||
<pre id="base64_output"></pre>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<hr class="featurette-divider">
|
|
||||||
|
|
||||||
<!-- Footer -->
|
|
||||||
<footer>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-lg-12">
|
|
||||||
<p>Copyright © <span class="fire_cl shadow_small">Fire</span><span class="storm_cl shadow_small">Storm</span> <span id="year">2016</span></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
<script type="text/javascript">
|
|
||||||
var nd = new Date().getFullYear();
|
|
||||||
document.getElementById("year").innerHTML = nd;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!-- /.container -->
|
|
||||||
|
|
||||||
<!-- jQuery -->
|
|
||||||
<script src="js/jquery.js"></script>
|
|
||||||
|
|
||||||
<!-- Bootstrap Core JavaScript -->
|
|
||||||
<script src="js/bootstrap.min.js"></script>
|
|
||||||
|
|
||||||
<script src="js/bootstrap-slider.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
// start date
|
|
||||||
document.getElementById('time_input').value = Date.parse(new Date()) / 1000;
|
|
||||||
function isNormalInteger(str) {
|
|
||||||
var n = ~~Number(str);
|
|
||||||
return String(n) === str && n >= 0;
|
|
||||||
}
|
|
||||||
// Date & Time conversion
|
|
||||||
function leading_zero(num) {
|
|
||||||
return +num < 10 ? "0" + num : num
|
|
||||||
}
|
|
||||||
|
|
||||||
function date_format(date) {
|
|
||||||
var day = date.getDate();
|
|
||||||
var year = date.getFullYear();
|
|
||||||
var month = date.getMonth() + 1;
|
|
||||||
var hours = date.getHours();
|
|
||||||
var min = date.getMinutes();
|
|
||||||
var sec = date.getSeconds();
|
|
||||||
return year+'-'+leading_zero(month)+'-'+leading_zero(day)+' '+leading_zero(hours)+':'+leading_zero(min)+':'+leading_zero(sec);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function convert_time() {
|
|
||||||
var inpt = document.getElementById('time_input').value;
|
|
||||||
if (isNormalInteger(inpt)) {
|
|
||||||
var d = new Date(parseInt(inpt) * 1000);
|
|
||||||
document.getElementById('time_conv').innerHTML = date_format(d) + " (" + inpt + ")";
|
|
||||||
} else {
|
|
||||||
var d = new Date(inpt);
|
|
||||||
if (isNaN(d.getTime())) {
|
|
||||||
document.getElementById('time_conv').innerHTML = d;
|
|
||||||
} else {
|
|
||||||
var d1 = Date.parse(inpt) / 1000;
|
|
||||||
document.getElementById('time_conv').innerHTML = date_format(d) + " (" + d1 + ")";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
// hex converter
|
|
||||||
//dec2hex
|
|
||||||
function dec2hex(d) { return (+d).toString(16).toUpperCase(); }
|
|
||||||
//dec2hex with_leading_zero
|
|
||||||
function d2h_l(d) {
|
|
||||||
var s = (+d).toString(16).toUpperCase();
|
|
||||||
if(s.length < 2) {
|
|
||||||
s = '0' + s;
|
|
||||||
}
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
//hex2dec
|
|
||||||
function hex2dec(h) {return parseInt(h,16);}
|
|
||||||
//dec2bin
|
|
||||||
function dec2bin(dec){return (+dec >>> 0).toString(2);}
|
|
||||||
//bin2dec
|
|
||||||
function bin2dec(bin) {return parseInt(bin, 2);}
|
|
||||||
//dec2oct
|
|
||||||
function dec2oct(oct){return (+oct).toString(8);}
|
|
||||||
//oct2dec
|
|
||||||
function oct2dec(oct) {return parseInt(oct, 8);}
|
|
||||||
|
|
||||||
// konwersja liczb
|
|
||||||
function convert_numbers() {
|
|
||||||
var number_format = $('input[name=inlineRadioOptions]:checked').val();
|
|
||||||
var number = document.getElementById('numbers_input').value;
|
|
||||||
var hex_num = 0;
|
|
||||||
var dec_num = 0;
|
|
||||||
var oct_num = 0;
|
|
||||||
var bin_num = 0;
|
|
||||||
switch (number_format) {
|
|
||||||
case "hex":
|
|
||||||
hex_num = number;
|
|
||||||
dec_num = hex2dec(number);
|
|
||||||
oct_num = dec2oct(hex2dec(number));
|
|
||||||
bin_num = dec2bin(hex2dec(number));
|
|
||||||
break;
|
|
||||||
case "dec":
|
|
||||||
hex_num = dec2hex(number);
|
|
||||||
dec_num = parseInt(number);
|
|
||||||
oct_num = dec2oct(number);
|
|
||||||
bin_num = dec2bin(number);
|
|
||||||
break;
|
|
||||||
case "oct":
|
|
||||||
hex_num = dec2hex(oct2dec(number));
|
|
||||||
dec_num = oct2dec(number);
|
|
||||||
oct_num = number;
|
|
||||||
bin_num = dec2bin(oct2dec(number));
|
|
||||||
break;
|
|
||||||
case "bin":
|
|
||||||
hex_num = dec2hex(bin2dec(number));
|
|
||||||
dec_num = bin2dec(number);
|
|
||||||
oct_num = dec2oct(bin2dec(number));
|
|
||||||
bin_num = number;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
$('#numbers_output').html("<p><b>HEX:</b> " + hex_num + "</p><p><b>DEC:</b> " + dec_num + "</p><p><b>OCT:</b> " + oct_num + "</p><p><b>BIN:</b> " + bin_num + "</p>");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// color picker
|
|
||||||
function show_color() {
|
|
||||||
var inpt = document.getElementById('color_input').value;
|
|
||||||
if (inpt) {
|
|
||||||
var color = '';
|
|
||||||
if (inpt.substring(0,1) != '#') {
|
|
||||||
color += '#'
|
|
||||||
}
|
|
||||||
color += inpt;
|
|
||||||
document.getElementById('color_display').style.backgroundColor = color;
|
|
||||||
}
|
|
||||||
var c = $('#color_display').css('background-color');
|
|
||||||
var rgb = c.match(/\d+/g);
|
|
||||||
r.setValue(rgb[0]);
|
|
||||||
g.setValue(rgb[1]);
|
|
||||||
b.setValue(rgb[2]);
|
|
||||||
$('.color_r').html(r.getValue());
|
|
||||||
$('.color_g').html(g.getValue());
|
|
||||||
$('.color_b').html(b.getValue());
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
var RGBChange = function() {
|
|
||||||
$('#color_input').val('#' + d2h_l(r.getValue()) + d2h_l(g.getValue()) + d2h_l(b.getValue()));
|
|
||||||
$('.color_r').html(r.getValue());
|
|
||||||
$('.color_g').html(g.getValue());
|
|
||||||
$('.color_b').html(b.getValue());
|
|
||||||
$('#color_display').css('background', 'rgb('+r.getValue()+','+g.getValue()+','+b.getValue()+')')
|
|
||||||
};
|
|
||||||
|
|
||||||
var r = $('#R').slider()
|
|
||||||
.on('slide', RGBChange)
|
|
||||||
.data('slider');
|
|
||||||
var g = $('#G').slider()
|
|
||||||
.on('slide', RGBChange)
|
|
||||||
.data('slider');
|
|
||||||
var b = $('#B').slider()
|
|
||||||
.on('slide', RGBChange)
|
|
||||||
.data('slider');
|
|
||||||
|
|
||||||
|
|
||||||
function convert_base64() {
|
|
||||||
if ($('input[name=base64RadioOptions]:checked').val() == "text") {
|
|
||||||
$('#base64_output').html(window.btoa(unescape(encodeURIComponent($('#base64_text').val()))));
|
|
||||||
} else {
|
|
||||||
$('#base64_output').html(decodeURIComponent(escape(window.atob($('#base64_text').val()))));
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
// Run all converters at startup
|
|
||||||
convert_time();
|
|
||||||
show_color();
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
|
|
@ -12,7 +12,7 @@ body {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background: url('../images/firestorm_background_world_a.png') no-repeat center center scroll;
|
background: url('../images/firestorm_background_world.png') no-repeat center center scroll;
|
||||||
-webkit-background-size: cover;
|
-webkit-background-size: cover;
|
||||||
-moz-background-size: cover;
|
-moz-background-size: cover;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
|
|
|
||||||
138
css/slider.css
138
css/slider.css
|
|
@ -1,138 +0,0 @@
|
||||||
/*!
|
|
||||||
* Slider for Bootstrap
|
|
||||||
*
|
|
||||||
* Copyright 2012 Stefan Petre
|
|
||||||
* Licensed under the Apache License v2.0
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
.slider {
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: middle;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.slider.slider-horizontal {
|
|
||||||
width: 210px;
|
|
||||||
height: 20px;
|
|
||||||
}
|
|
||||||
.slider.slider-horizontal .slider-track {
|
|
||||||
height: 10px;
|
|
||||||
width: 100%;
|
|
||||||
margin-top: -5px;
|
|
||||||
top: 50%;
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
.slider.slider-horizontal .slider-selection {
|
|
||||||
height: 100%;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
.slider.slider-horizontal .slider-handle {
|
|
||||||
margin-left: -10px;
|
|
||||||
margin-top: -5px;
|
|
||||||
}
|
|
||||||
.slider.slider-horizontal .slider-handle.triangle {
|
|
||||||
border-width: 0 10px 10px 10px;
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
border-bottom-color: #0480be;
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
.slider.slider-vertical {
|
|
||||||
height: 210px;
|
|
||||||
width: 20px;
|
|
||||||
}
|
|
||||||
.slider.slider-vertical .slider-track {
|
|
||||||
width: 10px;
|
|
||||||
height: 100%;
|
|
||||||
margin-left: -5px;
|
|
||||||
left: 50%;
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
.slider.slider-vertical .slider-selection {
|
|
||||||
width: 100%;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
.slider.slider-vertical .slider-handle {
|
|
||||||
margin-left: -5px;
|
|
||||||
margin-top: -10px;
|
|
||||||
}
|
|
||||||
.slider.slider-vertical .slider-handle.triangle {
|
|
||||||
border-width: 10px 0 10px 10px;
|
|
||||||
width: 1px;
|
|
||||||
height: 1px;
|
|
||||||
border-left-color: #0480be;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
.slider input {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.slider .tooltip-inner {
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
.slider-track {
|
|
||||||
position: absolute;
|
|
||||||
cursor: pointer;
|
|
||||||
background-color: #f7f7f7;
|
|
||||||
background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9);
|
|
||||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));
|
|
||||||
background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9);
|
|
||||||
background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9);
|
|
||||||
background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9);
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0);
|
|
||||||
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
||||||
-moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
||||||
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
||||||
-webkit-border-radius: 4px;
|
|
||||||
-moz-border-radius: 4px;
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
.slider-selection {
|
|
||||||
position: absolute;
|
|
||||||
background-color: #f7f7f7;
|
|
||||||
background-image: -moz-linear-gradient(top, #f9f9f9, #f5f5f5);
|
|
||||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f9f9f9), to(#f5f5f5));
|
|
||||||
background-image: -webkit-linear-gradient(top, #f9f9f9, #f5f5f5);
|
|
||||||
background-image: -o-linear-gradient(top, #f9f9f9, #f5f5f5);
|
|
||||||
background-image: linear-gradient(to bottom, #f9f9f9, #f5f5f5);
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff9f9f9', endColorstr='#fff5f5f5', GradientType=0);
|
|
||||||
-webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
|
|
||||||
-moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
|
|
||||||
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
|
|
||||||
-webkit-box-sizing: border-box;
|
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
box-sizing: border-box;
|
|
||||||
-webkit-border-radius: 4px;
|
|
||||||
-moz-border-radius: 4px;
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
.slider-handle {
|
|
||||||
position: absolute;
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
background-color: #0e90d2;
|
|
||||||
background-image: -moz-linear-gradient(top, #149bdf, #0480be);
|
|
||||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));
|
|
||||||
background-image: -webkit-linear-gradient(top, #149bdf, #0480be);
|
|
||||||
background-image: -o-linear-gradient(top, #149bdf, #0480be);
|
|
||||||
background-image: linear-gradient(to bottom, #149bdf, #0480be);
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);
|
|
||||||
-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
|
|
||||||
-moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
|
|
||||||
box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
|
|
||||||
opacity: 0.8;
|
|
||||||
border: 0px solid transparent;
|
|
||||||
}
|
|
||||||
.slider-handle.round {
|
|
||||||
-webkit-border-radius: 20px;
|
|
||||||
-moz-border-radius: 20px;
|
|
||||||
border-radius: 20px;
|
|
||||||
}
|
|
||||||
.slider-handle.triangle {
|
|
||||||
background: transparent none;
|
|
||||||
}
|
|
||||||
28
gra.html
28
gra.html
|
|
@ -1,28 +0,0 @@
|
||||||
<!-- Learn about this code on MDN: https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Basic_usage -->
|
|
||||||
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8"/>
|
|
||||||
<script type="application/javascript">
|
|
||||||
function draw() {
|
|
||||||
var canvas = document.getElementById("canvas");
|
|
||||||
if (canvas.getContext) {
|
|
||||||
var ctx = canvas.getContext("2d");
|
|
||||||
|
|
||||||
ctx.fillStyle = "rgb(200,0,0)";
|
|
||||||
ctx.fillRect (250, 10, 50, 50);
|
|
||||||
|
|
||||||
ctx.fillStyle = "rgba(0, 0, 200, 0.5)";
|
|
||||||
ctx.fillRect (230, 30, 50, 50);
|
|
||||||
ctx.fillRect(25,25,100,100);
|
|
||||||
ctx.clearRect(45,45,60,60);
|
|
||||||
ctx.strokeRect(50,50,50,50);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body onload="draw();">
|
|
||||||
<canvas id="canvas" width="640" height="480" style="border: 1px solid black;"></canvas>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 60 KiB |
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 31 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 MiB |
21
index.html
21
index.html
|
|
@ -65,8 +65,8 @@
|
||||||
<div class="headline">
|
<div class="headline">
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1 style="background: none; font-weight:700"><span class="fire_cl shadow_big">Fire</span><span class="storm_cl shadow_big">Storm</span></h1>
|
<h1><span class="fire_cl shadow_big">Fire</span><span class="storm_cl shadow_big">Storm</span></h1>
|
||||||
<h2 style="background: none; color:#000">wytwarzanie oprogramowania</h2>
|
<h2>wytwarzanie oprogramowania</h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
@ -78,10 +78,11 @@
|
||||||
<!-- First Featurette -->
|
<!-- First Featurette -->
|
||||||
<div class="featurette">
|
<div class="featurette">
|
||||||
<img class="featurette-image img-circle img-responsive pull-right" src="images/keyboard.png">
|
<img class="featurette-image img-circle img-responsive pull-right" src="images/keyboard.png">
|
||||||
<h2 class="featurette-heading">O nas
|
<h2 class="featurette-heading">Na początek coś o nas
|
||||||
<span class="text-muted">czym się zajmujemy</span>
|
<span class="text-muted">krótka historia</span>
|
||||||
</h2>
|
</h2>
|
||||||
<p class="lead"><span class="fire_cl shadow_small">Fire</span><span class="storm_cl shadow_small">Storm</span> to firma założona w 2005 roku przez Adriana Hinz, zajmująca się wytwarzaniem oprogramowania z wykorzystaniem między innymi języka Ruby, Java czy C#.
|
<p class="lead"><span class="fire_cl shadow_small">Fire</span><span class="storm_cl shadow_small">Storm</span> to firma założona w 2005 roku przez Adriana Hinz, zajmująca się wytwarzaniem oprogramowania z wykorzystaniem między innymi języka Ruby, Java czy C#.
|
||||||
|
Tworzenie stron internetowych w technologii bootstrap
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -90,10 +91,10 @@
|
||||||
<!-- Second Featurette -->
|
<!-- Second Featurette -->
|
||||||
<div class="featurette">
|
<div class="featurette">
|
||||||
<img class="featurette-image img-circle img-responsive pull-left" src="images/kod.png">
|
<img class="featurette-image img-circle img-responsive pull-left" src="images/kod.png">
|
||||||
<h2 class="featurette-heading">Usługi
|
<h2 class="featurette-heading">The Second Heading
|
||||||
<span class="text-muted"> czyli co proponujemy</span>
|
<span class="text-muted">Is Pretty Cool Too.</span>
|
||||||
</h2>
|
</h2>
|
||||||
<p class="lead">Wytwarzanie aplikacji webowych zgodnie z wytycznymi klienta, sklepów internetowych, serwisów magazynowych itp</p>
|
<p class="lead">Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id ligula porta felis euismod semper. Praesent commodo cursus magna, vel scelerisque nisl consectetur. Fusce dapibus, tellus ac cursus commodo.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr class="featurette-divider" id="contact">
|
<hr class="featurette-divider" id="contact">
|
||||||
|
|
@ -102,9 +103,9 @@
|
||||||
<div class="featurette">
|
<div class="featurette">
|
||||||
<img class="featurette-image img-circle img-responsive pull-right" src="images/ball_mail.jpg">
|
<img class="featurette-image img-circle img-responsive pull-right" src="images/ball_mail.jpg">
|
||||||
<h2 class="featurette-heading">Kontakt<br />
|
<h2 class="featurette-heading">Kontakt<br />
|
||||||
<span class="text-muted">Jeśli masz ochotę.</span>
|
<span class="text-muted">Will Seal the Deal.</span>
|
||||||
</h2>
|
</h2>
|
||||||
<p class="lead">Jeśli masz ochotę możesz się z nami skontaktować, a z przyjemnością odpowiemy. <br /> </p>
|
<p class="lead">Jeśli masz ochotę możesz się z nami skontaktować, a z przyjemnością odpowiemy.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr class="featurette-divider">
|
<hr class="featurette-divider">
|
||||||
|
|
@ -113,7 +114,7 @@
|
||||||
<footer>
|
<footer>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<p>Copyright © <span class="fire_cl shadow_small">Fire</span><span class="storm_cl shadow_small">Storm</span> 2005-<span id="year">2016</span></p>
|
<p>Copyright © <span class="fire_cl shadow_small">Fire</span><span class="storm_cl shadow_small">Storm</span> <span id="year">2013</span></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
||||||
|
|
@ -1,388 +0,0 @@
|
||||||
/* =========================================================
|
|
||||||
* bootstrap-slider.js v2.0.0
|
|
||||||
* http://www.eyecon.ro/bootstrap-slider
|
|
||||||
* =========================================================
|
|
||||||
* Copyright 2012 Stefan Petre
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
* ========================================================= */
|
|
||||||
|
|
||||||
!function( $ ) {
|
|
||||||
|
|
||||||
var Slider = function(element, options) {
|
|
||||||
this.element = $(element);
|
|
||||||
this.picker = $('<div class="slider">'+
|
|
||||||
'<div class="slider-track">'+
|
|
||||||
'<div class="slider-selection"></div>'+
|
|
||||||
'<div class="slider-handle"></div>'+
|
|
||||||
'<div class="slider-handle"></div>'+
|
|
||||||
'</div>'+
|
|
||||||
'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'+
|
|
||||||
'</div>')
|
|
||||||
.insertBefore(this.element)
|
|
||||||
.append(this.element);
|
|
||||||
this.id = this.element.data('slider-id')||options.id;
|
|
||||||
if (this.id) {
|
|
||||||
this.picker[0].id = this.id;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof Modernizr !== 'undefined' && Modernizr.touch) {
|
|
||||||
this.touchCapable = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
var tooltip = this.element.data('slider-tooltip')||options.tooltip;
|
|
||||||
|
|
||||||
this.tooltip = this.picker.find('.tooltip');
|
|
||||||
this.tooltipInner = this.tooltip.find('div.tooltip-inner');
|
|
||||||
|
|
||||||
this.orientation = this.element.data('slider-orientation')||options.orientation;
|
|
||||||
switch(this.orientation) {
|
|
||||||
case 'vertical':
|
|
||||||
this.picker.addClass('slider-vertical');
|
|
||||||
this.stylePos = 'top';
|
|
||||||
this.mousePos = 'pageY';
|
|
||||||
this.sizePos = 'offsetHeight';
|
|
||||||
this.tooltip.addClass('right')[0].style.left = '100%';
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
this.picker
|
|
||||||
.addClass('slider-horizontal')
|
|
||||||
.css('width', this.element.outerWidth());
|
|
||||||
this.orientation = 'horizontal';
|
|
||||||
this.stylePos = 'left';
|
|
||||||
this.mousePos = 'pageX';
|
|
||||||
this.sizePos = 'offsetWidth';
|
|
||||||
this.tooltip.addClass('top')[0].style.top = -this.tooltip.outerHeight() - 14 + 'px';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.min = this.element.data('slider-min')||options.min;
|
|
||||||
this.max = this.element.data('slider-max')||options.max;
|
|
||||||
this.step = this.element.data('slider-step')||options.step;
|
|
||||||
this.value = this.element.data('slider-value')||options.value;
|
|
||||||
if (this.value[1]) {
|
|
||||||
this.range = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.selection = this.element.data('slider-selection')||options.selection;
|
|
||||||
this.selectionEl = this.picker.find('.slider-selection');
|
|
||||||
if (this.selection === 'none') {
|
|
||||||
this.selectionEl.addClass('hide');
|
|
||||||
}
|
|
||||||
this.selectionElStyle = this.selectionEl[0].style;
|
|
||||||
|
|
||||||
|
|
||||||
this.handle1 = this.picker.find('.slider-handle:first');
|
|
||||||
this.handle1Stype = this.handle1[0].style;
|
|
||||||
this.handle2 = this.picker.find('.slider-handle:last');
|
|
||||||
this.handle2Stype = this.handle2[0].style;
|
|
||||||
|
|
||||||
var handle = this.element.data('slider-handle')||options.handle;
|
|
||||||
switch(handle) {
|
|
||||||
case 'round':
|
|
||||||
this.handle1.addClass('round');
|
|
||||||
this.handle2.addClass('round');
|
|
||||||
break
|
|
||||||
case 'triangle':
|
|
||||||
this.handle1.addClass('triangle');
|
|
||||||
this.handle2.addClass('triangle');
|
|
||||||
break
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.range) {
|
|
||||||
this.value[0] = Math.max(this.min, Math.min(this.max, this.value[0]));
|
|
||||||
this.value[1] = Math.max(this.min, Math.min(this.max, this.value[1]));
|
|
||||||
} else {
|
|
||||||
this.value = [ Math.max(this.min, Math.min(this.max, this.value))];
|
|
||||||
this.handle2.addClass('hide');
|
|
||||||
if (this.selection == 'after') {
|
|
||||||
this.value[1] = this.max;
|
|
||||||
} else {
|
|
||||||
this.value[1] = this.min;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.diff = this.max - this.min;
|
|
||||||
this.percentage = [
|
|
||||||
(this.value[0]-this.min)*100/this.diff,
|
|
||||||
(this.value[1]-this.min)*100/this.diff,
|
|
||||||
this.step*100/this.diff
|
|
||||||
];
|
|
||||||
|
|
||||||
this.offset = this.picker.offset();
|
|
||||||
this.size = this.picker[0][this.sizePos];
|
|
||||||
|
|
||||||
this.formater = options.formater;
|
|
||||||
|
|
||||||
this.layout();
|
|
||||||
|
|
||||||
if (this.touchCapable) {
|
|
||||||
// Touch: Bind touch events:
|
|
||||||
this.picker.on({
|
|
||||||
touchstart: $.proxy(this.mousedown, this)
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.picker.on({
|
|
||||||
mousedown: $.proxy(this.mousedown, this)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tooltip === 'show') {
|
|
||||||
this.picker.on({
|
|
||||||
mouseenter: $.proxy(this.showTooltip, this),
|
|
||||||
mouseleave: $.proxy(this.hideTooltip, this)
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.tooltip.addClass('hide');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
Slider.prototype = {
|
|
||||||
constructor: Slider,
|
|
||||||
|
|
||||||
over: false,
|
|
||||||
inDrag: false,
|
|
||||||
|
|
||||||
showTooltip: function(){
|
|
||||||
this.tooltip.addClass('in');
|
|
||||||
//var left = Math.round(this.percent*this.width);
|
|
||||||
//this.tooltip.css('left', left - this.tooltip.outerWidth()/2);
|
|
||||||
this.over = true;
|
|
||||||
},
|
|
||||||
|
|
||||||
hideTooltip: function(){
|
|
||||||
if (this.inDrag === false) {
|
|
||||||
this.tooltip.removeClass('in');
|
|
||||||
}
|
|
||||||
this.over = false;
|
|
||||||
},
|
|
||||||
|
|
||||||
layout: function(){
|
|
||||||
this.handle1Stype[this.stylePos] = this.percentage[0]+'%';
|
|
||||||
this.handle2Stype[this.stylePos] = this.percentage[1]+'%';
|
|
||||||
if (this.orientation == 'vertical') {
|
|
||||||
this.selectionElStyle.top = Math.min(this.percentage[0], this.percentage[1]) +'%';
|
|
||||||
this.selectionElStyle.height = Math.abs(this.percentage[0] - this.percentage[1]) +'%';
|
|
||||||
} else {
|
|
||||||
this.selectionElStyle.left = Math.min(this.percentage[0], this.percentage[1]) +'%';
|
|
||||||
this.selectionElStyle.width = Math.abs(this.percentage[0] - this.percentage[1]) +'%';
|
|
||||||
}
|
|
||||||
if (this.range) {
|
|
||||||
this.tooltipInner.text(
|
|
||||||
this.formater(this.value[0]) +
|
|
||||||
' : ' +
|
|
||||||
this.formater(this.value[1])
|
|
||||||
);
|
|
||||||
this.tooltip[0].style[this.stylePos] = this.size * (this.percentage[0] + (this.percentage[1] - this.percentage[0])/2)/100 - (this.orientation === 'vertical' ? this.tooltip.outerHeight()/2 : this.tooltip.outerWidth()/2) +'px';
|
|
||||||
} else {
|
|
||||||
this.tooltipInner.text(
|
|
||||||
this.formater(this.value[0])
|
|
||||||
);
|
|
||||||
this.tooltip[0].style[this.stylePos] = this.size * this.percentage[0]/100 - (this.orientation === 'vertical' ? this.tooltip.outerHeight()/2 : this.tooltip.outerWidth()/2) +'px';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
mousedown: function(ev) {
|
|
||||||
|
|
||||||
// Touch: Get the original event:
|
|
||||||
if (this.touchCapable && ev.type === 'touchstart') {
|
|
||||||
ev = ev.originalEvent;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.offset = this.picker.offset();
|
|
||||||
this.size = this.picker[0][this.sizePos];
|
|
||||||
|
|
||||||
var percentage = this.getPercentage(ev);
|
|
||||||
|
|
||||||
if (this.range) {
|
|
||||||
var diff1 = Math.abs(this.percentage[0] - percentage);
|
|
||||||
var diff2 = Math.abs(this.percentage[1] - percentage);
|
|
||||||
this.dragged = (diff1 < diff2) ? 0 : 1;
|
|
||||||
} else {
|
|
||||||
this.dragged = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.percentage[this.dragged] = percentage;
|
|
||||||
this.layout();
|
|
||||||
|
|
||||||
if (this.touchCapable) {
|
|
||||||
// Touch: Bind touch events:
|
|
||||||
$(document).on({
|
|
||||||
touchmove: $.proxy(this.mousemove, this),
|
|
||||||
touchend: $.proxy(this.mouseup, this)
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
$(document).on({
|
|
||||||
mousemove: $.proxy(this.mousemove, this),
|
|
||||||
mouseup: $.proxy(this.mouseup, this)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
this.inDrag = true;
|
|
||||||
var val = this.calculateValue();
|
|
||||||
this.element.trigger({
|
|
||||||
type: 'slideStart',
|
|
||||||
value: val
|
|
||||||
}).trigger({
|
|
||||||
type: 'slide',
|
|
||||||
value: val
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
|
|
||||||
mousemove: function(ev) {
|
|
||||||
|
|
||||||
// Touch: Get the original event:
|
|
||||||
if (this.touchCapable && ev.type === 'touchmove') {
|
|
||||||
ev = ev.originalEvent;
|
|
||||||
}
|
|
||||||
|
|
||||||
var percentage = this.getPercentage(ev);
|
|
||||||
if (this.range) {
|
|
||||||
if (this.dragged === 0 && this.percentage[1] < percentage) {
|
|
||||||
this.percentage[0] = this.percentage[1];
|
|
||||||
this.dragged = 1;
|
|
||||||
} else if (this.dragged === 1 && this.percentage[0] > percentage) {
|
|
||||||
this.percentage[1] = this.percentage[0];
|
|
||||||
this.dragged = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.percentage[this.dragged] = percentage;
|
|
||||||
this.layout();
|
|
||||||
var val = this.calculateValue();
|
|
||||||
this.element
|
|
||||||
.trigger({
|
|
||||||
type: 'slide',
|
|
||||||
value: val
|
|
||||||
})
|
|
||||||
.data('value', val)
|
|
||||||
.prop('value', val);
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
|
|
||||||
mouseup: function(ev) {
|
|
||||||
if (this.touchCapable) {
|
|
||||||
// Touch: Bind touch events:
|
|
||||||
$(document).off({
|
|
||||||
touchmove: this.mousemove,
|
|
||||||
touchend: this.mouseup
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
$(document).off({
|
|
||||||
mousemove: this.mousemove,
|
|
||||||
mouseup: this.mouseup
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
this.inDrag = false;
|
|
||||||
if (this.over == false) {
|
|
||||||
this.hideTooltip();
|
|
||||||
}
|
|
||||||
this.element;
|
|
||||||
var val = this.calculateValue();
|
|
||||||
this.element
|
|
||||||
.trigger({
|
|
||||||
type: 'slideStop',
|
|
||||||
value: val
|
|
||||||
})
|
|
||||||
.data('value', val)
|
|
||||||
.prop('value', val);
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
|
|
||||||
calculateValue: function() {
|
|
||||||
var val;
|
|
||||||
if (this.range) {
|
|
||||||
val = [
|
|
||||||
(this.min + Math.round((this.diff * this.percentage[0]/100)/this.step)*this.step),
|
|
||||||
(this.min + Math.round((this.diff * this.percentage[1]/100)/this.step)*this.step)
|
|
||||||
];
|
|
||||||
this.value = val;
|
|
||||||
} else {
|
|
||||||
val = (this.min + Math.round((this.diff * this.percentage[0]/100)/this.step)*this.step);
|
|
||||||
this.value = [val, this.value[1]];
|
|
||||||
}
|
|
||||||
return val;
|
|
||||||
},
|
|
||||||
|
|
||||||
getPercentage: function(ev) {
|
|
||||||
if (this.touchCapable) {
|
|
||||||
ev = ev.touches[0];
|
|
||||||
}
|
|
||||||
var percentage = (ev[this.mousePos] - this.offset[this.stylePos])*100/this.size;
|
|
||||||
percentage = Math.round(percentage/this.percentage[2])*this.percentage[2];
|
|
||||||
return Math.max(0, Math.min(100, percentage));
|
|
||||||
},
|
|
||||||
|
|
||||||
getValue: function() {
|
|
||||||
if (this.range) {
|
|
||||||
return this.value;
|
|
||||||
}
|
|
||||||
return this.value[0];
|
|
||||||
},
|
|
||||||
|
|
||||||
setValue: function(val) {
|
|
||||||
this.value = val;
|
|
||||||
|
|
||||||
if (this.range) {
|
|
||||||
this.value[0] = Math.max(this.min, Math.min(this.max, this.value[0]));
|
|
||||||
this.value[1] = Math.max(this.min, Math.min(this.max, this.value[1]));
|
|
||||||
} else {
|
|
||||||
this.value = [ Math.max(this.min, Math.min(this.max, this.value))];
|
|
||||||
this.handle2.addClass('hide');
|
|
||||||
if (this.selection == 'after') {
|
|
||||||
this.value[1] = this.max;
|
|
||||||
} else {
|
|
||||||
this.value[1] = this.min;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.diff = this.max - this.min;
|
|
||||||
this.percentage = [
|
|
||||||
(this.value[0]-this.min)*100/this.diff,
|
|
||||||
(this.value[1]-this.min)*100/this.diff,
|
|
||||||
this.step*100/this.diff
|
|
||||||
];
|
|
||||||
this.layout();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
$.fn.slider = function ( option, val ) {
|
|
||||||
return this.each(function () {
|
|
||||||
var $this = $(this),
|
|
||||||
data = $this.data('slider'),
|
|
||||||
options = typeof option === 'object' && option;
|
|
||||||
if (!data) {
|
|
||||||
$this.data('slider', (data = new Slider(this, $.extend({}, $.fn.slider.defaults,options))));
|
|
||||||
}
|
|
||||||
if (typeof option == 'string') {
|
|
||||||
data[option](val);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
};
|
|
||||||
|
|
||||||
$.fn.slider.defaults = {
|
|
||||||
min: 0,
|
|
||||||
max: 10,
|
|
||||||
step: 1,
|
|
||||||
orientation: 'horizontal',
|
|
||||||
value: 5,
|
|
||||||
selection: 'before',
|
|
||||||
tooltip: 'show',
|
|
||||||
handle: 'round',
|
|
||||||
formater: function(value) {
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
$.fn.slider.Constructor = Slider;
|
|
||||||
|
|
||||||
}( window.jQuery );
|
|
||||||
Loading…
Reference in New Issue