|
|
@ -65,15 +65,14 @@ export class TabProxy { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
renderTabsbar () { |
|
|
|
renderTabsbar () { |
|
|
|
var self = this |
|
|
|
this._view.filetabs = yo`<ul id="files" class="${css.files} nav nav-tabs"></ul>` |
|
|
|
self._view.filetabs = yo`<ul id="files" class="${css.files} nav nav-tabs"></ul>` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self._view.tabs = yo` |
|
|
|
this._view.tabs = yo` |
|
|
|
<div class=${css.tabs} onmouseenter=${toggleScrollers} onmouseleave=${toggleScrollers}> |
|
|
|
<div class=${css.tabs} onmouseenter=${toggleScrollers} onmouseleave=${toggleScrollers}> |
|
|
|
<div onclick=${scrollLeft} class="${css.scroller} ${css.hide} ${css.scrollerleft}"> |
|
|
|
<div onclick=${scrollLeft} class="${css.scroller} ${css.hide} ${css.scrollerleft}"> |
|
|
|
<i class="fa fa-chevron-left "></i> |
|
|
|
<i class="fa fa-chevron-left "></i> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
${self._view.filetabs} |
|
|
|
${this._view.filetabs} |
|
|
|
<div onclick=${scrollRight} class="${css.scroller} ${css.hide} ${css.scrollerright}"> |
|
|
|
<div onclick=${scrollRight} class="${css.scroller} ${css.hide} ${css.scrollerright}"> |
|
|
|
<i class="fa fa-chevron-right "></i> |
|
|
|
<i class="fa fa-chevron-right "></i> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -87,14 +86,15 @@ export class TabProxy { |
|
|
|
<i class="decreditorsize fa fa-minus" onclick=${decrease} aria-hidden="true" title="decrease editor font size"></i> |
|
|
|
<i class="decreditorsize fa fa-minus" onclick=${decrease} aria-hidden="true" title="decrease editor font size"></i> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
${self._view.tabs} |
|
|
|
${this._view.tabs} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
` |
|
|
|
` |
|
|
|
|
|
|
|
|
|
|
|
// tabs
|
|
|
|
// tabs
|
|
|
|
var $filesEl = $(self._view.filetabs) |
|
|
|
var $filesEl = $(this._view.filetabs) |
|
|
|
|
|
|
|
|
|
|
|
// Switch tab
|
|
|
|
// Switch tab
|
|
|
|
|
|
|
|
var self = this |
|
|
|
$filesEl.on('click', '.file:not(.active)', function (ev) { |
|
|
|
$filesEl.on('click', '.file:not(.active)', function (ev) { |
|
|
|
ev.preventDefault() |
|
|
|
ev.preventDefault() |
|
|
|
self.fileManager.switchFile($(this).find('.name').text()) |
|
|
|
self.fileManager.switchFile($(this).find('.name').text()) |
|
|
@ -109,8 +109,6 @@ export class TabProxy { |
|
|
|
return false |
|
|
|
return false |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
return tabsbar |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function toggleScrollers (event = {}) { |
|
|
|
function toggleScrollers (event = {}) { |
|
|
|
if (event.type) self.data._focus = event.type |
|
|
|
if (event.type) self.data._focus = event.type |
|
|
|
var isMouseEnter = self.data._focus === 'mouseenter' |
|
|
|
var isMouseEnter = self.data._focus === 'mouseenter' |
|
|
@ -172,5 +170,7 @@ export class TabProxy { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return tabsbar |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|