Skip to content

Commit

Permalink
Merge pull request #1 from icub3d/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
icub3d authored Aug 1, 2016
2 parents 1d3bd45 + 2fca8a9 commit e27359b
Show file tree
Hide file tree
Showing 35 changed files with 1,206 additions and 350 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "dev/jsplus"]
path = dev/jsplus
url = [email protected]:icub3d/jsplus.git
23 changes: 17 additions & 6 deletions dev/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,32 @@
rel="stylesheet">

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.5/angular.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js"></script>
<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/js/bootstrap.min.js"></script>

<!-- APP JS -->
<script src="/js/rest/alerts.js"></script>
<script src="/js/rest/lists.js"></script>
<script src="/js/rest/links.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/hasfocus.js"></script>
<script src="/js/modal.js"></script>
<script src="/js/router.js"></script>
<script src="/jsplus/js/ng.js"></script>
<script src="/js/home.js"></script>
<script src="/js/alerts.js"></script>
<script src="/js/user.js"></script>
<script src="/js/home/home.js"></script>
<script src="/js/links/all.js"></script>
<script src="/js/links/edit.js"></script>
<script src="/js/lists/all.js"></script>
<script src="/js/lists/tables.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>
<script src="/jsplus/js/date.js"></script>
<script src="/jsplus/js/touch-punch.min.js"></script>
<!-- APP JS -->

</head>
Expand Down Expand Up @@ -84,6 +88,13 @@
</a>
</li>
<li class="divider-vertical"></li>
<li>
<a href="#/links/">
<i class="icon-globe icon-white"></i>
Links
</a>
</li>
<li class="divider-vertical"></li>
</ul>
<p class="navbar-text pull-right" data-ng-controller="UserCtrl">
Hello, {{user.Email}}!
Expand Down
136 changes: 0 additions & 136 deletions dev/js/date.js

This file was deleted.

29 changes: 0 additions & 29 deletions dev/js/hasfocus.js

This file was deleted.

4 changes: 1 addition & 3 deletions dev/js/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
the LICENSE file.
*/

var home = angular.module('home', ['rest']);
var home = angular.module('home', ['rest', 'jsplus']);

home.config(['$routeProvider', Router]);
home.directive('ngHasfocus', HasFocus);
home.directive('modal', Modal);
34 changes: 34 additions & 0 deletions dev/js/home/home.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
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.
*/

function HomeCtrl($scope, Links) {
$scope.static_links = [
{
Url: "#/lists/",
Name: "Lists",
Icon: "icon-list",
Description: "Lists of things to do, places to go, and " +
"people to see."
}, {
Url: "#/recipes/",
Name: "Recipes",
Icon: "icon-book",
Description: "An online recipe book."
}, {
Url: "#/links/",
Name: "Links",
Icon: "icon-globe",
Description: "An online repository of links."
}
];


$scope.links = $scope.static_links;
Links.search("*home*", function(links) {
$scope.links = $scope.static_links.concat(links);
});
}
HomeCtrl.$inject = ['$scope', 'Links'];
42 changes: 42 additions & 0 deletions dev/js/links/all.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
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.
*/

// LinksCtrl is the controller for viewing all links.
function LinksAllCtrl($scope, $location, Links) {
// 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.data.index = index;
$scope.data.key = key;
};

// sure performs the actual delete.
$scope.sure = function() {
Links.del($scope.data.key, function() {
$scope.links.splice($scope.data.index, 1);
});
};

// save creates the new link and redirects to that link.
$scope.create = function() {
$location.path('/links/new/');
};

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


$scope.search = function() {
Links.search($scope.data.search, function (links) {
$scope.links = links;
});
};

$scope.data = {};
}
LinksAllCtrl.$inject = ['$scope', '$location', 'Links'];
39 changes: 39 additions & 0 deletions dev/js/links/edit.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
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.
*/

// LinksEditCtrl is the controller for viewing and updating links.
function LinksEditCtrl($scope, $routeParams, $location, Links) {

$scope.back = function () {
history.back();
};

// save saves changes to the link and update the link.
$scope.save = function() {
if ($scope.link.Key == undefined || $scope.link.Key == null ||
$scope.link.Key == "")
{
Links.create($scope.link, function(l){
$location.path("/links/");
});

} else {
Links.save($scope.link, function(l){
$location.path("/links/");
});
}
};

// Get the link.
$scope.link = {"Tags": []};
if ($routeParams.id != "new") {
Links.get($routeParams.id, function(l) {
$scope.link = l;
});
}
}

LinksEditCtrl.$inject = ['$scope', '$routeParams', '$location', 'Links'];
Loading

0 comments on commit e27359b

Please sign in to comment.