Skip to content

Commit

Permalink
Disabled ALL annotations option, fixed void bug
Browse files Browse the repository at this point in the history
  • Loading branch information
atruskie committed May 6, 2014
1 parent 2e03f4a commit 4aa2d3a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/app/annotationLibrary/annotationLibrary.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ angular.module('bawApp.annotationLibrary', ['bawApp.configuration'])
function getEmptyFilterSettings() {
return {
tagsPartial: null,
reference: '', // set to empty string to match value of radio button
reference: 'true', // set to empty string to match value of radio button
userId: null,
annotationDuration: null,
freqMin: null,
Expand All @@ -161,7 +161,8 @@ angular.module('bawApp.annotationLibrary', ['bawApp.configuration'])
].forEach(
function (currentvalue, index, array) {
var stringValue = $scope.filterSettings[currentvalue];
$scope.filterSettings[currentvalue] = stringValue === null ? null : Number(stringValue);
var isVoid = stringValue === null || stringValue === undefined || stringValue === "";
$scope.filterSettings[currentvalue] = isVoid ? null : Number(stringValue);
}
);
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/annotationLibrary/annotationLibrary.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h3>Annotation Library</h3>

<div class="col-sm-4">
<label class="radio-inline">
<input type="radio" name="refLibraryReference" id="refLibraryReference1"
<input type="radio" name="refLibraryReference" id="refLibraryReference1" disabled title="Coming soon to movie theaters near you..."
value="" checked data-ng-model="filterSettings.reference"> All
</label>

Expand All @@ -53,7 +53,7 @@ <h3>Annotation Library</h3>
</label>

<label class="radio-inline">
<input type="radio" name="refLibraryReference" id="refLibraryReference3"
<input type="radio" name="refLibraryReference" id="refLibraryReference3" disabled title="Coming soon to movie theaters near you..."
value="false" data-ng-model="filterSettings.reference"> Not Reference
</label>
</div>
Expand Down

0 comments on commit 4aa2d3a

Please sign in to comment.