summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-09-11 21:11:42 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-09-11 21:11:42 +0200
commit3e313821cf21e6443ab1b75336c8c510d758fa43 (patch)
tree0c2533226308322030548d11de107179288ebe77 /templates
parentf3091d84e14537a42334e66ea6588cf2b83f9ab6 (diff)
fix autofocus
Diffstat (limited to 'templates')
-rw-r--r--templates/index.php4
-rw-r--r--templates/part.content.php2
-rw-r--r--templates/part.navigation.addfeed.php6
-rw-r--r--templates/part.navigation.addfolder.php5
-rw-r--r--templates/part.navigation.folder.php13
5 files changed, 8 insertions, 22 deletions
diff --git a/templates/index.php b/templates/index.php
index f84709571..b7aa17a2c 100644
--- a/templates/index.php
+++ b/templates/index.php
@@ -45,13 +45,11 @@ style('news', [
<!-- content -->
<script type="text/ng-template" id="content.html"><?php print_unescaped($this->inc('part.content')) ?></script>
- <div id="app-content" ng-class="{'loading-content': App.loading.isLoading('content') && !App.loading.isLoading('global')}">
+ <div id="app-content" ng-class="{'loading-content': App.loading.isLoading('content') && !App.loading.isLoading('global')}" tabindex="-1">
<div id="app-content-wrapper"
ng-class="{'autopaging': App.loading.isLoading('autopaging')}"
ng-hide="App.loading.isLoading('global')"
ng-view
- tabindex="-1"
- news-auto-focus
news-scroll
news-scroll-enabled-auto-page="Content.autoPagingEnabled()"
news-scroll-enabled-mark-read="Content.markReadEnabled()"
diff --git a/templates/part.content.php b/templates/part.content.php
index c0e54def1..c7398a2df 100644
--- a/templates/part.content.php
+++ b/templates/part.content.php
@@ -2,7 +2,7 @@
<h1><?php p($l->t('Welcome to the ownCloud News app!')) ?></h1>
</div>
-<div ng-if="!App.isFirstRun()">
+<div ng-if="!App.isFirstRun()" news-auto-focus="#app-content">
<ul>
<li class="item {{ Content.getFeed(item.feedId).cssClass }}"
ng-repeat="item in Content.getItems() | orderBy:[Content.orderBy()] track by item.id"
diff --git a/templates/part.navigation.addfeed.php b/templates/part.navigation.addfeed.php
index 8fe135f36..a5f529530 100644
--- a/templates/part.navigation.addfeed.php
+++ b/templates/part.navigation.addfeed.php
@@ -27,7 +27,8 @@
class="icon-add add-new-folder-primary"
ng-hide="Navigation.newFolder"
title="<?php p($l->t('New folder')); ?>"
- ng-click="Navigation.newFolder=true"></button>
+ ng-click="Navigation.newFolder=true"
+ news-focus="#new-feed [name='folderName']"></button>
<!-- add a folder -->
<input type="text"
@@ -37,8 +38,7 @@
name="folderName"
class="folder-input"
ng-if="Navigation.newFolder"
- required
- news-auto-focus>
+ required>
<button type="button"
ng-show="Navigation.newFolder"
class="icon-close add-new-folder-primary"
diff --git a/templates/part.navigation.addfolder.php b/templates/part.navigation.addfolder.php
index 0a923c363..5d70c1dbb 100644
--- a/templates/part.navigation.addfolder.php
+++ b/templates/part.navigation.addfolder.php
@@ -2,7 +2,7 @@
<div class="heading icon-add">
<button
data-apps-slide-toggle="#new-folder"
- news-focus="[name='folderName']"><?php p($l->t('New Folder'))?></button>
+ news-focus="#new-folder [name='folderName']"><?php p($l->t('New Folder'))?></button>
</div>
<div class="add-new-popup" id="new-folder">
@@ -17,8 +17,7 @@
placeholder="<?php p($l->t('Folder name')); ?>"
title="<?php p($l->t('Folder name')); ?>"
name="folderName"
- required
- news-auto-focus>
+ required>
<p class="error" ng-show="Navigation.folderNameExists(folder.name)"><?php p($l->t('Folder exists already!')); ?></p>
diff --git a/templates/part.navigation.folder.php b/templates/part.navigation.folder.php
index 3bd086755..c6bc97fcb 100644
--- a/templates/part.navigation.folder.php
+++ b/templates/part.navigation.folder.php
@@ -30,24 +30,13 @@
</div>
<div ng-if="folder.editing" class="app-navigation-entry-edit">
- <input name="feedRename" type="text" value="{{ folder.title }}" news-auto-focus>
+ <input name="folderRename" class="folder-input" type="text" value="{{ folder.name }}" news-auto-focus>
<button title="<?php p($l->t('Rename')); ?>"
ng-click="Navigation.renameFolder(folder)"
class="action icon-checkmark">
</button>
</div>
- <div ng-if="folder.editing">
- <input type="text" ng-model="folder.name" class="folder-input" autofocus>
- <button title="<?php p($l->t('Cancel')); ?>"
- ng-click="Navigation.cancelRenameFolder(folder.id)"
- class="action-button back-button action"></button>
- <button title="<?php p($l->t('Save')); ?>"
- ng-click="Navigation.renameFolder(folder.id, folder.name)"
- class="action-button create-button action">
- </button>
- </div>
-
<a ng-href="#/items/folders/{{ folder.id }}/"
class="title icon-folder"
ng-hide="folder.editing">