Skip to content

Commit 8c67bd0

Browse files
author
Stefano Parmesan
committed
Merge branch 'develop'
2 parents 7b985fe + 576bf68 commit 8c67bd0

22 files changed

+702
-26
lines changed

webther/main/helpers.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,12 @@ def float_or_none(something):
55
return float(something)
66
except TypeError:
77
return None
8+
9+
10+
def build_navigation_entries(start_date, end_date, offset):
11+
""" return a list of dates, starting from start_date until end_date,
12+
separated by offset.
13+
"""
14+
while start_date <= end_date:
15+
yield start_date
16+
start_date += offset

webther/main/static/css/bootstrap-responsive.min.css

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webther/main/static/css/bootstrap.min.css

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webther/main/static/css/style.css

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
body {
2+
margin-top: 20px;
3+
}
4+
5+
.content {
6+
display: none;
7+
}
8+
9+
.navigation {
10+
display: inline-block;
11+
margin: 5px;
12+
}
13+
14+
.navigation span {
15+
font-size: 2em;
16+
color: #08c;
17+
cursor: pointer;
18+
display: inline;
19+
}
20+
21+
.navigation span.quiet {
22+
color: #bbb;
23+
}
24+
25+
.popover {
26+
width: 190px;
27+
}
28+
29+
.popover-inner {
30+
width: 100%;
31+
}
8.57 KB
Loading
13.5 KB
Loading
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
/* ===========================================================
2+
* bootstrap-popover.js v2.0.4
3+
* http://twitter.github.com/bootstrap/javascript.html#popovers
4+
* ===========================================================
5+
* Copyright 2012 Twitter, Inc.
6+
*
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* =========================================================== */
19+
20+
21+
!function ($) {
22+
23+
"use strict"; // jshint ;_;
24+
25+
26+
/* POPOVER PUBLIC CLASS DEFINITION
27+
* =============================== */
28+
29+
var Popover = function ( element, options ) {
30+
this.init('popover', element, options)
31+
}
32+
33+
34+
/* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
35+
========================================== */
36+
37+
Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
38+
39+
constructor: Popover
40+
41+
, setContent: function () {
42+
var $tip = this.tip()
43+
, title = this.getTitle()
44+
, content = this.getContent()
45+
46+
$tip.find('.popover-title')[this.isHTML(title) ? 'html' : 'text'](title)
47+
$tip.find('.popover-content > *')[this.isHTML(content) ? 'html' : 'text'](content)
48+
49+
$tip.removeClass('fade top bottom left right in')
50+
}
51+
52+
, hasContent: function () {
53+
return this.getTitle() || this.getContent()
54+
}
55+
56+
, getContent: function () {
57+
var content
58+
, $e = this.$element
59+
, o = this.options
60+
61+
content = $e.attr('data-content')
62+
|| (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
63+
64+
return content
65+
}
66+
67+
, tip: function () {
68+
if (!this.$tip) {
69+
this.$tip = $(this.options.template)
70+
}
71+
return this.$tip
72+
}
73+
74+
})
75+
76+
77+
/* POPOVER PLUGIN DEFINITION
78+
* ======================= */
79+
80+
$.fn.popover = function (option) {
81+
return this.each(function () {
82+
var $this = $(this)
83+
, data = $this.data('popover')
84+
, options = typeof option == 'object' && option
85+
if (!data) $this.data('popover', (data = new Popover(this, options)))
86+
if (typeof option == 'string') data[option]()
87+
})
88+
}
89+
90+
$.fn.popover.Constructor = Popover
91+
92+
$.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
93+
placement: 'right'
94+
, content: ''
95+
, template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'
96+
})
97+
98+
}(window.jQuery);

0 commit comments

Comments
 (0)