refactored dialog

This commit is contained in:
Athou
2013-05-31 12:00:35 +02:00
parent e934d5b9fd
commit cae7e7f9c8
7 changed files with 142 additions and 42 deletions

View File

@@ -0,0 +1,27 @@
<div ng-controller="FeedSearchCtrl">
<div modal="feedSearchModal" close="close()"
options="{dialogClass: 'modal feed-search-dialog'}">
<div class="modal-header">
<button type="button" class="close" ng-click="close()">&times;</button>
<h4>
<input ng-model="filter" class="filter-input"
ui-keydown="{'up': 'focusPrevious($event)', 'down': 'focusNext($event)', 'enter': 'openFocused()' }"
placeholder="${feedsearch.hint}" focus="feedSearchModal">
</h4>
<small>${feedsearch.help}</small>
</div>
<div class="modal-body">
<strong>${feedsearch.result_prefix}</strong>
<span
ng-repeat="feed in (filtered = (CategoryService.feeds | filter:{name: filter} | limitTo:40))">
<span ng-class="{block: filter, focus: focus.id == feed.id}" class="feed-link">
<a class=" pointer" ng-click="goToFeed(feed.id)">
<favicon url="feed.iconUrl" />
&nbsp;{{feed.name}}
</a>
<span ng-show="!filter && !$last">&bull;</span>
</span>
</span>
</div>
</div>
</div>

View File

@@ -37,4 +37,7 @@
<dt>${about.shortcuts.mouse_middleclick}</dt>
<dd>${about.shortcuts.open_in_new_tab_mark_as_read}</dd>
<dt>g <i class="icon-arrow-right"></i> u</dt>
<dd>${about.shortcuts.feed_search}</dd>
</dl>

View File

@@ -1,9 +1,10 @@
<div class="container-fluid" ng-controller="FeedCtrl">
<div class="container-fluid">
<div class="row-fluid">
<div class="span2 left-menu">
<div class="sidebar-nav-fixed" mousewheel-scrolling>
<div ng-include="'templates/_subscribe.html'"></div>
<div ng-include="'templates/_tree.html'"></div>
<div ng-include="'templates/_feedsearch.html'"></div>
</div>
</div>
<div class="span10 main-content">
@@ -13,36 +14,5 @@
</div>
</div>
</div>
<div
modal="feedSearchModal"
close="feedSearchModal=false"
options="{dialogClass: 'modal item-filter-dialog'}"
>
<div class="modal-header">
<button
type="button"
class="close"
ng-click="feedSearchModal=false"
>&times;</button>
<h4><input
ng-model="feedFilter"
style="width: 90%"
placeholder="${feedsearch.hint}"
autofocus=""
></h4>
<small>${feedsearch.help}</small>
</div>
<div class="modal-body">
<strong>${feedsearch.result_prefix}</strong>
<span ng-repeat="feed in CategoryService.feeds | filter:feedFilter | limitTo:40">
<a
style="font-size: large; margin: 10px;"
ng-click="goToFeed(feed.id)"
>
<favicon url="feed.iconUrl" />&nbsp;{{feed.name}}
</a> &bull;
</span>
</div>
</div>
<div ng-include="'templates/_footer.html'"></div>
</div>