-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from icub3d/develop
Develop
- Loading branch information
Showing
35 changed files
with
1,206 additions
and
350 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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']; |
Oops, something went wrong.