CC-6084 - fix calendar drag and drop

This commit is contained in:
Duncan Sommerville 2015-08-21 11:09:45 -04:00
parent 48f1c5b9a4
commit 604b81071c
5 changed files with 30 additions and 40 deletions

View file

@ -114,9 +114,9 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
<div class="usability_hint <?php if ($hint == "") { echo "hidden"; } ?>"><?php echo $hint; ?></div> <div class="usability_hint <?php if ($hint == "") { echo "hidden"; } ?>"><?php echo $hint; ?></div>
<div class="wrapper <?php if (isset($this->layout()->parent_page)) echo "wrapper_panel";?>" id="content"> <div class="wrapper <?php if (isset($this->layout()->parent_page)) echo "wrapper_panel";?>" id="content">
<?php echo $this->layout()->content ?>
</div>
<?php if (isset($this->layout()->parent_page)) { ?> <?php if (isset($this->layout()->parent_page)) { ?>
<div style="display: flex; width: 100%">
<div style="flex: 0 140px;"> <!-- placeholder object so we can fixed position the submenu -->
<div id="sub-menu"> <div id="sub-menu">
<h3><?php //parent_page is passed in from controller <h3><?php //parent_page is passed in from controller
echo $this->layout()->parent_page; ?></h3> echo $this->layout()->parent_page; ?></h3>
@ -126,14 +126,7 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
echo $this->navigation()->menu()->renderMenu($page); echo $this->navigation()->menu()->renderMenu($page);
?> ?>
</div> </div>
</div> <?php } ?>
<div id="sub-menu-content-panel">
<?php echo $this->layout()->content ?>
</div>
</div>
<?php } else { echo $this->layout()->content; } ?>
</div>
<script id="tmpl-pl-cues" type="text/template"> <script id="tmpl-pl-cues" type="text/template">
<div class="waveform-cues"> <div class="waveform-cues">

View file

@ -610,7 +610,7 @@ th.library_checkbox {
/* This is so dragged items show up above the layout */ /* This is so dragged items show up above the layout */
.ui-draggable-dragging { #library_display .ui-draggable-dragging {
z-index: 9999; z-index: 9999;
position: fixed !important; position: fixed !important;
} }

View file

@ -3416,16 +3416,17 @@ dd .stream-status {
* absolute positioning in Airtime) when we want * absolute positioning in Airtime) when we want
* to focus on responsive design. * to focus on responsive design.
*/ */
.usability_hint:not(.hidden) + .wrapper { .usability_hint:not(.hidden) + .wrapper,
.usability_hint:not(.hidden) ~ #sub-menu {
top: 130px; top: 130px;
-webkit-transition: top 0.2s linear;
-moz-transition: top 0.2s linear;
-o-transition: top 0.2s linear;
transition: top 0.2s linear;
/*padding-top: 40px;*/
} }
.usability_hint.hidden ~ #sub-menu,
.usability_hint.hidden + .wrapper{
top: 102px;
}
.usability_hint a { .usability_hint a {
color: white; color: white;
} }
@ -3621,6 +3622,11 @@ button.btn-icon-text > i.icon-white {
color: #cecece; color: #cecece;
padding: 10px; padding: 10px;
z-index: 1; z-index: 1;
-webkit-transition: top 0.2s linear;
-moz-transition: top 0.2s linear;
-o-transition: top 0.2s linear;
transition: top 0.2s linear;
} }
#sub-menu h3 { #sub-menu h3 {

View file

@ -1,7 +1,5 @@
var previewWidth = 482, var previewWidth = 482,
previewHeight = 110, previewHeight = 110;
USABILITY_HINT_HIDDEN_TOP = 102,
USABILITY_HINT_VISIBLE_TOP = 130;
$(document).ready(function() { $(document).ready(function() {
@ -14,7 +12,6 @@ $(document).ready(function() {
//this statement tells the browser to fade out any success message after 5 seconds //this statement tells the browser to fade out any success message after 5 seconds
setTimeout(function(){$(".success").fadeOut("slow", function(){$(this).empty()});}, 5000); setTimeout(function(){$(".success").fadeOut("slow", function(){$(this).empty()});}, 5000);
adjustForUsabilityHint();
}); });
/* /*
@ -194,18 +191,12 @@ function removeSuccessMsg() {
$status.fadeOut("slow", function(){$status.empty()}); $status.fadeOut("slow", function(){$status.empty()});
} }
function adjustForUsabilityHint() {
var topVal = ($(".usability_hint").is(":visible") ? USABILITY_HINT_VISIBLE_TOP : USABILITY_HINT_HIDDEN_TOP);
$("#sub-menu").css("top", topVal);
}
function hideHint(h) { function hideHint(h) {
h.hide("slow").addClass("hidden"); h.hide("slow").addClass("hidden");
} }
function showHint(h) { function showHint(h) {
h.show("slow").removeClass("hidden"); h.show("slow").removeClass("hidden");
$(".wrapper, #sub-menu").css("top", USABILITY_HINT_VISIBLE_TOP);
} }
function getUsabilityHint() { function getUsabilityHint() {

View file

@ -849,7 +849,7 @@ var AIRTIME = (function(AIRTIME) {
AIRTIME.library.dblClickAdd(data, data.ftype); AIRTIME.library.dblClickAdd(data, data.ftype);
}); });
$libTable.find("tbody").on("mousedown", "tr > td.library_checkbox", function(ev) { $libTable.find("tbody").on("mousedown", "tr.lib-audio > td.library_checkbox", function(ev) {
var $tr = $(this).parent(), var $tr = $(this).parent(),
// Get the ID of the selected row // Get the ID of the selected row
$rowId = $tr.attr("id"); $rowId = $tr.attr("id");
@ -878,7 +878,7 @@ var AIRTIME = (function(AIRTIME) {
} }
}); });
$libTable.find("tbody").on("mousedown", "tr > td:not(.library_checkbox)", function(ev) { $libTable.find("tbody").on("mousedown", "tr.lib-audio > td:not(.library_checkbox)", function(ev) {
var $tr = $(this).parent(), var $tr = $(this).parent(),
// Get the ID of the selected row // Get the ID of the selected row
$rowId = $tr.attr("id"); $rowId = $tr.attr("id");
@ -945,7 +945,7 @@ var AIRTIME = (function(AIRTIME) {
// begin context menu initialization. // begin context menu initialization.
AIRTIME.library.ctxMenu = $.contextMenu({ AIRTIME.library.ctxMenu = $.contextMenu({
selector: '#library_display tr:has(td)', selector: '#library_display tr.lib-audio:has(td)',
//trigger: "left", //trigger: "left",
trigger: "custom", trigger: "custom",