1var $hangman_question_example; 2 3window.onload = dialog_init; 4 5 6function dialog_init () { 7 var $ = jQuery; 8 9 $ ('a.frq_sample_response').on ('click', function () { 10 $ ('textarea.qwiz-grow-wrap').val ('Lack of genetic diversity.\nThe strain was susceptible to the fungus.'); 11 }); 12 13 $multiple_choice_question_example = $ ('#multiple_choice_question_example').dialog ({ 14 autoOpen: false, 15 width: 550, 16 modal: true 17 }); 18 $ ('span.multiple_choice_question').on ('click', function () { 19 $multiple_choice_question_example.dialog ('open'); 20 }); 21 22 23 $hangman_question_example = $ ('#hangman_question_example').dialog ({ 24 autoOpen: false, 25 width: 550, 26 modal: true 27 }); 28 $ ('span.hangman_question').on ('click', function () { 29 $hangman_question_example.dialog ('open'); 30 }); 31 32 33 $hangman_flashcard_example = $ ('#hangman_flashcard_example').dialog ({ 34 autoOpen: false, 35 width: 550, 36 height: 490, 37 modal: true, 38 buttons: {'Close pop-up': function () { 39 $hangman_flashcard_example.dialog ('close'); 40 } 41 } 42 }); 43 $ ('span.hangman_flashcard').on ('click', function () { 44 $hangman_flashcard_example.dialog ('open'); 45 }); 46 47 48 $interactive_image_question_example = $ ('#interactive_image_question_example').dialog ({ 49 autoOpen: false, 50 width: 785, 51 modal: true, 52 buttons: {'Close pop-up': function () { 53 $interactive_image_question_example.dialog ('close'); 54 } 55 } 56 }); 57 $ ('span.interactive_image_question').on ('click', function () { 58 $interactive_image_question_example.dialog ('open'); 59 }); 60 61 62 $interactive_text_question_example = $ ('#interactive_text_question_example').dialog ({ 63 autoOpen: false, 64 width: 550, 65 modal: true, 66 buttons: {'Close pop-up': function () { 67 $interactive_text_question_example.dialog ('close'); 68 } 69 } 70 }); 71 $ ('span.interactive_text_question').on ('click', function () { 72 $interactive_text_question_example.dialog ('open'); 73 }); 74 75 $hangman_labeled_diagram_question_example = $ ('#hangman_labeled_diagram_question_example').dialog ({ 76 autoOpen: false, 77 width: 850, 78 modal: true, 79 buttons: {'Close pop-up': function () { 80 $hangman_labeled_diagram_question_example.dialog ('close'); 81 } 82 } 83 }); 84 $ ('span.hangman_labeled_diagram_question').on ('click', function () { 85 $hangman_labeled_diagram_question_example.dialog ('open'); 86 }); 87 88 $free_form_question_example = $ ('#free_form_question_example').dialog ({ 89 autoOpen: false, 90 width: 550, 91 modal: true 92 }); 93 $ ('span.free_form_question').on ('click', function () { 94 $free_form_question_example.dialog ('open'); 95 }); 96 97 98 $free_form_flashcard_example = $ ('#free_form_flashcard_example').dialog ({ 99 autoOpen: false, 100 width: 550, 101 height: 490, 102 modal: true, 103 buttons: {'Close pop-up': function () { 104 $free_form_flashcard_example.dialog ('close'); 105 } 106 } 107 }); 108 $ ('span.free_form_flashcard').on ('click', function () { 109 $free_form_flashcard_example.dialog ('open'); 110 }); 111 112 113 $one_letter_answer_question_example = $ ('#one_letter_answer_question_example').dialog ({ 114 autoOpen: false, 115 width: 550, 116 modal: true 117 }); 118 $ ('span.one_letter_answer_question').on ('click', function () { 119 $one_letter_answer_question_example.dialog ('open'); 120 }); 121 122 123 $one_letter_answer_flashcard_example = $ ('#one_letter_answer_flashcard_example').dialog ({ 124 autoOpen: false, 125 width: 550, 126 height: 490, 127 modal: true, 128 buttons: {'Close pop-up': function () { 129 $one_letter_answer_flashcard_example.dialog ('close'); 130 } 131 } 132 }); 133 $ ('span.one_letter_answer_flashcard').on ('click', function () { 134 $one_letter_answer_flashcard_example.dialog ('open'); 135 }); 136 137 138 $show_me_the_answer_question_example = $ ('#show_me_the_answer_question_example').dialog ({ 139 autoOpen: false, 140 width: 580, 141 modal: true 142 }); 143 $ ('span.show_me_question').on ('click', function () { 144 $show_me_the_answer_question_example.dialog ('open'); 145 }); 146 147 148 $information_only_question_example = $ ('#information_only_question_example').dialog ({ 149 autoOpen: false, 150 width: 550, 151 modal: true 152 }); 153 $ ('span.information_only_question').on ('click', function () { 154 $information_only_question_example.dialog ('open'); 155 }); 156 157 158 $view_scores_screen_shot = $ ('#view_scores_screen_shot_dialog').dialog ({ 159 autoOpen: false, 160 width: 1000, 161 height: 580, 162 modal: true, 163 buttons: {'Close pop-up': function () { 164 $view_scores_screen_shot.dialog ('close'); 165 } 166 } 167 }); 168 $ ('span.view_scores_screen_shot').on ('click', function () { 169 $view_scores_screen_shot.dialog ('open'); 170 }); 171 172 173 // -------------------------------------------------------------------------- 174 // Need to beat z-index of qwizzled_label_unplaced. 175 $ ('div.ui-dialog').css ({'z-index': '110'}); 176 177 // Cover up default dialog background (Safari shows a line between 178 // "repeats"). 179 $ ('div.qwiz_qdeck_example.ui-dialog-content').css ({background: 'white'}); 180 181 // Button triggers "close dialog". 182 $ ('button.qwiz_close_sample').on ('click', function (e) { 183 e.stopPropagation (); 184 $ (this).parents ('div.ui-dialog').find ('button.ui-dialog-titlebar-close').trigger ('click'); 185 }); 186 187 $ ('div.ui-dialog-buttonpane').css ({padding: '0', margin: '0'}); 188 189 // "Link" to examples - href="javascript: void ()" gets eaten by WordPress; 190 // href="#" scrolls to top in Safari. 191 $ ('span.qwiz_qdeck_example_link').css ({'color': 'blue', 192 'text-decoration': 'underline', 193 'cursor': 'pointer'}); 194 195 196}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.