Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/canvas-view/examples/canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,16 @@
</file>

<file name="script.js">
angular.module( 'patternfly.canvas.demo' ).controller( 'CanvasDemoCtrl', function( $scope ) {
angular.module( 'patternfly.canvas.demo' ).controller( 'CanvasDemoCtrl', function( $scope, $window ) {
var imagePath = $window.IMAGE_PATH || "img";
$scope.chartDataModel = {
"nodes": [
{
"name": "Nuage",
"x": 345,
"y": 67,
"id": 1,
"image": "/img/OpenShift-logo.svg",
"image": imagePath + "/OpenShift-logo.svg",
"width": 150,
"bundle": true,
"backgroundColor": "#fff",
Expand All @@ -139,7 +140,7 @@
"x": 100,
"y": 290,
"id": 2,
"image": "/img/kubernetes.svg",
"image": imagePath + "/kubernetes.svg",
"width": 150,
"backgroundColor": "#fff",
"validConnectionTypes": ["storage"],
Expand Down
11 changes: 6 additions & 5 deletions src/canvas-view/examples/canvasEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,16 @@
</file>

<file name="script.js">
angular.module( 'patternfly.canvaseditor.demo' ).controller( 'CanvasEditorDemoCtrl', function( $scope, $filter ) {
angular.module( 'patternfly.canvaseditor.demo' ).controller( 'CanvasEditorDemoCtrl', function( $scope, $filter, $window ) {
var imagePath = $window.IMAGE_PATH || "img";
$scope.chartDataModel = {
"nodes": [
{
"name": "Nuage",
"x": 345,
"y": 67,
"id": 1,
"image": "/img/OpenShift-logo.svg",
"image": imagePath + "/OpenShift-logo.svg",
"width": 150,
"bundle": true,
"backgroundColor": "#fff",
Expand All @@ -107,7 +108,7 @@
"x": 100,
"y": 290,
"id": 2,
"image": "/img/kubernetes.svg",
"image": imagePath + "/kubernetes.svg",
"width": 150,
"backgroundColor": "#fff",
"validConnectionTypes": ["storage"],
Expand Down Expand Up @@ -236,12 +237,12 @@
{
"name": "Nuage",
"id": 10000000000004,
"image": "/img/OpenShift-logo.svg"
"image": imagePath + "/OpenShift-logo.svg"
},
{
"name": "Vmware",
"id": 10000000000010,
"image": "/img/kubernetes.svg"
"image": imagePath + "/kubernetes.svg"
}
]
},
Expand Down
7 changes: 4 additions & 3 deletions src/card/aggregate-status/aggregate-status-card.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@
</file>

<file name="script.js">
angular.module( 'patternfly.card' ).controller( 'CardDemoCtrl', function( $scope ) {
angular.module( 'patternfly.card' ).controller( 'CardDemoCtrl', function( $scope, $window ) {
var imagePath = $window.IMAGE_PATH || "img";
Copy link
Copy Markdown
Member

@jeff-phillips-18 jeff-phillips-18 Sep 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should be consistent and use '/img'

Copy link
Copy Markdown
Member Author

@bleathem bleathem Sep 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was preserving what was previously present. Would you say img is expected to be correct over /img

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I would say 'img' is probably better, I'd just rather see consistency.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Standardised on img.

$scope.status = {
"title":"Nodes",
"count":793,
Expand All @@ -92,12 +93,12 @@
"count":3,
"notifications":[
{
"iconImage":"img/kubernetes.svg",
"iconImage": imagePath + "/kubernetes.svg",
"count":1,
"href":"#"
},
{
"iconImage":"img/OpenShift-logo.svg",
"iconImage": imagePath + "/OpenShift-logo.svg",
"count":2,
"href":"#"
}
Expand Down
5 changes: 3 additions & 2 deletions src/card/info-status/info-status-card.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
</file>

<file name="script.js">
angular.module( 'patternfly.card' ).controller( 'CardDemoCtrl', function( $scope ) {
angular.module( 'patternfly.card' ).controller( 'CardDemoCtrl', function( $scope, $window ) {
var imagePath = $window.IMAGE_PATH || "img";
$scope.infoStatus = {
"title":"TinyCore-local",
"href":"#",
Expand All @@ -50,7 +51,7 @@
};

$scope.infoStatusTitless = {
"iconImage":"img/OpenShift-logo.svg",
"iconImage": imagePath + "/OpenShift-logo.svg",
"info":[
"Infastructure: VMware",
"Vmware: 1 CPU (1 socket x 1 core), 1024 MB",
Expand Down
8 changes: 4 additions & 4 deletions src/navigation/application-launcher.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<nav class="navbar navbar-default navbar-pf" role="navigation">
<div class="navbar-header">
<a class="navbar-brand" href="/">
<img src="img/brand.svg" alt="PatternFly Enterprise Application">
<img src="{{imagePath}}/brand.svg" alt="PatternFly Enterprise Application">
</a>
</div>
<div class="collapse navbar-collapse navbar-collapse-1">
Expand Down Expand Up @@ -77,8 +77,9 @@
</div>
</file>
<file name="script.js">
angular.module('patternfly.navigation').controller('applicationLauncherController', ['$scope',
function ($scope) {
angular.module('patternfly.navigation').controller('applicationLauncherController', ['$scope', '$window',
function ($scope, $window) {
$scope.imagePath = $window.IMAGE_PATH || "img";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and again...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...again, I was preserving what was previously present. Happy to converge on a single path with this PR though.

$scope.navigationItems = [
{
title: "Recteque",
Expand Down Expand Up @@ -130,4 +131,3 @@ angular.module('patternfly.navigation').component('pfApplicationLauncher', {
ctrl.$id = $scope.$id;
}
});