diff --git a/topages/workfill/workfill.js b/topages/workfill/workfill.js index c476b0c..a9cc26a 100644 --- a/topages/workfill/workfill.js +++ b/topages/workfill/workfill.js @@ -47,16 +47,21 @@ $('#time-opr-prevbtn').on('click',function () { $('#time-opr-nextbtn').on('click',function () { fun.timeoprnextbtn(); }); + //提交事件 -$('.workfill-list-btn').on('click',function () { +$(document).on('click','.workfill-list-btn',function () { var _this=$(this); - console.log(_this); - if($('.workfill-projectCon').hasClass('display-none')){ + if(_this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').hasClass('display-none')){ _this.text('提交'); + _this.parent().parent().find(".workfill-list-container").attr("contenteditable","true"); }else { _this.text('编辑'); + _this.parent().parent().find(".workfill-list-container").attr("contenteditable","false"); } _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').toggleClass('display-none'); + var projectName=_this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon .work-projectName').find("option:selected").text(); _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').toggleClass('display-none'); + _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').text(projectName); + });