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
357aa594
Commit
357aa594
authored
10 years ago
by
Manuel Herrmann
Browse files
Options
Downloads
Patches
Plain Diff
story: summary: use text from php
parent
4a59a604
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
registration-system/view/js/story.js
+33
-29
33 additions, 29 deletions
registration-system/view/js/story.js
with
33 additions
and
29 deletions
registration-system/view/js/story.js
+
33
−
29
View file @
357aa594
...
@@ -175,7 +175,7 @@ Story.prototype.initSummary = function()
...
@@ -175,7 +175,7 @@ Story.prototype.initSummary = function()
this
.
summaryTable
=
$
(
'
<table class="story_summary"/>
'
)
this
.
summaryTable
=
$
(
'
<table class="story_summary"/>
'
)
this
.
summary
.
append
(
this
.
summaryTable
);
this
.
summary
.
append
(
this
.
summaryTable
);
var
rowOrder
=
[
"
forname
"
,
"
name
"
,
"
anzeig
"
,
"
mehl
"
,
"
andaytyp
"
,
"
abdaytyp
"
,
"
age
"
];
var
rowOrder
=
[
"
forname
"
,
"
name
"
,
"
anzeig
"
,
"
mehl
"
,
"
andaytyp
"
,
"
abdaytyp
"
,
"
eat
"
,
"
age
"
];
var
rows
=
{
var
rows
=
{
forname
:
forname
:
"
Vorname
"
,
"
Vorname
"
,
...
@@ -186,11 +186,13 @@ Story.prototype.initSummary = function()
...
@@ -186,11 +186,13 @@ Story.prototype.initSummary = function()
mehl
:
mehl
:
"
eMail
"
,
"
eMail
"
,
andaytyp
:
andaytyp
:
"
Anreise Tag
/
Typ
"
,
"
Anreise Tag
/
Typ
"
,
abdaytyp
:
abdaytyp
:
"
Abreise Tag/Typ
"
,
"
Abreise Tag / Typ
"
,
eat
:
"
Essenswahl
"
,
age
:
age
:
"
Al
ter
"
"
Un
ter
18?
"
};
};
for
(
var
i
=
0
;
i
<
rowOrder
.
length
;
++
i
)
for
(
var
i
=
0
;
i
<
rowOrder
.
length
;
++
i
)
...
@@ -200,7 +202,7 @@ Story.prototype.initSummary = function()
...
@@ -200,7 +202,7 @@ Story.prototype.initSummary = function()
this
.
summaryTable
.
append
(
'
<tr><td>
'
+
rowTitle
+
'
</td><td id="story_summary_
'
+
rowName
+
'
"></td></tr>
'
);
this
.
summaryTable
.
append
(
'
<tr><td>
'
+
rowTitle
+
'
</td><td id="story_summary_
'
+
rowName
+
'
"></td></tr>
'
);
}
}
this
.
summaryTable
.
append
(
'
<tr><td colspan="2"> </td></tr>
'
);
this
.
summaryTable
.
append
(
'
<tr><td colspan="2"> </td></tr>
'
);
this
.
summaryTable
.
append
(
'
<tr><td colspan="2">Daten Ok? Dann <button onclick="storySubmit()">
A
nmelden</button>.</td></tr>
'
);
this
.
summaryTable
.
append
(
'
<tr><td colspan="2">Daten Ok? Dann <button onclick="storySubmit()">
a
nmelden</button>.</td></tr>
'
);
}
}
// === Update View ===
// === Update View ===
...
@@ -208,9 +210,10 @@ Story.prototype.initSummary = function()
...
@@ -208,9 +210,10 @@ Story.prototype.initSummary = function()
$
(
'
#story_summary_name
'
).
text
(
this
.
form_variables
.
name
);
$
(
'
#story_summary_name
'
).
text
(
this
.
form_variables
.
name
);
$
(
'
#story_summary_anzeig
'
).
text
(
this
.
form_variables
.
anzeig
);
$
(
'
#story_summary_anzeig
'
).
text
(
this
.
form_variables
.
anzeig
);
$
(
'
#story_summary_mehl
'
).
text
(
this
.
form_variables
.
mehl
);
$
(
'
#story_summary_mehl
'
).
text
(
this
.
form_variables
.
mehl
);
$
(
'
#story_summary_andaytyp
'
).
text
(
this
.
form_variables
.
travelStartDate
+
"
,
"
+
this
.
form_variables
.
travelStartType
);
$
(
'
#story_summary_andaytyp
'
).
text
(
this
.
form_variables
.
travelStartDate
+
"
,
"
+
Story
.
travelMapPhp
[
Story
.
travelMap
[
this
.
form_variables
.
travelStartType
]]);
$
(
'
#story_summary_abdaytyp
'
).
text
(
this
.
form_variables
.
travelEndDate
+
"
,
"
+
this
.
form_variables
.
travelEndType
);
$
(
'
#story_summary_abdaytyp
'
).
text
(
this
.
form_variables
.
travelEndDate
+
"
,
"
+
Story
.
travelMapPhp
[
Story
.
travelMap
[
this
.
form_variables
.
travelEndType
]]);
$
(
'
#story_summary_age
'
).
text
(
this
.
form_variables
.
age
);
$
(
'
#story_summary_eat
'
).
text
(
Story
.
eatMap
[
this
.
form_variables
.
eat
]);
$
(
'
#story_summary_age
'
).
text
(
Story
.
ageMap
[
this
.
form_variables
.
age
]);
}
}
Story
.
prototype
.
initTravelStart
=
function
()
Story
.
prototype
.
initTravelStart
=
function
()
{
{
...
@@ -667,20 +670,9 @@ Story.prototype.toolTippedStoryWarning = function(page, x, y, field, toolTipText
...
@@ -667,20 +670,9 @@ Story.prototype.toolTippedStoryWarning = function(page, x, y, field, toolTipText
return
warning
;
return
warning
;
}
}
$
(
function
()
function
storySubmit
()
{
{
var
formWrapper
=
$
(
'
<div style="display:none"/>
'
);
Story
.
eatMap
=
{
var
form
=
$
(
'
<form name="storySubmitForm" method="POST"/>
'
);
formWrapper
.
append
(
form
);
$
(
'
#storybox
'
).
append
(
formWrapper
);
function
formAppendText
(
name
,
value
)
{
form
.
append
(
'
<input name="
'
+
name
+
'
" value="
'
+
value
.
replace
(
/
[\r\n]
/g
,
"
"
).
replace
(
/&/g
,
"
&
"
).
replace
(
/"/g
,
"
"
"
)
+
'
"/>
'
);
}
var
eatMap
=
{
cow
:
cow
:
"
Alles
"
,
"
Alles
"
,
cheese
:
cheese
:
...
@@ -688,35 +680,47 @@ function storySubmit()
...
@@ -688,35 +680,47 @@ function storySubmit()
wheat
:
wheat
:
"
Vegan
"
"
Vegan
"
};
};
var
ageMap
=
{
Story
.
ageMap
=
{
eighteenplus
:
eighteenplus
:
"
Nein
"
,
"
Nein
"
,
below
:
below
:
"
Ja
"
"
Ja
"
};
};
var
travelMapPhp
=
config_get_travel_types
();
Story
.
travelMapPhp
=
config_get_travel_types
();
travelMap
=
{
Story
.
travelMap
=
{
car
:
car
:
"
AUTO
"
,
"
AUTO
"
,
oeffi
:
oeffi
:
"
BUSBAHN
"
,
"
BUSBAHN
"
,
bike
:
bike
:
"
RAD
"
,
"
RAD
"
,
camel
:
camel
:
"
INDIVIDUELL
"
"
INDIVIDUELL
"
};
};
});
function
storySubmit
()
{
var
formWrapper
=
$
(
'
<div style="display:none"/>
'
);
var
form
=
$
(
'
<form name="storySubmitForm" method="POST"/>
'
);
formWrapper
.
append
(
form
);
$
(
'
#storybox
'
).
append
(
formWrapper
);
function
formAppendText
(
name
,
value
)
{
form
.
append
(
'
<input name="
'
+
name
+
'
" value="
'
+
value
.
replace
(
/
[\r\n]
/g
,
"
"
).
replace
(
/&/g
,
"
&
"
).
replace
(
/"/g
,
"
"
"
)
+
'
"/>
'
);
}
formAppendText
(
'
forname
'
,
story
.
form_variables
.
forname
);
formAppendText
(
'
forname
'
,
story
.
form_variables
.
forname
);
formAppendText
(
'
sirname
'
,
story
.
form_variables
.
name
);
formAppendText
(
'
sirname
'
,
story
.
form_variables
.
name
);
formAppendText
(
'
pseudo
'
,
story
.
form_variables
.
anzeig
);
formAppendText
(
'
pseudo
'
,
story
.
form_variables
.
anzeig
);
formAppendText
(
'
mehl
'
,
story
.
form_variables
.
mehl
);
formAppendText
(
'
mehl
'
,
story
.
form_variables
.
mehl
);
formAppendText
(
'
studityp
'
,
'
Ersti
'
);
// ?
formAppendText
(
'
studityp
'
,
'
Ersti
'
);
// ?
formAppendText
(
'
virgin
'
,
ageMap
[
story
.
form_variables
.
age
]
||
''
);
formAppendText
(
'
virgin
'
,
Story
.
ageMap
[
story
.
form_variables
.
age
]
||
''
);
formAppendText
(
'
essen
'
,
eatMap
[
story
.
form_variables
.
eat
]
||
''
);
formAppendText
(
'
essen
'
,
Story
.
eatMap
[
story
.
form_variables
.
eat
]
||
''
);
formAppendText
(
'
anday
'
,
story
.
form_variables
.
travelStartDate
);
formAppendText
(
'
anday
'
,
story
.
form_variables
.
travelStartDate
);
formAppendText
(
'
antyp
'
,
travelMapPhp
[
travelMap
[
story
.
form_variables
.
travelStartType
]]);
formAppendText
(
'
antyp
'
,
Story
.
travelMapPhp
[
Story
.
travelMap
[
story
.
form_variables
.
travelStartType
]]);
formAppendText
(
'
abday
'
,
story
.
form_variables
.
travelEndDate
);
formAppendText
(
'
abday
'
,
story
.
form_variables
.
travelEndDate
);
formAppendText
(
'
abtyp
'
,
travelMapPhp
[
travelMap
[
story
.
form_variables
.
travelEndType
]]);
formAppendText
(
'
abtyp
'
,
Story
.
travelMapPhp
[
Story
.
travelMap
[
story
.
form_variables
.
travelEndType
]]);
formAppendText
(
'
comment
'
,
'
This form was created with VisualPotato3D
'
);
// ?
formAppendText
(
'
comment
'
,
'
This form was created with VisualPotato3D
'
);
// ?
// formAppendText('public', ''); // ?
// formAppendText('public', ''); // ?
// form.append('<input type="submit" name="submit" />');
// form.append('<input type="submit" name="submit" />');
...
...
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