Sha256: 9ee02424e165159ce72312c0a8336544f7b4e9d37a347886bd74d8c2dd26c029

Contents?: true

Size: 730 Bytes

Versions: 64

Compression:

Stored size: 730 Bytes

Contents

<script type="text/ng-template" id="offset_input">
  <input  ng-model="ngModel"
          ng-change="checkOffsetValid()"
          type="range"
          class="btn-block"
          list="tickmarks"
          min="0"
          max="12">
</script>

<script>
  promethee.directive('offsetInput', function() {
    return {
      restrict: 'E',
      scope: {
        ngModel: '=',
        ngMax: "="
      },
      templateUrl: 'offset_input',
      controller: function($scope) {
        $scope.$watch('ngMax', function () {
          $scope.checkOffsetValid();
        });

        $scope.checkOffsetValid = function () {
          $scope.ngModel = Math.min($scope.ngModel, $scope.ngMax);
        };
      }
    }
  });

</script>

Version data entries

64 entries across 64 versions & 1 rubygems

Version Path
promethee-5.1.1 app/views/promethee/templates/_offset-input.html.erb
promethee-5.1.0 app/views/promethee/templates/_offset-input.html.erb
promethee-5.0.2 app/views/promethee/templates/_offset-input.html.erb
promethee-5.0.1 app/views/promethee/templates/_offset-input.html.erb
promethee-5.0.0 app/views/promethee/templates/_offset-input.html.erb
promethee-4.1.28 app/views/promethee/templates/_offset-input.html.erb
promethee-4.1.27 app/views/promethee/templates/_offset-input.html.erb
promethee-4.1.26 app/views/promethee/templates/_offset-input.html.erb
promethee-4.1.25 app/views/promethee/templates/_offset-input.html.erb
promethee-4.1.24 app/views/promethee/templates/_offset-input.html.erb
promethee-4.1.23 app/views/promethee/templates/_offset-input.html.erb
promethee-4.1.22 app/views/promethee/templates/_offset-input.html.erb
promethee-4.1.21 app/views/promethee/templates/_offset-input.html.erb
promethee-4.1.20 app/views/promethee/templates/_offset-input.html.erb
promethee-4.1.19 app/views/promethee/templates/_offset-input.html.erb
promethee-4.1.18 app/views/promethee/templates/_offset-input.html.erb
promethee-4.1.17 app/views/promethee/templates/_offset-input.html.erb
promethee-4.1.16 app/views/promethee/templates/_offset-input.html.erb
promethee-4.1.15 app/views/promethee/templates/_offset-input.html.erb
promethee-4.1.14 app/views/promethee/templates/_offset-input.html.erb