Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
icub3d committed Feb 9, 2013
2 parents 617a29e + 91eeb51 commit 8ee4b56
Show file tree
Hide file tree
Showing 80 changed files with 56,580 additions and 772 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Folders
_obj
_test
prod

# Architecture specific extensions/prefixes
*.[568vq]
Expand Down Expand Up @@ -34,3 +35,6 @@ tramp
# Org-mode
.org-id-locations
*_archive

# We don't want app.yaml. It's a link that is picked during dev/prod.
app.yaml
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

*Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
list
home
====

A simple appengine application written in Go and AngularJS that provides the ability to make and share lists with others.
A simple appengine application written in Go and AngularJS that
provides the ability to make and share lists with others, store
recipes, and many other things that you might want use to keep your
home organized.
20 changes: 0 additions & 20 deletions app.yaml

This file was deleted.

36 changes: 36 additions & 0 deletions dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
application: lists-themarshians-com
version: 1
runtime: go
api_version: go1

handlers:
- url: /rest/.*
script: _go_app
login: required
auth_fail_action: unauthorized

- url: /
static_files: dev/index.html
upload: dev/index.html
login: required
mime_type: text/html; charset=utf-8

- url: /(.*\.css)
mime_type: text/css; charset=utf-8
static_files: dev/\1
upload: dev/(.*\.css)

- url: /(.*\.html)
mime_type: text/html; charset=utf-8
static_files: dev/\1
upload: dev/(.*\.html)

- url: /(.*\.ico)
mime_type: image/x-icon; charset=utf-8
static_files: dev/\1
upload: dev/(.*\.ico)

- url: /(.*\.js)
mime_type: text/javascript; charset=utf-8
static_files: dev/\1
upload: dev/(.*\.js)
51 changes: 51 additions & 0 deletions dev/css/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
Copyright 2013 Joshua Marsh. All rights reserved. Use of this
source code is governed by a BSD-style license that can be found in
the LICENSE file.
*/

body {
/* We add the padding for the fixed header. */
padding-top: 60px;
}

.all-scroll-cursor {
cursor: all-scroll;
}

.pointer-cursor {
cursor: pointer;
}

/* This is the style of a completed list item. */
.done-true {
text-decoration: line-through;
color: grey;
}

/* To enable sorting, we use a list instead of a table, so we
implement the table striping for lists. */
.list-striped > li {
padding: 8px;
border-top: 1px solid #dddddd;
}

.list-striped li:nth-child(odd) {
background-color: #f9f9f9;
}

/* This is used to make a reasonable amount of space between the forms
and buttons and the list items. */
.pad-bottom {
padding-bottom: 15px;
}

/* The text box is slightly off, so we move it up a bit. */
.editing-item {
margin-top: -5px;
}

/* The drag icon is slightly off, so we move it up a bit. */
.drag-icon {
margin-top: -5px;
}
Binary file added dev/favicon.ico
Binary file not shown.
117 changes: 117 additions & 0 deletions dev/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<!doctype html>
<html lang="en" data-ng-app="home">
<head>
<!--
Copyright 2013 Joshua Marsh. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<meta charset="utf-8">
<title>Home</title>
<meta name="description" content="List App">
<meta name="author" content="Joshua Marsh">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="/favicon.ico" />

<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap.min.css"
rel="stylesheet">

<!-- APP CSS -->
<link href="/css/main.css" rel="stylesheet">
<!-- APP CSS -->

<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-responsive.min.css"
rel="stylesheet">

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.min.js"></script>

<!-- APP JS -->
<script src="/js/rest/alerts.js"></script>
<script src="/js/rest/lists.js"></script>
<script src="/js/rest/recipes.js"></script>
<script src="/js/rest/user.js"></script>
<script src="/js/rest/rest.js"></script>
<script src="/js/routing.js"></script>
<script src="/js/alerts.js"></script>
<script src="/js/user.js"></script>
<script src="/js/lists/all.js"></script>
<script src="/js/lists/view.js"></script>
<script src="/js/recipes/all.js"></script>
<script src="/js/recipes/view.js"></script>
<script src="/js/date.js"></script>
<script src="/js/touch-punch.min.js"></script>
<!-- APP JS -->

<script async src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js"></script>
<script async src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<!-- This is the top navigation bar. -->
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse"
data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="#/">
Home
</a>
<div class="nav-collapse collapse">
<ul class="nav">
<li>
<a href="#/lists/">
<i class="icon-list icon-white"></i>
Lists
</a>
</li>
<li class="divider-vertical"></li>
<li>
<a href="#/recipes/">
<i class="icon-book icon-white"></i>
Recipes
</a>
</li>
<li class="divider-vertical"></li>
</ul>
<p class="navbar-text pull-right" data-ng-controller="UserCtrl">
Hello, {{user.Email}}!
<a href="{{user.LogoutURL}}">Logout</a>
</p>
</div><!--/.nav-collapse -->
</div>
</div>
</div>

<!-- This is where the alerts pop up. -->
<div data-ng-controller="AlertsCtrl">
<div class="row">
<div class="span6 offset3">
<div data-ng-repeat="alert in alerts" class="alert"
data-ng-class="{'': alert.type == 'warning',
'alert-success': alert.type == 'success',
'alert-info': alert.type == 'info',
'alert-error': alert.type == 'error'}">
<button type="button" class="close" data-dismiss="alert"
data-ng-click="remove($index)">&times;</button>
<strong>{{alert.strong}}</strong> {{alert.message}}
</div>
</div>
</div>
</div>
<!-- The main content of the page. -->
<div data-ng-view></div>
</div>

<!-- EMBED HERE -->

</body>
</html>
17 changes: 17 additions & 0 deletions dev/js/alerts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
Copyright 2013 Joshua Marsh. All rights reserved. Use of this
source code is governed by a BSD-style license that can be found in
the LICENSE file.
*/

// AlertsCtrl is the controller for part of the site that lists all of
// alert messages. The Alerts service keeps track of the alerts and
// this controller adds them as toast messages that can be removed.
function AlertsCtrl($scope, Alerts) {
$scope.alerts = Alerts.alerts;

$scope.remove = function(index) {
Alerts.remove(index);
};
}
AlertsCtrl.$inject = ['$scope', 'Alerts'];
File renamed without changes.
54 changes: 54 additions & 0 deletions dev/js/lists/all.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
Copyright 2013 Joshua Marsh. All rights reserved. Use of this
source code is governed by a BSD-style license that can be found in
the LICENSE file.
*/

// ListsCtrl is the controller for viewing all lists.
function ListsAllCtrl($scope, $location, Lists) {
// setcopy handles clicking the copy button. It prepares the key
// to be copied and the new name.
$scope.setcopy = function(key, name) {
$scope.copyKey = key;
$scope.copyName = "Copy of " + name;
};

// copy actually makes the copy of the list and redirects to the
// new list.
$scope.copy = function() {
Lists.get($scope.copyKey, function(l) {
l.Name = $scope.copyName;
Lists.create(l, function(nl) {
$location.path('/lists/view/' + nl.Key + '/');
});
});
};

// del prepare the delete values that might be used if the user
// verifies they want to delete an item.
$scope.del = function(index, key) {
$scope.delIndex = index;
$scope.delKey = key;
};

// sure performs the actual delete.
$scope.sure = function() {
Lists.del($scope.delKey, function() {
$scope.lists.splice($scope.delIndex, 1);
});
};

// save creates the new list and redirects to that list.
$scope.save = function() {
Lists.create({"Name": $scope.name}, function (l) {
$location.path('/lists/view/' + l.Key + '/');
});
};

// To start off, we should get all the lists.
Lists.getall(function (lists) {
$scope.lists = lists;
});

}
ListsAllCtrl.$inject = ['$scope', '$location', 'Lists'];
Loading

0 comments on commit 8ee4b56

Please sign in to comment.