<commit_before><!DOCTYPE html>
<!--

    JBoss, Home of Professional Open Source
    Copyright 2012, Red Hat, Inc., and individual contributors
    by the @authors tag. See the copyright.txt in the distribution for a
    full listing of individual contributors.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<html>
<head>
    <title>AeroGear QuickStart</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

    <!-- Set the tab, home page, shortcut icons -->
    <link rel="Shortcut Icon" href="img/aerogear_icon_16x.png">
    <link rel="apple-touch-icon" href="img/aerogear_avatar_48px.png"/>

    <!-- For minification, comment out this link -->
    <!-- Shared styles -->
    <link rel="stylesheet" href="css/screen.css"/>

    <!-- Set viewport scaling and zoom features -->
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- Include the full development version of Modernizr. In production, you should use a -->
    <!-- minimized custom build to reduce file size -->
    <script type="text/javascript" src="js/libs/modernizr-2.0.6.js"></script>
    <script type="text/javascript" src="js/libs/yepnope.1.0.2-min.js"></script>
    <script type="text/javascript" src="js/libs/underscore-min.js"></script>

    <!-- Minification - See Readme for details -->
    <!-- For minification, comment out this file -->
    <script type="text/javascript" src="js/app.js"></script>
    <!-- For minification, uncomment this file -->
    <!-- <script type="text/javascript" src="js/app.min.js"></script> -->

    <script type="text/javascript">
        yepnope([{
            //Load CDN hosted jQuery or fall back to local file.
            /*--------Note-----------
            This approach should only be used if you trust the source of where the resource (JavaScript) is located.
            In this case, use of the jquery CDN is much faster if your user's browser already has this file cached.
            If they don't have it cached, try to load it from the CDN as this will be faster if the user is
            located closer to a CDN than you currently hosted server.
            */
            load: "http://code.jquery.com/jquery-1.6.4.min.js",
            complete: function() {
                if ( !window.jQuery ) {
                    //In production, you would want to fall back to a minified file.
                    //We fall back to the full version because Eclipse reports false errors in some minified JavaScript files.
                    yepnope.load( "js/libs/jquery-1.6.4.js" );
                }
            }
        },{
            //device detection and asynchronous script loading
            /*--------Note-----------
            Here we're using the yepnope framework which gives us the ability to load scripts dynamically, based on
            Modernizr's results.
            With Modernizr, we use media queries and touch detection to see if we are on a mobile, touch based device
            or if we're at anything less than 480px.. this gives us a mobile ui on desktop browsers when resized to <480px
            width for testing.
            */
            test: Modernizr.touch || Modernizr.mq( "only all and (max-width: 480px)" ),
            yep: {
                //assign labeled callbacks for later execution after script loads.
                //we are on mobile device so load appropriate CSS
                "jqmcss": "css/jquery.mobile-1.0.min.css",
                // For minification, uncomment this line
                //"mcss": "css/m.screen.min.css"
                // For minification, comment out this line
                "mcss": "css/m.screen.css"
            },
            nope: {
                //we are on desktop
                // For minification, uncomment this line
                //"scss": "css/d.screen.min.css"
                // For minification, comment out this line
            	"scss": "css/d.screen.css"
            },
            callback: {
                //use the labeled callbacks from above, and load jQuery Mobile
                "jqmcss": function( url, result, key ) {
                    yepnope({
                        load: "http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js",
                        complete: function() {
                            if ( !$.mobile ) {
                                yepnope( "js/libs/jquery.mobile-1.0.min.js" );
                            }
                        }
                    });
                },
                "scss": function( url, result, key ) {
                    $( document ).ready( function() {
                        //here we are moving content around based on the browser/device.
                        $( "aside" ).insertAfter( $( "section" ) );
                    });
                }
            },
            complete: function() {
                $( document ).ready( function() {
                    //setup the app after all scripts have loaded

                    $( "#container" ).show();
                    //Fetches the initial member data and populates the table using jquery templates
                    getMemberTemplate();

                    //Register an event listener on the sumbit action
                    $('#reg').submit(function(event) {
                        event.preventDefault();

                        var memberData = $(this).serializeObject();
                        //Workaround for jQM adding a hidden field for submit buttons which then
                        //gets serialized into the form values
                        if ( memberData.register ) {
                            delete memberData.register;
                        }
                        registerMember(memberData);
                    });

                    //Register the cancel listener
                    $('#cancel').click(function(event) {
                        //clear input fields
                        $('#reg')[0].reset();

                        //clear existing msgs
                        $('span.invalid').remove();
                        $('span.success').remove();
                    });

                    $("#refreshButtonD, #refreshButtonM").click(function(event) {
                        updateMemberTable();
                    });
                });
<commit_msg>Clear member registration and error messages on page change to fix AEROGEAR-246<commit_after><!DOCTYPE html>
<!--

    JBoss, Home of Professional Open Source
    Copyright 2012, Red Hat, Inc., and individual contributors
    by the @authors tag. See the copyright.txt in the distribution for a
    full listing of individual contributors.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<html>
<head>
    <title>AeroGear QuickStart</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

    <!-- Set the tab, home page, shortcut icons -->
    <link rel="Shortcut Icon" href="img/aerogear_icon_16x.png">
    <link rel="apple-touch-icon" href="img/aerogear_avatar_48px.png"/>

    <!-- For minification, comment out this link -->
    <!-- Shared styles -->
    <link rel="stylesheet" href="css/screen.css"/>

    <!-- Set viewport scaling and zoom features -->
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- Include the full development version of Modernizr. In production, you should use a -->
    <!-- minimized custom build to reduce file size -->
    <script type="text/javascript" src="js/libs/modernizr-2.0.6.js"></script>
    <script type="text/javascript" src="js/libs/yepnope.1.0.2-min.js"></script>
    <script type="text/javascript" src="js/libs/underscore-min.js"></script>

    <!-- Minification - See Readme for details -->
    <!-- For minification, comment out this file -->
    <script type="text/javascript" src="js/app.js"></script>
    <!-- For minification, uncomment this file -->
    <!-- <script type="text/javascript" src="js/app.min.js"></script> -->

    <script type="text/javascript">
        yepnope([{
            //Load CDN hosted jQuery or fall back to local file.
            /*--------Note-----------
            This approach should only be used if you trust the source of where the resource (JavaScript) is located.
            In this case, use of the jquery CDN is much faster if your user's browser already has this file cached.
            If they don't have it cached, try to load it from the CDN as this will be faster if the user is
            located closer to a CDN than you currently hosted server.
            */
            load: "http://code.jquery.com/jquery-1.6.4.min.js",
            complete: function() {
                if ( !window.jQuery ) {
                    //In production, you would want to fall back to a minified file.
                    //We fall back to the full version because Eclipse reports false errors in some minified JavaScript files.
                    yepnope.load( "js/libs/jquery-1.6.4.js" );
                }
            }
        },{
            //device detection and asynchronous script loading
            /*--------Note-----------
            Here we're using the yepnope framework which gives us the ability to load scripts dynamically, based on
            Modernizr's results.
            With Modernizr, we use media queries and touch detection to see if we are on a mobile, touch based device
            or if we're at anything less than 480px.. this gives us a mobile ui on desktop browsers when resized to <480px
            width for testing.
            */
            test: Modernizr.touch || Modernizr.mq( "only all and (max-width: 480px)" ),
            yep: {
                //assign labeled callbacks for later execution after script loads.
                //we are on mobile device so load appropriate CSS
                "jqmcss": "css/jquery.mobile-1.0.min.css",
                // For minification, uncomment this line
                //"mcss": "css/m.screen.min.css"
                // For minification, comment out this line
                "mcss": "css/m.screen.css"
            },
            nope: {
                //we are on desktop
                // For minification, uncomment this line
                //"scss": "css/d.screen.min.css"
                // For minification, comment out this line
            	"scss": "css/d.screen.css"
            },
            callback: {
                //use the labeled callbacks from above, and load jQuery Mobile
                "jqmcss": function( url, result, key ) {
                    yepnope({
                        load: "http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js",
                        complete: function() {
                            if ( !$.mobile ) {
                                yepnope( "js/libs/jquery.mobile-1.0.min.js" );
                            }
                        }
                    });
                },
                "scss": function( url, result, key ) {
                    $( document ).ready( function() {
                        //here we are moving content around based on the browser/device.
                        $( "aside" ).insertAfter( $( "section" ) );
                    });
                }
            },
            complete: function() {
                $( document ).ready( function() {
                    //setup the app after all scripts have loaded

                    $( "#container" ).show();
                    //Fetches the initial member data and populates the table using jquery templates
                    getMemberTemplate();

                    //Register an event listener on the sumbit action
                    $('#reg').submit(function(event) {
                        event.preventDefault();

                        var memberData = $(this).serializeObject();
                        //Workaround for jQM adding a hidden field for submit buttons which then
                        //gets serialized into the form values
                        if ( memberData.register ) {
                            delete memberData.register;
                        }
                        registerMember(memberData);
                    });

                    //Register the cancel listener
                    $('#cancel').click(function(event) {
                        //clear input fields
                        $('#reg')[0].reset();

                        //clear existing msgs
                        $('span.invalid').remove();
                        $('span.success').remove();
                    });

                    $("#refreshButtonD, #refreshButtonM").click(function(event) {
                        updateMemberTable();
                    });

                    //Clear member registration and error messages on page change
                    $("#container").delegate("#register-art", "pagebeforeshow", function(event) {
                        $("#formMsgs").empty();
                        $('span.invalid').remove();
                    });
                });

{'fraction_non_alphanumeric': 0.10869719559815406, 'fraction_numerical': 0.006460773872914448, 'mean_word_length': 1.539390661618893, 'pattern_counts': {'":': 14, '<': 69, '<?xml version=': 0, '>': 67, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4224239', 'n_tokens_mistral': 3525, 'n_tokens_neox': 3291, 'n_words': 1199}