summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-05-23 20:19:06 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-05-23 20:19:06 +0200
commit0b22611a929fc317c6ad073d2ddf5f198ee836f3 (patch)
treeca3593e76af10dc6a81ed0412c6d0e6434f73331 /templates
parent94e24c1e1a53db60e6924b39ad308b6b2d2e8c2b (diff)
more boilerplate
Diffstat (limited to 'templates')
-rw-r--r--templates/main.php12
-rw-r--r--templates/part.addnew.php32
-rw-r--r--templates/part.content.php11
-rw-r--r--templates/part.feed.unread.php22
-rw-r--r--templates/part.settings.php2
5 files changed, 43 insertions, 36 deletions
diff --git a/templates/main.php b/templates/main.php
index ad0d0a6ed..ffbdb1a9a 100644
--- a/templates/main.php
+++ b/templates/main.php
@@ -22,11 +22,11 @@
<div id="global-loading" class="icon-loading" ng-show="App.loading.isLoading('global')"></div>
<!-- navigation -->
- <div id="app-navigation" ng-controller="NavigationController" ng-hide="App.loading.isLoading('global')">
+ <div id="app-navigation" ng-controller="NavigationController as Navigation" ng-hide="App.loading.isLoading('global')">
<ul class="with-icon" data-folder-id="0" news-droppable>
- <?php //print_unescaped($this->inc('part.addnew')) ?>
- <?php //print_unescaped($this->inc('part.feed.unread')) ?>
+ <?php print_unescaped($this->inc('part.addnew')) ?>
+ <?php print_unescaped($this->inc('part.feed.unread')) ?>
<?php //print_unescaped($this->inc('part.feed.starred')) ?>
<?php //print_unescaped($this->inc('part.listfeed', ['folderId' => '0'])) ?>
<?php //print_unescaped($this->inc('part.listfolder')) ?>
@@ -41,6 +41,10 @@
<!-- content -->
<script type="text/ng-template" id="content.html"><?php print_unescaped($this->inc('part.content')) ?></script>
- <div id="app-content" ng-class="{'icon-loading': App.loading.isLoading('content')}" ng-hide="App.loading.isLoading('global')" ng-view></div>
+ <div id="app-content"
+ ng-class="{'icon-loading': App.loading.isLoading('content')}"
+ ng-hide="App.loading.isLoading('global')"
+ ng-view
+ tabindex="-1"></div>
</div>
diff --git a/templates/part.addnew.php b/templates/part.addnew.php
index a6f525262..69ca47810 100644
--- a/templates/part.addnew.php
+++ b/templates/part.addnew.php
@@ -1,10 +1,6 @@
<li class="add-new">
<a class="list-title list-title-with-icon"
- oc-click-slide-toggle="{
- selector: '.add-new-popup',
- hideOnFocusLost: true,
- cssClass: 'opened'
- }"
+ data-apps-slide-toggle=".add-new-popup"
href="#"
oc-click-focus="{
selector: '.add-new-popup input[ng-model=feedUrl]'
@@ -12,7 +8,7 @@
>+ <span><?php p($l->t('Add Website'))?></span></a>
<div class="add-new-popup">
-
+
<fieldset class="personalblock">
<p class="error" ng-show="feedExistsError || folderExistsError">
<span ng-show="feedExistsError">
@@ -24,43 +20,43 @@
</p>
<form>
- <input type="text"
- ng-model="feedUrl"
- placeholder="<?php p($l->t('Address')); ?>"
+ <input type="text"
+ ng-model="feedUrl"
+ placeholder="<?php p($l->t('Address')); ?>"
name="adress"
autofocus>
- <button title="<?php p($l->t('Add')); ?>"
+ <button title="<?php p($l->t('Add')); ?>"
class="primary"
ng-disabled="!feedUrl.trim()"
ng-click="addFeed(feedUrl, folderId.id)"><?php p($l->t('Add')); ?></button>
</form>
<form>
- <select name="folder"
+ <select name="folder"
data-create="<?php p($l->t('New folder')); ?>"
- title="<?php p($l->t('Folder')); ?>"
+ title="<?php p($l->t('Folder')); ?>"
ng-model="folderId"
ng-options="folder.name for folder in folderBusinessLayer.getAll()"
ng-hide="addNewFolder">
<option value="" selected="selected"><?php p($l->t('Choose folder')); ?></option>
</select>
- <button title="<?php p($l->t('New folder')); ?>"
+ <button title="<?php p($l->t('New folder')); ?>"
ng-click="addNewFolder=true"
ng-hide="addNewFolder"
class="action-button new-button action"
oc-click-focus="{selector: 'input[name=\'foldername\']'}"></button>
- <input type="text"
- ng-model="folderName"
+ <input type="text"
+ ng-model="folderName"
ng-show="addNewFolder"
name="foldername"
- placeholder="<?php p($l->t('Folder name')); ?>"
+ placeholder="<?php p($l->t('Folder name')); ?>"
autofocus
class="folder-input"
ui-keyup="{13: 'addFolder(folderName)'}"/>
- <button title="<?php p($l->t('Back to folder selection')); ?>"
+ <button title="<?php p($l->t('Back to folder selection')); ?>"
ng-show="addNewFolder"
ng-click="addNewFolder=false"
class="action-button back-button action"></button>
- <button title="<?php p($l->t('Create folder')); ?>"
+ <button title="<?php p($l->t('Create folder')); ?>"
ng-show="addNewFolder"
ng-click="addFolder(folderName)"
ng-disabled="!folderName.trim()"
diff --git a/templates/part.content.php b/templates/part.content.php
index d3a59b08c..eaf8d925a 100644
--- a/templates/part.content.php
+++ b/templates/part.content.php
@@ -1,3 +1,12 @@
<div id="first-run" ng-if="App.isFirstRun()">
<h1><?php p($l->t('Welcome to the ownCloud News app!')) ?></h1>
-</div> \ No newline at end of file
+</div>
+
+<div news-auto-focus="#app-content" ng-if="!App.isFirstRun()">
+ <ul ng-if="isCompactView()">
+
+ </ul>
+ <ul ng-if="!isCompactView()">
+
+ </ul>
+</div>
diff --git a/templates/part.feed.unread.php b/templates/part.feed.unread.php
index 2fe2eda0c..049332002 100644
--- a/templates/part.feed.unread.php
+++ b/templates/part.feed.unread.php
@@ -1,28 +1,26 @@
<li ng-class="{
active: subscriptionsBusinessLayer.isActive(0),
unread: getTotalUnreadCount() > 0
- }"
+ }"
ng-show="subscriptionsBusinessLayer.isVisible(0)">
- <a class="rss-icon"
- href="#"
- ui-if="!feedBusinessLayer.isShowAll()"
- ng-click="subscriptionsBusinessLayer.load(0)"
- oc-click-focus="{selector: '#app-content'}">
+
+ <a class="rss-icon" href="#/items" ng-if="!Navigation.isShowAll()">
<?php p($l->t('Unread articles'))?>
</a>
- <a class="rss-icon"
- href="#"
- ui-if="feedBusinessLayer.isShowAll()"
- ng-click="subscriptionsBusinessLayer.load(0)"
- oc-click-focus="{selector: '#app-content'}">
+
+ <a class="rss-icon" href="#/items" ng-if="Navigation.isShowAll()">
<?php p($l->t('All articles'))?>
</a>
+
+ <div class="utils">
+
+ </div>
<span class="utils">
<span class="unread-counter"
ng-show="getTotalUnreadCount() > 0">
{{ unreadCountFormatter(getTotalUnreadCount()) }}
</span>
- <button class="svg action mark-read-icon"
+ <button class="svg action mark-read-icon"
ng-click="subscriptionsBusinessLayer.markRead()"
title="<?php p($l->t('Mark read')) ?>"
ng-show="getTotalUnreadCount() > 0"
diff --git a/templates/part.settings.php b/templates/part.settings.php
index 4ad4874f3..cfef921f9 100644
--- a/templates/part.settings.php
+++ b/templates/part.settings.php
@@ -1,7 +1,7 @@
<div id="app-settings-header">
<button name="app settings"
class="settings-button"
- data-apps-slide-up-area="#app-settings-content"></button>
+ data-apps-slide-toggle="#app-settings-content"></button>
</div>
<div id="app-settings-content">