Project

General

Profile

« Previous | Next » 

Revision 59816

[Library|Trunk]

code clean up:
-remove app.* files from library
-remove unused imports, code, files (Old search pages for results, dataproviders, map search page, etc)
-remove Freeguard from modules
-unsubscribe all subscriptions
-Services: configuration, isvocabularies, user management: unsubscribe from app component or the component that uses them (clearSubscriptions())
-Fetchers: unsubscribe from the component that uses them (clearSubscriptions())

View differences:

ClaimEntityTitle.component.ts
63 63
     return mystr;
64 64
  }
65 65

  
66

  
67
  addStringToNumber(str: string, num: number) {
68
    return (+str) + num;
69
  }
70

  
71
  getProjectDurationMessage(result: ClaimEntity) {
72
    for (let message of result.warningMessages) {
73
      if (message.type == "projectDuration") {
74
        return "Should be from " + message.projectInfo.startDate + ((message.projectInfo.endDate) ? (" to " + ((5 + +message.projectInfo.endDate))) : "");
75
      }
76
    }
77
    return null;
78
  }
79

  
80
  getEmbargoEndDateMessage(result: ClaimEntity) {
81
    for (var message of result.warningMessages) {
82
      if (message.type == "embargoEndDate") {
83
        return "Embargo end date must be later than published date";
84
      }
85
    }
86
    return null;
87
  }
88

  
89

  
90 66
}

Also available in: Unified diff