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
3229aaf5
Commit
3229aaf5
authored
May 20, 2013
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Call polyfill at right time.
parent
aa41aed9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
11 deletions
+14
-11
cms/static/coffee/src/views/module_edit.coffee
+0
-3
cms/static/js/views/metadata_editor_view.js
+14
-8
common/static/js/vendor/html5-input-polyfills/number-polyfill.js
+0
-0
No files found.
cms/static/coffee/src/views/module_edit.coffee
View file @
3229aaf5
...
...
@@ -29,9 +29,6 @@ class CMS.Views.ModuleEdit extends Backbone.View
model
:
new
Backbone
.
Model
(
metadataEditor
.
data
(
'metadata'
))
});
#Manually runs polyfill for input number types to correct for Firefox non-support
#numberPolyfill()
# Need to update set "active" class on data editor if there is one.
# If we are only showing settings, hide the data editor controls and update settings accordingly.
if
@
hasDataEditor
()
...
...
cms/static/js/views/metadata_editor_view.js
View file @
3229aaf5
...
...
@@ -100,12 +100,15 @@ CMS.Views.Metadata.AbstractEditor = Backbone.View.extend({
showClearButton
:
function
()
{
if
(
!
this
.
$el
.
hasClass
(
'is-set'
))
{
this
.
$el
.
addClass
(
'is-set'
);
// TODO: can we use toggleclass?
this
.
$el
.
find
(
'.setting-clear'
).
removeClass
(
'inactive'
);
this
.
$el
.
find
(
'.setting-clear'
).
addClass
(
'active'
);
this
.
getClearButton
().
removeClass
(
'inactive'
);
this
.
getClearButton
().
addClass
(
'active'
);
}
},
getClearButton
:
function
()
{
return
this
.
$el
.
find
(
'.setting-clear'
);
},
render
:
function
()
{
if
(
!
this
.
template
)
return
;
...
...
@@ -116,9 +119,8 @@ CMS.Views.Metadata.AbstractEditor = Backbone.View.extend({
}
else
{
this
.
$el
.
removeClass
(
'is-set'
);
// TODO: can we use toggleclass?
this
.
$el
.
find
(
'.setting-clear'
).
addClass
(
'inactive'
);
this
.
$el
.
find
(
'.setting-clear'
).
removeClass
(
'active'
);
this
.
getClearButton
().
addClass
(
'inactive'
);
this
.
getClearButton
().
removeClass
(
'active'
);
}
}
});
...
...
@@ -154,7 +156,7 @@ CMS.Views.Metadata.Number = CMS.Views.Metadata.AbstractEditor.extend({
render
:
function
()
{
CMS
.
Views
.
Metadata
.
AbstractEditor
.
prototype
.
render
.
apply
(
this
);
if
(
!
this
.
in
putAttributesSet
)
{
if
(
!
this
.
in
itialized
)
{
var
min
=
"min"
;
var
max
=
"max"
;
var
step
=
"step"
;
...
...
@@ -175,7 +177,11 @@ CMS.Views.Metadata.Number = CMS.Views.Metadata.AbstractEditor.extend({
if
(
stepValue
!==
undefined
)
{
this
.
$el
.
find
(
'input'
).
attr
(
step
,
stepValue
);
}
this
.
inputAttributesSet
=
true
;
// Manually runs polyfill for input number types to correct for Firefox non-support
this
.
$el
.
find
(
'.setting-input-number'
).
inputNumber
();
this
.
initialized
=
true
;
}
},
...
...
common/static/js/vendor/html5-input-polyfills/number-polyfill.js
View file @
3229aaf5
This diff is collapsed.
Click to expand it.
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