Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
tub-floorplan
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
23
Issues
23
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tobias Zeumer
tub-floorplan
Commits
429a0296
Commit
429a0296
authored
Apr 23, 2020
by
Tobias Zeumer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add url parameters for all display options (new: showPOI, showRoomId, showSubjects, showStaffview)
parent
61aacee0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
2 deletions
+31
-2
index.php
index.php
+1
-1
js/tubmap.js
js/tubmap.js
+30
-1
No files found.
index.php
View file @
429a0296
...
...
@@ -378,7 +378,7 @@
<input
type=
"checkbox"
id=
"smQ"
>
<ul
class=
"sub-menu"
>
<li><a
href=
"https://collaborating.tuhh.de/tobias.zeumer/tub-floorplan"
lang=
"de"
data-lang-token=
"tokenized_example"
>
Über
</a></li>
<li><a
href=
"index.php?l
evel=EG&mapDetails=5
&signature=ti:tie-123"
>
Url params
</a></li>
<li><a
href=
"index.php?l
ang=de&level=EG&mapDetails=5&showPOI=1&showRoomId=1&showSubjects=1&showStaffview=1
&signature=ti:tie-123"
>
Url params
</a></li>
</ul>
</li>
...
...
js/tubmap.js
View file @
429a0296
...
...
@@ -629,7 +629,7 @@ function toggleDetail(max_lvl) {
# SEARCH AND HIGHLIGHT (Helpers)
############################################################################# */
/**
* Select level, search or set details per URL param
a
ters
* Select level, search or set details per URL param
e
ters
* @todo: Remove setTimeout
*/
function
process_url_params
()
{
...
...
@@ -668,6 +668,35 @@ function process_url_params() {
// Already implicit level select by other parameter?
if
(
implicitLvlSelect
==
false
)
toggleLevel
(
level
);
// Hide (0) or show (1) POIs ; Dirty timeout workaround for event queuing
if
(
urlParam
.
showPOI
==
0
||
urlParam
.
showPOI
==
1
)
{
setTimeout
(
function
()
{
if
(
$
(
'
#tgl_poi
'
).
prop
(
"
checked
"
)
!=
urlParam
.
showPOI
)
$
(
'
#tgl_poi
'
).
click
();
},
0
);
}
// Hide (0) or show (1) Room Numbers ; Dirty timeout workaround for event queuing
if
(
urlParam
.
showRoomId
==
0
||
urlParam
.
showRoomId
==
1
)
{
setTimeout
(
function
()
{
if
(
$
(
'
#tgl_roomid
'
).
prop
(
"
checked
"
)
!=
urlParam
.
showRoomId
)
$
(
'
#tgl_roomid
'
).
click
();
},
0
);
}
// Hide (0) or show (1) Subjects ; Dirty timeout workaround for event queuing
if
(
urlParam
.
showSubjects
==
0
||
urlParam
.
showSubjects
==
1
)
{
setTimeout
(
function
()
{
if
(
$
(
'
#tgl_lbl
'
).
prop
(
"
checked
"
)
!=
urlParam
.
showSubjects
)
$
(
'
#tgl_lbl
'
).
click
();
},
0
);
}
// Hide (0) or show (1) Staff View ; Dirty timeout workaround for event queuing
if
(
urlParam
.
showStaffview
==
0
||
urlParam
.
showStaffview
==
1
)
{
setTimeout
(
function
()
{
if
(
$
(
'
#tgl_staffview
'
).
prop
(
"
checked
"
)
!=
urlParam
.
showStaffview
)
$
(
'
#tgl_staffview
'
).
click
();
},
0
);
}
}
...
...
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