Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sg_routes
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
TYPO3
sg_routes
Commits
7bcafab6
Commit
7bcafab6
authored
Feb 12, 2019
by
Kevin Ditscheid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[BUGFIX± Fix pagetree selection in backend module
parent
53880d3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
Resources/Public/JavaScript/Backend.js
Resources/Public/JavaScript/Backend.js
+18
-2
No files found.
Resources/Public/JavaScript/Backend.js
View file @
7bcafab6
...
...
@@ -23,14 +23,20 @@
***************************************************************/
define
([
'
jquery
'
],
function
(
$
)
{
'
jquery
'
,
'
TYPO3/CMS/Backend/ModuleMenu
'
,
'
TYPO3/CMS/Backend/Viewport
'
],
function
(
$
,
ModuleMenu
,
Viewport
)
{
'
use strict
'
;
var
SgRoutes
=
{
init
:
function
()
{
$
(
'
.btn-delete-all
'
).
on
(
'
click
'
,
SgRoutes
.
deleteAllListener
);
$
.
get
(
TYPO3
.
settings
.
ajaxUrls
[
'
sg_routes::ajaxPing
'
]);
$
(
'
.sg-routes_pageswitch
'
).
on
(
'
click
'
,
function
(
event
)
{
event
.
preventDefault
();
SgRoutes
.
goTo
(
'
web_SgRoutesRoute
'
,
event
.
target
.
dataset
.
page
);
});
},
/**
* Deletes all routes
...
...
@@ -58,6 +64,16 @@ define([
window
.
location
.
href
=
editLink
.
data
(
'
url
'
)
+
'
&returnUrl=
'
+
T3_THIS_LOCATION
;
}
}
},
goTo
:
function
(
module
,
id
)
{
var
pageTreeNodes
=
Viewport
.
NavigationContainer
.
PageTree
.
instance
.
nodes
;
for
(
var
nodeIndex
in
pageTreeNodes
)
{
if
(
pageTreeNodes
.
hasOwnProperty
(
nodeIndex
)
&&
pageTreeNodes
[
nodeIndex
].
identifier
===
parseInt
(
id
))
{
Viewport
.
NavigationContainer
.
PageTree
.
selectNode
(
pageTreeNodes
[
nodeIndex
]);
break
;
}
}
ModuleMenu
.
App
.
showModule
(
module
,
'
id=
'
+
id
);
}
};
...
...
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