From 026cc44acb38ef2974eb9ab5528b172b067cb6a3 Mon Sep 17 00:00:00 2001 From: Manuel Herrmann <it@icetruck.de> Date: Mon, 22 Sep 2014 15:56:14 +0200 Subject: [PATCH] initial summary --- registration-system/view/js/story.js | 16 ++++++++++++---- registration-system/view/style.css | 3 +++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/registration-system/view/js/story.js b/registration-system/view/js/story.js index 0c40325..afde77c 100644 --- a/registration-system/view/js/story.js +++ b/registration-system/view/js/story.js @@ -164,6 +164,7 @@ Story.prototype.initTravelStartAnimation = function() } Story.prototype.initSummary = function() { + // === Init View === if (!this.summary) { this.summary = $('<div style="position:absolute; left: 0px; top: 0px"/>'); @@ -171,15 +172,17 @@ Story.prototype.initSummary = function() this.storybox.append(this.summary); this.summary.append('<h2>Zusammenfassung</h2>'); - this.summaryTable = $('<table/>') + this.summaryTable = $('<table class="story_summary"/>') this.summary.append(this.summaryTable); - var rowOrder = ["forname", "name", "mehl"]; + var rowOrder = ["forname", "name", "anzeig", "mehl"]; var rows = { forname: "Vorname", - nachname: + name: "Nachname", + anzeig: + "Anzeigename", mehl: "eMail" }; @@ -191,7 +194,12 @@ Story.prototype.initSummary = function() this.summaryTable.append('<tr><td>' + rowTitle + '</td><td id="story_summary_' + rowName + '"></td></tr>'); } } - // @TODO: update table each time + + // === Update View === + $('#story_summary_forname').text(this.form_variables.forname); + $('#story_summary_name').text(this.form_variables.name); + $('#story_summary_anzeig').text(this.form_variables.anzeig); + $('#story_summary_mehl').text(this.form_variables.mehl); } Story.prototype.initTravelStart = function() { diff --git a/registration-system/view/style.css b/registration-system/view/style.css index 2eec597..a637ea8 100644 --- a/registration-system/view/style.css +++ b/registration-system/view/style.css @@ -144,6 +144,9 @@ div.storyToolTip { background: #fff; border: 1px solid #000; } +table.story_summary { + padding-right: 10px; +} div#headerbox h2 { padding-top: 10px; -- GitLab