\u53d6\u6d88\u5728 ee-class \u958b\u8ab2\u5c07\u6703\u522a\u9664\u5728 ee-class \u4e0a\u6240\u6709\u7684\u8cc7\u6599\r\n
\u6211\u77e5\u9053\u4e86\r\n \u78ba\u5b9a\u522a\u9664 \u4e0d\u57f7\u884c\r\n"};rnrnrn fs.box.mask();rn fs.box.showMsg(eeclass.deletecfm, 'eeclass_bar2');rnrn var panel = jQuery('.ee-class-delete-confirm');rn rn panel.find('button.confirm').click(function (e) { rn fs.box.clearMsg('eeclass_bar2');rn // fs.box.closeMask();rn fs.box.showMsg( "取消 ee-class 課程中 ..." );rnrn jQuery.post("/deleteEEClass.php", {courseID: courseID}, function(data){rn fs.box.clearMsg();rn fs.box.closeMask();rn location.reload();rn }).fail(function(xhr, textStatus, errorThrown){rnrn fs.box.clearMsg();rn fs.box.closeMask();rn alert(xhr.responseText);rn });rn rn }); rnrn panel.find('button.cancel').click(function (e) { rn fs.box.clearMsg('eeclass_bar2');rn fs.box.closeMask();rn });rn rn panel.find('.confirm-delete-eeclass-course').click(function (e) {rn var that = jQuery(this);rn panel.find('button.confirm').prop('disabled', !that.prop('checked'));rn });rnrnrn rn });rnrn rn jQuery(function(){rn jQuery("body").append("
");rn jQuery("#eeclass_bar").css({"color":"#f00", "background": "url(/sys/res/icon/wait.gif) no-repeat 10px center #fff", "border":"1px solid #f00", "padding":"10px 10px 10px 35px", "display":"none", "position":"absolute", "z-index":"10001", "font-weight": "bold"});rn jQuery("#eeclass_bar2").css({"color":"#f00", "background": "no-repeat 10px center #fff", "border":"1px solid #f00", "padding":"10px 10px 10px 35px", "display":"none", "position":"absolute", "z-index":"10001", "font-weight": "bold"});rn jQuery(".EeeClass").css({"background":"url(/sys/res/icon/eeclass.png) no-repeat", "padding-left":"15px"});rn })rn // });rnrn // overwrite changeCoursern var old_chageCourse = changeCourse;rn var changeCourse = function (obj) {rn // console.log();rn var courseID = obj.value.split(':').pop();rn apiUrl = checkEEClassOpen(courseID);rn // if the course is opened on ee-class, direct to ee-class in a new browser tabrn if ( apiUrl ) {rn jQuery(this).one("click", function() {rn return false;rn });rn window.open(apiUrl);rn }rn old_chageCourse(obj);rn }rn rnrnrn var fs = fs || {};rnrn fs.box = (function() {rn return {rn mask: function(msg) {rn if (jQuery("#_fsMask_").length) {rn jQuery("#_fsMask_").html(msg);rn return;rn }rn jQuery("").addClass("fs-mask")rn .attr("id", "_fsMask_")rn .append(jQuery("").addClass("fs-maskNote").html(msg))rn .appendTo("body");rn jQuery(".fs-mask").css({"display":"table", "position":"fixed", "top":"0", "right":"0", "bottom":"0", "left":"0", "z-index":"101", "width":"100%", "height":"100%", "background":"rgba(0,0,0,0.5)"});rn jQuery(".fs-maskNote").css({"display":"table-cell", "text-align":"center", "vertical-align":"middle", "font-size":"2em", "font-weight":"bold", "color":"#ccc"});rn },rnrn closeMask: function() {rn jQuery("#_fsMask_").remove();rn },rnrn showMsg: function(msg, bar) {rn var b = jQuery(window),rn barId = (typeof bar === 'undefined') ? 'eeclass_bar' : bar;rnrn if (msg) {rn jQuery('#' + barId).html(msg);rn } else {rn jQuery('#' + barId).html(_T('form-uploading'));rnrn }rn var x = jQuery('#' + barId);rnrn var centerX = (b.width() - x.outerWidth())/2;rn var centerY = b.scrollTop() + (b.height() / 2) - 60;rnrn if (centerY < 0) centerY = b.height() / 2 - 10 ;rnrn x.css({left: centerX + 'px', top: centerY + 'px'});rn x.show();rn },rnrn clearMsg: function(bar) {rn var barId = (typeof bar === 'undefined') ? 'eeclass_bar' : bar;rn try { jQuery('#' + barId).hide(); } catch (e) {};rn }rn }rn })();rnrn /*rn * jQuery script for ee-class api endsrn */rnrn rn