输入框加入回车键事件
This commit is contained in:
parent
de7b08c3d4
commit
7290a6b9a7
|
|
@ -36,13 +36,6 @@ app.controller('menuCtr', ['$scope', '$stateParams', '$state', 'pubSubService',
|
||||||
title: '登录|注册'
|
title: '登录|注册'
|
||||||
}];
|
}];
|
||||||
|
|
||||||
$scope.myKeyup = function(e) {
|
|
||||||
var keycode = window.event ? e.keyCode : e.which;
|
|
||||||
if (keycode == 13) {
|
|
||||||
$scope.searchBookmarks($scope.searchWord);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @func
|
* @func
|
||||||
* @desc 点击搜索按钮搜索书签
|
* @desc 点击搜索按钮搜索书签
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="eight wide field">
|
<div class="eight wide field">
|
||||||
<div class="ui action input">
|
<div class="ui action input">
|
||||||
<input type="text" placeholder="多个分类请用中文或英文逗号 , 隔开" ng-model="newTags">
|
<input type="text" placeholder="多个分类请用中文或英文逗号 , 隔开" ng-model="newTags" ng-keypress="($event.which === 13)?addTags():0">
|
||||||
<button class="ui button" ng-click="addTags()">添加新分类</button>
|
<button class="ui button" ng-click="addTags()">添加新分类</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="two wide column" ng-show="showSearch">
|
<div class="two wide column" ng-show="showSearch">
|
||||||
<div class="ui transparent icon input" ng-show="!showTags">
|
<div class="ui transparent icon input" ng-show="!showTags">
|
||||||
<input class="prompt" type="text" placeholder="用户账号" ng-model="username">
|
<input class="prompt" type="text" placeholder="用户账号" ng-model="username" ng-keypress="($event.which === 13)?search():0">
|
||||||
</div>
|
</div>
|
||||||
<div class="ui grid container" style="padding-top: 8px;">
|
<div class="ui grid container" style="padding-top: 8px;">
|
||||||
<div class="ui multiple dropdown js-search-tags" style="padding:0;" ng-show="showTags" js-dropdown-tags-init>
|
<div class="ui multiple dropdown js-search-tags" style="padding:0;" ng-show="showTags" js-dropdown-tags-init>
|
||||||
|
|
@ -100,10 +100,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="two wide column" ng-show="showSearch">
|
<div class="two wide column" ng-show="showSearch">
|
||||||
<div class="ui transparent input">
|
<div class="ui transparent input">
|
||||||
<input type="text" placeholder="标题,链接..." ng-model="searchWord">
|
<input type="text" placeholder="标题,链接..." ng-model="searchWord" ng-keypress="($event.which === 13)?search():0">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="left floated right aligned two wide column" ng-show="showSearch">
|
<div class=" left floated right aligned two wide column" ng-show=" showSearch">
|
||||||
<div class="ui grid">
|
<div class="ui grid">
|
||||||
<div class="four wide column">
|
<div class="four wide column">
|
||||||
<i class="search icon" title="搜索" ng-click="search()"></i>
|
<i class="search icon" title="搜索" ng-click="search()"></i>
|
||||||
|
|
@ -131,7 +131,7 @@
|
||||||
<tr ng-repeat="bookmark in bookmarks" id="{{ bookmark.id }}">
|
<tr ng-repeat="bookmark in bookmarks" id="{{ bookmark.id }}">
|
||||||
<td>
|
<td>
|
||||||
<img class="ui ui middle aligned tiny image" src="http://g.soz.im/{{bookmark.url}}/cdn.ico" style="width:16px;height:16px;cursor:pointer;" ng-click="jumpToUrl(bookmark.url, bookmark.id)" favicon-err="./images/favicon/{{bookmark.id}}.ico">
|
<img class="ui ui middle aligned tiny image" src="http://g.soz.im/{{bookmark.url}}/cdn.ico" style="width:16px;height:16px;cursor:pointer;" ng-click="jumpToUrl(bookmark.url, bookmark.id)" favicon-err="./images/favicon/{{bookmark.id}}.ico">
|
||||||
<span ng-click="jumpToUrl(bookmark.url, bookmark.id)" title="{{bookmark.title}}" style="cursor:pointer;">
|
<span ng-click="jumpToUrl(bookmark.url, bookmark.id)" title="{{bookmark.title}}" style="cursor:pointer;">
|
||||||
{{ bookmark.title }}
|
{{ bookmark.title }}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue