From 422a982d60e47b629ef29def466cef4c7a618f9a Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Sun, 2 Oct 2016 16:11:20 +1300 Subject: [PATCH] feat(templates): template configuration is now placed on top of template list (#253) --- app/components/templates/templates.html | 56 +++++++++++++------------ app/directives/widget-custom-header.js | 15 +++++++ assets/css/app.css | 5 +++ 3 files changed, 49 insertions(+), 27 deletions(-) create mode 100644 app/directives/widget-custom-header.js diff --git a/app/components/templates/templates.html b/app/components/templates/templates.html index 5d09065d4..a53bd09af 100644 --- a/app/components/templates/templates.html +++ b/app/components/templates/templates.html @@ -7,31 +7,11 @@ Templates -
-
- - -
- -
-
- -
-
- -
{{ tpl.title }}
-
{{ tpl.description }}
-
-
-
-
-
-
-
- + +
@@ -71,6 +51,12 @@
+
+
+ + +
+
@@ -78,10 +64,26 @@
-
-
- -
- + +
+ +
+
+ + +
+ +
+
+ +
+
+ +
{{ tpl.title }}
+
{{ tpl.description }}
+
+
+
+
diff --git a/app/directives/widget-custom-header.js b/app/directives/widget-custom-header.js new file mode 100644 index 000000000..c1444b3f6 --- /dev/null +++ b/app/directives/widget-custom-header.js @@ -0,0 +1,15 @@ +angular +.module('portainer') +.directive('rdWidgetCustomHeader', function rdWidgetCustomHeader() { + var directive = { + requires: '^rdWidget', + scope: { + title: '=', + icon: '=' + }, + transclude: true, + template: '
{{title}}
', + restrict: 'E' + }; + return directive; +}); diff --git a/assets/css/app.css b/assets/css/app.css index 38711bdb9..c993c6230 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -216,6 +216,11 @@ input[type="radio"] { flex-wrap: wrap; } +.custom-header-ico { + max-width: 16px; + max-height: 16px; +} + .container-template { font-size: 1em; width: 256px;