changed cue in edit to happen when cliplength clicked to avoid event problems with moving playlist items.
This commit is contained in:
parent
8887ce24d1
commit
9b4f9c8aa4
4 changed files with 53 additions and 16 deletions
|
@ -14,7 +14,7 @@
|
|||
<div id="library_quick_search"><?php echo $this->layout()->quick_search ?></div>
|
||||
<div id="library_content"><?php echo $this->layout()->library ?></div>
|
||||
|
||||
<div id="side_playlist" class="ui-widget-content"><?php echo $this->layout()->spl ?></div>
|
||||
<div id="side_playlist" class="ui-widget ui-widget-content ui-corner-all"><?php echo $this->layout()->spl ?></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<span id="spl_new">New</span>
|
||||
<button id="spl_new">New</button>
|
||||
<?php if (isset($this->pl)) : ?>
|
||||
<span id="spl_delete">Delete</span>
|
||||
<span id="spl_close">Close</span>
|
||||
<button id="spl_delete">Delete</button>
|
||||
<button id="spl_close">Close</button>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (isset($this->pl)) : ?>
|
||||
|
|
|
@ -1,16 +1,36 @@
|
|||
#side_playlist {
|
||||
width: 500px;
|
||||
padding: 0.5em;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
#side_playlist, #side_playlist div, #side_playlist span, #side_playlist ul, #side_playlist li {
|
||||
#side_playlist,
|
||||
#side_playlist div,
|
||||
#side_playlist span,
|
||||
#side_playlist ul,
|
||||
#side_playlist li,
|
||||
#side_playlist button {
|
||||
float: left;
|
||||
}
|
||||
|
||||
#spl_sortable, #spl_sortable > li, .spl_artist, #side_playlist > div{
|
||||
#spl_sortable,
|
||||
#spl_sortable > li,
|
||||
#side_playlist > div,
|
||||
#spl_editor,
|
||||
.spl_artist,
|
||||
.spl_cue_in,
|
||||
.spl_fade_in,
|
||||
.spl_cue_out,
|
||||
.spl_fade_out {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
#side_playlist input, #side_playlist textarea {
|
||||
#side_playlist button {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#side_playlist input,
|
||||
#side_playlist textarea {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
|
@ -39,9 +59,21 @@
|
|||
}
|
||||
|
||||
.spl_fade_control {
|
||||
position: relative;
|
||||
margin-top: -30px;
|
||||
padding: 0.2em;
|
||||
margin-top: -34px;
|
||||
margin-left: -50px;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
#spl_editor > div > span {
|
||||
display: inline-block;
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.ui-icon-close,
|
||||
.spl_fade_control,
|
||||
.spl_playlength {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -33,13 +33,14 @@ function openFadeEditor(event) {
|
|||
function openCueEditor(event) {
|
||||
event.stopPropagation();
|
||||
|
||||
var pos, url;
|
||||
var pos, url, li;
|
||||
|
||||
pos = $(this).attr("id").split("_").pop();
|
||||
li = $(this).parent();
|
||||
pos = li.attr("id").split("_").pop();
|
||||
url = '/Playlist/set-cue/format/json';
|
||||
url = url + '/pos/' + pos;
|
||||
|
||||
highlightActive(this);
|
||||
highlightActive(li);
|
||||
|
||||
$.get(url, setEditorContent);
|
||||
}
|
||||
|
@ -57,10 +58,14 @@ function setSPLContent(json) {
|
|||
.append(json.length);
|
||||
$('#spl_sortable').empty()
|
||||
.append(json.html);
|
||||
$("#spl_editor")
|
||||
.empty();
|
||||
|
||||
$(".ui-icon-close").click(deleteSPLItem);
|
||||
$(".spl_fade_control").click(openFadeEditor);
|
||||
$("#spl_sortable li").click(openCueEditor);
|
||||
$(".spl_playlength").click(openCueEditor);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function addSPLItem(event, ui){
|
||||
|
@ -95,7 +100,7 @@ function deleteSPLItem(event){
|
|||
|
||||
function moveSPLItem(event, ui) {
|
||||
var li, newPos, oldPos, url;
|
||||
|
||||
|
||||
li = ui.item;
|
||||
|
||||
newPos = li.index();
|
||||
|
@ -135,7 +140,7 @@ function newSPL() {
|
|||
$.post(url, function(json){
|
||||
var submit;
|
||||
|
||||
submit = $('<span>Submit</span>')
|
||||
submit = $('<button>Submit</button>')
|
||||
.button()
|
||||
.click(function(){
|
||||
var url, data;
|
||||
|
@ -195,7 +200,7 @@ function setUpSPL() {
|
|||
|
||||
$(".ui-icon-close").click(deleteSPLItem);
|
||||
$(".spl_fade_control").click(openFadeEditor);
|
||||
$("#spl_sortable li").click(openCueEditor);
|
||||
$(".spl_playlength").click(openCueEditor);
|
||||
|
||||
$("#spl_sortable").droppable();
|
||||
$("#spl_sortable" ).bind( "drop", addSPLItem);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue