add search

This commit is contained in:
wlh
2014-12-14 16:50:54 +08:00
parent 98c562ee8e
commit 57f5d28e31
5 changed files with 8 additions and 5 deletions
+1
View File
@@ -285,6 +285,7 @@ app.controller('musicListController', ['$rootScope', 'musicList',function($rootS
var Search = function($scope, $rootScope, $location, bookList, musicList, movieList){ var Search = function($scope, $rootScope, $location, bookList, musicList, movieList){
var path = $location.path(); var path = $location.path();
$rootScope.isNoLoaded = false; $rootScope.isNoLoaded = false;
// document.getElementById('search_input').focus();
//跳回列表页 //跳回列表页
$scope.search = function(){ $scope.search = function(){
var keywords = $scope.keywords; var keywords = $scope.keywords;
+1 -1
View File
File diff suppressed because one or more lines are too long
+4 -3
View File
@@ -2,9 +2,10 @@
<html ng-app="app"> <html ng-app="app">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes"/> <meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black" /> <meta name="apple-touch-fullscreen" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<title>爱搜索 爱生活</title> <title>爱搜索 爱生活</title>
<link rel="stylesheet" type="text/css" href="../css/main.css"> <link rel="stylesheet" type="text/css" href="../css/main.css">
</head> </head>
+1 -1
View File
@@ -1,6 +1,6 @@
<header ng-controller="Search"> <header ng-controller="Search">
<div> <div>
<input id="search_input" ng-model="keywords" type="text" placeholder="请输入关键字"/> <input id="search_input" ng-model="keywords" type="text" placeholder="请输入关键字" autofocus="true"/>
</div> </div>
<div> <div>
<input type="button" id="search_btn" ng-click="search()" value="搜索"/> <input type="button" id="search_btn" ng-click="search()" value="搜索"/>
+1
View File
@@ -2,6 +2,7 @@
var Search = function($scope, $rootScope, $location, bookList, musicList, movieList){ var Search = function($scope, $rootScope, $location, bookList, musicList, movieList){
var path = $location.path(); var path = $location.path();
$rootScope.isNoLoaded = false; $rootScope.isNoLoaded = false;
// document.getElementById('search_input').focus();
//跳回列表页 //跳回列表页
$scope.search = function(){ $scope.search = function(){
var keywords = $scope.keywords; var keywords = $scope.keywords;