Ignore:
Timestamp:
2015-06-08T14:09:52+12:00 (9 years ago)
Author:
davidb
Message:

save SVG and PNG more deeply embedded into code so occurs when either swiped or next arrow clicked

Location:
other-projects/nz-flag-design/trunk/main-form
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • other-projects/nz-flag-design/trunk/main-form/enter-name.html

    r29952 r29967  
    1111  </head>
    1212  <body>
     13    <!--
     14     <script>
     15     
     16    if (jQuery.mobile) {
     17    $(document).on("pagebeforeshow", "enter-name", function(event,data) {
     18        //var active_page = $.mobile.activePage.attr("id");
     19        //console.log("*** enter-name check: active page = " + active_page);
     20        if (active_page == "enter-name-page") {
     21          console.log("Saving SVG and PNG versions of the flag");
     22          saveSVGAndPNGAsFiles();
     23          }
     24      });
     25    }
     26    else {
     27    alert("Page called outside of jquery-mobile: no data from previous active page to save");
     28    }
     29
     30    </script>
     31    -->
    1332    <div data-role="page" id="enter-name-page"
    1433      class="demo-page"
     
    242261          });
    243262
     263
     264                                 
    244265        </script>
    245266
  • other-projects/nz-flag-design/trunk/main-form/iterative-design-jsp.html

    r29952 r29967  
    2424                <div data-role="controlgroup" class="control" data-mini="true">         
    2525                    <a href="#" class="next right-button test-fwd"
    26                style="right:1%;" onclick="saveSVGAndPNGAsFiles()"></a>
     26               style="right:1%;" onclickXX="saveSVGAndPNGAsFiles()"></a>
     27            <div class="right-button" style="right: 3%">
     28              <p style="position: absolute; top: 60%; padding-top: 10px; font-size: 140%">Click or swipe when flag is complete</p>
     29            </div>
    2730                    <a href="#" class="prev left-button idea-back" style="left:1%;"></a>
    2831                </div>
     
    375378                    design_frame.contentWindow.setSVGEditorColourPalette(flagCanvasSettings);
    376379                        }
    377                     }
     380                }
     381
     382        if (active_page == "enter-name-page") {
     383            console.log("Enter-name: Saving SVG and PNG versions of the flag");
     384            saveSVGAndPNGAsFiles();
     385        }
     386
     387       
    378388            //console.log("***!!! returning 'false' for event");
    379389            //return false;
Note: See TracChangeset for help on using the changeset viewer.