Refactoring tips: add "closable" parameter

This commit is contained in:
Julia Radzhabova 2021-10-29 18:33:03 +03:00
parent a1fba17d6b
commit cfe8cdab30
3 changed files with 6 additions and 1 deletions

View file

@ -45,7 +45,8 @@ define([
text : '', text : '',
placement: 'right-bottom', placement: 'right-bottom',
showLink: true, showLink: true,
showButton: false showButton: false,
closable: true
}, },
template: _.template([ template: _.template([
@ -54,7 +55,9 @@ define([
'<div class="tip-arrow <%= scope.placement %>"></div>', '<div class="tip-arrow <%= scope.placement %>"></div>',
'<div>', '<div>',
'<div class="tip-text"><%= scope.text %></div>', '<div class="tip-text"><%= scope.text %></div>',
'<% if ( scope.closable ) { %>',
'<div class="close"></div>', '<div class="close"></div>',
'<% } %>',
'</div>', '</div>',
'<% if ( scope.showLink ) { %>', '<% if ( scope.showLink ) { %>',
'<div class="show-link"><label><%= scope.textLink %></label></div>', '<div class="show-link"><label><%= scope.textLink %></label></div>',

View file

@ -1250,6 +1250,7 @@ define([
target: this.view.btnSubmit.$el, target: this.view.btnSubmit.$el,
text: this.textRequired, text: this.textRequired,
showLink: false, showLink: false,
closable: false,
showButton: true, showButton: true,
textButton: this.textGotIt textButton: this.textGotIt
}); });

View file

@ -373,6 +373,7 @@ define([
target: target, target: target,
text: this.view.textCreateForm, text: this.view.textCreateForm,
showLink: true showLink: true
closable: false,
}); });
tip.on({ tip.on({
'dontshowclick': function() { 'dontshowclick': function() {