Skip to content

Commit

Permalink
Code Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
niksmac committed Feb 17, 2016
1 parent ef879f2 commit 28736a4
Show file tree
Hide file tree
Showing 11 changed files with 66 additions and 156 deletions.
7 changes: 2 additions & 5 deletions scss/ionic.app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ $ionicons-font-path: "../lib/ionic/fonts" !default;
-o-background-size: cover;
background-size: cover;
position: fixed;
top: 35%;
top: 30%;
}
.centered {
text-align: center;
Expand Down Expand Up @@ -70,9 +70,6 @@ canvas#line.chart.chart-line {
.donate {
font-size: 1.3rem;
}

.content-margin{margin-top: 43px;}

.tab-item.tab-item-active, .tab-item.active, .tab-item.activated {
color: red;
color: red;
}
9 changes: 3 additions & 6 deletions www/css/ionic.app.css
Original file line number Diff line number Diff line change
Expand Up @@ -9737,8 +9737,8 @@ a.button {
-o-background-size: cover;
background-size: cover;
position: fixed;
top: 35%;
}
top: 30%; }

.centered {
text-align: center; }

Expand Down Expand Up @@ -9778,8 +9778,5 @@ canvas#line.chart.chart-line {
.donate {
font-size: 1.3rem; }

.content-margin{margin-top: 43px;}

.tab-item.tab-item-active, .tab-item.active, .tab-item.activated {
color: red;
}
color: red; }
2 changes: 1 addition & 1 deletion www/css/ionic.app.min.css

Large diffs are not rendered by default.

106 changes: 50 additions & 56 deletions www/js/app.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
// Ionic Starter App

// angular.module is a global place for creating, registering and retrieving Angular modules
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
// the 2nd parameter is an array of 'requires'
// 'starter.controllers' is found in controllers.js
angular.module('starter', ['ionic', 'starter.controllers', 'chart.js','ngStorage'])

.run(function($ionicPlatform, $rootScope, $ionicLoading) {
Expand Down Expand Up @@ -39,56 +33,56 @@ angular.module('starter', ['ionic', 'starter.controllers', 'chart.js','ngStorage
$ionicConfigProvider.tabs.position('bottom');
$stateProvider
$stateProvider
.state('tabs', {
url: "/tab",
abstract: true,
templateUrl: "templates/tabs.html"
})
.state('tabs.checkbalance', {
url: "/checkbalance",
views: {
'home-tab': {
templateUrl: "templates/checkbalance.html",
controller: 'ChkBalanceCtrl'
}
}
})
.state('tabs.price', {
url: "/price",
views: {
'price-tab': {
templateUrl: "templates/price.html",
controller: 'PriceCtrl'
}
}
})
.state('tabs.marketcap', {
url: "/marketcap",
views: {
'marketcap-tab': {
templateUrl: "templates/marketcap.html",
controller: 'MarketCtrl'
}
}
})
.state('tabs.credits', {
url: "/credits",
views: {
'credits-tab': {
templateUrl: 'templates/credits.html',
controller: 'CreditCtrl'
}
}
})
.state('tabs.send', {
url: "/send",
views: {
'send-tab': {
templateUrl: 'templates/send.html',
controller: 'sendCtrl'
}
}
});
.state('tabs', {
url: "/tab",
abstract: true,
templateUrl: "templates/tabs.html"
})
.state('tabs.checkbalance', {
url: "/checkbalance",
views: {
'home-tab': {
templateUrl: "templates/checkbalance.html",
controller: 'ChkBalanceCtrl'
}
}
})
.state('tabs.price', {
url: "/price",
views: {
'price-tab': {
templateUrl: "templates/price.html",
controller: 'PriceCtrl'
}
}
})
.state('tabs.marketcap', {
url: "/marketcap",
views: {
'marketcap-tab': {
templateUrl: "templates/marketcap.html",
controller: 'MarketCtrl'
}
}
})
.state('tabs.credits', {
url: "/credits",
views: {
'credits-tab': {
templateUrl: 'templates/credits.html',
controller: 'CreditCtrl'
}
}
})
.state('tabs.send', {
url: "/send",
views: {
'send-tab': {
templateUrl: 'templates/send.html',
controller: 'sendCtrl'
}
}
});


// if none of the above states are matched, use this as the fallback
Expand Down
12 changes: 4 additions & 8 deletions www/js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ angular.module('starter.controllers', ['chart.js', 'ngCordova'])

.controller('AppCtrl', function($scope, $ionicModal, $timeout) {

// Form data for the login modal
$scope.loginData = {};

})

.controller('StatiticsCtrl', function($scope, $http, $rootScope, $ionicLoading) {
Expand Down Expand Up @@ -64,16 +61,15 @@ angular.module('starter.controllers', ['chart.js', 'ngCordova'])

$scope.doRefresh = function() {
$http.get($rootScope.apiBase + '/statistics/price').then(function(resp) {
$scope.$broadcast('scroll.refreshComplete');
var lastThirty = resp.data.data.reverse().slice(0, 50);
var lastTen = lastThirty.slice(0, 8);
lastTen = lastTen.reverse();
var labels = [], usds = [];

angular.forEach(lastTen, function(num) {
labels.push($filter('date')(num.time, "HH:mm"));
usds.push(num.usd.toString());
});

$scope.labels = labels;
$scope.data = [usds];
$scope.items = lastThirty;
Expand Down Expand Up @@ -105,7 +101,7 @@ angular.module('starter.controllers', ['chart.js', 'ngCordova'])


.controller('CreditCtrl', function($scope, $http, $rootScope) {
// .controller('CreditCtrl', function($scope, $http, $rootScope, $cordovaClipboard) {
// .controller('CreditCtrl', function($scope, $http, $rootScope, $cordovaClipboard) {
// $scope.copyThis = function () {
// $cordovaClipboard
// .copy('0xc2593b43eef66488d45b014fc8f86830f08c48fd')
Expand Down Expand Up @@ -146,8 +142,8 @@ angular.module('starter.controllers', ['chart.js', 'ngCordova'])
});

socket.on('global', function (globalMsg) {
console.log(globalMsg);
})
console.log(globalMsg);
})

socket.on('trade', function (tradeMsg) {
$localStorage.marketcap = tradeMsg;
Expand Down
9 changes: 1 addition & 8 deletions www/templates/checkbalance.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<div class="bar bar-header">
<h1 class="title">Check Balance</h1>
</div>

<ion-view view-title="Check Balance">
<ion-content class="center-middle cbf">
<ion-content class="center-middle cbf has-header">
<form >

<div class="list">
<label class="item item-input item-stacked-label">
<span class="input-label">Ether Account Address</span>
Expand All @@ -15,26 +13,21 @@ <h1 class="title">Check Balance</h1>
<div class="item item-toggle">
Save Address
<label class="toggle toggle-assertive">
<!-- <input type="checkbox" ng-model="data.ifSave" checked="checked"> -->
<input type='checkbox' ng-model='data.ifSave'>
<div class="track">
<div class="handle"></div>
</div>
</label>
</div>

<div class="padding">
<button class="button button-block button-positive" ng-click="checkBalance(data)">Check Balance</button>
</div>
</form>

<div class="padding centered balancetxt" ng-show="response">
{{ response }}
</div>

<div class="padding centered red" ng-show="error">
{{ error }}
</div>

</ion-content>
</ion-view>
23 changes: 2 additions & 21 deletions www/templates/credits.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<div class="bar bar-header">
<h1 class="title">Credits</h1>
</div>

<ion-view view-title="Credits">
<ion-content class="content-margin">

<ion-content class="has-header">
<div class="row">
<div class="col centered muted">
This project <a href="https://github.com/lightrainstech/etherwallet">etherwallet</a> is Open Source under MIT. <br>
Expand All @@ -19,12 +17,9 @@ <h1 class="title">Credits</h1>
ETH: <div class="donate selectable" >0xc2593b43eef66488d45b014fc8f86830f08c48fd</div>

BTC: <div class="donate selectable" >1Fj87rtZ7KvjXkoLY5wbgMN4A5H6QiuxpZ</div>

<small>{{copied}}</small>
</div>

</div>

<div class="list padding-top">
<div class="item item-divider">
API
Expand All @@ -40,23 +35,9 @@ <h1 class="title">Credits</h1>
<div class="item item-divider">
Development Sponsors
</div>
<!-- <a class="item" href="http://lightrains.com">
Lightrains Technolabs Pvt Ltd
</a> -->
<a class="item" href="https://pegke.com">
Pegke Loyalty
</a>
<!-- <div class="item item-divider">
Developers
</div>
<a class="item" href="http://github.com/niksmac">
<i class="icon ion-social-github"></i> niksmac
</a>
<a class="item" href="http://github.com/jikkkujose">
<i class="icon ion-social-github"></i> jikkkujose
</a> -->
</div>


</div>
</ion-content>
</ion-view>
8 changes: 1 addition & 7 deletions www/templates/marketcap.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,34 @@
<h1 class="title">ETH Market Capital</h1>
</div>
<ion-view view-title="ETH Market Capital">
<ion-content class="content-margin">

<ion-content class="has-header">
<ion-refresher pulling-text="Pull to refresh" on-refresh="doRefresh()">
</ion-refresher>

<ul class="list">
<li class="item">
Market Capital
<span class="item-note mcapVal">
{{values.mktcap | currency:'USD' }}
</span>
</li>

<li class="item">
Price
<span class="item-note mcapVal">
{{values.price | currency:'USD' }}
</span>
</li>

<li class="item">
Volume (24h)
<span class="item-note mcapVal">
{{values.volume | currency:'USD' }}
</span>
</li>

<li class="item" ng-show="values.supply">
Available Supply
<span class="item-note mcapVal">
{{values.supply }} ETH
</span>
</li>

</ul>
</ion-content>
</ion-view>
41 changes: 0 additions & 41 deletions www/templates/menu.html

This file was deleted.

2 changes: 1 addition & 1 deletion www/templates/price.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<h1 class="title">Price Statitics</h1>
</div>
<ion-view view-title="Price">
<ion-content class="content-margin">
<ion-content class="has-header">
<ion-refresher pulling-text="Pull to refresh" on-refresh="doRefresh()">
</ion-refresher>
<div class="row">
Expand Down
Loading

0 comments on commit 28736a4

Please sign in to comment.