Adding behavior into the controller.

This commit is contained in:
jvasquez
2015-09-09 16:33:51 -03:00
parent 75d3a63070
commit 176fd16e95
2 changed files with 4 additions and 4 deletions

View File

@@ -126,9 +126,9 @@
var WidgetCtrl = function($scope, $location, Events, Query) {
$scope.disableWidget = {'visibility': 'visible'};
$scope.checkWidth = function (width) {
if (width == 0)
$scope.disableWidget = {'visibility': 'hidden'};
if ($scope.widget.width == 0) {
$scope.disableWidget = {'visibility': 'hidden'};
}
$scope.deleteWidget = function() {

View File

@@ -58,7 +58,7 @@
</div>
</div>
<div class="panel panel-default rd-widget-textbox" ng-init="checkWidth(widget.width)" ng-style="disableWidget" ng-if="type=='textbox'" ng-mouseenter="showControls = true" ng-mouseleave="showControls = false">
<div class="panel panel-default rd-widget-textbox" ng-style="widget.disableWidget" ng-if="type=='textbox'" ng-mouseenter="showControls = true" ng-mouseleave="showControls = false">
<div class="panel-body">
<div class="row">
<div class="col-lg-11">