From abb9cc75e166c32cfa97244c497e6a69d14ea114 Mon Sep 17 00:00:00 2001
From: César Calvo <ccalvo@curisit.net>
Date: Wed, 15 Mar 2017 15:32:23 +0000
Subject: [PATCH] Merge branch 'angular2' of https://git.curisit.net/gitblit/git/common/securis into angular2

---
 securis/src/main/webapp/src/app/license.list.component.ts |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/securis/src/main/webapp/src/app/license.list.component.ts b/securis/src/main/webapp/src/app/license.list.component.ts
index a14377e..9ff77ba 100644
--- a/securis/src/main/webapp/src/app/license.list.component.ts
+++ b/securis/src/main/webapp/src/app/license.list.component.ts
@@ -1,5 +1,5 @@
 import { Router } from '@angular/router';
-import { MdDialog } from '@angular/material';
+import { MdDialog, MdDialogConfig } from '@angular/material';
 import { TdDataTableService, TdDataTableSortingOrder, ITdDataTableSortChangeEvent, ITdDataTableColumn } from '@covalent/core';
 import { IPageChangeEvent } from '@covalent/core';
 import { Component, AfterViewInit } from '@angular/core';
@@ -22,6 +22,11 @@
   pack_id: 18,
   request_data: '{"appCode":"CISA","activationCode":"19fa8d30-29cb-4b59-81b5-3837af8204b6","arch":"x86_64","osName":"Mac OS X","macAddresses":["60-03-08-95-AE-D0","B6-2B-33-E9-64-2D"],"crcLogo":"10f6379e0e1c00ebc403160307e3c5d0aba0727c9cae0bf1ac7cd19d84fdc80f"}',
   status: 'AC' }
+
+const DIALOG_OPTIONS : MdDialogConfig = {
+  height: '80%', // can be px or %
+  width: '45%', // can be px or %
+}
 
 @Component({
   selector: 'license-list',
@@ -85,27 +90,22 @@
     this.filter();
   }
 
-  createPack() : void {
-    var ref = this.dialog.open(LicenseFormComponent, {
-      height: '50%', // can be px or %
-      width: '40%', // can be px or %
-    });
+  createLicense() : void {
+    let ref = this.dialog.open(LicenseFormComponent, DIALOG_OPTIONS);
+    
     ref.componentInstance.isNew = true;
+    ref.componentInstance.data = {};
     ref.afterClosed().subscribe(result => {
-      console.log(result);
       this.filter();
     });
+  
   }
 
   editLicense(lic: any) : void {
-    var ref = this.dialog.open(LicenseFormComponent, {
-      height: '50%', // can be px or %
-      width: '40%', // can be px or %
-    });
+    let ref = this.dialog.open(LicenseFormComponent, DIALOG_OPTIONS);
     ref.componentInstance.isNew = false;
     ref.componentInstance.data = lic;
     ref.afterClosed().subscribe(result => {
-      console.log(result);
       this.filter();
     });
   }

--
Gitblit v1.3.2