Submodules
This commit is contained in:
@@ -89,7 +89,7 @@ class ComponentView {
|
||||
|
||||
$scope.getUrl = function() {
|
||||
var url = componentManager.urlForComponent($scope.component);
|
||||
$scope.component.runningLocally = url !== ($scope.component.url || $scope.component.hosted_url);
|
||||
$scope.component.runningLocally = (url !== $scope.component.url) && url !== ($scope.component.hosted_url);
|
||||
return url;
|
||||
}
|
||||
|
||||
|
||||
@@ -66,6 +66,20 @@ class EditorMenu {
|
||||
$scope.defaultEditor = null;
|
||||
}
|
||||
|
||||
$scope.shouldDisplayRunningLocallyLabel = function(component) {
|
||||
if(!component.runningLocally) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(component == $scope.selectedEditor) {
|
||||
return true;
|
||||
} else if(component.area == "editor-stack") {
|
||||
return $scope.stackComponentEnabled(component);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$scope.stackComponentEnabled = function(component) {
|
||||
return component.active && !component.isExplicitlyDisabledForItem($scope.currentItem);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user