Skip to content

Commit c8dc568

Browse files
committed
Audit plugin
1 parent bf3102a commit c8dc568

File tree

5 files changed

+3643
-11
lines changed

5 files changed

+3643
-11
lines changed

dist/forms-angular.js

Lines changed: 3619 additions & 1 deletion
Large diffs are not rendered by default.

gulpfile.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,17 @@ gulp.task('build', function(callback) {
4848
callback);
4949
});
5050

51+
gulp.task('debugBuild', function(callback) {
52+
runSequence(
53+
'compile',
54+
'templates',
55+
'concatTemplates',
56+
'annotate',
57+
'tidy',
58+
'less',
59+
callback);
60+
});
61+
5162
gulp.task('compile', function(callback) {
5263
runSequence(
5364
'compileServerSide',

js/services/fng-routes.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -163,27 +163,30 @@ module fng.services {
163163
}
164164
}
165165

166-
var locationParts = locationSplit.length;
166+
let locationParts = locationSplit.length;
167167
if (locationSplit[1] === 'analyse') {
168168
lastObject.analyse = true;
169169
lastObject.modelName = locationSplit[2];
170170
lastObject.reportSchemaName = locationParts >= 4 ? locationSplit[3] : null;
171171
} else {
172172
lastObject.modelName = locationSplit[1];
173-
var lastParts = [locationSplit[locationParts - 1], locationSplit[locationParts - 2]];
174-
var newPos = lastParts.indexOf('new');
175-
var editPos;
173+
let lastParts = [locationSplit[locationParts - 1], locationSplit[locationParts - 2]];
174+
let newPos = lastParts.indexOf('new');
175+
let actionPos;
176176
if (newPos === -1) {
177-
editPos = lastParts.indexOf('edit');
178-
if (editPos !== -1) {
179-
locationParts -= (2 + editPos);
177+
actionPos = postActions.reduce((previousValue, currentValue) => {
178+
let pos = lastParts.indexOf(currentValue);
179+
return pos > -1 ? pos : previousValue
180+
}, -1);
181+
if (actionPos !== -1) {
182+
locationParts -= (2 + actionPos);
180183
lastObject.id = locationSplit[locationParts];
181184
}
182185
} else {
183186
lastObject.newRecord = true;
184187
locationParts -= (1 + newPos);
185188
}
186-
if (editPos === 1 || newPos === 1) {
189+
if (actionPos === 1 || newPos === 1) {
187190
lastObject.tab = lastParts[0];
188191
}
189192
if (locationParts > 2) {
@@ -192,6 +195,7 @@ module fng.services {
192195
}
193196
}
194197
return lastObject;
198+
195199
};
196200
///**
197201
// * DominicBoettger wrote:

server/data_form.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1095,4 +1095,3 @@ DataForm.prototype.entityList = function () {
10951095
});
10961096
}, this);
10971097
};
1098-
//# sourceMappingURL=data_form.js.map

server/data_form.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ DataForm.prototype.getListFields = function (resource: Resource, doc: Document,
156156
* Registers all REST routes with the provided `app` object.
157157
*/
158158
DataForm.prototype.registerRoutes = function () {
159-
const search = 'search/', schema = 'schema/', report = 'report/', resourceName = ':resourceName', id = '/:id'
159+
const search = 'search/', schema = 'schema/', report = 'report/', resourceName = ':resourceName', id = '/:id';
160160
this.app.get.apply(this.app, processArgs(this.options, ['models', this.models()]));
161161

162162
this.app.get.apply(this.app, processArgs(this.options, [search + resourceName, this.search()]));

0 commit comments

Comments
 (0)