Mike 7 年之前
父節點
當前提交
6ec78152bc
共有 2 個文件被更改,包括 5 次插入33 次删除
  1. 1 29
      miaomiao/www/js/controllers/home.js
  2. 4 4
      miaomiao/www/templates/home/index.html

+ 1 - 29
miaomiao/www/js/controllers/home.js

xqd
@@ -19,35 +19,7 @@
         $scope.toggleLeftSideMenu = function () {
             $ionicSideMenuDelegate.toggleLeft();
         };
-        $scope.openFilter = function ($event) {
-             // 一个精心制作的自定义弹窗
-           var myPopup = $ionicPopup.show({
-             template: '请选择<select><option value="opel">性别</option><option value="audi">Audi</option></select>  <br>请选择<select><option value="opel">地区</option><option value="audi">Audi</option></select>',
-             title: '筛选',
-             scope: $scope,
-             buttons: [
-               { text: '取消' },
-               {
-                 text: '<b>提交</b>',
-                 type: 'button-positive',
-                 onTap: function(e) {
-                   if (!$scope.data.wifi) {
-                     //不允许用户关闭,除非他键入wifi密码
-                     e.preventDefault();
-                   } else {
-                     return $scope.data.wifi;
-                   }
-                 }
-               },
-             ]
-           });
-           myPopup.then(function(res) {
-             console.log('Tapped!', res);
-           });
-           $timeout(function() {
-              myPopup.close(); //由于某种原因3秒后关闭弹出
-           }, 3000);
-        };
+
         $scope.openPopover = function ($event) {
             $scope.popover.show($event);
         };

+ 4 - 4
miaomiao/www/templates/home/index.html

xqd
@@ -1,11 +1,11 @@
 <ion-view view-title="瞄喵">
     <ion-nav-buttons side="left">
-        <button class="button button-clear" style="height: 30px; width: 30px" ng-click="toggleLeftSideMenu()">
-            <img src="img/icon_menu.svg" style="height: 60%; width: 100%;">
-        </button>
-        <button class="button button-clear homeIcon" ng-click="openFilter()">
+        <button class="button button-clear homeIcon" ng-click="toggleLeftSideMenu()">
             <img src="img/icon_menu.svg" style="height: 60%; width: 100%; margin-top: 7px">
         </button>
+        <button class="button button-clear homeIcon" style="height: 30px; width: 30px" ng-click="openPopover($event)">
+            <img src="img/icon_menu.svg" style="height: 60%; width: 100%;margin-top: 7px">
+        </button>
     </ion-nav-buttons>
     <ion-nav-buttons side="right">
         <button class="button button-clear" style="height: 30px; width: 30px; margin-top: 2px" ui-sref="app.home_search">