Cleaned up examples folder

This commit is contained in:
Max Lynch
2013-11-07 10:01:01 -06:00
parent 53bae2af16
commit eb7bc3edba
35 changed files with 0 additions and 218 deletions

View File

@ -0,0 +1,71 @@
.view {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.ionic-logo {
position: absolute;
top: 50%;
left: 50%;
margin-top: -128px;
margin-left: -128px;
width: 256px;
}
.toderp-logo {
background: url('../img/toderp-logo.svg') no-repeat transparent;
background-size: contain;
width: 250px;
height: 100px;
margin: 40px auto;
}
.toderp-small-logo {
background: url('../img/logo-header.png') no-repeat transparent;
background-size: 76px 21px;
background-position: 50%;
box-flex: 1;
-webkit-box-flex: 1;
}
#splash-view {
opacity: 1;
}
#splash-view .ionic-logo {
}
#splash-view, #signup-view {
background: url('../img/splash.png') no-repeat transparent;
background-size: cover;
}
#signup-bottom {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
text-align: center;
color: #fff;
}
#signup-bottom .button {
color: #4a87ee;
}
/* Tasks view */
#task-list {
}
#task-list .completed {
text-decoration: line-through;
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
#signup-view {
background: url('../img/splash@2x.png') no-repeat transparent;
background-size: cover;
}
.toderp-small-logo {
background-image: url('../img/logo-header@2x.png');
background-size: 76px 21px;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

View File

@ -0,0 +1,162 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="490.7px" height="194.7px" viewBox="0 0 490.7 194.7" style="enable-background:new 0 0 490.7 194.7;" xml:space="preserve"
>
<style type="text/css">
<![CDATA[
.st0{fill:#4A87EE;}
.st1{fill:#666666;}
]]>
</style>
<g>
<g>
<path class="st1" d="M25.7,181.7L25.7,181.7l6.9-23.3h3.3l6.8,23.3h0.1l6.6-23.3h2.9l-8,27.1h-3.2l-6.8-23.3h-0.1l-6.8,23.3h-3.2
l-8-27.1H19L25.7,181.7z"/>
<path class="st1" d="M58.3,170.5c0.5-1,1.3-1.9,2.4-2.5c1.1-0.6,2.3-0.9,3.6-0.9c2.3,0,4,0.7,5.1,2c1.1,1.4,1.7,3.1,1.7,5.4v11
h-2.6v-9.9c0-0.9-0.1-1.8-0.2-2.6c-0.2-0.8-0.4-1.4-0.8-2c-0.4-0.5-0.9-1-1.5-1.3c-0.6-0.3-1.4-0.5-2.4-0.5c-0.7,0-1.4,0.1-2,0.4
c-0.7,0.3-1.2,0.7-1.7,1.3c-0.5,0.6-0.9,1.3-1.2,2.2c-0.3,0.9-0.5,1.9-0.5,3.1v9.2h-2.6v-27.1h2.6L58.3,170.5L58.3,170.5z"/>
<path class="st1" d="M88.4,173.9c0-1.5-0.4-2.7-1.2-3.5c-0.8-0.8-2-1.1-3.6-1.1c-1.1,0-2.1,0.2-3,0.6c-0.9,0.4-1.7,0.9-2.3,1.5
l-1.5-1.7c0.7-0.7,1.7-1.4,2.9-1.8c1.2-0.5,2.6-0.7,4.1-0.7c1,0,1.9,0.1,2.7,0.4c0.8,0.3,1.6,0.7,2.2,1.2c0.6,0.5,1.1,1.2,1.5,2
c0.4,0.8,0.5,1.8,0.5,2.9v7.9c0,0.7,0,1.4,0.1,2.1c0.1,0.7,0.1,1.4,0.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,8.1-9.4
c3.5-2.4,7.6-3.6,12.2-3.6c1,0,2,0.1,2.9,0.1c1,0.1,1.7,0.3,2.3,0.5L398.2,52z"/>
<path class="st0" d="M490.7,68.9c0,5.2-0.8,10.3-2.4,15.1c-1.6,4.8-3.9,9.1-7,12.7c-3.1,3.7-6.8,6.6-11.2,8.8
c-4.4,2.2-9.5,3.3-15.1,3.3c-4.6,0-9-0.9-13.1-2.8c-4.1-1.9-7.3-4.4-9.7-7.6h-0.3v37.5h-24.7V31.7h23.5v9.2h0.5
c2.3-3,5.5-5.7,9.6-7.9c4.1-2.3,8.9-3.4,14.4-3.4c5.4,0,10.4,1.1,14.8,3.2c4.4,2.1,8.2,5,11.2,8.6c3.1,3.6,5.4,7.8,7.1,12.6
C489.8,58.7,490.7,63.7,490.7,68.9z M466.7,68.9c0-2.4-0.4-4.8-1.1-7.1c-0.8-2.3-1.9-4.3-3.3-6.1c-1.5-1.8-3.3-3.2-5.5-4.3
c-2.2-1.1-4.8-1.7-7.7-1.7c-2.8,0-5.3,0.6-7.5,1.7c-2.2,1.1-4.1,2.6-5.7,4.4c-1.6,1.8-2.8,3.9-3.6,6.2c-0.9,2.3-1.3,4.7-1.3,7.1
c0,2.4,0.4,4.8,1.3,7.1c0.9,2.3,2.1,4.4,3.6,6.2c1.6,1.8,3.4,3.3,5.7,4.4c2.2,1.1,4.7,1.7,7.5,1.7c2.9,0,5.5-0.5,7.7-1.7
c2.2-1.1,4-2.6,5.5-4.4c1.5-1.8,2.6-3.9,3.3-6.3C466.3,73.7,466.7,71.3,466.7,68.9z"/>
</g>
<g>
<path class="st0" d="M115.7,29.3c-22,0-39.9,17.9-39.9,39.9c0,22,17.9,39.9,39.9,39.9c22,0,39.9-17.9,39.9-39.9
C155.6,47.2,137.8,29.3,115.7,29.3z M108.5,85.9c-0.6,0.5-1.3,1-2,1c-0.7,0-1.5-0.5-2-1L91.8,73.2l4-4l10.7,10.7l28.3-28.5l4,4.1
L108.5,85.9z"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -0,0 +1,174 @@
<html ng-app="ionic.todo">
<head>
<meta charset="utf-8">
<title>ToDerp</title>
<!-- Sets initial viewport load and disables zooming -->
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<link href="/vendor/font-awesome/css/font-awesome.css" rel="stylesheet">
<link rel="stylesheet" href="../../dist/css/ionic.css">
<link rel="stylesheet" href="css/app.css">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.3/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.3/angular-mocks.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.3/angular-touch.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.3/angular-route.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.3/angular-animate.js"></script>
<script src='https://cdn.firebase.com/v0/firebase.js'></script>
<script src="https://cdn.firebase.com/v0/firebase-simple-login.js"></script>
<script src='https://cdn.firebase.com/libs/angularfire/0.3.0/angularfire.min.js'></script>
<script src="../../dist/js/ionic.js"></script>
<script src="../../dist/js/ionic-angular.js"></script>
<script src="js/app.js"></script>
<script src="js/filters.js"></script>
<script src="js/services.js"></script>
<script src="js/controllers.js"></script>
<style>
</style>
</head>
<body>
<!-- The root view controller -->
<navs ng-controller="TodoCtrl">
<nav-bar></nav-bar>
<content has-header="true"></content>
</navs>
<!-- Splash -->
<script id="splash.html" type="text/ng-template">
<div id="splash-view" class="view fade-in" nav-content nav-bar="false">
</div>
</script>
<!-- Signup -->
<script id="signup.html" type="text/ng-template">
<div title="Sign up" id="signup-view" class="view" nav-content ng-controller="SignupCtrl">
<main class="content">
<form class="form-horizontal" ng-submit="trySignup(signupForm)">
<div class="container" style="text-align: center">
<div class="toderp-logo"></div>
</div>
<div class="input-group">
<label class="input-row">
<span class="input-label">Full name</span>
<input type="text" placeholder="" ng-model="signupForm.name" required>
</label>
<label class="input-row">
<span class="input-label">Email</span>
<input type="email" placeholder="" ng-model="signupForm.email" required>
</label>
<label class="input-row">
<span class="input-label">Password</span>
<input type="password" placeholder="" ng-model="signupForm.password" required>
</label>
</div>
<div class="margin">
<button type="submit" class="button button-primary button-block">Get derp'n</button>
<div id="signup-error" ng-show="signupError">Unable to signup, please try again.</div>
</div>
</form>
<div id="signup-bottom">
<h3>Already have an account?</h3>
<button ng-click="showLogin()" class="button button-clear button-block">Sign in</button>
</div>
</main>
</div>
</script>
<!-- Login -->
<script id="login.html" type="text/ng-template">
<div id="login-view" class="modal slide-in-up" ng-controller="LoginCtrl">
<header class="bar bar-header bar-secondary">
<h1 class="title">Log in</h1>
<button class="button button-clear button-primary" ng-click="close()">Cancel</button>
</header>
<main class="content padding has-header">
<form class="form-horizontal" ng-submit="tryLogin(loginForm)">
<div class="input-group margin">
<label class="input-row">
<span class="input-label col-xs-4">Email</span>
<input type="email" placeholder="" ng-model="loginForm.email">
</label>
<label class="input-row">
<span class="input-label col-xs-4">Password</span>
<input type="password" placeholder="" ng-model="loginForm.password">
</label>
</div>
<div class="margin">
<button class="button button-primary button-block">Log in</button>
<div id="login-error" ng-show="loginError">Invalid email/password. Please try again.</div>
</div>
</form>
</main>
</div>
</script>
<!-- Tasks -->
<script id="tasks.html" type="text/ng-template">
<div class="view" side-menu-ctrl id="tasks-view" nav-content class="view" ng-controller="TasksCtrl" nav-bar="false">
<pane side-menu-content>
<header class="bar bar-header bar-secondary">
<a href="#" class="button button-icon"><i class="icon-navicon"></i></a>
<h1 class="title">{{activeProject.title}}</h1>
<button class="button button-clear button-primary">Edit</button>
</header>
<div class="content has-header">
<form ng-submit="addTask(newTask)">
<input type="text" ng-model="newTask.title" placeholder="Add an item...">
</form>
<list id="task-list">
<li class="list-item" ng-repeat="task in activeProject.tasks" ng-class="{completed: task.isCompleted}">
<input type="text" ng-model="task.title">
</li>
</list>
</div>
</pane>
<!-- The projects side menu -->
<menu side="left">
<header class="bar bar-header bar-secondary">
<button class="button button-clear button-primary" ng-click="toggleProjectEditing()">Edit</button>
<div class="toderp-small-logo"></div>
<button class="button button-icon" ng-click="showSettings()"><i class="icon-gear-a"></i></button>
</header>
<content has-header="true">
<form ng-submit="addProject(newProject)">
<input type="text" ng-model="newProject.title" placeholder="Create a new list...">
</form>
<list-simple is-editing="isEditingProjects">
<list-item ng-class="{active: project.$id == activeProject.project.name()}"
ng-repeat="project in projects"
on-delete="deleteProject(project)"
on-select="selectProject(project)">
{{project.title}}
</list-item>
</list-simple>
</content>
</menu>
</side-menu-ctrl>
</script>
<script id="settings.html" type="text/ng-template">
<div id="settings-view" class="modal slide-in-up" ng-controller="SettingsCtrl">
<header class="bar bar-header bar-secondary">
<h1 class="title">Settings</h1>
<button class="button button-clear button-primary" ng-click="close()">Done</button>
</header>
<main class="content padding has-header">
<list header="GENERAL">
<list-item>Account details <i class="icon-chevron-right"></i></list-item>
<list-item>Account details <toggle ng-model="settings.isSmallText"></toggle></i></list-item>
</list>
<list header="ACCOUNT">
<list-item ng-click="logout()">Log out</list-item>
</list>
</main>
</div>
</script>
</body>
</html>

View File

@ -0,0 +1,16 @@
angular.module('ionic.todo', [
'ionic.todo.filters',
'ionic.todo.services',
'ionic.todo.controllers',
'ionic.service.modal',
'ionic.service.actionSheet',
'ionic.ui',
'firebase',
'ngRoute',
'ngAnimate'])
// Our Firebase URL
.constant('FIREBASE_URL', 'https://ionic-todo-demo.firebaseio.com/todo');

View File

@ -0,0 +1,224 @@
angular.module('ionic.todo.controllers', ['ionic.todo'])
// The main controller for the application
.controller('TodoCtrl', function($scope, $rootScope, AuthService) {
$scope.candy = 'yes';
$scope.navController.pushFromTemplate('splash.html');
$rootScope.$on('angularFireAuth:login', function(evt, user) {
$scope.navController.pushFromTemplate('tasks.html');
});
$rootScope.$on('angularFireAuth:logout', function(evt, user) {
$scope.navController.pushFromTemplate('signup.html');
});
$rootScope.$on('angularFireAuth:error', function(evt, err) {
$scope.navController.pushFromTemplate('signup.html');
});
})
.controller('SplashCtrl', function($scope) {
})
// The login form controller
.controller('LoginCtrl', function($scope, $rootScope, AuthService) {
console.log('Created login Ctrl');
$scope.loginForm = {
email: 'ihasmax@gmail.com',
password: 'traintown'
};
$scope.close = function() {
$scope.modal.hide();
};
$scope.tryLogin = function(data) {
$scope.loginError = false;
AuthService.login(data.email, data.password)
.then(function(e) {
$scope.loginError = false;
}, function(e) {
$scope.loginError = true;
});
};
$rootScope.$on('angularFireAuth:login', function(evt, user) {
$scope.modal.hide();
});
})
// The signup form controller
.controller('SignupCtrl', function($scope, AuthService, Modal, ActionSheet) {
$scope.signupForm = {};
Modal.fromTemplateUrl('login.html', function(modal) {
$scope.loginModal = modal;
});
$scope.trySignup = function(data) {
AuthService.signup(data.email, data.password);
};
$scope.showLogin = function() {
$scope.loginModal && $scope.loginModal.show();
};
})
// The tasks controller (main app controller)
.controller('TasksCtrl', function($scope, angularFire, angularFireCollection, Modal, ActionSheet, FIREBASE_URL) {
/*
var lastProjectRef = new Firebase(FIREBASE_URL + '/lastproject');
var lastProjectPromise = angularFire(lastProjectRef, $scope, 'lastProject');
$scope.lastProject = null;
*/
$scope.isEditingProjects = false;
// Load our settings modal
Modal.fromTemplateUrl('settings.html', function(modal) {
$scope.settingsModal = modal;
});
$scope.newProject = {};
$scope.newTask = {};
$scope.showSettings = function() {
$scope.settingsModal && $scope.settingsModal.show();
};
/**
* Add a new tasks to the current project.
*/
$scope.addTask = function(task) {
if(!$scope.activeProject) {
return;
}
if(!$scope.activeProject.tasks) {
$scope.activeProject.tasks = [];
}
var task = $scope.activeProject.tasks.add({
title: task.title,
user_id: $scope.user.id,
isCompleted: false
});
task.setPriority(-(+new Date));
// Set the priorty for this project to the new date, so it will
// sort higher
//$scope.activeProject.project.setPriority(-(+new Date));
$scope.newTask = {};
};
/**
* Set the current project
*/
$scope.setActiveProject = function(project) {
// Grab the ref. It's the object on new project, and the $ref
// object on exist (for example, from the ng-repeat)
var ref = project;
if(project.$ref) {
ref = project.$ref;
}
$scope.activeProject = {
project: ref,
title: project.title,
tasks: angularFireCollection(ref.child('tasks').limit(100))
};
};
$scope.selectProject = function(project) {
$scope.setActiveProject(project);
$scope.sideMenuCtrl.close();
};
/**
* Add a project to the projects list.
*/
$scope.addProject = function(newProject) {
var p = {
title: newProject.title,
user_id: $scope.user.id,
tasks: [],
};
console.log("Adding project:", p);
// Reset the form
$scope.newProject = {};
var np = $scope.projects.add(p);
//np.setPriority(-(+new Date));
$scope.setActiveProject(np);
// Set these explicitly, some firebase delay or something happening
// here.
$scope.activeProject.title = newProject.title;
$scope.activeProject.user_id = newProject.user_id;
$scope.sideMenuCtrl.close();
};
$scope.deleteProject = function(project) {
var ref = project;
ActionSheet.show({
buttons: [],
destructiveText: 'Delete Project',
cancelText: 'Cancel',
cancel: function() {
return true;
},
destructiveButtonClicked: function() {
if(project.$ref) {
ref = project.$ref;
}
ref.remove();
return true;
}
});
};
$scope.toggleProjectEditing = function() {
$scope.isEditingProjects = !$scope.isEditingProjects;
};
var projectsRef = new Firebase(FIREBASE_URL + '/project_list');
$scope.projects = angularFireCollection(projectsRef.limit(100), function(snapshot) {
if(!snapshot.val()) {
var title = prompt('Create your first list:');
if(title) {
$scope.addProject({
title: title
});
}
}
});
// Listen for the first child added so we can set it as the active project
projectsRef.once('child_added', function(snapshot, prevChildName) {
$scope.setActiveProject(
angular.extend({
'$ref': snapshot.ref(),
}, snapshot.val())
)
});
projectsRef.on('child_added', function(snapshot, prevChildName) {
console.log('CHILD ADDED', snapshot.val());
});
})
.controller('SettingsCtrl', function($scope, AuthService) {
$scope.close = function() {
$scope.modal.hide();
}
$scope.logout = function() {
AuthService.logout();
};
})

View File

@ -0,0 +1,11 @@
angular.module('ionic.todo.filters', [])
.filter('reverse', function() {
return function(items) {
if(items) {
return items.slice().reverse();
}
return [];
};
});

View File

@ -0,0 +1,49 @@
angular.module('ionic.todo.services', ['ionic.todo', 'firebase'])
// The AuthService handles user authentication with Firebase.
.factory('AuthService', function(angularFireAuth, $rootScope, FIREBASE_URL) {
// Initialize the angularFireAuth service.
var ref = new Firebase(FIREBASE_URL);
angularFireAuth.initialize(ref, {
scope: $rootScope,
callback: function(user, err) {
console.log('AUTH CHANGED', err, user);
},
name: 'user'
});
return {
// Try to log in with the given email and pass
login: function(email, password) {
if(!email || !password) {
return;
}
console.log('Logging in', email, password);
return angularFireAuth.login('password', {
email: email,
password: password
});
},
logout: function() {
angularFireAuth.logout();
},
// Try to sign up with the given email and pass
signup: function(email, password) {
if(!email || !password) {
return;
}
console.log('Signing up', name, email, password);
angularFireAuth.createUser(email, password, function(err, user) {
if(err && err.code == "EMAIL_TAKEN") {
alert('That email is already taken');
}
});
}
};
})