Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
2c5a1983
Commit
2c5a1983
authored
15 years ago
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#444402
by sun: clean up of parseInt() usage.
parent
efab1afc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
misc/tabledrag.js
+6
-6
6 additions, 6 deletions
misc/tabledrag.js
misc/tableheader.js
+1
-1
1 addition, 1 deletion
misc/tableheader.js
modules/color/color.js
+1
-1
1 addition, 1 deletion
modules/color/color.js
with
8 additions
and
8 deletions
misc/tabledrag.js
+
6
−
6
View file @
2c5a1983
...
...
@@ -293,7 +293,7 @@ Drupal.tableDrag.prototype.makeDraggable = function (item) {
self
.
rowObject
.
swap
(
'
before
'
,
previousRow
);
self
.
rowObject
.
interval
=
null
;
self
.
rowObject
.
indent
(
0
);
window
.
scrollBy
(
0
,
-
parseInt
(
item
.
offsetHeight
));
window
.
scrollBy
(
0
,
-
parseInt
(
item
.
offsetHeight
,
10
));
}
handle
.
get
(
0
).
focus
();
// Regain focus after the DOM manipulation.
}
...
...
@@ -325,7 +325,7 @@ Drupal.tableDrag.prototype.makeDraggable = function (item) {
nextGroupRow
=
$
(
nextGroup
.
group
).
filter
(
'
:last
'
).
get
(
0
);
self
.
rowObject
.
swap
(
'
after
'
,
nextGroupRow
);
// No need to check for indentation, 0 is the only valid one.
window
.
scrollBy
(
0
,
parseInt
(
groupHeight
));
window
.
scrollBy
(
0
,
parseInt
(
groupHeight
,
10
));
}
}
else
{
...
...
@@ -333,7 +333,7 @@ Drupal.tableDrag.prototype.makeDraggable = function (item) {
self
.
rowObject
.
swap
(
'
after
'
,
nextRow
);
self
.
rowObject
.
interval
=
null
;
self
.
rowObject
.
indent
(
0
);
window
.
scrollBy
(
0
,
parseInt
(
item
.
offsetHeight
));
window
.
scrollBy
(
0
,
parseInt
(
item
.
offsetHeight
,
10
));
}
handle
.
get
(
0
).
focus
();
// Regain focus after the DOM manipulation.
}
...
...
@@ -524,11 +524,11 @@ Drupal.tableDrag.prototype.findDropTargetRow = function (x, y) {
// table cells, grab the firstChild of the row and use that instead.
// http://jacob.peargrove.com/blog/2006/technical/table-row-offsettop-bug-in-safari.
if
(
row
.
offsetHeight
==
0
)
{
var
rowHeight
=
parseInt
(
row
.
firstChild
.
offsetHeight
)
/
2
;
var
rowHeight
=
parseInt
(
row
.
firstChild
.
offsetHeight
,
10
)
/
2
;
}
// Other browsers.
else
{
var
rowHeight
=
parseInt
(
row
.
offsetHeight
)
/
2
;
var
rowHeight
=
parseInt
(
row
.
offsetHeight
,
10
)
/
2
;
}
// Because we always insert before, we need to offset the height a bit.
...
...
@@ -697,7 +697,7 @@ Drupal.tableDrag.prototype.updateField = function (changedRow, group) {
}
else
{
// Assume a numeric input field.
var
weight
=
parseInt
(
$
(
targetClass
,
siblings
[
0
]).
val
())
||
0
;
var
weight
=
parseInt
(
$
(
targetClass
,
siblings
[
0
]).
val
()
,
10
)
||
0
;
$
(
targetClass
,
siblings
).
each
(
function
()
{
this
.
value
=
weight
;
weight
++
;
...
...
This diff is collapsed.
Click to expand it.
misc/tableheader.js
+
1
−
1
View file @
2c5a1983
...
...
@@ -10,7 +10,7 @@ Drupal.tableHeaderDoScroll = function () {
Drupal
.
behaviors
.
tableHeader
=
{
attach
:
function
(
context
,
settings
)
{
// This breaks in anything less than IE 7. Prevent it from running.
if
(
$
.
browser
.
msie
&&
parseInt
(
$
.
browser
.
version
)
<
7
)
{
if
(
$
.
browser
.
msie
&&
parseInt
(
$
.
browser
.
version
,
10
)
<
7
)
{
return
;
}
...
...
This diff is collapsed.
Click to expand it.
modules/color/color.js
+
1
−
1
View file @
2c5a1983
...
...
@@ -26,7 +26,7 @@ Drupal.behaviors.color = {
// Build a preview.
$
(
'
#preview
'
).
once
(
'
color
'
).
append
(
'
<div id="gradient"></div>
'
);
var
gradient
=
$
(
'
#preview #gradient
'
);
var
h
=
parseInt
(
gradient
.
css
(
'
height
'
))
/
10
;
var
h
=
parseInt
(
gradient
.
css
(
'
height
'
)
,
10
)
/
10
;
for
(
i
=
0
;
i
<
h
;
++
i
)
{
gradient
.
append
(
'
<div class="gradient-line"></div>
'
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment