Project

General

Profile

« Previous | Next » 

Revision 51751

corrected some bugs

View differences:

modules/uoa-repository-dashboard-gui/trunk/app/pages/compatibility/compatibility-validate-forms/compatibility-validate-step2.component.html
24 24
      <div class="margin10">
25 25
        <div class="checkbox selectAll">
26 26
          <label>
27
            <input type="checkbox" checked (change)="toggleSelectAllContentRules()">
27
            <input type="checkbox" [checked]="selectedAllContentRules" (change)="toggleSelectAllContentRules()">
28 28
            <span>Select / Deselect All Content Rules</span>
29 29
          </label>
30 30
        </div>
......
34 34
              <input id="contentRules_{{ content_index }}"
35 35
                     title="{{ currentContentRules[content_index].description }}"
36 36
                     formControlName="rule"
37
                     type="checkbox" >
37
                     type="checkbox"
38
                     (change)="onToggleCheckRule($event,'content')">
38 39
              <span>{{ currentContentRules[content_index].name }}</span>
39 40
            </label>
40 41
          </div>
......
45 46
      <div class="margin10">
46 47
        <div class="checkbox selectAll">
47 48
          <label>
48
            <input type="checkbox" checked (change)="toggleSelectAllUsageRules()">
49
            <input type="checkbox" [checked]="selectedAllUsageRules" (change)="toggleSelectAllUsageRules()">
49 50
            <span>Select / Deselect All Usage Rules</span>
50 51
          </label>
51 52
        </div>
......
56 57
                     value="{{ currentUsageRules[usage_index].id }}"
57 58
                     title="{{ currentUsageRules[usage_index].description }}"
58 59
                     formControlName="rule"
59
                     type="checkbox" >
60
                     type="checkbox"
61
                     (change)="onToggleCheckRule($event,'usage')">
60 62
              <span>{{ currentUsageRules[usage_index].name }}</span>
61 63
            </label>
62 64
          </div>
modules/uoa-repository-dashboard-gui/trunk/app/pages/compatibility/compatibility-validate-forms/compatibility-validate-step3-cris.component.ts
60 60
    }
61 61
  }
62 62

  
63
  onToggleCheckEntity(event:any) {
64
    if ( !event.target.checked ) {
65
      this.selectedAllEntities = false;
66
    }
67
  }
68

  
63 69
  saveChanges() {
64 70
    let emitted: any[] = [];
65 71
    let chosenEntities: string[] = [];
modules/uoa-repository-dashboard-gui/trunk/app/pages/compatibility/compatibility-validate-forms/compatibility-validate-step2.component.ts
122 122

  
123 123
  }
124 124

  
125
  onToggleCheckRule(event:any, contentOrUsage: string) {
126
    if ( !event.target.checked ) {
127
      if (contentOrUsage == 'content') {
128
        this.selectedAllContentRules = false;
129
      } else if (contentOrUsage == 'usage') {
130
        this.selectedAllUsageRules = false;
131
      }
132
    }
133
  }
134

  
125 135
  toggleShowRules() {
126 136
    this.showRules = !this.showRules;
127 137
    return this.showRules;
modules/uoa-repository-dashboard-gui/trunk/app/pages/compatibility/compatibility-validate-forms/compatibility-validate-step3-cris.component.html
7 7
      <div class="margin10" formArrayName="entities">
8 8
        <div class="checkbox selectAll">
9 9
          <label>
10
            <input type="checkbox" checked (change)="toggleSelectAllContentRules()">
10
            <input type="checkbox" [checked]="selectedAllEntities" (change)="toggleSelectAllContentRules()">
11 11
            <span>Select / Deselect All Entities</span>
12 12
          </label>
13 13
        </div>
......
16 16
            <label for="entity_{{ i }}">
17 17
              <input id="entity_{{ i }}"
18 18
                     formControlName="entity"
19
                     type="checkbox">
19
                     type="checkbox"
20
                     (change)="onToggleCheckEntity($event)">
20 21
              <span>{{ entitiesList[i] }}</span>
21 22
            </label>
22 23
          </div>
modules/uoa-repository-dashboard-gui/trunk/app/pages/content/content-notifications.component.ts
18 18
  loadingMessage: string;
19 19
  noSubscriptions: string;
20 20

  
21
  subscrOfUser: Map<string,SimpleSubscriptionDesc> = new Map<string,SimpleSubscriptionDesc>();
21
  subscrOfUser: Map<string,SimpleSubscriptionDesc[]> = new Map<string,SimpleSubscriptionDesc[]>();
22 22
  subKeys: string[] = [];
23 23

  
24 24
  constructor(private authService: AuthenticationService,
......
33 33
    this.brokerService.getSimpleSubscriptionsOfUser(this.authService.getUserEmail()).subscribe(
34 34
      subscrs => this.subscrOfUser = subscrs,
35 35
      error => {
36
        console.log(`getSimpleSubscriptions returned error`);
36 37
        console.log(error);
37 38
        this.loadingMessage = '';
38 39
        this.errorMessage = noServiceMessage;
modules/uoa-repository-dashboard-gui/trunk/app/services/broker.service.ts
62 62
      .catch(this.handleError);
63 63
  }
64 64

  
65
  getSimpleSubscriptionsOfUser(userEmail: string): Observable<Map<string,SimpleSubscriptionDesc>> {
65
  getSimpleSubscriptionsOfUser(userEmail: string): Observable<Map<string,SimpleSubscriptionDesc[]>> {
66 66
    let url = `${this.apiUrl}getSimpleSubscriptionsOfUser/${userEmail}/`;
67 67
    console.log(`knocking on: ${url}`);
68 68
    httpOptions.withCredentials = true;
69
    return this.http.get(url, this.http)
70
      .map( res => <Map<string,SimpleSubscriptionDesc>>res.json())
69
    return this.http.get(url, httpOptions)
70
      .map( res => <Map<string,SimpleSubscriptionDesc[]>>res.json())
71 71
      .catch(this.handleError);
72 72
  }
73 73

  
modules/uoa-repository-dashboard-gui/trunk/app/shared/reusablecomponents/forms/my-array.interface.ts
97 97
        ((this.parentGroup as FormArray).controls[this.name].at(0).corpus((<MyGroup>componentView.instance).generate().value));
98 98
      } else {
99 99
        if (index>0){
100
          if (this.registerMode || !<MyGroup>componentView.instance.exportedData) {
101
            this.remove(index);
102
            (this.parentGroup as FormArray).controls[this.name].removeAt(index-1);
103
            this.components.splice(index,1);
104
            this.arrayData_.splice(index-1,1);
100
          if (this.registerMode ) {
101
            if(!<MyGroup>componentView.instance.exportedData) {
102
              this.remove(index);
103
              (this.parentGroup as FormArray).controls[this.name].removeAt(index - 1);
104
              this.components.splice(index, 1);
105
              this.arrayData_.splice(index - 1, 1);
106
            }
105 107
          } else {
106 108
            this.curIntrf = <MyGroup>componentView.instance;
107 109
            this.curIndex = index;

Also available in: Unified diff