Merge pull request #2603 from matiu/bug/fastclick

Revert "rm fastclick"
This commit is contained in:
Gustavo Maximiliano Cortez 2015-04-23 18:10:05 -03:00
commit a096c9ad85
6 changed files with 13 additions and 13 deletions

View file

@ -78,6 +78,7 @@ module.exports = function(grunt) {
},
angular: {
src: [
'bower_components/fastclick/lib/fastclick.js',
'bower_components/qrcode-generator/js/qrcode.js',
'bower_components/qrcode-decoder-js/lib/qrcode-decoder.js',
'bower_components/moment/min/moment-with-locales.js',

View file

@ -21,6 +21,7 @@
"angular-bitcore-wallet-client": "^0.0.18",
"angular-ui-router": "~0.2.13",
"qrcode-decoder-js": "*",
"fastclick": "*",
"angular-ui-switch": "~0.1.0"
},
"resolutions": {

View file

@ -1,7 +1,8 @@
<div
class="bottom-bar row collapse">
<div class="medium-3 small-3 columns text-center bottombar-item" ng-repeat="item in index.menu">
<a id="menu-{{item.link}}" ng-click="index.setTab(item.link)" class="{{item.active? 'active': ''}}" style="border-top-color:{{item.active? index.backgroundColor: ''}}" >
<a ng-click="index.setTab(item.link)" ng-class="{'active': index.tab == item.link}"
ng-style="{'border-top-color':index.tab==item.link ? index.backgroundColor : ''}">
<i class="size-36 {{item.icon}} db"></i>
<div class="size-10 tu">
{{item.title|translate}}

View file

@ -13,8 +13,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.menu = [{
'title': 'Home',
'icon': 'icon-home',
'link': 'walletHome',
'active': true,
'link': 'walletHome'
}, {
'title': 'Receive',
'icon': 'icon-receive',
@ -104,7 +103,6 @@ angular.module('copayApp.controllers').controller('indexController', function($r
};
self.setTab = function(tab) {
if (self.tab === tab)
return;
@ -123,8 +121,10 @@ angular.module('copayApp.controllers').controller('indexController', function($r
if (document.getElementById(tab)) {
document.getElementById(tab).className = 'tab-in tab-view ' + tab;
var newe = document.getElementById('menu-' + tab);
newe.className = 'active';
newe.style.borderTopColor = self.backgroundColor;
if (newe) {
newe.className = 'active';
newe.style.borderTopColor = self.backgroundColor;
}
}
self.tab = tab;

View file

@ -9,13 +9,6 @@ angular.element(document).ready(function() {
/* Cordova specific Init */
if (window.cordova !== undefined) {
// Fastclick event
if ('addEventListener' in document) {
document.addEventListener('DOMContentLoaded', function() {
FastClick.attach(document.body);
}, false);
}
document.addEventListener('deviceready', function() {
document.addEventListener('pause', function() {

View file

@ -376,6 +376,10 @@ angular
});
})
.run(function($rootScope, $state, $log, gettextCatalog, uriHandler, isCordova, amMoment, profileService) {
console.log('Attaching FastClick');
FastClick.attach(document.body);
// Auto-detect browser language
var userLang, androidLang;