Compare commits
15 Commits
cccbf5ed3d
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| e0805f8f39 | |||
| 58da3ee95f | |||
| ced44416dd | |||
| 9446a92219 | |||
|
|
27b61c94f6 | ||
|
|
3327976b86 | ||
|
|
63341ff48f | ||
|
|
a39a3ecf01 | ||
|
|
bdc5477c5d | ||
|
|
a6082c12a0 | ||
|
|
dae754f993 | ||
|
|
0cceffbd49 | ||
|
|
dc943ee476 | ||
|
|
47159a92c8 | ||
|
|
fed06b2f13 |
@@ -1,4 +1,4 @@
|
|||||||
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');
|
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');
|
||||||
|
|
||||||
/* Paleta kolorów: https://catppuccin.com/palette/ */
|
/* Paleta kolorów: https://catppuccin.com/palette/ */
|
||||||
* {
|
* {
|
||||||
@@ -32,7 +32,8 @@
|
|||||||
|
|
||||||
/* Ważne */
|
/* Ważne */
|
||||||
html {
|
html {
|
||||||
font-family: "Ubuntu", sans-serif;
|
font-family: "Montserrat", sans-serif;
|
||||||
|
text-shadow: 1px 1px 2px var(--colorBase);
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-size: 14pt;
|
font-size: 14pt;
|
||||||
@@ -45,10 +46,57 @@ body {
|
|||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1, h2, h3, h4, h5, h6, p {
|
h1, h2, h3, h4, h5, h6, p, sub {
|
||||||
margin: 0%;
|
margin: 0%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 1.4rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 1.1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4 {
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol, ul {
|
||||||
|
margin: 0%;
|
||||||
|
padding: 0%;
|
||||||
|
padding-left: .5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
overflow-x-auto {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
overflow-x: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (width >= 600px) {
|
||||||
|
h1 {
|
||||||
|
font-size: 1.75rem;
|
||||||
|
}
|
||||||
|
h2 {
|
||||||
|
font-size: 1.3rem;
|
||||||
|
}
|
||||||
|
h3 {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
|
h4 {
|
||||||
|
font-size: 1.1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
ol, ul {
|
||||||
|
padding-left: 1.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Linki */
|
/* Linki */
|
||||||
a, a:visited {
|
a, a:visited {
|
||||||
font-size: large;
|
font-size: large;
|
||||||
@@ -152,4 +200,34 @@ input[type="range"]::-moz-range-thumb {
|
|||||||
height: 1rem;
|
height: 1rem;
|
||||||
background: var(--colorMauve);
|
background: var(--colorMauve);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tabele */
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
border: .15rem solid var(--colorSurface2);
|
||||||
|
margin: .5rem;
|
||||||
|
padding: 0%;
|
||||||
|
}
|
||||||
|
|
||||||
|
table .lp {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
table tr {
|
||||||
|
padding: 0%;
|
||||||
|
border: .15rem solid var(--colorSurface2);
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
table thead tr {
|
||||||
|
background-color: var(--colorSurface2) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
table tbody tr:nth-child(even) {
|
||||||
|
background-color: var(--colorBase);
|
||||||
|
}
|
||||||
|
|
||||||
|
table tbody tr:nth-child(odd) {
|
||||||
|
background-color: var(--colorSurface1);
|
||||||
}
|
}
|
||||||
@@ -1,12 +1,30 @@
|
|||||||
td img {
|
td img {
|
||||||
border-radius: .75rem;
|
border-radius: .75rem;
|
||||||
|
margin: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
|
width: unset;
|
||||||
|
border: none;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.technologia {
|
||||||
|
display: inline-flex;
|
||||||
|
flex-direction: row;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
figcaption {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr {
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
#fagata {
|
#fagata {
|
||||||
color: var(--colorRed);
|
color: var(--colorRed);
|
||||||
font-size: 54pt;
|
font-size: 54pt;
|
||||||
@@ -15,4 +33,28 @@ table {
|
|||||||
|
|
||||||
audio, video {
|
audio, video {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pozycjonowany {
|
||||||
|
background-color: var(--colorSurface1);
|
||||||
|
margin-top: .5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pozycjonowany h4 {
|
||||||
|
background-color: var(--colorSurface2);
|
||||||
|
border-radius: .5rem;
|
||||||
|
padding: .4rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pozycjonowany img {
|
||||||
|
float: left;
|
||||||
|
margin: .5rem;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flowing {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 1rem;
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,7 @@ html {
|
|||||||
|
|
||||||
header {
|
header {
|
||||||
padding: 1rem 1.5rem;
|
padding: 1rem 1.5rem;
|
||||||
|
height: 1.5rem;
|
||||||
border-bottom: solid 3px var(--colorBase);
|
border-bottom: solid 3px var(--colorBase);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,14 +22,14 @@ a:hover {
|
|||||||
|
|
||||||
|
|
||||||
/* Tytułowe */
|
/* Tytułowe */
|
||||||
#tytul {
|
#ekrantytulowy {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0rem;
|
top: 2rem;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
height: calc(100vh - 2rem);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
background: linear-gradient(180deg,
|
background: linear-gradient(180deg,
|
||||||
@@ -40,12 +41,12 @@ a:hover {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#tytul div h1 {
|
#ekrantytulowy div h1 {
|
||||||
font-size: 96pt !important;
|
font-size: 96pt !important;
|
||||||
margin-top: 13rem;
|
margin-top: 13rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tytul div button {
|
#ekrantytulowy div button {
|
||||||
position: relative;
|
position: relative;
|
||||||
color: var(--colorText);
|
color: var(--colorText);
|
||||||
text-shadow: 1px 1px 2px var(--colorBase), 0 0 1px var(--colorBase), 0 0 0.2px var(--colorBase);
|
text-shadow: 1px 1px 2px var(--colorBase), 0 0 1px var(--colorBase), 0 0 0.2px var(--colorBase);
|
||||||
@@ -219,14 +220,19 @@ input[type="number"] {
|
|||||||
max-height: calc(100vh - 4rem);
|
max-height: calc(100vh - 4rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#gra table {
|
||||||
|
margin: auto;
|
||||||
|
border-radius: .3rem;
|
||||||
|
background: var(--colorBase);
|
||||||
|
}
|
||||||
|
|
||||||
#gra aside {
|
#gra aside {
|
||||||
border-radius: .3rem;
|
border-radius: .3rem;
|
||||||
background: var(--colorBase);
|
background: var(--colorBase);
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 1rem;
|
|
||||||
margin: 1rem;
|
margin: 1rem;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
width: 18rem;
|
width: 15rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#gra aside div {
|
#gra aside div {
|
||||||
@@ -241,12 +247,32 @@ input[type="number"] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#gra table {
|
#gra table {
|
||||||
|
width: unset;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
table tr {
|
||||||
|
padding: 0%;
|
||||||
|
border: .15rem solid var(--colorSurface2);
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
table tbody tr:nth-child(even) {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
table tbody tr:nth-child(odd) {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#gra td {
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
#gra button {
|
#gra button {
|
||||||
width: 3rem;
|
width: 3.5rem;
|
||||||
height: 5rem;
|
height: 3.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#gra button:hover {
|
#gra button:hover {
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ html {
|
|||||||
|
|
||||||
/* Header */
|
/* Header */
|
||||||
header {
|
header {
|
||||||
|
position: relative;
|
||||||
background-color: var(--colorBase);
|
background-color: var(--colorBase);
|
||||||
background: linear-gradient(135deg, var(--colorSurface0) 0%, var(--colorSurface1) 100%);
|
background: linear-gradient(135deg, var(--colorSurface0) 0%, var(--colorSurface1) 100%);
|
||||||
/* border-bottom-left-radius: 1rem; */
|
/* border-bottom-left-radius: 1rem; */
|
||||||
@@ -41,6 +42,32 @@ header {
|
|||||||
padding-bottom: .65rem;
|
padding-bottom: .65rem;
|
||||||
padding-left: 1rem;
|
padding-left: 1rem;
|
||||||
padding-right: 1rem;
|
padding-right: 1rem;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
#snieg {
|
||||||
|
position: absolute;
|
||||||
|
border-radius: 1rem;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 1.35rem;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: -10 !important;
|
||||||
|
user-select: none;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sniezyca {
|
||||||
|
position: fixed;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: -5 !important;
|
||||||
|
user-select: none;
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
header img {
|
header img {
|
||||||
@@ -59,6 +86,8 @@ header nav ul {
|
|||||||
|
|
||||||
/* Treść */
|
/* Treść */
|
||||||
main {
|
main {
|
||||||
|
position: relative;
|
||||||
|
z-index: 10;
|
||||||
background-color: var(--colorSurface0);
|
background-color: var(--colorSurface0);
|
||||||
border: .35rem solid var(--colorOverlay0);
|
border: .35rem solid var(--colorOverlay0);
|
||||||
border-radius: 1rem;
|
border-radius: 1rem;
|
||||||
@@ -73,6 +102,8 @@ main {
|
|||||||
|
|
||||||
/* Stopka */
|
/* Stopka */
|
||||||
footer {
|
footer {
|
||||||
|
position: relative;
|
||||||
|
z-index: 10;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@@ -83,15 +114,13 @@ footer {
|
|||||||
border-radius: 1rem;
|
border-radius: 1rem;
|
||||||
border: .3rem solid var(--colorOverlay1);
|
border: .3rem solid var(--colorOverlay1);
|
||||||
|
|
||||||
max-height: 128px;
|
|
||||||
|
|
||||||
margin: .5rem;
|
margin: .5rem;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
padding-bottom: 1.75rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
footer img {
|
footer img {
|
||||||
height: 100%;
|
height: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer strong {
|
footer strong {
|
||||||
@@ -103,13 +132,6 @@ footer div {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer div div, .flex-row {
|
|
||||||
flex-grow: 1;
|
|
||||||
display: inline-flex;
|
|
||||||
flex-direction: row;
|
|
||||||
gap: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer div div ul {
|
footer div div ul {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -121,14 +143,34 @@ footer div div ul {
|
|||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#extra {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (width >= 600px) {
|
||||||
|
#extra {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Dodatkowe */
|
/* Dodatkowe */
|
||||||
.flex-row {
|
.flex-row {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
display: inline-flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.flex-row-reverse {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row-reverse;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-col {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
.fixed25rem {
|
.fixed25rem {
|
||||||
min-height: 25rem;
|
min-height: 25rem;
|
||||||
max-height: 25rem;
|
max-height: 25rem;
|
||||||
|
|||||||
59
assets/css/tabliczka.css
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
@font-face {
|
||||||
|
font-family: Monocraft;
|
||||||
|
src: url(/assets/fonts/Monocraft.otf);
|
||||||
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
text-shadow: 2px 2px 5px #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
main * {
|
||||||
|
font-family: "Monocraft", sans-serif;
|
||||||
|
color: #ddd;
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
form {
|
||||||
|
margin: auto;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 3rem;
|
||||||
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 32rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
margin-inline: auto;
|
||||||
|
color: #000;
|
||||||
|
padding: 1rem;
|
||||||
|
text-align: center;
|
||||||
|
background: url(/assets/images/oak_planks.png);
|
||||||
|
background-size: 12.5vw 12.5vw;
|
||||||
|
image-rendering: pixelated;
|
||||||
|
overflow: hidden;
|
||||||
|
text-wrap: none;
|
||||||
|
font-size: 2vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
margin-inline: auto;
|
||||||
|
padding-block: .5rem;
|
||||||
|
padding-inline: 1rem;
|
||||||
|
width: 24rem;
|
||||||
|
height: 2.5rem;
|
||||||
|
font-size: 16pt;
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
image-rendering: pixelated;
|
||||||
|
background-image: url(/assets/images/button.png);
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
input:hover {
|
||||||
|
background-image: url(/assets/images/button_highlighted.png) !important;
|
||||||
|
background-size: 100% 100% !important;
|
||||||
|
color: #ddd !important;
|
||||||
|
}
|
||||||
BIN
assets/fonts/Monocraft.otf
Normal file
BIN
assets/images/960px-Neko_Wikipe-tan.png
Normal file
|
After Width: | Height: | Size: 345 KiB |
|
After Width: | Height: | Size: 32 KiB |
BIN
assets/images/button.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
assets/images/button_highlighted.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
13
assets/images/es2266-ecmascript-logo.svg
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg width="100%" height="100%" viewBox="0 0 400 400" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;">
|
||||||
|
<g id="Background" transform="matrix(0.925728,0,0,0.998874,-16.7849,-25.5506)">
|
||||||
|
<rect x="18.771" y="24.88" width="432.668" height="402.351" style="fill:rgb(248,220,61);"/>
|
||||||
|
</g>
|
||||||
|
<g transform="matrix(1,0,0,1,-82.9938,8.55603)">
|
||||||
|
<text x="124.14px" y="357.097px" style="font-family:'OpenSans-Bold', 'Open Sans', sans-serif;font-weight:700;font-size:258.257px;fill:black;">ES</text>
|
||||||
|
</g>
|
||||||
|
<g transform="matrix(1,0,0,1,126.381,-193.709)">
|
||||||
|
<text x="124.14px" y="357.097px" style="font-family:'OpenSans-Bold', 'Open Sans', sans-serif;font-weight:700;font-size:50px;fill:black;">2266</text>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
BIN
assets/images/html6.webp
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
assets/images/kaczka.png
Normal file
|
After Width: | Height: | Size: 627 KiB |
BIN
assets/images/kawusia.png
Normal file
|
After Width: | Height: | Size: 265 KiB |
BIN
assets/images/oak_planks.png
Normal file
|
After Width: | Height: | Size: 202 B |
BIN
assets/images/portret.png
Normal file
|
After Width: | Height: | Size: 219 KiB |
BIN
assets/images/purple-css-logo.webp
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
assets/images/qyouradio.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
assets/images/qyouvideo.png
Normal file
|
After Width: | Height: | Size: 171 KiB |
BIN
assets/images/rurex.webp
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
assets/images/screenshot000.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
assets/images/snieg.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
assets/images/spokoj.png
Normal file
|
After Width: | Height: | Size: 520 KiB |
203
assets/js/2137.js
Normal file
@@ -0,0 +1,203 @@
|
|||||||
|
class Barka extends HTMLElement {
|
||||||
|
#odtwarzanie = false;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
this.shadow = this.attachShadow({ mode: "open" });
|
||||||
|
}
|
||||||
|
|
||||||
|
connectedCallback() {
|
||||||
|
const styl = document.createElement("style");
|
||||||
|
styl.textContent = `
|
||||||
|
:host {
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
position: fixed;
|
||||||
|
top: 0px;
|
||||||
|
left: 0px;
|
||||||
|
background: #000000;
|
||||||
|
z-index: 999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
audio {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
canvas {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0rem;
|
||||||
|
width: 100svw;
|
||||||
|
height: 12rem;
|
||||||
|
margin: auto;
|
||||||
|
/* border: .3rem solid #ffffff; */
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
this.shadow.append(styl)
|
||||||
|
this.style.display = "none";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Autozapłon
|
||||||
|
*/
|
||||||
|
async kontroler() {
|
||||||
|
let godzina2137 = new Date();
|
||||||
|
godzina2137.setHours(21, 37);
|
||||||
|
let sekundyDo2137 = (godzina2137.getTime() - Date.now()) / 1000;
|
||||||
|
const akceptowalneSpoznienie = 600;
|
||||||
|
|
||||||
|
|
||||||
|
// console.log("dev");
|
||||||
|
// barka.start();
|
||||||
|
// return;
|
||||||
|
if (sekundyDo2137 >= 0) {
|
||||||
|
await new Promise(resolve => setTimeout(resolve, sekundyDo2137 * 1000));
|
||||||
|
console.log("już czas.");
|
||||||
|
barka.start();
|
||||||
|
} else if (sekundyDo2137 + akceptowalneSpoznienie >= 0) {
|
||||||
|
console.log("lekko po czasie");
|
||||||
|
barka.start();
|
||||||
|
} else if (sekundyDo2137 < 0) {
|
||||||
|
console.log("zaimplementować");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rozpocznij balange
|
||||||
|
*/
|
||||||
|
async start() {
|
||||||
|
if (this.#odtwarzanie) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.#odtwarzanie = true;
|
||||||
|
|
||||||
|
this.style.display = "none";
|
||||||
|
for (const child of this.children) {
|
||||||
|
child.remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.audio = document.createElement("audio");
|
||||||
|
this.audio.controls = true;
|
||||||
|
this.audio.volume = 0.4;
|
||||||
|
{
|
||||||
|
const src = document.createElement("source")
|
||||||
|
src.src = "/assets/sounds/barka.m4a";
|
||||||
|
this.audio.appendChild(src);
|
||||||
|
}
|
||||||
|
this.audio.addEventListener("playing", ev => {
|
||||||
|
if (this.audio.played == 1) {
|
||||||
|
this.stop();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
try {
|
||||||
|
await this.audio.play();
|
||||||
|
} catch (err) {
|
||||||
|
console.error("Nie udało się puścić barki: ", err)
|
||||||
|
this.#odtwarzanie = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.shadow.appendChild(this.audio);
|
||||||
|
this.style.display = "block";
|
||||||
|
|
||||||
|
this.canvas = document.createElement("canvas");
|
||||||
|
this.shadow.appendChild(this.canvas);
|
||||||
|
this.ctx2D = this.canvas.getContext("2d");
|
||||||
|
this.ctx2D.imageSmoothingEnabled = false;
|
||||||
|
|
||||||
|
this.ctxAud = new AudioContext();
|
||||||
|
this.analyser = this.ctxAud.createAnalyser();
|
||||||
|
const src = this.ctxAud.createMediaElementSource(this.audio);
|
||||||
|
src.connect(this.analyser);
|
||||||
|
|
||||||
|
// LINIJKA SKRADZIONA Z YOUVIDEO PITER NIE OBRAŻ SIE ALE DOSŁOWNIE TYLKO TO SKOPIOWAŁEM I TYLE NA RESZTE NIE PATRZYŁEM
|
||||||
|
this.analyser.connect(this.ctxAud.destination);
|
||||||
|
|
||||||
|
this.analyser.fftSize = 2048;
|
||||||
|
this.bufferLength = this.analyser.frequencyBinCount;
|
||||||
|
this.dataArray = new Uint8Array(this.bufferLength);
|
||||||
|
|
||||||
|
this.#ucyucy();
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
this.style.display = "none";
|
||||||
|
this.#odtwarzanie = false;
|
||||||
|
this.kontroler();
|
||||||
|
}
|
||||||
|
|
||||||
|
async #ucyucy() {
|
||||||
|
if (this.#odtwarzanie) {
|
||||||
|
requestAnimationFrame(async () => {
|
||||||
|
await this.#ucyucy()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.analyser.getByteTimeDomainData(this.dataArray);
|
||||||
|
|
||||||
|
this.canvas.width = this.canvas.clientWidth;
|
||||||
|
this.canvas.height = this.canvas.clientHeight;
|
||||||
|
this.ctx2D.clearRect(0, 0, this.canvas.clientWidth, this.canvas.clientHeight);
|
||||||
|
|
||||||
|
this.ctx2D.lineWidth = 5;
|
||||||
|
this.ctx2D.strokeStyle = "rgb(203, 166, 247)";
|
||||||
|
this.ctx2D.beginPath();
|
||||||
|
|
||||||
|
const sliceWidth = this.canvas.clientWidth / this.bufferLength;
|
||||||
|
const middle = this.canvas.clientHeight / 2;
|
||||||
|
|
||||||
|
let x = 0;
|
||||||
|
|
||||||
|
let peak = 0;
|
||||||
|
|
||||||
|
for (let i = 0; i < this.bufferLength; i++) {
|
||||||
|
const v = (this.dataArray[i] / 128.0 - 1) * (1 - this.audio.volume);
|
||||||
|
if (peak < v) {
|
||||||
|
peak = v;
|
||||||
|
}
|
||||||
|
const y = v * 4 * middle + middle;
|
||||||
|
|
||||||
|
if (i == 0) {
|
||||||
|
this.ctx2D.moveTo(x, y);
|
||||||
|
} else {
|
||||||
|
this.ctx2D.lineTo(x, y);
|
||||||
|
}
|
||||||
|
|
||||||
|
x += sliceWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Finish the line
|
||||||
|
this.ctx2D.lineTo(this.canvas.clientWidth, this.canvas.clientHeight / 2);
|
||||||
|
this.ctx2D.stroke();
|
||||||
|
|
||||||
|
if (this.audio.currentTime > 39) {
|
||||||
|
this.canvas.style.backgroundColor = "#1e1e2e";
|
||||||
|
this.style.backgroundColor = `rgb(${88 + 255 * peak}, ${137 + 255 * peak}, ${194 + 255 * peak}`;
|
||||||
|
} else {
|
||||||
|
this.canvas.style.backgroundColor = "";
|
||||||
|
this.style.backgroundColor = `rgb(${255 * peak}, ${255 * peak}, ${255 * peak}`;
|
||||||
|
}
|
||||||
|
this.style.scale = 1 + peak / (peak > 0.1 ? 5 : 10);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
customElements.define("barka-comp", Barka);
|
||||||
|
|
||||||
|
async function start() {
|
||||||
|
await new Promise(resolve => setTimeout(resolve, 38000))
|
||||||
|
|
||||||
|
const kreciol = document.createElement("img")
|
||||||
|
kreciol.src = "https://media1.tenor.com/m/CzW0P5EOQwoAAAAC/jp2gmd-pope.gif";
|
||||||
|
kreciol.style.position = "relative";
|
||||||
|
kreciol.style.right = ".5rem";
|
||||||
|
kreciol.style.bottom = ".5rem";
|
||||||
|
root.appendChild(kreciol);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @type Barka */
|
||||||
|
const barka = document.createElement("barka-comp");
|
||||||
|
document.body.appendChild(barka);
|
||||||
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
|
barka.kontroler();
|
||||||
|
});
|
||||||
|
|
||||||
|
window.barka = barka;
|
||||||
3
assets/js/index.js
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
import "./2137.js"
|
||||||
|
import "./nawigacja.js"
|
||||||
|
import "./zima.js"
|
||||||
86
assets/js/js-petle.js
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
|
zad1();
|
||||||
|
zad5();
|
||||||
|
zad6();
|
||||||
|
zad7();
|
||||||
|
zad12();
|
||||||
|
zad15();
|
||||||
|
zad17();
|
||||||
|
})
|
||||||
|
|
||||||
|
function zad1() {
|
||||||
|
const elem = document.getElementById("zad1")
|
||||||
|
for (let i = 0; 10 > i++; elem.innerText += i + "\n") {}
|
||||||
|
}
|
||||||
|
|
||||||
|
function zad5() {
|
||||||
|
const x = parseInt(document.getElementById("zad5-x").value)
|
||||||
|
const y = parseInt(document.getElementById("zad5-y").value)
|
||||||
|
|
||||||
|
let stanKonta = 0;
|
||||||
|
|
||||||
|
for (let miesiac = 0; x > miesiac; miesiac++) {
|
||||||
|
stanKonta += y + stanKonta * 0.08
|
||||||
|
}
|
||||||
|
|
||||||
|
const elem = document.getElementById("zad5")
|
||||||
|
elem.innerText = `W ciągu ${x} miesięcy, pracownik zgromadził ${Math.round(stanKonta * 100) / 100}zł`
|
||||||
|
}
|
||||||
|
|
||||||
|
function zad6() {
|
||||||
|
let suma = 0
|
||||||
|
let wynik = -5
|
||||||
|
for (let i = 0; 99 > i; i++) {
|
||||||
|
wynik += 10
|
||||||
|
suma += wynik
|
||||||
|
}
|
||||||
|
|
||||||
|
const elem = document.getElementById("zad6")
|
||||||
|
elem.innerText = `Suma elementów ciągu wynosi ${suma}`
|
||||||
|
}
|
||||||
|
|
||||||
|
function zad7() {
|
||||||
|
const elem = document.getElementById("zad7")
|
||||||
|
let cegly = 0;
|
||||||
|
for (let i = 10; 0 < i--; cegly += i * i) {}
|
||||||
|
elem.innerText += cegly + "\n"
|
||||||
|
}
|
||||||
|
|
||||||
|
function zad12() {
|
||||||
|
const start = parseInt(document.getElementById("zad12-start").value)
|
||||||
|
const n = parseInt(document.getElementById("zad12-n").value)
|
||||||
|
const elem = document.getElementById("zad12")
|
||||||
|
elem.innerText = ""
|
||||||
|
for (let i = 0; n > i; i++) {
|
||||||
|
elem.innerHTML += `${(start + i) * (start + i)} `
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function zad15() {
|
||||||
|
const rozmiar = parseInt(document.getElementById("zad15-rozmiar").value)
|
||||||
|
const elem = document.getElementById("zad15")
|
||||||
|
const polowa = Math.ceil(rozmiar) - 1
|
||||||
|
elem.innerHTML = ""
|
||||||
|
|
||||||
|
for (let linia = 0; rozmiar > linia; linia++) {
|
||||||
|
const p = document.createElement("pre")
|
||||||
|
for (let ceglowka = 0; rozmiar * 2 - 1 > ceglowka; ceglowka++) {
|
||||||
|
if (ceglowka == polowa - linia || ceglowka == polowa + linia || linia == rozmiar - 1) {
|
||||||
|
p.innerText += "🐾"
|
||||||
|
} else {
|
||||||
|
p.innerText += "😒"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elem.appendChild(p)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function zad17() {
|
||||||
|
const elem = document.getElementById("zad17")
|
||||||
|
for (let i = 0; 5 > i++;) {
|
||||||
|
for (let j = 0; i > j; j++) {
|
||||||
|
elem.innerText += (i + j) % 2 == 0 ? "0" : "1"
|
||||||
|
}
|
||||||
|
elem.innerText += "\n"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
document.addEventListener("DOMContentLoaded", () => {
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
zad4SprawdzParzystosc();
|
zad4SprawdzParzystosc();
|
||||||
|
zad6Sprawdz();
|
||||||
zad7Przesun();
|
zad7Przesun();
|
||||||
zad8Przelicz();
|
zad8Przelicz();
|
||||||
})
|
})
|
||||||
@@ -8,6 +9,19 @@ function zad4SprawdzParzystosc() {
|
|||||||
document.getElementById("zad4-wynik").innerText = document.getElementById("zad4-liczba").valueAsNumber % 2 == 1 ? "Nieparzysta" : "Parzysta";
|
document.getElementById("zad4-wynik").innerText = document.getElementById("zad4-liczba").valueAsNumber % 2 == 1 ? "Nieparzysta" : "Parzysta";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function zad6Sprawdz() {
|
||||||
|
document.getElementById("zad6-wynik").innerText = () => {
|
||||||
|
switch (nr = document.getElementById("zad4-liczba").valueAsNumber) {
|
||||||
|
case (nr > 0):
|
||||||
|
return "Dodatnia"
|
||||||
|
case 0:
|
||||||
|
return "Zero"
|
||||||
|
case (nr < 0):
|
||||||
|
return "Ujemna"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function zad7Przesun() {
|
function zad7Przesun() {
|
||||||
const wiek = Number(document.getElementById("zad7-slider").value);
|
const wiek = Number(document.getElementById("zad7-slider").value);
|
||||||
document.getElementById("zad7-wiek").innerHTML = "Wiek: " + (wiek >= 18 ? "18+" : wiek);
|
document.getElementById("zad7-wiek").innerHTML = "Wiek: " + (wiek >= 18 ? "18+" : wiek);
|
||||||
|
|||||||
@@ -1,174 +1,200 @@
|
|||||||
let cel = 0;
|
class Liczby {
|
||||||
let czas = 0;
|
|
||||||
let zaklad = 0;
|
|
||||||
let wToku = false;
|
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", () => {
|
|
||||||
/**
|
/**
|
||||||
* @type {HTMLFormElement}
|
* Czy gra jest w toku?
|
||||||
*/
|
*/
|
||||||
const konfiguracja = document.querySelector('#konfiguracja form');
|
|
||||||
konfiguracja.onsubmit = ev => {
|
|
||||||
ev.preventDefault();
|
|
||||||
new FormData(konfiguracja);
|
|
||||||
}
|
|
||||||
konfiguracja.onformdata = zacznijGre;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @type {HTMLFormElement}
|
|
||||||
*/
|
|
||||||
const liczba = document.querySelector('#liczba form');
|
|
||||||
liczba.onsubmit = ev => {
|
|
||||||
ev.preventDefault();
|
|
||||||
new FormData(liczba);
|
|
||||||
}
|
|
||||||
liczba.onformdata = zamknijNumer;
|
|
||||||
|
|
||||||
for (let i = 1; i <= 100; i++) {
|
|
||||||
/**
|
|
||||||
* @type {HTMLButtonElement}
|
|
||||||
*/
|
|
||||||
const przycisk = document.getElementById(i);
|
|
||||||
przycisk.onclick = klikLiczby;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
function pokazKonfiguracje() {
|
|
||||||
if (wToku) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @type {HTMLFormElement}
|
|
||||||
*/
|
|
||||||
const konfiguracja = document.getElementById('konfiguracja');
|
|
||||||
konfiguracja.className = 'dialog dialog-pokaz';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @type {HTMLInputElement}
|
|
||||||
*/
|
|
||||||
const lManual = document.getElementById('l-manual');
|
|
||||||
lManual.checked = false;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @type {HTMLInputElement}
|
|
||||||
*/
|
|
||||||
const lAuto = document.getElementById('l-auto');
|
|
||||||
lAuto.checked = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param {FormDataEvent} event
|
|
||||||
*/
|
|
||||||
function zacznijGre(event) {
|
|
||||||
event.preventDefault();
|
|
||||||
if (wToku) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
wToku = true;
|
|
||||||
|
|
||||||
if (event.formData.get("losowosc") == "komputer") {
|
|
||||||
cel = Math.floor(Math.random() * 99 + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
zaklad = Number(event.formData.get("zaklad"))
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @type {HTMLFormElement}
|
|
||||||
*/
|
|
||||||
const konfiguracja = document.getElementById('konfiguracja');
|
|
||||||
konfiguracja.className = 'dialog dialog-ukryj';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @type {HTMLFormElement}
|
|
||||||
*/
|
|
||||||
const tytul = document.getElementById('tytul');
|
|
||||||
tytul.className = 'ukryj';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @type {HTMLParagraphElement}
|
|
||||||
*/
|
|
||||||
const pudla = document.getElementById('pudla');
|
|
||||||
pudla.innerText = '0';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @type {HTMLParagraphElement}
|
|
||||||
*/
|
|
||||||
const kwota = document.getElementById('kwota');
|
|
||||||
kwota.innerText = zaklad + 'zł';
|
|
||||||
}
|
|
||||||
|
|
||||||
function koniecGry() {
|
|
||||||
if (!wToku) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
wToku = false;
|
wToku = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {HTMLFormElement}
|
* Cały stan gry
|
||||||
*/
|
*/
|
||||||
const koniec = document.getElementById('koniec');
|
#stan = {
|
||||||
koniec.className = 'dialog dialog-pokaz';
|
szukana: 0,
|
||||||
}
|
bledneWskazania: 0,
|
||||||
|
czas: 0,
|
||||||
/**
|
podstawowaWygrana: 0,
|
||||||
*
|
|
||||||
* @param {Event} event
|
|
||||||
*/
|
|
||||||
function klikLiczby(event) {
|
|
||||||
if (!wToku) {
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if (Number(event.target.id) == cel) {
|
|
||||||
event.target.className = 'poprawna';
|
|
||||||
koniecGry();
|
|
||||||
} else if (event.target.className != "bledna") {
|
|
||||||
/**
|
|
||||||
* @type {HTMLParagraphElement}
|
|
||||||
*/
|
|
||||||
const pudla = document.getElementById('pudla');
|
|
||||||
pudla.innerText = Number(pudla.innerText) + 1;
|
|
||||||
|
|
||||||
event.target.className = 'bledna';
|
/**
|
||||||
|
* Przechowuje odniesienia do wszystkich "stałych" elementów (dialogów, formularzy, elementów tekstowych)
|
||||||
|
*/
|
||||||
|
#elementy;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
this.#elementy = {
|
||||||
|
/** @type {HTMLDivElement} */
|
||||||
|
ekranTytulowy: document.getElementById('ekrantytulowy'),
|
||||||
|
/** @type {HTMLButtonElement} */
|
||||||
|
ekranTytulowySploczSie: document.querySelector('#ekrantytulowy #odTBF button'),
|
||||||
|
|
||||||
|
/** @type {HTMLDivElement} */
|
||||||
|
nowaGra: document.getElementById('dialog-nowagra'),
|
||||||
|
/** @type {HTMLFormElement} */
|
||||||
|
nowaGraForm: document.querySelector('#dialog-nowagra form'),
|
||||||
|
/** @type {HTMLInputElement} */
|
||||||
|
nowaGraRadioManual: document.querySelector('#dialog-nowagra form fieldset#nowagraFieldset1 input#l-manual'),
|
||||||
|
/** @type {HTMLSpanElement} */
|
||||||
|
nowaGraSpanKwota: document.querySelector('#dialog-nowagra form fieldset#nowagraFieldset2 span#kwota'),
|
||||||
|
/** @type {HTMLInputElement} */
|
||||||
|
nowaGraInputKwota: document.querySelector('#dialog-nowagra form fieldset#nowagraFieldset2 input#kwota'),
|
||||||
|
|
||||||
|
/** @type {HTMLDivElement} */
|
||||||
|
ustawLiczbe: document.getElementById('dialog-ustawliczbe'),
|
||||||
|
/** @type {HTMLFormElement} */
|
||||||
|
ustawLiczbeForm: document.querySelector('#dialog-ustawliczbe form'),
|
||||||
|
/** @type {HTMLInputElement} */
|
||||||
|
ustawLiczbeLiczba: document.querySelector('#dialog-ustawliczbe form fieldset input#liczba'),
|
||||||
|
|
||||||
|
/** @type {HTMLDivElement} */
|
||||||
|
wygrana: document.getElementById('dialog-wygrana'),
|
||||||
|
/** @type {HTMLButtonElement} */
|
||||||
|
wygranaRatsMadeMeCrazy: document.querySelector('#dialog-wygrana .okno button'),
|
||||||
|
};
|
||||||
|
|
||||||
|
this.#elementy.ekranTytulowySploczSie.onclick = () => { this.nowaGra(); };
|
||||||
|
|
||||||
|
this.#elementy.nowaGraRadioManual.onclick = () => { this.#ustawianieLiczby(); };
|
||||||
|
this.#elementy.nowaGraForm.onsubmit = ev => { this.#formOnSubmit(ev); };
|
||||||
|
this.#elementy.nowaGraForm.onformdata = ev => { this.#startGry(ev); };
|
||||||
|
this.#elementy.nowaGraInputKwota.oninput = ev => {
|
||||||
|
this.#elementy.nowaGraSpanKwota.innerText = ev.target.value + "zł";
|
||||||
|
};
|
||||||
|
this.#elementy.nowaGraSpanKwota.innerText = this.#elementy.nowaGraInputKwota.value + "zł";
|
||||||
|
|
||||||
|
this.#elementy.ustawLiczbeForm.onsubmit = ev => { this.#formOnSubmit(ev); };
|
||||||
|
this.#elementy.ustawLiczbeForm.onformdata = ev => { this.#ustawLiczbe(ev); };
|
||||||
|
|
||||||
|
this.#elementy.wygranaRatsMadeMeCrazy.onclick = () => { this.pokazTytul(); };
|
||||||
|
|
||||||
|
for (let i = 1; i <= 100; i++) {
|
||||||
|
/** @type {HTMLButtonElement} */
|
||||||
|
const przycisk = document.querySelector("button[id=\"" + i + "\"");;
|
||||||
|
przycisk.onclick = ev => {
|
||||||
|
this.#strzal(ev);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mała funkcja pomocnicza pzygotowywująca FormData dla formularza
|
||||||
|
* @param {Event} event
|
||||||
|
*/
|
||||||
|
#formOnSubmit (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
new FormData(event.target);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ukryj ekran wygranej i pokaż ekran tytułowy
|
||||||
|
*/
|
||||||
|
pokazTytul() {
|
||||||
|
if (this.wToku) {
|
||||||
|
this.wToku = false;
|
||||||
|
}
|
||||||
|
for (let i = 1; i <= 100; i++) {
|
||||||
|
/** @type {HTMLButtonElement} */
|
||||||
|
const przycisk = document.querySelector("button[id=\"" + i + "\"");
|
||||||
|
przycisk.className = "";
|
||||||
|
}
|
||||||
|
this.#elementy.wygrana.className = "dialog dialog-ukryj";
|
||||||
|
this.#elementy.ekranTytulowy.className = "dialog dialog-pokaz";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Otwiera dialog pod ustawienie właściwości gry
|
||||||
|
*/
|
||||||
|
nowaGra() {
|
||||||
|
if (this.wToku) {
|
||||||
|
this.wToku = false;
|
||||||
|
}
|
||||||
|
this.#elementy.nowaGra.className = "dialog dialog-pokaz";
|
||||||
|
for (const child of this.#elementy.nowaGraRadioManual.parentNode.children) {
|
||||||
|
child.checked = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Przygotowywuje stan i ukrywa dialog nowej gry
|
||||||
|
* @param {FormDataEvent} event
|
||||||
|
*/
|
||||||
|
#startGry(event) {
|
||||||
|
this.#stan = {
|
||||||
|
bledneWskazania: 0,
|
||||||
|
czas: 0,
|
||||||
|
szukana: event.formData.get("losowosc") == "komputer" ? (Math.floor(Math.random() * 99) + 1) : this.#stan.szukana,
|
||||||
|
podstawowaWygrana: Number(event.formData.get("kwota"))
|
||||||
|
};
|
||||||
|
|
||||||
|
this.#elementy.nowaGra.className = "dialog dialog-ukryj";
|
||||||
|
this.#elementy.ekranTytulowy.className = "dialog dialog-ukryj";
|
||||||
|
|
||||||
|
for (let i = 1; i <= 100; i++) {
|
||||||
|
/** @type {HTMLButtonElement} */
|
||||||
|
const przycisk = document.querySelector("button[id=\"" + i + "\"");;
|
||||||
|
przycisk.className = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
this.wToku = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pokazuje dialog pod manualne ustawianie liczby
|
||||||
|
*/
|
||||||
|
#ustawianieLiczby() {
|
||||||
|
this.#elementy.ustawLiczbe.className = "dialog dialog-pokaz";
|
||||||
|
this.#elementy.ustawLiczbeLiczba.value = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Zastosowywuje liczbę i zamyka dialog
|
||||||
|
* @param {FormDataEvent} event
|
||||||
|
*/
|
||||||
|
#ustawLiczbe(event) {
|
||||||
|
this.#elementy.ustawLiczbe.className = "dialog dialog-ukryj";
|
||||||
|
this.#elementy.ustawLiczbeLiczba.value = "";
|
||||||
|
this.#stan.szukana = Number(event.formData.get("liczba"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gracz strzela
|
||||||
|
* @param {FormDataEvent} event
|
||||||
|
*/
|
||||||
|
#strzal(event) {
|
||||||
|
if (!this.wToku) { return; }
|
||||||
|
const przycisk = document.querySelector("button[id=\"" + event.target.id + "\"");
|
||||||
|
if (Number(event.target.id) == this.#stan.szukana) {
|
||||||
|
przycisk.className = 'poprawna';
|
||||||
|
this.#wygrana();
|
||||||
|
} else if (przycisk.className != "bledna") {
|
||||||
|
this.#stan.pudla++;
|
||||||
|
przycisk.className = 'bledna';
|
||||||
|
}
|
||||||
|
this.#aktualizujStatystyki();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Aktualizuje wyświetlane statystyki z wyjątkiem czasy i m.in. zastosowywuje modyfikatory
|
||||||
|
*/
|
||||||
|
#aktualizujStatystyki() {}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wyświetla dialog wygranej
|
||||||
|
*/
|
||||||
|
#wygrana() {
|
||||||
|
this.wToku = false;
|
||||||
|
this.#elementy.wygrana.className = "dialog dialog-pokaz";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function pokazNumer() {
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
if (wToku) {
|
new Liczby();
|
||||||
return;
|
});
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @type {HTMLFormElement}
|
|
||||||
*/
|
|
||||||
const liczba = document.getElementById('liczba');
|
|
||||||
liczba.className = 'dialog dialog-pokaz';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @type {HTMLInputElement}
|
|
||||||
*/
|
|
||||||
const numer = document.getElementById('numer');
|
|
||||||
numer.value = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param {FormDataEvent} event
|
|
||||||
*/
|
|
||||||
function zamknijNumer(event) {
|
|
||||||
if (wToku) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @type {HTMLFormElement}
|
|
||||||
*/
|
|
||||||
const liczba = document.getElementById('liczba');
|
|
||||||
liczba.className = 'dialog dialog-ukryj';
|
|
||||||
|
|
||||||
cel = Number(event.formData.get("liczba"));
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @type {HTMLInputElement}
|
|
||||||
*/
|
|
||||||
const numer = document.getElementById('numer');
|
|
||||||
numer.value = "";
|
|
||||||
}
|
|
||||||
@@ -1,17 +1,47 @@
|
|||||||
const linki = [
|
const nawigacjaLinki = [
|
||||||
|
{ nazwa: "Tabele", link: "/tabele.html" },
|
||||||
|
{ nazwa: "Grafika", link: "/grafika.html" },
|
||||||
|
{ nazwa: "Witalnia", link: "/witalnia.php" },
|
||||||
|
{ nazwa: "Tabliczka", link: "/tabliczka.php" },
|
||||||
|
];
|
||||||
|
const stopkaLinki = [
|
||||||
[
|
[
|
||||||
|
"Główne linki",
|
||||||
{ nazwa: "Strona główna", link: "/index.html" },
|
{ nazwa: "Strona główna", link: "/index.html" },
|
||||||
{ nazwa: "Moje hobby", link: "/hobby.html" },
|
{ nazwa: "Moje hobby", link: "/hobby.html" },
|
||||||
{ nazwa: "Galeria", link: "/galeria.html" },
|
{ nazwa: "Galeria", link: "/galeria.html" },
|
||||||
{ nazwa: "Kontakt", link: "https://nonamesoft.xyz/about" },
|
{ nazwa: "Kontakt", link: "https://nonamesoft.xyz/about" },
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
"#FreeJavaScript",
|
||||||
{ nazwa: "JS. Podstawowe Zad.", link: "/js-podstawy.html" },
|
{ nazwa: "JS. Podstawowe Zad.", link: "/js-podstawy.html" },
|
||||||
{ nazwa: "JS. Zad. Warunkowe", link: "/js-warunkowe.html" },
|
{ nazwa: "JS. Zad. Warunkowe", link: "/js-warunkowe.html" },
|
||||||
|
{ nazwa: "JS. Funkcje", link: "/js-funkcje.html" },
|
||||||
|
{ nazwa: "JS. Zdarzenia", link: "/js-zdarzenia.html" },
|
||||||
|
{ nazwa: "JS. Pętle", link: "/js-petle.html" },
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"HTML",
|
||||||
|
{ nazwa: "Tabele", link: "/tabele.html" },
|
||||||
|
{ nazwa: "Grafika", link: "/grafika.html" },
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"PHP",
|
||||||
|
{ nazwa: "Witalnia", link: "/witalnia.php" },
|
||||||
|
{ nazwa: "Tabliczka", link: "/tabliczka.php" },
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"Wszystko",
|
||||||
{ nazwa: "Liczby", link: "/liczby.html" },
|
{ nazwa: "Liczby", link: "/liczby.html" },
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const stopkaObrazki = [
|
||||||
|
{ link: "/assets/images/960px-Neko_Wikipe-tan.png", autor: 'przez <a href="https://en.wikipedia.org/wiki/User:Kasuga~enwiki" title="Kasuga~enwiki">w:User:Kasuga~enwiki</a> <br> <span lang="pl">Praca własna</span>, <a href="http://creativecommons.org/licenses/by-sa/3.0/" title="Creative Commons Attribution-Share Alike 3.0">CC BY-SA 3.0</a>, <a href="https://commons.wikimedia.org/w/index.php?curid=2482629">Link</a>', alt: "Wikipe-tan, personifikacja Wikipedii, jako kotodziewczynka" },
|
||||||
|
{ link: "/assets/images/rurex.webp", alt: "Rurex. " },
|
||||||
|
{ link: "/assets/images/blahaj.png", alt: "Oficjalna grafika BLÅHAJa z Ikei ale w kiepskej rozdzielczości" },
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
class Header extends HTMLElement {
|
class Header extends HTMLElement {
|
||||||
constructor() {
|
constructor() {
|
||||||
@@ -19,14 +49,16 @@ class Header extends HTMLElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
connectedCallback() {
|
connectedCallback() {
|
||||||
|
const miesiac = new Date().getMonth();
|
||||||
this.innerHTML = `
|
this.innerHTML = `
|
||||||
<header>
|
<header>
|
||||||
|
${ miesiac < 2 || miesiac == 11 ? `<img src="/assets/images/snieg.png" id="snieg">` : "" }
|
||||||
<img src="/favicon.ico" width="64" height="64">
|
<img src="/favicon.ico" width="64" height="64">
|
||||||
<h1>MaszToZadanieDomowe.com</h1>
|
<h1>MaszToZadanieDomowe.com</h1>
|
||||||
<nav>
|
<nav>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="/index.html">Strona główna</a></li>
|
<li><a href="/index.html">Strona główna</a></li>
|
||||||
${linki[linki.length - 1].map(value => {
|
${nawigacjaLinki.map(value => {
|
||||||
return `<li><a href="${value.link}">${value.nazwa}</a></li>`
|
return `<li><a href="${value.link}">${value.nazwa}</a></li>`
|
||||||
}).join("")}
|
}).join("")}
|
||||||
</ul>
|
</ul>
|
||||||
@@ -43,13 +75,19 @@ class Footer extends HTMLElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
connectedCallback() {
|
connectedCallback() {
|
||||||
|
const obrazek = stopkaObrazki[Math.floor(Math.random() * stopkaObrazki.length)];
|
||||||
|
const miesiac = new Date().getMonth();
|
||||||
this.innerHTML = `
|
this.innerHTML = `
|
||||||
<footer>
|
<footer>
|
||||||
|
${ miesiac < 2 || miesiac == 11 ? `<img src="/assets/images/snieg.png" id="snieg">` : "" }
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div class="flex-row">
|
||||||
${linki.map(kategoria => {
|
${stopkaLinki.map(kategoria => {
|
||||||
return `<ul>
|
return `<ul>
|
||||||
${kategoria.map(value => {
|
${kategoria.map(value => {
|
||||||
|
if (typeof value == "string") {
|
||||||
|
return `<h5>${value}</h5>`;
|
||||||
|
}
|
||||||
return `<li><a href="${value.link}">${value.nazwa}</a></li>`
|
return `<li><a href="${value.link}">${value.nazwa}</a></li>`
|
||||||
}).join("")}
|
}).join("")}
|
||||||
</ul>`
|
</ul>`
|
||||||
@@ -57,9 +95,24 @@ class Footer extends HTMLElement {
|
|||||||
</div>
|
</div>
|
||||||
<strong>Strona © Dark Steveneq, 2025; Nazwę wymyślił Youpiter</strong> <sub>#GradientySąSuper</sub>
|
<strong>Strona © Dark Steveneq, 2025; Nazwę wymyślił Youpiter</strong> <sub>#GradientySąSuper</sub>
|
||||||
</div>
|
</div>
|
||||||
<img src="assets/images/blahaj.png" height="128">
|
<div id="extra" style="flex-grow: 0; flex-direction: row;">
|
||||||
|
<iframe
|
||||||
|
src="https://youads.nonamesoft.xyz/ads/site"
|
||||||
|
title="YouAds Ads Site"
|
||||||
|
height="150"
|
||||||
|
style="border: medium; max-width: 600px; width: 600px; height: 150px;"
|
||||||
|
loading="lazy"
|
||||||
|
>
|
||||||
|
</iframe>
|
||||||
|
<div class="flex-col">
|
||||||
|
<div class="flex-row-reverse">
|
||||||
|
<img src="${obrazek.link}" title="${obrazek.alt}" alt="${obrazek.alt}">
|
||||||
|
</div>
|
||||||
|
<p>${obrazek.autor ?? ""}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
customElements.define("footer-comp", Footer);
|
customElements.define("footer-comp", Footer);
|
||||||
|
|||||||
28
assets/js/zima.js
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
function dodajSnieg() {
|
||||||
|
const dziecko = document.querySelector("main");
|
||||||
|
const snieg = document.createElement("img");
|
||||||
|
snieg.id = "snieg";
|
||||||
|
snieg.src = "/assets/images/snieg.png";
|
||||||
|
dziecko.insertBefore(snieg, dziecko.firstChild);
|
||||||
|
|
||||||
|
// const sniezyca = document.createElement("canvas");
|
||||||
|
// sniezyca.id = "sniezyca";
|
||||||
|
// document.body.insertBefore(sniezyca, document.body.firstChild);
|
||||||
|
|
||||||
|
// const ctx2D = sniezyca.getContext("2d");
|
||||||
|
// sniezyca.imageSmoothingEnabled = false;
|
||||||
|
|
||||||
|
// var i = 0;
|
||||||
|
// function renderowanie() {
|
||||||
|
// ctx2D.
|
||||||
|
// i++;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
|
const miesiac = new Date().getMonth();
|
||||||
|
console.log(miesiac);
|
||||||
|
if (miesiac < 2 || miesiac == 11) {
|
||||||
|
dodajSnieg();
|
||||||
|
}
|
||||||
|
});
|
||||||
BIN
assets/sounds/barka.m4a
Normal file
BIN
dziennik/attention.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
1477
dziennik/editor_template.js
Normal file
78
dziennik/en.js
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
tinyMCE.addI18n("en.advanced", {
|
||||||
|
underline_desc: "Podkreślenie (Ctrl+U)", //"Podkreślenie (Ctrl+U)",
|
||||||
|
italic_desc: "Kursywa (Ctrl+I)", //"Italic (Ctrl+I)",
|
||||||
|
bold_desc: "Pogrubienie (Ctrl+B)", //"Bold (Ctrl+B)",
|
||||||
|
dd: "Opis definicji", //"Definition Description",
|
||||||
|
dt: "Termin definicji", //"Definition Term ",
|
||||||
|
samp: "Wycinek kodu", //"Code Sample",
|
||||||
|
code: "Kod", //"Code",
|
||||||
|
blockquote: "Blok cytatu", //"Block Quote",
|
||||||
|
h6: "Nagłówek 6", //"Heading 6",
|
||||||
|
h5: "Nagłówek 5", //"Heading 5",
|
||||||
|
h4: "Nagłówek 4", //"Heading 4",
|
||||||
|
h3: "Nagłówek 3", //"Heading 3",
|
||||||
|
h2: "Nagłówek 2", //"Heading 2",
|
||||||
|
h1: "Nagłówek 1", //"Heading 1",
|
||||||
|
pre: "Uprzednio sformatowany", //"Preformatted",
|
||||||
|
address: "Adres", //"Address",
|
||||||
|
div: "DIV", //"DIV",
|
||||||
|
paragraph: "Paragraf", //"Paragraph",
|
||||||
|
block: "Format", //"Format",
|
||||||
|
fontdefault: "Czcionka", //"Font Family",
|
||||||
|
font_size: "Rozmiar czcionki", //"Font Size",
|
||||||
|
style_select: "Style", //"Styles",
|
||||||
|
anchor_delta_height: "", //"",
|
||||||
|
anchor_delta_width: "", //"",
|
||||||
|
charmap_delta_height: "", //"",
|
||||||
|
charmap_delta_width: "", //"",
|
||||||
|
colorpicker_delta_height: "", //"",
|
||||||
|
colorpicker_delta_width: "", //"",
|
||||||
|
link_delta_height: "", //"",
|
||||||
|
link_delta_width: "", //"",
|
||||||
|
image_delta_height: "", //"",
|
||||||
|
image_delta_width: "", //"",
|
||||||
|
more_colors: "Więcej Kolorów", //"More Colors...",
|
||||||
|
toolbar_focus:
|
||||||
|
"Przeskocz do przycisków narzędzi - Alt+Q, Przeskocz do edytora - Alt-Z, Przeskocz do ścieżki elementów - Alt+X", //"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",
|
||||||
|
newdocument: "Czy jesteś pewny że chcesz wyczyścić całą zawartość", //"Are you sure you want clear all contents?",
|
||||||
|
path: "Ścieżka", //"Path",
|
||||||
|
clipboard_msg:
|
||||||
|
"Kopiuj/wytnij/wklej nie jest dostępne w Mozilli i Firefoxie. Czy chcesz więcej informacji na temat tego problemu?", //"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?",
|
||||||
|
blockquote_desc: "Blok cytatu", //"Block Quote",
|
||||||
|
help_desc: "Pomoc", //"Help",
|
||||||
|
newdocument_desc: "Nowy dokument", //"New Document",
|
||||||
|
image_props_desc: "Parametry obrazka", //"Image Properties",
|
||||||
|
paste_desc: "Wklej (Ctrl+V)", //"Paste (Ctrl+V)",
|
||||||
|
copy_desc: "Kopiuj (Ctrl+C)", //"Copy (Ctrl+C)",
|
||||||
|
cut_desc: "Wytnij (Ctrl+X)", //"Cut (Ctrl+X)",
|
||||||
|
anchor_desc: "Wstaw/edytuj zakotwiczenie", //"Insert/Edit Anchor",
|
||||||
|
visualaid_desc: "Pokaż/ukryj wskazówki/niewidoczne elementy", //"show/Hide Guidelines/Invisible Elements",
|
||||||
|
charmap_desc: "Wstaw znak specjalny", //"Insert Special Character",
|
||||||
|
backcolor_desc: "Wybierz kolor tła", //"Select Background Color",
|
||||||
|
forecolor_desc: "Wybierz kolor tekstu", //"Select Text Color",
|
||||||
|
custom1_desc: "Twój własny opis tutaj", //"Your Custom Description Here",
|
||||||
|
removeformat_desc: "Usuń formatowanie", //"Remove Formatting",
|
||||||
|
hr_desc: "Dodaj linię poziomą", //"Insert Horizontal Line",
|
||||||
|
sup_desc: "Indeks górny", //"Superscript",
|
||||||
|
sub_desc: "Indeks dolny", //"Subscript",
|
||||||
|
code_desc: "Edytuj HTML", //"Edit HTML Source",
|
||||||
|
cleanup_desc: "Wyczyść brudny kod", //"Cleanup Messy Code",
|
||||||
|
image_desc: "Wstaw/edytuj obraz", //"Insert/Edit Image",
|
||||||
|
unlink_desc: "Odlinkuj", //"Unlink",
|
||||||
|
link_desc: "Wstaw/edytuj odnośnik", //"Insert/Edit Link",
|
||||||
|
redo_desc: "Powtórz (Ctrl+Y)", //"Redo (Ctrl+Y)",
|
||||||
|
undo_desc: "Cofnij (Ctrl+Z)", //"Undo (Ctrl+Z)",
|
||||||
|
indent_desc: "Zwiększ wcięcie", //"Increase Indent",
|
||||||
|
outdent_desc: "Zmniejsz wcięcie", //"Decrease Indent",
|
||||||
|
numlist_desc: "Wstaw/usuń listę numerowaną", //"Insert/Remove Numbered List",
|
||||||
|
bullist_desc: "Wstaw/usuń listę punktowaną", //"Insert/Remove Bulleted List",
|
||||||
|
justifyfull_desc: "Justowanie", //"Align Full",
|
||||||
|
justifyright_desc: "Wyrównanie do prawej", //"Align Right",
|
||||||
|
justifycenter_desc: "Wyśrodkowanie", //"Align Center",
|
||||||
|
justifyleft_desc: "Wyrównanie do lewej", //"Align Left",
|
||||||
|
striketrough_desc: "Przekreślenie", //"Strikethrough",
|
||||||
|
help_shortcut: "Naciśnij Alt-F10 po pasek narzędzi. Naciśnij ALT-0 po pomoc", //"Press ALT-F10 for toolbar. Press ALT-0 for help",
|
||||||
|
rich_text_area: "Strefa tekstu formatowanego", //"Rich Text Area",
|
||||||
|
shortcuts_desc: "Pomoc ułatwiania dostępu", //"Accessability Help",
|
||||||
|
toolbar: "Pasek narzędzi", //"Toolbar",
|
||||||
|
});
|
||||||
BIN
dziennik/gray.gif
Normal file
|
After Width: | Height: | Size: 821 B |
BIN
dziennik/icons.gif
Normal file
|
After Width: | Height: | Size: 12 KiB |
934
dziennik/index.php
Normal file
@@ -0,0 +1,934 @@
|
|||||||
|
<?php
|
||||||
|
function ip() {
|
||||||
|
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
|
||||||
|
$ip = $_SERVER['HTTP_CLIENT_IP'];
|
||||||
|
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
|
||||||
|
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||||
|
} else {
|
||||||
|
$ip = $_SERVER['REMOTE_ADDR'];
|
||||||
|
}
|
||||||
|
return $ip;
|
||||||
|
}
|
||||||
|
|
||||||
|
function nazwa() {
|
||||||
|
if (isset($_COOKIE["nazwa"])) {
|
||||||
|
$nazwa = htmlspecialchars($_COOKIE["nazwa"]);
|
||||||
|
} else {
|
||||||
|
$nazwa = "anon";
|
||||||
|
}
|
||||||
|
return $nazwa;
|
||||||
|
}
|
||||||
|
|
||||||
|
setlocale(LC_ALL, 'pl_PL');
|
||||||
|
date_default_timezone_set("Europe/Warsaw");
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Language" content="pl" />
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta http-equiv="Window-target" content="_top" />
|
||||||
|
<title>MaszTenPseudoDziennikDomowy.com</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||||
|
<script src="jquery-2.2.1.min.js?jsv=2" type="text/javascript"></script>
|
||||||
|
<script src="jquery-migrate.min.js?jsv=2"></script>
|
||||||
|
<script
|
||||||
|
src="jquery.form.js?jsv=2"
|
||||||
|
type="text/javascript"
|
||||||
|
></script>
|
||||||
|
<script
|
||||||
|
src="jquery.checkbox.js?jsv=2"
|
||||||
|
type="text/javascript"
|
||||||
|
></script>
|
||||||
|
<script
|
||||||
|
src="jquery.mask.min.js?jsv=2"
|
||||||
|
type="text/javascript"
|
||||||
|
></script>
|
||||||
|
<script
|
||||||
|
type="text/javascript"
|
||||||
|
src="jquery-ui-1.10.3.custom.min.js?jsv=2"
|
||||||
|
></script>
|
||||||
|
<script
|
||||||
|
type="text/javascript"
|
||||||
|
src="jquery.ui.datepicker-pl.js?jsv=2"
|
||||||
|
></script>
|
||||||
|
<script
|
||||||
|
src="jquery.tipsy.js?jsv=2"
|
||||||
|
type="text/javascript"
|
||||||
|
></script>
|
||||||
|
<script
|
||||||
|
src="skrypty_funkcje.js?ver=19.1&jsv=2"
|
||||||
|
type="text/javascript"
|
||||||
|
></script>
|
||||||
|
<script
|
||||||
|
src="skrypty.js?ver=19.1&jsv=2"
|
||||||
|
type="text/javascript"
|
||||||
|
></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body contextmenu="body_right_click_menu">
|
||||||
|
<a href="#tresc" class="sr-only">Przejdź do treści</a>
|
||||||
|
<!-- TOP -->
|
||||||
|
<div id="top_green">
|
||||||
|
<div class="width1000">
|
||||||
|
<div class="logo">
|
||||||
|
<h1>
|
||||||
|
<img src="/favicon.ico" width="32" height="32" style="position:relative;float: left;">
|
||||||
|
Mas<span style="color: yellow">z</span>TenPseudoDzi<span
|
||||||
|
style="color: yellow"
|
||||||
|
>e</span
|
||||||
|
>nnikDomowy.com
|
||||||
|
<small>
|
||||||
|
<a
|
||||||
|
class="historia"
|
||||||
|
href="https://www.mobidziennik.pl/historia-zmian"
|
||||||
|
title="Historia Zmian"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
powstały na bazie ver. 19.1</a
|
||||||
|
>
|
||||||
|
|
||||||
|
<span class="top-archiwum">
|
||||||
|
PODRÓBKA
|
||||||
|
</span>
|
||||||
|
</small>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<div class="headerprawo">
|
||||||
|
<a
|
||||||
|
id="menu10"
|
||||||
|
|
||||||
|
title="Przegląd instrukcji dziennika (dostępna również po wciśnięciu klawisza F2)"
|
||||||
|
>Instrukcje</a
|
||||||
|
>
|
||||||
|
<a
|
||||||
|
id="menu7"
|
||||||
|
|
||||||
|
>Powiadomienia</a
|
||||||
|
>
|
||||||
|
|
||||||
|
<span id="wyloguj_box" tabindex="0" title="Furas">
|
||||||
|
<span id="rola">
|
||||||
|
Uczeń
|
||||||
|
<b class="arrow_down"></b>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<div id="profil_box">
|
||||||
|
<ul>
|
||||||
|
<li class="li_no_hover">
|
||||||
|
<strong><?php echo(nazwa()); ?></strong>
|
||||||
|
<small class="szary2">
|
||||||
|
<br />
|
||||||
|
<?php echo(nazwa()); ?>
|
||||||
|
</small>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
|
||||||
|
title="Przeglądaj archiwalne dzienniki"
|
||||||
|
>Poprzednie lata</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
|
||||||
|
title="Przegląd i zarządzanie kontem"
|
||||||
|
>Moje konto</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
href="/"
|
||||||
|
title="Wyloguj się z systemu"
|
||||||
|
id="wyloguj"
|
||||||
|
>Wyloguj</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
#wyloguj_box {
|
||||||
|
color: #fff;
|
||||||
|
font-size: 10pt;
|
||||||
|
margin-right: 15px;
|
||||||
|
text-shadow: 1px 1px 0px #222;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
/*#wyloguj_box:hover #rola {
|
||||||
|
background:#fff;
|
||||||
|
}*/
|
||||||
|
#profil_box {
|
||||||
|
position: absolute;
|
||||||
|
background: #1783db;
|
||||||
|
/* border:Solid 1px #1783DB; */
|
||||||
|
z-index: 99999999999999999999999 !important;
|
||||||
|
/*box-shadow: 0 2px 10px rgba(0,0,0,.2);*/
|
||||||
|
text-align: left;
|
||||||
|
top: 50px;
|
||||||
|
box-shadow: rgba(0, 0, 0, 0.35) 0px 2px 5px;
|
||||||
|
transition:
|
||||||
|
visibility 0.1s linear,
|
||||||
|
opacity 0.1s linear;
|
||||||
|
visibility: hidden;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
#profil_box ul {
|
||||||
|
list-style-type: none;
|
||||||
|
text-shadow: none;
|
||||||
|
color: #fff;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
#profil_box ul li {
|
||||||
|
border-bottom: Solid 1px #1a90f1;
|
||||||
|
}
|
||||||
|
#profil_box ul li.przelacz_konto {
|
||||||
|
padding-left: 30px;
|
||||||
|
}
|
||||||
|
.li_no_hover {
|
||||||
|
padding: 10px 17px;
|
||||||
|
cursor: default;
|
||||||
|
background: #1577c1;
|
||||||
|
}
|
||||||
|
#profil_box ul li:not(.li_no_hover):hover {
|
||||||
|
-webkit-transition: all 0.2s;
|
||||||
|
transition: all 0.2s;
|
||||||
|
background-color: #186eb3;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
#profil_box a {
|
||||||
|
text-shadow: none;
|
||||||
|
color: #fff;
|
||||||
|
display: block;
|
||||||
|
text-decoration: none;
|
||||||
|
padding: 10px 17px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
#profil_box a:hover,
|
||||||
|
#profil_box a:hover > * {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.szary2 {
|
||||||
|
color: #e6e6e6;
|
||||||
|
}
|
||||||
|
.arrow_down {
|
||||||
|
display: inline-block;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
margin-left: 2px;
|
||||||
|
vertical-align: middle;
|
||||||
|
border-top: 4px dashed;
|
||||||
|
border-right: 4px solid transparent;
|
||||||
|
border-left: 4px solid transparent;
|
||||||
|
}
|
||||||
|
#profil_box ul li.edytuj_wyloguj {
|
||||||
|
float: left;
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function () {
|
||||||
|
var wyloguj = $("#wyloguj_box");
|
||||||
|
var profil_box = $("#profil_box");
|
||||||
|
|
||||||
|
$(window).resize(function () {
|
||||||
|
profil_box.css(
|
||||||
|
"left",
|
||||||
|
wyloguj.offset().left + wyloguj.width() - profil_box.width(),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
$(window).resize();
|
||||||
|
|
||||||
|
var profil_box_interval;
|
||||||
|
|
||||||
|
var wylogujOn = function () {
|
||||||
|
if (profil_box_interval != undefined) {
|
||||||
|
clearTimeout(profil_box_interval);
|
||||||
|
}
|
||||||
|
profil_box.css("visibility", "visible").css("opacity", "1");
|
||||||
|
};
|
||||||
|
|
||||||
|
var wylogujOff = function () {
|
||||||
|
profil_box_interval = setTimeout(function () {
|
||||||
|
profil_box.css("visibility", "hidden").css("opacity", "0");
|
||||||
|
}, 500);
|
||||||
|
};
|
||||||
|
|
||||||
|
wyloguj.mouseenter(wylogujOn).focusin(wylogujOn);
|
||||||
|
wyloguj.mouseleave(wylogujOff).focusout(wylogujOff);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<a
|
||||||
|
style="margin-left: 10px; position: relative"
|
||||||
|
href=""
|
||||||
|
title="Przejście do wersji mobilnej systemu"
|
||||||
|
><img
|
||||||
|
src="mobilna.png"
|
||||||
|
alt="Przejście do wersji mobilnej systemu"
|
||||||
|
style="position: absolute; left: -25px; top: -15px; height: 49px"
|
||||||
|
/></a>
|
||||||
|
</div>
|
||||||
|
<div class="cleft"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="menu_gray">
|
||||||
|
<div class="width1000">
|
||||||
|
<!-- MENU START -->
|
||||||
|
<ul class="dropdown dropdown-horizontal">
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
id="menu15"
|
||||||
|
|
||||||
|
>Historia</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
id="menu1"
|
||||||
|
|
||||||
|
>Wiadomości <span class="powiadomienie_menu">100</span></a
|
||||||
|
>
|
||||||
|
<ul>
|
||||||
|
<li class="first">
|
||||||
|
<a
|
||||||
|
class="dir"
|
||||||
|
|
||||||
|
id="menu81"
|
||||||
|
>Foldery</a
|
||||||
|
>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
id="menu19"
|
||||||
|
|
||||||
|
>Nowy folder</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
id="menu18"
|
||||||
|
|
||||||
|
>Nowa wiadomość</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
id="menu20"
|
||||||
|
|
||||||
|
>Wiadomości wysłane</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
id="menu24"
|
||||||
|
|
||||||
|
>Oświadczenia</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
id="menu22"
|
||||||
|
|
||||||
|
>Komunikaty</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
id="menu23"
|
||||||
|
|
||||||
|
>Biblioteka</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
id="menu2"
|
||||||
|
>Plan lekcji</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
id="menu16"
|
||||||
|
|
||||||
|
>Zastępstwa</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
id="menu3"
|
||||||
|
|
||||||
|
>Oceny</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
id="menu4"
|
||||||
|
|
||||||
|
>Zachowanie</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
id="menu5"
|
||||||
|
|
||||||
|
>Frekwencja</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
id="menu13"
|
||||||
|
|
||||||
|
>Zadania<span class="powiadomienie_menu" style="">999</span></a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
id="menu9"
|
||||||
|
|
||||||
|
>Sprawdziany<span class="powiadomienie_menu" style="">999</span></a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
id="menu11"
|
||||||
|
|
||||||
|
>Kalendarz<span class="powiadomienie_menu" style="">999</span></a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
id="menu21"
|
||||||
|
|
||||||
|
>Pliki<span class="powiadomienie_menu" style="">999</span></a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="cleft"></div>
|
||||||
|
<!-- MENU STOP -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- CONTENT -->
|
||||||
|
<div id="content">
|
||||||
|
<a name="tresc"></a>
|
||||||
|
<div class="fright">
|
||||||
|
<a
|
||||||
|
class="button"
|
||||||
|
id="wczytaj_z_kopii"
|
||||||
|
href="#"
|
||||||
|
title="Wczytaj temat i treść z kopii roboczych"
|
||||||
|
>Wczytaj z kopii roboczych</a
|
||||||
|
>
|
||||||
|
<a
|
||||||
|
class="button"
|
||||||
|
|
||||||
|
title="Skrzynka odbiorcza"
|
||||||
|
>Wiadomości</a
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<h1>Nowa wiadomość</h1>
|
||||||
|
<form id="f" method="post">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td height="77" colspan="2" style="position: relative">
|
||||||
|
<b>Wybrani odbiorcy</b>
|
||||||
|
<a
|
||||||
|
href="#"
|
||||||
|
id="skasuj_odbiorcow"
|
||||||
|
class="button_right"
|
||||||
|
style="margin: -6px 0 0 0; visibility: hidden"
|
||||||
|
title="Skasuj wszystkich wybranych odbiorców"
|
||||||
|
>skasuj wszystkich wybranych odbiorców</a
|
||||||
|
>
|
||||||
|
<div id="wiadomosci_wybrani_odbiorcy"></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="width: 525px; padding-bottom: 5px">
|
||||||
|
<b>Temat:</b>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
style="width: 473px; float: right; margin: -3px 24px 0 0"
|
||||||
|
name="nazwa"
|
||||||
|
maxlength="100"
|
||||||
|
value=""
|
||||||
|
/>
|
||||||
|
</td>
|
||||||
|
<td style="width: 418px; padding-bottom: 5px">
|
||||||
|
<div style="margin-top: 5px; float: left; font-weight: bold">
|
||||||
|
Grupy odbiorców
|
||||||
|
</div>
|
||||||
|
<select name="typodbiorcow" style="float: right; width: 320px">
|
||||||
|
<option value=""></option>
|
||||||
|
<option value="1">Webmaster</option>
|
||||||
|
<option value="2">Pomysłotwórca</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<textarea
|
||||||
|
id="tresc"
|
||||||
|
name="tresc"
|
||||||
|
style="height: 450px; width: 532px"
|
||||||
|
></textarea>
|
||||||
|
</td>
|
||||||
|
<td valign="top">
|
||||||
|
<div id="wiadomosci_odbiorcy"></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"><hr /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" colspan="2">
|
||||||
|
<input type="submit" value="Wyślij wiadomość" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<script
|
||||||
|
type="text/javascript"
|
||||||
|
src="tiny_mce.js?jsv=2"
|
||||||
|
></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function () {
|
||||||
|
$("a#menu1, a#menu18").addClass("current");
|
||||||
|
|
||||||
|
$(".checkbox").checkbox();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
window.onbeforeunload = function () {
|
||||||
|
var tresc = tinyMCE.get("tresc").getContent();
|
||||||
|
if (tresc != "") {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
tinyMCE.init({
|
||||||
|
mode: "textareas",
|
||||||
|
theme: "advanced",
|
||||||
|
theme_advanced_buttons1:
|
||||||
|
"bold,italic,underline,strikethrough,|,bullist,numlist,|,sub,sup,|,forecolor,backcolor,|,undo,redo",
|
||||||
|
|
||||||
|
theme_advanced_buttons2: "",
|
||||||
|
theme_advanced_buttons3: "",
|
||||||
|
theme_advanced_buttons4: "",
|
||||||
|
theme_advanced_toolbar_location: "top",
|
||||||
|
theme_advanced_toolbar_align: "left",
|
||||||
|
theme_advanced_statusbar_location: "none",
|
||||||
|
|
||||||
|
gecko_spellcheck: true,
|
||||||
|
onchange_callback: "extSession",
|
||||||
|
setup: function (editor) {
|
||||||
|
editor.onKeyDown.add(function () {
|
||||||
|
extendSession = 1;
|
||||||
|
});
|
||||||
|
|
||||||
|
editor.onPaste.add(function (editor, e) {
|
||||||
|
e.preventDefault();
|
||||||
|
var data =
|
||||||
|
(e.originalEvent || e).clipboardData || window.clipboardData;
|
||||||
|
var content = data.getData("text/html");
|
||||||
|
if (!content) {
|
||||||
|
content = data
|
||||||
|
.getData("text")
|
||||||
|
.replace(/\n/gmu, "<br />")
|
||||||
|
.replace(/ /gmu, " ");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (content.length) {
|
||||||
|
content = $("<div />").html(content);
|
||||||
|
content.find('*[style*="background-color"]').each(function () {
|
||||||
|
if (
|
||||||
|
$(this).css("background-color") === "rgb(255, 255, 255)"
|
||||||
|
) {
|
||||||
|
$(this).css("background-color", "transparent");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
content.find("a[href]").each(function () {
|
||||||
|
$(this).replaceWith(
|
||||||
|
"<span>" + $(this).attr("href") + "</span>",
|
||||||
|
);
|
||||||
|
});
|
||||||
|
content.find("img").remove();
|
||||||
|
editor.execCommand("mceInsertContent", false, content.html());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// wybór rodzaju odbiorców i wczytanie listy
|
||||||
|
$("select[name=typodbiorcow]").change(function () {
|
||||||
|
var typ = $(this).val();
|
||||||
|
if (!typ.length) {
|
||||||
|
$("div.odbiorcy_lista").hide();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var odbiorcy_div = $("div#wiadomosci_odbiorcy");
|
||||||
|
var odbiorcy_div_id =
|
||||||
|
"odbiorcy_lista" +
|
||||||
|
(isNaN(typ) ? typ.replace(/[^A-Za-z0-9]+/g, "") : typ);
|
||||||
|
if (odbiorcy_div.find("div#" + odbiorcy_div_id).get(0) == undefined) {
|
||||||
|
odbiorcy_div.append(
|
||||||
|
'<div class="odbiorcy_lista" id="' + odbiorcy_div_id + '"></div>',
|
||||||
|
);
|
||||||
|
$.post(
|
||||||
|
"odbiorcyWiadomosci.php",
|
||||||
|
{ typ: typ, odpowiedz: 0, wiadomosci: true },
|
||||||
|
function (data) {
|
||||||
|
var div = $("div#" + odbiorcy_div_id);
|
||||||
|
div.html(data);
|
||||||
|
if (div.find("label.label1").get(0) != undefined) {
|
||||||
|
div.prepend(
|
||||||
|
'<a class="zmien_zaznaczenia wiadomosci_zmien_zaznaczenia_wszystkie" href="#">zaznacz/odznacz wszystkich w bieżącej grupie odbiorców</a>',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
var ileGrup = div.find(
|
||||||
|
"div.wiadomosci_odbiorcy_klasa_naglowek",
|
||||||
|
).length;
|
||||||
|
div
|
||||||
|
.find("div.wiadomosci_odbiorcy_klasa_naglowek")
|
||||||
|
.each(function () {
|
||||||
|
var klasa = $(this).attr("data-klasa");
|
||||||
|
var cnt = div.find(
|
||||||
|
'.wiadomosci_odbiorcy_klasa_cnt[data-klasa="' +
|
||||||
|
klasa +
|
||||||
|
'"]',
|
||||||
|
);
|
||||||
|
if (!cnt.children("label").length) {
|
||||||
|
$(this).remove();
|
||||||
|
cnt.remove();
|
||||||
|
} else if (
|
||||||
|
cnt.find('input[name*="odbiorcy"]:checked').length ||
|
||||||
|
ileGrup === 1
|
||||||
|
) {
|
||||||
|
$(this)
|
||||||
|
.addClass("rozwiniete")
|
||||||
|
.attr("title", "Zwiń listę kont");
|
||||||
|
cnt.css("display", "block");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if ($.trim(div.html()) == "") {
|
||||||
|
div.html(
|
||||||
|
'<div style="font-weight:bold; padding:10px;">Brak pasujących kont lub opcja została wyłączona<br/>przez dyrekcję.</div>',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
odswiezOdbiorcow();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$("div.odbiorcy_lista").hide();
|
||||||
|
$("div#" + odbiorcy_div_id).show();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
//$("select[name=typodbiorcow]").find('option[value=2]').attr('selected','selected');
|
||||||
|
|
||||||
|
// $("select[name=typodbiorcow]").change();
|
||||||
|
|
||||||
|
// odswiezanie listy odbiorcow wiadomosci (wyswietlanie imion i nazwisk)
|
||||||
|
function odswiezOdbiorcow() {
|
||||||
|
var odbiorcy_div = $("#wiadomosci_wybrani_odbiorcy");
|
||||||
|
//var odbiorcy_html = odbiorcy_div.html();
|
||||||
|
var wybrani = $("input[name*=odbiorcy]:checked");
|
||||||
|
var skasuj_odbiorcow = $("#skasuj_odbiorcow");
|
||||||
|
|
||||||
|
if (skasuj_odbiorcow.get(0) == undefined) {
|
||||||
|
skasuj_odbiorcow = $("#skasuj_odbiorcow");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (wybrani.length == 0) {
|
||||||
|
odbiorcy_div.html(
|
||||||
|
'<img src="attention.png" alt="" style="width:20px; height:20px;position:relative;top:4px;"> Nie wybrano żadnego odbiorcy',
|
||||||
|
);
|
||||||
|
skasuj_odbiorcow.css("visibility", "hidden");
|
||||||
|
$("input[type=submit]").val("Wyślij wiadomość");
|
||||||
|
} else {
|
||||||
|
var odbiorcy = [];
|
||||||
|
var odbiorcyID = [];
|
||||||
|
wybrani.each(function () {
|
||||||
|
var odbiorca = $.trim(
|
||||||
|
$(this).parent().children(".nazwa-uzytkownika").text(),
|
||||||
|
);
|
||||||
|
var idOdbiorcy = $(this).val();
|
||||||
|
if (jQuery.inArray(idOdbiorcy, odbiorcyID) == -1) {
|
||||||
|
odbiorcyID.push(idOdbiorcy);
|
||||||
|
odbiorcy.push(odbiorca);
|
||||||
|
$(
|
||||||
|
'input[name="odbiorcy[]"][value="' +
|
||||||
|
idOdbiorcy +
|
||||||
|
'"]:not(:checked)',
|
||||||
|
).prop("checked", true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
odbiorcy_div.html(odbiorcy.join(", "));
|
||||||
|
skasuj_odbiorcow.css("visibility", "visible");
|
||||||
|
$("input[type=submit]").val(
|
||||||
|
"Wyślij wiadomość do " +
|
||||||
|
(odbiorcy.length == 1
|
||||||
|
? "1 odbiorcy"
|
||||||
|
: odbiorcy.length + " odbiorców"),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
sprawdzenieZaznaczenNaglowkowKlas();
|
||||||
|
}
|
||||||
|
//setInterval(odswiezOdbiorcow,1000);
|
||||||
|
|
||||||
|
$("body").on("click", "#skasuj_odbiorcow", function () {
|
||||||
|
if (confirm("Wyczyścić listę odbiorców?")) {
|
||||||
|
$("input[name*=odbiorcy]:checked").prop("checked", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
odswiezOdbiorcow();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
var rozwinZwinKlaseOdbiorcow = function (ths) {
|
||||||
|
var klasa = ths.attr("data-klasa");
|
||||||
|
var cnt = ths
|
||||||
|
.parent()
|
||||||
|
.find('.wiadomosci_odbiorcy_klasa_cnt[data-klasa="' + klasa + '"]');
|
||||||
|
|
||||||
|
if (cnt.is(":visible")) {
|
||||||
|
ths.removeClass("rozwiniete").attr("title", "Rozwiń listę kont");
|
||||||
|
cnt.stop(true, true).slideUp("fast");
|
||||||
|
ths.children(".wiadomosci_zmien_zaznacz_klasa").fadeOut("fast");
|
||||||
|
} else {
|
||||||
|
ths.addClass("rozwiniete").attr("title", "Zwiń listę kont");
|
||||||
|
cnt.stop(true, true).slideDown("fast");
|
||||||
|
ths.children(".wiadomosci_zmien_zaznacz_klasa").fadeIn("fast");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// rozwijanie listy danej klasy
|
||||||
|
$("body").on(
|
||||||
|
"click",
|
||||||
|
".wiadomosci_odbiorcy_klasa_naglowek",
|
||||||
|
function () {
|
||||||
|
rozwinZwinKlaseOdbiorcow($(this));
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
$("body").on(
|
||||||
|
"keydown",
|
||||||
|
".wiadomosci_odbiorcy_klasa_naglowek",
|
||||||
|
function (ev) {
|
||||||
|
if (ev.keyCode == 32) {
|
||||||
|
rozwinZwinKlaseOdbiorcow($(this));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
// sprawdzanie czy naglowek klasy powinien byc zaznaczony, czy nie
|
||||||
|
function sprawdzenieZaznaczenNaglowkowKlas() {
|
||||||
|
$(".wiadomosci_odbiorcy_klasa_naglowek").each(function () {
|
||||||
|
var klasa = $(this).attr("data-klasa");
|
||||||
|
var cnt = $(this)
|
||||||
|
.parent()
|
||||||
|
.find(
|
||||||
|
'.wiadomosci_odbiorcy_klasa_cnt[data-klasa="' + klasa + '"]',
|
||||||
|
);
|
||||||
|
var check = cnt.find("input:not(:checked)").length ? false : true;
|
||||||
|
|
||||||
|
$(this).children("input").prop("checked", check);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// zaznaczanie pojedynczego odbiorcy
|
||||||
|
$("body").on("click", "input[name*=odbiorcy]", function () {
|
||||||
|
var pola = $(
|
||||||
|
"input[name*=odbiorcy][value=" + $(this).attr("value") + "]",
|
||||||
|
);
|
||||||
|
|
||||||
|
pola.prop("checked", $(this).is(":checked"));
|
||||||
|
|
||||||
|
sprawdzenieZaznaczenNaglowkowKlas();
|
||||||
|
|
||||||
|
odswiezOdbiorcow();
|
||||||
|
});
|
||||||
|
|
||||||
|
// zaznaczanie wszystkich odbiorców z danej klasy
|
||||||
|
$("body").on(
|
||||||
|
"click",
|
||||||
|
".wiadomosci_odbiorcy_klasa_naglowek input",
|
||||||
|
function (e) {
|
||||||
|
var klasa = $(this).parent().attr("data-klasa");
|
||||||
|
var cnt = $(this)
|
||||||
|
.parent()
|
||||||
|
.parent()
|
||||||
|
.find(
|
||||||
|
'.wiadomosci_odbiorcy_klasa_cnt[data-klasa="' + klasa + '"]',
|
||||||
|
);
|
||||||
|
|
||||||
|
var checked = $(this).is(":checked");
|
||||||
|
cnt.find("input").each(function () {
|
||||||
|
$(
|
||||||
|
"input[name*=odbiorcy][value=" + $(this).attr("value") + "]",
|
||||||
|
).prop("checked", checked);
|
||||||
|
});
|
||||||
|
|
||||||
|
sprawdzenieZaznaczenNaglowkowKlas();
|
||||||
|
|
||||||
|
odswiezOdbiorcow();
|
||||||
|
|
||||||
|
e.stopPropagation();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
odswiezOdbiorcow();
|
||||||
|
|
||||||
|
// zaznaczanie wszystkich odbiorcow z biezacej listy
|
||||||
|
var confirmZmienZaznaczeniaWszystkie = false;
|
||||||
|
$("body").on(
|
||||||
|
"click",
|
||||||
|
".wiadomosci_zmien_zaznaczenia_wszystkie",
|
||||||
|
function () {
|
||||||
|
if (
|
||||||
|
confirmZmienZaznaczeniaWszystkie ||
|
||||||
|
confirm(
|
||||||
|
"Czy na pewno chcesz zaznaczyć/odznaczyć wszystkich w bieżącej grupie odbiorców?",
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
confirmZmienZaznaczeniaWszystkie = true;
|
||||||
|
var cnt = $(this).parent();
|
||||||
|
|
||||||
|
var state = cnt.find("input:not(:checked)").length ? true : false;
|
||||||
|
|
||||||
|
var users = new Array();
|
||||||
|
cnt.find("input").each(function () {
|
||||||
|
if (users.indexOf($(this).attr("value")) != -1) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
users.push($(this).attr("value"));
|
||||||
|
$(
|
||||||
|
"input[name*=odbiorcy][value=" + $(this).attr("value") + "]",
|
||||||
|
).prop("checked", state);
|
||||||
|
});
|
||||||
|
|
||||||
|
odswiezOdbiorcow();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
// automatyczny zapis wiadomości co 15 sek
|
||||||
|
var autosave = setInterval(function () {
|
||||||
|
var tresc = tinyMCE.get("tresc").getContent();
|
||||||
|
if (!tresc.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$.post("autosave.php", {
|
||||||
|
nazwa: $("input[name=nazwa]").val(),
|
||||||
|
tresc: tresc,
|
||||||
|
});
|
||||||
|
}, 15000);
|
||||||
|
|
||||||
|
// wczytywanie wiadomosci z kopii
|
||||||
|
$("#wczytaj_z_kopii").click(function () {
|
||||||
|
$.post(
|
||||||
|
"wiadomoscikopierobocze.php",
|
||||||
|
function (data) {
|
||||||
|
oknoDynamiczne(data);
|
||||||
|
$("div.podswietl").first().focus();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
// walidacja i wysylka formularza
|
||||||
|
$("form#f").submit(function () {
|
||||||
|
var nazwa = $("input[name=nazwa]").val();
|
||||||
|
var tresc = tinyMCE.get("tresc").getContent();
|
||||||
|
var info = "";
|
||||||
|
if (nazwa == "") {
|
||||||
|
info += "Proszę podać temat wiadomości\n";
|
||||||
|
}
|
||||||
|
if (tresc == "") {
|
||||||
|
info += "Proszę podać treść wiadomości\n";
|
||||||
|
}
|
||||||
|
if ($("input[name*=odbiorcy]").is(":checked") == false) {
|
||||||
|
info += "Prosze wybrać przynajmniej jednego odbiorce";
|
||||||
|
}
|
||||||
|
if (info != "") {
|
||||||
|
alert("Pojawiły się następujące problemy:\n" + info);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
window.onbeforeunload = function () {};
|
||||||
|
przerwij_sprawdzanie_logowania = true;
|
||||||
|
clearInterval(autosave);
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- BOTTOM -->
|
||||||
|
<div id="bottom">
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
float: left;
|
||||||
|
text-align: left;
|
||||||
|
width: 796px;
|
||||||
|
font-size: 8pt;
|
||||||
|
font-family: Tahoma;
|
||||||
|
color: #000;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
Jesteś zalogowany jako <strong><?php echo(nazwa()); ?></strong>. Ostatnie
|
||||||
|
logowanie:
|
||||||
|
<i><?php echo(date("l, d F Y\, \g\o\d\z\i\\n\a H:i:s"));?> z <?php echo(ip()); ?></i> |
|
||||||
|
<a
|
||||||
|
class="moje_logowania"
|
||||||
|
|
||||||
|
title="Historia logowań"
|
||||||
|
>moje logowania</a
|
||||||
|
>
|
||||||
|
|
|
||||||
|
<a
|
||||||
|
class="moje_logowania"
|
||||||
|
|
||||||
|
title="Mapa strony"
|
||||||
|
>mapa strony</a
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
float: left;
|
||||||
|
text-align: right;
|
||||||
|
width: 204px;
|
||||||
|
font-family: Tahoma;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 8pt;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
mobiDziennik © 2009 - 2026
|
||||||
|
<a
|
||||||
|
class="copyrights"
|
||||||
|
href="http://www.oswiata.wizja.net"
|
||||||
|
title="Strona Internetowa - WizjaNET"
|
||||||
|
target="_blank"
|
||||||
|
>WizjaNet</a
|
||||||
|
>
|
||||||
|
®
|
||||||
|
</div>
|
||||||
|
<div style="clear: both"></div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
BIN
dziennik/info.png
Normal file
|
After Width: | Height: | Size: 739 B |
4
dziennik/jquery-2.2.1.min.js
vendored
Normal file
2
dziennik/jquery-migrate.min.js
vendored
Normal file
6
dziennik/jquery-ui-1.10.3.custom.min.js
vendored
Normal file
69
dziennik/jquery.checkbox.js
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
/**
|
||||||
|
* @Author: Dawid Pośliński
|
||||||
|
* @Website: http://poslinski.net
|
||||||
|
* @Modified: Bartek Medoń, www.bmedon.net
|
||||||
|
*/
|
||||||
|
|
||||||
|
(function($) {
|
||||||
|
$.fn.checkbox = function(method) {
|
||||||
|
if(typeof method === 'boolean'){
|
||||||
|
var div = $(this).parent().children('div.checkbox');
|
||||||
|
if(div){
|
||||||
|
if(method === true) div.removeClass("checked");
|
||||||
|
else div.addClass("checked");
|
||||||
|
|
||||||
|
onClick(3, $(this).parent().children('div.checkbox'));
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$('body').off('click.checkbox', 'div.checkbox:not(.disabled)').on('click.checkbox', 'div.checkbox:not(.disabled)', onClick);
|
||||||
|
$('body').off('keypress.checkbox', 'div.checkbox:not(.disabled)').on('keypress.checkbox', 'div.checkbox:not(.disabled)', onKeypress);
|
||||||
|
$('body').off('click.checkbox-label', 'label').on('click.checkbox-label', 'label', onClickLabel);
|
||||||
|
|
||||||
|
return this.each(function(){
|
||||||
|
if(!$(this).filter('.checkboxed').length){
|
||||||
|
var checked = "";
|
||||||
|
var disabled = '';
|
||||||
|
if( $(this).attr('disabled') != undefined) disabled = ' disabled';
|
||||||
|
if ( $(this).attr("checked") != undefined) checked = " checked";
|
||||||
|
|
||||||
|
$(this).addClass('checkboxed').after('<div data-val="'+$(this).attr('value')+'" class="checkbox'+checked+disabled+'" tabindex="0"></div>').hide();
|
||||||
|
}
|
||||||
|
// $(this).next().unbind('click').click(onClick);
|
||||||
|
// $(this).next().unbind('keypress').keypress(onKeypress);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function onClickLabel(e){
|
||||||
|
if($(this).children('input.checkbox[type="checkbox"]').length === 1){
|
||||||
|
e.preventDefault();
|
||||||
|
if(!$(e.target).is('div.checkbox')){
|
||||||
|
onClick(2, $(this).children('div.checkbox'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function onClick(type, ths) {
|
||||||
|
if(!ths){
|
||||||
|
ths = $(this);
|
||||||
|
}
|
||||||
|
if ( ths.hasClass("checked") ) {
|
||||||
|
ths.removeClass("checked");
|
||||||
|
ths.parent().children(":checkbox[value="+ths.attr("data-val")+"]").removeAttr("checked").prop('checked', false).trigger('change');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ths.addClass("checked");
|
||||||
|
ths.parent().children(":checkbox[value="+ths.attr("data-val")+"]").attr("checked","checked").prop('checked', true).trigger('change');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function onKeypress(event) {
|
||||||
|
if (event.keyCode === 32) {
|
||||||
|
onClick(2, $(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
})(jQuery);
|
||||||
803
dziennik/jquery.form.js
Normal file
@@ -0,0 +1,803 @@
|
|||||||
|
/*!
|
||||||
|
* jQuery Form Plugin
|
||||||
|
* version: 2.63 (29-JAN-2011)
|
||||||
|
* @requires jQuery v1.3.2 or later
|
||||||
|
*
|
||||||
|
* Examples and documentation at: http://malsup.com/jquery/form/
|
||||||
|
* Dual licensed under the MIT and GPL licenses:
|
||||||
|
* http://www.opensource.org/licenses/mit-license.php
|
||||||
|
* http://www.gnu.org/licenses/gpl.html
|
||||||
|
*/
|
||||||
|
;(function($) {
|
||||||
|
|
||||||
|
/*
|
||||||
|
Usage Note:
|
||||||
|
-----------
|
||||||
|
Do not use both ajaxSubmit and ajaxForm on the same form. These
|
||||||
|
functions are intended to be exclusive. Use ajaxSubmit if you want
|
||||||
|
to bind your own submit handler to the form. For example,
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#myForm').bind('submit', function(e) {
|
||||||
|
e.preventDefault(); // <-- important
|
||||||
|
$(this).ajaxSubmit({
|
||||||
|
target: '#output'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
Use ajaxForm when you want the plugin to manage all the event binding
|
||||||
|
for you. For example,
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#myForm').ajaxForm({
|
||||||
|
target: '#output'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
When using ajaxForm, the ajaxSubmit function will be invoked for you
|
||||||
|
at the appropriate time.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ajaxSubmit() provides a mechanism for immediately submitting
|
||||||
|
* an HTML form using AJAX.
|
||||||
|
*/
|
||||||
|
$.fn.ajaxSubmit = function(options) {
|
||||||
|
// fast fail if nothing selected (http://dev.jquery.com/ticket/2752)
|
||||||
|
if (!this.length) {
|
||||||
|
log('ajaxSubmit: skipping submit process - no element selected');
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof options == 'function') {
|
||||||
|
options = { success: options };
|
||||||
|
}
|
||||||
|
|
||||||
|
var action = this.attr('action');
|
||||||
|
var url = (typeof action === 'string') ? $.trim(action) : '';
|
||||||
|
if (url) {
|
||||||
|
// clean url (don't include hash vaue)
|
||||||
|
url = (url.match(/^([^#]+)/)||[])[1];
|
||||||
|
}
|
||||||
|
url = url || window.location.href || '';
|
||||||
|
|
||||||
|
options = $.extend(true, {
|
||||||
|
url: url,
|
||||||
|
type: this[0].getAttribute('method') || 'GET', // IE7 massage (see issue 57)
|
||||||
|
iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank'
|
||||||
|
}, options);
|
||||||
|
|
||||||
|
// hook for manipulating the form data before it is extracted;
|
||||||
|
// convenient for use with rich editors like tinyMCE or FCKEditor
|
||||||
|
var veto = {};
|
||||||
|
this.trigger('form-pre-serialize', [this, options, veto]);
|
||||||
|
if (veto.veto) {
|
||||||
|
log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
// provide opportunity to alter form data before it is serialized
|
||||||
|
if (options.beforeSerialize && options.beforeSerialize(this, options) === false) {
|
||||||
|
log('ajaxSubmit: submit aborted via beforeSerialize callback');
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
var n,v,a = this.formToArray(options.semantic);
|
||||||
|
if (options.data) {
|
||||||
|
options.extraData = options.data;
|
||||||
|
for (n in options.data) {
|
||||||
|
if(options.data[n] instanceof Array) {
|
||||||
|
for (var k in options.data[n]) {
|
||||||
|
a.push( { name: n, value: options.data[n][k] } );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
v = options.data[n];
|
||||||
|
v = $.isFunction(v) ? v() : v; // if value is fn, invoke it
|
||||||
|
a.push( { name: n, value: v } );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// give pre-submit callback an opportunity to abort the submit
|
||||||
|
if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) {
|
||||||
|
log('ajaxSubmit: submit aborted via beforeSubmit callback');
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
// fire vetoable 'validate' event
|
||||||
|
this.trigger('form-submit-validate', [a, this, options, veto]);
|
||||||
|
if (veto.veto) {
|
||||||
|
log('ajaxSubmit: submit vetoed via form-submit-validate trigger');
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
var q = $.param(a);
|
||||||
|
|
||||||
|
if (options.type.toUpperCase() == 'GET') {
|
||||||
|
options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;
|
||||||
|
options.data = null; // data is null for 'get'
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
options.data = q; // data is the query string for 'post'
|
||||||
|
}
|
||||||
|
|
||||||
|
var $form = this, callbacks = [];
|
||||||
|
if (options.resetForm) {
|
||||||
|
callbacks.push(function() { $form.resetForm(); });
|
||||||
|
}
|
||||||
|
if (options.clearForm) {
|
||||||
|
callbacks.push(function() { $form.clearForm(); });
|
||||||
|
}
|
||||||
|
|
||||||
|
// perform a load on the target only if dataType is not provided
|
||||||
|
if (!options.dataType && options.target) {
|
||||||
|
var oldSuccess = options.success || function(){};
|
||||||
|
callbacks.push(function(data) {
|
||||||
|
var fn = options.replaceTarget ? 'replaceWith' : 'html';
|
||||||
|
$(options.target)[fn](data).each(oldSuccess, arguments);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else if (options.success) {
|
||||||
|
callbacks.push(options.success);
|
||||||
|
}
|
||||||
|
|
||||||
|
options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg
|
||||||
|
var context = options.context || options; // jQuery 1.4+ supports scope context
|
||||||
|
for (var i=0, max=callbacks.length; i < max; i++) {
|
||||||
|
callbacks[i].apply(context, [data, status, xhr || $form, $form]);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// are there files to upload?
|
||||||
|
var fileInputs = $('input:file', this).length > 0;
|
||||||
|
var mp = 'multipart/form-data';
|
||||||
|
var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp);
|
||||||
|
|
||||||
|
// options.iframe allows user to force iframe mode
|
||||||
|
// 06-NOV-09: now defaulting to iframe mode if file input is detected
|
||||||
|
if (options.iframe !== false && (fileInputs || options.iframe || multipart)) {
|
||||||
|
// hack to fix Safari hang (thanks to Tim Molendijk for this)
|
||||||
|
// see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d
|
||||||
|
if (options.closeKeepAlive) {
|
||||||
|
$.get(options.closeKeepAlive, fileUpload);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
fileUpload();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$.ajax(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
// fire 'notify' event
|
||||||
|
this.trigger('form-submit-notify', [this, options]);
|
||||||
|
return this;
|
||||||
|
|
||||||
|
|
||||||
|
// private function for handling file uploads (hat tip to YAHOO!)
|
||||||
|
function fileUpload() {
|
||||||
|
var form = $form[0];
|
||||||
|
|
||||||
|
if ($(':input[name=submit],:input[id=submit]', form).length) {
|
||||||
|
// if there is an input with a name or id of 'submit' then we won't be
|
||||||
|
// able to invoke the submit fn on the form (at least not x-browser)
|
||||||
|
alert('Error: Form elements must not have name or id of "submit".');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var s = $.extend(true, {}, $.ajaxSettings, options);
|
||||||
|
s.context = s.context || s;
|
||||||
|
var id = 'jqFormIO' + (new Date().getTime()), fn = '_'+id;
|
||||||
|
var $io = $('<iframe id="' + id + '" name="' + id + '" src="'+ s.iframeSrc +'" />');
|
||||||
|
var io = $io[0];
|
||||||
|
|
||||||
|
$io.css({ position: 'absolute', top: '-1000px', left: '-1000px' });
|
||||||
|
|
||||||
|
var xhr = { // mock object
|
||||||
|
aborted: 0,
|
||||||
|
responseText: null,
|
||||||
|
responseXML: null,
|
||||||
|
status: 0,
|
||||||
|
statusText: 'n/a',
|
||||||
|
getAllResponseHeaders: function() {},
|
||||||
|
getResponseHeader: function() {},
|
||||||
|
setRequestHeader: function() {},
|
||||||
|
abort: function() {
|
||||||
|
this.aborted = 1;
|
||||||
|
$io.attr('src', s.iframeSrc); // abort op in progress
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var g = s.global;
|
||||||
|
// trigger ajax global events so that activity/block indicators work like normal
|
||||||
|
if (g && ! $.active++) {
|
||||||
|
$.event.trigger("ajaxStart");
|
||||||
|
}
|
||||||
|
if (g) {
|
||||||
|
$.event.trigger("ajaxSend", [xhr, s]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (s.beforeSend && s.beforeSend.call(s.context, xhr, s) === false) {
|
||||||
|
if (s.global) {
|
||||||
|
$.active--;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (xhr.aborted) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var timedOut = 0;
|
||||||
|
|
||||||
|
// add submitting element to data if we know it
|
||||||
|
var sub = form.clk;
|
||||||
|
if (sub) {
|
||||||
|
var n = sub.name;
|
||||||
|
if (n && !sub.disabled) {
|
||||||
|
s.extraData = s.extraData || {};
|
||||||
|
s.extraData[n] = sub.value;
|
||||||
|
if (sub.type == "image") {
|
||||||
|
s.extraData[n+'.x'] = form.clk_x;
|
||||||
|
s.extraData[n+'.y'] = form.clk_y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// take a breath so that pending repaints get some cpu time before the upload starts
|
||||||
|
function doSubmit() {
|
||||||
|
// make sure form attrs are set
|
||||||
|
var t = $form.attr('target'), a = $form.attr('action');
|
||||||
|
|
||||||
|
// update form attrs in IE friendly way
|
||||||
|
form.setAttribute('target',id);
|
||||||
|
if (form.getAttribute('method') != 'POST') {
|
||||||
|
form.setAttribute('method', 'POST');
|
||||||
|
}
|
||||||
|
if (form.getAttribute('action') != s.url) {
|
||||||
|
form.setAttribute('action', s.url);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ie borks in some cases when setting encoding
|
||||||
|
if (! s.skipEncodingOverride) {
|
||||||
|
$form.attr({
|
||||||
|
encoding: 'multipart/form-data',
|
||||||
|
enctype: 'multipart/form-data'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// support timout
|
||||||
|
if (s.timeout) {
|
||||||
|
setTimeout(function() { timedOut = true; cb(); }, s.timeout);
|
||||||
|
}
|
||||||
|
|
||||||
|
// add "extra" data to form if provided in options
|
||||||
|
var extraInputs = [];
|
||||||
|
try {
|
||||||
|
if (s.extraData) {
|
||||||
|
for (var n in s.extraData) {
|
||||||
|
extraInputs.push(
|
||||||
|
$('<input type="hidden" name="'+n+'" value="'+s.extraData[n]+'" />')
|
||||||
|
.appendTo(form)[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// add iframe to doc and submit the form
|
||||||
|
$io.appendTo('body');
|
||||||
|
io.attachEvent ? io.attachEvent('onload', cb) : io.addEventListener('load', cb, false);
|
||||||
|
form.submit();
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
// reset attrs and remove "extra" input elements
|
||||||
|
form.setAttribute('action',a);
|
||||||
|
if(t) {
|
||||||
|
form.setAttribute('target', t);
|
||||||
|
} else {
|
||||||
|
$form.removeAttr('target');
|
||||||
|
}
|
||||||
|
$(extraInputs).remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (s.forceSync) {
|
||||||
|
doSubmit();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setTimeout(doSubmit, 10); // this lets dom updates render
|
||||||
|
}
|
||||||
|
|
||||||
|
var data, doc, domCheckCount = 50;
|
||||||
|
|
||||||
|
function cb() {
|
||||||
|
doc = io.contentWindow ? io.contentWindow.document : io.contentDocument ? io.contentDocument : io.document;
|
||||||
|
if (!doc || doc.location.href == s.iframeSrc) {
|
||||||
|
// response not received yet
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
io.detachEvent ? io.detachEvent('onload', cb) : io.removeEventListener('load', cb, false);
|
||||||
|
|
||||||
|
var ok = true;
|
||||||
|
try {
|
||||||
|
if (timedOut) {
|
||||||
|
throw 'timeout';
|
||||||
|
}
|
||||||
|
|
||||||
|
var isXml = s.dataType == 'xml' || doc.XMLDocument || $.isXMLDoc(doc);
|
||||||
|
log('isXml='+isXml);
|
||||||
|
if (!isXml && window.opera && (doc.body == null || doc.body.innerHTML == '')) {
|
||||||
|
if (--domCheckCount) {
|
||||||
|
// in some browsers (Opera) the iframe DOM is not always traversable when
|
||||||
|
// the onload callback fires, so we loop a bit to accommodate
|
||||||
|
log('requeing onLoad callback, DOM not available');
|
||||||
|
setTimeout(cb, 250);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// let this fall through because server response could be an empty document
|
||||||
|
//log('Could not access iframe DOM after mutiple tries.');
|
||||||
|
//throw 'DOMException: not available';
|
||||||
|
}
|
||||||
|
|
||||||
|
//log('response detected');
|
||||||
|
xhr.responseText = doc.body ? doc.body.innerHTML : doc.documentElement ? doc.documentElement.innerHTML : null;
|
||||||
|
xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc;
|
||||||
|
xhr.getResponseHeader = function(header){
|
||||||
|
var headers = {'content-type': s.dataType};
|
||||||
|
return headers[header];
|
||||||
|
};
|
||||||
|
|
||||||
|
var scr = /(json|script)/.test(s.dataType);
|
||||||
|
if (scr || s.textarea) {
|
||||||
|
// see if user embedded response in textarea
|
||||||
|
var ta = doc.getElementsByTagName('textarea')[0];
|
||||||
|
if (ta) {
|
||||||
|
xhr.responseText = ta.value;
|
||||||
|
}
|
||||||
|
else if (scr) {
|
||||||
|
// account for browsers injecting pre around json response
|
||||||
|
var pre = doc.getElementsByTagName('pre')[0];
|
||||||
|
var b = doc.getElementsByTagName('body')[0];
|
||||||
|
if (pre) {
|
||||||
|
xhr.responseText = pre.textContent;
|
||||||
|
}
|
||||||
|
else if (b) {
|
||||||
|
xhr.responseText = b.innerHTML;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (s.dataType == 'xml' && !xhr.responseXML && xhr.responseText != null) {
|
||||||
|
xhr.responseXML = toXml(xhr.responseText);
|
||||||
|
}
|
||||||
|
|
||||||
|
data = httpData(xhr, s.dataType, s);
|
||||||
|
}
|
||||||
|
catch(e){
|
||||||
|
log('error caught:',e);
|
||||||
|
ok = false;
|
||||||
|
xhr.error = e;
|
||||||
|
s.error.call(s.context, xhr, 'error', e);
|
||||||
|
g && $.event.trigger("ajaxError", [xhr, s, e]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (xhr.aborted) {
|
||||||
|
log('upload aborted');
|
||||||
|
ok = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ordering of these callbacks/triggers is odd, but that's how $.ajax does it
|
||||||
|
if (ok) {
|
||||||
|
s.success.call(s.context, data, 'success', xhr);
|
||||||
|
g && $.event.trigger("ajaxSuccess", [xhr, s]);
|
||||||
|
}
|
||||||
|
|
||||||
|
g && $.event.trigger("ajaxComplete", [xhr, s]);
|
||||||
|
|
||||||
|
if (g && ! --$.active) {
|
||||||
|
$.event.trigger("ajaxStop");
|
||||||
|
}
|
||||||
|
|
||||||
|
s.complete && s.complete.call(s.context, xhr, ok ? 'success' : 'error');
|
||||||
|
|
||||||
|
// clean up
|
||||||
|
setTimeout(function() {
|
||||||
|
$io.removeData('form-plugin-onload');
|
||||||
|
$io.remove();
|
||||||
|
xhr.responseXML = null;
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
|
|
||||||
|
var toXml = $.parseXML || function(s, doc) { // use parseXML if available (jQuery 1.5+)
|
||||||
|
if (window.ActiveXObject) {
|
||||||
|
doc = new ActiveXObject('Microsoft.XMLDOM');
|
||||||
|
doc.async = 'false';
|
||||||
|
doc.loadXML(s);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
doc = (new DOMParser()).parseFromString(s, 'text/xml');
|
||||||
|
}
|
||||||
|
return (doc && doc.documentElement && doc.documentElement.nodeName != 'parsererror') ? doc : null;
|
||||||
|
};
|
||||||
|
var parseJSON = $.parseJSON || function(s) {
|
||||||
|
return window['eval']('(' + s + ')');
|
||||||
|
};
|
||||||
|
|
||||||
|
var httpData = function( xhr, type, s ) { // mostly lifted from jq1.4.4
|
||||||
|
var ct = xhr.getResponseHeader('content-type') || '',
|
||||||
|
xml = type === 'xml' || !type && ct.indexOf('xml') >= 0,
|
||||||
|
data = xml ? xhr.responseXML : xhr.responseText;
|
||||||
|
|
||||||
|
if (xml && data.documentElement.nodeName === 'parsererror') {
|
||||||
|
$.error && $.error('parsererror');
|
||||||
|
}
|
||||||
|
if (s && s.dataFilter) {
|
||||||
|
data = s.dataFilter(data, type);
|
||||||
|
}
|
||||||
|
if (typeof data === 'string') {
|
||||||
|
if (type === 'json' || !type && ct.indexOf('json') >= 0) {
|
||||||
|
data = parseJSON(data);
|
||||||
|
} else if (type === "script" || !type && ct.indexOf("javascript") >= 0) {
|
||||||
|
$.globalEval(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ajaxForm() provides a mechanism for fully automating form submission.
|
||||||
|
*
|
||||||
|
* The advantages of using this method instead of ajaxSubmit() are:
|
||||||
|
*
|
||||||
|
* 1: This method will include coordinates for <input type="image" /> elements (if the element
|
||||||
|
* is used to submit the form).
|
||||||
|
* 2. This method will include the submit element's name/value data (for the element that was
|
||||||
|
* used to submit the form).
|
||||||
|
* 3. This method binds the submit() method to the form for you.
|
||||||
|
*
|
||||||
|
* The options argument for ajaxForm works exactly as it does for ajaxSubmit. ajaxForm merely
|
||||||
|
* passes the options argument along after properly binding events for submit elements and
|
||||||
|
* the form itself.
|
||||||
|
*/
|
||||||
|
$.fn.ajaxForm = function(options) {
|
||||||
|
// in jQuery 1.3+ we can fix mistakes with the ready state
|
||||||
|
if (this.length === 0) {
|
||||||
|
var o = { s: this.selector, c: this.context };
|
||||||
|
if (!$.isReady && o.s) {
|
||||||
|
log('DOM not ready, queuing ajaxForm');
|
||||||
|
$(function() {
|
||||||
|
$(o.s,o.c).ajaxForm(options);
|
||||||
|
});
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
// is your DOM ready? http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
|
||||||
|
log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)'));
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.ajaxFormUnbind().bind('submit.form-plugin', function(e) {
|
||||||
|
if (!e.isDefaultPrevented()) { // if event has been canceled, don't proceed
|
||||||
|
e.preventDefault();
|
||||||
|
$(this).ajaxSubmit(options);
|
||||||
|
}
|
||||||
|
}).bind('click.form-plugin', function(e) {
|
||||||
|
var target = e.target;
|
||||||
|
var $el = $(target);
|
||||||
|
if (!($el.is(":submit,input:image"))) {
|
||||||
|
// is this a child element of the submit el? (ex: a span within a button)
|
||||||
|
var t = $el.closest(':submit');
|
||||||
|
if (t.length == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
target = t[0];
|
||||||
|
}
|
||||||
|
var form = this;
|
||||||
|
form.clk = target;
|
||||||
|
if (target.type == 'image') {
|
||||||
|
if (e.offsetX != undefined) {
|
||||||
|
form.clk_x = e.offsetX;
|
||||||
|
form.clk_y = e.offsetY;
|
||||||
|
} else if (typeof $.fn.offset == 'function') { // try to use dimensions plugin
|
||||||
|
var offset = $el.offset();
|
||||||
|
form.clk_x = e.pageX - offset.left;
|
||||||
|
form.clk_y = e.pageY - offset.top;
|
||||||
|
} else {
|
||||||
|
form.clk_x = e.pageX - target.offsetLeft;
|
||||||
|
form.clk_y = e.pageY - target.offsetTop;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// clear form vars
|
||||||
|
setTimeout(function() { form.clk = form.clk_x = form.clk_y = null; }, 100);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// ajaxFormUnbind unbinds the event handlers that were bound by ajaxForm
|
||||||
|
$.fn.ajaxFormUnbind = function() {
|
||||||
|
return this.unbind('submit.form-plugin click.form-plugin');
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* formToArray() gathers form element data into an array of objects that can
|
||||||
|
* be passed to any of the following ajax functions: $.get, $.post, or load.
|
||||||
|
* Each object in the array has both a 'name' and 'value' property. An example of
|
||||||
|
* an array for a simple login form might be:
|
||||||
|
*
|
||||||
|
* [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
|
||||||
|
*
|
||||||
|
* It is this array that is passed to pre-submit callback functions provided to the
|
||||||
|
* ajaxSubmit() and ajaxForm() methods.
|
||||||
|
*/
|
||||||
|
$.fn.formToArray = function(semantic) {
|
||||||
|
var a = [];
|
||||||
|
if (this.length === 0) {
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
var form = this[0];
|
||||||
|
var els = semantic ? form.getElementsByTagName('*') : form.elements;
|
||||||
|
if (!els) {
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
|
||||||
|
var i,j,n,v,el,max,jmax;
|
||||||
|
for(i=0, max=els.length; i < max; i++) {
|
||||||
|
el = els[i];
|
||||||
|
n = el.name;
|
||||||
|
if (!n) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (semantic && form.clk && el.type == "image") {
|
||||||
|
// handle image inputs on the fly when semantic == true
|
||||||
|
if(!el.disabled && form.clk == el) {
|
||||||
|
a.push({name: n, value: $(el).val()});
|
||||||
|
a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
v = $.fieldValue(el, true);
|
||||||
|
if (v && v.constructor == Array) {
|
||||||
|
for(j=0, jmax=v.length; j < jmax; j++) {
|
||||||
|
a.push({name: n, value: v[j]});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (v !== null && typeof v != 'undefined') {
|
||||||
|
a.push({name: n, value: v});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!semantic && form.clk) {
|
||||||
|
// input type=='image' are not found in elements array! handle it here
|
||||||
|
var $input = $(form.clk), input = $input[0];
|
||||||
|
n = input.name;
|
||||||
|
if (n && !input.disabled && input.type == 'image') {
|
||||||
|
a.push({name: n, value: $input.val()});
|
||||||
|
a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return a;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes form data into a 'submittable' string. This method will return a string
|
||||||
|
* in the format: name1=value1&name2=value2
|
||||||
|
*/
|
||||||
|
$.fn.formSerialize = function(semantic) {
|
||||||
|
//hand off to jQuery.param for proper encoding
|
||||||
|
return $.param(this.formToArray(semantic));
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes all field elements in the jQuery object into a query string.
|
||||||
|
* This method will return a string in the format: name1=value1&name2=value2
|
||||||
|
*/
|
||||||
|
$.fn.fieldSerialize = function(successful) {
|
||||||
|
var a = [];
|
||||||
|
this.each(function() {
|
||||||
|
var n = this.name;
|
||||||
|
if (!n) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var v = $.fieldValue(this, successful);
|
||||||
|
if (v && v.constructor == Array) {
|
||||||
|
for (var i=0,max=v.length; i < max; i++) {
|
||||||
|
a.push({name: n, value: v[i]});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (v !== null && typeof v != 'undefined') {
|
||||||
|
a.push({name: this.name, value: v});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//hand off to jQuery.param for proper encoding
|
||||||
|
return $.param(a);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the value(s) of the element in the matched set. For example, consider the following form:
|
||||||
|
*
|
||||||
|
* <form><fieldset>
|
||||||
|
* <input name="A" type="text" />
|
||||||
|
* <input name="A" type="text" />
|
||||||
|
* <input name="B" type="checkbox" value="B1" />
|
||||||
|
* <input name="B" type="checkbox" value="B2"/>
|
||||||
|
* <input name="C" type="radio" value="C1" />
|
||||||
|
* <input name="C" type="radio" value="C2" />
|
||||||
|
* </fieldset></form>
|
||||||
|
*
|
||||||
|
* var v = $(':text').fieldValue();
|
||||||
|
* // if no values are entered into the text inputs
|
||||||
|
* v == ['','']
|
||||||
|
* // if values entered into the text inputs are 'foo' and 'bar'
|
||||||
|
* v == ['foo','bar']
|
||||||
|
*
|
||||||
|
* var v = $(':checkbox').fieldValue();
|
||||||
|
* // if neither checkbox is checked
|
||||||
|
* v === undefined
|
||||||
|
* // if both checkboxes are checked
|
||||||
|
* v == ['B1', 'B2']
|
||||||
|
*
|
||||||
|
* var v = $(':radio').fieldValue();
|
||||||
|
* // if neither radio is checked
|
||||||
|
* v === undefined
|
||||||
|
* // if first radio is checked
|
||||||
|
* v == ['C1']
|
||||||
|
*
|
||||||
|
* The successful argument controls whether or not the field element must be 'successful'
|
||||||
|
* (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
|
||||||
|
* The default value of the successful argument is true. If this value is false the value(s)
|
||||||
|
* for each element is returned.
|
||||||
|
*
|
||||||
|
* Note: This method *always* returns an array. If no valid value can be determined the
|
||||||
|
* array will be empty, otherwise it will contain one or more values.
|
||||||
|
*/
|
||||||
|
$.fn.fieldValue = function(successful) {
|
||||||
|
for (var val=[], i=0, max=this.length; i < max; i++) {
|
||||||
|
var el = this[i];
|
||||||
|
var v = $.fieldValue(el, successful);
|
||||||
|
if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
v.constructor == Array ? $.merge(val, v) : val.push(v);
|
||||||
|
}
|
||||||
|
return val;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the value of the field element.
|
||||||
|
*/
|
||||||
|
$.fieldValue = function(el, successful) {
|
||||||
|
var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
|
||||||
|
if (successful === undefined) {
|
||||||
|
successful = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
|
||||||
|
(t == 'checkbox' || t == 'radio') && !el.checked ||
|
||||||
|
(t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
|
||||||
|
tag == 'select' && el.selectedIndex == -1)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tag == 'select') {
|
||||||
|
var index = el.selectedIndex;
|
||||||
|
if (index < 0) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
var a = [], ops = el.options;
|
||||||
|
var one = (t == 'select-one');
|
||||||
|
var max = (one ? index+1 : ops.length);
|
||||||
|
for(var i=(one ? index : 0); i < max; i++) {
|
||||||
|
var op = ops[i];
|
||||||
|
if (op.selected) {
|
||||||
|
var v = op.value;
|
||||||
|
if (!v) { // extra pain for IE...
|
||||||
|
v = (op.attributes && op.attributes['value'] && !(op.attributes['value'].specified)) ? op.text : op.value;
|
||||||
|
}
|
||||||
|
if (one) {
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
a.push(v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
return $(el).val();
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears the form data. Takes the following actions on the form's input fields:
|
||||||
|
* - input text fields will have their 'value' property set to the empty string
|
||||||
|
* - select elements will have their 'selectedIndex' property set to -1
|
||||||
|
* - checkbox and radio inputs will have their 'checked' property set to false
|
||||||
|
* - inputs of type submit, button, reset, and hidden will *not* be effected
|
||||||
|
* - button elements will *not* be effected
|
||||||
|
*/
|
||||||
|
$.fn.clearForm = function() {
|
||||||
|
return this.each(function() {
|
||||||
|
$('input,select,textarea', this).clearFields();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears the selected form elements.
|
||||||
|
*/
|
||||||
|
$.fn.clearFields = $.fn.clearInputs = function() {
|
||||||
|
return this.each(function() {
|
||||||
|
var t = this.type, tag = this.tagName.toLowerCase();
|
||||||
|
if (t == 'text' || t == 'password' || tag == 'textarea') {
|
||||||
|
this.value = '';
|
||||||
|
}
|
||||||
|
else if (t == 'checkbox' || t == 'radio') {
|
||||||
|
this.checked = false;
|
||||||
|
}
|
||||||
|
else if (tag == 'select') {
|
||||||
|
this.selectedIndex = -1;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resets the form data. Causes all form elements to be reset to their original value.
|
||||||
|
*/
|
||||||
|
$.fn.resetForm = function() {
|
||||||
|
return this.each(function() {
|
||||||
|
// guard against an input with the name of 'reset'
|
||||||
|
// note that IE reports the reset function as an 'object'
|
||||||
|
if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType)) {
|
||||||
|
this.reset();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enables or disables any matching elements.
|
||||||
|
*/
|
||||||
|
$.fn.enable = function(b) {
|
||||||
|
if (b === undefined) {
|
||||||
|
b = true;
|
||||||
|
}
|
||||||
|
return this.each(function() {
|
||||||
|
this.disabled = !b;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks/unchecks any matching checkboxes or radio buttons and
|
||||||
|
* selects/deselects and matching option elements.
|
||||||
|
*/
|
||||||
|
$.fn.selected = function(select) {
|
||||||
|
if (select === undefined) {
|
||||||
|
select = true;
|
||||||
|
}
|
||||||
|
return this.each(function() {
|
||||||
|
var t = this.type;
|
||||||
|
if (t == 'checkbox' || t == 'radio') {
|
||||||
|
this.checked = select;
|
||||||
|
}
|
||||||
|
else if (this.tagName.toLowerCase() == 'option') {
|
||||||
|
var $sel = $(this).parent('select');
|
||||||
|
if (select && $sel[0] && $sel[0].type == 'select-one') {
|
||||||
|
// deselect all other options
|
||||||
|
$sel.find('option').selected(false);
|
||||||
|
}
|
||||||
|
this.selected = select;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// helper fn for console logging
|
||||||
|
// set $.fn.ajaxSubmit.debug to true to enable debug logging
|
||||||
|
function log() {
|
||||||
|
if ($.fn.ajaxSubmit.debug) {
|
||||||
|
var msg = '[jquery.form] ' + Array.prototype.join.call(arguments,'');
|
||||||
|
if (window.console && window.console.log) {
|
||||||
|
window.console.log(msg);
|
||||||
|
}
|
||||||
|
else if (window.opera && window.opera.postError) {
|
||||||
|
window.opera.postError(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
})(jQuery);
|
||||||
19
dziennik/jquery.mask.min.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
// jQuery Mask Plugin v1.14.16
|
||||||
|
// github.com/igorescobar/jQuery-Mask-Plugin
|
||||||
|
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,n,f){a instanceof String&&(a=String(a));for(var p=a.length,k=0;k<p;k++){var b=a[k];if(n.call(f,b,k,a))return{i:k,v:b}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;
|
||||||
|
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,n,f){a!=Array.prototype&&a!=Object.prototype&&(a[n]=f.value)};$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);
|
||||||
|
$jscomp.polyfill=function(a,n,f,p){if(n){f=$jscomp.global;a=a.split(".");for(p=0;p<a.length-1;p++){var k=a[p];k in f||(f[k]={});f=f[k]}a=a[a.length-1];p=f[a];n=n(p);n!=p&&null!=n&&$jscomp.defineProperty(f,a,{configurable:!0,writable:!0,value:n})}};$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,f){return $jscomp.findInternal(this,a,f).v}},"es6","es3");
|
||||||
|
(function(a,n,f){"function"===typeof define&&define.amd?define(["jquery"],a):"object"===typeof exports&&"undefined"===typeof Meteor?module.exports=a(require("jquery")):a(n||f)})(function(a){var n=function(b,d,e){var c={invalid:[],getCaret:function(){try{var a=0,r=b.get(0),h=document.selection,d=r.selectionStart;if(h&&-1===navigator.appVersion.indexOf("MSIE 10")){var e=h.createRange();e.moveStart("character",-c.val().length);a=e.text.length}else if(d||"0"===d)a=d;return a}catch(C){}},setCaret:function(a){try{if(b.is(":focus")){var c=
|
||||||
|
b.get(0);if(c.setSelectionRange)c.setSelectionRange(a,a);else{var g=c.createTextRange();g.collapse(!0);g.moveEnd("character",a);g.moveStart("character",a);g.select()}}}catch(B){}},events:function(){b.on("keydown.mask",function(a){b.data("mask-keycode",a.keyCode||a.which);b.data("mask-previus-value",b.val());b.data("mask-previus-caret-pos",c.getCaret());c.maskDigitPosMapOld=c.maskDigitPosMap}).on(a.jMaskGlobals.useInput?"input.mask":"keyup.mask",c.behaviour).on("paste.mask drop.mask",function(){setTimeout(function(){b.keydown().keyup()},
|
||||||
|
100)}).on("change.mask",function(){b.data("changed",!0)}).on("blur.mask",function(){f===c.val()||b.data("changed")||b.trigger("change");b.data("changed",!1)}).on("blur.mask",function(){f=c.val()}).on("focus.mask",function(b){!0===e.selectOnFocus&&a(b.target).select()}).on("focusout.mask",function(){e.clearIfNotMatch&&!k.test(c.val())&&c.val("")})},getRegexMask:function(){for(var a=[],b,c,e,t,f=0;f<d.length;f++)(b=l.translation[d.charAt(f)])?(c=b.pattern.toString().replace(/.{1}$|^.{1}/g,""),e=b.optional,
|
||||||
|
(b=b.recursive)?(a.push(d.charAt(f)),t={digit:d.charAt(f),pattern:c}):a.push(e||b?c+"?":c)):a.push(d.charAt(f).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"));a=a.join("");t&&(a=a.replace(new RegExp("("+t.digit+"(.*"+t.digit+")?)"),"($1)?").replace(new RegExp(t.digit,"g"),t.pattern));return new RegExp(a)},destroyEvents:function(){b.off("input keydown keyup paste drop blur focusout ".split(" ").join(".mask "))},val:function(a){var c=b.is("input")?"val":"text";if(0<arguments.length){if(b[c]()!==a)b[c](a);
|
||||||
|
c=b}else c=b[c]();return c},calculateCaretPosition:function(a){var d=c.getMasked(),h=c.getCaret();if(a!==d){var e=b.data("mask-previus-caret-pos")||0;d=d.length;var g=a.length,f=a=0,l=0,k=0,m;for(m=h;m<d&&c.maskDigitPosMap[m];m++)f++;for(m=h-1;0<=m&&c.maskDigitPosMap[m];m--)a++;for(m=h-1;0<=m;m--)c.maskDigitPosMap[m]&&l++;for(m=e-1;0<=m;m--)c.maskDigitPosMapOld[m]&&k++;h>g?h=10*d:e>=h&&e!==g?c.maskDigitPosMapOld[h]||(e=h,h=h-(k-l)-a,c.maskDigitPosMap[h]&&(h=e)):h>e&&(h=h+(l-k)+f)}return h},behaviour:function(d){d=
|
||||||
|
d||window.event;c.invalid=[];var e=b.data("mask-keycode");if(-1===a.inArray(e,l.byPassKeys)){e=c.getMasked();var h=c.getCaret(),g=b.data("mask-previus-value")||"";setTimeout(function(){c.setCaret(c.calculateCaretPosition(g))},a.jMaskGlobals.keyStrokeCompensation);c.val(e);c.setCaret(h);return c.callbacks(d)}},getMasked:function(a,b){var h=[],f=void 0===b?c.val():b+"",g=0,k=d.length,n=0,p=f.length,m=1,r="push",u=-1,w=0;b=[];if(e.reverse){r="unshift";m=-1;var x=0;g=k-1;n=p-1;var A=function(){return-1<
|
||||||
|
g&&-1<n}}else x=k-1,A=function(){return g<k&&n<p};for(var z;A();){var y=d.charAt(g),v=f.charAt(n),q=l.translation[y];if(q)v.match(q.pattern)?(h[r](v),q.recursive&&(-1===u?u=g:g===x&&g!==u&&(g=u-m),x===u&&(g-=m)),g+=m):v===z?(w--,z=void 0):q.optional?(g+=m,n-=m):q.fallback?(h[r](q.fallback),g+=m,n-=m):c.invalid.push({p:n,v:v,e:q.pattern}),n+=m;else{if(!a)h[r](y);v===y?(b.push(n),n+=m):(z=y,b.push(n+w),w++);g+=m}}a=d.charAt(x);k!==p+1||l.translation[a]||h.push(a);h=h.join("");c.mapMaskdigitPositions(h,
|
||||||
|
b,p);return h},mapMaskdigitPositions:function(a,b,d){a=e.reverse?a.length-d:0;c.maskDigitPosMap={};for(d=0;d<b.length;d++)c.maskDigitPosMap[b[d]+a]=1},callbacks:function(a){var g=c.val(),h=g!==f,k=[g,a,b,e],l=function(a,b,c){"function"===typeof e[a]&&b&&e[a].apply(this,c)};l("onChange",!0===h,k);l("onKeyPress",!0===h,k);l("onComplete",g.length===d.length,k);l("onInvalid",0<c.invalid.length,[g,a,b,c.invalid,e])}};b=a(b);var l=this,f=c.val(),k;d="function"===typeof d?d(c.val(),void 0,b,e):d;l.mask=
|
||||||
|
d;l.options=e;l.remove=function(){var a=c.getCaret();l.options.placeholder&&b.removeAttr("placeholder");b.data("mask-maxlength")&&b.removeAttr("maxlength");c.destroyEvents();c.val(l.getCleanVal());c.setCaret(a);return b};l.getCleanVal=function(){return c.getMasked(!0)};l.getMaskedVal=function(a){return c.getMasked(!1,a)};l.init=function(g){g=g||!1;e=e||{};l.clearIfNotMatch=a.jMaskGlobals.clearIfNotMatch;l.byPassKeys=a.jMaskGlobals.byPassKeys;l.translation=a.extend({},a.jMaskGlobals.translation,e.translation);
|
||||||
|
l=a.extend(!0,{},l,e);k=c.getRegexMask();if(g)c.events(),c.val(c.getMasked());else{e.placeholder&&b.attr("placeholder",e.placeholder);b.data("mask")&&b.attr("autocomplete","off");g=0;for(var f=!0;g<d.length;g++){var h=l.translation[d.charAt(g)];if(h&&h.recursive){f=!1;break}}f&&b.attr("maxlength",d.length).data("mask-maxlength",!0);c.destroyEvents();c.events();g=c.getCaret();c.val(c.getMasked());c.setCaret(g)}};l.init(!b.is("input"))};a.maskWatchers={};var f=function(){var b=a(this),d={},e=b.attr("data-mask");
|
||||||
|
b.attr("data-mask-reverse")&&(d.reverse=!0);b.attr("data-mask-clearifnotmatch")&&(d.clearIfNotMatch=!0);"true"===b.attr("data-mask-selectonfocus")&&(d.selectOnFocus=!0);if(p(b,e,d))return b.data("mask",new n(this,e,d))},p=function(b,d,e){e=e||{};var c=a(b).data("mask"),f=JSON.stringify;b=a(b).val()||a(b).text();try{return"function"===typeof d&&(d=d(b)),"object"!==typeof c||f(c.options)!==f(e)||c.mask!==d}catch(w){}},k=function(a){var b=document.createElement("div");a="on"+a;var e=a in b;e||(b.setAttribute(a,
|
||||||
|
"return;"),e="function"===typeof b[a]);return e};a.fn.mask=function(b,d){d=d||{};var e=this.selector,c=a.jMaskGlobals,f=c.watchInterval;c=d.watchInputs||c.watchInputs;var k=function(){if(p(this,b,d))return a(this).data("mask",new n(this,b,d))};a(this).each(k);e&&""!==e&&c&&(clearInterval(a.maskWatchers[e]),a.maskWatchers[e]=setInterval(function(){a(document).find(e).each(k)},f));return this};a.fn.masked=function(a){return this.data("mask").getMaskedVal(a)};a.fn.unmask=function(){clearInterval(a.maskWatchers[this.selector]);
|
||||||
|
delete a.maskWatchers[this.selector];return this.each(function(){var b=a(this).data("mask");b&&b.remove().removeData("mask")})};a.fn.cleanVal=function(){return this.data("mask").getCleanVal()};a.applyDataMask=function(b){b=b||a.jMaskGlobals.maskElements;(b instanceof a?b:a(b)).filter(a.jMaskGlobals.dataMaskAttr).each(f)};k={maskElements:"input,td,span,div",dataMaskAttr:"*[data-mask]",dataMask:!0,watchInterval:300,watchInputs:!0,keyStrokeCompensation:10,useInput:!/Chrome\/[2-4][0-9]|SamsungBrowser/.test(window.navigator.userAgent)&&
|
||||||
|
k("input"),watchDataMask:!1,byPassKeys:[9,16,17,18,36,37,38,39,40,91],translation:{0:{pattern:/\d/},9:{pattern:/\d/,optional:!0},"#":{pattern:/\d/,recursive:!0},A:{pattern:/[a-zA-Z0-9]/},S:{pattern:/[a-zA-Z]/}}};a.jMaskGlobals=a.jMaskGlobals||{};k=a.jMaskGlobals=a.extend(!0,{},k,a.jMaskGlobals);k.dataMask&&a.applyDataMask();setInterval(function(){a.jMaskGlobals.watchDataMask&&a.applyDataMask()},k.watchInterval)},window.jQuery,window.Zepto);
|
||||||
267
dziennik/jquery.tipsy.js
Normal file
@@ -0,0 +1,267 @@
|
|||||||
|
// tipsy, facebook style tooltips for jquery
|
||||||
|
// version 1.0.0a
|
||||||
|
// (c) 2008-2010 jason frame [jason@onehackoranother.com]
|
||||||
|
// releated under the MIT license
|
||||||
|
|
||||||
|
(function($) {
|
||||||
|
|
||||||
|
function maybeCall(thing, ctx) {
|
||||||
|
return (typeof thing == 'function') ? (thing.call(ctx)) : thing;
|
||||||
|
}
|
||||||
|
|
||||||
|
function fixTitle($ele) {
|
||||||
|
if ($ele.attr('title') || typeof($ele.attr('original-title')) != 'string') {
|
||||||
|
$ele.attr('original-title', $ele.attr('title') || '').removeAttr('title');
|
||||||
|
$ele.append('<span class="sr-only">' + $ele.attr('original-title') + '</span>')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function Tipsy(element, options) {
|
||||||
|
this.$element = $(element);
|
||||||
|
this.options = options;
|
||||||
|
this.enabled = true;
|
||||||
|
fixTitle(this.$element);
|
||||||
|
}
|
||||||
|
|
||||||
|
Tipsy.prototype = {
|
||||||
|
show: function() {
|
||||||
|
var title = this.getTitle();
|
||||||
|
if (title && this.enabled) {
|
||||||
|
var $tip = this.tip();
|
||||||
|
|
||||||
|
$tip.find('.tipsy-inner')[this.options.html ? 'html' : 'text'](title);
|
||||||
|
$tip[0].className = 'tipsy'; // reset classname in case of dynamic gravity
|
||||||
|
$tip.children('.tipsy-inner').css('max-width',this.options.width).css('text-align', this.options.align);
|
||||||
|
$tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).appendTo(document.body);
|
||||||
|
|
||||||
|
var pos = $.extend({}, this.$element.offset(), {
|
||||||
|
width: this.$element[0].offsetWidth,
|
||||||
|
height: this.$element[0].offsetHeight
|
||||||
|
});
|
||||||
|
|
||||||
|
var actualWidth = $tip[0].offsetWidth, actualHeight = $tip[0].offsetHeight;
|
||||||
|
var gravity = (typeof this.options.gravity == 'function')
|
||||||
|
? this.options.gravity.call(this.$element[0])
|
||||||
|
: this.options.gravity;
|
||||||
|
|
||||||
|
var tp;
|
||||||
|
switch (gravity.charAt(0)) {
|
||||||
|
case 'n':
|
||||||
|
tp = {top: pos.top + pos.height + this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2};
|
||||||
|
break;
|
||||||
|
case 's':
|
||||||
|
tp = {top: pos.top - actualHeight - this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2};
|
||||||
|
break;
|
||||||
|
case 'e':
|
||||||
|
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset};
|
||||||
|
break;
|
||||||
|
case 'w':
|
||||||
|
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width + this.options.offset};
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gravity.length == 2) {
|
||||||
|
if (gravity.charAt(1) == 'w') {
|
||||||
|
tp.left = pos.left + pos.width / 2 - 15;
|
||||||
|
} else {
|
||||||
|
tp.left = pos.left + pos.width / 2 - actualWidth + 15;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tp.top < 0) tp.top = 0;
|
||||||
|
if(tp.left < 0){
|
||||||
|
tp.left = 0;
|
||||||
|
$tip.children('.tipsy-arrow').css('display', 'none');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(tp.left+actualWidth > $(window).width()){
|
||||||
|
$tip.children('.tipsy-arrow').css('display', 'none');
|
||||||
|
tp.left -= tp.left + actualWidth - $(window).width();
|
||||||
|
if(tp.left < 0){
|
||||||
|
$tip.children('.tipsy-inner').css('width', this.options.width + tp.left );
|
||||||
|
tp.left = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$tip.css(tp).addClass('tipsy-' + gravity);
|
||||||
|
if (this.options.className) {
|
||||||
|
$tip.addClass(maybeCall(this.options.className, this.$element[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this.options.onShow){
|
||||||
|
this.options.onShow($tip);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.options.fade) {
|
||||||
|
$tip.stop().css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: this.options.opacity});
|
||||||
|
} else {
|
||||||
|
$tip.css({visibility: 'visible', opacity: this.options.opacity});
|
||||||
|
}
|
||||||
|
|
||||||
|
var ths = this;
|
||||||
|
setTimeout(function(){
|
||||||
|
if(['n', 's'].indexOf(ths.options.gravity) !== -1) {
|
||||||
|
var too = parseFloat($tip.position().top) + parseFloat($tip.height()) - parseFloat($('body').height());
|
||||||
|
if (too > 0) {
|
||||||
|
|
||||||
|
tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2};
|
||||||
|
$tip.css(tp);
|
||||||
|
$tip.children('.tipsy-arrow').css('display', 'none');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, 200);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
hide: function() {
|
||||||
|
if (this.options.fade) {
|
||||||
|
this.tip().stop().fadeOut(function() { $(this).remove(); });
|
||||||
|
} else {
|
||||||
|
this.tip().remove();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
getTitle: function() {
|
||||||
|
var title, $e = this.$element, o = this.options;
|
||||||
|
fixTitle($e);
|
||||||
|
var title, o = this.options;
|
||||||
|
if (typeof o.title == 'string') {
|
||||||
|
title = $e.attr(o.title == 'title' ? 'original-title' : o.title);
|
||||||
|
} else if (typeof o.title == 'function') {
|
||||||
|
title = o.title.call($e[0]);
|
||||||
|
}
|
||||||
|
title = ('' + title).replace(/(^\s*|\s*$)/, "");
|
||||||
|
return title || o.fallback;
|
||||||
|
},
|
||||||
|
|
||||||
|
tip: function() {
|
||||||
|
if (!this.$tip) {
|
||||||
|
this.$tip = $('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"/></div>');
|
||||||
|
}
|
||||||
|
return this.$tip;
|
||||||
|
},
|
||||||
|
|
||||||
|
validate: function() {
|
||||||
|
if (!this.$element[0].parentNode) {
|
||||||
|
this.hide();
|
||||||
|
this.$element = null;
|
||||||
|
this.options = null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
enable: function() { this.enabled = true; },
|
||||||
|
disable: function() { this.enabled = false; },
|
||||||
|
toggleEnabled: function() { this.enabled = !this.enabled; }
|
||||||
|
};
|
||||||
|
|
||||||
|
$.fn.tipsy = function(options) {
|
||||||
|
|
||||||
|
if (options === true) {
|
||||||
|
return this.data('tipsy');
|
||||||
|
} else if (typeof options == 'string') {
|
||||||
|
return this.data('tipsy')[options]();
|
||||||
|
}
|
||||||
|
|
||||||
|
options = $.extend({}, $.fn.tipsy.defaults, options);
|
||||||
|
|
||||||
|
function get(ele) {
|
||||||
|
var tipsy = $.data(ele, 'tipsy');
|
||||||
|
if (!tipsy) {
|
||||||
|
tipsy = new Tipsy(ele, $.fn.tipsy.elementOptions(ele, options));
|
||||||
|
$.data(ele, 'tipsy', tipsy);
|
||||||
|
}
|
||||||
|
return tipsy;
|
||||||
|
}
|
||||||
|
|
||||||
|
function enter() {
|
||||||
|
var tipsy = get(this);
|
||||||
|
tipsy.hoverState = 'in';
|
||||||
|
if (options.delayIn == 0) {
|
||||||
|
$('.tipsy').remove();
|
||||||
|
tipsy.show();
|
||||||
|
if(tipsy.$tip){
|
||||||
|
tipsy.$tip.data('tipsy', tipsy.$element);
|
||||||
|
}
|
||||||
|
if(options.allowCopy || $(tipsy.$element).attr('data-tooltip-copy') == 'true'){
|
||||||
|
tipsy.$tip.off('mouseenter').on('mouseenter', function(){
|
||||||
|
var tipsy = get($(this).data('tipsy')[0]);
|
||||||
|
clearTimeout(tipsy.outTimeout);
|
||||||
|
}).off('mouseleave').on('mouseleave', function(){
|
||||||
|
tipsy.hoverState = 'out';
|
||||||
|
tipsy.outTimeout = setTimeout(function() { if (tipsy.hoverState == 'out') tipsy.hide(); }, options.delayOut);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
setTimeout(function() { if (tipsy.hoverState == 'in') tipsy.show(); }, options.delayIn);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
function leave() {
|
||||||
|
var tipsy = get(this);
|
||||||
|
tipsy.hoverState = 'out';
|
||||||
|
if (options.delayOut == 0) {
|
||||||
|
tipsy.hide();
|
||||||
|
} else {
|
||||||
|
tipsy.outTimeout = setTimeout(function() { if (tipsy.hoverState == 'out') tipsy.hide(); }, options.delayOut);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!options.live) this.each(function() { get(this); });
|
||||||
|
|
||||||
|
if (options.trigger != 'manual') {
|
||||||
|
var binder = options.live ? 'live' : 'bind',
|
||||||
|
//eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus',
|
||||||
|
//eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur';
|
||||||
|
eventIn = 'mouseenter focus',
|
||||||
|
eventOut = 'mouseleave blur';
|
||||||
|
|
||||||
|
this.unbind('mouseenter focus').unbind('mouseleave blur');
|
||||||
|
this[binder](eventIn, enter)[binder](eventOut, leave);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this;
|
||||||
|
};
|
||||||
|
|
||||||
|
$.fn.tipsy.defaults = {
|
||||||
|
className: null,
|
||||||
|
delayIn: 0,
|
||||||
|
delayOut: 100,
|
||||||
|
fade: false,
|
||||||
|
fallback: '',
|
||||||
|
gravity: 'n',
|
||||||
|
html: false,
|
||||||
|
live: false,
|
||||||
|
offset: 0,
|
||||||
|
opacity: 0.8,
|
||||||
|
title: 'title',
|
||||||
|
trigger: 'hover',
|
||||||
|
width: 200,
|
||||||
|
align: 'center',
|
||||||
|
onShow: null,
|
||||||
|
allowCopy: false
|
||||||
|
};
|
||||||
|
|
||||||
|
// Overwrite this method to provide options on a per-element basis.
|
||||||
|
// For example, you could store the gravity in a 'tipsy-gravity' attribute:
|
||||||
|
// return $.extend({}, options, {gravity: $(ele).attr('tipsy-gravity') || 'n' });
|
||||||
|
// (remember - do not modify 'options' in place!)
|
||||||
|
$.fn.tipsy.elementOptions = function(ele, options) {
|
||||||
|
if($(ele).data('tipsy-width')){
|
||||||
|
options.width = $(ele).data('tipsy-width');
|
||||||
|
}
|
||||||
|
|
||||||
|
if($(ele).data('tipsy-gravity')){
|
||||||
|
options.gravity = $(ele).data('tipsy-gravity');
|
||||||
|
}
|
||||||
|
return $.metadata ? $.extend({}, options, $(ele).metadata()) : options;
|
||||||
|
};
|
||||||
|
|
||||||
|
$.fn.tipsy.autoNS = function() {
|
||||||
|
return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 's' : 'n';
|
||||||
|
};
|
||||||
|
|
||||||
|
$.fn.tipsy.autoWE = function() {
|
||||||
|
return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'e' : 'w';
|
||||||
|
};
|
||||||
|
|
||||||
|
})(jQuery);
|
||||||
23
dziennik/jquery.ui.datepicker-pl.js
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
/* Polish initialisation for the jQuery UI date picker plugin. */
|
||||||
|
/* Written by Jacek Wysocki (jacek.wysocki@gmail.com). */
|
||||||
|
jQuery(function($){
|
||||||
|
$.datepicker.regional['pl'] = {
|
||||||
|
closeText: 'Zamknij',
|
||||||
|
prevText: '<Poprzedni',
|
||||||
|
nextText: 'Następny>',
|
||||||
|
currentText: 'Dziś',
|
||||||
|
monthNames: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec',
|
||||||
|
'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'],
|
||||||
|
monthNamesShort: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec',//['Sty','Lu','Mar','Kw','Maj','Cze',
|
||||||
|
'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'],//'Lip','Sie','Wrz','Pa','Lis','Gru'],
|
||||||
|
dayNames: ['Niedziela','Poniedziałek','Wtorek','Środa','Czwartek','Piątek','Sobota'],
|
||||||
|
dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'],
|
||||||
|
dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'],
|
||||||
|
weekHeader: 'Tydz',
|
||||||
|
dateFormat: 'dd.mm.yy',
|
||||||
|
firstDay: 1,
|
||||||
|
isRTL: false,
|
||||||
|
showMonthAfterYear: false,
|
||||||
|
yearSuffix: ''};
|
||||||
|
$.datepicker.setDefaults($.datepicker.regional['pl']);
|
||||||
|
});
|
||||||
BIN
dziennik/mobilna.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
dziennik/nav-arrow-right.gif
Normal file
|
After Width: | Height: | Size: 54 B |
28
dziennik/odbiorcyWiadomosci.php
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
$kontakty = [
|
||||||
|
1 => [
|
||||||
|
"Ghostfox"
|
||||||
|
],
|
||||||
|
2 => [
|
||||||
|
"Youpiter"
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
$typ = $_POST["typ"];
|
||||||
|
|
||||||
|
if (!isset($typ) || !array_key_exists($typ, $kontakty)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($kontakty[$typ] as $indeks => $nazwa) {
|
||||||
|
$indeks++;
|
||||||
|
$komorka = $indeks % 2 == 0 ? "komorka_kolor" : "komorka_biala";
|
||||||
|
|
||||||
|
echo("
|
||||||
|
<label class=\"label1 $komorka\">
|
||||||
|
<input name=\"odbiorcy[]\" type=\"checkbox\" value=\"$indeks\"/>
|
||||||
|
<span class=\"nazwa-uzytkownika\">$nazwa</span>
|
||||||
|
</label>
|
||||||
|
");
|
||||||
|
}
|
||||||
|
?>
|
||||||
BIN
dziennik/pasek_gorny.jpg
Normal file
|
After Width: | Height: | Size: 325 B |
538
dziennik/skrypty.js
Normal file
@@ -0,0 +1,538 @@
|
|||||||
|
/* WINDOW onLOAD jQUERY */
|
||||||
|
var szerokoscOkna;
|
||||||
|
var extendSession = 0;
|
||||||
|
var ajax_wait_cursor = true;
|
||||||
|
|
||||||
|
// window.addEventListener("error", function(e){
|
||||||
|
// if(!system_url){
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// $.post(system_url+'/helper/blad', {
|
||||||
|
// url: document.location.href,
|
||||||
|
// blad: e.message,
|
||||||
|
// skrot: e.error.message,
|
||||||
|
// stos: e.error.stack,
|
||||||
|
// plik: e.filename,
|
||||||
|
// linia: e.lineno,
|
||||||
|
// kolumna: e.colno
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
|
||||||
|
//setInterval(function(){alert('test: '+$('*[src=""],*[href=""]').length);},3000);
|
||||||
|
//ustawTabIndexy()
|
||||||
|
/*if(typeof system_url=='undefined')
|
||||||
|
{
|
||||||
|
var c = getCookie('system_url');
|
||||||
|
if(c!='')
|
||||||
|
{
|
||||||
|
system_url = decodeURIComponent(c);
|
||||||
|
delete c;
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
document.cookie = 'rozdzielczosc=' + screen.width + 'x' + screen.height + '; path=/';
|
||||||
|
|
||||||
|
document.onkeydown = function(evt) {
|
||||||
|
evt = evt || window.event;
|
||||||
|
if (evt.keyCode == 27) {
|
||||||
|
if($("#zakryjcontent:visible").height() != null)
|
||||||
|
{
|
||||||
|
$("#zakryjcontent .zamknij").click();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(evt.keyCode==8)
|
||||||
|
{
|
||||||
|
if($("[id*=niebezpiecznaOperacja]:visible").height() != null)
|
||||||
|
{
|
||||||
|
evt.preventDefault();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
kasowanieClick();
|
||||||
|
|
||||||
|
/*$("a#wyloguj").click(
|
||||||
|
function() {
|
||||||
|
return confirm("Wylogować ?");
|
||||||
|
}
|
||||||
|
);*/
|
||||||
|
|
||||||
|
if ( self != top )
|
||||||
|
{
|
||||||
|
top.location = self.location;
|
||||||
|
}
|
||||||
|
|
||||||
|
repozytorium();
|
||||||
|
|
||||||
|
$(window).resize(function() {
|
||||||
|
if($("#zakryjcontent:visible").height() != null) {
|
||||||
|
oknoDynamiczneResize(1,szerokoscOkna);
|
||||||
|
}
|
||||||
|
repozytorium();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$('form').submit(
|
||||||
|
function() {
|
||||||
|
var form = $(this);
|
||||||
|
var submit = form.find('input[type=submit]');
|
||||||
|
form.css('opacity','0.8');
|
||||||
|
submit.attr('disabled','true').css('opacity','0.5');
|
||||||
|
setTimeout(function(){submit.removeAttr('disabled').css('opacity','1'),form.css('opacity','1')},2000);
|
||||||
|
|
||||||
|
var liczbaPol = $(this).serializeArray().length;
|
||||||
|
if(liczbaPol > 5990){
|
||||||
|
alert('Formularz nie może zostać przesłany, gdyż przekroczono limit 6000 pól.');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
/* AJAX INFO */
|
||||||
|
var content = $('#content');
|
||||||
|
if(content.length==1)
|
||||||
|
{
|
||||||
|
//if($('#ajax_loading_e_dziennik').get(0)==undefined)
|
||||||
|
//{
|
||||||
|
// $('body').append('<div id="ajax_loading_e_dziennik" style="display:none; padding:5px; position:fixed; bottom:10px; -moz-border-radius: 2px; -webkit-border-radius: 2px; -moz-box-shadow: 0px 0px 2px #1783DB; -webkit-box-shadow: 0px 0px 2px #1783DB; box-shadow: 0px 0px 2px #1783DB; border-radius: 2px;"><img src="'+system_url+'/dziennik/wait_iam_loading3.gif" alt=""/></div>');
|
||||||
|
// var ajax_loading = $('#ajax_loading_e_dziennik');
|
||||||
|
// ajax_loading.css({
|
||||||
|
// 'left' : parseInt(content.offset().left+parseInt(content.css('width'))+20)
|
||||||
|
// });
|
||||||
|
//}
|
||||||
|
|
||||||
|
$(document).ajaxSend(function() {
|
||||||
|
//ajax_loading.stop(true, false).fadeIn('normal');
|
||||||
|
if(ajax_wait_cursor)
|
||||||
|
{
|
||||||
|
$('body').prepend('<style id="cursor_loading">*{cursor:wait;}</style>');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).ajaxComplete(function(event, xhr, settings) {
|
||||||
|
// if(settings.url!=system_url+'/helper/generujtokenos' &&
|
||||||
|
// settings.url!=system_url+'/dyrektor/ajaxzastepstwaplandladnia' &&
|
||||||
|
// settings.url!=system_url+'/helper/numerlekcji'){
|
||||||
|
// //alert(xhr.responseText);
|
||||||
|
// generowanieTokenow();
|
||||||
|
// }
|
||||||
|
|
||||||
|
if(strpos(xhr.responseText, '<form')){
|
||||||
|
//alert(xhr.responseText);
|
||||||
|
generowanieTokenow();
|
||||||
|
}
|
||||||
|
|
||||||
|
//ajax_loading.stop(true, false).fadeOut('normal');
|
||||||
|
okienkaInformacyjne();
|
||||||
|
//ustawTabIndexy();
|
||||||
|
$('style#cursor_loading').remove();
|
||||||
|
});
|
||||||
|
|
||||||
|
// do autozalogowania, by przedluzyc sesje
|
||||||
|
$('body').on('change', 'input, textarea, select', function(){
|
||||||
|
extendSession = 1;
|
||||||
|
});
|
||||||
|
|
||||||
|
sprawdzZalogowanie(); // dołożone dodatkowo 09.01.2014
|
||||||
|
//zapiszLekcjeOffline();
|
||||||
|
okienkaInformacyjne();
|
||||||
|
|
||||||
|
generowanieTokenow();
|
||||||
|
|
||||||
|
$('input[autocomplete=off]').filter(":visible").attr('readonly','1').focus(
|
||||||
|
function(){
|
||||||
|
$(this).removeAttr('readonly');
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/* AJAX INFO STOP */
|
||||||
|
|
||||||
|
$('a.szczesliwy_numerek').tipsy({html:false,gravity: "w",opacity: 1}).click(function() {return false;});
|
||||||
|
|
||||||
|
$('.powiadomienie_menu').parent('a').css('position','relative');
|
||||||
|
|
||||||
|
$("body").on('mouseover mouseleave focus blur','a.info:not(.info-click)', function(e){
|
||||||
|
if (e.type === 'mouseover' || e.type === 'focusin')
|
||||||
|
{
|
||||||
|
var dymek = $(this).find('span:not(.sr-only)');
|
||||||
|
if(!dymek.length) return false;
|
||||||
|
|
||||||
|
if($(this).data('tooltip')){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!dymek.html().trim().length){
|
||||||
|
dymek.css('display','none');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var elOffset = $(this).offset();
|
||||||
|
|
||||||
|
var dymek_style = '';
|
||||||
|
if(dymek.attr('style') != undefined){
|
||||||
|
dymek_style = ' style="'+dymek.attr('style')+'"';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$('#mbtooltips').length)
|
||||||
|
$('body').append('<div id="mbtooltips"></div>');
|
||||||
|
|
||||||
|
$('body #mbtooltips').html('');
|
||||||
|
$('body #mbtooltips').append('<span'+dymek_style+'>'+dymek.html()+'</span>');
|
||||||
|
|
||||||
|
var tooltip = $('body #mbtooltips span:last');
|
||||||
|
tooltip.css('top', '1px').css('left', '1px').css('width', dymek.width()).height(dymek.height()).css('display','block');
|
||||||
|
|
||||||
|
var top = elOffset.top-15-tooltip.height();
|
||||||
|
var left = elOffset.left;
|
||||||
|
|
||||||
|
|
||||||
|
if(left+tooltip.width()+15 > $(window).scrollLeft()+$(window).width()){
|
||||||
|
left -= (left+tooltip.width()+15) - ($(window).scrollLeft()+$(window).width());
|
||||||
|
}
|
||||||
|
|
||||||
|
if(top < $(window).scrollTop()){
|
||||||
|
top = elOffset.top+25;
|
||||||
|
}
|
||||||
|
|
||||||
|
tooltip.css('top', top+'px').css('left', left+'px');
|
||||||
|
|
||||||
|
dymek.css('display','none');
|
||||||
|
|
||||||
|
if (!dymek.parent().find('.sr-only').length) {
|
||||||
|
dymek.after('<span class="sr-only">' + dymek.html() + '</span>');
|
||||||
|
}
|
||||||
|
|
||||||
|
$(this).data('tooltip', { tooltip: tooltip });
|
||||||
|
tooltip.data('tooltip', { parent: $(this) });
|
||||||
|
|
||||||
|
tooltip.on('mouseenter', function(){
|
||||||
|
clearTimeout($(this).data('tooltip').parent.data('tooltip').tmt);
|
||||||
|
}).off('mouseleave').on('mouseleave', function(){
|
||||||
|
var parent = $(this).data('tooltip').parent;
|
||||||
|
var data = parent.data('tooltip');
|
||||||
|
data.tmt = setTimeout(function(){
|
||||||
|
if(data && data.tooltip){
|
||||||
|
data.tooltip.remove();
|
||||||
|
parent.data('tooltip', false);
|
||||||
|
}
|
||||||
|
}, 100);
|
||||||
|
parent.data('tooltip', data);
|
||||||
|
});
|
||||||
|
|
||||||
|
}else if(e.type === 'mouseleave' || e.type === 'focusout'){
|
||||||
|
var ths = $(this);
|
||||||
|
var data = $(this).data('tooltip');
|
||||||
|
data.tmt = setTimeout(function(){
|
||||||
|
if(data && data.tooltip){
|
||||||
|
data.tooltip.remove();
|
||||||
|
ths.data('tooltip', false);
|
||||||
|
}
|
||||||
|
}, 100);
|
||||||
|
$(this).data('tooltip', data);
|
||||||
|
// $('body #mbtooltips').html('');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//setInterval(function(){ustawTabIndexy();},1000);
|
||||||
|
|
||||||
|
// do wyłączania tooltipów przy klikaniu na inny element w przeglądarce mobilnej
|
||||||
|
if(isMobile()){
|
||||||
|
$('body').on('click', '*', function(){
|
||||||
|
$('body #mbtooltips').html('');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$('.info-click').live('click',
|
||||||
|
function() {
|
||||||
|
$(this).find('span').toggle();
|
||||||
|
}
|
||||||
|
).mouseleave(
|
||||||
|
function() {
|
||||||
|
$(this).find('span:visible').toggle();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
$('.przecinek_na_kropke').live('change',
|
||||||
|
function() {
|
||||||
|
var wartosc = $(this).val();
|
||||||
|
if(wartosc!='' && wartosc!=undefined)
|
||||||
|
{
|
||||||
|
$(this).val($(this).val().replace(",", "."));
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
$('body').on('focusout', 'input', function(){
|
||||||
|
var type = $(this).attr('type');
|
||||||
|
var types = new Array('text', 'number', 'email', 'color', 'date', 'month', 'range', 'search', 'tel', 'time', 'url', 'week');
|
||||||
|
if($(this).attr('data-dozwolona-spacja') || types.indexOf(type) == -1){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
$(this).val( $(this).val().trim() );
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.bez_spacji').keyup(
|
||||||
|
function() {
|
||||||
|
var wartosc = $(this).val();
|
||||||
|
if(wartosc!='' && wartosc!=undefined)
|
||||||
|
{
|
||||||
|
$(this).val($(this).val().replace(" ", ""));
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
$('.walidacja_liczba').live('change',
|
||||||
|
function() {
|
||||||
|
var wartosc = $(this).val();
|
||||||
|
if(wartosc!='' && wartosc!==undefined)
|
||||||
|
{
|
||||||
|
$(this).val($(this).val().replace(",", "."));
|
||||||
|
if(isNaN($(this).val()))
|
||||||
|
{
|
||||||
|
alert('Podano niepoprawną wartość - wymagana jest liczba.');
|
||||||
|
$(this).val('');
|
||||||
|
}
|
||||||
|
else if($(this).hasClass('kwota'))
|
||||||
|
{
|
||||||
|
$(this).val(parseFloat($(this).val()).toFixed(2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
$('.walidacja_pesel').live('change',
|
||||||
|
function() {
|
||||||
|
var pole = $(this);
|
||||||
|
var wartosc = pole.val();
|
||||||
|
if(wartosc!='' && wartosc!==undefined)
|
||||||
|
{
|
||||||
|
$.post(
|
||||||
|
system_url+'/helper/sprawdzpesel', {pesel:wartosc},
|
||||||
|
function(data)
|
||||||
|
{
|
||||||
|
if(data==0)
|
||||||
|
{
|
||||||
|
alert('Podany nr PESEL jest nieprawidłowy!');
|
||||||
|
pole.val('');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
$('.walidacja_email').change(
|
||||||
|
function()
|
||||||
|
{
|
||||||
|
var pole = $(this);
|
||||||
|
var email = pole.val();
|
||||||
|
if(email!='' && email!==undefined)
|
||||||
|
{
|
||||||
|
$.post(
|
||||||
|
system_url+'/helper/sprawdzmaila', {email:email},
|
||||||
|
function(data)
|
||||||
|
{
|
||||||
|
if(data!=1)
|
||||||
|
{
|
||||||
|
alert("Wygląda na to, że podany adres e-mail \""+email+"\" jest niepoprawny!");
|
||||||
|
pole.val('');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
$('body').on('change', '.walidacja_isbn', function(){
|
||||||
|
var pole = $(this);
|
||||||
|
var wartosc = pole.val();
|
||||||
|
pole.attr('walidacja', 'false');
|
||||||
|
if(wartosc!='' && wartosc!==undefined){
|
||||||
|
$.post(system_url+'/helper/sprawdzisbn', {isbn:wartosc},
|
||||||
|
function(data){
|
||||||
|
if(data==0){
|
||||||
|
pole.attr('walidacja','false');
|
||||||
|
}else{
|
||||||
|
pole.val(data);
|
||||||
|
pole.attr('walidacja','true');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
// uruchomienie podstrony przez rekord tabeli
|
||||||
|
$('body').on('mouseup keypress', 'table[link] tbody tr.podswietl[rel], table[link] tr.podswietl[rel]', function(e){
|
||||||
|
|
||||||
|
if($(e.target).is('[data-link-no-click]') || $(e.target).parents('[data-link-no-click]').length){
|
||||||
|
return true;
|
||||||
|
}else if($(e.target).is('a')){
|
||||||
|
var url = $(e.target).attr('href');
|
||||||
|
}else if($(e.target).parents('a').length){
|
||||||
|
var url = $(e.target).parents('a').attr('href');
|
||||||
|
}else{
|
||||||
|
var url = $(this).parents().filter('table[link]').eq(0).attr('link')+$(this).attr('rel');
|
||||||
|
}
|
||||||
|
|
||||||
|
otworzLink(url, e);
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
|
// zapobieganie uruchamiania scrollowania
|
||||||
|
$('body').on('mousedown', 'table[link] tbody tr.podswietl[rel], table[link] tr.podswietl[rel]', function(e){
|
||||||
|
if(e.which === 2){
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// tooltip
|
||||||
|
$('.autoTooltip').tipsy({html:true,gravity: 's',opacity: 1, live: true, align: 'left'});
|
||||||
|
|
||||||
|
// automatyczne zaznaczenie pola option o podanej wartosci
|
||||||
|
$('select[opt]').each(function(){
|
||||||
|
$(this).val( $(this).attr('opt') );
|
||||||
|
});
|
||||||
|
|
||||||
|
// wczytywanie do tooltipa tresci z url podanego w atrybucie
|
||||||
|
$('body').on('click', '[clickTooltipAjax]', function(e){
|
||||||
|
var ths = $(this);
|
||||||
|
|
||||||
|
if(ths.attr('original-title')){
|
||||||
|
e.stopImmediatePropagation();
|
||||||
|
|
||||||
|
ths.tipsy("show");
|
||||||
|
$('body').one('click', clickTooltipAjaxHide);
|
||||||
|
}else{
|
||||||
|
|
||||||
|
$.post(ths.attr('clickTooltipAjax'), jQuery.parseJSON(ths.attr('data-json')),
|
||||||
|
function(data){
|
||||||
|
ths.attr('title', data);
|
||||||
|
ths.tipsy({trigger: 'manual', html:true, gravity: 'n', opacity: 1, width: ths.data('width')}).tipsy('show');
|
||||||
|
$('body').one('click', clickTooltipAjaxHide);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
var clickTooltipAjaxHide = function(e){
|
||||||
|
$('[clickTooltipAjax][original-title]').tipsy("hide");
|
||||||
|
}
|
||||||
|
|
||||||
|
$('body').on('click', 'tr.zaznacz-checkbox', function(event){
|
||||||
|
if($(event.target).is('input.zaznacz[type=checkbox], .nie-zaznaczaj')){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
var checkbox = $(this).find('input.zaznacz[type=checkbox]:not([disabled])').first();
|
||||||
|
checkbox.attr('checked', !checkbox.is(':checked') ).change();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$('body').on('click', 'tr.zaznacz-radio', function(event){
|
||||||
|
$(this).find('input.zaznacz[type=radio]:not([disabled])').first().attr('checked', true).change();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$('body').on('click', '.mobidziennik_wiadomosci_link_confirm', function(event){
|
||||||
|
return confirm("Jeśli stronę \""+$(this).attr('href')+"\" uznajesz za bezpieczną, potwierdź OK w celu przejścia do niej.");
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// scrolltop by attr in url
|
||||||
|
if(document.location.hash.length && document.location.hash.indexOf('scrolltop:')){
|
||||||
|
var scrolltop = document.location.hash.split('scrolltop:');
|
||||||
|
$('body, html').scrollTop( parseInt(scrolltop[1]) );
|
||||||
|
}
|
||||||
|
|
||||||
|
var mouseleaveItems = [];
|
||||||
|
var mouseleaveTimeouts = [];
|
||||||
|
|
||||||
|
function showMenuItem(item) {
|
||||||
|
$(item).css('background', '#fff');
|
||||||
|
$(item).css('position', 'relative');
|
||||||
|
$(item).children('ul').css('visibility', 'visible').css('opacity', '1');
|
||||||
|
}
|
||||||
|
|
||||||
|
function hideMenuItem(item) {
|
||||||
|
$(item).css('background', '');
|
||||||
|
var ul = $(item).find('ul');
|
||||||
|
ul.css('visibility', '').css('opacity', '0');
|
||||||
|
}
|
||||||
|
|
||||||
|
function getMenuLevel(item) {
|
||||||
|
var level = 0;
|
||||||
|
if ($(item).parent().parent().parent().parent().parent().prop('id') === 'menu_gray') {
|
||||||
|
level = 1;
|
||||||
|
} else if ($(item).parent().parent().parent().parent().parent().parent().parent().prop('id') === 'menu_gray') {
|
||||||
|
level = 2;
|
||||||
|
} else if ($(item).parent().parent().parent().parent().parent().parent().parent().parent().parent().prop('id') === 'menu_gray') {
|
||||||
|
level = 3;
|
||||||
|
}
|
||||||
|
return level;
|
||||||
|
}
|
||||||
|
|
||||||
|
function menuMouseenter() {
|
||||||
|
var level = getMenuLevel(this);
|
||||||
|
for (var i = level; i <= 3; i++) {
|
||||||
|
clearTimeout(mouseleaveTimeouts[i]);
|
||||||
|
if (mouseleaveItems[level] !== this) {
|
||||||
|
hideMenuItem(mouseleaveItems[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
showMenuItem(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
function menuMouseleave() {
|
||||||
|
var item = this;
|
||||||
|
var level = getMenuLevel(item);
|
||||||
|
if (level === 0 && $(item).find('ul').length === 0) {
|
||||||
|
hideMenuItem(item);
|
||||||
|
} else {
|
||||||
|
mouseleaveItems[level] = item;
|
||||||
|
mouseleaveTimeouts[level] = setTimeout(function() {
|
||||||
|
hideMenuItem(item);
|
||||||
|
}, 400);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function menuFocus() {
|
||||||
|
|
||||||
|
$(this).mouseenter();
|
||||||
|
}
|
||||||
|
|
||||||
|
function menuBlur() {
|
||||||
|
$(this).mouseleave();
|
||||||
|
}
|
||||||
|
|
||||||
|
$('body').on('mouseenter', '#menu_gray li', menuMouseenter);
|
||||||
|
$('body').on('mouseleave', '#menu_gray li', menuMouseleave);
|
||||||
|
$('body').on('focus', '#menu_gray a', menuFocus);
|
||||||
|
$('body').on('blur', '#menu_gray a', menuBlur);
|
||||||
|
|
||||||
|
if($('body').attr('data-zablokowany') == 'true'){
|
||||||
|
$('body').on('click change', 'input[type=text], input[type=password], input[type=checkbox], input[type=radio], textarea, select, .ui-dropdownchecklist, .ui-dropdownchecklist-selector', function(){
|
||||||
|
if($(this).attr('data-dostepnosc-zablokowany') == 'true' || getCookie('dziennik-zablokowany-alert')){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
setCookie('dziennik-zablokowany-alert', '1', 0.0416); // 1h
|
||||||
|
alert('Dziennik został zablokowany lub przeniesiony do archiwum. Dokonywanie wszelkich zmian jest niemożliwe.');
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$('body').on('change', 'input.hasDatepicker:not([readonly])', function(){
|
||||||
|
if(!isValidDate($(this).val())){
|
||||||
|
$(this).val('');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
2641
dziennik/skrypty_funkcje.js
Normal file
4292
dziennik/style.css
Normal file
16113
dziennik/tiny_mce.js
vendored
Normal file
58
dziennik/wiadomoscikopierobocze.php
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
echo("
|
||||||
|
<a href=\"#\" class=\"button_right zamknij\" title=\"Zamknij okno\">X</a>
|
||||||
|
<h1>Kopie robocze</h1>
|
||||||
|
<script type=\"text/javascript\">
|
||||||
|
<!--
|
||||||
|
$(document).ready(
|
||||||
|
function()
|
||||||
|
{
|
||||||
|
$('div.podswietl').click(
|
||||||
|
function() {
|
||||||
|
if(confirm('Wczytać temat oraz treść do formularza tworzenia wiadomości ?')==true)
|
||||||
|
{
|
||||||
|
$('input[name=nazwa]').val($(this).find('span.temat').html());
|
||||||
|
tinyMCE.get('tresc').setContent($(this).find('span.tresc').html());
|
||||||
|
$('#zakryjcontent').scrollTop(0);
|
||||||
|
$('.zamknij').click();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
$('div.podswietl').keypress(
|
||||||
|
function (event) {
|
||||||
|
if (event.which == 13) {
|
||||||
|
$(event.target).click();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
$('div.podswietl button.usun').click(
|
||||||
|
function() {
|
||||||
|
if(confirm('Czy na pewno usunąć kopie roboczą ?')==true)
|
||||||
|
{
|
||||||
|
alert(this.parentElement.tabIndex);
|
||||||
|
$('#zakryjcontent').scrollTop(0);
|
||||||
|
$('.zamknij').click();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
//-->
|
||||||
|
</script>
|
||||||
|
");
|
||||||
|
|
||||||
|
|
||||||
|
echo("
|
||||||
|
<div class=\"podswietl komorka_biala\" style=\"padding:10px; margin-bottom:10px; border: 1px solid #aaa; border-radius: 4px;\" tabindex=\"0\">
|
||||||
|
<span class=\"tresc\"><p>Test</p></span>
|
||||||
|
<br/><br/>
|
||||||
|
Temat: <strong><span class=\"temat\">Test</span></strong><br/>
|
||||||
|
Zapisano: <strong>wtorek, 10 lutego 2026, godzina 14:16:13</strong>
|
||||||
|
<button style=\"float: right;\" class=\"usun\">Usuń</button>
|
||||||
|
</div>
|
||||||
|
");
|
||||||
|
?>
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
<link href="/favicon.ico" rel="favicon">
|
<link href="/favicon.ico" rel="favicon">
|
||||||
<link href="/assets/css/main.css" rel="stylesheet">
|
<link href="/assets/css/main.css" rel="stylesheet">
|
||||||
<link href="/assets/css/galeria.css" rel="stylesheet">
|
<link href="/assets/css/galeria.css" rel="stylesheet">
|
||||||
<script src="/assets/js/nawigacja.js"></script>
|
<script type="module" src="/assets/js/index.js"></script>
|
||||||
<script data-goatcounter="https://zeszyt.nonamesoft.xyz/count" async src="/assets/js/count.js"></script>
|
<script data-goatcounter="https://zeszyt.nonamesoft.xyz/count" async src="/assets/js/count.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
103
grafika.html
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="pl">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Grafika - MaszToZadanieDomowe.com</title>
|
||||||
|
<link href="/favicon.ico" rel="favicon">
|
||||||
|
<link href="/assets/css/main.css" rel="stylesheet">
|
||||||
|
<link href="/assets/css/galeria.css" rel="stylesheet">
|
||||||
|
<script data-goatcounter="https://zeszyt.nonamesoft.xyz/count" async src="/assets/js/count.js"></script>
|
||||||
|
<script type="module" src="/assets/js/index.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header-comp></header-comp>
|
||||||
|
<main>
|
||||||
|
<h2>HTML Grafika</h2>
|
||||||
|
<hr>
|
||||||
|
<ol>
|
||||||
|
<li>
|
||||||
|
<h4>Technologia strony</h4>
|
||||||
|
<h6>Także pasuje pod zadanie 2</h6>
|
||||||
|
<hr>
|
||||||
|
<div class="flex-col">
|
||||||
|
<div class="technologia">
|
||||||
|
<figure>
|
||||||
|
<img width="192" height="192" src="/assets/images/html6.webp" alt="Koncepcja loga następnej wersji HTMLa która nigdy nie powstanie">
|
||||||
|
<figcaption>
|
||||||
|
HTML6
|
||||||
|
</figcaption>
|
||||||
|
</figure>
|
||||||
|
<figure>
|
||||||
|
<img width="192" height="192" src="/assets/images/purple-css-logo.webp" alt="Nowe logo CSSa">
|
||||||
|
<figcaption>
|
||||||
|
<span style="color: rebeccapurple; text-shadow: 0px 0px 5px white, 0 0 5px white, 0 0 5px white; font-weight: bold;">
|
||||||
|
CSS 4
|
||||||
|
</span>
|
||||||
|
<br>
|
||||||
|
🖕♋
|
||||||
|
</figcaption>
|
||||||
|
</figure>
|
||||||
|
<figure>
|
||||||
|
<img width="192" height="192" src="/assets/images/es2266-ecmascript-logo.svg" alt="Parodia loga ECMAScript">
|
||||||
|
<figcaption>
|
||||||
|
ECMAScript
|
||||||
|
<br>
|
||||||
|
<a href="https://github.com/wingsuitist/ecmascript-logo">Źródło</a>
|
||||||
|
</figcaption>
|
||||||
|
</figure>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
<li value="3">
|
||||||
|
<h4>Projekty w rozwoju</h4>
|
||||||
|
<hr>
|
||||||
|
<div class="flex-col">
|
||||||
|
<div class="pozycjonowany">
|
||||||
|
<a href="https://hazzy.nonamesoft.xyz/ghostfox/qyouradio"><h4>QYouRadio</h4></a>
|
||||||
|
<img width="433" height="243" src="/assets/images/qyouradio.png" alt="Interfejs QYouRadio">
|
||||||
|
Desktopowy klient YouRadio napisany w Qt i QMLu. Bardzo wygodny w używaniu (mimo obecnej niedorbóki).
|
||||||
|
</div>
|
||||||
|
<div class="pozycjonowany">
|
||||||
|
<a href="https://hazzy.nonamesoft.xyz/ghostfox/qyouvideo"><h4>QYouVideo</h4></a>
|
||||||
|
<img width="433" height="243" src="/assets/images/qyouvideo.png" alt="Interfejs QYouVideo">
|
||||||
|
QYouVideo to bazujący na QYouRadio klient YouVideo zrobiony dla jaj (widać po commitach) w praktycznie 2 dni. Powstał tylko dlatego że Youpiter wział się za tworzenie nowej strony YouVideo i chciałem zobaczyć ile czasu zajeło by mi stworzenie wszystkiego. Obecnie interfejs ma buga że nowo otwarte listy filmów nie mogą otwierać filmów.
|
||||||
|
</div>
|
||||||
|
<div class="pozycjonowany">
|
||||||
|
<h4>Yerner</h4>
|
||||||
|
<img width="433" height="243" src="/assets/images/screenshot000.png" alt="Interfejs Yernera">
|
||||||
|
Yerner to miniaturowe ISO Linuxa (kastracja pingwina zajeła całkiem dużo czasu ale było warto) które w założeniu ma mieć zawarte w
|
||||||
|
sobie wszystko potrzebne
|
||||||
|
do szybkiego rozpoczęcia kopania Monero. Jak coś to nie, nie chce kopać krypto na masową skale. Yerner powstał z tego że chciałem
|
||||||
|
sprawdzić ile
|
||||||
|
wszystkie moje komputery mogą wykopać ale zamiast rozsądnie manualnie zainstalować koparki i je uruchomić (na przykład w trybie testowym),
|
||||||
|
postanowiłem zrobić własne ISO z wszystkim :3. Na razie mam same podstawowe ISO (bez sieci i Mesy, sterowników od grafiki) sam plik zajmuje
|
||||||
|
jedynie 265mb. Dlaczego zrobiłem je tak
|
||||||
|
małe? Żeby szybko mogło się do skopiować do RAMu aby można było tym samym nośnikiem uruchomić kopie na wszystkich komputerach. Aby
|
||||||
|
całość była jeszcze bardziej profesjonalna, zamierzam obudować wszystko interfejsem graficznym (i całkowicie wywalić TTY) zrobionym (jak na razie)
|
||||||
|
C++ie ze wsparciem Rayliba i ImGui działającym w stu procentach na Linuxowym DRMie! Nie, nie chodzi mi o TEGO DRMa. Zrzut ekranu pokazuje obecny stan interfejsu (żaden).
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
<li>
|
||||||
|
<h4>Galeria czegokolwiek co znajde</h4>
|
||||||
|
<hr>
|
||||||
|
<a href="https://store.steampowered.com/app/2999060/Sejm_The_Game/?l=polish">Sejm the Game</a> wyjdzie 22 października o 16:00. Serdecznie polecam. Kto by nie chciał założyć własnej partii poltycznej i dojść do władzy (zgaduje) krok po kroku... kłamstwo po kłamstwie oraz pięść po pięści.
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<div class="flowing">
|
||||||
|
<a href="https://babylonbee.com/news/parents-worried-non-violent-video-games-turning-kids-into-sissies" target="_blank"><img src="/assets/images/Tak_sie_konczy_walka_z_przemocaw_grach_1760436288.jpg"></a>
|
||||||
|
<a><img src="/assets/images/kaczka.png"></a>
|
||||||
|
<a><img src="/assets/images/portret.png"></a>
|
||||||
|
<a><img src="/assets/images/kawusia.png"></a>
|
||||||
|
<a><img src="/assets/images/spokoj.png"></a>
|
||||||
|
</table>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
</ol>
|
||||||
|
</main>
|
||||||
|
<footer-comp></footer-comp>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
<title>Moje Hobby - MaszToZadanieDomowe.com</title>
|
<title>Moje Hobby - MaszToZadanieDomowe.com</title>
|
||||||
<link href="/favicon.ico" rel="favicon">
|
<link href="/favicon.ico" rel="favicon">
|
||||||
<link href="/assets/css/main.css" rel="stylesheet">
|
<link href="/assets/css/main.css" rel="stylesheet">
|
||||||
<script src="/assets/js/nawigacja.js"></script>
|
<script type="module" src="/assets/js/index.js"></script>
|
||||||
<script data-goatcounter="https://zeszyt.nonamesoft.xyz/count" async src="/assets/js/count.js"></script>
|
<script data-goatcounter="https://zeszyt.nonamesoft.xyz/count" async src="/assets/js/count.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<title>MaszToZadanieDomowe.com</title>
|
<title>MaszToZadanieDomowe.com</title>
|
||||||
<link href="/favicon.ico" rel="favicon">
|
<link href="/favicon.ico" rel="favicon">
|
||||||
<link href="assets/css/main.css" rel="stylesheet">
|
<link href="assets/css/main.css" rel="stylesheet">
|
||||||
<script src="assets/js/nawigacja.js" defer></script>
|
<script type="module" src="assets/js/index.js"></script>
|
||||||
<script data-goatcounter="https://zeszyt.nonamesoft.xyz/count" async src="/assets/js/count.js"></script>
|
<script data-goatcounter="https://zeszyt.nonamesoft.xyz/count" async src="/assets/js/count.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
170
js-funkcje.html
Normal file
@@ -0,0 +1,170 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="pl">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>JS Zad. Funkcje - MaszToZadanieDomowe.com</title>
|
||||||
|
<link href="/favicon.ico" rel="favicon">
|
||||||
|
<link href="/assets/css/main.css" rel="stylesheet">
|
||||||
|
<link href="/assets/css/js-warunkowe.css" rel="stylesheet">
|
||||||
|
<script data-goatcounter="https://zeszyt.nonamesoft.xyz/count" async src="/assets/js/count.js"></script>
|
||||||
|
<script type="module" src="/assets/js/index.js"></script>
|
||||||
|
<script src="/assets/js/js-wspolne.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header-comp></header-comp>
|
||||||
|
<main>
|
||||||
|
<h2>JavaScript Funkcje</h2>
|
||||||
|
<hr>
|
||||||
|
<ol>
|
||||||
|
<li>
|
||||||
|
<h4>Suma liczb</h4>
|
||||||
|
<hr>
|
||||||
|
<pre class="kod">
|
||||||
|
function suma(a, b) {
|
||||||
|
return a + b;
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
<li>
|
||||||
|
<h4>Podstawy liczb</h4>
|
||||||
|
<hr>
|
||||||
|
<pre class="kod">
|
||||||
|
function podstawy() {
|
||||||
|
const roznica = a - b;
|
||||||
|
console.log("Wynik różnicy: " + roznica);
|
||||||
|
const iloraz = a * b;
|
||||||
|
console.log("Wynik ilorazu: " + iloraz);
|
||||||
|
if (b == 0) {
|
||||||
|
console.log("Nie można wyliczyć ilorazu, gryż B jest zerem");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const iloczyn = a / b;
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
<li>
|
||||||
|
<h4>BMI</h4>
|
||||||
|
<hr>
|
||||||
|
<pre class="kod">
|
||||||
|
function bmi(masa, wzrost) {
|
||||||
|
const BMI = masa / (wzrost * wzrost);
|
||||||
|
let wiadomosc = "";
|
||||||
|
if (BMI >= 40) {
|
||||||
|
wiadomosc = "Otyłość III stopnia";
|
||||||
|
} else if (BMI >= 35) {
|
||||||
|
wiadomosc = "Otyłość II stopnia";
|
||||||
|
} else if (BMI >= 30) {
|
||||||
|
wiadomosc = "Otyłość I stopnia";
|
||||||
|
} else if (BMI >= 25) {
|
||||||
|
wiadomosc = "Nadwaga";
|
||||||
|
} else if (BMI >= 18.5) {
|
||||||
|
wiadomosc = "Optimum";
|
||||||
|
} else if (BMI >= 17) {
|
||||||
|
wiadomosc = "Niedowaga";
|
||||||
|
} else if (BMI >= 16) {
|
||||||
|
wiadomosc = "Wychudzenie";
|
||||||
|
} else if (BMI < 16) {
|
||||||
|
wiadomosc = "Wygłodzenie";
|
||||||
|
}
|
||||||
|
alert("Wynik BMI: " + wiadomosc);
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
<li>
|
||||||
|
<h4>Wyliczanie trójkąta</h4>
|
||||||
|
<hr>
|
||||||
|
<pre class="kod">
|
||||||
|
function trojkatValidator(a, b, c) {
|
||||||
|
return a + b > c;
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
<li>
|
||||||
|
<h4>Szyfr Cezara</h4>
|
||||||
|
<hr>
|
||||||
|
<pre class="kod">
|
||||||
|
function szyfr(tekst) {
|
||||||
|
let wyjscie = "";
|
||||||
|
for (let i = 0; tekst.length > i; i++) {
|
||||||
|
let kod = tekst.charCodeAt(i);
|
||||||
|
kod += ((kod >= 0x41 && kod <= 0x5A) || (kod >= 0x61 && kod <= 0x7A)) ? 2 : 0;
|
||||||
|
if (kod >= 0x41 && kod >= 0x5A && kod <= 0x5C) {
|
||||||
|
kod -= 0x5A - 0x41;
|
||||||
|
} else if (kod >= 0x61 && kod >= 0x7A && kod <= 0x7C) {
|
||||||
|
kod -= 0x7A - 0x61;
|
||||||
|
}
|
||||||
|
wyjscie += String.fromCharCode(kod);
|
||||||
|
}
|
||||||
|
return wyjscie;
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
<li value="7">
|
||||||
|
<h4>Papier kamień nożyce</h4>
|
||||||
|
<hr>
|
||||||
|
<pre class="kod">
|
||||||
|
function pkn(gracz1, gracz2) {
|
||||||
|
// Numery pod debugging
|
||||||
|
const lookup = ["papier", "kamien", "nozyce", "papier", "kamien", "nożyce", 0, 1, 2];
|
||||||
|
let g1 = -1;
|
||||||
|
let g2 = -1;
|
||||||
|
lookup.forEach((nazwa, index) => {
|
||||||
|
if (g1 == -1 && gracz1 == nazwa) {
|
||||||
|
g1 = index % 3;
|
||||||
|
}
|
||||||
|
if (g2 == -1 && gracz2 == nazwa) {
|
||||||
|
g2 = index % 3;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (g1 == -1 || g2 == -1) {
|
||||||
|
console.log("Niepoprawne wejście!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(`Gracz 1: ${lookup[g1]} Gracz 2: ${lookup[g2]}`);
|
||||||
|
|
||||||
|
if (g1 == g2) {
|
||||||
|
console.log("Remis");
|
||||||
|
} else if (g1 > g2) {
|
||||||
|
console.log("Gracz 1 wygrywa");
|
||||||
|
} else if (g1 < g2) {
|
||||||
|
console.log("Gracz 2 wygrywa");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
<li>
|
||||||
|
<h4>To co powinno się robić</h4>
|
||||||
|
<hr>
|
||||||
|
<pre class="kod">
|
||||||
|
// Nie ma na co wynajdywać koła na nowo, tylko bugi będą
|
||||||
|
maksimum = Math.max;
|
||||||
|
</pre>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
<li value="10">
|
||||||
|
<h4>Ciekawa funkcja</h4>
|
||||||
|
<hr>
|
||||||
|
<pre class="kod">
|
||||||
|
function maszyna() {
|
||||||
|
if (arguments.length == 0) {
|
||||||
|
console.log("Przekaż funkcji argumenty");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return arguments[Math.floor(Math.random() * arguments.length)];
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
</ol>
|
||||||
|
</main>
|
||||||
|
<footer-comp></footer-comp>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
76
js-petle.html
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="pl">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>JS Pętle. - MaszToZadanieDomowe.com</title>
|
||||||
|
<link href="/favicon.ico" rel="favicon">
|
||||||
|
<link href="/assets/css/main.css" rel="stylesheet">
|
||||||
|
<script data-goatcounter="https://zeszyt.nonamesoft.xyz/count" async src="/assets/js/count.js"></script>
|
||||||
|
<script type="module" src="/assets/js/index.js"></script>
|
||||||
|
<script src="/assets/js/akordeon.js"></script>
|
||||||
|
<script src="/assets/js/js-wspolne.js"></script>
|
||||||
|
<script src="/assets/js/js-petle.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header-comp></header-comp>
|
||||||
|
<main>
|
||||||
|
<h2>JavaScript Pętle</h2>
|
||||||
|
<hr>
|
||||||
|
<ol>
|
||||||
|
<li>
|
||||||
|
<h4>Całkowite</h4>
|
||||||
|
<hr>
|
||||||
|
<p id="zad1"></p>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
<li value="5">
|
||||||
|
<h4>Pensje</h4>
|
||||||
|
<hr>
|
||||||
|
<label for="zad5-x">Ilość miesięcy</label>
|
||||||
|
<input type="number" id="zad5-x" oninput="zad5()">
|
||||||
|
<label for="zad5-x">Kwota wpłat</label>
|
||||||
|
<input type="number" id="zad5-y" oninput="zad5()">
|
||||||
|
<p id="zad5"></p>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
<li>
|
||||||
|
<h4>Nie wiem</h4>
|
||||||
|
<hr>
|
||||||
|
<p id="zad6"></p>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
<li>
|
||||||
|
<h4>Piramida 10x10</h4>
|
||||||
|
<hr>
|
||||||
|
<p id="zad7"></p>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
<li value="12">
|
||||||
|
<h4>kwadratowanie</h4>
|
||||||
|
<hr>
|
||||||
|
<label for="zad12-start">Liczba początkowa</label>
|
||||||
|
<input id="zad12-start" oninput="zad12()">
|
||||||
|
<label for="zad12-n">N</label>
|
||||||
|
<input id="zad12-n" oninput="zad12()">
|
||||||
|
<p id="zad12"></p>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
<li value="15">
|
||||||
|
<h4>Wizualizacja piramidy</h4>
|
||||||
|
<hr>
|
||||||
|
<label for="zad15-rozmiar">Rozmiar piramidy</label>
|
||||||
|
<input id="zad15-rozmiar" oninput="zad15()">
|
||||||
|
<p id="zad15"></p>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
<li value="17">
|
||||||
|
<h4>trójkąt zera i jedynki</h4>
|
||||||
|
<hr>
|
||||||
|
<p id="zad17"></p>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</main>
|
||||||
|
<footer-comp></footer-comp>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
<link href="/favicon.ico" rel="favicon">
|
<link href="/favicon.ico" rel="favicon">
|
||||||
<link href="/assets/css/main.css" rel="stylesheet">
|
<link href="/assets/css/main.css" rel="stylesheet">
|
||||||
<script data-goatcounter="https://zeszyt.nonamesoft.xyz/count" async src="/assets/js/count.js"></script>
|
<script data-goatcounter="https://zeszyt.nonamesoft.xyz/count" async src="/assets/js/count.js"></script>
|
||||||
<script src="/assets/js/nawigacja.js"></script>
|
<script type="module" src="/assets/js/index.js"></script>
|
||||||
<script src="/assets/js/akordeon.js"></script>
|
<script src="/assets/js/akordeon.js"></script>
|
||||||
<script src="/assets/js/js-wspolne.js"></script>
|
<script src="/assets/js/js-wspolne.js"></script>
|
||||||
<script src="/assets/js/js-podstawy.js"></script>
|
<script src="/assets/js/js-podstawy.js"></script>
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
<p id="zad4-tekst">Przykładowy tekst</p>
|
<p id="zad4-tekst">Przykładowy tekst</p>
|
||||||
<hr>
|
<hr>
|
||||||
<h5>Kolor tekstu</h5>
|
<h5>Kolor tekstu</h5>
|
||||||
<div class="flex-row">
|
<div class="flex-row overflow-x-auto">
|
||||||
<button onclick="document.getElementById('zad4-tekst').style.color = 'var(--colorRed)'">Czerwony</button>
|
<button onclick="document.getElementById('zad4-tekst').style.color = 'var(--colorRed)'">Czerwony</button>
|
||||||
<button onclick="document.getElementById('zad4-tekst').style.color = 'var(--colorText)'">Podstawowy</button>
|
<button onclick="document.getElementById('zad4-tekst').style.color = 'var(--colorText)'">Podstawowy</button>
|
||||||
<button onclick="document.getElementById('zad4-tekst').style.color = 'var(--colorGreen)'">Zielony</button>
|
<button onclick="document.getElementById('zad4-tekst').style.color = 'var(--colorGreen)'">Zielony</button>
|
||||||
@@ -56,22 +56,22 @@
|
|||||||
<button onclick="document.getElementById('zad4-tekst').style.color = 'var(--colorYellow)'">Żółte</button>
|
<button onclick="document.getElementById('zad4-tekst').style.color = 'var(--colorYellow)'">Żółte</button>
|
||||||
</div>
|
</div>
|
||||||
<h5>Rozmiar tekstu</h5>
|
<h5>Rozmiar tekstu</h5>
|
||||||
<div class="flex-row">
|
<div class="flex-row overflow-x-auto">
|
||||||
<button onclick="document.getElementById('zad4-tekst').style.fontSize = '30pt'">30pt</button>
|
<button onclick="document.getElementById('zad4-tekst').style.fontSize = '30pt'">30pt</button>
|
||||||
<button onclick="document.getElementById('zad4-tekst').style.fontSize = '50pt'">50pt</button>
|
<button onclick="document.getElementById('zad4-tekst').style.fontSize = '50pt'">50pt</button>
|
||||||
</div>
|
</div>
|
||||||
<h5>Tło</h5>
|
<h5>Tło</h5>
|
||||||
<div class="flex-row">
|
<div class="flex-row overflow-x-auto">
|
||||||
<button onclick="document.getElementById('zad4-tekst').style.backgroundColor = ''">Brak</button>
|
<button onclick="document.getElementById('zad4-tekst').style.backgroundColor = ''">Brak</button>
|
||||||
<button onclick="document.getElementById('zad4-tekst').style.backgroundColor = '#ff0000'">Komunistyczne</button>
|
<button onclick="document.getElementById('zad4-tekst').style.backgroundColor = '#ff0000'">Komunistyczne</button>
|
||||||
</div>
|
</div>
|
||||||
<h5>Ramka</h5>
|
<h5>Ramka</h5>
|
||||||
<div class="flex-row">
|
<div class="flex-row overflow-x-auto">
|
||||||
<button onclick="document.getElementById('zad4-tekst').style.border = ''">Brak</button>
|
<button onclick="document.getElementById('zad4-tekst').style.border = ''">Brak</button>
|
||||||
<button onclick="document.getElementById('zad4-tekst').style.border = '.3rem solid var(--colorOverlay1)'">Ta co wszędzie</button>
|
<button onclick="document.getElementById('zad4-tekst').style.border = '.3rem solid var(--colorOverlay1)'">Ta co wszędzie</button>
|
||||||
</div>
|
</div>
|
||||||
<h5>Tekst</h5>
|
<h5>Tekst</h5>
|
||||||
<div class="flex-row">
|
<div class="flex-row overflow-x-auto">
|
||||||
<button onclick="document.getElementById('zad4-tekst').innerText = prompt('Nowy tekst')">Zmień tekst</button>
|
<button onclick="document.getElementById('zad4-tekst').innerText = prompt('Nowy tekst')">Zmień tekst</button>
|
||||||
<button onclick="document.getElementById('zad4-tekst').innerText = 'Przykładowy tekst'">Przywróć pierwotny tekst</button>
|
<button onclick="document.getElementById('zad4-tekst').innerText = 'Przykładowy tekst'">Przywróć pierwotny tekst</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<link href="/assets/css/main.css" rel="stylesheet">
|
<link href="/assets/css/main.css" rel="stylesheet">
|
||||||
<link href="/assets/css/js-warunkowe.css" rel="stylesheet">
|
<link href="/assets/css/js-warunkowe.css" rel="stylesheet">
|
||||||
<script data-goatcounter="https://zeszyt.nonamesoft.xyz/count" async src="/assets/js/count.js"></script>
|
<script data-goatcounter="https://zeszyt.nonamesoft.xyz/count" async src="/assets/js/count.js"></script>
|
||||||
<script src="/assets/js/nawigacja.js"></script>
|
<script type="module" src="/assets/js/index.js"></script>
|
||||||
<script src="/assets/js/js-wspolne.js"></script>
|
<script src="/assets/js/js-wspolne.js"></script>
|
||||||
<script src="/assets/js/js-warunkowe.js"></script>
|
<script src="/assets/js/js-warunkowe.js"></script>
|
||||||
</head>
|
</head>
|
||||||
@@ -45,7 +45,16 @@
|
|||||||
<h4 id="zad4-wynik">Parzysta</h4>
|
<h4 id="zad4-wynik">Parzysta</h4>
|
||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
<li value="7">
|
<li value="6">
|
||||||
|
<h4>Zakres</h4>
|
||||||
|
<hr>
|
||||||
|
<label for="zad6-liczba">Liczba</label>
|
||||||
|
<input id="zad6-liczba" type="number" value="2" oninput="zad6Sprawdz()">
|
||||||
|
<hr>
|
||||||
|
<h4 id="zad4-wynik">Dodatnia</h4>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
<li>
|
||||||
<h4>Klasyfikacja wieku</h4>
|
<h4>Klasyfikacja wieku</h4>
|
||||||
<hr>
|
<hr>
|
||||||
<button onclick="document.getElementById('nieaktywne').id='aktywne'">Otwórz klasyfikacje wieku</button>
|
<button onclick="document.getElementById('nieaktywne').id='aktywne'">Otwórz klasyfikacje wieku</button>
|
||||||
|
|||||||
74
js-zdarzenia.html
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="pl">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>JS Zad. Zdarzenia - MaszToZadanieDomowe.com</title>
|
||||||
|
<link href="/favicon.ico" rel="favicon">
|
||||||
|
<link href="/assets/css/main.css" rel="stylesheet">
|
||||||
|
<script data-goatcounter="https://zeszyt.nonamesoft.xyz/count" async src="/assets/js/count.js"></script>
|
||||||
|
<script type="module" src="/assets/js/index.js"></script>
|
||||||
|
<script src="/assets/js/js-wspolne.js"></script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#kontener {
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
border: 3px solid beige;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
|
document.querySelector("#kontener").addEventListener("click", (ev) => {
|
||||||
|
ev.target.style.backgroundColor = `rgb(${Math.floor(Math.random() * 255)}, ${Math.floor(Math.random() * 255)}, ${Math.floor(Math.random() * 255)})`;
|
||||||
|
})
|
||||||
|
|
||||||
|
document.querySelector(".wyroznione").addEventListener("dblclick", (ev) => {
|
||||||
|
ev.target.innerText = ev.target.innerText == "Zadupie dolne" ? "Wielkośląskie" : "Zadupie dolne"
|
||||||
|
})
|
||||||
|
document.querySelector(".wyroznione").addEventListener("mouseover", (ev) => {
|
||||||
|
console.log(ev.target.innerText)
|
||||||
|
})
|
||||||
|
|
||||||
|
document.querySelector("#artykul").addEventListener("keydown", (ev) => {
|
||||||
|
ev.preventDefault()
|
||||||
|
if (new Number(ev.key).toString() != "NaN") {
|
||||||
|
document.querySelector("#aaa").innerText += ev.key
|
||||||
|
}
|
||||||
|
ev.target.value += " ";
|
||||||
|
})
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header-comp></header-comp>
|
||||||
|
<main>
|
||||||
|
<h2>JavaScript Zdarzenia</h2>
|
||||||
|
<hr>
|
||||||
|
<ol>
|
||||||
|
<li>
|
||||||
|
<h4>Łapcie :3</h4>
|
||||||
|
<hr>
|
||||||
|
<div id="kontener">
|
||||||
|
🐾
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
<li>
|
||||||
|
<h4>Wyróżnienie</h4>
|
||||||
|
<hr>
|
||||||
|
<p class="wyroznione">Zadupie dolne</p>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
<li>
|
||||||
|
<h4>Artykuł</h4>
|
||||||
|
<hr>
|
||||||
|
<textarea id="artykul">"Gdzie my zmierzamy jako społeczeństwo?" - Cyborg 2025</textarea>
|
||||||
|
<div id="aaa"></div>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</main>
|
||||||
|
<footer-comp></footer-comp>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
245
liczby.html
@@ -17,128 +17,140 @@
|
|||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td><button id="1">1</button></td>
|
<td id="1"><button id="1">1</button></td>
|
||||||
<td><button id="2">2</button></td>
|
<td id="2"><button id="2">2</button></td>
|
||||||
<td><button id="3">3</button></td>
|
<td id="3"><button id="3">3</button></td>
|
||||||
<td><button id="4">4</button></td>
|
<td id="4"><button id="4">4</button></td>
|
||||||
<td><button id="5">5</button></td>
|
<td id="5"><button id="5">5</button></td>
|
||||||
<td><button id="6">6</button></td>
|
<td id="6"><button id="6">6</button></td>
|
||||||
<td><button id="7">7</button></td>
|
<td id="7"><button id="7">7</button></td>
|
||||||
<td><button id="8">8</button></td>
|
<td id="8"><button id="8">8</button></td>
|
||||||
<td><button id="9">9</button></td>
|
<td id="9"><button id="9">9</button></td>
|
||||||
<td><button id="10">10</button></td>
|
<td id="10"><button id="10">10</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><button id="11">11</button></td>
|
<td id="11"><button id="11">11</button></td>
|
||||||
<td><button id="12">12</button></td>
|
<td id="12"><button id="12">12</button></td>
|
||||||
<td><button id="13">13</button></td>
|
<td id="13"><button id="13">13</button></td>
|
||||||
<td><button id="14">14</button></td>
|
<td id="14"><button id="14">14</button></td>
|
||||||
<td><button id="15">15</button></td>
|
<td id="15"><button id="15">15</button></td>
|
||||||
<td><button id="16">16</button></td>
|
<td id="16"><button id="16">16</button></td>
|
||||||
<td><button id="17">17</button></td>
|
<td id="17"><button id="17">17</button></td>
|
||||||
<td><button id="18">18</button></td>
|
<td id="18"><button id="18">18</button></td>
|
||||||
<td><button id="19">19</button></td>
|
<td id="19"><button id="19">19</button></td>
|
||||||
<td><button id="20">20</button></td>
|
<td id="20"><button id="20">20</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><button id="21">21</button></td>
|
<td id="21"><button id="21">21</button></td>
|
||||||
<td><button id="22">22</button></td>
|
<td id="22"><button id="22">22</button></td>
|
||||||
<td><button id="23">23</button></td>
|
<td id="23"><button id="23">23</button></td>
|
||||||
<td><button id="24">24</button></td>
|
<td id="24"><button id="24">24</button></td>
|
||||||
<td><button id="25">25</button></td>
|
<td id="25"><button id="25">25</button></td>
|
||||||
<td><button id="26">26</button></td>
|
<td id="26"><button id="26">26</button></td>
|
||||||
<td><button id="27">27</button></td>
|
<td id="27"><button id="27">27</button></td>
|
||||||
<td><button id="28">28</button></td>
|
<td id="28"><button id="28">28</button></td>
|
||||||
<td><button id="29">29</button></td>
|
<td id="29"><button id="29">29</button></td>
|
||||||
<td><button id="30">30</button></td>
|
<td id="30"><button id="30">30</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><button id="31">31</button></td>
|
<td id="31"><button id="31">31</button></td>
|
||||||
<td><button id="32">32</button></td>
|
<td id="32"><button id="32">32</button></td>
|
||||||
<td><button id="33">33</button></td>
|
<td id="33"><button id="33">33</button></td>
|
||||||
<td><button id="34">34</button></td>
|
<td id="34"><button id="34">34</button></td>
|
||||||
<td><button id="35">35</button></td>
|
<td id="35"><button id="35">35</button></td>
|
||||||
<td><button id="36">36</button></td>
|
<td id="36"><button id="36">36</button></td>
|
||||||
<td><button id="37">37</button></td>
|
<td id="37"><button id="37">37</button></td>
|
||||||
<td><button id="38">38</button></td>
|
<td id="38"><button id="38">38</button></td>
|
||||||
<td><button id="39">39</button></td>
|
<td id="39"><button id="39">39</button></td>
|
||||||
<td><button id="40">40</button></td>
|
<td id="40"><button id="40">40</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><button id="41">41</button></td>
|
<td id="41"><button id="41">41</button></td>
|
||||||
<td><button id="42">42</button></td>
|
<td id="42"><button id="42">42</button></td>
|
||||||
<td><button id="43">43</button></td>
|
<td id="43"><button id="43">43</button></td>
|
||||||
<td><button id="44">44</button></td>
|
<td id="44"><button id="44">44</button></td>
|
||||||
<td><button id="45">45</button></td>
|
<td id="45"><button id="45">45</button></td>
|
||||||
<td><button id="46">46</button></td>
|
<td id="46"><button id="46">46</button></td>
|
||||||
<td><button id="47">47</button></td>
|
<td id="47"><button id="47">47</button></td>
|
||||||
<td><button id="48">48</button></td>
|
<td id="48"><button id="48">48</button></td>
|
||||||
<td><button id="49">49</button></td>
|
<td id="49"><button id="49">49</button></td>
|
||||||
<td><button id="50">50</button></td>
|
<td id="50"><button id="50">50</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><button id="51">51</button></td>
|
<td id="51"><button id="51">51</button></td>
|
||||||
<td><button id="52">52</button></td>
|
<td id="52"><button id="52">52</button></td>
|
||||||
<td><button id="53">53</button></td>
|
<td id="53"><button id="53">53</button></td>
|
||||||
<td><button id="54">54</button></td>
|
<td id="54"><button id="54">54</button></td>
|
||||||
<td><button id="55">55</button></td>
|
<td id="55"><button id="55">55</button></td>
|
||||||
<td><button id="56">56</button></td>
|
<td id="56"><button id="56">56</button></td>
|
||||||
<td><button id="57">57</button></td>
|
<td id="57"><button id="57">57</button></td>
|
||||||
<td><button id="58">58</button></td>
|
<td id="58"><button id="58">58</button></td>
|
||||||
<td><button id="59">59</button></td>
|
<td id="59"><button id="59">59</button></td>
|
||||||
<td><button id="60">60</button></td>
|
<td id="60"><button id="60">60</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><button id="61">61</button></td>
|
<td id="61"><button id="61">61</button></td>
|
||||||
<td><button id="62">62</button></td>
|
<td id="62"><button id="62">62</button></td>
|
||||||
<td><button id="63">63</button></td>
|
<td id="63"><button id="63">63</button></td>
|
||||||
<td><button id="64">64</button></td>
|
<td id="64"><button id="64">64</button></td>
|
||||||
<td><button id="65">65</button></td>
|
<td id="65"><button id="65">65</button></td>
|
||||||
<td><button id="66">66</button></td>
|
<td id="66"><button id="66">66</button></td>
|
||||||
<td><button id="67">67</button></td>
|
<td id="67"><button id="67">67</button></td>
|
||||||
<td><button id="68">68</button></td>
|
<td id="68"><button id="68">68</button></td>
|
||||||
<td><button id="69">69</button></td>
|
<td id="69"><button id="69">69</button></td>
|
||||||
<td><button id="70">70</button></td>
|
<td id="70"><button id="70">70</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><button id="71">71</button></td>
|
<td id="71"><button id="71">71</button></td>
|
||||||
<td><button id="72">72</button></td>
|
<td id="72"><button id="72">72</button></td>
|
||||||
<td><button id="73">73</button></td>
|
<td id="73"><button id="73">73</button></td>
|
||||||
<td><button id="74">74</button></td>
|
<td id="74"><button id="74">74</button></td>
|
||||||
<td><button id="75">75</button></td>
|
<td id="75"><button id="75">75</button></td>
|
||||||
<td><button id="76">76</button></td>
|
<td id="76"><button id="76">76</button></td>
|
||||||
<td><button id="77">77</button></td>
|
<td id="77"><button id="77">77</button></td>
|
||||||
<td><button id="78">78</button></td>
|
<td id="78"><button id="78">78</button></td>
|
||||||
<td><button id="79">79</button></td>
|
<td id="79"><button id="79">79</button></td>
|
||||||
<td><button id="80">80</button></td>
|
<td id="80"><button id="80">80</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><button id="81">81</button></td>
|
<td id="81"><button id="81">81</button></td>
|
||||||
<td><button id="82">82</button></td>
|
<td id="82"><button id="82">82</button></td>
|
||||||
<td><button id="83">83</button></td>
|
<td id="83"><button id="83">83</button></td>
|
||||||
<td><button id="84">84</button></td>
|
<td id="84"><button id="84">84</button></td>
|
||||||
<td><button id="85">85</button></td>
|
<td id="85"><button id="85">85</button></td>
|
||||||
<td><button id="86">86</button></td>
|
<td id="86"><button id="86">86</button></td>
|
||||||
<td><button id="87">87</button></td>
|
<td id="87"><button id="87">87</button></td>
|
||||||
<td><button id="88">88</button></td>
|
<td id="88"><button id="88">88</button></td>
|
||||||
<td><button id="89">89</button></td>
|
<td id="89"><button id="89">89</button></td>
|
||||||
<td><button id="90">90</button></td>
|
<td id="90"><button id="90">90</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><button id="91">91</button></td>
|
<td id="91"><button id="91">91</button></td>
|
||||||
<td><button id="92">92</button></td>
|
<td id="92"><button id="92">92</button></td>
|
||||||
<td><button id="93">93</button></td>
|
<td id="93"><button id="93">93</button></td>
|
||||||
<td><button id="94">94</button></td>
|
<td id="94"><button id="94">94</button></td>
|
||||||
<td><button id="95">95</button></td>
|
<td id="95"><button id="95">95</button></td>
|
||||||
<td><button id="96">96</button></td>
|
<td id="96"><button id="96">96</button></td>
|
||||||
<td><button id="97">97</button></td>
|
<td id="97"><button id="97">97</button></td>
|
||||||
<td><button id="98">98</button></td>
|
<td id="98"><button id="98">98</button></td>
|
||||||
<td><button id="99">99</button></td>
|
<td id="99"><button id="99">99</button></td>
|
||||||
<td><button id="100">100</button></td>
|
<td id="100"><button id="100">100</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<aside>
|
<aside style="left: 1rem;">
|
||||||
|
<h2>Reklama</h2>
|
||||||
|
<hr>
|
||||||
|
<iframe
|
||||||
|
src="https://youads.nonamesoft.xyz/ads/site"
|
||||||
|
title="YouAds Ads Site"
|
||||||
|
width="300"
|
||||||
|
style="border: medium; max-height: 800px; height: 800px; width: 100%;"
|
||||||
|
loading="lazy"
|
||||||
|
>
|
||||||
|
</iframe>
|
||||||
|
</aside>
|
||||||
|
<aside style="right: 1rem;">
|
||||||
<h2>Statystyki</h2>
|
<h2>Statystyki</h2>
|
||||||
<hr>
|
<hr>
|
||||||
<div>
|
<div>
|
||||||
@@ -157,23 +169,23 @@
|
|||||||
</aside>
|
</aside>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="tytul" class="pokaz">
|
<div id="ekrantytulowy" class="pokaz">
|
||||||
<div>
|
<div>
|
||||||
<h1>Liczby</h1>
|
<h1>Liczby</h1>
|
||||||
<h5>Prawie jak w kasynie!</h5>
|
<h5>Prawie jak w kasynie!</h5>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div id="odTBF">
|
||||||
<button onclick="pokazKonfiguracje()">Wygrywać teraz</button>
|
<button>Wygrywać teraz</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="konfiguracja" class="dialog ukryte">
|
<div id="dialog-nowagra" class="dialog ukryte">
|
||||||
<form class="okno">
|
<form class="okno">
|
||||||
<h2>Nowa gra</h2>
|
<h2>Nowa gra</h2>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<h4>Źródło liczby</h4>
|
<h4>Źródło liczby</h4>
|
||||||
<fieldset>
|
<fieldset id="nowagraFieldset1">
|
||||||
<input type="radio" id="l-manual" name="losowosc" value="czlowiek" onclick="pokazNumer()"><label for="l-manual">Asystent (wprowadzone manualnie)</label>
|
<input type="radio" id="l-manual" name="losowosc" value="czlowiek" onclick="pokazNumer()"><label for="l-manual">Asystent (wprowadzone manualnie)</label>
|
||||||
<input type="radio" id="l-auto" name="losowosc" value="komputer"><label for="l-auto">Komputer (generowane automatycznie)</label>
|
<input type="radio" id="l-auto" name="losowosc" value="komputer"><label for="l-auto">Komputer (generowane automatycznie)</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
@@ -181,8 +193,9 @@
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
<h4>Zasady zakładu</h4>
|
<h4>Zasady zakładu</h4>
|
||||||
<fieldset>
|
<fieldset id="nowagraFieldset2">
|
||||||
<label for="kwota">Kwota zakładu:</label><input type="range" id="kwota" name="zaklad" min="500" step="500" max="50000">
|
<label for="kwota">Kwota zakładu: <span id="kwota"></span></label>
|
||||||
|
<input type="range" id="kwota" name="zaklad" min="500" step="500" max="50000">
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
@@ -191,9 +204,9 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="liczba" class="dialog ukryte">
|
<div id="dialog-ustawliczbe" class="dialog ukryte">
|
||||||
<form class="okno">
|
<form class="okno">
|
||||||
<h2>Liczba</h2>
|
<h2>Ustaw Liczbe</h2>
|
||||||
<hr>
|
<hr>
|
||||||
Upewnij się, że osoba grająca nie widzi ekranu i wprowadź liczbę z zakresu 1-100:
|
Upewnij się, że osoba grająca nie widzi ekranu i wprowadź liczbę z zakresu 1-100:
|
||||||
<br>
|
<br>
|
||||||
@@ -201,7 +214,7 @@
|
|||||||
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>Liczba:</legend>
|
<legend>Liczba:</legend>
|
||||||
<input type="number" id="numer" name="liczba" min="1" max="100" placeholder="Przykładowa liczba: 64" required>
|
<input type="number" id="liczba" name="liczba" min="1" max="100" placeholder="Przykładowa liczba: 64" required>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
@@ -210,11 +223,17 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="koniec" class="dialog ukryte">
|
<div id="dialog-wygrana" class="dialog ukryte">
|
||||||
<div class="okno">
|
<div class="okno">
|
||||||
<h2>Koniec gry</h2>
|
<h2>Koniec gry</h2>
|
||||||
<hr>
|
<hr>
|
||||||
Udało Ci się wygrać <span id="final">000zł</span>!
|
Udało Ci się wygrać... nic!
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
Jeszcze nie wszystko zaimplementowane
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<button>Zagraj jeszcze raz!</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
253
tabele.html
Normal file
@@ -0,0 +1,253 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="pl">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Zad. Tabele - MaszToZadanieDomowe.com</title>
|
||||||
|
<link href="/favicon.ico" rel="favicon">
|
||||||
|
<link href="/assets/css/main.css" rel="stylesheet">
|
||||||
|
<script data-goatcounter="https://zeszyt.nonamesoft.xyz/count" async src="/assets/js/count.js"></script>
|
||||||
|
<script type="module" src="/assets/js/index.js"></script>
|
||||||
|
<script src="/assets/js/akordeon.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header-comp></header-comp>
|
||||||
|
<main>
|
||||||
|
<h2>Tabele - Zadania</h2>
|
||||||
|
<sub>Aka. jedna wielka reklama Buttona</sub>
|
||||||
|
<hr>
|
||||||
|
<ol>
|
||||||
|
<li>
|
||||||
|
<!-- table>(thead>th{LP.}+th{Okres czasu}+th{The Button Nano V1}+th{Zyski})+(tbody>tr*6>td.lp{$.}+td{$$@3.2025}+td{0 sztuk}+td{0zł}) -->
|
||||||
|
<table>
|
||||||
|
<caption>Sprawozdanie finansowe The Button Factory</caption>
|
||||||
|
<thead>
|
||||||
|
<th>LP.</th>
|
||||||
|
<th>Okres czasu</th>
|
||||||
|
<th>The Button Nano V1</th>
|
||||||
|
<th>Zyski</th>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="lp">1.</td>
|
||||||
|
<td>03.2025</td>
|
||||||
|
<td>0 sztuk</td>
|
||||||
|
<td>0zł</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="lp">2.</td>
|
||||||
|
<td>04.2025</td>
|
||||||
|
<td>0 sztuk</td>
|
||||||
|
<td>0zł</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="lp">3.</td>
|
||||||
|
<td>05.2025</td>
|
||||||
|
<td>0 sztuk</td>
|
||||||
|
<td>0zł</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="lp">4.</td>
|
||||||
|
<td>06.2025</td>
|
||||||
|
<td>0 sztuk</td>
|
||||||
|
<td>0zł</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="lp">5.</td>
|
||||||
|
<td>07.2025</td>
|
||||||
|
<td>0 sztuk</td>
|
||||||
|
<td>0zł</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="lp">6.</td>
|
||||||
|
<td>08.2025</td>
|
||||||
|
<td>0 sztuk</td>
|
||||||
|
<td>0zł</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="lp">7.</td>
|
||||||
|
<td>09.2025</td>
|
||||||
|
<td>0 sztuk</td>
|
||||||
|
<td>0zł</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="lp">8.</td>
|
||||||
|
<td>10.2025</td>
|
||||||
|
<td>0 sztuk</td>
|
||||||
|
<td>0zł</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="lp">9.</td>
|
||||||
|
<td>11.2025</td>
|
||||||
|
<td>0 sztuk</td>
|
||||||
|
<td>0zł</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td>0zł</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
<li>
|
||||||
|
<table>
|
||||||
|
<caption>Porównanie API ButtonOSa między wersjami</caption>
|
||||||
|
<thead>
|
||||||
|
<th>Wersja API</th>
|
||||||
|
<th colspan="10">Zmiany</th>
|
||||||
|
<th>Link do dokumentacji</th>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>V1.0.0 Stable</td>
|
||||||
|
<td colspan="10"><ul>
|
||||||
|
<li>Funkcje wyświetlacza</li>
|
||||||
|
<li>Wi-Fi i funkcje sieciowe</li>
|
||||||
|
<li>ESP.NOW</li>
|
||||||
|
<li>Powiadomienia</li>
|
||||||
|
<li>Logging, odczytwanie z seriala</li>
|
||||||
|
</ul></td>
|
||||||
|
<td><a href="https://buttonappstore.nonamesoft.xyz/docboard/?version=V1.0.0+Stable">Dokumentacja</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>V1.1.0 Stable</td>
|
||||||
|
<td colspan="10"><ul>
|
||||||
|
<li>Tworzenie punktów dostępowych</li>
|
||||||
|
</ul></td>
|
||||||
|
<td><a href="https://buttonappstore.nonamesoft.xyz/docboard/?version=V1.1.0+Stable">Dokumentacja</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>V1.2.0 Stable</td>
|
||||||
|
<td colspan="10"><ul>
|
||||||
|
<li>Szyfrowanie AES</li>
|
||||||
|
<li>Hashowanie</li>
|
||||||
|
<li>Szyfrowanie RSA</li>
|
||||||
|
</ul></td>
|
||||||
|
<td><a href="https://buttonappstore.nonamesoft.xyz/docboard/?version=V1.2.0+Stable">Dokumentacja</a></td
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>V1.3.0 Stable</td>
|
||||||
|
<td colspan="10"><ul>
|
||||||
|
<li>Opcjonalne rysowanie paska statusu w aplikacji</li>
|
||||||
|
<li>Sentence builder (zgaduje że jest to menu pod składanie zdań na podstawie schematów)</li>
|
||||||
|
<li>Dodatkowe warianty menu</li>
|
||||||
|
<li>Serwer TCP</li>
|
||||||
|
<li>Websockety</li>
|
||||||
|
<li>Sockety ESP.NOW</li>
|
||||||
|
<li>"Publiczny RAM" (wspólna baza danych key-value)</li>
|
||||||
|
<li>Możliwość odczytania informacji urządzeniu (temperatura SoC, ilośc wolnego RAMu i Flasha)</li>
|
||||||
|
<li>Importowanie i listowanie zainstalowanych aplikacji</li>
|
||||||
|
<li>Podpisywanie i weryfikowanie RSA</li>
|
||||||
|
<li>Pakietyzacja</li>
|
||||||
|
<li>Kompresja i dekompresja Tamp oraz dekompresja Deflate</li>
|
||||||
|
<li>Triceleracja, Wzór Haversine'a, Szybka transformacja Fouriera</li>
|
||||||
|
<li>Framework EasyUI</li>
|
||||||
|
<li>Softwareowy renderer 3D</li>
|
||||||
|
<li>Proste sieci neuronowe wraz z trenowaniem</li>
|
||||||
|
</td>
|
||||||
|
<td><a href="https://buttonappstore.nonamesoft.xyz/docboard/?version=V1.3.0+Stable">Dokumentacja</a></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
<li>
|
||||||
|
<table>
|
||||||
|
<caption>Porównanie emulatorów ButtonOSa</caption>
|
||||||
|
<thead>
|
||||||
|
<th>Nazwa</th>
|
||||||
|
<th>Autor</th>
|
||||||
|
<th colspan="4">Funkcjonalność</th>
|
||||||
|
<th>Technologia</th>
|
||||||
|
<th>Stan</th>
|
||||||
|
<th colspan="3">Zrzut ekranu</th>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td rowspan="1">
|
||||||
|
Open Button Emulator
|
||||||
|
</td>
|
||||||
|
<td rowspan="1">
|
||||||
|
Hashtags
|
||||||
|
</td>
|
||||||
|
<td rowspan="1" colspan="4"><ul>
|
||||||
|
<li>Podstawowa implementacja ekranu</li>
|
||||||
|
<li>Emulowane przyciski</li>
|
||||||
|
<li>Logging</li>
|
||||||
|
</ul></td>
|
||||||
|
<td rowspan="1">Javascript, Fengari</td>
|
||||||
|
<td rowspan="3" colspan="1">Porzucone</td>
|
||||||
|
<td rowspan="1" colspan="3">
|
||||||
|
<img alt="Brak zrzutu" width="640" height="480">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td rowspan="1">
|
||||||
|
WhaleRunner
|
||||||
|
</td>
|
||||||
|
<td rowspan="3">
|
||||||
|
Dark Steveneq
|
||||||
|
</td>
|
||||||
|
<td rowspan="1" colspan="4"><ul>
|
||||||
|
<li>(Ówcześnie) Prawie kompletna implementacja ekranu</li>
|
||||||
|
<li>Logging</li>
|
||||||
|
<li>Autorskie API</li>
|
||||||
|
</ul></td>
|
||||||
|
<td rowspan="1">Svelte, Typescript, WASMoon</td>
|
||||||
|
<td rowspan="1" colspan="3">
|
||||||
|
<img alt="Brak zrzutu" width="640" height="480">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td rowspan="1">
|
||||||
|
WhaleEmu
|
||||||
|
</td>
|
||||||
|
<td rowspan="1" colspan="4"><ul>
|
||||||
|
<li>Podstawowa implementacja ekranu</li>
|
||||||
|
<li>Logging</li>
|
||||||
|
<li>Emulowane przyciski</li>
|
||||||
|
</ul></td>
|
||||||
|
<td rowspan="1">NeLua (prototyp), C++, RayLib</td>
|
||||||
|
<td rowspan="1" colspan="3">
|
||||||
|
<img alt="Brak zrzutu" width="640" height="480">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td rowspan="1">
|
||||||
|
Button4ME
|
||||||
|
</td>
|
||||||
|
<td rowspan="1" colspan="4"><ul>
|
||||||
|
<li>Podstawowa implementacja ekranu wraz z identycznym fontem</li>
|
||||||
|
<li>Logging</li>
|
||||||
|
<li>Uruchamianie wbudowanych skryptów z menu</li>
|
||||||
|
</ul></td>
|
||||||
|
<td rowspan="1">Java (J2ME)</td>
|
||||||
|
<td rowspan="1" colspan="1">Rozwijane</td>
|
||||||
|
<td rowspan="1" colspan="3">
|
||||||
|
<img alt="Brak zrzutu" width="640" height="480">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
</ol>
|
||||||
|
<div style="text-align: center;">
|
||||||
|
<h4 style="font-weight: normal;">Na co czekasz?</h4>
|
||||||
|
<a href="https://allegrolokalnie.pl/oferta/gadget-dla-programistow-button-nano-v1"><h1>Kup Buttona!</h1></a>
|
||||||
|
<iframe src="https://youads.nonamesoft.xyz/ads/ad/3" title="YouAds Ads Site" height="150" style="border:none; max-width: 100%; width: 100%;height: 150px;"></iframe>
|
||||||
|
<div class="flex-row">
|
||||||
|
<a href="https://zakupthebutton.nonamesoft.xyz/about">Więcej informacji o sprzęcie/autorze</a>
|
||||||
|
<a href="https://buttonappstore.nonamesoft.xyz/appboard">Sklep z aplikacjami</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
<footer-comp></footer-comp>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
34
tabliczka.php
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="pl">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Witalnia - MaszToZadanieDomowe.com</title>
|
||||||
|
<link href="/favicon.ico" rel="favicon">
|
||||||
|
<link href="/assets/css/main.css" rel="stylesheet">
|
||||||
|
<link href="/assets/css/tabliczka.css" rel="stylesheet">
|
||||||
|
<script data-goatcounter="https://zeszyt.nonamesoft.xyz/count" async src="/assets/js/count.js"></script>
|
||||||
|
<script type="module" src="/assets/js/index.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header-comp></header-comp>
|
||||||
|
<main>
|
||||||
|
<br>
|
||||||
|
<form method="post" action="/tabliczka.php">
|
||||||
|
<h2>Enter sign text</h2>
|
||||||
|
<textarea name="zawartosc" maxlength="52" rows="4"><?php
|
||||||
|
if (isset($_POST["zawartosc"])) {
|
||||||
|
setcookie("tabliczka", $_POST["zawartosc"]);
|
||||||
|
echo(htmlspecialchars($_POST["zawartosc"]));
|
||||||
|
} else if (isset($_COOKIE["tabliczka"])) {
|
||||||
|
echo(htmlspecialchars($_COOKIE["tabliczka"]));
|
||||||
|
} else {
|
||||||
|
echo("");
|
||||||
|
}
|
||||||
|
?></textarea>
|
||||||
|
<input type="submit" name="submit" value="Done">
|
||||||
|
</form>
|
||||||
|
</main>
|
||||||
|
<footer-comp></footer-comp>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
64
witalnia.php
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="pl">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Witalnia - MaszToZadanieDomowe.com</title>
|
||||||
|
<link href="/favicon.ico" rel="favicon">
|
||||||
|
<link href="/assets/css/main.css" rel="stylesheet">
|
||||||
|
<script data-goatcounter="https://zeszyt.nonamesoft.xyz/count" async src="/assets/js/count.js"></script>
|
||||||
|
<script type="module" src="/assets/js/index.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header-comp></header-comp>
|
||||||
|
<main>
|
||||||
|
<?php
|
||||||
|
include "/config/php/templaty.php";
|
||||||
|
|
||||||
|
function renderuj($nazwa) {
|
||||||
|
echo("<h2>Witaj, $nazwa</h2><hr>");
|
||||||
|
zawartosc($nazwa);
|
||||||
|
$odwiedziny = isset($_COOKIE["wizyty"]) ? $_COOKIE["wizyty"] : 0;
|
||||||
|
$odwiedziny++;
|
||||||
|
setcookie("wizyty", $odwiedziny);
|
||||||
|
echo("
|
||||||
|
Stronę odwiedziłeś/aś/iście $odwiedziny razy
|
||||||
|
<form method=\"post\" action=\"/witalnia.php\">
|
||||||
|
<input type=\"submit\" name=\"zapomnij\" value=\"Usuń mnie z listy lotów (podpowiedź)\">
|
||||||
|
</form>
|
||||||
|
");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($_POST["zapomnij"])) {
|
||||||
|
echo("
|
||||||
|
Zapomniano
|
||||||
|
<h2>Witaj!</h2><hr>
|
||||||
|
<form method=\"post\" action=\"/witalnia.php\">
|
||||||
|
<input type=\"text\" name=\"nazwa\" required=\"\" placeholder=\"Wpisz swoją nazwę\">
|
||||||
|
<input type=\"submit\" value=\"Zapisz\">
|
||||||
|
</form>
|
||||||
|
");
|
||||||
|
setcookie("nazwa");
|
||||||
|
setcookie("wizyty");
|
||||||
|
} else if (isset($_POST["nazwa"])) {
|
||||||
|
$nazwa = htmlspecialchars($_POST["nazwa"]);
|
||||||
|
setcookie("nazwa", $nazwa);
|
||||||
|
renderuj($nazwa);
|
||||||
|
} elseif (strlen($_COOKIE["nazwa"] > 0)) {
|
||||||
|
$nazwa = htmlspecialchars($_COOKIE["nazwa"]);
|
||||||
|
renderuj($nazwa);
|
||||||
|
} else {
|
||||||
|
echo("
|
||||||
|
<h2>Witaj!</h2>
|
||||||
|
<form method=\"post\" action=\"/witalnia.php\">
|
||||||
|
<input type=\"text\" name=\"nazwa\" required=\"\" placeholder=\"Wpisz swoją nazwę\">
|
||||||
|
<input type=\"submit\" value=\"Zapisz\">
|
||||||
|
</form>
|
||||||
|
");
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
</main>
|
||||||
|
<footer-comp></footer-comp>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||