Project

General

Profile

« Previous | Next » 

Revision 43538

correctin directive for selected contexts in claiming, remove no required event emitters from claiming

View differences:

modules/uoa-services-portal/branches/angular-rc4/src/app/claimPages/inlineClaimContext/inlineClaimContext.component.ts
17 17
            <claim-contexts   [selectedList]="contexts" (contextsChange)="contextsChange($event)"  inline=true  [showComponent]="showComp" > </claim-contexts>
18 18

  
19 19
          <claim-selected-contexts   [contexts]="contexts"
20
              (contextsChange)="contextsChange($event)"
21 20
              (showChange)="showChange($event)"  inline=true [hideType]="inlineType"  > </claim-selected-contexts>
22 21
       </div>
23 22
       <claim-insert (showChange)="showChange($event)" inline=true  [contexts]="contexts" [publications]="publications"  [datasets]="datasets"   showButton=false     ></claim-insert>
......
51 50
  ngOnInit() {
52 51

  
53 52
  }
54

  
55
 contextsChange($event) {
56
   this.contexts=$event.value;
57
   console.log($event.value);
58
  }
59

  
60 53
  showChange($event) {
61 54
    this.show=$event.value;
62 55
    if(this.show == "end"){
modules/uoa-services-portal/branches/angular-rc4/src/app/claimPages/inlineClaimProject/inlineClaimProject.component.ts
16 16
            <claim-projects   [selectedProjects]="projects" (projectsChange)="projectsChange($event)"  inline=true > </claim-projects>
17 17

  
18 18
          <claim-selected-projects [projects]="projects"
19
              (projectsChange)="projectsChange($event)"
20
              (showChange)="showChange($event)"   inline=true [hideType]="inlineType"   > </claim-selected-projects>
19
               (showChange)="showChange($event)"   inline=true [hideType]="inlineType"   > </claim-selected-projects>
21 20
       </div>
22 21
       <claim-insert (showChange)="showChange($event)" inline=true  [projects]="projects" [publications]="publications"  [datasets]="datasets"   showButton=false  ></claim-insert>
23 22
       <button     (click)="insert()"  [class]="(enableButton)?'btn btn-xs btn-primary':'btn btn-primary btn-xs disabled'" style="float:right">Finish </button>
......
53 52

  
54 53
  }
55 54

  
56
 projectsChange($event) {
57
   this.projects=$event.value;
58
   console.log($event.value);
59
  }
60

  
61
  showChange($event) {
55
   showChange($event) {
62 56
    this.show=$event.value;
63 57
    if(this.show == "end"){
64 58
      //TODO
modules/uoa-services-portal/branches/angular-rc4/src/app/claimPages/linking/selected/selectedContexts.component.ts
3 3
import {BulkClaimComponent} from '../bulkClaim/bulkClaim.component';
4 4

  
5 5
@Component({
6
    selector: 'claim-selected-context',
6
    selector: 'claim-selected-contexts',
7 7
    template: `
8 8
        <div   [class]="componentClass" >
9 9
        <!-- Contexts -->
10
          <div   *ngIf=" !(inline  && hideType == 'context') && contexts"  class="concepts" >
10
          <!--div   *ngIf=" !(inline  && hideType == 'context') && contexts"  class="concepts" -->
11
          <div>
11 12
          <ul class="list-group">
12 13
            <li class="list-group-item list-group-item-success">Selected Concepts  ({{(contexts.length)}})
13 14
               <span *ngIf=" !inline"  title="Add More Concepts" (click)="showType('context')" aria-hidden="true" class="glyphicon glyphicon-plus "  style="float:right;cursor: pointer;"></span>
......
38 39
  @Input() inline:boolean = false;
39 40
  @Input() hideType;
40 41
  @Input() bulkMode:boolean = false;
41
  @Output() contextsChange = new EventEmitter();
42 42
  @Output() showChange = new EventEmitter();
43 43

  
44 44
  todayDate = '';
......
59 59
     if (index > -1) {
60 60
        this.contexts.splice(index, 1);
61 61
    }
62
    this.contextsChange.emit({
63
      value: this.contexts
64
    });
62

  
65 63
  }
66 64

  
67 65
}
modules/uoa-services-portal/branches/angular-rc4/src/app/claimPages/linking/claimContext/claimContext.component.ts
89 89
public filteredList = [];
90 90
@Input() public selectedList ;
91 91
public elementRef;
92
@Output() contextsChange = new EventEmitter();
92
// @Output() contextsChange = new EventEmitter();
93 93

  
94 94
public communities:string[];
95 95
@Input() public selectedCommunityId:string = "0";
......
145 145
     }
146 146
    if (!found) {
147 147
      this.selectedList.push(context);
148
      this.contextsChange.emit({
149
         value: this.selectedList
150
       });
148
      // this.contextsChange.emit({
149
      //    value: this.selectedList
150
      //  });
151 151
    }
152 152
    // var index:number =this.selectedList.indexOf(context);
153 153
    // if (index == -1) {
modules/uoa-services-portal/branches/angular-rc4/src/app/claimPages/linking/claimProject/claimProject.component.ts
75 75
  // public filteredList = [];
76 76
  @Input() public selectedProjects=[] ;
77 77
  public elementRef;
78
  @Output() projectsChange = new EventEmitter();
79 78

  
80 79
  public funders:string[];
81 80
  @Input() public selectedFunderId:string ="0";
......
151 150
     }
152 151
    if (!found) {
153 152
      this.selectedProjects.push(project);
154
      this.projectsChange.emit({
155
         value: this.selectedProjects
156
       });
153

  
157 154
    }
158 155

  
159 156
}
......
162 159
   if (index > -1) {
163 160
      this.selectedProjects.splice(index, 1);
164 161
  }
165
  this.projectsChange.emit({
166
    value: this.selectedProjects
167
  });
162
 
168 163
}
169 164
handleClick(event){
170 165
 var clickedComponent = event.target;
modules/uoa-services-portal/branches/angular-rc4/src/app/claimPages/linking/linkingGeneric.component.ts
45 45
          </div>
46 46

  
47 47
        <div  *ngIf=" show=='project' " >
48
               <claim-projects     [selectedProjects]="projects"  (projectsChange)="projectsChange($event)" > </claim-projects>
48
               <claim-projects     [selectedProjects]="projects"  > </claim-projects>
49 49
        </div>
50 50
        <div  *ngIf=" show=='software' " >
51 51
               <p>TODO software</p>
52 52
        </div>
53 53
          <div  *ngIf="  show == 'context'" >
54
             <claim-contexts   [selectedList]="contexts" (contextsChange)="contextsChange($event)"  > </claim-contexts>
54
             <claim-contexts   [selectedList]="contexts"   > </claim-contexts>
55 55
          </div>
56 56
        <!--  <div  *ngIf="  show == 'claim'" >
57 57
             <claim-insert   [contexts]="contexts" [publications]="publications" [datasets]="datasets" [projects]="projects"  ></claim-insert>
......
166 166
    this.targetType=$event.value;
167 167
   console.log($event.value);
168 168
 }
169
 contextsChange($event) {
170
   this.contexts=$event.value;
171
   console.log($event.value);
172
  }
169
 // contextsChange($event) {
170
 //   this.contexts=$event.value;
171
 //   console.log($event.value);
172
 //  }
173 173
  publicationsChange($event) {
174 174
    this.publications=$event.value;
175 175
  }

Also available in: Unified diff