Commit 275095ae authored by Davide Vernassa's avatar Davide Vernassa
Browse files

added calculated field when no dataset is present

parent 62296d33
......@@ -57,7 +57,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
$scope.columnRegex = /(?:\[kn-column=\'([a-zA-Z0-9\_\-]+)\'(?:\s+row=\'(\d*)\')?(?:\s+aggregation=\'(AVG|MIN|MAX|SUM|COUNT_DISTINCT|COUNT|DISTINCT COUNT)\')?(?:\s+precision=\'(\d)\')?\])/g;
$scope.aggregationRegex = /(?:\[kn-column=[\']{1}([a-zA-Z0-9\_\-]+)[\']{1}(?:\s+aggregation=[\']{1}(AVG|MIN|MAX|SUM|COUNT_DISTINCT|COUNT|DISTINCT COUNT)[\']{1}){1}(?:\s+precision=\'(\d)\')?\])/g;
$scope.paramsRegex = /(?:\[kn-parameter=[\'\"]{1}([a-zA-Z0-9\_\-]+)[\'\"]{1}\])/g;
$scope.calcRegex = /(?:\[kn-calc=\"([\d\D]*)\"(?:\s+precision=\'(\d)\')?\])/g;
$scope.calcRegex = /(?:\[kn-calc=\(([\[\]\w\s\-\=\>\<\"\'\!\+\*\/\%\&\|]*)\)(?:\s+precision=\'(\d)\')?\])/g;
$scope.repeatIndexRegex = /\[kn-repeat-index\]/g;
$scope.gt = /(\<.*kn-.*=["].*)(>)(.*["].*\>)/g;
$scope.lt = /(\<.*kn-.*=["].*)(<)(.*["].*\>)/g;
......@@ -102,7 +102,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
});
}else {
$scope.trustedCss = $sce.trustAsHtml('<style>'+$scope.ngModel.cssToRender+'</style>');
$scope.trustedHtml = $sce.trustAsHtml($scope.ngModel.htmlToRender);
if($scope.ngModel.htmlToRender){
$scope.trustedHtml = $sce.trustAsHtml($scope.parseCalc($scope.ngModel.htmlToRender));
}
$scope.hideWidgetSpinner();
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment