rosa-build/app/assets/javascripts/angularjs/a_config.js.erb

42 lines
1.2 KiB
Plaintext
Raw Normal View History

var RosaABF = angular.module('RosaABF', ['ui.bootstrap', 'angular-i18n', 'angularMoment',
2014-04-11 09:57:00 +01:00
'chieffancypants.loadingBar', 'ngSanitize', 'templates',
2014-05-26 18:42:27 +01:00
'ui.codemirror', 'ngResource', 'ng-rails-csrf', 'ngCookies']);
2014-05-26 18:42:27 +01:00
RosaABF.factory('LocalesHelper', ['$locale', function($locale) {
var locales = {
'ru' : 'ru-ru',
'en' : 'en-us'
}
return {
setLocale: function(locale) {
$locale.id = locales[locale];
}
}
2014-04-22 17:29:32 +01:00
}]);
RosaABF.config(function(cfpLoadingBarProvider) {
cfpLoadingBarProvider.includeSpinner = false;
2014-05-26 18:42:27 +01:00
});
var SoundNotificationsHelper = function() {
var isOn = true;
var statusChangedSound = null;
soundManager.setup({
// url: '/assets/swf/',
preferFlash: false,
onready: function() {
statusChangedSound = soundManager.createSound({url: "<%=asset_path('garbage_shattering.wav')%>"});
}
});
return {
buildStatusChanged: function() {
if (isOn && statusChangedSound)
statusChangedSound.play();
},
enabled: function(status) {
isOn = status;
}
}
}
RosaABF.factory('SoundNotificationsHelper', SoundNotificationsHelper);