You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2014/11/12 23:54:02 UTC

cordova-registry-web git commit: removed search on keypress

Repository: cordova-registry-web
Updated Branches:
  refs/heads/master c07bb6620 -> b4ab059ff


removed search on keypress


Project: http://git-wip-us.apache.org/repos/asf/cordova-registry-web/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-registry-web/commit/b4ab059f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-registry-web/tree/b4ab059f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-registry-web/diff/b4ab059f

Branch: refs/heads/master
Commit: b4ab059ff7b84069e2afd292b5dbbcb181412cde
Parents: c07bb66
Author: Steve Gill <st...@gmail.com>
Authored: Wed Nov 12 14:53:55 2014 -0800
Committer: Steve Gill <st...@gmail.com>
Committed: Wed Nov 12 14:53:55 2014 -0800

----------------------------------------------------------------------
 attachments/index.html                      | 1 +
 attachments/js/directives/topbar.js         | 8 ++------
 attachments/partials/directives/topbar.html | 2 +-
 3 files changed, 4 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-registry-web/blob/b4ab059f/attachments/index.html
----------------------------------------------------------------------
diff --git a/attachments/index.html b/attachments/index.html
index c50d426..30ea3ed 100644
--- a/attachments/index.html
+++ b/attachments/index.html
@@ -81,6 +81,7 @@
   <script type="text/javascript" src="js/controllers/search.js"></script>
   <script type="text/javascript" src="js/directives/topbar.js"></script>
   <script type="text/javascript" src="js/directives/pluginlist.js"></script>
+  <script type="text/javascript" src="js/directives/ng-enter.js"></script>
   <script type="text/javascript" src="js/filters/platformFilter.js"></script>
 </body>
 </html>

http://git-wip-us.apache.org/repos/asf/cordova-registry-web/blob/b4ab059f/attachments/js/directives/topbar.js
----------------------------------------------------------------------
diff --git a/attachments/js/directives/topbar.js b/attachments/js/directives/topbar.js
index 13bbaa2..75a0570 100644
--- a/attachments/js/directives/topbar.js
+++ b/attachments/js/directives/topbar.js
@@ -52,12 +52,8 @@ angular.module('registry.controllers').directive('topbar', ['$http', '$location'
                         }
                     })
                 }else{
-                    //check to see if user pressed enter or hit submit button
-                    if ((evt.keyCode === 13) || evt.type === "submit" ){
-                        currentSearch = encodeURIComponent($scope.searchText.toLowerCase());
-                        //send to search page
-                        $window.location.href = '/#/search?search='+currentSearch;
-                    }
+                    currentSearch = encodeURIComponent($scope.searchText.toLowerCase());
+                    $window.location.href = '/#/search?search='+currentSearch;
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/cordova-registry-web/blob/b4ab059f/attachments/partials/directives/topbar.html
----------------------------------------------------------------------
diff --git a/attachments/partials/directives/topbar.html b/attachments/partials/directives/topbar.html
index 84a2a15..2e6faad 100644
--- a/attachments/partials/directives/topbar.html
+++ b/attachments/partials/directives/topbar.html
@@ -2,7 +2,7 @@
     <div class="column-12--hand column-4--lap column-3--desk offset-1--lap offset-2--desk">
         <form ng-submit="search($event)">
             <div class="row center">
-            <input id="search-text" type="search" ng-model="searchText" class="column-8--hand topbar-search" placeholder="Find a plugin..." ng-keyup="search($event)"/>
+            <input id="search-text" type="search" ng-model="searchText" class="column-8--hand topbar-search" placeholder="Find a plugin..." ng-enter="search()"/>
             <input type="submit" id="submit" value="" class="column-1--hand topbar-button"/>
             </div>
         </form>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org