CC-1799 Put Airtime Storage into a Human Readable File Naming Convention
adding ability to move stor directory.
This commit is contained in:
parent
f1893cebe6
commit
6adce1ba45
6 changed files with 132 additions and 32 deletions
|
@ -1,5 +1,26 @@
|
|||
function setWatchedDirEvents() {
|
||||
$('#watchedFolder-selection').serverBrowser({
|
||||
|
||||
$('#storageFolder-selection').serverBrowser({
|
||||
onSelect: function(path) {
|
||||
$('#storageFolder').val(path);
|
||||
},
|
||||
onLoad: function() {
|
||||
return $('#storageFolder').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 Storage Folder',
|
||||
basePath: '/home',
|
||||
requestMethod: 'POST',
|
||||
});
|
||||
|
||||
$('#watchedFolder-selection').serverBrowser({
|
||||
onSelect: function(path) {
|
||||
$('#watchedFolder').val(path);
|
||||
},
|
||||
|
@ -19,20 +40,36 @@ function setWatchedDirEvents() {
|
|||
requestMethod: 'POST',
|
||||
});
|
||||
|
||||
$('#watchedFolder-ok').click(function(){
|
||||
$('#storageFolder-ok').click(function(){
|
||||
var url, chosen;
|
||||
|
||||
url = "/Preference/reload-watch-directory";
|
||||
chosen = $('#watchedFolder').val();
|
||||
url = "/Preference/change-stor-directory";
|
||||
chosen = $('#storageFolder').val();
|
||||
|
||||
$.post(url,
|
||||
{format: "json", dir: chosen},
|
||||
$.post(url,
|
||||
{format: "json", dir: chosen, element: "storageFolder"},
|
||||
|
||||
function(json) {
|
||||
function(json) {
|
||||
$("#watched-folder-section").empty();
|
||||
$("#watched-folder-section").append(json.subform);
|
||||
setWatchedDirEvents();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$('#watchedFolder-ok').click(function(){
|
||||
var url, chosen;
|
||||
|
||||
url = "/Preference/reload-watch-directory";
|
||||
chosen = $('#watchedFolder').val();
|
||||
|
||||
$.post(url,
|
||||
{format: "json", dir: chosen, element: "watchedFolder"},
|
||||
|
||||
function(json) {
|
||||
$("#watched-folder-section").empty();
|
||||
$("#watched-folder-section").append(json.subform);
|
||||
setWatchedDirEvents();
|
||||
});
|
||||
});
|
||||
|
||||
$('#watchedFolder-table').find('.ui-icon-close').click(function(){
|
||||
|
@ -41,12 +78,12 @@ function setWatchedDirEvents() {
|
|||
|
||||
url = "/Preference/remove-watch-directory";
|
||||
|
||||
$.post(url,
|
||||
{format: "json", dir: folder},
|
||||
$.post(url,
|
||||
{format: "json", dir: folder},
|
||||
|
||||
function(json) {
|
||||
row.remove();
|
||||
});
|
||||
function(json) {
|
||||
row.remove();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue