Fun update for tab functionality - add tab sorting and close on middle mouse click
This commit is contained in:
parent
4f281a30ed
commit
529a73d39d
5 changed files with 23 additions and 5 deletions
|
@ -25,7 +25,11 @@
|
|||
<div id="show_builder" class="sb-content content-pane wide-panel">
|
||||
<div class="panel-header">
|
||||
<ul class="nav nav-tabs">
|
||||
<li id="schedule-tab" role="presentation" class="active"><a href="#">Scheduled Shows</a></li>
|
||||
<li id="schedule-tab" role="presentation" class="active">
|
||||
<a href="javascript:void(0)" class="tab-name" title="<?php echo _("Scheduled Shows") ?>">
|
||||
<?php echo _("Scheduled Shows") ?>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="outer-datatable-wrapper active-tab">
|
||||
|
|
|
@ -22,7 +22,11 @@
|
|||
<div id="show_builder" class="sb-content content-pane wide-panel">
|
||||
<div class="panel-header">
|
||||
<ul class="nav nav-tabs">
|
||||
<li id="schedule-tab" role="presentation" class="active"><a href="javascript:void(0)">Scheduled Shows</a></li>
|
||||
<li id="schedule-tab" role="presentation" class="active">
|
||||
<a href="javascript:void(0)" class="tab-name" title="<?php echo _("Scheduled Shows") ?>">
|
||||
<?php echo _("Scheduled Shows") ?>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="outer-datatable-wrapper active-tab">
|
||||
|
|
|
@ -493,7 +493,7 @@ li.ui-state-default {
|
|||
|
||||
.tab-name {
|
||||
float: left;
|
||||
max-width: 150px;
|
||||
max-width: 120px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
|
|
|
@ -4043,6 +4043,7 @@ li .ui-state-hover {
|
|||
|
||||
.publish-md-field > textarea, .publish-md-field > input {
|
||||
display: block;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
form.media-metadata fieldset {
|
||||
|
|
|
@ -110,7 +110,11 @@ var AIRTIME = (function(AIRTIME){
|
|||
*/
|
||||
Tab.prototype._init = function() {
|
||||
var self = this;
|
||||
self.assignTabClickHandler(function() {
|
||||
self.assignTabClickHandler(function(e) {
|
||||
if (e.which == 2) { // Middle mouse
|
||||
self.close();
|
||||
return;
|
||||
}
|
||||
if (!$(this).hasClass('active')) {
|
||||
self.switchTo();
|
||||
}
|
||||
|
@ -342,8 +346,13 @@ var AIRTIME = (function(AIRTIME){
|
|||
}(AIRTIME || {}));
|
||||
|
||||
$(document).ready(function() {
|
||||
var sb = $("#show_builder");
|
||||
// Add text scrolling to tab names
|
||||
$("#show_builder").addTitles(".tab-name");
|
||||
sb.addTitles(".tab-name");
|
||||
sb.find(".nav.nav-tabs").sortable({
|
||||
containment: "parent",
|
||||
distance: 25
|
||||
});
|
||||
// Initialize the ScheduleTab
|
||||
AIRTIME.tabs.initScheduleTab();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue