Skip to content

Commit

Permalink
Restructured css: all syles should be in styles.css in it's apropriat…
Browse files Browse the repository at this point in the history
…e 'namespace'. No more asyncronus js for checker progress - simple spinner instead. Closes #4, Closes #5. Tables with forms were replaced with divs. Closes #2. Breadcrumbs for easyier navigation. Some minor style and bug fixes.
  • Loading branch information
danielkleinert committed May 30, 2010
1 parent da9e9c4 commit ff0b26a
Show file tree
Hide file tree
Showing 20 changed files with 349 additions and 262 deletions.
Binary file added media/images/loading.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added media/images/ui-icons_ffffff_256x240.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
234 changes: 192 additions & 42 deletions media/styles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,57 @@

/* @group Global */

/* @group Page Structure */
/* @group Browser reset */

h1, h2, h3, h4, h5, h6 {
margin-bottom: 10px;
}

h1{
font-size: 20px;
margin-bottom: 20px;
}
h2{
font-size: 16px;
margin-bottom: 16px;
}

#help_icon {
float: right;
}
h3{
font-size: 12px;
}

p, ol, pre, input{
margin-bottom: 10px;
}

pre{
left: -14px;
padding-left: 20px;
}

ul li{
list-style-type: disc;
}

ol li{
list-style-type: decimal;
}

li {
padding-left: 20px;
margin-bottom: 10px;
list-style-position: inside;
}

/* @end */

/* @group Page structure */

body {
background: #FFFFFF none repeat scroll 0 0;
background: #fff none repeat scroll 0 0;
color: #333333;
font-family: "Lucida Grande","DejaVu Sans","Bitstream Vera Sans",Verdana,Arial,sans-serif;
font-size: 12px;
Expand All @@ -17,16 +64,14 @@ body {
position: relative;
width: 100%;
min-width: 760px;
padding: 0;
}

#content {
width: 800px;
margin-right: auto;
margin-left: auto;
margin-bottom: 10px;
padding-right: 20px;
padding-bottom: 20px;
padding: 20px;
}

#footer {
Expand All @@ -45,44 +90,62 @@ body {
width: 100%;
}

#header a:link, #header a:visited {
color: white;
#sub_header {
background: #005094;
overflow: hidden;
width: 100%;
color: #eaeaea;
font-size: 11px;
padding-top: 3px;
padding-bottom: 4px;
}

#header a:hover {
text-decoration: underline;
.inner {
width: 800px;
margin-right: auto;
margin-left: auto;
padding-left: 20px;
padding-right: 20px;
}

#title h1 {
padding: 0 10px;

font-size: 18px;
margin: 8px 0;
font-weight: normal;
color: white;
float: left;
margin-top: 8px;
margin-bottom: 8px;
}

#title h2 {
padding: 0 10px;
font-size: 14px;
margin: -8px 0 8px 0;
font-weight: normal;
color: #ffc;
#user-tools {
float: right;
margin-top: 12px;
}

#user-tools {
position: absolute;
top: 0;
right: 0;
padding: 1.2em 10px;
font-size: 11px;
text-align: right;
#header a:link, #header a:visited{
color: white;
text-decoration: none;
}

#sub_header a:link, #sub_header a:visited, #sub_header a{
color: #eaeaea;
text-decoration: none;
}

#sub_header a:hover{
text-decoration: underline;
}

#header a:hover{
text-decoration: underline;
}

/* @end */

/* @group Forms */

th {
form th {
text-align: right;
vertical-align: top;
}
Expand All @@ -96,6 +159,14 @@ label {
font-size: 10pt;
font-family: sans-serif;
vertical-align: top;
float: left;
width: 8em;
display: block;
}

form .help{
margin-left: 9em;
color: #999999;
}

.errorlist {
Expand Down Expand Up @@ -139,6 +210,11 @@ label {
background-image: url(../images/ui-icons_c31818_256x240.png);
}

.icon-white {
background-image: url(../images/ui-icons_ffffff_256x240.png);
}


.icon-none {
background-image: none !important;
}
Expand All @@ -160,20 +236,90 @@ label {

/* @group Task */

/* @group Task Detail */

#task_detail #submission_date {
float: right;
}

/* @end */

/* @group Task List */

div.left {
#task_list div.left {
float: left;
width: 48%;
padding-right: 2%;
}

#task_list div.right {
float: right;
width: 48%;
padding-left: 2%;
}



/* @end */



/* @end */

/* @group Solution */

/* @group Solution Detail */

#solution_detail #commit_text {
display: inline;
}

#solution_detail form {
display: inline;
}



/* @end */

/* @group Solution Upload */

#soluion_upload div.left {
float: left;
width: 48%;
padding-right: 2%;
}

div.right {
#soluion_upload div.right {
float: right;
width: 48%;
padding-left: 2%;
}

#soluion_upload div.left a {
float: right;
}

#soluion_upload .simple_overlay {
/* must be initially hidden */
display:none;

/* styling */
color:#fff;
width: 30%;
min-height:200px;
padding:35px;
font-size: 20px;
}

#soluion_upload img#spinner {
display: inline;
float: left;
position: relative;
top: 4px;
margin-right: 10px;
}



/* @end */
Expand All @@ -186,73 +332,77 @@ div.right {

/* @group Attestation Edit */

.activeFile {
#attestation_edit .activeFile {
font-weight: bold;
}

.ui-tabs .ui-tabs-hide, .hidden {


#attestation_edit .ui-tabs .ui-tabs-hide, .hidden {
/* override display:none of hidden tab to instantiate bespin
see http://jqueryui.com/demos/tabs/ */
position: absolute;
left: -10000px;
}

h3.result {
#attestation_edit h3.result {
text-decoration: none;
}

div.result span.icon {
#attestation_edit div.result span.icon {
float: left;
margin-right: .3em;
width: 16px;
height: 16px;
}

.bespin {
#attestation_edit .bespin {
margin: 0;
margin-top: 10px;
padding: 0;
border: 0;
height: 500px;
border: 10px
solid #ddd;
border: 10px solid #ddd;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
}



/* @end */

/* @group Attestation List */

#comment {
#attestation_list #comment {
color: #c0c0c0;
width: 80%;
float: right;
}

div.attestation {
#attestation_list div.attestation {
position: relative;
left: 20px;
}

#Solutions form {
#attestation_list #Solutions form {
margin-top: 40px;
}

#soluion_upload div.attestation {
margin-left: 15px;
}



/* @end */

/* @group Attestation View */

div.changed {
#attestation_view div.changed {
background-color: #c4ff6f;
}

#attestation_view form .help {
display: inline;
margin-left: 60px;
}



/* @end */
Expand Down
11 changes: 7 additions & 4 deletions src/praktomat/attestation/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@ def attestation_list(request, task_id):
# don't allow a new attestation if one already exists
solution_list = map(lambda solution:(solution, not solution.attestations_by(requestuser)), solutions)
# first published => all published
published = solutions[0].attestations_by(requestuser)[0].published
all_solutions_attested = not reduce(lambda x,y: x or y, [new_attest_possible for (solution, new_attest_possible) in solution_list])
try:
published = solutions[0].attestations_by(requestuser)[0].published
except IndexError:
published = False
all_solutions_attested = not reduce(lambda x,y: x or y, [new_attest_possible for (solution, new_attest_possible) in solution_list], False)
all_attestations_final = reduce(lambda x,y: x and y,
map(lambda attestation: attestation.final ,
sum([list(solution.attestations_by(requestuser)) for solution in solutions],[])))
publishable = all_solutions_attested and all_attestations_final
sum([list(solution.attestations_by(requestuser)) for solution in solutions],[])), True)
publishable = all_solutions_attested and all_attestations_final and task.expired()
if request.method == "POST" and publishable:
for solution in solutions:
for attestation in solution.attestations_by(requestuser):
Expand Down
Loading

0 comments on commit ff0b26a

Please sign in to comment.