This commit is contained in:
Arik Fraimovich 2014-03-04 10:14:36 +02:00
parent 6d93ccc0d0
commit a5971b0c69
2 changed files with 3 additions and 2 deletions

View File

@ -45,7 +45,7 @@
this.$get = ['$resource', function($resource) {
var Visualization = $resource('/api/visualizations/:id', {id: '@id'});
Visualization.visualization = this.visualizations;
Visualization.visualizations = this.visualizations;
Visualization.visualizationTypes = this.visualizationTypes;
Visualization.renderVisualizationsTemplate = this.getSwitchTemplate('rendererTemplate');
Visualization.editorTemplate = this.getSwitchTemplate('editorTemplate');
@ -97,6 +97,7 @@
var unwatch = scope.$watch('query', function (q) {
if (q && q.id) {
unwatch();
scope.visualization = {
'query_id': q.id,
'type': Visualization.defaultVisualization.type,

View File

@ -1,7 +1,7 @@
<form role="form" name="visForm" ng-submit="submit()">
<div class="form-group">
<label class="control-label">Name</label>
<input name="name" type="text" class="form-control" ng-model="visualization.name" placeholder="{{visualization.type}}">
<input name="name" type="text" class="form-control" ng-model="visualization.name" placeholder="{{visualization.type | capitalize}}">
</div>
<div class="form-group">