Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
H5P.Version = (function () {
2
  /**
3
   * Make it easy to keep track of version details.
4
   *
5
   * @class
6
   * @namespace H5P
7
   * @param {String} version
8
   */
9
  function Version(version) {
10
 
11
    if (typeof version === 'string') {
12
      // Name version string (used by content upgrade)
13
      var versionSplit = version.split('.', 3);
14
      this.major =+ versionSplit[0];
15
      this.minor =+ versionSplit[1];
16
    }
17
    else {
18
      // Library objects (used by editor)
19
      if (version.localMajorVersion !== undefined) {
20
        this.major =+ version.localMajorVersion;
21
        this.minor =+ version.localMinorVersion;
22
      }
23
      else {
24
        this.major =+ version.majorVersion;
25
        this.minor =+ version.minorVersion;
26
      }
27
    }
28
 
29
    /**
30
     * Public. Custom string for this object.
31
     *
32
     * @returns {String}
33
     */
34
    this.toString = function () {
35
      return version;
36
    };
37
  }
38
 
39
  return Version;
40
})();