1Namaste = {}; 2 3function namasteConfirmDelete(frm, msg) { 4 if(!confirm(msg)) return false; 5 frm.del.value=1; 6 frm.submit(); 7} 8 9function namasteEnrollCourse(boxTitle, courseID, studentID, url, isSchool) { 10 isSchool = isSchool || 0; 11 tb_show(boxTitle, 12 url + '&course_id=' + courseID + 13 '&student_id=' + studentID + 14 '&is_school=' + isSchool); 15} 16 17function namasteResetPoints(uid) { 18 if(confirm("Are you sure?")) { 19 var s = "?"; 20 var loc = new String(window.location); 21 if(loc.indexOf('?') >= 0) s = "&"; 22 window.location.href = loc + s + "namaste_cleanup_points=" + uid; 23 } 24} 25 26// loads the module selector in admin lessons page 27function namasteLoadModules(courseID) { 28 data = {'action': 'namaste_ajax', 'type' : 'load_modules', 'course_id' : courseID, 'json' : 1}; 29 jQuery.post(namaste_i18n.ajax_url, data, function(msg) { 30 var modules = jQuery.parseJSON(msg); 31 html = '<select name="namaste_module_id" id="namaste_module_id">'; 32 html += '<option value="">'+namaste_i18n.all_modules+'</option>'; 33 jQuery(modules).each(function(i, module){ 34 html += '<option value="' + module.ID + '">' + module.post_title + '</option>'; 35 }); 36 html += '</select>'; 37 jQuery('#namasteModuleSelector').html(html); 38 }); 39} 40 41// set rating for a course 42function namasteSetRating(rating, courseID) { 43 jQuery('#namasteRatingCourse' + courseID + '_' + rating).prop('checked', 'true'); 44 // color the stars 45 jQuery('#rateCourse' + courseID + ' label').each(function(i, elt){ 46 47 if(i + 1 > rating) jQuery('#namasteRatingSpan' + courseID + '_' + (i+1)).removeClass('dashicons-star-filled'); 48 else jQuery('#namasteRatingSpan' + courseID + '_' + (i+1)).addClass('dashicons-star-filled'); 49 }); 50} 51 52NamastePay = {} 53NamastePay.payWithMoolaMojo = function(id, url, isBundle, redirectURL) { 54 isBundle = isBundle || 0; 55 redirectURL = redirectURL || ''; 56 57 data = {"id" : id, "is_bundle" : isBundle}; 58 jQuery.post(url, data, function(msg){ 59 if(msg == 'SUCCESS') { 60 if(redirectURL) window.location = redirectURL; 61 else { 62 window.location = window.location + "?paid=1"; 63 window.location.reload(); // because of FireFox 64 } 65 } 66 else alert(msg); 67 }); 68}
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.