<commit_before>$(document).bind("mobileinit", function(){
//mobile init stuff 11/12/10
//turn off ajax forms...
$.mobile.defaultPageTransition = "slide";
});

$(document).ready(function() {
    //get some vars to start
    var siteurl = $('.mobilesiteurl').attr("id");
    var mytheme = $(".datatheme").attr("id");
    var mythemeb = $(".datathemeb").attr("id");


    //function below does generic stuff before creating all pages...
    $('div').live('pagebeforecreate', function(event, ui) {
        //turn off ajax on all forms for now as of beta1
        $('form').attr("data-ajax", "false");
        //lesson
        $('.lessonbutton.standardbutton a').attr("data-role", "button");
        $('#page-mod-lesson-viewPAGE div.fitemtitle label').addClass("afirst");

        //tablet column removal switch
        $('.slider').live("change",function() {
            var slids = $(this).val();
            M.util.set_user_preference('theme_mymobile_chosen_colpos', slids);
            if (slids == "off") {
                $('.ui-page-active').removeClass("has-myblocks");
            } else {
                $('.ui-page-active').addClass("has-myblocks");
            }
        });

        //tabs- links set to external to fix forms
        $('div.tabtree ul.tabrow0').attr("data-role", "controlgroup");
        $('div.tabtree ul.tabrow12').attr("data-role", "controlgroup");
        $('div.tabtree li a').attr("data-role", "button").attr("data-ajax", "false");

        //jump to current or bottom
        $('a.jumptocurrent').live('tap', function() {
            var position = $(".ui-page-active .section.current").position();
            if (!position) {
                var position = $(".ui-page-active .mobilefooter").position();
            }
            $.mobile.silentScroll(position.top);
            $(this).removeClass("ui-btn-active");
            return false;
        });

        //scroll to top
        $('a#uptotop').live('tap', function() {
            var position = $(".ui-page-active").position();
            $.mobile.silentScroll(position.top);
            $(this).removeClass("ui-btn-active");
            return false;
        });

        //remove message notifcation overlay on tap 6/21/11
        $('a#notificationno').live('tap', function() {
            $('#newmessageoverlay').remove();
            return false;
        });

        //calendar and other links that need to be external
        $('.maincalendar .filters a, li.activity.scorm a, div.files a, #page-user-filesPAGE li div a, .maincalendar .bottom a, .section li.url.modtype_url a, .resourcecontent .resourcemediaplugin a, #underfooter .noajax a, .block_mnet_hosts .content a, .block_private_files .content a, a.portfolio-add-link, #attempts td a').attr("data-ajax", "false");

        //add blank to open in window for some
        $('#page-mod-url-viewPAGE div.urlworkaround a, #page-mod-resource-viewPAGE div.resourceworkaround a, .mediaplugin a.mediafallbacklink, #page-mod-resource-viewPAGE .resourcemp3 a, .foldertree li a').attr("target", "_blank").attr("data-role", "button").attr("data-icon", "plus");

        //// **** general stuff *** ////
        $('form fieldset').attr("data-role", "fieldcontain");
        $('form .fitem').attr("data-role", "fieldcontain");

        //submit button for forum
        $('#page-mod-url-viewPAGE div.urlworkaround a').attr("data-role", "button");

        //survey form fix
        $('#surveyform').attr("action", siteurl + '/mod/survey/save.php');<commit_msg>MDL-34818 theme_mymobile: Fixes resources folders to show properly on first access.<commit_after>$(document).bind("mobileinit", function(){
//mobile init stuff 11/12/10
//turn off ajax forms...
$.mobile.defaultPageTransition = "slide";
});

$(document).ready(function() {
    //get some vars to start
    var siteurl = $('.mobilesiteurl').attr("id");
    var mytheme = $(".datatheme").attr("id");
    var mythemeb = $(".datathemeb").attr("id");


    //function below does generic stuff before creating all pages...
    $('div').live('pagebeforecreate', function(event, ui) {
        //turn off ajax on all forms for now as of beta1
        $('form').attr("data-ajax", "false");
        //lesson
        $('.lessonbutton.standardbutton a').attr("data-role", "button");
        $('#page-mod-lesson-viewPAGE div.fitemtitle label').addClass("afirst");

        //tablet column removal switch
        $('.slider').live("change",function() {
            var slids = $(this).val();
            M.util.set_user_preference('theme_mymobile_chosen_colpos', slids);
            if (slids == "off") {
                $('.ui-page-active').removeClass("has-myblocks");
            } else {
                $('.ui-page-active').addClass("has-myblocks");
            }
        });

        //tabs- links set to external to fix forms
        $('div.tabtree ul.tabrow0').attr("data-role", "controlgroup");
        $('div.tabtree ul.tabrow12').attr("data-role", "controlgroup");
        $('div.tabtree li a').attr("data-role", "button").attr("data-ajax", "false");

        //jump to current or bottom
        $('a.jumptocurrent').live('tap', function() {
            var position = $(".ui-page-active .section.current").position();
            if (!position) {
                var position = $(".ui-page-active .mobilefooter").position();
            }
            $.mobile.silentScroll(position.top);
            $(this).removeClass("ui-btn-active");
            return false;
        });

        //scroll to top
        $('a#uptotop').live('tap', function() {
            var position = $(".ui-page-active").position();
            $.mobile.silentScroll(position.top);
            $(this).removeClass("ui-btn-active");
            return false;
        });

        //remove message notifcation overlay on tap 6/21/11
        $('a#notificationno').live('tap', function() {
            $('#newmessageoverlay').remove();
            return false;
        });

        //calendar and other links that need to be external
        $('.maincalendar .filters a, li.activity.scorm a, div.files a, #page-user-filesPAGE li div a, .maincalendar .bottom a, .section li.url.modtype_url a, .resourcecontent .resourcemediaplugin a, #underfooter .noajax a, .block_mnet_hosts .content a, .block_private_files .content a, a.portfolio-add-link, #attempts td a, .settingsul li a, .foldertree li a').attr("data-ajax", "false");

        //add blank to open in window for some
        $('#page-mod-url-viewPAGE div.urlworkaround a, #page-mod-resource-viewPAGE div.resourceworkaround a, .mediaplugin a.mediafallbacklink, #page-mod-resource-viewPAGE .resourcemp3 a, .foldertree li a').attr("target", "_blank").attr("data-role", "button").attr("data-icon", "plus");

        //// **** general stuff *** ////
        $('form fieldset').attr("data-role", "fieldcontain");
        $('form .fitem').attr("data-role", "fieldcontain");

        //submit button for forum
        $('#page-mod-url-viewPAGE div.urlworkaround a').attr("data-role", "button");

        //survey form fix
        $('#surveyform').attr("action", siteurl + '/mod/survey/save.php');
{'fraction_non_alphanumeric': 0.18198426082068578, 'fraction_numerical': 0.005199550309162451, 'mean_word_length': 2.539035305818001, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6797574', 'n_tokens_mistral': 2130, 'n_tokens_neox': 2054, 'n_words': 473}