send id to category and details view
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
function PackagesCategoryController($scope) {
|
||||
function PackagesCategoryController($scope, $routeParams) {
|
||||
|
||||
var vm = this;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
function PackageDetailsController($scope) {
|
||||
function PackageDetailsController($scope, $routeParams) {
|
||||
|
||||
var vm = this;
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
vm.categories = [
|
||||
{
|
||||
"id": 1,
|
||||
"icon": "icon-male-and-female",
|
||||
"name": "All",
|
||||
"active": true
|
||||
@@ -23,22 +24,27 @@
|
||||
"active": false
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"icon": "icon-molecular-network",
|
||||
"name": "Backoffice extensions"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"icon": "icon-brackets",
|
||||
"name": "Developer tools"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"icon": "icon-wand",
|
||||
"name": "Starter kits"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"icon": "icon-medal",
|
||||
"name": "Umbraco Pro"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"icon": "icon-wrench",
|
||||
"name": "Website utilities"
|
||||
}
|
||||
@@ -46,6 +52,7 @@
|
||||
|
||||
vm.packages = [
|
||||
{
|
||||
"id": 1,
|
||||
"name": "uSightly",
|
||||
"description": "An HTML5 audio player based on jPlayer",
|
||||
"karma": "1",
|
||||
@@ -53,6 +60,7 @@
|
||||
"icon":"https://our.umbraco.org/media/wiki/150283/635768313097111400_usightlylogopng.png?bgcolor=fff&height=154&width=281&format=png"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "Kill IE6",
|
||||
"description": "A simple port of the IE6 warning script (http://code.google.com/p/ie6-upgrade-warning/) to use in your Umbraco websites.",
|
||||
"karma": "11",
|
||||
@@ -60,6 +68,7 @@
|
||||
"icon":"https://our.umbraco.org/media/wiki/9138/634697622367666000_offroadcode-100x100.png?bgcolor=fff&height=154&width=281&format=png"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "Examine Media Indexer",
|
||||
"description": "CogUmbracoExamineMediaIndexer",
|
||||
"karma": "3",
|
||||
@@ -67,6 +76,7 @@
|
||||
"icon":"https://our.umbraco.org/media/wiki/50703/634782902373558000_cogworks.jpg?bgcolor=fff&height=154&width=281&format=png"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "SVG Icon Picker",
|
||||
"description": "A picker, for picking icons from an SVG spritesheet.",
|
||||
"karma": "5",
|
||||
@@ -74,6 +84,7 @@
|
||||
"icon":"https://our.umbraco.org/media/wiki/154472/635997115126742822_logopng.png?bgcolor=fff&height=154&width=281&format=png"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "Pipeline CRM",
|
||||
"description": "Pipeline is a social CRM that lives in Umbraco back-office. It tracks opportunities and helps teams collaborate with timelines and tasks. It stores information about your customers and your interactions with them. It integrates with your website, capturing opportunities from forms and powering personal portals.",
|
||||
"karma": "3",
|
||||
@@ -81,6 +92,7 @@
|
||||
"icon":"https://our.umbraco.org/media/wiki/152476/635917291068518788_pipeline-crm-logopng.png?bgcolor=fff&height=154&width=281&format=png"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"name": "CodeMirror",
|
||||
"description": "CodeMirror Editor for Umbraco",
|
||||
"karma": "1",
|
||||
@@ -92,14 +104,14 @@
|
||||
function selectCategory(category) {
|
||||
var section = $route.current.params.section;
|
||||
var tree = $route.current.params.tree;
|
||||
var path = "/" + section + "/" + tree + "/category";
|
||||
var path = "/" + section + "/" + tree + "/category/" + category.id;
|
||||
$location.path(path);
|
||||
}
|
||||
|
||||
function showPackageDetails(selectedPackage) {
|
||||
var section = $route.current.params.section;
|
||||
var tree = $route.current.params.tree;
|
||||
var path = "/" + section + "/" + tree + "/details";
|
||||
var path = "/" + section + "/" + tree + "/details/" + selectedPackage.id;
|
||||
$location.path(path);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user