Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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-platform
Commits
0dc34465
Commit
0dc34465
authored
May 09, 2013
by
David Baumgold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle saving popup
parent
91cdb1e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
cms/static/js/models/feedback.js
+2
-1
cms/templates/base.html
+6
-2
No files found.
cms/static/js/models/feedback.js
View file @
0dc34465
...
...
@@ -5,7 +5,8 @@ CMS.Models.SystemFeedback = Backbone.Model.extend({
"message"
:
null
,
"shown"
:
true
,
"close"
:
false
,
// show a close button?
"icon"
:
true
// show an icon?
"icon"
:
true
,
// show an icon?
"status"
:
false
// example: "saving" popup
/* could also have an "actions" hash: here is an example demonstrating
the expected structure
"actions": {
...
...
cms/templates/base.html
View file @
0dc34465
...
...
@@ -54,7 +54,11 @@
<!-- templates -->
<
%
text
>
<script
id=
"system-feedback-tpl"
type=
"text/template"
>
<
div
class
=
"wrapper wrapper-<%= viewType %> wrapper-<%= viewType %>-<%= modelType %> <% if(obj.shown) { %>is-shown<% } else { %>is-hiding<% } %>"
<
div
class
=
"wrapper
wrapper-<%= viewType %>
wrapper-<%= viewType %>-<%= modelType %>
<% if(obj.status) { %>wrapper-<%= viewType %>-status <% } %>
<% if(obj.shown) { %>is-shown<% } else { %>is-hiding<% } %>"
id
=
"<%= viewType %>-<%= modelType %>"
aria
-
hidden
=
"<% if(obj.shown) { %>false<% } else { %>true<% } %>"
aria
-
labelledby
=
"<%= viewType %>-<%= modelType %>-title"
...
...
@@ -63,7 +67,7 @@
>
<
div
class
=
"<%= modelType %> <%= viewType %> <% if(obj.actions) { %>has-actions <% } %>"
>
<%
if
(
icon
)
{
%>
<%
var
iconText
=
{
"warning"
:
"⚠"
,
"confirmation"
:
"✓"
,
"error"
:
"⚠"
,
"announcement"
:
"📢"
,
"step-required"
:
""
,
"help"
:
"❓"
}
%>
<%
var
iconText
=
{
"warning"
:
"⚠"
,
"confirmation"
:
"✓"
,
"error"
:
"⚠"
,
"announcement"
:
"📢"
,
"step-required"
:
""
,
"help"
:
"❓"
,
"saving"
:
"⚙"
}
%>
<
i
class
=
"ss-icon ss-symbolicons-block icon icon-<%= modelType %>"
><%=
iconText
[
modelType
]
%><
/i
>
<%
}
%>
...
...
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