CC-1799 Put Airtime Storage into a Human Readable File Naming Convention

adding music dirs concept to Airtime. New cc_music_dirs table/class.
This commit is contained in:
Naomi Aro 2011-06-21 10:24:02 +02:00
parent ea21da6b61
commit b6888489e0
42 changed files with 3901 additions and 441 deletions

View file

@ -1,3 +1,55 @@
function setWatchedDirEvents() {
$('#watchedFolder-selection').serverBrowser({
onSelect: function(path) {
$('#watchedFolder').val(path);
},
onLoad: function() {
return $('#watchedFolder').val();
},
width: 500,
height: 250,
position: ['center', 'center'],
//knownPaths: [{text:'Desktop', image:'desktop.png', path:'/home'}],
knownPaths: [],
imageUrl: 'img/icons/',
systemImageUrl: 'img/browser/',
handlerUrl: '/Preference/server-browse/format/json',
title: 'Choose Folder to Watch',
basePath: '/home',
requestMethod: 'POST',
});
$('#watchedFolder-ok').click(function(){
var url, chosen;
url = "/Preference/reload-watch-directory";
chosen = $('#watchedFolder').val();
$.post(url,
{format: "json", dir: chosen},
function(json) {
$("#watched-folder-section").empty();
$("#watched-folder-section").append(json.subform);
setWatchedDirEvents();
});
});
$('#watchedFolder-table').find('.ui-icon-close').click(function(){
var row = $(this).parent();
var folder = $(this).prev().text();
url = "/Preference/remove-watch-directory";
$.post(url,
{format: "json", dir: folder},
function(json) {
row.remove();
});
});
}
$(document).ready(function() {
var form = $("form");
@ -13,5 +65,7 @@ $(document).ready(function() {
h3.addClass("close");
}
});
setWatchedDirEvents();
});