Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
MOOC packages by hacklab
django-courses-legacy
Commits
2a866e4e
Commit
2a866e4e
authored
1 year ago
by
Bruno Martin
Browse files
Options
Download
Email Patches
Plain Diff
code beauty
parent
a0bb8cfb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
8 deletions
+52
-8
courses_legacy/static/js/admin/new-course/controllers.js
courses_legacy/static/js/admin/new-course/controllers.js
+52
-8
No files found.
courses_legacy/static/js/admin/new-course/controllers.js
View file @
2a866e4e
...
...
@@ -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.
'
),
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment