Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
my-cucumbers-ru-github-io
Project
Project
Details
Activity
Releases
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Лотуга Данила Сергеевич
my-cucumbers-ru-github-io
Commits
12fc4747
Commit
12fc4747
authored
Aug 01, 2011
by
Oleg Roschupkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update onclick slide check to be more flexible.
parent
54a2d333
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
7 deletions
+18
-7
script.js
scripts/script.js
+18
-7
No files found.
scripts/script.js
View file @
12fc4747
...
...
@@ -80,18 +80,29 @@
updateProgress
(
slide_number
);
}
}
function
getContainingSlideId
(
el
)
{
var
node
=
el
;
while
(
'BODY'
!==
node
.
nodeName
)
{
if
(
-
1
!==
node
.
className
.
indexOf
(
'slide'
))
{
return
node
.
id
;
}
else
{
node
=
node
.
parentNode
;
}
}
return
''
;
}
function
dispatchSingleSlideMode
(
e
)
{
if
(
'SECTION'
===
e
.
target
.
nodeName
&&
-
1
!==
e
.
target
.
parentNode
.
parentNode
.
className
.
indexOf
(
'slide'
)
&&
isSlideListMode
()
)
{
var
slideId
=
getContainingSlideId
(
e
.
target
);
if
(
''
!==
slideId
&&
isSlideListMode
())
{
e
.
preventDefault
();
// NOTE: we should update hash to get things work properly
url
.
hash
=
'#'
+
e
.
target
.
parentNode
.
parentNode
.
i
d
;
history
.
replaceState
(
null
,
null
,
url
.
pathname
+
'?full#'
+
e
.
target
.
parentNode
.
parentNode
.
i
d
);
url
.
hash
=
'#'
+
slideI
d
;
history
.
replaceState
(
null
,
null
,
url
.
pathname
+
'?full#'
+
slideI
d
);
enterSingleSlideMode
();
updateProgress
(
getCurrentSlideNumber
());
...
...
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