-
pl)) { echo $this->pl->getName(); } ?>
-
pl)) { echo $this->pl->getLength(); } ?>
-
- pl)) {
-
- echo '
';
- echo '';
- echo 'Title';
- echo 'Creator';
- echo 'Playlength';
- echo '
';
-
- echo '
';
-
- if (count($this->pl->getContents())) {
- echo $this->partialLoop('sideplaylist/sidebarcontent.phtml', $this->pl->getContents());
- }
- else {
- echo '- Empty playlist
';
- }
-
- echo '
';
- }
- else {
- echo '
No open playlist
';
- }
- ?>
-
-
diff --git a/application/views/scripts/sideplaylist/sidebarcontent.phtml b/application/views/scripts/sideplaylist/sidebarcontent.phtml
deleted file mode 100644
index b9c57eac4..000000000
--- a/application/views/scripts/sideplaylist/sidebarcontent.phtml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
- CcFiles['track_title'] ?>
-
-
- CcFiles['artist_name'] ?>
-
-
- cliplength ?>
-
-
diff --git a/application/views/scripts/sideplaylist/update.phtml b/application/views/scripts/sideplaylist/update.phtml
deleted file mode 100644
index 46231963f..000000000
--- a/application/views/scripts/sideplaylist/update.phtml
+++ /dev/null
@@ -1,7 +0,0 @@
-pl->getContents())) {
- echo $this->partialLoop('sideplaylist/sidebarcontent.phtml', $this->pl->getContents());
-}
-else {
- echo '
Empty playlist';
-}
diff --git a/public/css/media_library.css b/public/css/media_library.css
new file mode 100644
index 000000000..e69de29bb
diff --git a/public/css/playlist_builder.css b/public/css/playlist_builder.css
new file mode 100644
index 000000000..dc47ccfec
--- /dev/null
+++ b/public/css/playlist_builder.css
@@ -0,0 +1,8 @@
+#side_playlist div, #side_playlist span, #side_playlist ul, #side_playlist li {
+ float: left;
+}
+
+#spl_sortable, #spl_sortable > li, .spl_artist, #side_playlist > div{
+ clear: left;
+}
+
diff --git a/public/js/airtime/library/spl.js b/public/js/airtime/library/spl.js
index e307afc63..b828e1fd6 100644
--- a/public/js/airtime/library/spl.js
+++ b/public/js/airtime/library/spl.js
@@ -9,14 +9,14 @@ function setSPLContent(json) {
return;
}
- $('input[name="all"]').attr("checked", false);
-
$('#spl_name').empty()
.append(json.name);
$('#spl_length').empty()
.append(json.length);
$('#spl_sortable').empty()
.append(json.html);
+
+ $(".ui-icon-close").click(deleteSPLItem);
}
function addSPLItem(event, ui){
@@ -37,16 +37,12 @@ function addSPLItem(event, ui){
}
function deleteSPLItem(){
-
var url, pos;
- url = '/Playlist/delete-item/format/json/view/spl';
+ pos = $(this).parent().attr("id").split("_").pop();
- pos = $('form[name="SPL"]').find(':checked').not('input[name="all"]').map(function() {
- return "/pos/" + $(this).attr('name');
- }).get().join("");
-
- url = url + pos;
+ url = '/Playlist/delete-item/format/json';
+ url = url + '/pos/' + pos;
$.post(url, setSPLContent);
}
@@ -61,7 +57,6 @@ function moveSPLItem(event, ui) {
url = '/Playlist/move-item'
url = url + '/format/json';
- url = url + '/view/spl';
url = url + '/oldPos/' + oldPos;
url = url + '/newPos/' + newPos;
@@ -77,15 +72,19 @@ function noOpenPL(json) {
function closeSPL() {
var url;
- url = '/Playlist/close/format/json/view/spl';
+ url = '/Playlist/close/format/json';
$.post(url, noOpenPL);
}
+function newSPL() {
+
+}
+
function deleteSPL() {
var url;
- url = '/Playlist/delete-active/format/json/view/spl';
+ url = '/Playlist/delete-active/format/json';
$.post(url, noOpenPL);
}
@@ -106,12 +105,10 @@ function setUpSPL() {
$("#spl_remove_selected").click(deleteSPLItem);
$("#spl_close").click(closeSPL);
$("#spl_delete").click(deleteSPL);
+ $(".ui-icon-close").click(deleteSPLItem);
$("#spl_sortable").droppable();
$("#spl_sortable" ).bind( "drop", addSPLItem);
- $('input[name="all"]').click(function(){
- $('form[name="SPL"]').find('input').attr("checked", $(this).attr("checked"));
- });
}