Bug 911273 - Add the submit button to the top of the page as well. r=edmorley
authorWes Kocher <wkocher@mozilla.com>
Fri, 13 Mar 2015 11:24:39 -0700
changeset 1514 e6720cf640e1
parent 1513 928dc210f588
child 1515 5507d424a283
push id875
push userkwierso@gmail.com
push dateFri, 13 Mar 2015 19:35:34 +0000
reviewersedmorley
bugs911273
Bug 911273 - Add the submit button to the top of the page as well. r=edmorley
mcmerge/css/style.css
mcmerge/js/Viewer.js
--- a/mcmerge/css/style.css
+++ b/mcmerge/css/style.css
@@ -316,16 +316,16 @@ div.ctr {
   margin: 0;
   padding: 0;
 }
 
 #explanation {
   width: 100%;
 }
 
-#submitButton {
+.submitButton {
   margin-top: 10px;
 }
 
 #expandButton {
   margin-top: 10px;
   margin-bottom: 10px;
 }
--- a/mcmerge/js/Viewer.js
+++ b/mcmerge/js/Viewer.js
@@ -579,18 +579,18 @@ var Viewer = {
     var html = '<div class="grid-12 divRight" id="expand">';
     html += '  <button type="button" class="expandButton" id="expandButton">Expand all comments</button>';
     html += '</div>';
     return html;
   },
 
 
   makeSubmitHTML: function viewer_makeSubmitHTML() {
-    var html = '<div class="grid-12 divRight" id="submit">';
-    html += '  <button type="button" class="submitButton" id="submitButton">Submit the changes above</button>';
+    var html = '<div class="grid-12 divRight" class="submit">';
+    html += '  <button type="button" class="submitButton">Submit the changes</button>';
     html += '</div>';
     return html;
   },
 
 
   makeHeadlineHTML: function viewer_makeHeadlineHTML(headline) {
     var html = '<div class="grid-12" id="headline">';
     html += '<h3>' + headline + '</h3>';
@@ -608,17 +608,17 @@ var Viewer = {
 
 
   updateHelpText: function viewer_updateHelpText() {
     $('#helpText').replaceWith(this.makeHelpHTML(this.step.getHelpText()));
   },
 
 
   updateSubmitButton: function viewer_updateSubmitButton() {
-    $('#submitButton').attr('disabled', !(this.step.canSubmit()));
+    $('.submitButton').attr('disabled', !(this.step.canSubmit()));
   },
 
 
   addChangeset: function viewer_addChangeset(index, isLast, classToAdd) {
     classToAdd = classToAdd || '';
     if (isLast)
       classToAdd += ' last';
     // build HTML for changeset part
@@ -639,16 +639,17 @@ var Viewer = {
     // Hide any previous viewer output
     UI.hide('viewerOutput');
     UI.clearErrorMessage();
     $('#viewerOutput').empty();
 
     $('#viewerOutput').append(this.makeHeadlineHTML(step.getHeading()));
     $('#viewerOutput').append(this.makeHelpHTML(step.getHelpText()));
     $('#viewerOutput').append(this.makeExpandHTML());
+    $('#viewerOutput').append(this.makeSubmitHTML());
     $('#viewerOutput').append(this.makeButtonHTML(onPrevious.label, onNext.label));
 
     this.step = step;
     var isBackedOut = step.hasBackouts;
     var pushes = PushData[step.getName()];
     var len = pushes.length;
 
     if (!isBackedOut) {