|
1 |
| -/*! forms-angular 2014-10-14 */ |
| 1 | +/*! forms-angular 2015-02-26 */ |
2 | 2 | 'use strict';
|
3 | 3 |
|
4 |
| -formsAngular.controller('AnalysisCtrl', ['$filter', '$scope', '$http', '$location', 'routingService', |
5 |
| - function ($filter, $scope, $http, $location, routingService) { |
| 4 | +formsAngular.controller('AnalysisCtrl', ['$filter', '$scope', '$http', '$location', 'cssFrameworkService', 'routingService', |
| 5 | + function ($filter, $scope, $http, $location, cssFrameworkService, routingService) { |
6 | 6 | /*jshint newcap: false */
|
7 | 7 | var firstTime = true,
|
8 | 8 | pdfPlugIn = new ngGridPdfExportPlugin({inhibitButton: true}),
|
9 | 9 | csvPlugIn = new ngGridCsvExportPlugin({inhibitButton: true});
|
10 | 10 | /*jshint newcap: true */
|
11 | 11 |
|
12 | 12 | angular.extend($scope, routingService.parsePathFunc()($location.$$path));
|
| 13 | + |
13 | 14 | $scope.reportSchema = {};
|
14 | 15 | $scope.gridOptions = {
|
15 | 16 | columnDefs: 'reportSchema.columnDefs',
|
@@ -164,6 +165,11 @@ formsAngular.controller('AnalysisCtrl', ['$filter', '$scope', '$http', '$locatio
|
164 | 165 | $scope.report = data.report;
|
165 | 166 | $scope.reportSchema = data.schema;
|
166 | 167 | $scope.reportSchema.title = $scope.reportSchema.title || $scope.modelName;
|
| 168 | + $scope.reportSchema.title = $scope.reportSchema.title.replace(/\|.+?\|/g, function (match) { |
| 169 | + var param = match.slice(1, -1); |
| 170 | + var isParamTest = /\((.+)\)/.exec(param); |
| 171 | + return isParamTest ? $scope.reportSchema.params[isParamTest[1]].value : ''; |
| 172 | + }); |
167 | 173 |
|
168 | 174 | if (firstTime) {
|
169 | 175 | firstTime = false;
|
@@ -205,7 +211,7 @@ formsAngular.controller('AnalysisCtrl', ['$filter', '$scope', '$http', '$locatio
|
205 | 211 | type: thisPart.type || 'text',
|
206 | 212 | required: true,
|
207 | 213 | add: thisPart.add || undefined,
|
208 |
| - size: thisPart.size || 'small' |
| 214 | + size: thisPart.size || (cssFrameworkService.frameWork === 'bs3' ? 'large' : 'medium') |
209 | 215 | });
|
210 | 216 | if (thisPart.type === 'select') {
|
211 | 217 | // TODO: Remove when select and select2 is modified during the restructure
|
|
0 commit comments