Merge branch 'master' of dev.sourcefabric.org:campcaster
This commit is contained in:
commit
ee5e8f48ce
|
@ -3,12 +3,12 @@
|
||||||
<dd id="spl_cue_in_<?php echo $this->pos; ?>" class="spl_cue_in">
|
<dd id="spl_cue_in_<?php echo $this->pos; ?>" class="spl_cue_in">
|
||||||
<span contenteditable="true" class="spl_text_input"><?php echo $this->cueIn; ?></span>
|
<span contenteditable="true" class="spl_text_input"><?php echo $this->cueIn; ?></span>
|
||||||
</dd>
|
</dd>
|
||||||
<dd><span class="edit-error"></span></dd>
|
<dd class="edit-error"></dd>
|
||||||
<dt>Cue Out:</dt>
|
<dt>Cue Out:</dt>
|
||||||
<dd id="spl_cue_out_<?php echo $this->pos; ?>" class="spl_cue_out">
|
<dd id="spl_cue_out_<?php echo $this->pos; ?>" class="spl_cue_out">
|
||||||
<span contenteditable="true" class="spl_text_input"><?php echo $this->cueOut; ?></span>
|
<span contenteditable="true" class="spl_text_input"><?php echo $this->cueOut; ?></span>
|
||||||
</dd>
|
</dd>
|
||||||
<dd><span class="edit-error"></span></dd>
|
<dd class="edit-error"></dd>
|
||||||
<dt>Original Length:</dt>
|
<dt>Original Length:</dt>
|
||||||
<dd id="spl_original"><span><?php echo $this->origLength; ?></span></dd>
|
<dd id="spl_original"><span><?php echo $this->origLength; ?></span></dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
|
@ -3,8 +3,10 @@
|
||||||
<dd id="spl_fade_out_<?php echo $this->pos; ?>" class="spl_fade_out">
|
<dd id="spl_fade_out_<?php echo $this->pos; ?>" class="spl_fade_out">
|
||||||
<span contenteditable="true" class="spl_text_input"><?php echo $this->fadeOut; ?></span>
|
<span contenteditable="true" class="spl_text_input"><?php echo $this->fadeOut; ?></span>
|
||||||
</dd>
|
</dd>
|
||||||
|
<dd class="edit-error"></dd>
|
||||||
<dt>Fade in:</dt>
|
<dt>Fade in:</dt>
|
||||||
<dd id="spl_fade_in_<?php echo $this->pos + 1; ?>" class="spl_fade_in">
|
<dd id="spl_fade_in_<?php echo $this->pos + 1; ?>" class="spl_fade_in">
|
||||||
<span contenteditable="true" class="spl_text_input"><?php echo $this->fadeIn; ?></span>
|
<span contenteditable="true" class="spl_text_input"><?php echo $this->fadeIn; ?></span>
|
||||||
</dd>
|
</dd>
|
||||||
|
<dd class="edit-error"></dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#spl_sortable {
|
#spl_sortable {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding:0;
|
padding:0;
|
||||||
height: 300px;
|
height: 400px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
width:100%;
|
width:100%;
|
||||||
margin-top:0;
|
margin-top:0;
|
||||||
|
@ -239,12 +239,13 @@
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
.edit-error {
|
dd.edit-error {
|
||||||
color:#b80000;
|
color:#b80000;
|
||||||
margin:0;
|
margin:0;
|
||||||
padding-bottom:0;
|
padding-bottom:0;
|
||||||
font-size:12px;
|
font-size:12px;
|
||||||
display:none;
|
display:none;
|
||||||
|
clear: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*.edit-error:last-child {
|
/*.edit-error:last-child {
|
||||||
|
|
|
@ -23,6 +23,19 @@ function changeClipLength(pos, json) {
|
||||||
.append(json.response.length);
|
.append(json.response.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showError(el, error) {
|
||||||
|
$(el).parent().next()
|
||||||
|
.empty()
|
||||||
|
.append(error)
|
||||||
|
.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
function hideError(el) {
|
||||||
|
$(el).parent().next()
|
||||||
|
.empty()
|
||||||
|
.hide();
|
||||||
|
}
|
||||||
|
|
||||||
function changeCueIn(event) {
|
function changeCueIn(event) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
||||||
|
@ -34,16 +47,19 @@ function changeCueIn(event) {
|
||||||
cueIn = span.text().trim();
|
cueIn = span.text().trim();
|
||||||
|
|
||||||
if(!isTimeValid(cueIn)){
|
if(!isTimeValid(cueIn)){
|
||||||
//"please put in a time '00:00:00 (.000000)'"
|
showError(span, "please put in a time '00:00:00 (.000000)'");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$.post(url, {format: "json", cueIn: cueIn, pos: pos}, function(json){
|
$.post(url, {format: "json", cueIn: cueIn, pos: pos}, function(json){
|
||||||
|
|
||||||
if(json.response.error) {
|
if(json.response.error) {
|
||||||
|
showError(span, json.response.error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
changeClipLength(pos, json);
|
changeClipLength(pos, json);
|
||||||
|
hideError(span);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,15 +74,19 @@ function changeCueOut(event) {
|
||||||
cueOut = span.text().trim();
|
cueOut = span.text().trim();
|
||||||
|
|
||||||
if(!isTimeValid(cueOut)){
|
if(!isTimeValid(cueOut)){
|
||||||
|
showError(span, "please put in a time '00:00:00 (.000000)'");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$.post(url, {format: "json", cueOut: cueOut, pos: pos}, function(json){
|
$.post(url, {format: "json", cueOut: cueOut, pos: pos}, function(json){
|
||||||
|
|
||||||
if(json.response.error) {
|
if(json.response.error) {
|
||||||
|
showError(span, json.response.error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
changeClipLength(pos, json);
|
changeClipLength(pos, json);
|
||||||
|
hideError(span);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,15 +101,16 @@ function changeFadeIn(event) {
|
||||||
fadeIn = span.text().trim();
|
fadeIn = span.text().trim();
|
||||||
|
|
||||||
if(!isTimeValid(fadeIn)){
|
if(!isTimeValid(fadeIn)){
|
||||||
|
showError(span, "please put in a time '00:00:00 (.000000)'");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$.post(url, {format: "json", fadeIn: fadeIn, pos: pos}, function(json){
|
$.post(url, {format: "json", fadeIn: fadeIn, pos: pos}, function(json){
|
||||||
if(json.response.error) {
|
if(json.response.error) {
|
||||||
displayEditorError(json.response.error);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hideError(span);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,6 +125,7 @@ function changeFadeOut(event) {
|
||||||
fadeOut = span.text().trim();
|
fadeOut = span.text().trim();
|
||||||
|
|
||||||
if(!isTimeValid(fadeOut)){
|
if(!isTimeValid(fadeOut)){
|
||||||
|
showError(span, "please put in a time '00:00:00 (.000000)'");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,31 +133,26 @@ function changeFadeOut(event) {
|
||||||
if(json.response.error) {
|
if(json.response.error) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hideError(span);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function submitOnEnter(event) {
|
function submitOnEnter(event) {
|
||||||
//enter was pressed
|
//enter was pressed
|
||||||
if(event.keyCode === 13) {
|
if(event.keyCode === 13) {
|
||||||
|
event.preventDefault();
|
||||||
$(this).blur();
|
$(this).blur();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//function is needed for content editable span because
|
|
||||||
//jQuery sortable is not letting me edit.
|
|
||||||
function focusOnEditable(ev){
|
|
||||||
$(this).focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
function setCueEvents() {
|
function setCueEvents() {
|
||||||
|
|
||||||
$(".spl_cue_in span:last").blur(changeCueIn);
|
$(".spl_cue_in span:last").blur(changeCueIn);
|
||||||
$(".spl_cue_out span:last").blur(changeCueOut);
|
$(".spl_cue_out span:last").blur(changeCueOut);
|
||||||
|
|
||||||
$(".spl_cue_in span:first, .spl_cue_out span:first")
|
$(".spl_cue_in span:first, .spl_cue_out span:first")
|
||||||
.mousedown(focusOnEditable)
|
.keydown(submitOnEnter);
|
||||||
.keyup(submitOnEnter);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setFadeEvents() {
|
function setFadeEvents() {
|
||||||
|
@ -144,8 +161,7 @@ function setFadeEvents() {
|
||||||
$(".spl_fade_out span:first").blur(changeFadeOut);
|
$(".spl_fade_out span:first").blur(changeFadeOut);
|
||||||
|
|
||||||
$(".spl_fade_in span:first, .spl_fade_out span:first")
|
$(".spl_fade_in span:first, .spl_fade_out span:first")
|
||||||
.mousedown(focusOnEditable)
|
.keydown(submitOnEnter);
|
||||||
.keyup(submitOnEnter);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function highlightActive(el) {
|
function highlightActive(el) {
|
||||||
|
@ -243,7 +259,6 @@ function setSPLContent(json) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function addSPLItem(event, ui){
|
function addSPLItem(event, ui){
|
||||||
|
|
||||||
var url, tr, id, items, draggableOffset, elOffset, pos;
|
var url, tr, id, items, draggableOffset, elOffset, pos;
|
||||||
|
|
||||||
tr = ui.helper;
|
tr = ui.helper;
|
||||||
|
@ -272,12 +287,11 @@ function addSPLItem(event, ui){
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteSPLItem(event){
|
function deleteSPLItem(event){
|
||||||
|
event.stopPropagation();
|
||||||
|
|
||||||
var url, pos;
|
var url, pos;
|
||||||
|
|
||||||
event.stopPropagation();
|
pos = $(this).parent().parent().attr("id").split("_").pop();
|
||||||
|
|
||||||
pos = $(this).parent().attr("id").split("_").pop();
|
|
||||||
|
|
||||||
url = '/Playlist/delete-item';
|
url = '/Playlist/delete-item';
|
||||||
|
|
||||||
$.post(url, {format: "json", pos: pos}, setSPLContent);
|
$.post(url, {format: "json", pos: pos}, setSPLContent);
|
||||||
|
@ -291,12 +305,9 @@ function moveSPLItem(event, ui) {
|
||||||
newPos = li.index();
|
newPos = li.index();
|
||||||
oldPos = li.attr('id').split("_").pop();
|
oldPos = li.attr('id').split("_").pop();
|
||||||
|
|
||||||
url = '/Playlist/move-item'
|
url = '/Playlist/move-item';
|
||||||
url = url + '/format/json';
|
|
||||||
url = url + '/oldPos/' + oldPos;
|
|
||||||
url = url + '/newPos/' + newPos;
|
|
||||||
|
|
||||||
$.post(url, setSPLContent);
|
$.post(url, {format: "json", oldPos: oldPos, newPos: newPos}, setSPLContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
function noOpenPL(json) {
|
function noOpenPL(json) {
|
||||||
|
@ -368,7 +379,9 @@ function openDiffSPL(json) {
|
||||||
|
|
||||||
function setUpSPL() {
|
function setUpSPL() {
|
||||||
|
|
||||||
$("#spl_sortable").sortable();
|
$("#spl_sortable").sortable({
|
||||||
|
handle: 'div.list-item-container'
|
||||||
|
});
|
||||||
$("#spl_sortable" ).bind( "sortstop", moveSPLItem);
|
$("#spl_sortable" ).bind( "sortstop", moveSPLItem);
|
||||||
$("#spl_remove_selected").click(deleteSPLItem);
|
$("#spl_remove_selected").click(deleteSPLItem);
|
||||||
$("#spl_new")
|
$("#spl_new")
|
||||||
|
|
|
@ -181,5 +181,5 @@ function audioPreview(filename, elemID){
|
||||||
});
|
});
|
||||||
|
|
||||||
//$('#jquery_jplayer_1').jPlayer('setMedia', media).jPlayer('play');
|
//$('#jquery_jplayer_1').jPlayer('setMedia', media).jPlayer('play');
|
||||||
$('#'+elemID).children("a").children().attr("class", "ui-icon ui-icon-pause");
|
$('#'+elemID+' div.list-item-container a span').attr("class", "ui-icon ui-icon-pause");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue