Skip to content

Commit

Permalink
Added in juqery-ui dependency.
Browse files Browse the repository at this point in the history
Jshint issues fixed.

Fixed bug that meant annotation IDs were returned as strings (opposed to numbers).

started splitting directives out into their own files - for sanity.

removed uncessary anonymous function initiation wrappers.
  • Loading branch information
atruskie committed Oct 7, 2013
1 parent 3283539 commit eca8d25
Show file tree
Hide file tree
Showing 13 changed files with 852 additions and 843 deletions.
3 changes: 2 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"hint.css": "https://github.com/chinchang/hint.css.git",
"underscore": "~1.5.2",
"angular-resource": "~1.0.8",
"modernizr": "~2.6.2"
"modernizr": "~2.6.2",
"jquery-ui": "~1.10.3"
},
"dependencies": {}
}
2 changes: 2 additions & 0 deletions build.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ module.exports = {
vendor_files: {
js: [
'vendor/jquery/jquery.js',
// TODO: THIS IS TERRIBLE! REMOVE UI ASAP... OR AT LEAST ONLY INCLUDE RELEVANT COMPONENTS
'vendor/jquery-ui/ui/jquery-ui.js',
'vendor/angular/angular.js',
'vendor/angular-route/angular-route.js',
'vendor/angular-resource/angular-resource.js',
Expand Down
90 changes: 45 additions & 45 deletions src/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ var app = angular.module('baw',
'ui.utils', /* angular-ui project */

'bawApp.configuration', /* a mapping of all static path configurations
and a module that contains all app configuration */
'url', /* a custom uri formatter */
and a module that contains all app configuration */
'url', /* a custom uri formatter */

'templates-app', /* these are the precompiled templates */
'templates-common',
Expand Down Expand Up @@ -86,62 +86,62 @@ var app = angular.module('baw',
'bawApp.users'
])

.config(['$routeProvider', '$locationProvider', '$httpProvider', 'conf.paths', '$sceDelegateProvider'
, function ($routeProvider, $locationProvider, $httpProvider, paths, $sceDelegateProvider) {
// adjust security whitelist for resource urls
var currentWhitelist = $sceDelegateProvider.resourceUrlWhitelist();
currentWhitelist.push(paths.api.root);
$sceDelegateProvider.resourceUrlWhitelist(currentWhitelist);
.config(['$routeProvider', '$locationProvider', '$httpProvider', 'conf.paths', '$sceDelegateProvider',
function ($routeProvider, $locationProvider, $httpProvider, paths, $sceDelegateProvider) {
// adjust security whitelist for resource urls
var currentWhitelist = $sceDelegateProvider.resourceUrlWhitelist();
currentWhitelist.push(paths.api.root);
$sceDelegateProvider.resourceUrlWhitelist(currentWhitelist);


$routeProvider.whenDefaults = whenDefaults;
$routeProvider.fluidIf = baw.fluidIf;
$routeProvider.whenDefaults = whenDefaults;
$routeProvider.fluidIf = baw.fluidIf;

// routes
$routeProvider.
when('/home', {templateUrl: '/assets/home.html', controller: 'HomeCtrl'}).
// routes
$routeProvider.
when('/home', {templateUrl: '/assets/home.html', controller: 'HomeCtrl'}).

whenDefaults("projects", "project", ":projectId", 'ProjectsCtrl', 'ProjectCtrl').
whenDefaults("sites", "site", ":siteId", 'SitesCtrl', 'SiteCtrl').
whenDefaults("photos", "photo", ":photoId", 'PhotosCtrl', 'PhotoCtrl').
whenDefaults("bookmarks", "bookmark", ":bookmarkId", 'BookmarksCtrl', 'BookmarkCtrl').
whenDefaults("searches", "search", ":searchId", 'SearchesCtrl', 'SearchCtrl').
whenDefaults("tags", "tag", ":tagId", 'TagsCtrl', 'TagCtrl').
whenDefaults("audioEvents", "audioEvent", ":audioEventId", 'AudioEventsCtrl', 'AudioEventCtrl').
whenDefaults("users", "user", ":userId", 'UsersCtrl', 'UserCtrl').
whenDefaults("projects", "project", ":projectId", 'ProjectsCtrl', 'ProjectCtrl').
whenDefaults("sites", "site", ":siteId", 'SitesCtrl', 'SiteCtrl').
whenDefaults("photos", "photo", ":photoId", 'PhotosCtrl', 'PhotoCtrl').
whenDefaults("bookmarks", "bookmark", ":bookmarkId", 'BookmarksCtrl', 'BookmarkCtrl').
whenDefaults("searches", "search", ":searchId", 'SearchesCtrl', 'SearchCtrl').
whenDefaults("tags", "tag", ":tagId", 'TagsCtrl', 'TagCtrl').
whenDefaults("audioEvents", "audioEvent", ":audioEventId", 'AudioEventsCtrl', 'AudioEventCtrl').
whenDefaults("users", "user", ":userId", 'UsersCtrl', 'UserCtrl').

when('/recordings', {templateUrl: '/assets/recordings.html', controller: 'RecordingsCtrl' }).
when('/recordings/:recordingId', {templateUrl: '/assets/recording.html', controller: 'RecordingCtrl' }).
when('/recordings', {templateUrl: '/assets/recordings.html', controller: 'RecordingsCtrl' }).
when('/recordings/:recordingId', {templateUrl: '/assets/recording.html', controller: 'RecordingCtrl' }).

when('/listen', {templateUrl: paths.site.files.listen, controller: 'ListenCtrl'}).
when('/listen/:recordingId', {templateUrl: paths.site.files.listen, controller: 'ListenCtrl'}).
//when('/listen/:recordingId/start=:start/end=:end', {templateUrl: paths.site.files.listen, controller: 'ListenCtrl'}).
when('/listen', {templateUrl: paths.site.files.listen, controller: 'ListenCtrl'}).
when('/listen/:recordingId', {templateUrl: paths.site.files.listen, controller: 'ListenCtrl'}).
//when('/listen/:recordingId/start=:start/end=:end', {templateUrl: paths.site.files.listen, controller: 'ListenCtrl'}).

when('/accounts', {templateUrl: '/assets/accounts_sign_in.html', controller: 'AccountsCtrl'}).
when('/accounts/:action', {templateUrl: '/assets/accounts_sign_in.html', controller: 'AccountsCtrl'}).
when('/accounts', {templateUrl: '/assets/accounts_sign_in.html', controller: 'AccountsCtrl'}).
when('/accounts/:action', {templateUrl: '/assets/accounts_sign_in.html', controller: 'AccountsCtrl'}).

when('/attribution', {templateUrl: '/assets/attributions.html'}).
when('/attribution', {templateUrl: '/assets/attributions.html'}).

// experiments
when('/experiments/:experiment', {templateUrl: '/assets/experiment_base.html', controller: 'ExperimentsCtrl'}).
// experiments
when('/experiments/:experiment', {templateUrl: '/assets/experiment_base.html', controller: 'ExperimentsCtrl'}).


// missing route page
when('/', {templateUrl: paths.site.files.home, controller: 'HomeCtrl'}).
when('/404', {templateUrl: paths.site.files.error404, controller: 'ErrorCtrl'}).
when('/404?path=:errorPath', {templateUrl: paths.site.files.error404, controller: 'ErrorCtrl'}).
otherwise({
redirectTo: function (params, location, search) {
return '/404?path=' + location;
}
});
// missing route page
when('/', {templateUrl: paths.site.files.home, controller: 'HomeCtrl'}).
when('/404', {templateUrl: paths.site.files.error404, controller: 'ErrorCtrl'}).
when('/404?path=:errorPath', {templateUrl: paths.site.files.error404, controller: 'ErrorCtrl'}).
otherwise({
redirectTo: function (params, location, search) {
return '/404?path=' + location;
}
});

// location config
$locationProvider.html5Mode(true);
// location config
$locationProvider.html5Mode(true);

// http default configuration
$httpProvider.defaults.withCredentials = true;
}])
// http default configuration
$httpProvider.defaults.withCredentials = true;
}])


.run(['$rootScope', '$location', '$route', '$http', 'AudioEvent', function ($rootScope, $location, $route, $http, AudioEvent) {
Expand Down
2 changes: 1 addition & 1 deletion src/common/100-String.format.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ returns: 'some string with first value and second value injected using {property

var diff = {};
if (trimObject) {
if (Object.keys(params).length === 1 && params["0"] == "") {
if (Object.keys(params).length === 1 && params["0"] === "") {
diff = null;
trimObject = false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/common/jquery.drawabox.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@
var selectedAttr = $element.attr(SELECTED_ATTRIBUTE);

return {
id: $element.attr(dataIdKey),
id: parseInt($element.attr(dataIdKey), 10),
left: removePx($element.css("left")),
top: removePx($element.css("top")),
width: removePx($element.css("width")) + BORDER_MODEL_DIFFERANCE, // box model - border not included in widths
Expand Down
Loading

0 comments on commit eca8d25

Please sign in to comment.