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
3cfadb8a
Commit
3cfadb8a
authored
May 21, 2013
by
David Baumgold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrated internationalization text into template for section name
parent
fa330784
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
+5
-8
cms/static/js/views/section.js
+3
-6
cms/templates/js/section-name-edit.underscore
+2
-2
No files found.
cms/static/js/views/section.js
View file @
3cfadb8a
CMS
.
Views
.
SectionShow
=
Backbone
.
View
.
extend
({
template
:
_
.
template
(
'<span data-tooltip="<%=
tooltip
%>" class="section-name-span"><%= name %></span>'
),
template
:
_
.
template
(
'<span data-tooltip="<%=
gettext("Edit this section
\'
s name")
%>" class="section-name-span"><%= name %></span>'
),
render
:
function
()
{
var
attrs
=
{
name
:
this
.
model
.
escape
(
'name'
),
tooltip
:
gettext
(
"Edit this section's name"
)
name
:
this
.
model
.
escape
(
'name'
)
};
this
.
$el
.
html
(
this
.
template
(
attrs
));
this
.
delegateEvents
();
...
...
@@ -25,9 +24,7 @@ CMS.Views.SectionShow = Backbone.View.extend({
CMS
.
Views
.
SectionEdit
=
Backbone
.
View
.
extend
({
render
:
function
()
{
var
attrs
=
{
name
:
this
.
model
.
escape
(
'name'
),
save
:
gettext
(
"Save"
),
cancel
:
gettext
(
"Cancel"
)
name
:
this
.
model
.
escape
(
'name'
)
};
this
.
$el
.
html
(
this
.
template
(
attrs
));
this
.
delegateEvents
();
...
...
cms/templates/js/section-name-edit.underscore
View file @
3cfadb8a
<form class="section-name-edit">
<input type="text" value="<%= name %>" autocomplete="off"/>
<input type="submit" class="save-button" value="<%=
save
%>" />
<input type="button" class="cancel-button" value="<%=
cancel
%>" />
<input type="submit" class="save-button" value="<%=
gettext("Save")
%>" />
<input type="button" class="cancel-button" value="<%=
gettext("Cancel")
%>" />
</form>
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