Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/notes.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkorelstar <korelstar@users.noreply.github.com>2019-05-22 22:40:03 +0300
committerGitHub <noreply@github.com>2019-05-22 22:40:03 +0300
commitfc7631eb9e7e89876f2570d18b872b89fb30832c (patch)
tree971a1b0d518d79adda0522c2a17485d988db77cc /templates
parentdeb80e4774d42151c7af3549832d5a1dc863cbca (diff)
switch to Vue.js
Diffstat (limited to 'templates')
-rw-r--r--templates/main.php168
-rw-r--r--templates/note.php12
2 files changed, 3 insertions, 177 deletions
diff --git a/templates/main.php b/templates/main.php
index cc4580ec..cc25ea62 100644
--- a/templates/main.php
+++ b/templates/main.php
@@ -1,167 +1,5 @@
<?php
-/**
- * Copyright (c) 2013, Bernhard Posselt <dev@bernhard-posselt.com>
- * Copyright (c) 2013, Jan-Christoph Borchardt http://jancborchardt.net
- * This file is licensed under the Affero General Public License version 3 or later.
- * See the COPYING file.
- */
-
-
-script('notes', [
- 'vendor/angular/angular.min',
- 'vendor/angular-route/angular-route.min',
- 'vendor/restangular/dist/restangular.min',
- 'vendor/simplemde/dist/simplemde.min',
- 'public/app.min'
-]);
-
-style('notes', [
- '../js/vendor/simplemde/dist/simplemde.min',
- 'notes'
-]);
-
+script('notes', 'notes');
+style('notes', 'notes');
?>
-
-<div id="app" ng-app="Notes" ng-controller="AppController"
- ng-init="init('<?= $_['lastViewedNote'] ?>','<?= $_['errorMessage'] ?>')" ng-cloak>
-
- <script type="text/ng-template" id="note.html">
- <?php print_unescaped($this->inc('note')); ?>
- </script>
-
- <div id="app-navigation" ng-controller="NotesController" ng-class="{'loading': !notesLoaded}">
-
-{{ SelectedCategory = (filterCategory==null ? null : filterCategory || '<?php p($l->t('Uncategorized')); ?>'); ''}}
-
- <!-- new note button -->
- <div class="app-navigation-new">
- <button class="icon-add" id="new-note-button" type="button" ng-click="create()">
- <?php p($l->t('New note')); ?>
- </button>
- </div>
-
- <ul class="with-icon">
-
- <!-- category selector -->
- <li class="collapsible app-navigation-noclose separator-below" ng-class="{ open: folderSelectorOpen, 'current-category-item': !folderSelectorOpen && filterCategory!=null }" ng-show="notes.length>1">
- <a class="nav-icon-files svg" ng-click="toggleFolderSelector()">{{!folderSelectorOpen && SelectedCategory ? SelectedCategory : '<?php p($l->t('Categories')); ?>' | categoryTitle}}</a>
-
- <ul>
- <li data-id="recent" class="nav-recent" ng-class="{ active: filterCategory==null && filterFavorite==false }" ng-show="notes.length>1">
- <a
- ng-click="setFilter(null)"
- class="nav-icon-recent svg"
- ><?php p($l->t('All notes')); ?></a>
- <div class="app-navigation-entry-utils">
- <ul>
- <li class="app-navigation-entry-utils-counter">{{notes.length}}</li>
- </ul>
- </div>
- </li>
-
- <!-- category list -->
- <li
- ng-repeat="category in (categories | orderBy:['name'])"
- class="nav-files"
- ng-class="{ active: filterCategory==category.name && filterFavorite==false }"
- title="{{ category.name || '<?php p($l->t('Uncategorized')); ?>' }}"
- >
- <a
- ng-click="setFilter(category.name)"
- class="svg"
- ng-class="{ 'nav-icon-emptyfolder': !category.name, 'nav-icon-files': category.name }"
- >{{ category.name || '<?php p($l->t('Uncategorized')); ?>' }}</a>
- <div class="app-navigation-entry-utils">
- <ul>
- <li class="app-navigation-entry-utils-counter">{{category.count}}</li>
- </ul>
- </div>
- </li>
- </ul>
- </li>
-
- <!-- search result header -->
- <li ng-show="search && filteredNotes.length" class="search-result-header">
- <a class="nav-icon-search active">
- <span ng-show="SelectedCategory"><?php p($l->t('Search result for "{{search}}" in {{SelectedCategory}}')); ?></span>
- <span ng-show="!SelectedCategory"><?php p($l->t('Search result for "{{search}}"')); ?></span>
- </a>
- </li>
-
- <!-- nothing found -->
- <li ng-show="notesLoaded && !filteredNotes.length">
- <span class="nav-entry" ng-show="search">
- <div id="emptycontent" class="emptycontent-search">
- <div class="icon-search"></div>
- <h2 ng-show="SelectedCategory"><?php p($l->t('No search result for {{search}} in {{SelectedCategory}}')); ?></h2>
- <h2 ng-show="!SelectedCategory"><?php p($l->t('No search result for {{search}}')); ?></h2>
- </div>
- </span>
- <span class="nav-entry" ng-show="!search"><?php p($l->t('No notes found')); ?></span>
- </li>
-
- <!-- notes list -->
- <li ng-repeat="note in filteredNotes = (notes | filter:categoryFilter | and:search | orderBy:filterOrder | groupNotes:filterCategory)"
- ng-class="{ active: note.id == route.noteId, 'has-error': note.error, 'app-navigation-noclose': isCategory(note) }"
- class="note-item">
-
- <a class="nav-icon-files svg separator-above"
- ng-if="isCategory(note)"
- ng-click="setFilter(filterCategory + '/' + note)"
- >&hellip; / {{ note | categoryTitle }}</a>
-
- <a href="#/notes/{{ note.id }}"
- title="{{ note.title }}"
- ng-if="!isCategory(note)"
- >
- {{ note.title }}
- <span ng-if="note.unsaved">*</span>
- </a>
- <div class="app-navigation-entry-utils" ng-class="{'hidden': note.error }" ng-if="!isCategory(note)">
- <ul>
- <li class="app-navigation-entry-utils-menu-button button-delete">
- <button class="svg action icon-delete"
- title="<?php p($l->t('Delete note')); ?>"
- notes-tooltip
- data-placement="bottom"
- data-trigger="hover"
- ng-click="delete(note.id)"></button>
- </li>
- <li class="app-navigation-entry-utils-menu-button button-star"
- ng-class="{starred: note.favorite}"
- >
- <button class="svg action icon-star"
- title="<?php p($l->t('Favorite')); ?>"
- notes-tooltip
- data-placement="bottom"
- data-trigger="hover"
- ng-click="toggleFavorite(note.id, $event)"
- ng-class="{'icon-starred': note.favorite}"></button>
- </li>
- </ul>
- </div>
- </li>
- </ul>
-
- <div id="app-settings" ng-controller="NotesSettingsController">
- <div id="app-settings-header">
- <button class="settings-button" data-apps-slide-toggle="#app-settings-content"><?php p($l->t('Settings'));?></button>
- </div>
- <div id="app-settings-content">
- <div class="settings-notesPath">
- <p class="settings-hint"><label for="notesPath"><?php p($l->t('Folder to store your notes')) ?></label></p>
- <form><input type="text" name="notesPath" ng-model="settings.notesPath" placeholder="<?php p($l->t('path to notes')); ?>" id="notesPath"/><input type="submit" class="icon-confirm" value=""></form>
- </div>
- <div class="settings-fileSuffix">
- <p class="settings-hint"><label for="fileSuffix"><?php p($l->t('File extension for new notes')) ?></label></p>
- <select id="fileSuffix" ng-model="settings.fileSuffix" ng-options="o as o for o in extensions"></select>
- </div>
- </div>
- </div>
-
- </div>
-
- <div id="app-content" ng-class="{loading: is.loading}">
- <div id="app-content-container" ng-view></div>
- </div>
-</div>
+<div id="vue-content"></div>
diff --git a/templates/note.php b/templates/note.php
deleted file mode 100644
index 2cde69dc..00000000
--- a/templates/note.php
+++ /dev/null
@@ -1,12 +0,0 @@
- <textarea editor notes-timeout-change="onEdit()" name="editor" ng-if="note!==false"></textarea>
- <div class="note-meta" ng-if="note!==false">
- <span class="note-category" ng-class="{ uncategorized: !note.category }" title="<?php p($l->t('Category')); ?>" ng-show="!editCategory" ng-click="showEditCategory()">{{ note.category || '<?php p($l->t('Uncategorized')) ?>' | categoryTitle}} <input type="button" class="edit icon icon-rename" title="<?php p($l->t('Edit category')); ?>"></span>
- <span class="note-category" title="<?php p($l->t('Edit category')); ?>" ng-show="editCategory"><form class="category" ng-submit="saveCategory()"><input type="text" id="category" name="category" ng-disabled="isCategorySaving" ng-blur="saveCategory()" placeholder="<?php p($l->t('Uncategorized')); ?>" ng-class="{ 'icon-loading': isCategorySaving }"><input type="submit" class="icon-confirm" value="" ng-show="!isCategorySaving"><span class="icon icon-loading-small" ng-show="isCategorySaving"></span></form></span>
- <span class="note-word-count" ng-show="note.content.length > 0">{{note.content | wordCount}}</span>
- <span class="note-unsaved" ng-show="note.unsaved" title="<?php p($l->t('The note has unsaved changes.')); ?>">*</span>
- <span class="note-error" ng-show="note.error" ng-click="manualSave()" title="<?php p($l->t('Click here to try again')); ?>"><?php p($l->t('Saving failed!')); ?></span>
- <span class="saving" ng-show="isManualSaving()" title="<?php p($l->t('Note saved')); ?>"></span>
- <span class="note-meta-right">
- <button class="icon-fullscreen has-tooltip btn-fullscreen" notes-tooltip ng-click="toggleDistractionFree()"></button>
- </span>
- </div>