Plugin visibility defaults to value of rootScope.visible

And plugin content is shown if it has to be visible
This commit is contained in:
David Cormier 2014-07-25 17:34:29 -04:00
parent dc1ce08800
commit d2a30c1d13

View file

@ -1300,7 +1300,7 @@ weechat.config(['$routeProvider',
]);
weechat.directive('plugin', function() {
weechat.directive('plugin', function($rootScope) {
/*
* Plugin directive
* Shows additional plugin content
@ -1316,6 +1316,8 @@ weechat.directive('plugin', function() {
$scope.displayedContent = "";
$scope.plugin.visible = $rootScope.visible;
$scope.hideContent = function() {
$scope.plugin.visible = false;
};
@ -1339,6 +1341,10 @@ weechat.directive('plugin', function() {
};
setTimeout(scroll, 100);
};
if ($scope.plugin.visible) {
$scope.showContent();
}
}
};
});