Skip to content
This repository was archived by the owner on Oct 26, 2021. It is now read-only.

Commit 1fc8e45

Browse files
committed
Fix stand alone app.
1 parent 5a9c05f commit 1fc8e45

File tree

6 files changed

+16
-5
lines changed

6 files changed

+16
-5
lines changed

app/scripts/app.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ var ploneModule = angular.module(
1414
ploneModule.config(['$routeProvider', '$locationProvider',
1515
function($routeProvider, $locationProvider) {
1616
'use strict';
17-
$locationProvider.html5Mode(true);
17+
$locationProvider.html5Mode({
18+
enabled: true,
19+
requireBase: false
20+
});
1821
$locationProvider.hashPrefix('!');
1922
$routeProvider.when('/contact-info', {
2023
controller: 'ContactInfoFormController',

app/scripts/mock-backend.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,11 @@ angular.module('e2e-mocks', ['ngMockE2E']).run(function($httpBackend) {
7777
};
7878
var traversal_re = new RegExp('\\+\\+api\\+\\+v1/traversal\\?path=' + value.path);
7979
$httpBackend.whenGET(traversal_re).respond(traversal);
80-
8180
});
8281

82+
var traversal = site_structure[0];
83+
var traversal_re = new RegExp('\\+\\+api\\+\\+v1/traversal\\?path=.*');
84+
$httpBackend.whenGET(traversal_re).respond(traversal);
8385

8486
// --- PASS THROUGH TEMPLATES ----------------------------------------------
8587
var templates_re = new RegExp('.*.tpl.html$');

gulpfile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ gulp.task('styles', function(){
5353
.pipe(sourcemaps.init())
5454
.pipe(less())
5555
.pipe(sourcemaps.write())
56+
.pipe(gulp.dest('app/styles/'))
5657
.pipe(gulp.dest('src/plone/app/angularjs/app/styles/'));
5758
});
5859

src/plone/app/angularjs/app/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<title>Plone + AngularJS</title>
55
<meta charset="utf-8" />
6-
<base tal:attributes="href view/base">
6+
<base href="/" tal:attributes="href view/base">
77
<link rel="stylesheet" href="++theme++plone.app.angularjs/bower_components/bootstrap/dist/css/bootstrap.min.css">
88
<link rel="stylesheet" href="++theme++plone.app.angularjs/bower_components/angular-loading-bar/build/loading-bar.min.css">
99
<link rel="stylesheet" href="++theme++plone.app.angularjs/bower_components/angular-ui-select/dist/select.min.css">

src/plone/app/angularjs/app/scripts/app.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ var ploneModule = angular.module(
1414
ploneModule.config(['$routeProvider', '$locationProvider',
1515
function($routeProvider, $locationProvider) {
1616
'use strict';
17-
$locationProvider.html5Mode(true);
17+
$locationProvider.html5Mode({
18+
enabled: true,
19+
requireBase: false
20+
});
1821
$locationProvider.hashPrefix('!');
1922
$routeProvider.when('/contact-info', {
2023
controller: 'ContactInfoFormController',

src/plone/app/angularjs/app/scripts/mock-backend.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,11 @@ angular.module('e2e-mocks', ['ngMockE2E']).run(function($httpBackend) {
7777
};
7878
var traversal_re = new RegExp('\\+\\+api\\+\\+v1/traversal\\?path=' + value.path);
7979
$httpBackend.whenGET(traversal_re).respond(traversal);
80-
8180
});
8281

82+
var traversal = site_structure[0];
83+
var traversal_re = new RegExp('\\+\\+api\\+\\+v1/traversal\\?path=.*');
84+
$httpBackend.whenGET(traversal_re).respond(traversal);
8385

8486
// --- PASS THROUGH TEMPLATES ----------------------------------------------
8587
var templates_re = new RegExp('.*.tpl.html$');

0 commit comments

Comments
 (0)