Ver Fonte

Merge branch 'HipsterBrown-url-input' into develop

Gaël Métais há 10 anos atrás
pai
commit
090708f38b
2 ficheiros alterados com 3 adições e 2 exclusões
  1. 1 0
      front/src/js/app.js
  2. 2 2
      front/src/views/index.html

+ 1 - 0
front/src/js/app.js

@@ -19,6 +19,7 @@ var yltApp = angular.module('YellowLabTools', [
 ]);
 
 yltApp.run(['$rootScope', '$location', function($rootScope, $location) {
+    $rootScope.isTouchDevice = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent);
     $rootScope.loadedRunId = null;
 
     // Google Analytics

+ 2 - 2
front/src/views/index.html

@@ -2,7 +2,7 @@
 <p class="price">Free and open source!</p>
 
 <form ng-submit="launchTest()" >
-    <input type="text" name="url" ng-model="url" placeholder="http://www.mysite.com" class="url" />
+    <input type="{{$root.isTouchDevice? 'url' : 'text'}}" name="url" ng-model="url" placeholder="http://www.mysite.com" class="url" />
     <input type="submit" value="Launch test" class="launchBtn" ng-class="{disabled: !url}" />
     <div class="settings">
         <div class="device">
@@ -90,4 +90,4 @@
         <h3>JS Profiling</h3>
         <p>Untangles the JavaScript spaghetti code</p>
     </div>
-</div>
+</div>