diff options
-rw-r--r-- | nop/site_media/nowplaying_form.js | 4 | ||||
-rw-r--r-- | site_media/programcalendar.js | 8 | ||||
-rw-r--r-- | templates/program/day_schedule.html | 22 | ||||
-rw-r--r-- | urls.py | 5 |
4 files changed, 25 insertions, 14 deletions
diff --git a/nop/site_media/nowplaying_form.js b/nop/site_media/nowplaying_form.js index ce3d2aa..1c1384f 100644 --- a/nop/site_media/nowplaying_form.js +++ b/nop/site_media/nowplaying_form.js @@ -1,8 +1,8 @@ jQuery(document).ready(function() { - jQuery("#nop_date").dateinput({ + /*jQuery("#nop_date").dateinput({ format: 'yyyy-mm-dd', firstDay: 1 - }); + });*/ jQuery("#nop_time").AnyTime_picker({ format: "%H:%i", labelTitle: "Zeit", diff --git a/site_media/programcalendar.js b/site_media/programcalendar.js new file mode 100644 index 0000000..c4d91fc --- /dev/null +++ b/site_media/programcalendar.js @@ -0,0 +1,8 @@ +jQuery(document).ready(function() { + jQuery("#calendar").datepicker({ + defaultDate: location.href.split('/').slice(4, 7).reverse().join('.'), + onSelect: function(dateText, inst) { + location = '/programm/' + dateText.split('.').reverse().join('/'); + } + }); +}); diff --git a/templates/program/day_schedule.html b/templates/program/day_schedule.html index a9ac023..a260809 100644 --- a/templates/program/day_schedule.html +++ b/templates/program/day_schedule.html @@ -4,16 +4,24 @@ <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js"></script> <script type="text/javascript" src="http://jquery-ui.googlecode.com/svn/trunk/ui/i18n/jquery.ui.datepicker-de.js"></script> + <script type="text/javascript" src="/site_media/programcalendar.js"></script> <link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/themes/base/jquery-ui.css" rel="stylesheet" /> </head> <body> -<div id="calendar"></div> +<dl id="box_calendar" class="portlet calendar"> + <dt class="portletHeader"><span>Kalender<span></dt> + <dd class="portletItem"> + <div id="calendar"></div> + </dd> +</dl> {% load content_boxes %} <div id="filter-format"> {% broadcastformat %} </div> + +{% comment %} <div id="filter-topic"> <dl id="filter-header" class="portlet"> <dt class="portletHeader"><span>Filter</span></dt> @@ -22,6 +30,7 @@ {% showinformation %} {% showtopic %} </div> +{% endcomment %} <div id="content-main" class="day-schedule"> <h2>Tagesansicht</h2> @@ -97,16 +106,5 @@ </div> </div> -<script> - $(function() { - $("#calendar").datepicker({ - defaultDate: location.href.split('/').slice(4, 7).reverse().join('.'), - onSelect: function(dateText, inst) { - location = '/program/' + dateText.split('.').reverse().join('/'); - } - }); - }) -</script> - </body> </html> @@ -7,6 +7,11 @@ admin.autodiscover() urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)), (r'^program/', include('program.urls')), + (r'^programm/', include('program.urls')), # programcalendar.js has to link + # to /programm, so that deliverance integration works. that would + # break django compat, so this url rule is added. come up with a bttr + # solution and implement it to avoid redundancy and hacks. + # i don't care yet. (r'^nop', include('nop.urls')), (r'^tinymce/', include('tinymce.urls')), ) |