Plugin visibility defaults to value of rootScope.visible
And plugin content is shown if it has to be visible
This commit is contained in:
parent
dc1ce08800
commit
d2a30c1d13
1 changed files with 7 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue