芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/public_html/cepali/grade/grading/form/guide/amd/build/comment_chooser.min.js
define(["jquery","core/templates","core/notification","core/yui"],function(a,b,c){return{initialise:function(d,e,f,g){function h(b,c){var e="
"+M.util.get_string("insertcomment","gradingform_guide")+"
",g="comment-chooser-"+d+"-cancel",h='
'+M.util.get_string("cancel","moodle")+"
",i=new M.core.dialogue({modal:!0,headerContent:e,bodyContent:b,footerContent:h,focusAfterHide:"#"+f,id:"comments-chooser-dialog-"+d});a("#"+g).click(function(){i.hide()}),a.each(c,function(b,c){var e="#comment-option-"+d+"-"+c.id;a(e).click(function(){var b=a("#"+f),d=b.val();""!==a.trim(d)&&(d+="\n"),d+=c.description,b.val(d),i.hide()}),a(document).off("keypress",e).on("keypress",e,function(){var b=event.which||event.keyCode;13!=b&&32!=b||a(e).click()})}),i.after("visibleChange",function(a){a.prevVal&&!a.newVal&&this.destroy()},i),i.show()}function i(){var a={criterionId:d,comments:g};b.render("gradingform_guide/comment_chooser",a).done(function(a){h(a,g)}).fail(c.exception)}a("#"+e).click(function(a){a.preventDefault(),i()})}}});