CC-2301 : showing waveform cue/fade editors inside of a jquery dialog box.

This commit is contained in:
Naomi 2013-04-16 14:37:08 -04:00
parent 811abc4baf
commit 13c8e5f146
23 changed files with 3090 additions and 1 deletions

View file

@ -1061,6 +1061,93 @@ var AIRTIME = (function(AIRTIME){
playlistRequest(sUrl, oData);
};
mod.showFadesWaveform = function(e) {
var $el = $(e.target),
$parent = $el.parent(),
trackEditor = new TrackEditor(),
audioControls = new AudioControls(),
trackElem,
config,
$html = $($("#tmpl-pl-fades").html()),
tracks = [
{
src: $parent.data("fadeout")
},
{
src: $parent.data("fadein")
}
];
//$el.replaceWith(html);
$html.dialog({
modal: true,
title: "Fade Editor",
show: 'clip',
hide: 'clip',
width: 900,
height: 300,
buttons: [
//{text: "Submit", click: function() {doSomething()}},
{text: "Cancel", click: function() {$(this).dialog("close");}}
]
});
config = new Config({
resolution: 15000,
state: "shift",
mono: true,
waveHeight: 80,
container: $html[0],
UITheme: "jQueryUI"
});
var playlistEditor = new PlaylistEditor();
playlistEditor.setConfig(config);
playlistEditor.init(tracks);
};
mod.showCuesWaveform = function(e) {
var $el = $(e.target),
$parent = $el.parent(),
uri = $parent.data("uri"),
trackEditor = new TrackEditor(),
audioControls = new AudioControls(),
trackElem,
config,
$html = $($("#tmpl-pl-cues").html()),
tracks = [{
src: uri
}];
//$el.replaceWith(html);
$html.dialog({
modal: true,
title: "Cue Editor",
show: 'clip',
hide: 'clip',
width: 900,
height: 300,
buttons: [
//{text: "Submit", click: function() {doSomething()}},
{text: "Cancel", click: function() {$(this).dialog("close");}}
]
});
config = new Config({
resolution: 15000,
mono: true,
waveHeight: 80,
container: $html[0],
UITheme: "jQueryUI"
});
var playlistEditor = new PlaylistEditor();
playlistEditor.setConfig(config);
playlistEditor.init(tracks);
};
mod.init = function() {
/*
$.contextMenu({
@ -1089,6 +1176,14 @@ var AIRTIME = (function(AIRTIME){
AIRTIME.playlist.fnWsDelete();
}});
$pl.delegate(".pl-waveform-cues-btn", {"click": function(ev){
AIRTIME.playlist.showCuesWaveform(ev);
}});
$pl.delegate(".pl-waveform-fades-btn", {"click": function(ev){
AIRTIME.playlist.showFadesWaveform(ev);
}});
setPlaylistEntryEvents();
setCueEvents();
setFadeEvents();