From bf2fdc409bf4d2da01b72c0811f4d40c6e6ef027 Mon Sep 17 00:00:00 2001 From: Zsolt Date: Tue, 15 Aug 2017 16:32:30 +0200 Subject: [PATCH 1/3] created umb-box components and changed all html tags for it in the users section --- .../directives/components/umbbox.directive.js | 19 ++++++++++ .../components/umbboxcontent.directive.js | 18 +++++++++ .../components/umbboxheader.directive.js | 23 +++++++++++ .../html/umb-box/umb-box-content.html | 1 + .../html/umb-box/umb-box-header.html | 6 +++ .../components/html/umb-box/umb-box.html | 1 + .../src/views/users/group.html | 38 +++++++++---------- .../src/views/users/user.html | 32 +++++++--------- 8 files changed, 98 insertions(+), 40 deletions(-) create mode 100644 src/Umbraco.Web.UI.Client/src/common/directives/components/umbbox.directive.js create mode 100644 src/Umbraco.Web.UI.Client/src/common/directives/components/umbboxcontent.directive.js create mode 100644 src/Umbraco.Web.UI.Client/src/common/directives/components/umbboxheader.directive.js create mode 100644 src/Umbraco.Web.UI.Client/src/views/components/html/umb-box/umb-box-content.html create mode 100644 src/Umbraco.Web.UI.Client/src/views/components/html/umb-box/umb-box-header.html create mode 100644 src/Umbraco.Web.UI.Client/src/views/components/html/umb-box/umb-box.html diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbbox.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbbox.directive.js new file mode 100644 index 0000000000..b3f57e6b5e --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbbox.directive.js @@ -0,0 +1,19 @@ +(function(){ + 'use strict'; + + function BoxDirective() { + + var directive = { + restrict: 'E', + replace: true, + transclude: true, + templateUrl: 'views/components/html/umb-box/umb-box.html' + }; + + return directive; + + } + + angular.module('umbraco.directives').directive('umbBox', BoxDirective); + +})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbboxcontent.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbboxcontent.directive.js new file mode 100644 index 0000000000..6b62575bee --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbboxcontent.directive.js @@ -0,0 +1,18 @@ +(function(){ + 'use strict'; + + function BoxContentDirective() { + + var directive = { + restrict: 'E', + replace: true, + transclude: true, + templateUrl: 'views/components/html/umb-box/umb-box-content.html' + }; + + return directive; + } + + angular.module('umbraco.directives').directive('umbBoxContent', BoxContentDirective); + +})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbboxheader.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbboxheader.directive.js new file mode 100644 index 0000000000..d005fa9efc --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbboxheader.directive.js @@ -0,0 +1,23 @@ +(function(){ + 'use strict'; + + function BoxHeaderDirective() { + + var directive = { + restrict: 'E', + replace: true, + transclude: true, + templateUrl: 'views/components/html/umb-box/umb-box-header.html', + scope: { + titleKey: "@?", + title: "@?" + } + }; + + return directive; + + } + + angular.module('umbraco.directives').directive('umbBoxHeader', BoxHeaderDirective); + +})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/components/html/umb-box/umb-box-content.html b/src/Umbraco.Web.UI.Client/src/views/components/html/umb-box/umb-box-content.html new file mode 100644 index 0000000000..f3ebfcb505 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/components/html/umb-box/umb-box-content.html @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/components/html/umb-box/umb-box-header.html b/src/Umbraco.Web.UI.Client/src/views/components/html/umb-box/umb-box-header.html new file mode 100644 index 0000000000..6feffe9d3d --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/components/html/umb-box/umb-box-header.html @@ -0,0 +1,6 @@ +
+
+ + {{title}} +
+
\ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/components/html/umb-box/umb-box.html b/src/Umbraco.Web.UI.Client/src/views/components/html/umb-box/umb-box.html new file mode 100644 index 0000000000..38c4ff58fe --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/components/html/umb-box/umb-box.html @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/users/group.html b/src/Umbraco.Web.UI.Client/src/views/users/group.html index a9df8afcd3..f1427e3266 100644 --- a/src/Umbraco.Web.UI.Client/src/views/users/group.html +++ b/src/Umbraco.Web.UI.Client/src/views/users/group.html @@ -21,11 +21,11 @@
-
-
-
Access
-
-
+ + + + + -
-
+ + -
-
-
Default permissions
-
-
+ + + @@ -111,14 +109,12 @@ selected="permission.checked"> -
-
+ + -
-
-
Granular permissions
-
-
+ + + -
-
+ +
diff --git a/src/Umbraco.Web.UI.Client/src/views/users/user.html b/src/Umbraco.Web.UI.Client/src/views/users/user.html index 94c8360346..603931d7e3 100644 --- a/src/Umbraco.Web.UI.Client/src/views/users/user.html +++ b/src/Umbraco.Web.UI.Client/src/views/users/user.html @@ -20,14 +20,12 @@
- -
-
-
- Profile -
-
-
+ + + + + + Required -
-
+ + -
-
-
- Access -
-
-
+ + + @@ -160,8 +154,8 @@ -
-
+ +
From 9e0d0de8467e0d3f193afe70f4fd506c036670f7 Mon Sep 17 00:00:00 2001 From: Zsolt Date: Wed, 16 Aug 2017 15:45:57 +0200 Subject: [PATCH 2/3] created documentation for the newly added directives + testing --- .../html/umbbox/umbbox.directive.js | 44 +++++++++++++ .../html/umbbox/umbboxcontent.directive.js | 43 ++++++++++++ .../html/umbbox/umbboxheader.directive.js | 65 +++++++++++++++++++ .../directives/components/umbbox.directive.js | 19 ------ .../components/umbboxcontent.directive.js | 18 ----- .../components/umbboxheader.directive.js | 23 ------- .../src/views/users/user.html | 2 +- 7 files changed, 153 insertions(+), 61 deletions(-) create mode 100644 src/Umbraco.Web.UI.Client/src/common/directives/components/html/umbbox/umbbox.directive.js create mode 100644 src/Umbraco.Web.UI.Client/src/common/directives/components/html/umbbox/umbboxcontent.directive.js create mode 100644 src/Umbraco.Web.UI.Client/src/common/directives/components/html/umbbox/umbboxheader.directive.js delete mode 100644 src/Umbraco.Web.UI.Client/src/common/directives/components/umbbox.directive.js delete mode 100644 src/Umbraco.Web.UI.Client/src/common/directives/components/umbboxcontent.directive.js delete mode 100644 src/Umbraco.Web.UI.Client/src/common/directives/components/umbboxheader.directive.js diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/html/umbbox/umbbox.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/html/umbbox/umbbox.directive.js new file mode 100644 index 0000000000..0702864f03 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/html/umbbox/umbbox.directive.js @@ -0,0 +1,44 @@ +/** +@ngdoc directive +@name umbraco.directives.directive:umbBox +@restrict E + +@description +Use this directive to render an already styled empty div tag. + +

Markup example

+
+    
+        
+        
+            // Content here
+        
+    
+
+ +

Use in combination with:

+
    +
  • {@link umbraco.directives.directive:umbBoxHeader umbBoxHeader}
  • +
  • {@link umbraco.directives.directive:umbBoxContent umbBoxContent}
  • +
+**/ + +(function(){ + 'use strict'; + + function BoxDirective() { + + var directive = { + restrict: 'E', + replace: true, + transclude: true, + templateUrl: 'views/components/html/umb-box/umb-box.html' + }; + + return directive; + + } + + angular.module('umbraco.directives').directive('umbBox', BoxDirective); + +})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/html/umbbox/umbboxcontent.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/html/umbbox/umbboxcontent.directive.js new file mode 100644 index 0000000000..98978c1fd3 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/html/umbbox/umbboxcontent.directive.js @@ -0,0 +1,43 @@ +/** +@ngdoc directive +@name umbraco.directives.directive:umbBoxContent +@restrict E + +@description +Use this directive to render an empty container. Recommended to use it inside an {@link umbraco.directives.directive:umbBox umbBox} directive. See documentation for {@link umbraco.directives.directive:umbBox umbBox}. + +

Markup example

+
+    
+        
+        
+            // Content here
+        
+    
+
+ +

Use in combination with:

+
    +
  • {@link umbraco.directives.directive:umbBox umbBox}
  • +
  • {@link umbraco.directives.directive:umbBoxContent umbBoxHeader}
  • +
+**/ + +(function(){ + 'use strict'; + + function BoxContentDirective() { + + var directive = { + restrict: 'E', + replace: true, + transclude: true, + templateUrl: 'views/components/html/umb-box/umb-box-content.html' + }; + + return directive; + } + + angular.module('umbraco.directives').directive('umbBoxContent', BoxContentDirective); + +})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/html/umbbox/umbboxheader.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/html/umbbox/umbboxheader.directive.js new file mode 100644 index 0000000000..4ed1d68e59 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/html/umbbox/umbboxheader.directive.js @@ -0,0 +1,65 @@ +/** +@ngdoc directive +@name umbraco.directives.directive:umbBoxHeader +@restrict E +@scope + +@description +Use this directive to construct a title. Recommended to use it inside an {@link umbraco.directives.directive:umbBox umbBox} directive. See documentation for {@link umbraco.directives.directive:umbBox umbBox}. + +

Markup example

+
+    
+        
+        
+            // Content here
+        
+    
+
+ +

Markup example with using titleKey

+
+    
+        // the title-key property needs an areaAlias_keyAlias from the language files
+        
+        
+            // Content here
+        
+    
+
+{@link https://our.umbraco.org/documentation/extending/language-files/ Here you can see more about the language files} + +

Use in combination with:

+
    +
  • {@link umbraco.directives.directive:umbBox umbBox}
  • +
  • {@link umbraco.directives.directive:umbBoxContent umbBoxContent}
  • +
+ +@param {string} title (attrbute): Custom title text. +@param {string} title-key (attrbute): the key alias of the language xml files. +**/ + + +(function(){ + 'use strict'; + + function BoxHeaderDirective() { + + var directive = { + restrict: 'E', + replace: true, + transclude: true, + templateUrl: 'views/components/html/umb-box/umb-box-header.html', + scope: { + titleKey: "@?", + title: "@?" + } + }; + + return directive; + + } + + angular.module('umbraco.directives').directive('umbBoxHeader', BoxHeaderDirective); + +})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbbox.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbbox.directive.js deleted file mode 100644 index b3f57e6b5e..0000000000 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbbox.directive.js +++ /dev/null @@ -1,19 +0,0 @@ -(function(){ - 'use strict'; - - function BoxDirective() { - - var directive = { - restrict: 'E', - replace: true, - transclude: true, - templateUrl: 'views/components/html/umb-box/umb-box.html' - }; - - return directive; - - } - - angular.module('umbraco.directives').directive('umbBox', BoxDirective); - -})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbboxcontent.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbboxcontent.directive.js deleted file mode 100644 index 6b62575bee..0000000000 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbboxcontent.directive.js +++ /dev/null @@ -1,18 +0,0 @@ -(function(){ - 'use strict'; - - function BoxContentDirective() { - - var directive = { - restrict: 'E', - replace: true, - transclude: true, - templateUrl: 'views/components/html/umb-box/umb-box-content.html' - }; - - return directive; - } - - angular.module('umbraco.directives').directive('umbBoxContent', BoxContentDirective); - -})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbboxheader.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbboxheader.directive.js deleted file mode 100644 index d005fa9efc..0000000000 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbboxheader.directive.js +++ /dev/null @@ -1,23 +0,0 @@ -(function(){ - 'use strict'; - - function BoxHeaderDirective() { - - var directive = { - restrict: 'E', - replace: true, - transclude: true, - templateUrl: 'views/components/html/umb-box/umb-box-header.html', - scope: { - titleKey: "@?", - title: "@?" - } - }; - - return directive; - - } - - angular.module('umbraco.directives').directive('umbBoxHeader', BoxHeaderDirective); - -})(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/users/user.html b/src/Umbraco.Web.UI.Client/src/views/users/user.html index 603931d7e3..efc9685b85 100644 --- a/src/Umbraco.Web.UI.Client/src/views/users/user.html +++ b/src/Umbraco.Web.UI.Client/src/views/users/user.html @@ -27,7 +27,7 @@ - + Date: Wed, 16 Aug 2017 21:40:35 +0200 Subject: [PATCH 3/3] fix link --- .../components/html/umbbox/umbboxcontent.directive.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/html/umbbox/umbboxcontent.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/html/umbbox/umbboxcontent.directive.js index 98978c1fd3..256dcfac4e 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/html/umbbox/umbboxcontent.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/html/umbbox/umbboxcontent.directive.js @@ -19,7 +19,7 @@ Use this directive to render an empty container. Recommended to use it inside an

Use in combination with:

  • {@link umbraco.directives.directive:umbBox umbBox}
  • -
  • {@link umbraco.directives.directive:umbBoxContent umbBoxHeader}
  • +
  • {@link umbraco.directives.directive:umbBoxHeader umbBoxHeader}
**/