From 5972aba46ed28623d536071384ccbc143836c6e6 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Mon, 27 Feb 2012 23:58:08 +0100 Subject: [PATCH] CC-3174 : showbuilder changing playlist placeholder to be a li item thanks to a hack on stack overflow. --- airtime_mvc/public/js/airtime/library/spl.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/airtime_mvc/public/js/airtime/library/spl.js b/airtime_mvc/public/js/airtime/library/spl.js index 267e77921..0af662de0 100644 --- a/airtime_mvc/public/js/airtime/library/spl.js +++ b/airtime_mvc/public/js/airtime/library/spl.js @@ -549,13 +549,20 @@ var AIRTIME = (function(AIRTIME){ return { items: 'li', - placeholder: "placeholder ui-state-highlight", + //hack taken from + //http://stackoverflow.com/questions/2150002/jquery-ui-sortable-how-can-i-change-the-appearance-of-the-placeholder-object + placeholder: { + element: function(currentItem) { + return $('
  • ')[0]; + }, + update: function(container, p) { + return; + } + }, forcePlaceholderSize: true, handle: 'div.list-item-container', start: function(event, ui) { - ui.placeholder.html("PLACE HOLDER") - .width("99.5%") - .height(56); + ui.placeholder.height(56); }, receive: fnReceive, update: fnUpdate