From a4d51d90f268865744a6d54c83d0f298d1faa42d Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Mon, 31 Mar 2014 16:01:12 +0200 Subject: [PATCH] Let the annoying commence. --- edumed/forms.py | 0 edumed/forum.py | 0 edumed/settings.d/35-search.py | 0 edumed/settings.d/40-auth.py | 2 +- edumed/settings.d/40-cache.py | 0 edumed/settings.d/50-contrib.py | 2 +- edumed/settings.d/50-static.py | 2 ++ edumed/static/css/annoy.css | 54 -------------------------------- edumed/static/css/base.css | 4 +-- edumed/static/css/base.scss | 2 +- edumed/static/js/annoy.js | 40 ----------------------- edumed/templates/base_super.html | 2 +- edumed/views.py | 0 requirements.txt | 2 +- 14 files changed, 9 insertions(+), 101 deletions(-) mode change 100755 => 100644 edumed/forms.py mode change 100755 => 100644 edumed/forum.py mode change 100755 => 100644 edumed/settings.d/35-search.py mode change 100755 => 100644 edumed/settings.d/40-cache.py delete mode 100755 edumed/static/css/annoy.css delete mode 100755 edumed/static/js/annoy.js mode change 100755 => 100644 edumed/views.py diff --git a/edumed/forms.py b/edumed/forms.py old mode 100755 new mode 100644 diff --git a/edumed/forum.py b/edumed/forum.py old mode 100755 new mode 100644 diff --git a/edumed/settings.d/35-search.py b/edumed/settings.d/35-search.py old mode 100755 new mode 100644 diff --git a/edumed/settings.d/40-auth.py b/edumed/settings.d/40-auth.py index 675db9d..14847ac 100644 --- a/edumed/settings.d/40-auth.py +++ b/edumed/settings.d/40-auth.py @@ -1,5 +1,5 @@ if 'django_cas' in INSTALLED_APPS: AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', - 'django_cas.backends.CASBackend', + 'fnpdjango.auth_backends.AttrCASBackend', ) diff --git a/edumed/settings.d/40-cache.py b/edumed/settings.d/40-cache.py old mode 100755 new mode 100644 diff --git a/edumed/settings.d/50-contrib.py b/edumed/settings.d/50-contrib.py index 74e8ee8..9306de1 100644 --- a/edumed/settings.d/50-contrib.py +++ b/edumed/settings.d/50-contrib.py @@ -1,5 +1,5 @@ CAS_SERVER_URL = 'http://logowanie.nowoczesnapolska.org.pl/cas/' -CAS_VERSION = '1' +CAS_VERSION = '3' SPONSORS_THUMB_WIDTH = 100 SPONSORS_THUMB_HEIGHT = 56 diff --git a/edumed/settings.d/50-static.py b/edumed/settings.d/50-static.py index f2924eb..c667c32 100644 --- a/edumed/settings.d/50-static.py +++ b/edumed/settings.d/50-static.py @@ -25,6 +25,7 @@ PIPELINE_CSS = { 'catalogue/css/section_list.scss', 'curriculum/curriculum.scss', 'jquery/colorbox/colorbox.css', + 'fnpdjango/annoy/annoy.css', 'css/forum.scss', 'css/mil.scss' @@ -47,6 +48,7 @@ PIPELINE_JS = { 'curriculum/curriculum.js', 'js/formset.js', 'pybb/js/pybbjs.js', + 'fnpdjango/annoy/annoy.js', ), 'output_filename': 'compressed/base.js', }, diff --git a/edumed/static/css/annoy.css b/edumed/static/css/annoy.css deleted file mode 100755 index 17f689d..0000000 --- a/edumed/static/css/annoy.css +++ /dev/null @@ -1,54 +0,0 @@ -#annoy-on { - font-size: 13px; - line-height: 1.15em; - - padding: .1em 1em; - background: orange; - z-index: 200; - font-family: Arial, sans-serif; - display: block; - padding: 0 1em; - width: 1em; - text-align:center; - border-radius: 0 0 0 1em; - position: absolute; - top: 0; - right: 0; - color: black; - box-shadow: .5em 0 1em black; -} - -#annoy { - font-size: 13px; - line-height: 1.15em; - padding: 1em 5em 1em 0; - display: none; - background: orange; - font-family: Arial, sans-serif; - position: relative; - z-index: 200; - box-shadow: 0 0 1em black; -} -#annoy p { - margin: 0 0 0 10em;; -} -#annoy a { - color: #4E56C8; -} - -#annoy a#annoy-off { - padding: .5em 1em .5em; - width: 1em; - text-align:center; - font-family: Arial, sans-serif; - display: block; - - border-radius: 0 0 0 1em; - position: absolute; - top: 0; - right: 0; - color: black; -} -#annoy a#annoy-off:hover { - cursor: pointer; -} diff --git a/edumed/static/css/base.css b/edumed/static/css/base.css index 95fb533..f718c23 100644 --- a/edumed/static/css/base.css +++ b/edumed/static/css/base.css @@ -1,5 +1,5 @@ @charset "UTF-8"; -@import url(http://fonts.googleapis.com/css?family=Dosis:400,700&subset=latin,latin-ext); +@import url(//fonts.googleapis.com/css?family=Dosis:400,700&subset=latin,latin-ext); a { text-decoration: none; color: #ed7831; } @@ -44,7 +44,7 @@ header.main { list-style: none; display: inline-block; text-transform: uppercase; - margin: 0 0.5em; + margin: 0 .5em; text-align: center; /*position:relative;*/ } header.main nav a { diff --git a/edumed/static/css/base.scss b/edumed/static/css/base.scss index 38f8a09..567c0fb 100644 --- a/edumed/static/css/base.scss +++ b/edumed/static/css/base.scss @@ -1,4 +1,4 @@ -@import url(http://fonts.googleapis.com/css?family=Dosis:400,700&subset=latin,latin-ext); +@import url(//fonts.googleapis.com/css?family=Dosis:400,700&subset=latin,latin-ext); @import "vars"; @import "mixins"; diff --git a/edumed/static/js/annoy.js b/edumed/static/js/annoy.js deleted file mode 100755 index 78c34e4..0000000 --- a/edumed/static/js/annoy.js +++ /dev/null @@ -1,40 +0,0 @@ -(function($) { - $(function() { - - -var have_localstorage; -try { - localStorage.setItem("test", "test"); - localStorage.removeItem("test"); - have_localstorage = true; -} catch(e) { - have_localstorage = false; -} - - - -$("#annoy-on").click(function(e) { - e.preventDefault(); - $("#annoy").slideDown('fast'); - $(this).hide(); - if (have_localstorage) localStorage.removeItem("annoyed2013"); -}); - -$("#annoy-off").click(function() { - $("#annoy").slideUp('fast'); - $("#annoy-on").show(); - if (have_localstorage) localStorage["annoyed2013"] = true; -}); - - -if (have_localstorage) { - if (!localStorage["annoyed2013"]) { - $("#annoy-on").hide(); - $("#annoy").show(); - } -} - - - - }); -})(jQuery); diff --git a/edumed/templates/base_super.html b/edumed/templates/base_super.html index b3ba9d8..753764f 100644 --- a/edumed/templates/base_super.html +++ b/edumed/templates/base_super.html @@ -96,7 +96,7 @@ - + {% block extra_script %}{% endblock %} {% tracking_code %} diff --git a/edumed/views.py b/edumed/views.py old mode 100755 new mode 100644 diff --git a/requirements.txt b/requirements.txt index 67f9ab9..266f69c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ django-piwik jsonfield>=0.9,<0.10 django_cas>=2.1,<2.2 -fnpdjango>=0.1.16,<0.2 +fnpdjango>=0.1.18,<0.2 Feedparser -- 2.20.1