Refactoring tips: add "closable" parameter
This commit is contained in:
		
							parent
							
								
									a1fba17d6b
								
							
						
					
					
						commit
						cfe8cdab30
					
				| 
						 | 
				
			
			@ -45,7 +45,8 @@ define([
 | 
			
		|||
                text    : '',
 | 
			
		||||
                placement: 'right-bottom',
 | 
			
		||||
                showLink: true,
 | 
			
		||||
                showButton: false
 | 
			
		||||
                showButton: false,
 | 
			
		||||
                closable: true
 | 
			
		||||
            },
 | 
			
		||||
 | 
			
		||||
            template: _.template([
 | 
			
		||||
| 
						 | 
				
			
			@ -54,7 +55,9 @@ define([
 | 
			
		|||
                        '<div class="tip-arrow <%= scope.placement %>"></div>',
 | 
			
		||||
                        '<div>',
 | 
			
		||||
                            '<div class="tip-text"><%= scope.text %></div>',
 | 
			
		||||
                            '<% if ( scope.closable ) { %>',
 | 
			
		||||
                            '<div class="close"></div>',
 | 
			
		||||
                            '<% } %>',
 | 
			
		||||
                        '</div>',
 | 
			
		||||
                        '<% if ( scope.showLink ) { %>',
 | 
			
		||||
                        '<div class="show-link"><label><%= scope.textLink %></label></div>',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1250,6 +1250,7 @@ define([
 | 
			
		|||
                        target: this.view.btnSubmit.$el,
 | 
			
		||||
                        text: this.textRequired,
 | 
			
		||||
                        showLink: false,
 | 
			
		||||
                        closable: false,
 | 
			
		||||
                        showButton: true,
 | 
			
		||||
                        textButton: this.textGotIt
 | 
			
		||||
                    });
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -373,6 +373,7 @@ define([
 | 
			
		|||
                    target: target,
 | 
			
		||||
                    text: this.view.textCreateForm,
 | 
			
		||||
                    showLink: true
 | 
			
		||||
                    closable: false,
 | 
			
		||||
                });
 | 
			
		||||
                tip.on({
 | 
			
		||||
                    'dontshowclick': function() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue