summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/directives/elements/radiobutton
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2017-06-09 03:19:04 +0300
committerMichael Lando <ml636r@att.com>2017-06-09 03:19:04 +0300
commited64b5edff15e702493df21aa3230b81593e6133 (patch)
treea4cb01fdaccc34930a8db403a3097c0d1e40914b /catalog-ui/src/app/directives/elements/radiobutton
parent280f8015d06af1f41a3ef12e8300801c7a5e0d54 (diff)
[SDC-29] catalog 1707 rebase commit.
Change-Id: I43c3dc5cf44abf5da817649bc738938a3e8388c1 Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'catalog-ui/src/app/directives/elements/radiobutton')
-rw-r--r--catalog-ui/src/app/directives/elements/radiobutton/radiobutton.html5
-rw-r--r--catalog-ui/src/app/directives/elements/radiobutton/radiobutton.less0
-rw-r--r--catalog-ui/src/app/directives/elements/radiobutton/radiobutton.ts48
3 files changed, 53 insertions, 0 deletions
diff --git a/catalog-ui/src/app/directives/elements/radiobutton/radiobutton.html b/catalog-ui/src/app/directives/elements/radiobutton/radiobutton.html
new file mode 100644
index 0000000000..b31fae5d73
--- /dev/null
+++ b/catalog-ui/src/app/directives/elements/radiobutton/radiobutton.html
@@ -0,0 +1,5 @@
+<div class="tlv-radio">
+ <input name="{{elemName}}" id="{{elemId}}" class="tlv-radio-i" type="radio" ng-model="sdcModel" ng-click="onValueChange()"
+ ng-disabled="disabled" value="{{value}}" />
+ <label for="{{elemId}}" sdc-smart-tooltip class="tlv-radio-label">{{text}}</label>
+</div>
diff --git a/catalog-ui/src/app/directives/elements/radiobutton/radiobutton.less b/catalog-ui/src/app/directives/elements/radiobutton/radiobutton.less
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/catalog-ui/src/app/directives/elements/radiobutton/radiobutton.less
diff --git a/catalog-ui/src/app/directives/elements/radiobutton/radiobutton.ts b/catalog-ui/src/app/directives/elements/radiobutton/radiobutton.ts
new file mode 100644
index 0000000000..1384a82674
--- /dev/null
+++ b/catalog-ui/src/app/directives/elements/radiobutton/radiobutton.ts
@@ -0,0 +1,48 @@
+import INgModelController = angular.INgModelController;
+'use strict';
+
+export interface IRadiobuttonElementScope extends ng.IScope {
+ elemId:string;
+ elemName:string;
+ text:string;
+ sdcModel:any;
+ value:any;
+ disabled:boolean;
+ onValueChange:Function;
+}
+
+export class RadiobuttonElementDirective implements ng.IDirective {
+
+ constructor(private $filter:ng.IFilterService) {
+ }
+
+ public replace = true;
+ public restrict = 'E';
+ public transclude = false;
+
+ scope = {
+ elemId: '@',
+ elemName: '@',
+ text: '@',
+ sdcModel: '=',
+ value: '@',
+ disabled: '=',
+ onValueChange: '&'
+ };
+
+ template = ():string => {
+ return require('./radiobutton.html');
+ };
+
+ public link = (scope:IRadiobuttonElementScope, $elem:ng.IAugmentedJQuery, $attrs:angular.IAttributes) => {
+ //$elem.removeAttr("id")
+ //console.log(scope.sdcChecklistValue);
+ };
+
+ public static factory = ($filter:ng.IFilterService)=> {
+ return new RadiobuttonElementDirective($filter);
+ };
+
+}
+
+RadiobuttonElementDirective.factory.$inject = ['$filter'];