Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
a6d0c78d
Commit
a6d0c78d
authored
11 years ago
by
Will Daly
Browse files
Options
Downloads
Plain Diff
Merge pull request #2785 from edx/will/studio-oa-validation-fix
Studio OA validation dialog
parents
601b5a8c
a1f3db77
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cms/static/coffee/src/xblock/cms.runtime.v1.coffee
+14
-8
14 additions, 8 deletions
cms/static/coffee/src/xblock/cms.runtime.v1.coffee
with
14 additions
and
8 deletions
cms/static/coffee/src/xblock/cms.runtime.v1.coffee
+
14
−
8
View file @
a6d0c78d
...
...
@@ -20,6 +20,10 @@ define [
super
()
@
savingNotification
=
new
NotificationView
.
Mini
title
:
gettext
(
'Saving…'
)
@
alert
=
new
NotificationView
.
Error
title
:
"OpenAssessment Save Error"
,
closeIcon
:
false
,
shown
:
false
handlerUrl
:
(
element
,
handlerName
,
suffix
,
query
,
thirdparty
)
->
uri
=
URI
(
"/xblock"
).
segment
(
$
(
element
).
data
(
'usage-id'
))
...
...
@@ -41,11 +45,15 @@ define [
# Starting to save, so show the "Saving..." notification
if
data
.
state
==
'start'
@
_hideEditor
()
@
savingNotification
.
show
()
# Finished saving, so hide the "Saving..." notification
else
if
data
.
state
==
'end'
# Hide the editor *after* we finish saving in case there are validation
# errors that the user needs to correct.
@
_hideEditor
()
$
(
'.component.editing'
).
removeClass
(
'editing'
)
@
savingNotification
.
hide
()
...
...
@@ -54,7 +62,8 @@ define [
else
if
name
==
'error'
if
'msg'
of
data
@
_showAlert
(
data
.
msg
)
@
alert
.
options
.
message
=
data
.
msg
@
alert
.
show
()
_hideEditor
:
()
->
# This will close all open component editors, which works
...
...
@@ -64,9 +73,6 @@ define [
el
.
find
(
'.component-editor'
).
slideUp
(
150
)
ModalUtils
.
hideModalCover
()
_showAlert
:
(
msg
)
->
new
NotificationView
.
Error
({
title
:
"OpenAssessment Save Error"
,
message
:
msg
,
closeIcon
:
false
}).
show
()
# Hide any alerts that are being shown
if
@
alert
.
options
.
shown
@
alert
.
hide
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment