Permalink
Browse files

uprava nazvu sluzby page

  • Loading branch information...
1 parent 41ae37c commit ebe146ce8927a9af5c861a87adb04d990ac79737 @JakubMrozek committed Nov 29, 2012
Showing with 16 additions and 16 deletions.
  1. +1 −1 app.js
  2. +4 −4 public/js/app.js
  3. +10 −10 public/js/controllers.js
  4. +1 −1 public/js/services.js
View
2 app.js
@@ -6,7 +6,7 @@
var express = require('express');
var resource = require('express-resource');
var config = require('./config');
-var app = express();
+var app = express();
/**
* Konfigurace aplikace a spojeni s databazi.
View
@@ -1,15 +1,15 @@
'use strict';
angular.module('zdrojak', ['zdrojakServices'])
- .config(['$routeProvider', function($routeProvider) {
+ .config(function($routeProvider) {
$routeProvider.when('/', {templateUrl: '/partials/index/index.html', controller: IndexIndexCtrl});
$routeProvider.when('/pages', {templateUrl: '/partials/pages/index.html', controller: PagesIndexCtrl});
$routeProvider.when('/pages/new/page', {templateUrl: '/partials/pages/new.html', controller: PagesNewCtrl});
$routeProvider.when('/pages/:page', {templateUrl: '/partials/pages/show.html', controller: PagesShowCtrl});
$routeProvider.when('/pages/:page/edit', {templateUrl: '/partials/pages/edit.html', controller: PagesEditCtrl});
$routeProvider.otherwise({redirectTo: '/'});
- }])
- .config(['$locationProvider', function($locationProvider) {
+ })
+ .config(function($locationProvider) {
$locationProvider.html5Mode(true)
}
-]);
+);
View
@@ -5,38 +5,38 @@ function IndexIndexCtrl() {}
//seznam vsech stranek
-function PagesIndexCtrl($scope, Page) {
- $scope.pages = Page.index();
+function PagesIndexCtrl($scope, page) {
+ $scope.pages = page.index();
}
//vytvoreni stranky
-function PagesNewCtrl($scope, $location, Page) {
+function PagesNewCtrl($scope, $location, page) {
$scope.page = {};
$scope.create = function() {
- Page.create($scope.page, function(){
+ page.create($scope.page, function(){
$location.path('/pages');
});
}
}
//detail stranky
-function PagesShowCtrl($scope, $routeParams, $location, Page) {
- $scope.page = Page.show({page: $routeParams.page});
+function PagesShowCtrl($scope, $routeParams, $location, page) {
+ $scope.page = page.show({page: $routeParams.page});
$scope.remove = function() {
- Page.remove({page: $routeParams.page}, function(){
+ page.remove({page: $routeParams.page}, function(){
$location.path('/pages');
});
}
}
//editace stranky
-function PagesEditCtrl($scope, $routeParams, $location, Page) {
- $scope.page = Page.show({page: $routeParams.page});
+function PagesEditCtrl($scope, $routeParams, $location, page) {
+ $scope.page = page.show({page: $routeParams.page});
$scope.update = function() {
- Page.update({page: $routeParams.page}, $scope.page, function(){
+ page.update({page: $routeParams.page}, $scope.page, function(){
$location.path('/pages');
});
}
View
@@ -3,7 +3,7 @@
/* Services */
angular.module('zdrojakServices', ['ngResource'])
- .factory('Page', function($resource){
+ .factory('page', function($resource){
return $resource('/api/v1/pages/:page', {}, {
index: {method:'GET', isArray:true},
show: {method:'GET'},

0 comments on commit ebe146c

Please sign in to comment.