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
8b13ff3d
Commit
8b13ff3d
authored
Jul 11, 2013
by
Peter Fogg
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #376 from edx/peter-fogg/rename-notification-save
Rename CMS.Views.Notification.Saving to Mini.
parents
5b4524d7
9c8f6372
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
14 deletions
+13
-14
cms/static/coffee/spec/views/feedback_spec.coffee
+2
-2
cms/static/coffee/spec/views/overview_spec.coffee
+1
-1
cms/static/coffee/spec/views/textbook_spec.coffee
+1
-1
cms/static/js/base.js
+1
-1
cms/static/js/models/section.js
+1
-1
cms/static/js/views/feedback.js
+5
-6
cms/static/js/views/textbook.js
+2
-2
No files found.
cms/static/coffee/spec/views/feedback_spec.coffee
View file @
8b13ff3d
...
...
@@ -102,9 +102,9 @@ describe "CMS.Views.Prompt", ->
view
.
hide
()
# expect($("body")).not.toHaveClass("prompt-is-shown")
describe
"CMS.Views.Notification.
Saving
"
,
->
describe
"CMS.Views.Notification.
Mini
"
,
->
beforeEach
->
@
view
=
new
CMS
.
Views
.
Notification
.
Saving
()
@
view
=
new
CMS
.
Views
.
Notification
.
Mini
()
it
"should have minShown set to 1250 by default"
,
->
expect
(
@
view
.
options
.
minShown
).
toEqual
(
1250
)
...
...
cms/static/coffee/spec/views/overview_spec.coffee
View file @
8b13ff3d
...
...
@@ -43,7 +43,7 @@ describe "Course Overview", ->
spyOn
(
window
,
'saveSetSectionScheduleDate'
).
andCallThrough
()
# Have to do this here, as it normally gets bound in document.ready()
$
(
'a.save-button'
).
click
(
saveSetSectionScheduleDate
)
@
notificationSpy
=
spyOn
(
CMS
.
Views
.
Notification
.
Saving
.
prototype
,
'show'
).
andCallThrough
()
@
notificationSpy
=
spyOn
(
CMS
.
Views
.
Notification
.
Mini
.
prototype
,
'show'
).
andCallThrough
()
window
.
analytics
=
jasmine
.
createSpyObj
(
'analytics'
,
[
'track'
])
window
.
course_location_analytics
=
jasmine
.
createSpy
()
sinon
.
useFakeXMLHttpRequest
()
...
...
cms/static/coffee/spec/views/textbook_spec.coffee
View file @
8b13ff3d
...
...
@@ -73,7 +73,7 @@ describe "CMS.Views.ShowTextbook", ->
@
xhr
=
sinon
.
useFakeXMLHttpRequest
()
@
xhr
.
onCreate
=
(
xhr
)
->
requests
.
push
(
xhr
)
@
savingSpies
=
spyOnConstructor
(
CMS
.
Views
.
Notification
,
"
Saving
"
,
@
savingSpies
=
spyOnConstructor
(
CMS
.
Views
.
Notification
,
"
Mini
"
,
[
"show"
,
"hide"
])
@
savingSpies
.
show
.
andReturn
(
@
savingSpies
)
...
...
cms/static/js/base.js
View file @
8b13ff3d
...
...
@@ -712,7 +712,7 @@ function saveSetSectionScheduleDate(e) {
'start'
:
start
});
var
saving
=
new
CMS
.
Views
.
Notification
.
Saving
({
var
saving
=
new
CMS
.
Views
.
Notification
.
Mini
({
title
:
gettext
(
"Saving"
)
+
"…"
,
});
saving
.
show
();
...
...
cms/static/js/models/section.js
View file @
8b13ff3d
...
...
@@ -22,7 +22,7 @@ CMS.Models.Section = Backbone.Model.extend({
},
showNotification
:
function
()
{
if
(
!
this
.
msg
)
{
this
.
msg
=
new
CMS
.
Views
.
Notification
.
Saving
({
this
.
msg
=
new
CMS
.
Views
.
Notification
.
Mini
({
title
:
gettext
(
"Saving"
)
+
"…"
});
}
...
...
cms/static/js/views/feedback.js
View file @
8b13ff3d
...
...
@@ -185,7 +185,7 @@ CMS.Views.Prompt = CMS.Views.SystemFeedback.extend({
var
capitalCamel
,
types
,
intents
;
capitalCamel
=
_
.
compose
(
_
.
str
.
capitalize
,
_
.
str
.
camelize
);
types
=
[
"alert"
,
"notification"
,
"prompt"
];
intents
=
[
"warning"
,
"error"
,
"confirmation"
,
"announcement"
,
"step-required"
,
"help"
,
"
saving
"
];
intents
=
[
"warning"
,
"error"
,
"confirmation"
,
"announcement"
,
"step-required"
,
"help"
,
"
mini
"
];
_
.
each
(
types
,
function
(
type
)
{
_
.
each
(
intents
,
function
(
intent
)
{
// "class" is a reserved word in Javascript, so use "klass" instead
...
...
@@ -201,8 +201,7 @@ _.each(types, function(type) {
});
});
// set more sensible defaults for Notification-Saving views
var
savingOptions
=
CMS
.
Views
.
Notification
.
Saving
.
prototype
.
options
;
savingOptions
.
minShown
=
1250
;
savingOptions
.
closeIcon
=
false
;
// set more sensible defaults for Notification-Mini views
var
miniOptions
=
CMS
.
Views
.
Notification
.
Mini
.
prototype
.
options
;
miniOptions
.
minShown
=
1250
;
miniOptions
.
closeIcon
=
false
;
cms/static/js/views/textbook.js
View file @
8b13ff3d
...
...
@@ -34,7 +34,7 @@ CMS.Views.ShowTextbook = Backbone.View.extend({
text
:
gettext
(
"Delete"
),
click
:
function
(
view
)
{
view
.
hide
();
var
delmsg
=
new
CMS
.
Views
.
Notification
.
Saving
({
var
delmsg
=
new
CMS
.
Views
.
Notification
.
Mini
({
title
:
gettext
(
"Deleting"
)
+
"…"
}).
show
();
textbook
.
destroy
({
...
...
@@ -121,7 +121,7 @@ CMS.Views.EditTextbook = Backbone.View.extend({
if
(
e
&&
e
.
preventDefault
)
{
e
.
preventDefault
();
}
this
.
setValues
();
if
(
!
this
.
model
.
isValid
())
{
return
;
}
var
saving
=
new
CMS
.
Views
.
Notification
.
Saving
({
var
saving
=
new
CMS
.
Views
.
Notification
.
Mini
({
title
:
gettext
(
"Saving"
)
+
"…"
}).
show
();
var
that
=
this
;
...
...
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