mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 09:28:51 +00:00
Limit the editing functionality to only the text
This commit is contained in:
parent
83ffd915c8
commit
0530b5fe1e
@ -194,17 +194,6 @@
|
||||
templateUrl: '/views/edit_text_box_form.html',
|
||||
scope: $scope,
|
||||
controller: ['$scope', '$modalInstance', 'growl', function($scope, $modalInstance, growl) {
|
||||
$scope.widgetSizes = [{
|
||||
name: 'Regular',
|
||||
value: 1
|
||||
}, {
|
||||
name: 'Double',
|
||||
value: 2
|
||||
}, {
|
||||
name: 'Hidden',
|
||||
value: 0
|
||||
}];
|
||||
|
||||
$scope.close = function() {
|
||||
$modalInstance.close();
|
||||
};
|
||||
|
@ -10,12 +10,6 @@
|
||||
<strong>Preview:</strong>
|
||||
<p ng-bind-html="widget.text | markdown"></p>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="">Widget Size</label>
|
||||
<select class="form-control" ng-model="widget.width"
|
||||
ng-options="c.value as c.name for c in widgetSizes"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
|
@ -57,7 +57,6 @@ class WidgetResource(BaseResource):
|
||||
require_admin_or_owner(widget.dashboard.user_id)
|
||||
widget_properties = request.get_json(force=True)
|
||||
widget.text = widget_properties['text']
|
||||
widget.width = widget_properties['width']
|
||||
widget.save()
|
||||
|
||||
return widget.to_dict()
|
||||
|
Loading…
Reference in New Issue
Block a user