Commit 2a866e4e authored by Bruno Martin's avatar Bruno Martin
Browse files

code beauty

parent a0bb8cfb
......@@ -2,9 +2,46 @@
var app = angular.module('new-course');
app.controller('CourseEditController',
['$scope', '$window', '$uibModal', '$http', '$q', 'Course', 'CourseAuthor', 'Lesson', 'SimpleLesson', '$filter', 'youtubePlayerApi', 'VideoData', 'FormUpload', 'uibDateParser', 'SetLanguage', 'TranslationService', 'UserLocalStorage', 'Upload', 'Videos','gettextCatalog', 'EditLanguageSwitcherService',
function($scope, $window, $uibModal, $http , $q, Course, CourseProfessor, Lesson, SimpleLesson, $filter, youtubePlayerApi, VideoData, FormUpload, uibDateParser, SetLanguage, TranslationService, UserLocalStorage, Upload, Videos, gettextCatalog, EditLanguageSwitcherService) {
app.controller('CourseEditController', [
'$scope',
'$window',
'$uibModal',
'$http',
'$q',
'Course',
'CourseAuthor',
'SimpleLesson',
'$filter',
'youtubePlayerApi',
'VideoData',
'FormUpload',
'uibDateParser',
'SetLanguage',
'TranslationService',
'UserLocalStorage',
'Videos',
'gettextCatalog',
'EditLanguageSwitcherService',
function(
$scope,$window,
$uibModal,
$http,
$q,
Course,
CourseProfessor,
SimpleLesson,
$filter,
youtubePlayerApi,
VideoData,
FormUpload,
uibDateParser,
SetLanguage,
TranslationService,
UserLocalStorage,
Videos,
gettextCatalog,
EditLanguageSwitcherService
) {
$scope.availableLanguages = TranslationService.getAvailableLanguages();
......@@ -14,15 +51,22 @@
}
$scope.editingCourseLanguage = UserLocalStorage.get('editingCourseLanguage') || UserLocalStorage.get('currentLanguage');
$scope.modal_lang = UserLocalStorage.get('currentLanguage');
$scope.course_translations = [
'name', 'application', 'requirement', 'abstract', 'structure',
'workload', 'course_load', 'thumbnail', 'home_thumbnail',
'informations', 'description'
'name',
'application',
'requirement',
'abstract',
'structure',
'workload',
'course_load',
'thumbnail',
'home_thumbnail',
'informations',
'description'
]
$scope.modal_lang = UserLocalStorage.get('currentLanguage');
$scope.errors = {};
var httpErrors = {
'400': gettextCatalog.getString('Fields were not filled in correctly.'),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment