aboutsummaryrefslogtreecommitdiffstats
path: root/jm2l/templates
diff options
context:
space:
mode:
authortr4ck3ur <tr4ck3ur@style-python.fr>2015-02-14 03:40:14 +0100
committertr4ck3ur <tr4ck3ur@style-python.fr>2015-02-14 03:40:14 +0100
commitbf7fdc00bfecee47a3d5025de077bb0640dd3146 (patch)
treeb0d0a8e004540bc4f1ca375f13903e7947657253 /jm2l/templates
parentc7a0ac5eb2b879d98c986d5c3583ef34737f0a61 (diff)
downloadjm2l-bf7fdc00bfecee47a3d5025de077bb0640dd3146.tar.gz
jm2l-bf7fdc00bfecee47a3d5025de077bb0640dd3146.tar.bz2
jm2l-bf7fdc00bfecee47a3d5025de077bb0640dd3146.tar.xz
jm2l-bf7fdc00bfecee47a3d5025de077bb0640dd3146.zip
Many changes to reorganize third party javascript
Diffstat (limited to 'jm2l/templates')
-rw-r--r--jm2l/templates/Logistique/Logistique.mako12
-rw-r--r--jm2l/templates/NewIndex.mako4
-rw-r--r--jm2l/templates/Profil/Profil.mako12
-rw-r--r--jm2l/templates/Profil/Sejour.mak16
-rw-r--r--jm2l/templates/Public/Plan.mako8
-rw-r--r--jm2l/templates/Public/Presse.mako2
-rw-r--r--jm2l/templates/Public/Programme.mako8
-rw-r--r--jm2l/templates/Staff/EditPresse.mako15
-rw-r--r--jm2l/templates/Staff/tasks.mako19
-rw-r--r--jm2l/templates/edit_event.mako115
-rw-r--r--jm2l/templates/edit_tiers.mako17
-rw-r--r--jm2l/templates/edit_tiers_categ.mako3
-rw-r--r--jm2l/templates/helpers.mako36
-rw-r--r--jm2l/templates/jm2l.mako27
-rw-r--r--jm2l/templates/layout.mako34
-rw-r--r--jm2l/templates/modals.mako9
16 files changed, 175 insertions, 162 deletions
diff --git a/jm2l/templates/Logistique/Logistique.mako b/jm2l/templates/Logistique/Logistique.mako
index 2037973..48c1b05 100644
--- a/jm2l/templates/Logistique/Logistique.mako
+++ b/jm2l/templates/Logistique/Logistique.mako
@@ -172,10 +172,14 @@ elif Type=='M':
</tbody>
</table>
- <script>
- $('#${Type}_Props').tooltip()
- $('#${Type}_Demande').tooltip()
- </script>
+<%
+ context._kwargs['postpone_js'].append( "$('#%s_Props').tooltip();" % Type )
+ context._kwargs['postpone_js'].append( "$('#%s_Demande').tooltip();" % Type )
+%>
+## <script>
+## $('#${Type}_Props').tooltip()
+## $('#${Type}_Demande').tooltip()
+## </script>
</%def>
## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
diff --git a/jm2l/templates/NewIndex.mako b/jm2l/templates/NewIndex.mako
index 0804fb1..cfb42bb 100644
--- a/jm2l/templates/NewIndex.mako
+++ b/jm2l/templates/NewIndex.mako
@@ -1,10 +1,10 @@
<%inherit file="jm2l:templates/layout.mako"/>
<%def name="jsAddOn()">
- <script src="/static/third-party/timeline/js/timeline-src.js"></script>
+ <script src="/vendor/timeline/js/timeline-src.js"></script>
</%def>
<%def name="cssAddOn()">
<!-- The default timeline stylesheet -->
- <link rel="stylesheet" href="/static/third-party/timeline/css/timeline.css" />
+ <link rel="stylesheet" href="/vendor/timeline/css/timeline.css" />
</%def>
<div id="timeline" style="margin-left: -50px;"></div>
<script>
diff --git a/jm2l/templates/Profil/Profil.mako b/jm2l/templates/Profil/Profil.mako
index 3bc65ac..8bd87d7 100644
--- a/jm2l/templates/Profil/Profil.mako
+++ b/jm2l/templates/Profil/Profil.mako
@@ -28,7 +28,7 @@
% 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.slug}" style="max-height:205px;" />
+ <img src="/img/default-user.png" class="img-polaroid" alt="Photo ${uprofil.slug}" style="max-height:205px;" />
</div>
</div>
% endif
@@ -149,9 +149,9 @@ DicForm = {
## Handle Popover of this form
-<script type="text/javascript">
- % for field in profil_form._fields.keys():
- $('#${field}-help').popover();
- %endfor
-</script>
+##<script type="text/javascript">
+## % for field in profil_form._fields.keys():
+## $('#${field}-help').popover();
+## %endfor
+##</script>
</%def>
diff --git a/jm2l/templates/Profil/Sejour.mak b/jm2l/templates/Profil/Sejour.mak
index 800f25d..f480a95 100644
--- a/jm2l/templates/Profil/Sejour.mak
+++ b/jm2l/templates/Profil/Sejour.mak
@@ -42,10 +42,10 @@ fieldset:disabled {
</select>
<script type="text/javascript">
- $("#Arrival\\:Place").select2({});
- $("#Arrival\\:Day").select2({});
- $("#Arrival\\:Confidence").select2({});
- $("#Arrival\\:Hour").select2({});
+ ## $("#Arrival\\:Place").select2({});
+ ## $("#Arrival\\:Day").select2({});
+ ## $("#Arrival\\:Confidence").select2({});
+ ## $("#Arrival\\:Hour").select2({});
</script>
</div>
<p>
@@ -116,10 +116,10 @@ fieldset:disabled {
</select>
<script type="text/javascript">
- $("#Departure\\:Place").select2({});
- $("#Departure\\:Day").select2({});
- $("#Departure\\:Confidence").select2({});
- $("#Departure\\:Hour").select2({});
+ ## $("#Departure\\:Place").select2({});
+ ## $("#Departure\\:Day").select2({});
+ ## $("#Departure\\:Confidence").select2({});
+ ## $("#Departure\\:Hour").select2({});
</script>
</div>
diff --git a/jm2l/templates/Public/Plan.mako b/jm2l/templates/Public/Plan.mako
index f29e320..450d7cd 100644
--- a/jm2l/templates/Public/Plan.mako
+++ b/jm2l/templates/Public/Plan.mako
@@ -4,10 +4,10 @@
<div class="tabbable" id="main_tab">
<ul class="nav nav-tabs">
<li class="active"><a href="#home" data-toggle="tab">C'est où ?</a></li>
- <li><a href="#Trsp" data-toggle="tab"><img style="margin-bottom: -15px;" alt="en bus" src="/static/tr_bus_.png"></a></li>
- <li><a href="#Voiture" data-toggle="tab"><img style="margin-bottom: -15px;" alt="en voiture" src="/static/tr_voiture_.png"></a></li>
- <li><a href="#Train" data-toggle="tab"><img style="margin-bottom: -15px;" alt="en train" src="/static/tr_train_.png"></a></li>
- <li><a href="#Avion" data-toggle="tab"><img style="margin-bottom: -15px;" alt="en avion" src="/static/tr_avion_.png"></a></li>
+ <li><a href="#Trsp" data-toggle="tab"><img style="margin-bottom: -15px;" alt="en bus" src="/img/tr_bus_.png"></a></li>
+ <li><a href="#Voiture" data-toggle="tab"><img style="margin-bottom: -15px;" alt="en voiture" src="/img/tr_voiture_.png"></a></li>
+ <li><a href="#Train" data-toggle="tab"><img style="margin-bottom: -15px;" alt="en train" src="/img/tr_train_.png"></a></li>
+ <li><a href="#Avion" data-toggle="tab"><img style="margin-bottom: -15px;" alt="en avion" src="/img/tr_avion_.png"></a></li>
<li><a href="#Contact" data-toggle="tab">Contact</a></li>
</ul>
diff --git a/jm2l/templates/Public/Presse.mako b/jm2l/templates/Public/Presse.mako
index c53fb1e..f7f086c 100644
--- a/jm2l/templates/Public/Presse.mako
+++ b/jm2l/templates/Public/Presse.mako
@@ -3,7 +3,7 @@
DisplayYear = request.session.get('year',2015)
%>
<h1 class="page-title">Dossier de presse ${DisplayYear}</h1>
-% if content.doss_presse:
+% if content and content.doss_presse:
${content.doss_presse | n}
% endif
%if 0 and DisplayYear==2013:
diff --git a/jm2l/templates/Public/Programme.mako b/jm2l/templates/Public/Programme.mako
index 8f8aa0d..a82dd24 100644
--- a/jm2l/templates/Public/Programme.mako
+++ b/jm2l/templates/Public/Programme.mako
@@ -146,7 +146,7 @@ if Counter==0:
% endfor
##</div>
<br/><br/>
-<script type="text/javascript" src="/static/d3.v3.js"></script>
-<script type="text/javascript" src="/static/Schedule.js"></script>
-<script type="text/javascript" src="/static/programme.js"></script>
-##<script type="text/javascript" src="/static/sched.js"></script>
+<script type="text/javascript" src="/vendor/d3js/d3.v3.min.js"></script>
+<script type="text/javascript" src="/js/Schedule.js"></script>
+<script type="text/javascript" src="/js/programme.js"></script>
+##<script type="text/javascript" src="/js/sched.js"></script>
diff --git a/jm2l/templates/Staff/EditPresse.mako b/jm2l/templates/Staff/EditPresse.mako
index d1df4af..3b9b700 100644
--- a/jm2l/templates/Staff/EditPresse.mako
+++ b/jm2l/templates/Staff/EditPresse.mako
@@ -1,17 +1,16 @@
<%inherit file="jm2l:templates/layout.mako"/>
<%namespace name="helpers" file="jm2l:templates/helpers.mako"/>
<%def name="jsAddOn()">
- <script src="/static/jquery-ui/jquery-ui.min.js"></script>
- <script src="/static/js/jm2l.js"></script>
- <script src="/static/third-party/ckeditor/ckeditor.js"></script>
+ <script src="/js/jm2l.js"></script>
+ <script src="/vendor/ckeditor/ckeditor.js"></script>
</%def>
<%def name="cssAddOn()">
- <link rel="stylesheet" href="/static/css/jquery.fileupload.css">
- <link rel="stylesheet" href="/static/css/jquery.fileupload-ui.css">
- <link rel="stylesheet" href="/static/jm2l.css" />
+ <link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload.css">
+ <link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-ui.css">
+ <link rel="stylesheet" href="/css/jm2l.css" />
<!-- CSS adjustments for browsers with JavaScript disabled -->
- <noscript><link rel="stylesheet" href="/static/css/jquery.fileupload-noscript.css"></noscript>
- <noscript><link rel="stylesheet" href="/static/css/jquery.fileupload-ui-noscript.css"></noscript>
+ <noscript><link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-noscript.css"></noscript>
+ <noscript><link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-ui-noscript.css"></noscript>
</%def>
<h3 class="page-title">Dossier de presse ${DisplayYear}</h3>
<%
diff --git a/jm2l/templates/Staff/tasks.mako b/jm2l/templates/Staff/tasks.mako
index 5756f78..df0c255 100644
--- a/jm2l/templates/Staff/tasks.mako
+++ b/jm2l/templates/Staff/tasks.mako
@@ -2,19 +2,18 @@
<%inherit file="jm2l:templates/layout.mako"/>
<%namespace name="helpers" file="jm2l:templates/helpers.mako"/>
<%def name="jsAddOn()">
- <script src="/static/jquery-ui/jquery-ui.min.js"></script>
- <script src="/static/js/jm2l.js"></script>
- <script src="/static/third-party/ckeditor/ckeditor.js"></script>
- <script src="/static/select2.js"></script>
+ <script src="/js/jm2l.js"></script>
+ <script src="/vendor/ckeditor/ckeditor.js"></script>
+ <script src="/vendor/select2/js/select2.js"></script>
</%def>
<%def name="cssAddOn()">
- <link rel="stylesheet" href="/static/css/jquery.fileupload.css">
- <link rel="stylesheet" href="/static/css/jquery.fileupload-ui.css">
- <link rel="stylesheet" href="/static/jm2l.css" />
- <link rel="stylesheet" href="/static/select2.css" type="text/css" media="screen" />
+ <link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload.css">
+ <link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-ui.css">
+ <link rel="stylesheet" href="/css/jm2l.css" />
+ <link rel="stylesheet" href="/vendor/select2/css/select2.css" type="text/css" media="screen" />
<!-- CSS adjustments for browsers with JavaScript disabled -->
- <noscript><link rel="stylesheet" href="/static/css/jquery.fileupload-noscript.css"></noscript>
- <noscript><link rel="stylesheet" href="/static/css/jquery.fileupload-ui-noscript.css"></noscript>
+ <noscript><link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-noscript.css"></noscript>
+ <noscript><link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-ui-noscript.css"></noscript>
</%def>
% if 'uid' in form._fields.keys():
<h3>Editer une tâche</h3>
diff --git a/jm2l/templates/edit_event.mako b/jm2l/templates/edit_event.mako
index 6c41e9e..a957b48 100644
--- a/jm2l/templates/edit_event.mako
+++ b/jm2l/templates/edit_event.mako
@@ -2,17 +2,17 @@
<%inherit file="jm2l:templates/layout.mako"/>
<%namespace name="helpers" file="jm2l:templates/helpers.mako"/>
<%def name="jsAddOn()">
- <script src="/static/third-party/ckeditor/ckeditor.js"></script>
- <script src="/static/select2.js"></script>
+ <script src="/vendor/ckeditor/ckeditor.js"></script>
+ <script src="/vendor/select2/js/select2.js"></script>
</%def>
<%def name="cssAddOn()">
- <link rel="stylesheet" href="/static/select2.css" type="text/css" media="screen" />
- <link rel="stylesheet" href="/static/css/jquery.fileupload.css">
- <link rel="stylesheet" href="/static/css/jquery.fileupload-ui.css">
- <link rel="stylesheet" href="/static/leaflet.css" />
+ <link rel="stylesheet" href="/vendor/select2/css/select2.css" type="text/css" media="screen" />
+ <link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload.css">
+ <link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-ui.css">
+ <link rel="stylesheet" href="/vendor/leaflet/css/leaflet.css" />
<!-- CSS adjustments for browsers with JavaScript disabled -->
- <noscript><link rel="stylesheet" href="/static/css/jquery.fileupload-noscript.css"></noscript>
- <noscript><link rel="stylesheet" href="/static/css/jquery.fileupload-ui-noscript.css"></noscript>
+ <noscript><link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-noscript.css"></noscript>
+ <noscript><link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-ui-noscript.css"></noscript>
</%def>
<% from datetime import datetime %>
<style>
@@ -81,47 +81,22 @@
% if 'uid' in form._fields:
${form.uid}
%endif
-<%
-TabFields = [
- ( form._fields.get("for_year"), u"Prénom", "padding-right:5px;float:left;" , "" ),
- ( form._fields.get("event_type"), u"Nom", "padding-right:5px;" , "" ),
- ( form._fields.get("start_sel"), u"Début", "padding-right:15px;float:left;" , "width:15em;" ),
- ( form._fields.get("duration"), u"Durée", "padding-right:15px;float:left;" , "width:15em;" ),
- ( form._fields.get("salle_uid"), u"Salle", "padding-right:15px;", "width:15em;" ),
- ( form._fields.get("name"), u"Nom", "padding-right:5px;" , "width:95%;" ),
- ( form._fields.get("description"), u"Description", "padding-right:5px;" , "width:90%;height:500px;" ),
-]
-%>
${form.start_time}
${form.end_time}
-% for Field, PlaceHolder, DivClass, FieldClass in TabFields:
- % if Field is None:
- <% continue %>
- % endif
- % if Field.type=='HiddenField':
- ${Field()}
- <% continue %>
- % endif
- <div style="padding-right:5px;${DivClass}">
- <label for="${Field.label.field_id}">${Field.label.text}
- % if len(Field.description):
- <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>
- </a>
- % endif
- </label>
- % for error in Field.errors:
- <div class="alert alert-error">
- <button type="button" class="close" data-dismiss="alert">&times;</button>
- <h4>Erreur!</h4>
- ${ error }
- </div>
- % endfor
- ${Field(placeholder=PlaceHolder, style=FieldClass)}
- </div>
-% endfor
+
+<%
+DicForm = {
+ 'for_year': {'PlaceHolder':u"Année", 'ContainerStyle':"padding-right:5px;float:left;", },
+ 'event_type': {'PlaceHolder':u"Nom", 'ContainerStyle':"padding-right:5px;", },
+ 'start_sel': {'PlaceHolder':u"Début", 'ContainerStyle':"padding-right:15px;float:left;", "FieldStyle":"width:15em;"},
+ 'duration': {'PlaceHolder':u"Durée", 'ContainerStyle':"padding-right:15px;float:left;", "FieldStyle":"width:15em;"},
+ 'salle_uid': {'PlaceHolder':u"Salle", 'ContainerStyle':"padding-right:15px;", "FieldStyle":"width:15em;"},
+ 'name': {'PlaceHolder':u"Nom", 'ContainerStyle':"padding-right:5px;", "FieldStyle":"width:95%;"},
+ 'description': {'PlaceHolder':u"Description", 'ContainerStyle':"padding-right:5px;", "FieldStyle":"width:90%;height:500px;" },
+ }
+%>
+
+ ${helpers.DisplayForm(form, DicForm)}
<button type="submit">Proposer</button>
</form>
@@ -182,7 +157,7 @@ TabFields = [
<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>
@@ -208,21 +183,35 @@ TabFields = [
% endif
<br/>
<hr/>
-% if 'uid' in form._fields:
- ${helpers.uploader_js()}
-% endif
-<script type="text/javascript">
-## Handle Popover of this form
-% for field in form._fields.keys():
- $('#${field}-help').popover();
- % if form._fields[field].type=='SelectField':
- $('#${field}').select2({width:'resolve'});
+
+% if 0:
+ % if 'uid' in form._fields:
+ ${helpers.uploader_js()}
% endif
-%endfor
-% if formAdd:
- % for field in formAdd._fields.keys():
+ <script type="text/javascript">
+ ## Handle Popover of this form
+ % for field in form._fields.keys():
+
$('#${field}-help').popover();
+ % if form._fields[field].type=='SelectField':
+ $('#${field}').select2({width:'resolve'});
+ % endif
%endfor
-% endif
-var editor = CKEDITOR.replace('description', { autoGrow_onStartup: true, language: 'fr' } );
-</script>
+ % if formAdd:
+ % for field in formAdd._fields.keys():
+ $('#${field}-help').popover();
+ %endfor
+ % endif
+ var editor = CKEDITOR.replace('description', { autoGrow_onStartup: true, language: 'fr' } );
+ </script>
+% else:
+ <%
+ for jsitem in form._fields.keys():
+ context._kwargs['postpone_js'].append( "$('#%s-help').popover();" % jsitem )
+ if form._fields[field].type=='SelectField':
+ context._kwargs['postpone_js'].append( "$('#%s').select2({width:'resolve'});" % jsitem )
+ if formAdd:
+ for jsitem in formAdd._fields.keys():
+
+ %>
+% endif \ No newline at end of file
diff --git a/jm2l/templates/edit_tiers.mako b/jm2l/templates/edit_tiers.mako
index d9ec3ca..f75b6e3 100644
--- a/jm2l/templates/edit_tiers.mako
+++ b/jm2l/templates/edit_tiers.mako
@@ -1,18 +1,17 @@
<%inherit file="jm2l:templates/layout.mako"/>
<%namespace name="helpers" file="jm2l:templates/helpers.mako"/>
<%def name="jsAddOn()">
- <script src="${request.static_url('jm2l:static/select2.js')}"></script>
- <script src="${request.static_url('jm2l:static/jquery-ui/jquery-ui.min.js')}"></script>
- <script src="${request.static_url('jm2l:static/repeatable-fields.js')}"></script>
- <script src="/static/third-party/ckeditor/ckeditor.js"></script>
+ <script src="/vendor/select2/js/select2.js"></script>
+ <script src="/vendor/repeatable-fields/js/repeatable-fields.js"></script>
+ <script src="/vendor/ckeditor/ckeditor.js"></script>
</%def>
<%def name="cssAddOn()">
- <link rel="stylesheet" href="/static/select2.css" type="text/css" media="screen" />
- <link rel="stylesheet" href="/static/css/jquery.fileupload.css">
- <link rel="stylesheet" href="/static/css/jquery.fileupload-ui.css">
+ <link rel="stylesheet" href="/vendor/select2/css/select2.css" type="text/css" media="screen" />
+ <link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload.css">
+ <link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-ui.css">
<!-- CSS adjustments for browsers with JavaScript disabled -->
- <noscript><link rel="stylesheet" href="/static/css/jquery.fileupload-noscript.css"></noscript>
- <noscript><link rel="stylesheet" href="/static/css/jquery.fileupload-ui-noscript.css"></noscript>
+ <noscript><link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-noscript.css"></noscript>
+ <noscript><link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-ui-noscript.css"></noscript>
</%def>
<a class="pull-right" href="/categorie/entity">Editer les catégories</a>
<br>
diff --git a/jm2l/templates/edit_tiers_categ.mako b/jm2l/templates/edit_tiers_categ.mako
index e6ea4af..ba2df09 100644
--- a/jm2l/templates/edit_tiers_categ.mako
+++ b/jm2l/templates/edit_tiers_categ.mako
@@ -1,8 +1,7 @@
<%inherit file="jm2l:templates/layout.mako"/>
<%namespace name="helpers" file="jm2l:templates/helpers.mako"/>
<%def name="jsAddOn()">
- <script src="${request.static_url('jm2l:static/jquery-ui/jquery-ui.min.js')}"></script>
- <script src="${request.static_url('jm2l:static/repeatable-fields.js')}"></script>
+ <script src="/vendor/repeatable-fields/js/repeatable-fields.js"></script>
</%def>
<h2>Gestion des catégories pour les entités</h2>
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
diff --git a/jm2l/templates/jm2l.mako b/jm2l/templates/jm2l.mako
index 018104f..99a9bb7 100644
--- a/jm2l/templates/jm2l.mako
+++ b/jm2l/templates/jm2l.mako
@@ -5,23 +5,22 @@
<%namespace name="intervention" file="jm2l:templates/Interventions/Interventions.mako"/>
<%namespace name="h" file="jm2l:templates/helpers.mako"/>
<%def name="jsAddOn()">
- <script src="/static/select2.js"></script>
- <script src="/static/leaflet.js"></script>
- <script src="/static/leaflet-routing-machine.min.js"></script>
- <script src="/static/jquery-ui/jquery-ui.min.js"></script>
- <script src="/static/repeatable-fields.js"></script>
- <script src="/static/js/jm2l.js"></script>
- //<script src="/static/third-party/ckeditor/ckeditor.js"></script>
+ <script src="/vendor/select2/js/select2.js"></script>
+ <script src="/vendor/leaflet/js/leaflet.js"></script>
+ <script src="/vendor/leaflet/js/leaflet-routing-machine.min.js"></script>
+## <script src="/static/jquery-ui/jquery-ui.min.js"></script>
+ <script src="/vendor/repeatable-fields/js/repeatable-fields.js"></script>
+ <script src="/js/jm2l.js"></script>
</%def>
<%def name="cssAddOn()">
- <link rel="stylesheet" href="/static/select2.css" type="text/css" media="screen" />
- <link rel="stylesheet" href="/static/css/jquery.fileupload.css">
- <link rel="stylesheet" href="/static/css/jquery.fileupload-ui.css">
- <link rel="stylesheet" href="/static/leaflet.css" />
- <link rel="stylesheet" href="/static/jm2l.css" />
+ <link rel="stylesheet" href="/vendor/select2/css/select2.css" type="text/css" media="screen" />
+ <link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload.css">
+ <link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-ui.css">
+ <link rel="stylesheet" href="/vendor/leaflet/css/leaflet.css" />
+ <link rel="stylesheet" href="/css/jm2l.css" />
<!-- CSS adjustments for browsers with JavaScript disabled -->
- <noscript><link rel="stylesheet" href="/static/css/jquery.fileupload-noscript.css"></noscript>
- <noscript><link rel="stylesheet" href="/static/css/jquery.fileupload-ui-noscript.css"></noscript>
+ <noscript><link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-noscript.css"></noscript>
+ <noscript><link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-ui-noscript.css"></noscript>
</%def>
<div id="AjaxModal" class="modal hide fade" tabindex="-1" role="dialog"
aria-labelledby="AjaxModalLabel" aria-hidden="true">
diff --git a/jm2l/templates/layout.mako b/jm2l/templates/layout.mako
index 7ea41d5..0a2c10e 100644
--- a/jm2l/templates/layout.mako
+++ b/jm2l/templates/layout.mako
@@ -4,44 +4,40 @@
<title>JM2L 2015</title>
<meta charset="utf-8">
<meta name="keywords" content="python web application" />
- <meta name="description" content="pyramid web application" />
+ <meta name="description" content="jm2l LinuxAzur journée méditéranéenne logiciel libre" />
<!-- Force latest IE rendering engine or ChromeFrame if installed -->
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
<![endif]-->
<link rel="shortcut icon" href="/static/favicon.ico" />
- <link rel="stylesheet" href="/static/pylons.css" type="text/css" media="screen" charset="utf-8" />
- <link rel="stylesheet" href="/static/bootstrap.min.css" type="text/css" media="screen" />
- <link rel="stylesheet" href="/static/jm2l.css" type="text/css" media="screen" />
- ##<link rel="stylesheet" type="text/css" media="screen" href="/static/bootstrap.css" />
- ##<link rel="stylesheet" href="http://static.pylonsproject.org/fonts/nobile/stylesheet.css" media="screen" />
- ##<link rel="stylesheet" href="http://static.pylonsproject.org/fonts/neuton/stylesheet.css" media="screen" />
+ <link rel="stylesheet" href="/css/pylons.css" type="text/css" media="screen" charset="utf-8" />
+ <link rel="stylesheet" href="/css/bootstrap.min.css" type="text/css" media="screen" />
+ <link rel="stylesheet" href="/css/jm2l.css" type="text/css" media="screen" />
+ <link rel="stylesheet" href="/css/bootstrap-responsive.css">
${self.cssAddOn()}
<!--[if lte IE 6]>
<link rel="stylesheet" href="/static/ie6.css" type="text/css" media="screen" charset="utf-8" />
<![endif]-->
- <script src="/static/jquery.min.js"></script>
- <script src="/static/bootstrap.min.js"></script>
- ${self.jsAddOn()}
+ <script src="/vendor/modernizr-2.8.3-respond-1.4.2.min.js"></script>
</head>
<body>
<%
+context._kwargs['postpone_js']=[]
DisplayYear = request.session.get('year', 2015)
%>
<%def name="jsAddOn()"></%def>
<%def name="cssAddOn()"></%def>
<div id="wrap">
- <div id="top" style="background: url(${request.static_url('jm2l:static/img/%s/headerbg.png' % DisplayYear)}) repeat-x scroll 0 top #ffffff;">
+ <div id="top" style="background: url( ${"/img/%s/headerbg.png" % DisplayYear} ) repeat-x scroll 0 top #ffffff;">
<div class="align-center">
- <div><img src="${request.static_url('jm2l:static/img/%s/logo.png' % DisplayYear)}" height="215" alt="JM2L 2015"/></div>
+ <div><img src="${"/img/%s/logo.png" % DisplayYear}" height="215" alt="JM2L 2015"/></div>
</div>
</div>
<div id="middle">
-
<div class="navbar">
<div class="navbar-inner">
<div class="container">
-
<ul class="nav pull-left">
<div class="btn-group">
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
@@ -109,5 +105,15 @@ DisplayYear = request.session.get('year', 2015)
## ni l'équipe de coordination des JM2L ne sont résponsable des
## informations publiés par les intervenants, dans le doute merci de nous contacter.
## </div>
+ <script src="/vendor/jquery.min.js"></script>
+ <script src="/vendor/bootstrap.min.js"></script>
+ <script src="/vendor/fileupload/js/jquery-uploader.min.js"></script>
+ ${self.jsAddOn()}
+## Then Handle Javascript
+<script>
+% for jsitem in context._kwargs['postpone_js']:
+${jsitem}
+% endfor
+</script>
</body>
</html>
diff --git a/jm2l/templates/modals.mako b/jm2l/templates/modals.mako
index c72f2bb..83470fb 100644
--- a/jm2l/templates/modals.mako
+++ b/jm2l/templates/modals.mako
@@ -251,6 +251,9 @@
</div>
</%def> \
## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+<%
+context._kwargs['postpone_js']=[]
+%>
%if modtype=='Password':
${ModalPassword(uid, DisplayYear, session)}
%elif modtype=='Place':
@@ -276,3 +279,9 @@
%elif modtype=='ShowH':
${Dialog.Show('H',Exch)}
%endif
+## Then Handle Javascript
+<script>
+% for jsitem in context._kwargs['postpone_js']:
+${jsitem}
+% endfor
+</script>