Skip to content

Commit

Permalink
issue #32
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouji2013 committed Mar 19, 2019
1 parent 66bf993 commit 80df3b2
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions web/src/main/webapp/js/template.helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ const __TemplateHelperView = (function ($) {
},
}).render();

$(".collapsed-textarea").click(popupLargeTextfield);
$(this.el).find(".collapsed-textarea").click(popupLargeTextfield);
$("#close-tempoary-text").unbind('click').click(closeLargeTextfield);

return this;
Expand Down Expand Up @@ -719,7 +719,7 @@ const __TemplateHelperView = (function ($) {
}
});

$(".collapsed-textarea").click(popupLargeTextfield);
$(this.el).find(".collapsed-textarea").click(popupLargeTextfield);
$("#close-tempoary-text").unbind('click').click(closeLargeTextfield);

return this;
Expand Down Expand Up @@ -925,6 +925,16 @@ const __TemplateHelperView = (function ($) {
};

const popupLargeTextfield = function () {
const trigger = $(this);
$('#popup-textarea-modal').on('hidden.bs.modal', function (e) {
trigger.prop('disabled', false);
});
trigger.prop('disabled', true);

$('#popup-textarea-modal').on('shown.bs.modal', function () {
$("#temporary-text").focus();
});

$("#invoker-id").text($(this).attr('id'));
$("#temporary-text").val($(this).val());
$("#popup-textarea-modal").modal('show');
Expand Down

0 comments on commit 80df3b2

Please sign in to comment.