From 1282efcd5ced72dac40fcd285d547c68002bf3e4 Mon Sep 17 00:00:00 2001 From: caicai8 <1149225589@qq.com> Date: Wed, 4 Sep 2019 17:22:09 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AD=A6=E7=94=9F+?= =?UTF-8?q?=E8=AE=A8=E8=AE=BA=E5=8C=BA=E7=9A=84=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/boards/index.js | 5 +---- .../src/modules/courses/members/modal/AddStudentModal.js | 5 +++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/public/react/src/modules/courses/boards/index.js b/public/react/src/modules/courses/boards/index.js index a4a3ed632..6a563762b 100644 --- a/public/react/src/modules/courses/boards/index.js +++ b/public/react/src/modules/courses/boards/index.js @@ -51,10 +51,7 @@ class Boards extends Component{ const sort_type = this.state.sort_type // page_size const url = `/boards/${bid}/messages.json?page_size=15&search=${_serachText || ''}&page=${_page}&sort=0&sort_type=${sort_type}` - axios.get(url, { - - }) - .then((response) => { + axios.get(encodeURI(url)).then((response) => { if (response.data.status == 0 && response.data.data) { let _newBoards = response.data.data.messages // if (_page > 1) { diff --git a/public/react/src/modules/courses/members/modal/AddStudentModal.js b/public/react/src/modules/courses/members/modal/AddStudentModal.js index cf7583a51..9113ba6ab 100644 --- a/public/react/src/modules/courses/members/modal/AddStudentModal.js +++ b/public/react/src/modules/courses/members/modal/AddStudentModal.js @@ -80,8 +80,9 @@ class AddStudentModal extends Component{ } setVisible = (visible) => { if (visible) { - this.setState({school_name: this.props.user.user_school}) - this.fetchMemberList() + this.setState({school_name: this.props.user.user_school},()=>{ + this.fetchMemberList(); + }) this.fetchOptions() } this.refs.modalWrapper.setVisible(visible) From 8f3203ed7c4c3d099d3099de01becccdbc8b0791 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Wed, 4 Sep 2019 17:40:28 +0800 Subject: [PATCH 2/9] isCourseEnd --- public/react/src/modules/courses/boards/BoardsNew.js | 4 ++-- public/react/src/modules/courses/boards/index.js | 2 +- public/react/src/modules/courses/members/studentsList.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/boards/BoardsNew.js b/public/react/src/modules/courses/boards/BoardsNew.js index a08225c1f..0222907d3 100644 --- a/public/react/src/modules/courses/boards/BoardsNew.js +++ b/public/react/src/modules/courses/boards/BoardsNew.js @@ -287,7 +287,7 @@ class BoardsNew extends Component{ const isAdmin = this.props.isAdmin() const courseId=this.props.match.params.coursesId; const boardId = this.props.match.params.boardId - + const isCourseEnd = this.props.isCourseEnd() return(
ID | -部门名称 | -单位名称 | +ID | +部门名称 | +单位名称 | 创建者 | <%= sort_tag('创建于', name: 'created_at', path: admins_department_applies_path) %> | -操作 | +操作 |
---|---|---|---|---|---|---|---|---|---|
<%= apply.id %> | -<%= apply.name %> | -<%= apply.school.try(:name) %> | +<%= apply.name %> | +<%= apply.school.try(:name) %> | <%= apply.user.show_real_name %> | <%= format_time apply.created_at %> | @@ -23,17 +23,16 @@ <%= javascript_void_link('删除', class: 'action refuse-action', data: { toggle: 'modal', target: '.admin-common-refuse-modal', id: apply.id, title: "删除原因", type: "delete", - url: admins_department_apply_path(apply, element: ".department-apply-#{apply.id}") + url: admins_department_apply_path(apply,tip:"unapplied", element: ".department-apply-#{apply.id}") }) %> - - <%= javascript_void_link('修改', class: 'action department-apply-action', data: { toggle: 'modal', target: '.department-apply-edit-modal', id: apply.id }) %> + <%= javascript_void_link '更改', class: 'action', data: { school_id: apply.school_id, department_id: apply.id, + toggle: 'modal', target: '.admin-merge-department-modal', url: merge_admins_department_applies_path } %> |
ID | +单位名称 | +地区 | +详细地址 | +申请者 | +<%= sort_tag('创建于', name: 'created_at', path: admins_unit_applies_path) %> | +操作 | +
---|---|---|---|---|---|---|
"+(escaped?code:escape(code,true))+"\n
"}return''+(escaped?code:escape(code,true))+"\n
\n"};Renderer.prototype.blockquote=function(quote){return"\n"+quote+"\n"};Renderer.prototype.html=function(html){return html};Renderer.prototype.heading=function(text,level,raw){return"
"+text+"
\n"};Renderer.prototype.table=function(header,body){return""+text+"
"};Renderer.prototype.br=function(){return this.options.xhtml?""+escape(e.message+"",true)+""}throw e}}marked.options=marked.setOptions=function(opt){merge(marked.defaults,opt);return marked};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,smartLists:false,silent:false,highlight:null,langPrefix:"lang-",smartypants:false,headerPrefix:"",renderer:new Renderer,xhtml:false};marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=Renderer;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.InlineLexer=InlineLexer;marked.inlineLexer=InlineLexer.output;marked.parse=marked;if(typeof module!=="undefined"&&typeof exports==="object"){module.exports=marked}else{if(typeof define==="function"&&define.amd){define(function(){return marked})}else{this.marked=marked}}}).call(function(){return this||(typeof window!=="undefined"?window:global)}()); \ No newline at end of file diff --git a/public/react/public/js/editormd/editormd.min.js b/public/react/public/js/editormd/editormd.min.js index 79c072919..ac3deac1a 100755 --- a/public/react/public/js/editormd/editormd.min.js +++ b/public/react/public/js/editormd/editormd.min.js @@ -3601,9 +3601,9 @@ return text; }; - markedRenderer.em = function (text) { - if (text && text.indexOf('$$') != -1) { - return text; + markedRenderer.em = function (text, capInput) { + if (text && text.indexOf('$$') != -1 || (capInput && capInput.indexOf('$$') != -1)) { + return '_' + text + '_'; } else { return '' + text + ''; } diff --git a/public/react/public/js/js_min_all.js b/public/react/public/js/js_min_all.js index 6d0838c59..57606faa6 100755 --- a/public/react/public/js/js_min_all.js +++ b/public/react/public/js/js_min_all.js @@ -83,7 +83,7 @@ function AssertException(message){this.message=message}function assert(exp,messa * {@link https://github.com/pandao/editor.md} * @updateTime 2015-06-09 */ -function initEditormdPasteUpload(e,t,i){e.cm.getInputField().addEventListener("paste",function(i){_whenPasterDoUpload(i,t,function(t){t.id&&e.cm.replaceSelection("")})})}!function(e){"use strict";"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?module.exports=e:"function"==typeof define?define.amd||define(["../../../../editormd/examples/js/jquery.min"],e):window.editormd=e()}(function(){"use strict";var e="undefined"!=typeof jQuery?jQuery:Zepto;if(void 0!==e){var t,i,o,r=function(e,t){return new r.fn.init(e,t)};r.title=r.$name="Editor.md",r.version="1.5.0",r.homePage="https://pandao.github.io/editor.md/",r.classPrefix="editormd-",r.toolbarModes={full:["undo","redo","|","bold","del","italic","quote","ucwords","uppercase","lowercase","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","link","reference-link","image","code","preformatted-text","code-block","table","datetime","emoji","html-entities","pagebreak","|","goto-line","watch","preview","fullscreen","clear","search","|","help","info"],simple:["undo","redo","|","bold","del","italic","quote","uppercase","lowercase","|","h1","h2","h3","h4","h5","h6","|","list-ul","list-ol","hr","|","watch","preview","fullscreen","|","help","info"],mini:["undo","redo","|","watch","preview","|","help","info"]},r.defaults={mode:"gfm",name:"",value:"",theme:"",editorTheme:"default",previewTheme:"",markdown:"",appendMarkdown:"",width:"100%",height:"100%",path:"./lib/",pluginPath:"",delay:300,autoLoadModules:!0,watch:!0,placeholder:"Enjoy Markdown! coding now...",gotoLine:!0,codeFold:!1,autoHeight:!1,autoFocus:!0,autoCloseTags:!0,searchReplace:!0,syncScrolling:!0,readOnly:!1,tabSize:4,indentUnit:4,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,showTrailingSpace:!0,matchBrackets:!0,indentWithTabs:!0,styleSelectedText:!0,matchWordHighlight:!0,styleActiveLine:!0,dialogLockScreen:!0,dialogShowMask:!0,dialogDraggable:!0,dialogMaskBgColor:"#fff",dialogMaskOpacity:.1,fontSize:"13px",saveHTMLToTextarea:!1,disabledKeyMaps:[],onload:function(){},onresize:function(){},onchange:function(){},onwatch:null,onunwatch:null,onpreviewing:function(){},onpreviewed:function(){},onfullscreen:function(){},onfullscreenExit:function(){},onscroll:function(){},onpreviewscroll:function(){},imageUpload:!1,imageFormats:["jpg","jpeg","gif","png","bmp","webp"],imageUploadURL:"",crossDomainUpload:!1,uploadCallbackURL:"",toc:!0,tocm:!1,tocTitle:"",tocDropdown:!1,tocContainer:"",tocStartLevel:1,htmlDecode:"style,iframe|on*",pageBreak:!0,atLink:!0,emailLink:!0,taskList:!1,emoji:!1,tex:!1,flowChart:!1,sequenceDiagram:!1,previewCodeHighlight:!0,toolbar:!0,toolbarAutoFixed:!0,toolbarIcons:"full",toolbarTitles:{},toolbarHandlers:{ucwords:function(){return r.toolbarHandlers.ucwords},lowercase:function(){return r.toolbarHandlers.lowercase}},toolbarCustomIcons:{lowercase:'a',ucwords:'Aa'},toolbarIconsClass:{undo:"fa-undo",redo:"fa-repeat",bold:"fa-bold",del:"fa-strikethrough",italic:"fa-italic",quote:"fa-quote-left",uppercase:"fa-font",h1:r.classPrefix+"bold",h2:r.classPrefix+"bold",h3:r.classPrefix+"bold",h4:r.classPrefix+"bold",h5:r.classPrefix+"bold",h6:r.classPrefix+"bold","list-ul":"fa-list-ul","list-ol":"fa-list-ol",hr:"fa-minus",link:"fa-link","reference-link":"fa-anchor",image:"fa-picture-o",code:"fa-code","preformatted-text":"fa-file-code-o","code-block":"fa-file-code-o",table:"fa-table",datetime:"fa-clock-o",emoji:"fa-smile-o","html-entities":"fa-copyright",pagebreak:"fa-newspaper-o","goto-line":"fa-terminal",watch:"fa-eye-slash",unwatch:"fa-eye",preview:"fa-desktop",search:"fa-search",fullscreen:"fa-arrows-alt",clear:"fa-eraser",help:"fa-question-circle",info:"fa-info-circle"},toolbarIconTexts:{},lang:{name:"zh-cn",description:"开源在线Markdown编辑器
"+this.atLink(this.emoji(e))+"
\n"},s.code=function(e,t,i){return"seq"===t||"sequence"===t?''+e+"
":n.Renderer.prototype.code.apply(this,arguments)},s.tablecell=function(e,t){var i=t.header?"th":"td";return(t.align?"<"+i+' style="text-align:'+t.align+'">':"<"+i+">")+this.atLink(this.emoji(e))+""+i+">\n"},s.listitem=function(e){return o.taskList&&/^\s*\[[x\s]\]\s*/.test(e)?(e=e.replace(/^\s*\[\s\]\s*/,' ').replace(/^\s*\[x\]\s*/,' '),'"+this.atLink(this.emoji(e))+"
\n"},s.code=function(e,t,i){return"seq"===t||"sequence"===t?''+e+"
":n.Renderer.prototype.code.apply(this,arguments)},s.tablecell=function(e,t){var i=t.header?"th":"td";return(t.align?"<"+i+' style="text-align:'+t.align+'">':"<"+i+">")+this.atLink(this.emoji(e))+""+i+">\n"},s.listitem=function(e){return o.taskList&&/^\s*\[[x\s]\]\s*/.test(e)?(e=e.replace(/^\s*\[\s\]\s*/,' ').replace(/^\s*\[x\]\s*/,' '),'