Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-ora2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-ora2
Commits
7063f2f3
Commit
7063f2f3
authored
Mar 13, 2014
by
Will Daly
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #140 from edx/will/update-save-error-dom
Put save status in an h3 tag to preserve styling
parents
20c90070
78325414
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
apps/openassessment/xblock/static/js/src/oa_base.js
+13
-3
No files found.
apps/openassessment/xblock/static/js/src/oa_base.js
View file @
7063f2f3
...
@@ -281,17 +281,27 @@ OpenAssessment.BaseUI.prototype = {
...
@@ -281,17 +281,27 @@ OpenAssessment.BaseUI.prototype = {
// Retrieve the student's response from the DOM
// Retrieve the student's response from the DOM
var
submission
=
$
(
'#submission__answer__value'
,
this
.
element
).
val
();
var
submission
=
$
(
'#submission__answer__value'
,
this
.
element
).
val
();
var
ui
=
this
;
var
ui
=
this
;
$
(
'#response__save_status'
,
this
.
element
).
html
(
'Saving...'
);
this
.
setSaveStatus
(
'Saving...'
);
this
.
toggleActionError
(
'save'
,
null
);
this
.
toggleActionError
(
'save'
,
null
);
this
.
server
.
save
(
submission
).
done
(
function
()
{
this
.
server
.
save
(
submission
).
done
(
function
()
{
$
(
'#response__save_status'
,
this
.
element
).
html
(
"Saved but not submitted"
);
ui
.
setSaveStatus
(
"Saved but not submitted"
);
}).
fail
(
function
(
errMsg
)
{
}).
fail
(
function
(
errMsg
)
{
$
(
"#response__save_status"
,
ui
.
element
).
html
(
'Error'
);
ui
.
setSaveStatus
(
'Error'
);
ui
.
toggleActionError
(
'save'
,
errMsg
);
ui
.
toggleActionError
(
'save'
,
errMsg
);
});
});
},
},
/**
/**
Display a save status message.
Args:
msg (str): The message to display.
**/
setSaveStatus
:
function
(
msg
)
{
$
(
'#response__save_status h3'
,
this
.
element
).
html
(
msg
);
},
/**
Send a submission to the server and update the UI.
Send a submission to the server and update the UI.
**/
**/
submit
:
function
()
{
submit
:
function
()
{
...
...
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