Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
fsfahrttool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fsini-informatik
fsfahrttool
Commits
4f3b0839
Commit
4f3b0839
authored
10 years ago
by
Manuel Herrmann
Browse files
Options
Downloads
Patches
Plain Diff
story mode travel tooltips
parent
e51d119f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
registration-system/view/js/story.js
+51
-4
51 additions, 4 deletions
registration-system/view/js/story.js
registration-system/view/style.css
+6
-0
6 additions, 0 deletions
registration-system/view/style.css
with
57 additions
and
4 deletions
registration-system/view/js/story.js
+
51
−
4
View file @
4f3b0839
var
debug
=
fals
e
;
var
debug
=
tru
e
;
var
story
;
var
story
;
...
@@ -120,12 +120,15 @@ Story.prototype.initTravelStart = function()
...
@@ -120,12 +120,15 @@ Story.prototype.initTravelStart = function()
$
(
this
).
stop
(
true
,
true
).
effect
(
"
highlight
"
);
$
(
this
).
stop
(
true
,
true
).
effect
(
"
highlight
"
);
});
});
this
.
addComboBox
(
this
.
travelStartTicket
,
"
Datum
"
,
"
anday
"
,
[
""
,
"
21.12.2100
"
,
"
22.12.2100
"
],
105
,
70
);
// @TODO: get date options from php
this
.
travelStartTicket
.
append
(
'
<div style="position: absolute; left: 55px; top: 95px">Typ</div>
'
);
this
.
travelStartTicket
.
append
(
'
<div style="position: absolute; left: 105px; top: 95px">------</div>
'
);
this
.
travelStartTypeButtons
=
this
.
addTravelTypeButtons
(
this
.
travelStart
);
this
.
travelStartTypeButtons
=
this
.
addTravelTypeButtons
(
this
.
travelStart
);
}
}
Story
.
prototype
.
addTravelTypeButtons
=
function
(
page
)
Story
.
prototype
.
addTravelTypeButtons
=
function
(
page
)
{
{
var
buttons
=
var
buttons
=
{
{
car
:
car
:
$
(
'
<div style="position: absolute; border: 1px solid; left: 23px; top: 222px; width: 129px; height: 87px; cursor: pointer;"> </div>
'
),
$
(
'
<div style="position: absolute; border: 1px solid; left: 23px; top: 222px; width: 129px; height: 87px; cursor: pointer;"> </div>
'
),
bike
:
bike
:
...
@@ -135,14 +138,44 @@ Story.prototype.addTravelTypeButtons = function(page)
...
@@ -135,14 +138,44 @@ Story.prototype.addTravelTypeButtons = function(page)
camel
:
camel
:
$
(
'
<div style="position: absolute; border: 1px solid; left: 461px; top: 114px; width: 78px; height: 71px; cursor: pointer;"> </div>
'
)
$
(
'
<div style="position: absolute; border: 1px solid; left: 461px; top: 114px; width: 78px; height: 71px; cursor: pointer;"> </div>
'
)
};
};
var
tips
=
{
car
:
$
(
'
<div class="storyTip" style="left: 8px; top: 314px; display:none">Anfahrt mit dem Auto</div>
'
),
bike
:
$
(
'
<div class="storyTip" style="left: 127px; top: 444px; display:none">Anfahrt mit dem Fahrrad</div>
'
),
oeffi
:
$
(
'
<div class="storyTip" style="left: 206px; top: 286px; display:none">Anfahrt gemeinsam mit den Öffentlichen</div>
'
),
camel
:
$
(
'
<div class="storyTip" style="left: 391px; top: 190px; display:none">Anritt mit Kamel / Individuell</div>
'
)
};
var
help
=
{};
for
(
var
i
in
buttons
)
for
(
var
i
in
buttons
)
{
{
if
(
i
.
indexOf
(
'
Tip
'
)
==
i
.
length
-
3
)
continue
;
var
button
=
buttons
[
i
];
var
button
=
buttons
[
i
];
var
tip
=
tips
[
i
];
page
.
append
(
button
);
page
.
append
(
button
);
button
.
mouseenter
(
function
(
event
)
{
page
.
append
(
tip
);
button
.
mouseenter
(
function
()
{
$
(
this
).
stop
(
true
,
true
).
effect
(
"
highlight
"
);
$
(
this
).
stop
(
true
,
true
).
effect
(
"
highlight
"
);
});
});
function
setHover
(
tip
)
// function to keep 'tip' from changing (scope issue)
{
button
.
hover
(
function
()
// in
{
tip
.
stop
(
true
,
true
).
fadeIn
(
200
);
},
function
()
// out
{
tip
.
stop
(
true
,
true
).
fadeOut
(
200
);
});
}
setHover
(
tip
);
}
}
return
buttons
;
return
buttons
;
...
@@ -257,6 +290,20 @@ Story.prototype.storyImageDiv = function(filename)
...
@@ -257,6 +290,20 @@ Story.prototype.storyImageDiv = function(filename)
this
.
addFormText
(
bell
,
"
eMail
"
,
"
mehl
"
,
150
,
215
);
this
.
addFormText
(
bell
,
"
eMail
"
,
"
mehl
"
,
150
,
215
);
}
}
Story
.
prototype
.
addComboBox
=
function
(
parentNode
,
label
,
fieldName
,
options
,
x
,
y
)
{
var
form_label
=
$
(
'
<div>
'
+
label
+
'
</div>
'
);
var
form
=
$
(
'
<select name="
'
+
fieldName
+
'
"></select>
'
);
for
(
var
i
=
0
;
i
<
options
.
length
;
++
i
)
form
.
append
(
'
<option>
'
+
options
[
i
]
+
'
</option>
'
);
form_label
.
css
({
position
:
'
absolute
'
,
top
:
y
+
'
px
'
,
left
:
(
x
-
60
)
+
'
px
'
});
form
.
css
({
position
:
'
absolute
'
,
top
:
y
+
'
px
'
,
left
:
x
+
'
px
'
});
parentNode
.
append
(
form_label
);
parentNode
.
append
(
form
);
this
.
form_variables
[
fieldName
]
=
null
;
}
Story
.
prototype
.
addFormText
=
function
(
parentNode
,
label
,
fieldName
,
x
,
y
)
Story
.
prototype
.
addFormText
=
function
(
parentNode
,
label
,
fieldName
,
x
,
y
)
{
{
var
form_label
=
$
(
'
<div>
'
+
label
+
'
:</div>
'
);
var
form_label
=
$
(
'
<div>
'
+
label
+
'
:</div>
'
);
...
...
This diff is collapsed.
Click to expand it.
registration-system/view/style.css
+
6
−
0
View file @
4f3b0839
...
@@ -126,6 +126,12 @@ div#storycanvas {
...
@@ -126,6 +126,12 @@ div#storycanvas {
height
:
500px
;
height
:
500px
;
overflow
:
hidden
;
overflow
:
hidden
;
}
}
div
.storyTip
{
position
:
absolute
;
border
:
1px
solid
;
background
:
#fff
;
padding
:
2px
;
}
div
#headerbox
h2
{
div
#headerbox
h2
{
padding-top
:
10px
;
padding-top
:
10px
;
...
...
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