From: Radek Czajka Date: Mon, 31 Mar 2014 14:01:12 +0000 (+0200) Subject: Let the annoying commence. X-Git-Url: https://git.mdrn.pl/edumed.git/commitdiff_plain/a4d51d90f268865744a6d54c83d0f298d1faa42d?ds=sidebyside Let the annoying commence. --- 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