Skip to content

Commit

Permalink
Merge pull request #44 from krisma/tempBranch
Browse files Browse the repository at this point in the history
Temp branch
  • Loading branch information
shankari authored Jun 25, 2016
2 parents fbd9e31 + 956e27f commit bd1ea35
Show file tree
Hide file tree
Showing 15 changed files with 779 additions and 228 deletions.
10 changes: 5 additions & 5 deletions www/css/main.diary.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
color:whitesmoke !important;
}
.angular-leaflet-map {
width: 200px;
height: 150px;
width: 300px;
height: 150px;
}


Expand All @@ -55,7 +55,7 @@
}
a.item-content {
padding: 0 !important;
background-color: #eeeeee !important;
background-color: transparent !important;
}
.leaflet-div-icon {
background-color: white;
Expand All @@ -67,11 +67,11 @@ a.item-content {
border-color: white;
}
.leaflet-div-icon-start {
background-color: #72b026;
background-color: #33e0bb;
border-radius: 6px;
}
.leaflet-div-icon-stop {
background-color: #d63e2a;
background-color: #ff5251;
border-radius: 6px;
}
.inner-icon {
Expand Down
239 changes: 238 additions & 1 deletion www/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,241 @@ border: 0px !important;
border-color: transparent !important;
border-top: transparent !important;
border-bottom: transparent !important;
background-image: none !important; }
background-image: none !important; }

.list .item.item-accordion {
line-height: 38px;
padding-top: 0;
padding-bottom: 0;
transition: 0.09s all linear;
}
.list .item.item-accordion.ng-hide {
line-height: 0px;
}
.list .item.item-accordion.ng-hide-add,
.list .item.item-accordion.ng-hide-remove {
display: block !important;
}
.input-label {
font-size: 16px;
}
.list {
padding-top: 0.5px !important;
}
.card {
background: #fff;
border-radius: 2px;
display: inline-block;
height: 275px;
margin: 1rem;
position: relative;
width: 300px;
}
/* Dark theme */
/*
.tab-nav{
background-color: #212121 !important; background-size: 0 !important;
}
ion-header-bar {
background-color: #212121 !important;
}
.ion-view-background{
background-color: #303030 !important;
}
.tabs-custom-dark > .tabs,
.tabs.tabs-custom-dark {
border-color: #5D3A23;
background-color: #5D3A23;
background-image: linear-gradient(0deg, #0c60ee, #0c60ee 50%, transparent 30%);
color: #33e0bb; }
.tabs-custom-dark > .tabs .tab-item .badge,
.tabs.tabs-custom-dark .tab-item .badge {
background-color: #33e0bb;
color: #387ef5; }
.tabs-striped.tabs-custom-dark .tabs {
background-color: #5D3A23; }
.tabs-striped.tabs-custom-dark .tab-item {
color: rgba(255, 255, 255, 0.3);
opacity: 1; }
.tabs-striped.tabs-custom-dark .tab-item .badge {
opacity: 0.3; }
.tabs-striped.tabs-custom-dark .tab-item.tab-item-active, .tabs-striped.tabs-custom-dark .tab-item.active, .tabs-striped.tabs-positive .tab-item.activated {
margin-top: -2px;
color: #fff;
border-style: solid;
border-width: 2px 0 0 0;
border-color: #fff; }
.title.title-center.header-item {
color: white;
}
.date-picker-button-dark {
color: #33e0bb !important; padding: 0 15px; border-color: transparent; margin-top: 4px; box-shadow: 0 1px 2px rgba(0,0,0,0.16), 0 2px 2px rgba(0,0,0,0.23);
border-style: solid; border-color: white; border-width: 0px; border-radius: 5px;
}
.date-picker-arrow-dark {
color: rgba(51,224,187, 0.7) !important; margin-top: 4px; background-color: transparent !important;
}
*/
/* Dark theme ends */
/* Light theme */
.tab-nav{
background-color: #f5f5f5 !important; background-size: 0 !important;
box-shadow: 0 1px 2px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
}
.tab-item.tab-item-active, .tab-item.active, .tab-item.activated {
color: #2bb096;
}

ion-header-bar {
background-color: #f5f5f5 !important;
box-shadow: 0 1px 2px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
}
.ion-view-background{
background-color: #FAFAFA !important;
}
.ion-view-background-dark {
background-color: #303030 !important;
}
.tabs-custom > .tabs,
.tabs.tabs-custom {
border-color: #5D3A23;
background-color: #5D3A23;
background-image: linear-gradient(0deg, #0c60ee, #0c60ee 70%, transparent 70%);
color: #999; }
.tabs-custom > .tabs .tab-item .badge,
.tabs.tabs-custom .tab-item .badge {
background-color: #999;
color: #387ef5; }

.tabs-striped.tabs-custom .tabs {
background-color: #5D3A23; }

.tabs-striped.tabs-custom .tab-item {
color: rgba(255, 255, 255, 0.7);
opacity: 1; }
.tabs-striped.tabs-custom .tab-item .badge {
opacity: 0.7; }
.tabs-striped.tabs-custom .tab-item.tab-item-active, .tabs-striped.tabs-custom .tab-item.active, .tabs-striped.tabs-positive .tab-item.activated {
margin-top: -2px;
color: #fff;
border-style: solid;
border-width: 2px 0 0 0;
border-color: #fff; }
.title.title-center.header-item {
color: #303030;
}
.date-picker-button {
color: #303030 !important; padding: 0 15px; border-color: transparent; margin-top: 4px; box-shadow: 0 1px 2px rgba(0,0,0,0.16), 0 2px 2px rgba(0,0,0,0.23);
border-style: solid; border-color: white; border-width: 0px; border-radius: 5px;
}
.date-picker-arrow {
color: #303030 !important; margin-top: 4px; background-color: transparent !important;
}
/* Light theme ends */


.earlier-later-expand-dark {
color: white;
margin: 16px 16px 0 16px;
font-size: 0.8em;
opacity: 0.7;
}
.earlier-later-expand {
color: #303030;
margin: 16px 16px 0 16px;
font-size: 0.8em;
opacity: 0.7;
}
.list-location {
color: #303030;
}
.list-location-dark {
color: white;
}
p.list-text-dark {
color: white;
}
p.list-text {
color: #303030;
}
a.list-text-dark {
color: white;
}
a.list-text {
color: #303030;
}
.tab-item .icon {
margin: 3px auto 1px auto;
font-size: 25px;
height: 25px;

}

.card-1 {
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
transition: all 0.3s cubic-bezier(.25,.8,.25,1);
}

.card-1:hover {
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
}

.card-2 {
box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
}

.card-3 {
box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}

.card-4 {
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
}

.card-5 {
box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);
}

button.button.ng-binding {
font-size: 15px;
}
button.button.ng-binding i.icon.ion-edit {
font-size: 12px;
}
button.button.back-button.buttons.button-clear.header-item {
color: #fff;
}

/* Profile tab */
.control-list-item {
background-color: white! important; height: 50px; margin-top: 0.5px;
}
.control-list-text {
background-color: white! important; padding: 15px; float: left;
}
.control-list-toggle {
float: right; margin-top: 5px; margin-right: 2px;
}
/* Diary list tab */

.dev-zone-input {
padding: 7px 0; font-size: 16px; line-height: 22px; height: 36px;
}
.dev-zone-title {
padding: 18px 22px;
}
.dev-zone-button {
position: absolute;
right: 16px;
top: 16px;
}
.list-card-dark {
margin: 16px; background-color: #424242; box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
}
.list-card {
margin: 16px; background-color: #fff; box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
}
Binary file added www/img/avatar_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<!--
The nav bar that will be updated as we navigate between views.
-->
<ion-nav-bar class="bar-stable">
<ion-nav-bar class="bar-stable" style="background-color: #212121 !important;">
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
Expand Down
7 changes: 7 additions & 0 deletions www/js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ angular.module('emission.controllers', [])
console.log("Checking to see whether we are ready to load the screen");
if (window.plugins && window.plugins.appPreferences) {
var prefs = plugins.appPreferences;
prefs.fetch('dark_theme').then(function(value) {
if (value == true) {
$rootScope.dark_theme = true;
} else {
$rootScope.dark_theme = false;
}
});
prefs.fetch('setup_complete').then(function(value) {
console.log('setup_complete result '+value);
if (value == true) {
Expand Down
38 changes: 33 additions & 5 deletions www/js/diary/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@ angular.module('emission.main.diary.list',['ui-leaflet', 'nvd3ChartDirectives',
'emission.main.common.services',
'emission.services'])

.controller("DiaryListCtrl", function($window, $scope, $ionicPlatform, $state,
.controller("DiaryListCtrl", function($window, $scope, $rootScope, $ionicPlatform, $state,
$ionicScrollDelegate, $ionicPopup,
$ionicLoading,
$ionicActionSheet,
leafletData, Timeline, CommonGraph, DiaryHelper,
Config) {
console.log("controller DiaryListCtrl called");

// Add option
// StatusBar.styleBlackOpaque()
$scope.dark_theme = $rootScope.dark_theme;
StatusBar.styleDefault();
var readAndUpdateForDay = function(day) {
// This just launches the update. The update can complete in the background
// based on the time when the database finishes reading.
Expand Down Expand Up @@ -59,6 +62,25 @@ angular.module('emission.main.diary.list',['ui-leaflet', 'nvd3ChartDirectives',
* setHours here, while the currDay is a moment, since we use it to perform
* +date and -date operations.
*/
$scope.listExpandClass = function () {
return ($scope.dark_theme)? "earlier-later-expand-dark" : "earlier-later-expand";
}
$scope.listLocationClass = function() {
return ($scope.dark_theme)? "item item-icon-left list-location-dark" : "item item-icon-left list-location";

}
$scope.listTextClass = function() {
return ($scope.dark_theme)? "list-text-dark" : "list-text";
}
$scope.ionViewBackgroundClass = function() {
return ($scope.dark_theme)? "ion-view-background-dark" : "ion-view-background";
}
$scope.datePickerClass = function() {

}
$scope.listCardClass = function() {
return ($scope.dark_theme)? "list card list-card-dark" : "list card list-card";
}

$scope.setCurrDay = function(val) {
if (typeof(val) === 'undefined') {
Expand Down Expand Up @@ -155,7 +177,9 @@ angular.module('emission.main.diary.list',['ui-leaflet', 'nvd3ChartDirectives',
*/

$scope.refresh = function() {
if ($ionicScrollDelegate.getScrollPosition().top < 5) {
readAndUpdateForDay(Timeline.data.currDay);
}
}

/* For UI control */
Expand Down Expand Up @@ -194,6 +218,13 @@ angular.module('emission.main.diary.list',['ui-leaflet', 'nvd3ChartDirectives',
$scope.starColor = DiaryHelper.starColor;
$scope.arrowColor = DiaryHelper.arrowColor;
$scope.getArrowClass = DiaryHelper.getArrowClass;
$scope.getStartTimeTagStyle = DiaryHelper.getStartTimeTagStyle;
$scope.getStopTimeTagStyle = DiaryHelper.getStopTimeTagStyle;
$scope.isCommon = DiaryHelper.isCommon;
// $scope.expandEarlierOrLater = DiaryHelper.expandEarlierOrLater;
// $scope.increaseRestElementsTranslate3d = DiaryHelper.increaseRestElementsTranslate3d;


$scope.userModes = [
"walk", "bicycle", "car", "bus", "train", "unicorn"
];
Expand All @@ -207,9 +238,6 @@ angular.module('emission.main.diary.list',['ui-leaflet', 'nvd3ChartDirectives',

};

$scope.getTripHeightPixels = function(trip) {
return "400px";
};

$scope.prevDay = function() {
console.log("Called prevDay when currDay = "+Timeline.data.currDay.format('YYYY-MM-DD'));
Expand Down
Loading

0 comments on commit bd1ea35

Please sign in to comment.