This repository has been archived by the owner on Sep 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jan Feuerbach
committed
Feb 9, 2017
1 parent
17776f9
commit b15e434
Showing
12 changed files
with
164 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
{ | ||
"name": "Icon Map", | ||
"description": "Shows devices on a map using an icon for the device type.", | ||
"ngModules": [ "myapplication.iconmap" ], | ||
"js": [ | ||
"iconmap.config.js", | ||
"iconmap.controller.js" | ||
"ngModules": [ | ||
"myapp.iconmap" | ||
], | ||
"imports": [], | ||
"css": [], | ||
"copy": [] | ||
"js": [ | ||
"iconmap.module.js", | ||
"iconmap.config.js", | ||
"iconmap.controller.js" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,25 @@ | ||
(function wrapper() { | ||
(function () { | ||
'use strict'; | ||
/* global angular */ | ||
|
||
var app = angular.module('myapplication.iconmap', []); | ||
angular | ||
.module('myapp.iconmap') | ||
.config(configure); | ||
|
||
configure.$inject = [ 'c8yComponentsProvider', 'gettext' ]; | ||
app.config(configure); | ||
configure.$inject = [ | ||
'c8yComponentsProvider', | ||
'gettext' | ||
]; | ||
|
||
function configure(c8yComponentsProvider, gettext) { | ||
c8yComponentsProvider.add({ | ||
name: 'Icon Map', | ||
nameDisplay: gettext('Icon Map'), | ||
description: gettext('Displays a map with icons for devices instead of markers'), | ||
templateUrl: ':::PLUGIN_PATH:::/views/iconmap.main.html', | ||
function configure( | ||
c8yComponentsProvider, | ||
gettext | ||
) { | ||
c8yComponentsProvider.add({ // adds a menu item to the widget menu list with ... | ||
name: 'Icon Map', // ... the name *"Icon Map"* | ||
nameDisplay: gettext('Icon Map'), // ... the displayed name *"Icon Map"* | ||
description: gettext('Displays a map with icons for devices instead of markers'), // ... a description | ||
templateUrl: ':::PLUGIN_PATH:::/views/iconmap.main.html', // ... displaying *"iconmap.main.html"* when added to the dashboard | ||
options: { noDeviceTarget: true } | ||
}); | ||
} | ||
})(); | ||
}()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
(function () { | ||
'use strict'; | ||
|
||
angular.module('myapp.iconmap', []); | ||
}()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,24 @@ | ||
(function wrapper() { | ||
(function () { | ||
'use strict'; | ||
/* global angular */ | ||
|
||
var app = angular.module('myapplication.weather', [ 'myapplication.weatherService' ]); | ||
angular | ||
.module('myapp.weather', [ 'myapp.weatherService' ]) | ||
.config(configure); | ||
|
||
configure.$inject = [ 'c8yComponentsProvider', 'gettext' ]; | ||
app.config(configure); | ||
configure.$inject = [ | ||
'c8yComponentsProvider', | ||
'gettext' | ||
]; | ||
|
||
function configure(c8yComponentsProvider, gettext) { | ||
c8yComponentsProvider.add({ | ||
name: 'weather', | ||
nameDisplay: gettext('Weather'), | ||
description: gettext('Shows the current weather at the location of a device'), | ||
templateUrl: ':::PLUGIN_PATH:::/views/weather.main.html' | ||
function configure( | ||
c8yComponentsProvider, | ||
gettext | ||
) { | ||
c8yComponentsProvider.add({ // adds a menu item to the widget menu list with ... | ||
name: 'weather', // ... the name *"weather"* | ||
nameDisplay: gettext('Weather'), // ... the displayed name *"weather"* | ||
description: gettext('Shows the current weather at the location of a device'), // ... a description | ||
templateUrl: ':::PLUGIN_PATH:::/views/weather.main.html' // ... displaying *"iconmap.main.html"* when added to the dashboard | ||
}); | ||
} | ||
})(); | ||
}()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,30 @@ | ||
(function wrapper() { | ||
(function () { | ||
'use strict'; | ||
/* global angular */ | ||
|
||
var app = angular.module('myapplication.weatherAdmin', [ 'myapplication.weatherService' ]); | ||
configure.$inject = [ 'c8yNavigatorProvider', 'c8yViewsProvider', 'gettext' ]; | ||
app.config(configure); | ||
angular | ||
.module('myapp.weatherAdmin', [ 'myapp.weatherService' ]) | ||
.config(configure); | ||
|
||
function configure(c8yNavigatorProvider, c8yViewsProvider, gettext) { | ||
c8yNavigatorProvider.addNavigation({ | ||
parent: gettext('Settings'), | ||
name: gettext('Weather'), | ||
path: 'weather', | ||
icon: 'cloud' | ||
configure.$inject = [ | ||
'c8yNavigatorProvider', | ||
'c8yViewsProvider', | ||
'gettext' | ||
]; | ||
|
||
function configure( | ||
c8yNavigatorProvider, | ||
c8yViewsProvider, | ||
gettext | ||
) { | ||
c8yNavigatorProvider.addNavigation({ // adds a menu item to the navigator with ... | ||
parent: gettext('Settings'), // ... the category *"Settings"* | ||
name: gettext('Weather'), // ... the name *"Weather"* | ||
path: 'weather', // ... */weather* as path | ||
icon: 'cloud' // ... the cloud icon (icons are provided by the great Font Awesome library and you can use any of their [icon names](http://fontawesome.io/icons/) without the *fa-* prefix here | ||
}); | ||
|
||
c8yViewsProvider.when('/weather', { | ||
templateUrl: ':::PLUGIN_PATH:::/views/weatherAdmin.html' | ||
c8yViewsProvider.when('/weather', { // when the path "/weather" is accessed ... | ||
templateUrl: ':::PLUGIN_PATH:::/views/weatherAdmin.html' // ... display our html file "weatheAdmin.html" inside the "views" folder of our plugin (the plugin's folder is represented using the magic string ```:::PLUGIN_PATH:::```, which is replaced by the actual path during the build process) | ||
}); | ||
} | ||
})(); | ||
}()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters