From a9318f7fd31eed8fa14d08a92277ba795efbb36c Mon Sep 17 00:00:00 2001 From: tr4ck3ur Date: Sun, 15 Feb 2015 18:10:48 +0100 Subject: Corrigé les images Ajouté la gestion de password Corrigé le slug des users à la création MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jm2l/templates/Profil/Profil.mako | 37 +++-------------------------------- jm2l/templates/helpers.mako | 41 +++++++++++++++++++++++++++++++++++++-- jm2l/templates/layout.mako | 37 +++-------------------------------- jm2l/templates/modals.mako | 34 +++++++------------------------- jm2l/templates/modals_js.mako | 11 +++++++++++ 5 files changed, 63 insertions(+), 97 deletions(-) (limited to 'jm2l/templates') diff --git a/jm2l/templates/Profil/Profil.mako b/jm2l/templates/Profil/Profil.mako index 4a20282..f8dc229 100644 --- a/jm2l/templates/Profil/Profil.mako +++ b/jm2l/templates/Profil/Profil.mako @@ -1,40 +1,9 @@ <%namespace name="Modals" file="jm2l:templates/modals.mako"/> <%namespace name="helpers" file="jm2l:templates/helpers.mako"/> <%def name="profil_wrapper(uprofil, profil_form)"> -
- <% photos = uprofil.PhotosLinks %> - -
+
+ ${helpers.show_my_pictures(uprofil)} +
Mon lien

${profil_form.prenom.data} ${profil_form.nom.data}

diff --git a/jm2l/templates/helpers.mako b/jm2l/templates/helpers.mako index 5987a90..b1409b8 100644 --- a/jm2l/templates/helpers.mako +++ b/jm2l/templates/helpers.mako @@ -159,7 +159,7 @@ TabJs = {'select':[], 'desc':[]}
-
+
 
@@ -184,7 +184,7 @@ TabJs = {'select':[], 'desc':[]}

{%=file.name%}

Processing...

-
+
{% if (!i && !o.options.autoUpload) { %} @@ -395,6 +395,43 @@ plop ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ## Wrapper pour les photos ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +<%def name="show_my_pictures(uprofil)"> \ +
+ <% photos = uprofil.PhotosLinks %> +
+ Changer mon mot de passe +
+
+ Changer ma photo +
+ +
+ \ +## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= <%def name="show_pictures(uprofil)"> \
<% photos = uprofil.PhotosLinks %> diff --git a/jm2l/templates/layout.mako b/jm2l/templates/layout.mako index 64b60a8..415b5a3 100644 --- a/jm2l/templates/layout.mako +++ b/jm2l/templates/layout.mako @@ -113,46 +113,15 @@ ${helpers.uploader_js()} + ${self.jsAddOn()} ## Then Handle Javascript diff --git a/jm2l/templates/modals.mako b/jm2l/templates/modals.mako index 6ee1556..5848be6 100644 --- a/jm2l/templates/modals.mako +++ b/jm2l/templates/modals.mako @@ -150,11 +150,10 @@ Les images de taille supérieure à 300x300 pixels seront redimensionnés.
${helpers.uploader("users", uid, "une Photo")} - ##${helpers.uploader_js()}
\ @@ -166,33 +165,12 @@

Changer mon mot de passe

\ @@ -284,4 +263,5 @@ context._kwargs['postpone_js']=[] % for jsitem in context._kwargs['postpone_js']: ${jsitem | n} % endfor +HandleControls(); diff --git a/jm2l/templates/modals_js.mako b/jm2l/templates/modals_js.mako index 6afb826..9e1395d 100644 --- a/jm2l/templates/modals_js.mako +++ b/jm2l/templates/modals_js.mako @@ -63,4 +63,15 @@ $.ajax({ alert(error); }, }); +% elif modtype=='UserPicture': +$.ajax({ + url:'/user_picture', + success:function(result, status, jqXHR){ + var pictureresult = $('
').append(result).find('#MyPictureCarousel').html(); + $('#MyPictureCarousel').html(pictureresult); + }, + error:function(result, error){ + alert(error); + }, +}); % endif -- cgit v1.2.3-54-g00ecf