Commit d8c028fb4e36b71ed0db1e4e298a858d15765480

Authored by Andy
1 parent 13a0523f

编辑 提交 切换

Showing 1 changed file with 8 additions and 3 deletions
topages/workfill/workfill.js
... ... @@ -47,16 +47,21 @@ $('#time-opr-prevbtn').on('click',function () {
47 47 $('#time-opr-nextbtn').on('click',function () {
48 48 fun.timeoprnextbtn();
49 49 });
  50 +
50 51 //提交事件
51   -$('.workfill-list-btn').on('click',function () {
  52 +$(document).on('click','.workfill-list-btn',function () {
52 53 var _this=$(this);
53   - console.log(_this);
54   - if($('.workfill-projectCon').hasClass('display-none')){
  54 + if(_this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').hasClass('display-none')){
55 55 _this.text('提交');
  56 + _this.parent().parent().find(".workfill-list-container").attr("contenteditable","true");
56 57 }else {
57 58 _this.text('编辑');
  59 + _this.parent().parent().find(".workfill-list-container").attr("contenteditable","false");
58 60 }
59 61 _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').toggleClass('display-none');
  62 + var projectName=_this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon .work-projectName').find("option:selected").text();
60 63 _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').toggleClass('display-none');
  64 + _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').text(projectName);
  65 +
61 66  
62 67 });
... ...