diff options
Diffstat (limited to 'jm2l/templates/helpers.mako')
-rw-r--r-- | jm2l/templates/helpers.mako | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/jm2l/templates/helpers.mako b/jm2l/templates/helpers.mako index 9e80505..c0d966b 100644 --- a/jm2l/templates/helpers.mako +++ b/jm2l/templates/helpers.mako @@ -30,7 +30,7 @@ TabJs = {'select':[], 'desc':[]} <a id="${Field.label.field_id}-help" data-toggle="popover" data-original-title="${Field.label.text}" data-content="${Field.description}"> - <i class="icon-me" style="background-image: url('/static/Help.png');background-position:1px 2px;"></i> + <i class="icon-me" style="background-image: url('/img/Help.png');background-position:1px 2px;"></i> </a> % endif </label> @@ -61,15 +61,25 @@ TabJs = {'select':[], 'desc':[]} </div> % endif % endfor -## Then Auto Handle Javascript calls -<script> -% for jsitem in TabJs['select']: - $("#${jsitem}").select2({}); -% endfor -% for jsitem in TabJs['desc']: - $('#${jsitem}-help').popover(); -% endfor -</script> +% if 0: + ## Then Auto Handle Javascript calls + <script> + % for jsitem in TabJs['select']: + $("#${jsitem}").select2({}); + % endfor + % for jsitem in TabJs['desc']: + $('#${jsitem}-help').popover(); + % endfor + </script> +% else: +<% + for jsitem in TabJs['select']: + context._kwargs['postpone_js'].append( "$('#%s').select2({});" % jsitem ) + for jsitem in TabJs['desc']: + context._kwargs['postpone_js'].append( "$('#%s-help').popover();" % jsitem ) +%> +% endif + </%def> ## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ## Wrapper pour la form Sejour @@ -250,8 +260,8 @@ TabJs = {'select':[], 'desc':[]} {% } %} </script> %if 1: -<script src="/static/js/allinone/jquery-uploader-min.js"></script> -<script src="/static/js/main.js"></script> +##<script src="/vendor/fileupload/js/jquery-uploader.min.js"></script> +<script src="/js/main.js"></script> % else: <script src="/static/jquery.min.js"></script> <!-- The jQuery UI widget factory, can be omitted if jQuery UI is already included --> @@ -421,7 +431,7 @@ TabJs = {'select':[], 'desc':[]} % else: <div class="active item" id="UserPic0"> <div style="margin:auto;width:170px;"> - <img src="/static/avatars/default-user.png" class="img-polaroid" alt="Photo ${uprofil.nom} ${uprofil.prenom}" style="max-height:205px;" /> + <img src="/img/default-user.png" class="img-polaroid" alt="Photo ${uprofil.nom} ${uprofil.prenom}" style="max-height:205px;" /> </div> </div> % endif |