Limit the editing functionality to only the text

This commit is contained in:
Kazuhito Hokamura 2016-10-05 22:03:39 +09:00
parent 83ffd915c8
commit 0530b5fe1e
3 changed files with 0 additions and 18 deletions

View File

@ -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();
};

View File

@ -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">

View File

@ -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()