Project

General

Profile

« Previous | Next » 

Revision 58979

[Trunk | Library]: stakeholder.service.ts: Monitor change - in "deleteElement()" method add parameter "childrenAction: string = null" to add options:
- delete default element and all elements based on this default (and their contents).
- delete default element and for all elements (and theis contents) based in this default remove connection with this default which is deleted.

View differences:

stakeholder.service.ts
82 82
    }));
83 83
  }
84 84

  
85
  deleteElement(url: string, path: string[]): Observable<any> {
85
  deleteElement(url: string, path: string[], childrenAction: string = null): Observable<any> {
86 86
    path = HelperFunctions.encodeArray(path);
87
    return this.http.delete<any>(url + '/' + path.join('/') + '/delete');
87
    let params: string = "";
88
    if(childrenAction) {
89
      params = "?children="+childrenAction;
90
    }
91
    return this.http.delete<any>(url + '/' + path.join('/') + '/delete'+params);
88 92
  }
89 93

  
90 94
  reorderIndicators(url: string, path: string[], indicatorIds: string[], type: string = 'chart'): Observable<Indicator[]> {

Also available in: Unified diff