Sha256: 62b1c1432c9a595ab65283f3aedb62028cf73b4686230cee2acb86ab7b52f0b5

Contents?: true

Size: 719 Bytes

Versions: 7

Compression:

Stored size: 719 Bytes

Contents

<script>
  // Why doesn't this method just live in the adder controller ?
  // Because the row component also need a special access to it in order to create cols with an id. So we make it global to the application.
  promethee.provider('identifier', function() {
    this.$get = function() {
      return {
        generate: function() {
          // https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript
          function s4() {
            return Math.floor((1 + Math.random()) * 0x10000)
              .toString(16)
              .substring(1);
          }
          return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();
        }
      };
    };
  });
</script>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
promethee-1.6.10 app/views/promethee/utils/_identifier.html.erb
promethee-1.6.8 app/views/promethee/utils/_identifier.html.erb
promethee-1.6.7 app/views/promethee/utils/_identifier.html.erb
promethee-1.6.6 app/views/promethee/utils/_identifier.html.erb
promethee-1.6.5 app/views/promethee/utils/_identifier.html.erb
promethee-1.6.4 app/views/promethee/utils/_identifier.html.erb
promethee-1.6.3 app/views/promethee/utils/_identifier.html.erb