Skip to content

Commit

Permalink
Updated Angular version
Browse files Browse the repository at this point in the history
Worked on Tagging control.

Removed Tags Controller because it was interfering with the angular-tags controller
  • Loading branch information
atruskie committed Nov 27, 2013
1 parent da26e48 commit a5b8420
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 19 deletions.
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ng-boilerplate",
"version": "0.0.4",
"devDependencies": {
"angular": "~1.2.0",
"angular": "1.2.2",
"angular-mocks": "~1.2.0",
"angular-route": "~1.2.0",
"angular-bootstrap": "~0.6.0",
Expand All @@ -23,6 +23,6 @@
},
"dependencies": {},
"resolutions": {
"angular": "1.2.0"
"angular": "1.2.2"
}
}
17 changes: 13 additions & 4 deletions src/app/listen/listen.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,18 @@ angular.module('bawApp.listen', ['decipher.tags', 'ui.bootstrap.typeahead'])

// download all the tags and store them in Tag service cache
// TODO: this is inefficient, make better in the future...
$scope.tags = Tag.query({}, {}, function () {
// $scope.tags = Tag.query({}, {}, function () {
//
// }, undefined);

}, undefined);
$scope.tags = [
{id: 1, name:"crow", value: 1},
{id: 2, name:"cow", value: 2},
{id: 3, name:"pig", value: 3},
{id: 4, name:"penguin", value: 4},
{id: 5, name:"jason", value: 5},
{id: 6, name:"sheep", value: 6}
];

$scope.model.limits = {
timeMin: 0.0,
Expand Down Expand Up @@ -305,9 +314,9 @@ angular.module('bawApp.listen', ['decipher.tags', 'ui.bootstrap.typeahead'])
$scope.typeaheadOpts = {
//inputFormatter: myInputFormatterFunction,
//loading: myLoadingBoolean,
minLength: 1,
minLength: 1
//onSelect: myOnSelectFunction, // this will be run in addition to directive internals
templateUrl: "template/typeahead/typeahead-popup.htmlzzzzzzzzz"
//templateUrl: "template/typeahead/typeahead-popup.htmlzzzzzzzzz"
//waitMs: 500,
//allowsEditable: true
};
Expand Down
2 changes: 1 addition & 1 deletion src/app/listen/listen.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ <h4>Annotation edit</h4>
<tags options="taggerOptions"
typeahead-options="typeaheadOpts"
ng-model="model.selectedAudioEvent.taggings"
src="b for t in tags"></tags>
src="s for t in tags"></tags>
</fieldset>
<fieldset ng-disabled="singleEditDisabled()">
<legend>
Expand Down
27 changes: 15 additions & 12 deletions src/app/tags/tags.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
angular.module('bawApp.tags', [])

.controller('TagsCtrl', ['$scope', '$resource', '$routeParams', 'Tag',

function TagsCtrl($scope, $resource, $routeParams, Tag) {

}])

.controller('TagCtrl', ['$scope', '$resource', '$routeParams', 'Tag',


function TagCtrl($scope, $resource, $routeParams, Tag) {

}]);
// these controller names conflicted with the angular-tags component.
// since we don't use them they have been disabled.
// .controller('zzzzzzzzzzzzzzzzzzTagsCtrl', ['$scope', '$resource', '$routeParams', 'Tag',
//
// function TagsCtrl($scope, $resource, $routeParams, Tag) {
//
// }])
//
// .controller('zzzzzzzzzzzzzTagCtrl', ['$scope', '$resource', '$routeParams', 'Tag',
//
//
// function TagCtrl($scope, $resource, $routeParams, Tag) {
//
// }])
;

0 comments on commit a5b8420

Please sign in to comment.