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
a1f73f7b
Commit
a1f73f7b
authored
Feb 18, 2016
by
cahrens
Committed by
Andy Armstrong
Mar 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify how underscore.string is referred to.
parent
dd2a2036
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
23 additions
and
41 deletions
+23
-41
common/static/common/js/components/views/feedback_alert.js
+1
-1
common/static/common/js/components/views/feedback_notification.js
+1
-1
common/static/common/js/components/views/feedback_prompt.js
+1
-1
common/static/common/js/utils/edx.utils.validate.js
+0
-3
lms/envs/common.py
+1
-0
lms/static/js/certificates/models/certificate_exception.js
+0
-1
lms/static/js/certificates/models/certificate_invalidation.js
+0
-1
lms/static/js/spec/main.js
+7
-17
lms/static/js/student_account/views/AccessView.js
+0
-4
lms/static/js/verify_student/views/step_view.js
+5
-8
lms/static/lms/js/build.js
+1
-0
lms/static/lms/js/require-config.js
+6
-0
lms/templates/commerce/checkout_receipt.html
+0
-1
lms/templates/verify_student/incourse_reverify.html
+0
-1
lms/templates/verify_student/pay_and_verify.html
+0
-1
lms/templates/verify_student/reverify.html
+0
-1
No files found.
common/static/common/js/components/views/feedback_alert.js
View file @
a1f73f7b
...
...
@@ -2,7 +2,7 @@
'use strict'
;
define
([
"jquery"
,
"underscore"
,
"underscore.string"
,
"common/js/components/views/feedback"
],
function
(
$
,
_
,
str
,
SystemFeedbackView
)
{
str
=
str
||
_
.
str
;
var
Alert
=
SystemFeedbackView
.
extend
({
options
:
$
.
extend
({},
SystemFeedbackView
.
prototype
.
options
,
{
type
:
"alert"
...
...
common/static/common/js/components/views/feedback_notification.js
View file @
a1f73f7b
...
...
@@ -2,7 +2,7 @@
'use strict'
;
define
([
"jquery"
,
"underscore"
,
"underscore.string"
,
"common/js/components/views/feedback"
],
function
(
$
,
_
,
str
,
SystemFeedbackView
)
{
str
=
str
||
_
.
str
;
var
Notification
=
SystemFeedbackView
.
extend
({
options
:
$
.
extend
({},
SystemFeedbackView
.
prototype
.
options
,
{
type
:
"notification"
,
...
...
common/static/common/js/components/views/feedback_prompt.js
View file @
a1f73f7b
...
...
@@ -2,7 +2,7 @@
'use strict'
;
define
([
"jquery"
,
"underscore"
,
"underscore.string"
,
"common/js/components/views/feedback"
],
function
(
$
,
_
,
str
,
SystemFeedbackView
)
{
str
=
str
||
_
.
str
;
var
Prompt
=
SystemFeedbackView
.
extend
({
options
:
$
.
extend
({},
SystemFeedbackView
.
prototype
.
options
,
{
type
:
"prompt"
,
...
...
common/static/common/js/utils/edx.utils.validate.js
View file @
a1f73f7b
...
...
@@ -15,9 +15,6 @@
* by the access view, but doing it here helps keep the
* utility self-contained.
*/
if
(
_
.
isUndefined
(
_s
))
{
_s
=
_
.
str
;
}
_
.
mixin
(
_s
.
exports
()
);
utils
=
(
function
(){
...
...
lms/envs/common.py
View file @
a1f73f7b
...
...
@@ -1237,6 +1237,7 @@ base_vendor_js = [
'js/vendor/jquery.cookie.js'
,
'js/vendor/url.min.js'
,
'js/vendor/underscore-min.js'
,
'js/vendor/underscore.string.min.js'
,
'js/vendor/requirejs/require.js'
,
'js/RequireJS-namespace-undefine.js'
,
'js/vendor/URI.min.js'
,
...
...
lms/static/js/certificates/models/certificate_exception.js
View file @
a1f73f7b
...
...
@@ -12,7 +12,6 @@
],
function
(
_
,
str
,
Backbone
,
gettext
){
str
=
str
||
_
.
str
;
return
Backbone
.
Model
.
extend
({
idAttribute
:
'id'
,
...
...
lms/static/js/certificates/models/certificate_invalidation.js
View file @
a1f73f7b
...
...
@@ -8,7 +8,6 @@
[
'underscore'
,
'underscore.string'
,
'gettext'
,
'backbone'
],
function
(
_
,
str
,
gettext
,
Backbone
)
{
str
=
str
||
_
.
str
;
return
Backbone
.
Model
.
extend
({
idAttribute
:
'id'
,
...
...
lms/static/js/spec/main.js
View file @
a1f73f7b
...
...
@@ -181,22 +181,7 @@
},
'underscore'
:
{
deps
:
[
'underscore.string'
],
exports
:
'_'
,
init
:
function
(
UnderscoreString
)
{
/* Mix non-conflicting functions from underscore.string
* (all but include, contains, and reverse) into the
* Underscore namespace. This allows the login, register,
* and password reset templates to render independent of the
* access view.
*/
_
.
mixin
(
UnderscoreString
.
exports
());
/* Since the access view is not using RequireJS, we also
* expose underscore.string at _.str, so that the access
* view can perform the mixin on its own.
*/
_
.
str
=
UnderscoreString
;
}
exports
:
'_'
},
'backbone'
:
{
deps
:
[
'underscore'
,
'jquery'
],
...
...
@@ -374,7 +359,12 @@
},
'js/verify_student/views/step_view'
:
{
exports
:
'edx.verify_student.StepView'
,
deps
:
[
'jquery'
,
'underscore'
,
'underscore.string'
,
'backbone'
,
'gettext'
]
deps
:
[
'jquery'
,
'underscore'
,
'underscore.string'
,
'backbone'
,
'gettext'
],
init
:
function
()
{
// Set global variables that the payment code is expecting to be defined
window
.
_
=
require
(
'underscore'
);
window
.
_
.
str
=
require
(
'underscore.string'
);
}
},
'js/verify_student/views/intro_step_view'
:
{
exports
:
'edx.verify_student.IntroStepView'
,
...
...
lms/static/js/student_account/views/AccessView.js
View file @
a1f73f7b
...
...
@@ -19,10 +19,6 @@
function
(
$
,
utility
,
_
,
_s
,
Backbone
,
LoginModel
,
PasswordResetModel
,
RegisterModel
,
LoginView
,
PasswordResetView
,
RegisterView
,
InstitutionLoginView
,
HintedLoginView
)
{
if
(
_
.
isUndefined
(
_s
))
{
_s
=
_
.
str
;
}
return
Backbone
.
View
.
extend
({
tpl
:
'#access-tpl'
,
events
:
{
...
...
lms/static/js/verify_student/views/step_view.js
View file @
a1f73f7b
/*global jQuery, _, Backbone, gettext */
/**
* Base view for defining steps in the payment/verification flow.
*
...
...
@@ -8,7 +10,7 @@
*/
var
edx
=
edx
||
{};
(
function
(
$
,
_
,
_s
,
Backbone
,
gettext
)
{
(
function
(
$
,
_
,
Backbone
,
gettext
)
{
'use strict'
;
edx
.
verify_student
=
edx
.
verify_student
||
{};
...
...
@@ -21,13 +23,8 @@
/* Mix non-conflicting functions from underscore.string
* (all but include, contains, and reverse) into the
* Underscore namespace.
*
* TODO: when running unit tests, _s is not defined. My first attempt at upgrading
* underscore.string did not solve this issue.
*/
if
(
_s
)
{
_
.
mixin
(
_s
.
exports
());
}
_
.
mixin
(
_
.
str
.
exports
());
},
render
:
function
()
{
...
...
@@ -106,4 +103,4 @@
});
})(
jQuery
,
_
,
_
.
str
,
Backbone
,
gettext
);
})(
jQuery
,
_
,
Backbone
,
gettext
);
lms/static/lms/js/build.js
View file @
a1f73f7b
...
...
@@ -66,6 +66,7 @@
'jquery.url'
:
'empty:'
,
'backbone'
:
'empty:'
,
'underscore'
:
'empty:'
,
'underscore.string'
:
'empty:'
,
'logger'
:
'empty:'
,
'utility'
:
'empty:'
,
'URI'
:
'empty:'
,
...
...
lms/static/lms/js/require-config.js
View file @
a1f73f7b
...
...
@@ -19,6 +19,12 @@
};
defineDependency
(
"jQuery"
,
"jquery"
);
defineDependency
(
"_"
,
"underscore"
);
if
(
window
.
_
&&
window
.
_
.
str
)
{
define
(
"underscore.string"
,
[],
function
()
{
return
window
.
_
.
str
;});
}
else
{
console
.
error
(
"Expected _.str (underscore.string) to be on the window object, but not found."
);
}
defineDependency
(
"gettext"
,
"gettext"
);
defineDependency
(
"Logger"
,
"logger"
);
defineDependency
(
"URI"
,
"URI"
);
...
...
lms/templates/commerce/checkout_receipt.html
View file @
a1f73f7b
...
...
@@ -19,7 +19,6 @@ from django.utils.translation import ugettext as _
</
%
block>
<
%
block
name=
"js_extra"
>
<script
src=
"${static.url('js/vendor/jquery.ajax-retry.js')}"
></script>
<script
src=
"${static.url('js/vendor/underscore.string.min.js')}"
></script>
<script
src=
"${static.url('js/src/tooltip_manager.js')}"
></script>
<script
src=
"${static.url('js/commerce/credit.js')}"
></script>
<script
src=
"${static.url('js/commerce/views/receipt_view.js')}"
></script>
...
...
lms/templates/verify_student/incourse_reverify.html
View file @
a1f73f7b
...
...
@@ -18,7 +18,6 @@ from django.utils.translation import ugettext as _
% endfor
</
%
block>
<
%
block
name=
"js_extra"
>
<script
src=
"${static.url('js/vendor/underscore.string.min.js')}"
></script>
<script
src=
"${static.url('js/src/tooltip_manager.js')}"
></script>
<
%
static:js
group=
'incourse_reverify'
/>
</
%
block>
...
...
lms/templates/verify_student/pay_and_verify.html
View file @
a1f73f7b
...
...
@@ -41,7 +41,6 @@ from lms.djangoapps.verify_student.views import PayAndVerifyView
% endfor
</
%
block>
<
%
block
name=
"js_extra"
>
<script
src=
"${static.url('js/vendor/underscore.string.min.js')}"
></script>
<script
src=
"${static.url('js/src/tooltip_manager.js')}"
></script>
<
%
static:js
group=
'verify_student'
/>
</
%
block>
...
...
lms/templates/verify_student/reverify.html
View file @
a1f73f7b
...
...
@@ -16,7 +16,6 @@ from django.utils.translation import ugettext as _
% endfor
</
%
block>
<
%
block
name=
"js_extra"
>
<script
src=
"${static.url('js/vendor/underscore.string.min.js')}"
></script>
<script
src=
"${static.url('js/src/tooltip_manager.js')}"
></script>
<
%
static:js
group=
'reverify'
/>
</
%
block>
...
...
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