Move to precompiled handlebars templates.

In Nextcloud 15 the default Content Security Policy disallows unsafe
eval expressions, so Handlebars templates can no longer be compiled at
runtime.

Fix issue #18
This commit is contained in:
Matias De lellis
2019-02-12 12:29:11 -03:00
parent d1d1f1a2f6
commit 6bac24030d
10 changed files with 105 additions and 97 deletions

View File

@@ -1,50 +1 @@
<!-- translation strings -->
<div style="display:none" id="new-note-string"><?php p($l->t('New note')); ?></div>
<script id="navigation-tpl" type="text/x-handlebars-template">
<div id="new-note-fixed">
<div><button type="button" id="new-note" class="icon-add"><?php p($l->t('New note'));?></button></div>
</div>
<li id="all-notes"><a href="#" class="icon-home svg"><?php p($l->t('All notes')); ?></a></li>
<!--
<li id="shared-with-you"><a href="#" class="icon-share svg"><?php p($l->t('Shared with you')); ?></a></li>
<li id="shared-by-you"><a href="#" class="icon-share svg"><?php p($l->t('Shared with others')); ?></a></li>
-->
<li id="colors-folder" class="collapsible open">
<button class="collapse"></button>
<a href="#" class="icon-search svg"><?php p($l->t('Colors')); ?></a>
<ul>
<li style="display: flex; justify-content: center;">
<button class="circle-toolbar icon-checkmark any-color"></button>
{{#each colors}}
<button class="circle-toolbar" style="background-color: {{color}} "></button>
{{/each}}
</li>
</ul>
</li>
<li id="notes-folder" class="collapsible open">
<button class="collapse"></button>
<a href="#" class="icon-folder svg"><?php p($l->t('Notes')); ?></a>
<ul>
{{#each notes}}
<li class="note with-menu {{#if active}}active{{/if}}" data-id="{{ id }}">
<a href="#">{{{ title }}}</a>
<!--
<div class="app-navigation-entry-utils">
<ul>
<li class="app-navigation-entry-utils-menu-button svg"><button></button></li>
</ul>
</div>
<div class="app-navigation-entry-menu">
<ul>
<li><button class="delete icon-delete svg" title="delete"></button></li>
</ul>
</div>
-->
</li>
{{/each}}
</ul>
</li>
</script>
<ul class="with-icon"></ul>