code refactor

This commit is contained in:
Gabriel Bazán 2016-09-12 16:50:31 -03:00
commit 50434d7ab6
4 changed files with 5 additions and 4 deletions

View file

@ -0,0 +1,86 @@
<div class="topbar-container" ng-include="'views/includes/topbar.html'"
ng-init="titleSection='Global preferences'; closeToHome = true; noColor = true">
</div>
<div class="content preferences" ng-controller="preferencesGlobalController" ng-init="init()">
<h4></h4>
<ul>
<li href ui-sref="preferencesLanguage">
<div class="right text-gray">
{{currentLanguageName|translate}}
<i class="icon-arrow-right3 size-24 right"></i>
</div>
<div translate>Language</div>
</li>
</ul>
<h4></h4>
<ul class="no-bullet m0">
<li href ui-sref="preferencesUnit">
<div class="right text-gray">
{{unitName}}
<i class="icon-arrow-right3 size-24 right"></i>
</div>
<div translate>Unit</div>
</li>
<li href ui-sref="preferencesAltCurrency">
<div class="right text-gray">
{{selectedAlternative.name}}
<i class="icon-arrow-right3 size-24 right"></i>
</div>
<div translate>Alternative Currency</div>
</li>
</ul>
<h4></h4>
<ul class="no-bullet m0">
<li href ui-sref="preferencesFee">
<div class="right text-gray">
{{feeOpts[currentFeeLevel]|translate}}
<i class="icon-arrow-right3 size-24 right"></i>
</div>
<div translate>Bitcoin Network Fee Policy</div>
</li>
</ul>
<ion-toggle ng-model="spendUnconfirmed" toggle-class="toggle-balanced" ng-change="spendUnconfirmedChange()">
<span class="toggle-label" translate>Use Unconfirmed Funds</span>
</ion-toggle>
<div ng-show="usePushNotifications && PNEnabledByUser">
<h4></h4>
<ion-toggle ng-model="pushNotifications" toggle-class="toggle-balanced" ng-change="pushNotificationsChange()">
<span class="toggle-label" translate>Enable push notifications</span>
</ion-toggle>
</div>
<div class="m20t" ng-show="usePushNotifications && !PNEnabledByUser && isIOSApp">
<div class="text-left text-gray size-12 m10" translate>Push notifications for Copay are currently disabled. Enable them in the Settings app.</div>
<ul class="no-bullet m0" ng-click="openSettings()">
<li ng-style="{'color':index.backgroundColor}" translate>Open Settings app</li>
</ul>
</div>
<h4></h4>
<ion-toggle ng-show="!index.isWindowsPhoneApp" ng-model="glideraEnabled" toggle-class="toggle-balanced" ng-change="glideraChange()">
<span class="toggle-label" translate>Enable Glidera Service</span>
</ion-toggle>
<h4></h4>
<ion-toggle ng-show="!index.isWindowsPhoneApp" ng-model="coinbaseEnabled" toggle-class="toggle-balanced" ng-change="coinbaseChange()">
<span class="toggle-label" translate>Enable Coinbase Service</span>
</ion-toggle>
<h4></h4>
<ul class="no-bullet m0">
<li href ui-sref="about">
<i class="icon-arrow-right3 size-24 right text-gray"></i>
<div translate>About Copay</div>
</li>
</ul>
<h4></h4>
</div>
<div class="extra-margin-bottom"></div>

28
old/topbar.html Normal file
View file

@ -0,0 +1,28 @@
<nav ng-controller="topbarController as topbar"
class="tab-bar" ng-style="{'background-color': noColor ? '#4B6178' : index.backgroundColor}">
<section class="left-small">
<a id="hamburger" class="p10" ng-show="!goBackToState && !closeToHome && !index.noFocusedWallet && index.physicalScreenWidth < 768"
on-tap="index.toggleLeftMenu()"><i class="fi-list size-24"></i>
</a>
<a ng-show="goBackToState" ng-click="$root.go(goBackToState); goBackToState = null"><i class="icon-arrow-left3 icon-back"></i>
<span class="text-back" translate>Back</span>
</a>
<a ng-show="closeToHome" class="p10 "
ng-click="topbar.goHome(); index.setCompactTxHistory(); closeToHome = null">
<span class="text-close" translate>Close</span>
</a>
</section>
<section class="right-small" ng-show="showPreferences && !index.noFocusedWallet">
<a class="p10" ng-click="topbar.goPreferences(); index.setCompactTxHistory()">
<i class="fi-widget size-24"></i>
</a>
</section>
<section class="middle tab-bar-section">
<h1 class="title ellipsis">
{{(titleSection|translate) || (index.alias || index.walletName)}}
</h1>
</section>
</nav>