Merge branch 'master' of git.someserver.de:k4ever

This commit is contained in:
theresa 2011-10-14 00:07:29 +02:00
commit 86b25703be
15 changed files with 324 additions and 393 deletions

1
.gitignore vendored
View File

@ -6,5 +6,6 @@
*.bak
*~
k4ever/k4ever.db
k4ever/media/img/
*.kdev4
.kdev4

View File

@ -16,7 +16,7 @@
inkscape:version="0.48.2 r9819"
sodipodi:docname="freitagskasse.svg">
<title
id="title3609">HOWTO Freitagskasse v3</title>
id="title3609">HOWTO Freitagskasse v3.2</title>
<defs
id="defs4">
<marker
@ -53,9 +53,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.35"
inkscape:cx="903.5067"
inkscape:cy="580.98496"
inkscape:zoom="0.7"
inkscape:cx="67.266124"
inkscape:cy="265.56241"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
@ -73,7 +73,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>HOWTO Freitagskasse v3</dc:title>
<dc:title>HOWTO Freitagskasse v3.2</dc:title>
<dc:creator>
<cc:Agent>
<dc:title>Sebastian Pipping &lt;sebastian@pipping.org&gt;</dc:title>
@ -1054,7 +1054,8 @@
id="rect3535-9" /></flowRegion><flowPara
id="flowPara3537-0">1 Euro</flowPara></flowRoot> </g>
<g
id="g6092">
id="g6092"
transform="translate(-1.09375e-6,0)">
<g
id="g4397"
inkscape:label="ink_ext_XXXXXX"
@ -1352,7 +1353,7 @@
id="flowPara3537-0-75">10 Euro</flowPara></flowRoot> </g>
<g
id="g8994"
transform="translate(-4,0)">
transform="translate(-3.9999988,0)">
<g
id="g3261"
inkscape:label="ink_ext_XXXXXX"
@ -1545,7 +1546,7 @@
id="flowPara3537-0-75-8">COMMIT</flowPara></flowRoot> </g>
<g
id="g8958"
transform="translate(-4,0)">
transform="translate(-19.933595,0)">
<g
id="g3163"
inkscape:label="ink_ext_XXXXXX"
@ -1705,7 +1706,7 @@
height="87.14286"
width="178.57143"
id="rect3535-9-1-9" /></flowRegion><flowPara
id="flowPara3537-0-75-7">UNDO</flowPara></flowRoot> </g>
id="flowPara3537-0-75-7">STORNO</flowPara></flowRoot> </g>
<path
sodipodi:type="arc"
style="color:#000000;fill:#000000;stroke:#000000;stroke-width:5.4000001;stroke-linecap:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
@ -1714,7 +1715,7 @@
sodipodi:cy="-88.048378"
sodipodi:rx="14.770664"
sodipodi:ry="14.770664"
d="m -100.22934,-88.048378 a 14.770664,14.770664 0 1 1 -29.54132,0 14.770664,14.770664 0 1 1 29.54132,0 z"
d="m -100.22934,-88.048378 c 0,8.157613 -6.61305,14.770664 -14.77066,14.770664 -8.15761,0 -14.77066,-6.613051 -14.77066,-14.770664 0,-8.157613 6.61305,-14.770662 14.77066,-14.770662 8.15761,0 14.77066,6.613049 14.77066,14.770662 z"
transform="translate(188.15166,537.71419)" />
<path
sodipodi:type="arc"
@ -1724,7 +1725,7 @@
sodipodi:cy="-88.048378"
sodipodi:rx="14.770664"
sodipodi:ry="14.770664"
d="m -100.22934,-88.048378 a 14.770664,14.770664 0 1 1 -29.54132,0 14.770664,14.770664 0 1 1 29.54132,0 z"
d="m -100.22934,-88.048378 c 0,8.157613 -6.61305,14.770664 -14.77066,14.770664 -8.15761,0 -14.77066,-6.613051 -14.77066,-14.770664 0,-8.157613 6.61305,-14.770662 14.77066,-14.770662 8.15761,0 14.77066,6.613049 14.77066,14.770662 z"
transform="translate(188.15166,600.26767)" />
<path
sodipodi:type="arc"
@ -1734,7 +1735,7 @@
sodipodi:cy="-88.048378"
sodipodi:rx="14.770664"
sodipodi:ry="14.770664"
d="m -100.22934,-88.048378 a 14.770664,14.770664 0 1 1 -29.54132,0 14.770664,14.770664 0 1 1 29.54132,0 z"
d="m -100.22934,-88.048378 c 0,8.157613 -6.61305,14.770664 -14.77066,14.770664 -8.15761,0 -14.77066,-6.613051 -14.77066,-14.770664 0,-8.157613 6.61305,-14.770662 14.77066,-14.770662 8.15761,0 14.77066,6.613049 14.77066,14.770662 z"
transform="translate(188.15166,631.83909)" />
<path
sodipodi:type="arc"
@ -1744,7 +1745,7 @@
sodipodi:cy="-88.048378"
sodipodi:rx="14.770664"
sodipodi:ry="14.770664"
d="m -100.22934,-88.048378 a 14.770664,14.770664 0 1 1 -29.54132,0 14.770664,14.770664 0 1 1 29.54132,0 z"
d="m -100.22934,-88.048378 c 0,8.157613 -6.61305,14.770664 -14.77066,14.770664 -8.15761,0 -14.77066,-6.613051 -14.77066,-14.770664 0,-8.157613 6.61305,-14.770662 14.77066,-14.770662 8.15761,0 14.77066,6.613049 14.77066,14.770662 z"
transform="translate(188.15166,725.05339)" />
<path
sodipodi:type="arc"
@ -1754,7 +1755,7 @@
sodipodi:cy="-88.048378"
sodipodi:rx="14.770664"
sodipodi:ry="14.770664"
d="m -100.22934,-88.048378 a 14.770664,14.770664 0 1 1 -29.54132,0 14.770664,14.770664 0 1 1 29.54132,0 z"
d="m -100.22934,-88.048378 c 0,8.157613 -6.61305,14.770664 -14.77066,14.770664 -8.15761,0 -14.77066,-6.613051 -14.77066,-14.770664 0,-8.157613 6.61305,-14.770662 14.77066,-14.770662 8.15761,0 14.77066,6.613049 14.77066,14.770662 z"
transform="translate(188.15166,787.91053)" />
<path
sodipodi:type="arc"
@ -1764,7 +1765,7 @@
sodipodi:cy="-88.048378"
sodipodi:rx="14.770664"
sodipodi:ry="14.770664"
d="m -100.22934,-88.048378 a 14.770664,14.770664 0 1 1 -29.54132,0 14.770664,14.770664 0 1 1 29.54132,0 z"
d="m -100.22934,-88.048378 c 0,8.157613 -6.61305,14.770664 -14.77066,14.770664 -8.15761,0 -14.77066,-6.613051 -14.77066,-14.770664 0,-8.157613 6.61305,-14.770662 14.77066,-14.770662 8.15761,0 14.77066,6.613049 14.77066,14.770662 z"
transform="translate(188.15166,850.19626)" />
<path
sodipodi:type="arc"
@ -1774,7 +1775,7 @@
sodipodi:cy="-88.048378"
sodipodi:rx="14.770664"
sodipodi:ry="14.770664"
d="m -100.22934,-88.048378 a 14.770664,14.770664 0 1 1 -29.54132,0 14.770664,14.770664 0 1 1 29.54132,0 z"
d="m -100.22934,-88.048378 c 0,8.157613 -6.61305,14.770664 -14.77066,14.770664 -8.15761,0 -14.77066,-6.613051 -14.77066,-14.770664 0,-8.157613 6.61305,-14.770662 14.77066,-14.770662 8.15761,0 14.77066,6.613049 14.77066,14.770662 z"
transform="translate(188.15166,912.33911)" />
<flowRoot
xml:space="preserve"
@ -1869,7 +1870,7 @@
id="flowPara7340-8"
style="font-size:25px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;font-family:Sans;-inkscape-font-specification:Sans">3</flowPara></flowRoot> <g
id="g5930"
transform="translate(0,-0.17575307)">
transform="translate(0,161.9389)">
<flowRoot
transform="translate(244.21428,-195.21975)"
style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
@ -2121,10 +2122,10 @@
</g>
</g>
<g
id="g5984"
transform="translate(0,0.17579772)">
id="g4416"
transform="translate(7.1428575,-17.709575)">
<flowRoot
transform="translate(327.00725,-34.511329)"
transform="translate(280.76283,145.66447)"
style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
id="flowRoot3531-9-4"
xml:space="preserve"><flowRegion
@ -2134,10 +2135,10 @@
height="62.85717"
width="264.28571"
id="rect3535-9-4" /></flowRegion><flowPara
id="flowPara3537-0-7">... allein</flowPara></flowRoot> <g
id="flowPara3537-0-7">Nur Pfand</flowPara></flowRoot> <g
id="g4215"
inkscape:label="ink_ext_XXXXXX"
transform="matrix(1.25,0,0,-1.25,860.81975,863.99507)">
transform="matrix(1.25,0,0,-1.25,853.67689,1044.1709)">
<g
id="g4217"
transform="scale(0.1,0.1)">
@ -2374,7 +2375,8 @@
</g>
</g>
<g
id="g6038">
id="g6038"
transform="translate(-2.4999999e-6,-483.00422)">
<flowRoot
transform="translate(248.21819,127.25177)"
style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
@ -2632,7 +2634,8 @@
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<g
id="g5879">
id="g5879"
transform="translate(0,161.9389)">
<g
id="g3920"
inkscape:label="ink_ext_XXXXXX"

Before

Width:  |  Height:  |  Size: 157 KiB

After

Width:  |  Height:  |  Size: 158 KiB

View File

@ -146,7 +146,7 @@ class Status:
warn_balance()
print()
print(COLOR_SOME + 'Committen nicht vergessen.' + COLOR_RESET)
print(COLOR_MUCH + 'Committen nicht vergessen.' + COLOR_RESET)
else:
print('Kontostand beträgt: %s%.2f Euro%s' % (COLOR_MUCH, self.balance, COLOR_RESET))
if self.balance < 0:

View File

@ -13,7 +13,7 @@ class DepositCommand(object):
self._difference = amount
def difference(self):
self._difference
return self._difference
def run(self, user_name):
net.deposit(self._difference, net.DEPOSIT_CASH, user_name)

BIN
devel/grafiken/deposit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html {% if user.is_authenticated %}class="loggedIn"{% endif %}>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" media="screen" type="text/css"

View File

@ -0,0 +1,31 @@
{% if buyables %}
{% if removeWrapper == None %}
<table width=100%>
<tbody>
{% endif %}
{% for buyable in buyables %}
<tr>
<td class="productImage">
<a href="/store/show/{{ buyable.buyable__id }}"><img src="{{ MEDIA_URL }}{{ buyable.buyable__image }}" /></a>
</td>
<td class="name"><span>{{ buyable.buyable__name }}</span> ({{ buyable.num_buys }} mal gekauft)</td>
<td>
{% if buyable.buyable__deposit > 0 %}
<a class="buyButton" href="/store/buy/{{ buyable.buyable__id }}" title="Kaufen (Ohne Pfand)"><span>Kaufen (Ohne Pfand)</span></a>
<a class="buyButton includingDeposit" href="/store/buy/{{ buyable.buyable__id }}/with/deposit" title="Kaufen (Mit Pfand)"><span>Kaufen (Mit Pfand)</span></a>
{% if includeDeposit %}
<a class="buyButton onlyDeposit" href="/store/buy/{{ buyable.buyable__id }}/only/deposit" title="Kaufen (Nur Pfand)"><span>Kaufen (Nur Pfand)</span></a>
{% endif %}
{% else %}
<a class="buyButton" href="/store/buy/{{ buyable.buyable__id }}" title="Kaufen"><span>Kaufen</span></a>
{% endif %}
</td>
</tr>
{% endfor %}
{% if removeWrapper == None %}
</tbody>
</table>
{% endif %}
{% else %}
<p>{{ default|default_if_none:"Noch keine gekauft" }}</p>
{% endif %}

View File

@ -1,238 +1,45 @@
{% extends "base.html" %}
{% block "content" %}
<div style="width:1200px">
{% if allMostDrinks or allMostSnacks %}
<table width="100%" class="showitem" style="border-width:0px">
<tr>
<td>
&nbsp;
</td>
<td>
<h1>Die beliebtesten Artikel</h1>
</td>
<td>
<h1>Deine Lieblingsartikel</h1>
</td>
<td>
<h1>Zuletzt hattest du:</h1>
</td>
</tr>
<tr>
<td style="-moz-transform: rotate(270deg); -webkit-transform: rotate(270deg); -ms-transform: rotate(270deg); -o-transform: rotate(270deg); transform: rotate(270deg)">
<h1 style="vertical-align:top">Getr&auml;nke</h1>
</td>
<td style="vertical-align:top">
{% if allMostDrinks %}
<table width=100%>
{% for buyable in allMostDrinks %}
<tr>
<td width="80px">
<a href="/store/show/{{ buyable.buyable__id }}"><img width=64 height=64 src="{{ MEDIA_URL }}{{ buyable.buyable__image }}"></a>
</td>
<td>
<b>{{ buyable.buyable__name }}</b><br/>({{ buyable.num_buys }} mal)
</td>
<td width="150px">
<a class="button" href="/store/buy/{{ buyable.buyable__id }}">Kaufen
{% if buyable.buyable__deposit > 0 %}
(Ohne Pfand)</a> <a class="button" href="/store/buy/{{ buyable.buyable__id }}/with/deposit">Kaufen (Mit Pfand)</a>
{% else %}
</a>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
{% else %}
Noch keine gekauft.
{% endif %}
</td>
<td style="vertical-align:top">
{% if usersMostDrinks %}
<table width=100%>
{% for buyable in usersMostDrinks %}
<tr>
<td width="80px">
<a href="/store/show/{{ buyable.buyable__id }}"><img width=64 height=64 src="{{ MEDIA_URL }}{{ buyable.buyable__image }}"></a>
</td>
<td>
<b>{{ buyable.buyable__name }}</b><br/> ({{ buyable.num_buys }} mal)
</td>
<td width="150px">
<a class="button" href="/store/buy/{{ buyable.buyable__id }}">Kaufen
{% if buyable.buyable__deposit > 0 %}
(Ohne Pfand)</a> <a class="button" href="/store/buy/{{ buyable.buyable__id }}/with/deposit">Kaufen (Mit Pfand)</a>
{% else %}
</a>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
{% else %}
Noch keine gekauft.
{% endif %}
</td>
<td style="vertical-align:top">
{% if usersLastDrinks %}
<table width=100%>
{% for buyable in usersLastDrinks %}
<tr>
<td width="80px">
<a href="/store/show/{{ buyable.buyable__id }}"><img width=64 height=64 src="{{ MEDIA_URL }}{{ buyable.buyable__image }}"></a>
</td>
<td>
<b>{{ buyable.buyable__name }}</b>
</td>
<td width="150px">
<a class="button" href="/store/buy/{{ buyable.buyable__id }}">Kaufen
{% if buyable.buyable__deposit > 0 %}
(Ohne Pfand)</a> <a class="button" href="/store/buy/{{ buyable.buyable__id }}/with/deposit">Kaufen (Mit Pfand)</a>
{% else %}
</a>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
{% else %}
Noch keine gekauft.
{% endif %}
</td>
</tr>
<tr>
<th style="-moz-transform: rotate(270deg); -webkit-transform: rotate(270deg); -ms-transform: rotate(270deg); -o-transform: rotate(270deg); transform: rotate(270deg)">
<h1>Snacks</h1>
</th>
<td style="vertical-align:top">
{% if allMostSnacks %}
<table width=100%>
{% for buyable in allMostSnacks %}
<tr>
<td width="80px">
<a href="/store/show/{{ buyable.buyable__id }}"><img width=64 height=64 src="{{ MEDIA_URL }}{{ buyable.buyable__image }}"></a>
</td>
<td>
<b>{{ buyable.buyable__name }}</b><br/> ({{ buyable.num_buys }} mal)
</td>
<td width="150px">
<a class="button" href="/store/buy/{{ buyable.buyable__id }}">Kaufen
{% if buyable.buyable__deposit > 0 %}
(Ohne Pfand)</a> <a class="button" href="/store/buy/{{ buyable.buyable__id }}/with/deposit">Kaufen (Mit Pfand)</a>
{% else %}
</a>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
{% else %}
Noch keine gekauft.
{% endif %}
</td>
<td style="vertical-align:top">
{% if usersMostSnacks %}
<table width=100%>
{% for buyable in usersMostSnacks %}
<tr>
<td width="80px">
<a href="/store/show/{{ buyable.buyable__id }}"><img width=64 height=64 src="{{ MEDIA_URL }}{{ buyable.buyable__image }}"></a>
</td>
<td>
<b>{{ buyable.buyable__name }}</b><br/> ({{ buyable.num_buys }} mal)
</td>
<td width="150px">
<a class="button" href="/store/buy/{{ buyable.buyable__id }}">Kaufen
{% if buyable.buyable__deposit > 0 %}
(Ohne Pfand)</a> <a class="button" href="/store/buy/{{ buyable.buyable__id }}/with/deposit">Kaufen (Mit Pfand)</a>
{% else %}
</a>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
{% else %}
Noch keine gekauft.
{% endif %}
</td>
<td style="vertical-align:top">
{% if usersLastSnacks %}
<table width=100%>
{% for buyable in usersLastSnacks %}
<tr>
<td width="80px">
<a href="/store/show/{{ buyable.buyable__id }}"><img width=64 height=64 src="{{ MEDIA_URL }}{{ buyable.buyable__image }}"></a>
</td>
<td>
<b>{{ buyable.buyable__name }}</b>
</td>
<td width="150px">
<a class="button" href="/store/buy/{{ buyable.buyable__id }}">Kaufen
{% if buyable.buyable__deposit > 0 %}
(Ohne Pfand)</a> <a class="button" href="/store/buy/{{ buyable.buyable__id }}/with/deposit">Kaufen (Mit Pfand)</a>
{% else %}
</a>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
{% else %}
Noch keine gekauft.
{% endif %}
</td>
</tr>
{% if allMostDrinks or allMostSnacks %}
<table class="showitem">
<thead>
<tr>
<td role="presentation">&nbsp;</td>
<th scope="column">Die beliebtesten Artikel</th>
<th scope="column">Deine Lieblingsartikel</td>
<th scope="column">Zuletzt hattest du</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Getränke</th>
<td>
{% include "main/product_list.html" with buyables=allMostDrinks %}
</td>
<td>
{% include "main/product_list.html" with buyables=usersMostDrinks %}
</td>
<td>
{% include "main/product_list.html" with buyables=usersLastDrinks %}
</td>
</tr>
<tr>
<th scope="row">Snacks</th>
<td>
{% include "main/product_list.html" with buyables=allMostSnacks %}
</td>
<td>
{% include "main/product_list.html" with buyables=usersMostSnacks %}
</td>
<td>
{% include "main/product_list.html" with buyables=usersLastSnacks %}
</td>
</tr>
</tbody>
</table>
{% else %}
{{ error }}
Es hat scheinbar noch niemand etwas gekauft. <a href="/store/">Sei der Erste!</a>
{% endif %}
</div>
{% comment %}
<div style="width:800px">
{% if usersMostSnacks or usersMostDrinks %}
<h1>Deine Lieblingsartikel</h1>
<table class="showitem" width="100%" style="border-width:0px">
<tr>
<th width="50%">
Getr&auml;nke
</th>
<th width="50%">
Snacks
</th>
</tr>
<tr>
</tr>
</table>
{% else %}
{{ error }}
Wie es aussieht, hast du noch nichts gekauft. <a href="/store/">Das kannst du &auml;ndern!</a>
{% endif %}
</div>
<div style="width:800px">
{% if usersLastSnacks or usersLastDrinks %}
<h1>Du hattest als letztes:</h1>
<table class="showitem" width="100%" style="border-width:0px">
<tr>
<th width="50%">
Getr&auml;nke
</th>
<th width="50%">
Snacks
</th>
</tr>
<tr>
</tr>
</table>
{% else %}
{{ error }}
{% endif %}
</div>
{% endcomment %}
{% endblock %}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 645 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -1,7 +1,8 @@
/* THOSE ARE JUST TEMPORARY, I CHANGE THEM LATER INTO LOCAL RESOURCES */
/* THOSE ARE JUST TEMPORARYLY, I CHANGE THEM LATER INTO LOCAL RESOURCES */
/* OR DOES SHE?! */
@import url(http://fonts.googleapis.com/css?family=Droid+Serif:regular,italic,bold,bolditalic&subset=latin);
@import url(http://fonts.googleapis.com/css?family=Droid+Sans:regular,bold&subset=latin);
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400italic,400,600,700);
@import url(http://fonts.googleapis.com/css?family=Istok+Web:400,700);
/* jQuery Theme */
/* @import url(jquery-ui-1.8.10.custom.css); */
@ -18,90 +19,98 @@ b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
background: transparent;
border: 0;
margin: 0;
padding: 0;
vertical-align: baseline;
background: transparent;
border: 0;
margin: 0;
padding: 0;
vertical-align: baseline;
}
a:focus {
outline: none;
}
/* added by seba because nobody else did this. */
.content {
margin: 5px;
}
/* end of addition */
body {
line-height: 1;
line-height: 1;
}
h1, h2, h3, h4, h5, h6 {
clear: both;
font-weight: normal;
h1, h2, h3, h4, h5, h6, th {
clear: both;
font-weight: bold;
font-family: "Istok Web", inherit;
}
ol, ul, li {
list-style: none;
list-style: none;
}
blockquote {
quotes: none;
quotes: none;
}
blockquote:before, blockquote:after {
content: '';
content: none;
content: '';
content: none;
}
del {
text-decoration: line-through;
text-decoration: line-through;
}
/* tables still need 'cellspacing="0"' in the markup */
table {
border-collapse: collapse;
border-spacing: 0;
border-collapse: collapse;
border-spacing: 0;
}
a img {
border: none;
border: none;
}
/* GENERAL SETTINGS */
body {
font: 11px "lucida grande", tahoma, verdana, arial, sans-serif;
}
h1, h2, h3, h4, h5, h6 {
font-family: 'Droid Serif', Garamond, serif;
font: 11px "Open Sans", Tahoma, Verdana, Arial, sans-serif;
}
p { margin-bottom: 7px; }
input {
padding: 2px 5px;
border: 1px solid #E5E5E5;
background: none repeat scroll 0 0 #FBFBFB;
padding: 2px 5px;
border: 1px solid #E5E5E5;
background: none repeat scroll 0 0 #FBFBFB;
}
input[type=text]:focus, input[type=search]:focus, input[type=password]:focus {
background: #FAFFBD;
background: #FAFFBD;
}
/* HEADER */
#header {
margin-bottom: 20px;
margin-bottom: 20px;
background: #333;
background-image: -webkit-gradient(linear, left top, left bottom, from(#666666), to(#111111));
background-image: -webkit-linear-gradient(top, #666666, #111111);
background-image: -moz-linear-gradient(top, #666666, #111111);
background-image: -ms-linear-gradient(top, #666666, #111111);
background-image: -o-linear-gradient(top, #666666, #111111);
background-image: linear-gradient(top, #666666, #111111);
filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#666666', EndColorStr='#111111');
}
#header > div {
padding: 5px 10px;
padding: 5px 10px;
}
#header .search {
background: url("img/logo.png") 10px center no-repeat #323232;
height: 40px;
background: url("img/logo.png") 10px center no-repeat transparent;
height: 40px;
}
#header .search input[type='search'] {
@ -110,73 +119,100 @@ input[type=text]:focus, input[type=search]:focus, input[type=password]:focus {
}
#header .search form {
float: right;
line-height: 40px;
float: right;
line-height: 40px;
}
#header .base_nav {
background: url("img/base_nav_bg.gif") repeat-x #339DD1;
text-transform: uppercase;
height: 50px;
color: white;
background: #3398cc;
background-image: -webkit-gradient(linear, left top, left bottom, from(#32bbef), to(#3398cc));
background-image: -webkit-linear-gradient(top, #32bbef, #3398cc);
background-image: -moz-linear-gradient(top, #32bbef, #3398cc);
background-image: -ms-linear-gradient(top, #32bbef, #3398cc);
background-image: -o-linear-gradient(top, #32bbef, #3398cc);
background-image: linear-gradient(top, #32bbef, #3398cc);
filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#32bbef', EndColorStr='#3398cc');
text-transform: uppercase;
color: white;
border-bottom: 2px solid black;
padding-top: 10px;
-moz-box-shadow: 0 3px 8px 0 black inset;
-webkit-box-shadow: 0 3px 8px 0 black inset;
box-shadow: 0 3px 8px 0 black inset;
}
#header .base_nav h1 {
color: white;
float: left;
margin-right: 20px;
line-height: 50px;
color: white;
display: inline-block;
margin: 0 20px 0 0;
padding: 5px 0 0 0;
vertical-align: middle;
line-height: 1;
text-shadow: 0 -1px #777;
}
#header .base_nav ul {
float: left;
display: inline-block;
vertical-align: middle;
}
#header .base_nav ul li {
display: inline-block;
text-transform: uppercase;
line-height: 36px;
display: inline-block;
font-weight: bold;
margin-right: 10px;
}
#header .base_nav a {
display: block;
margin-top: 7px;
padding: 0 10px;
text-decoration: none;
color: white;
text-align: center;
//background: #3398cc;
display: block;
vertical-align: middle;
text-decoration: none;
color: inherit;
padding: 10px 15px;
margin: 3px 0;
-webkit-border-radius: 20px;
-moz-border-radius: 20px;
border-radius: 20px;
-webkit-transition: background .2s;
}
#header .base_nav a:hover {
background: white;
color: #339DD1;
-webkit-transition: background .2s;
background: white;
color: #339DD1;
-webkit-box-shadow: 0 1px 0 0 #777 inset;
-moz-box-shadow: 0 1px 0 0 #777 inset;
box-shadow: 0 1px 0 0 #777 inset;
}
span.balance {
float: right;
line-height: 50px;
float:right;
padding: 10px 0;
margin: 3px 0;
}
/* LOGIN FORM */
form.login {
width: 300px;
margin: 60px auto;
/*-moz-box-shadow: 3px 3px 6px #333;
-webkit-box-shadow: 3px 3px 6px #333;*/
box-shadow: 1px 1px 2px #eaeaea;
border: 1px solid #E5E5E5;
padding: 20px;
width: 300px;
margin: 60px auto;
-moz-box-shadow: 1px 1px 2px #eaeaea;
-webkit-box-shadow: 1px 1px 2px #eaeaea;
box-shadow: 1px 1px 2px #eaeaea;
border: 1px solid #E5E5E5;
padding: 20px;
}
form.login label {
display: block;
margin-top: 10px;
margin-bottom: 3px;
display: block;
margin-top: 10px;
margin-bottom: 3px;
}
form.login input {
font-size: 24px;
width: 97%;
font-size: 24px;
width: 97%;
}
form.login input[type=submit] {
@ -214,37 +250,39 @@ form.login input[type=submit]:active {
/* NOTIFICATIONS */
div.error, div.notice, div.success {
border-top: 1px solid #DDD;
padding: 0.6em 0.8em;
position: fixed;
bottom: 0;
width: 100%;
border-top: 1px solid #DDD;
padding: 0.6em 0.8em;
position: fixed;
bottom: 0;
width: 100%;
}
div.error h2, div.notice h2, div.success h2 {
font-size: 100%;
font-weight: bold;
margin-bottom: 10px;
font-size: 100%;
font-weight: bold;
margin-bottom: 10px;
}
div.error {
background: #FBE3E4;
color: #8A1F11;
border-color: #FBC2C4;
background: #FBE3E4;
color: #8A1F11;
border-color: #FBC2C4;
}
div.error a { color:#8A1F11; }
div.notice {
background: #FFF6BF;
color: #514721;
border-color: #FFD324;
background: #FFF6BF;
color: #514721;
border-color: #FFD324;
}
div.notice a { color:#514721; }
div.success{
background: #E6EFC2;
color: #264409;
border-color: #C6D880;
background: #E6EFC2;
color: #264409;
border-color: #C6D880;
}
div.success a { color:#264409; }
@ -339,56 +377,103 @@ html body div#header div.search ul.ui-autocomplete li.ui-menu-item.focus {
font-weight: bold;
}
/* TABLE */
/* Edited by Theri */
table.showitem {
border:1px solid #DFDFDF;
border-collapse: separate;
border-spacing: 5pt;
border: 0 none;
border-collapse: collapse;
width: 100%;
}
table.showitem td {
vertical-align: middle;
table.showitem td.productImage {
width: 80px;
text-align: center;
}
table.showitem td.productImage img {
max-width: 100%;
max-height: 64px;
}
table.showitem th {
vertical-align: middle;
font-size: 20px;
text-align:center;
}
table.details {
border-width: 0px;
margin-top: 25px;
}
table.details th {
vertical-align: middle;
text-align: center;
}
table.details td {
vertical-align: middle;
text-align: center;
}
.content a {
color: #3398CC;
text-decoration: none;
}
.content a.button {
text-align: center;
display: block;
margin-top: 7px;
table.showitem td.name {
padding: 0 10px;
}
.content a:hover {
background: #3398CC;
color: white;
table.showitem td.name span {
display: block;
font-weight: bold;
}
.content h1 {
font: 20px "lucida grande", tahoma, verdana, arial, sans-serif;
text-align: center;
table.showitem td, table.showitem th {
vertical-align: middle;
}
table.showitem tr td {
padding-bottom: 10px;
}
table.showitem th[scope="row"] {
width: 20px;
padding: 0;
margin: 0;
-moz-transform: rotate(270deg);
-webkit-transform: rotate(270deg);
-ms-transform: rotate(270deg);
-o-transform: rotate(270deg);
transform: rotate(270deg);
}
a.buyButton {
display: block;
padding: 5px 10px;
height: 32px;
text-align: center;
border-radius: 6px;
float: left;
margin-right: 10px;
background-image: -webkit-gradient(linear, left top, left bottom, from(#666666), to(#111111));
background-image: -webkit-linear-gradient(top, #666666, #111111);
background-image: -moz-linear-gradient(top, #666666, #111111);
background-image: -ms-linear-gradient(top, #666666, #111111);
background-image: -o-linear-gradient(top, #666666, #111111);
background-image: linear-gradient(top, #666666, #111111);
filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#666666', EndColorStr='#111111');
-moz-box-shadow: 0 1px 3px 0 black;
-webkit-box-shadow: 0 1px 3px 0 black;
box-shadow: 0 1px 3px 0 black;
}
a.buyButton:hover {
background-image: -webkit-gradient(linear, left top, left bottom, from(#555555), to(#000000));
background-image: -webkit-linear-gradient(top, #555555, #000000);
background-image: -moz-linear-gradient(top, #555555, #000000);
background-image: -ms-linear-gradient(top, #555555, #000000);
background-image: -o-linear-gradient(top, #555555, #000000);
background-image: linear-gradient(top, #555555, #000000);
filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#555555', EndColorStr='#000000');
}
a.buyButton:active {
-moz-box-shadow: 0 1px 3px 0 black, 0 1px 3px 0 black inset;
-webkit-box-shadow: 0 1px 3px 0 black, 0 1px 3px 0 black inset;
box-shadow: 0 1px 3px 0 black, 0 1px 3px 0 black inset;
}
a.buyButton.includingDeposit span {
background-image: url("img/payment_deposit.png");
min-width: 65px;
}
a.buyButton span {
display: block;
height: 100%;
min-width: 32px;
background: url("img/payment.png") no-repeat center center transparent;
text-indent: -10000px;
}

View File

@ -1,24 +1,28 @@
jQuery(document).ready(function($) {
if(!$("html").hasClass("loggedIn"))
return;
var search_input = $("div.search input.autocomplete");
var selected_item = [];
var selection = false;
var lock = false;
var items = [false];
$.getJSON('/api/store/', function(data) {
$.getJSON("/api2/buyable/item", function(data) {
if(data.error === undefined) {
source = [];
$.each(data, function(key, val) {
items[val.pk] = val;
$.each(data, function(key, item) {
items[item.id] = item;
source.push({
value: val.pk,
label: "<span class='preview pk" + val.pk + "'><img src='" +
MEDIA_URL + val.fields.image + "' alt='" +
val.fields.name + "' /></span>" +
"<span class='meta'>" + val.fields.name +
"<br />Preis: " + val.fields.price.toFixed(2) +
value: item.id,
label: "<span class='preview pk" + item.id + "'><img src='" +
MEDIA_URL + item.image + "' alt='" +
item.name + "' /></span>" +
"<span class='meta'>" + item.name +
"<br />Preis: " + parseFloat(item.price).toFixed(2) +
" €</span><span class='buy'></span>"
});
});
@ -58,8 +62,8 @@ jQuery(document).ready(function($) {
if(lock && event.keyCode === 39) {
selected_item.addClass("load");
$.get("/api/store/buy/" + selection.value + "/", {
$.post("/api2/buyable/item/" + selection.value, {
"deposit": "1"
}, function(data, status) {
selected_item.removeClass("load");