Projet

Général

Profil

0001-add-support-for-placing-a-custom-footer-in-the-manif.patch

Frédéric Péters, 22 août 2015 10:40

Télécharger (3,54 ko)

Voir les différences:

Subject: [PATCH] add support for placing a custom footer in the manifest
 (#8081)

 www/index.html  | 24 ++++++++++++++----------
 www/js/index.js |  9 ++++++++-
 2 files changed, 22 insertions(+), 11 deletions(-)
www/index.html
60 60
            </div>
61 61
        </script>
62 62

  
63
        <script type="text/x-tmpl" id="momo-default-footer-tmpl">
64
          <div class="col-xs-6 navbar-btn text-left">
65
              <a href="https://dev.entrouvert.org/projects/momo/"
66
                  class="btn btn-success pull-left momo-repo"
67
                  target="_system"
68
                  onclick="javascript:app.utils.onExternalLinkClick()">Momo repository</a>
69
          </div>
70
          <div class="col-xs-6 navbar-btn text-right">
71
              <a href="mailto:{%= o.meta.contact %}"
72
                  class="btn btn-success pull-right momo-contact">{%= o.meta.contact %}</a>
73
          </div>
74
        </script>
75

  
63 76
        <script type="text/x-tmpl" id="momo-icon-tmpl">
64 77
            {% if(o.icon){ %}
65 78
                {% if(o.icon.isFramable()){ %}
......
307 320
                <footer class="navbar navbar-inverse momo-footer">
308 321
                    <div class="container-fluid clearfix">
309 322
                        <div class="row">
310
                            <div class="col-xs-6 navbar-btn text-left">
311
                                <a href="https://dev.entrouvert.org/projects/momo/"
312
                                    class="btn btn-success pull-left momo-repo" 
313
                                    target="_system"
314
                                    onclick="javascript:app.utils.onExternalLinkClick()">Momo repository</a>
315
                            </div>
316
                            <div class="col-xs-6 navbar-btn text-right">
317
                                <a href="mailto:{%= o.meta.contact %}" 
318
                                    class="btn btn-success pull-right momo-contact">{%= o.meta.contact %}</a>
319
                            </div>
323
                            {%# o.footer %}
320 324
                        </div>
321 325
                    </div>
322 326
                </footer>
www/js/index.js
54 54
        'menu': [],
55 55
        'stylesheets': [],
56 56
        'javascripts': [],
57
        'content': tmpl('momo-first-launch-tmpl', {})
57
        'content': tmpl('momo-first-launch-tmpl', {}),
58
        'footer': undefined
58 59
    },
59 60

  
60 61
    // Default page attributes
......
132 133
                app.manifest.title = new_manifest.title;
133 134
                app.manifest.content = new_manifest.content;
134 135
                app.manifest.pages = new_manifest.pages;
136
                app.manifest.footer = new_manifest.footer;
135 137
                app.onDefaultManifestLoaded();
136 138
            }
137 139
        };
......
640 642
        app.utils.setLoadingMsg("Démarrage de l'application");
641 643
        app.hasStarted = true;
642 644

  
645
        /* if there's no footer, fallback to the default */
646
        if (typeof app.manifest.footer === 'undefined') {
647
            app.manifest.footer = tmpl('momo-default-footer-tmpl', app.manifest);
648
        }
649

  
643 650
        // Default route to home
644 651
        app.manifest.id = app.currentPage = 'home';
645 652
        
646
-