From 7838a12792be197628ab7f34910f1c87dd113295 Mon Sep 17 00:00:00 2001 From: tr4ck3ur Date: Sun, 15 Feb 2015 14:46:19 +0100 Subject: Fix ckeditor, uploader and add piwik --- development.ini | 3 +-- jm2l/static/css/jm2l.css | 4 ++++ jm2l/static/vendor/fileupload/img/loading.gif | Bin 0 -> 3897 bytes jm2l/templates/Profil/Profil.mako | 21 ++++++--------------- jm2l/templates/Staff/EditPresse.mako | 6 +++--- jm2l/templates/Staff/pole.mako | 2 +- jm2l/templates/Staff/tasks.mako | 2 +- jm2l/templates/edit_event.mako | 2 +- jm2l/templates/edit_tiers.mako | 8 ++++---- jm2l/templates/helpers.mako | 5 +++-- jm2l/templates/jm2l.mako | 2 +- jm2l/templates/layout.mako | 26 +++++++++++++++++++++++++- jm2l/templates/modals.mako | 4 ++-- jm2l/upload.py | 5 +---- 14 files changed, 53 insertions(+), 37 deletions(-) create mode 100644 jm2l/static/vendor/fileupload/img/loading.gif diff --git a/development.ini b/development.ini index e36ed74..2621409 100644 --- a/development.ini +++ b/development.ini @@ -6,8 +6,7 @@ [app:main] use = egg:JM2L -pyramid.reload_templates = false -#true +pyramid.reload_templates = true pyramid.debug_authorization = false pyramid.debug_notfound = false pyramid.debug_routematch = false diff --git a/jm2l/static/css/jm2l.css b/jm2l/static/css/jm2l.css index 5a3de2f..de94fbf 100644 --- a/jm2l/static/css/jm2l.css +++ b/jm2l/static/css/jm2l.css @@ -1,3 +1,7 @@ +a { + cursor: pointer; +} + .borderbox { border: 1px solid #e1e4e5; margin: 1px 0 24px; diff --git a/jm2l/static/vendor/fileupload/img/loading.gif b/jm2l/static/vendor/fileupload/img/loading.gif new file mode 100644 index 0000000..90f28cb Binary files /dev/null and b/jm2l/static/vendor/fileupload/img/loading.gif differ diff --git a/jm2l/templates/Profil/Profil.mako b/jm2l/templates/Profil/Profil.mako index 8bd87d7..4a20282 100644 --- a/jm2l/templates/Profil/Profil.mako +++ b/jm2l/templates/Profil/Profil.mako @@ -55,7 +55,7 @@ DicForm = { 'website': {'PlaceHolder':u"http://ma-page-web.moi","FieldStyle":"width:16em;"}, 'gpg_key': {'PlaceHolder':u"Ma clé gpg", "FieldStyle":"width:90%;"}, 'soc_link':{'PlaceHolder':u"#jm2l sur irc.freenode.org","FieldStyle":"width:90%;"}, - 'bio': {'PlaceHolder':u"Ma Bilibiographie", "FieldStyle":"width:95%;min-height:150px;", "fieldset":True }, + 'bio': {'PlaceHolder':u"Ma Bilibiographie", "FieldStyle":"width:95%;min-height:150px;", "fieldset":True, "ckeditor":1 }, 'tiersship': {'Ignore':True} } %> @@ -63,20 +63,21 @@ DicForm = {
Activité + Si vous ne trouvez pas l'entité que vous souhaitez promouvoir (Association, GULL, Entreprise, Logiciel, ...). + Vous pouvez en ajouter une. +
- ## - + - ## % for num, dicdata in enumerate(profil_form._fields.get("tiersship").data): - ##
AnnéeEntitéeEntité Rôle Action
Move 2015 @@ -99,7 +100,6 @@ DicForm = {
Move @@ -141,17 +141,8 @@ DicForm = { - - + - - -## Handle Popover of this form -## diff --git a/jm2l/templates/Staff/EditPresse.mako b/jm2l/templates/Staff/EditPresse.mako index 3b9b700..590f5b8 100644 --- a/jm2l/templates/Staff/EditPresse.mako +++ b/jm2l/templates/Staff/EditPresse.mako @@ -16,7 +16,7 @@ <% DicForm = { 'year_uid': {'PlaceHolder':u"Mon Nom", "FieldStyle":"width:16em;", 'ContainerStyle':"float:left;"}, - 'doss_presse': {'PlaceHolder':u"Dossier de presse", "FieldStyle":"width:95%;min-height:600px;"}, + 'doss_presse': {'PlaceHolder':u"Dossier de presse", "FieldStyle":"width:95%;min-height:600px;", "ckeditor":"1"}, } %>
@@ -29,6 +29,6 @@ DicForm = {

-${helpers.uploader_js()} \ No newline at end of file +##${helpers.uploader_js()} \ No newline at end of file diff --git a/jm2l/templates/Staff/pole.mako b/jm2l/templates/Staff/pole.mako index c8cfb1a..909c4d1 100644 --- a/jm2l/templates/Staff/pole.mako +++ b/jm2l/templates/Staff/pole.mako @@ -40,5 +40,5 @@ DicForm = { ${helpers.uploader("poles", form.uid.data, u"Attachement" )} %endif \ No newline at end of file diff --git a/jm2l/templates/Staff/tasks.mako b/jm2l/templates/Staff/tasks.mako index d3d9ded..9ff75eb 100644 --- a/jm2l/templates/Staff/tasks.mako +++ b/jm2l/templates/Staff/tasks.mako @@ -44,5 +44,5 @@ DicForm = { ${helpers.uploader("tasks", form.uid.data, u"Attachement" )} %endif \ No newline at end of file diff --git a/jm2l/templates/edit_event.mako b/jm2l/templates/edit_event.mako index fee9f33..9639396 100644 --- a/jm2l/templates/edit_event.mako +++ b/jm2l/templates/edit_event.mako @@ -216,5 +216,5 @@ if formAdd: for jsitem in formAdd._fields.keys(): context._kwargs['postpone_js'].append( "$('#%s-help').popover();" % jsitem ) %> -${helpers.uploader_js()} +##${helpers.uploader_js()} % endif \ No newline at end of file diff --git a/jm2l/templates/edit_tiers.mako b/jm2l/templates/edit_tiers.mako index 5b7a49c..58d300a 100644 --- a/jm2l/templates/edit_tiers.mako +++ b/jm2l/templates/edit_tiers.mako @@ -144,9 +144,9 @@ DicForm = {

-% if 'uid' in form._fields: - ${helpers.uploader_js()} -% endif +##% if 'uid' in form._fields: +## ${helpers.uploader_js()} +##% endif <%def name="jsAddOn()"> @@ -154,7 +154,7 @@ DicForm = { %if 1: - - +## +## +plop % else: diff --git a/jm2l/templates/jm2l.mako b/jm2l/templates/jm2l.mako index 99a9bb7..fc2043b 100644 --- a/jm2l/templates/jm2l.mako +++ b/jm2l/templates/jm2l.mako @@ -150,4 +150,4 @@
-${h.uploader_js()} +##${h.uploader_js()} diff --git a/jm2l/templates/layout.mako b/jm2l/templates/layout.mako index 4e1023b..8988c4c 100644 --- a/jm2l/templates/layout.mako +++ b/jm2l/templates/layout.mako @@ -1,5 +1,6 @@ +<%namespace name="helpers" file="jm2l:templates/helpers.mako"/> JM2L 2015 @@ -20,6 +21,8 @@ + ## + ## <% @@ -28,6 +31,8 @@ DisplayYear = request.session.get('year', 2015) %> <%def name="jsAddOn()"> <%def name="cssAddOn()"> +${helpers.uploader_js()} +
@@ -68,7 +73,7 @@ DisplayYear = request.session.get('year', 2015)
  • Me déconnecter
  • % else:
  • Je m'inscris
  • -
  • Je m'identifier
  • +
  • Je m'identifie
  • % endif
    @@ -109,6 +114,7 @@ DisplayYear = request.session.get('year', 2015) + ${self.jsAddOn()} ## Then Handle Javascript + + + + + + diff --git a/jm2l/templates/modals.mako b/jm2l/templates/modals.mako index e41cc4c..6ee1556 100644 --- a/jm2l/templates/modals.mako +++ b/jm2l/templates/modals.mako @@ -125,7 +125,7 @@
    - ${helpers.uploader_js()} + ##${helpers.uploader_js()} @@ -150,7 +150,7 @@ Les images de taille supérieure à 300x300 pixels seront redimensionnés. ${helpers.uploader("users", uid, "une Photo")} - ${helpers.uploader_js()} + ##${helpers.uploader_js()}