| @@ 5743-5753 (lines=11) @@ | ||
| 5740 | this.getEl('preview').style.backgroundColor = null; |
|
| 5741 | return this; |
|
| 5742 | }, |
|
| 5743 | renderHtml: function () { |
|
| 5744 | var self = this, id = self._id, prefix = self.classPrefix, text = self.state.get('text'); |
|
| 5745 | var icon = self.settings.icon ? prefix + 'ico ' + prefix + 'i-' + self.settings.icon : ''; |
|
| 5746 | var image = self.settings.image ? ' style="background-image: url(\'' + self.settings.image + '\')"' : ''; |
|
| 5747 | var textHtml = ''; |
|
| 5748 | if (text) { |
|
| 5749 | self.classes.add('btn-has-text'); |
|
| 5750 | textHtml = '<span class="' + prefix + 'txt">' + self.encode(text) + '</span>'; |
|
| 5751 | } |
|
| 5752 | return '<div id="' + id + '" class="' + self.classes + '" role="button" tabindex="-1" aria-haspopup="true">' + '<button role="presentation" hidefocus="1" type="button" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + '></i>' : '') + '<span id="' + id + '-preview" class="' + prefix + 'preview"></span>' + textHtml + '</button>' + '<button type="button" class="' + prefix + 'open" hidefocus="1" tabindex="-1">' + ' <i class="' + prefix + 'caret"></i>' + '</button>' + '</div>'; |
|
| 5753 | }, |
|
| 5754 | postRender: function () { |
|
| 5755 | var self = this, onClickHandler = self.settings.onclick; |
|
| 5756 | self.on('click', function (e) { |
|
| @@ 5561-5571 (lines=11) @@ | ||
| 5558 | this.getEl('preview').style.backgroundColor = null; |
|
| 5559 | return this; |
|
| 5560 | }, |
|
| 5561 | renderHtml: function () { |
|
| 5562 | var self = this, id = self._id, prefix = self.classPrefix, text = self.state.get('text'); |
|
| 5563 | var icon = self.settings.icon ? prefix + 'ico ' + prefix + 'i-' + self.settings.icon : ''; |
|
| 5564 | var image = self.settings.image ? ' style="background-image: url(\'' + self.settings.image + '\')"' : ''; |
|
| 5565 | var textHtml = ''; |
|
| 5566 | if (text) { |
|
| 5567 | self.classes.add('btn-has-text'); |
|
| 5568 | textHtml = '<span class="' + prefix + 'txt">' + self.encode(text) + '</span>'; |
|
| 5569 | } |
|
| 5570 | return '<div id="' + id + '" class="' + self.classes + '" role="button" tabindex="-1" aria-haspopup="true">' + '<button role="presentation" hidefocus="1" type="button" tabindex="-1">' + (icon ? '<i class="' + icon + '"' + image + '></i>' : '') + '<span id="' + id + '-preview" class="' + prefix + 'preview"></span>' + textHtml + '</button>' + '<button type="button" class="' + prefix + 'open" hidefocus="1" tabindex="-1">' + ' <i class="' + prefix + 'caret"></i>' + '</button>' + '</div>'; |
|
| 5571 | }, |
|
| 5572 | postRender: function () { |
|
| 5573 | var self = this, onClickHandler = self.settings.onclick; |
|
| 5574 | self.on('click', function (e) { |
|