Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
timepicker
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
timepicker
Commits
fe005ed7
Commit
fe005ed7
authored
7 years ago
by
Ivan Tibezh
Committed by
Ivan Tibezh
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2934704
by tibezh: Fixed Drupal coding standards according to the ESLint.
parent
8f755e47
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
js/timepicker.jonthornton.js
+11
-11
11 additions, 11 deletions
js/timepicker.jonthornton.js
js/timepicker.jquery-addon-timepicker.js
+16
-16
16 additions, 16 deletions
js/timepicker.jquery-addon-timepicker.js
js/timepicker.jquery-ui-timepicker.js
+11
-11
11 additions, 11 deletions
js/timepicker.jquery-ui-timepicker.js
with
38 additions
and
38 deletions
js/timepicker.jonthornton.js
+
11
−
11
View file @
fe005ed7
...
...
@@ -5,7 +5,6 @@
(
function
(
$
)
{
'
use strict
'
;
// Fix conflicts.
$
.
fn
.
jonthorntonTimepicker
=
$
.
fn
.
timepicker
;
...
...
@@ -13,19 +12,20 @@
Drupal
.
behaviors
.
jqueryJonthorntonTimepicker
=
{
attach
:
function
(
context
,
settings
)
{
if
(
undefined
!==
settings
.
timepicker
.
jonthornton_timepicker
)
{
if
(
typeof
settings
.
timepicker
.
jonthornton_timepicker
!==
'
undefined
'
)
{
for
(
var
fieldName
in
settings
.
timepicker
.
jonthornton_timepicker
)
{
// Find the element by field name.
var
$element
=
$
(
'
input[name^="
'
+
fieldName
+
'
["][type="time"]
'
,
context
);
if
({}.
hasOwnProperty
.
call
(
settings
.
timepicker
.
jonthornton_timepicker
,
fieldName
))
{
// Find the element by field name.
var
$element
=
$
(
'
input[name^="
'
+
fieldName
+
'
["][type="time"]
'
,
context
);
// Build options object.
var
customOptions
=
settings
.
timepicker
.
jonthornton_timepicker
[
fieldName
];
// The Jonthornton Timepicker works with 'H:i:s' time format.
var
requiredOptions
=
{
timeFormat
:
'
H:i:s
'
};
var
options
=
Object
.
assign
(
customOptions
,
requiredOptions
);
$element
.
jonthorntonTimepicker
(
options
).
attr
(
'
type
'
,
'
text
'
);
// Build options object.
var
customOptions
=
settings
.
timepicker
.
jonthornton_timepicker
[
fieldName
];
// The Jonthornton Timepicker works with 'H:i:s' time format.
var
requiredOptions
=
{
timeFormat
:
'
H:i:s
'
};
var
options
=
Object
.
assign
(
customOptions
,
requiredOptions
);
$element
.
jonthorntonTimepicker
(
options
).
attr
(
'
type
'
,
'
text
'
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
js/timepicker.jquery-addon-timepicker.js
+
16
−
16
View file @
fe005ed7
...
...
@@ -5,7 +5,6 @@
(
function
(
$
)
{
'
use strict
'
;
// Fix conflicts.
$
.
fn
.
addonTimepicker
=
$
.
fn
.
timepicker
;
...
...
@@ -13,24 +12,25 @@
Drupal
.
behaviors
.
jqueryAddonTimepicker
=
{
attach
:
function
(
context
,
settings
)
{
if
(
undefined
!==
settings
.
timepicker
.
jquery_addon_timepicker
)
{
if
(
typeof
settings
.
timepicker
.
jquery_addon_timepicker
!==
'
undefined
'
)
{
for
(
var
fieldName
in
settings
.
timepicker
.
jquery_addon_timepicker
)
{
// Find the element by field name.
var
$element
=
$
(
'
input[name^="
'
+
fieldName
+
'
["][type="time"]
'
,
context
);
if
({}.
hasOwnProperty
.
call
(
settings
.
timepicker
.
jquery_addon_timepicker
,
fieldName
))
{
// Find the element by field name.
var
$element
=
$
(
'
input[name^="
'
+
fieldName
+
'
["][type="time"]
'
,
context
);
// Build options object.
var
customOptions
=
settings
.
timepicker
.
jquery_addon_timepicker
[
fieldName
];
// Set default hour and minute for the AddonTimepicker.
var
timeValues
=
$element
.
val
().
split
(
'
:
'
);
var
requiredOptions
=
{
"
hour
"
:
timeValues
[
0
],
"
minute
"
:
timeValues
[
1
]
};
var
options
=
Object
.
assign
(
customOptions
,
requiredOptions
);
// Apply the AddonTimepicker.
$element
.
addonTimepicker
(
options
);
// Build options object.
var
customOptions
=
settings
.
timepicker
.
jquery_addon_timepicker
[
fieldName
];
// Set default hour and minute for the AddonTimepicker.
var
timeValues
=
$element
.
val
().
split
(
'
:
'
);
var
requiredOptions
=
{
hour
:
timeValues
[
0
],
minute
:
timeValues
[
1
]
};
var
options
=
Object
.
assign
(
customOptions
,
requiredOptions
);
// Apply the AddonTimepicker.
$element
.
addonTimepicker
(
options
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
js/timepicker.jquery-ui-timepicker.js
+
11
−
11
View file @
fe005ed7
...
...
@@ -4,7 +4,6 @@
*/
(
function
(
$
)
{
'
use strict
'
;
// Fix conflicts.
$
.
fn
.
uiTimepicker
=
$
.
fn
.
timepicker
;
...
...
@@ -12,19 +11,20 @@
Drupal
.
behaviors
.
jqueryUiTimepicker
=
{
attach
:
function
(
context
,
settings
)
{
if
(
undefined
!==
settings
.
timepicker
.
jquery_ui_timepicker
)
{
if
(
typeof
settings
.
timepicker
.
jquery_ui_timepicker
!==
'
undefined
'
)
{
for
(
var
fieldName
in
settings
.
timepicker
.
jquery_ui_timepicker
)
{
// Find the element by field name.
var
$element
=
$
(
'
input[name^="
'
+
fieldName
+
'
["][type="time"]
'
,
context
);
if
({}.
hasOwnProperty
.
call
(
settings
.
timepicker
.
jquery_ui_timepicker
,
fieldName
))
{
// Find the element by field name.
var
$element
=
$
(
'
input[name^="
'
+
fieldName
+
'
["][type="time"]
'
,
context
);
// Build options object.
var
customOptions
=
settings
.
timepicker
.
jquery_ui_timepicker
[
fieldName
];
// Set default hour and minute for the jQueryUITimepicker.
var
requiredOptions
=
{};
var
options
=
Object
.
assign
(
customOptions
,
requiredOptions
);
$element
.
uiTimepicker
(
options
);
// Build options object.
var
customOptions
=
settings
.
timepicker
.
jquery_ui_timepicker
[
fieldName
];
// Set default hour and minute for the jQueryUITimepicker.
var
requiredOptions
=
{};
var
options
=
Object
.
assign
(
customOptions
,
requiredOptions
);
$element
.
uiTimepicker
(
options
);
}
}
}
}
...
...
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