From d0d62708682273685a85f849934df25bfe171bc2 Mon Sep 17 00:00:00 2001
From: Andreas Demmelbauer ']
+ body = ['
']
for event in self.events.exclude(startDate__gt=d1).exclude(endDate__lt=d, endDate__isnull=False).exclude(endDate__isnull=True, startDate__lt=d):
- body.append('
')
- return self.day_cell(cssclass, '%d %s' % (day, (u''.join(body)).encode('utf-8')))
+ return self.day_cell(cssclass, 'Event created or updated!
' + r.responseText;
+ document.getElementById('calendar-update').parentNode.appendChild(notification);
+
+ new Ajax.Updater('calendar-update', calendarUpdateURL, {
+ method: 'get'
+ });
+
+// new Notification('success', 'Event created/updated!', r.responseText).show();
+
+
+ },
+ onFailure: function(r) {
+ cnt.innerHTML = r.responseText;
+ DateTimeShortcuts.init.defer(1);
+ }
+ })
}
function update_metasense() {
/*new Ajax.Request('http://metalab.at/metasense/status.html', {asynchronous:true, onFailure:function(){}, onException:function(){}, onSuccess:function(transport){ */
- new Ajax.Request('/metasense/status.html', {asynchronous:true, onFailure:function(){}, onException:function(){}, onSuccess:function(transport){
+ new Ajax.Request('/metasense/status.html', {asynchronous:true, onFailure:function(){}, onException:function(){}, onSuccess:function(transport){
oopen = $('presence_open');
oclosed = $('presence_closed');
odefunct = $('presence_defunct');
@@ -137,7 +148,7 @@ function update_metasense() {
set_invisible(odefunct);
} else if( transport.responseText.match("niemand")){
set_visible(oclosed);
- set_invisible(oopen);
+ set_invisible(oopen);
set_invisible(odefunct);
} else {
set_invisible(oopen);
diff --git a/static/stylesheets/cal.css b/static/stylesheets/cal.css
index 9a5833f..6a04b08 100644
--- a/static/stylesheets/cal.css
+++ b/static/stylesheets/cal.css
@@ -5,16 +5,15 @@
#calendar-content ul {
border: 1px solid #ddd;
+ box-sizing: border-box;
}
#calendar-content li {
display: block;
-/* width:100%; broken on IE7 :(*/
- width: 329px;
}
-#calendar-content div {
- padding: 1px 0 0 1px;
+#calendar-content li {
+ padding: 1px 1px 0 1px;
}
#calendar-content li p {
@@ -27,7 +26,7 @@
}
*/
#calendar-content li .event {
- background: #C8D8FF;
+ background: #C8D8FF;
}
#calendar-content li .past_event {
@@ -66,6 +65,7 @@
table.month {
border-collapse: collapse;
+ width: 100%;
}
table.month th {
@@ -78,7 +78,7 @@ table.month th {
table.month th.month {
background-color: inherit;
font-size: 20pt;
- padding: 4px;
+ padding: 4px 0;
color: #aaa;
text-align: right;
}
@@ -87,8 +87,9 @@ table.month td {
border: 1px solid white;
background-color: #ddd;
width: 14%;
- height: 110px;
+ height: 5em;
color: #999;
+ hyphens: auto;
}
table.month td:nth-last-child(-n+2) {
@@ -115,62 +116,53 @@ table.month td li:last-child {
}
table.month td.today {
- background-color: #c0c0ff;
+ background-color: #c0c0ff;
color:white;
font-weight:bold;
}
+table.month .day-nr {
+ text-align: right;
+ line-height: 1em;
+}
+table.month .event-time {
+ font-weight: bold;
+}
+#calendar-year-list {
+ text-align: right;
+}
-@media screen and (max-width: 800px) {
+.edit-form {
+ max-width: 20em;
+ background-color: #f6f6f6;
+ padding: 1em;
+}
- table.month th.month {
- text-align: left;
- margin: .2em 0;
- }
- .month .noday, /* hide nodays */
- .month tr:nth-child(2) /* hide weekdays*/
- {
- position: absolute;
- top: -9999px;
- left: -9999px;
- }
+@media screen and (max-width: 800px) {
- table.month td {
- width:auto;
+ table.month {
+ margin: 0 -2%;
+ width: 104%;
}
-
- /* reset table stuff */
- table.month,
- .month tbody,
- .month th,
- .month td,
- .month tr {
- display: block;
+ table.month .event-time {
+ display: block;
+ font-size: .9em;
}
-
- .month td {
- position: relative;
- padding-left: 2em;
+ table.month .event {
+ font-size: .9em;
+ word-wrap: break-word;
+ hyphens: auto;
+ line-height: 1em;
+ word-break: break-all;
+ overflow-wrap: break-word;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ width: 100%;
+ word-wrap: normal;
}
- /* weekdays via css */
- .month td:before {
- position: absolute;
- top: 3px;
- left: 3px;
- padding-right: 10px;
- white-space: nowrap;
- }
- .month td:nth-of-type(1):before { content: "Mo"; }
- .month td:nth-of-type(2):before { content: "Di"; }
- .month td:nth-of-type(3):before { content: "Mi"; }
- .month td:nth-of-type(4):before { content: "Do"; }
- .month td:nth-of-type(5):before { content: "Fr"; }
- .month td:nth-of-type(6):before { content: "Sa"; }
- .month td:nth-of-type(7):before { content: "So"; }
}
-
diff --git a/static/stylesheets/global.css b/static/stylesheets/global.css
index eb2310e..e7abbc8 100755
--- a/static/stylesheets/global.css
+++ b/static/stylesheets/global.css
@@ -1,56 +1,92 @@
-/* -------------------------
- Metalab CSS
-
- Version 1.0
- ---------------------------*/
-
-html { height: 100%;}
-
-body {
- font: 76% "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
+/* -------------------------
+ Metalab CSS
+
+ Version 1.0
+ ---------------------------*/
+
+html { height: 100%;}
+
+body {
+ font: 76% "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
color: #444;
- line-height: 1.3em;
- }
-
-/* text formating */
-h1, h2, h3 { line-height: 1em;}
-
-h1 { font-size: 1.5em; color: #4F5C7F; margin: 0 0 1em 0;}
-
-h2 { font-size: 1.1em; color: #4F5C7F; margin: 1.5em 0 1em 0;}
-
-h3 { font-size: 1em; font-weight: bold; color: #444; margin: 1.5em 0 1em 0;}
-
-p { margin: 1em 0;}
-
-a { text-decoration: none; color: #5D5EA2;}
-
-a:hover { color: #ffffff; background: #8c9ce9;}
-
-img { border: none;}
-
-strong { font-weight: bold;}
-
-small { font-size: 0.9em;}
-
-/* global classes */
-.ir { text-indent: -100em; overflow: hidden;} /* image replacement - hides text from browsers with css on */
-
-/* form classes */
-.tf { border: 1px solid #ccc}
-
-
-/* table styles */
-td { background: #FFF; padding: 3px 5px; vertical-align: top; }
-
-.thumb_with_text {margin-top:3px;}
-
-#table_user_details td{padding:3px;text-valign:top;}
-
-#table_user_list td {padding:10px 2px;text-valign:top;}
-
-tr.even td {background-color:#EEEEEE;}
-tr.odd td {background-color:white;}
-
+ line-height: 1.3em;
+ }
+
+/* text formating */
+h1, h2, h3 { line-height: 1em;}
+
+h1 { font-size: 1.5em; color: #4F5C7F; margin: 0 0 1em 0;}
+
+h2 { font-size: 1.1em; color: #4F5C7F; margin: 1.5em 0 1em 0;}
+
+h3 { font-size: 1em; font-weight: bold; color: #444; margin: 1.5em 0 1em 0;}
+
+p { margin: 1em 0;}
+
+a { text-decoration: none; color: #5D5EA2;}
+
+a:hover { color: #ffffff; background: #8c9ce9;}
+
+img { border: none;}
+
+strong { font-weight: bold;}
+
+small { font-size: 0.9em;}
+
+/* global classes */
+.ir { text-indent: -100em; overflow: hidden;} /* image replacement - hides text from browsers with css on */
+
+/* form classes */
+.tf { border: 1px solid #ccc}
+
+
+/* table styles */
+td { background: #FFF; padding: 3px 5px; vertical-align: top; }
+
+.thumb_with_text {margin-top:3px;}
+
+#table_user_details td{padding:3px;text-valign:top;}
+
+#table_user_list td {padding:10px 2px;text-valign:top;}
+
+tr.even td {background-color:#eee;}
+tr.odd td {background-color:#fff;}
+
.flattrbtn { display: inline-block; vertical-align: middle; }
-
+
+.btn {
+ background-color: #4F5C7F;
+ color: #fff;
+ font-weight: bold;
+ display: inline-block;
+ font-size: 1.2em;
+ line-height: 1.6em;
+ text-align: center;
+ padding: .3em .6em;
+ min-width: 1.2em;
+}
+
+/* list items inline */
+.inline-list {
+ display: block;
+}
+.inline-list > li {
+ display: inline;
+}
+
+/* notifications */
+.notification {
+ padding: .5em .5em 0;
+ margin-bottom: .5em;
+ border-radius: 5px;
+ background: #fff;
+ border: #aaa 3px solid;
+}
+.notification h3 {
+ font-size: 1.2em;
+ margin: 0;
+}
+.success { border-color: #00bf00; }
+.warning { border-color: #dada10; }
+.error { border-color: #e31515; }
+.info { border-color: #62a7f5; }
diff --git a/static/stylesheets/layout.css b/static/stylesheets/layout.css
index ee65163..3bfcfb7 100644
--- a/static/stylesheets/layout.css
+++ b/static/stylesheets/layout.css
@@ -1,6 +1,6 @@
/* -------------------------
Metalab CSS
-
+
Version 1.0
---------------------------*/
@@ -10,7 +10,7 @@
background: #fff;
border: none;
}
-
+
#page {
width: 900px;
margin: 0 auto 2em auto;
@@ -62,7 +62,7 @@
#login {
float: right;
margin: 0.7em 3em 0 0;
-
+
}
#presence_closed{
@@ -93,7 +93,7 @@
}
-#soup_credits {
+#soup_credits {
font-size:0.8em;
text-align:right;
margin-top:-255px;
@@ -114,7 +114,7 @@ display:none;
}
-#soup_iframe_wrapper {
+#soup_iframe_wrapper {
position:relative;
top:-255px;
@@ -261,6 +261,7 @@ display:none;
}
+
/* small screen stuff */
@media screen and (max-width: 920px) {
@@ -270,7 +271,7 @@ display:none;
}
- #main #column_1,
+ #main #column_1,
#main #column_2,
#soup_iframe,
#calendar-content li,
@@ -281,7 +282,7 @@ display:none;
display: block;
float: none;
}
-
+
#soup,
#project_list {
width: 49%;
@@ -298,11 +299,11 @@ display:none;
#openlab {
padding: 0;
}
-
+
#soup_credits {
text-align: left;
}
-
+
}
@@ -311,8 +312,8 @@ display:none;
#soup,
#calendar,
- #project_list,
- #issue_tracker,
+ #project_list,
+ #issue_tracker,
#recent_changes
{
width: 100% !important;
@@ -365,10 +366,10 @@ display:none;
margin: 0;
padding: 0.7em 1em;
}
-
+
/* move login link next to menu button*/
#login {
margin: 1.2em 5em 0 0;
}
-}
\ No newline at end of file
+}
diff --git a/templates/cal/event_archive.html b/templates/cal/event_archive.html
index 7621ae0..55ec94d 100644
--- a/templates/cal/event_archive.html
+++ b/templates/cal/event_archive.html
@@ -26,22 +26,28 @@ {{HOS_NAME}} Calendar
{{ description.description }}
- {% if not new %} - {{ event.startDate|date:"D d.m.Y H:i" }} {% if event.endDate %} - {% if event.start_end_date_eq %} {{ event.endDate|date:"H:i" }} {% else %} {{ event.endDate|date:"D d.m.Y H:i" }} {% endif %} {% endif %} - {% if event.wikiPage %} {% endif %}{{ event.name }}{% if event.wikiPage %}{% endif %} + {% if not new %} +
+ {{ event.startDate|date:"D d.m.Y H:i" }} {% if event.endDate %} - {% if event.start_end_date_eq %} {{ event.endDate|date:"H:i" }} {% else %} {{ event.endDate|date:"D d.m.Y H:i" }} {% endif %} {% endif %} + {% if event.wikiPage %} {% endif %}{{ event.name }}{% if event.wikiPage %}{% endif %} {% if event.teaser %} {% endif %} {% if event.category %} | {{ event.category }}{% endif %} {% if event.location%} | {{ event.location }}{% endif %} + {% if user.is_authenticated and not edit_disabled %} + + Edit + + ical + {%endif %} +
+ + {%else%} + +Download ALL events in ical format
+ {%endif %} + - {% endif %} - {% if user.is_authenticated and not edit_disabled %} - {%if not new %}Edit{%else%}Create New Event{%endif%} {% endif %} - ical - {% if user.is_authenticated %} -