Merge branch 'cc-1799-put-airtime-storage-into-a-human-readable-file-naming-convention' into devel
Conflicts: airtime_mvc/application/controllers/PreferenceController.php airtime_mvc/application/models/Preference.php airtime_mvc/application/views/scripts/form/preferences.phtml airtime_mvc/public/js/airtime/preferences/preferences.js
This commit is contained in:
commit
253eb811c7
42 changed files with 3966 additions and 499 deletions
|
@ -1,12 +1,64 @@
|
|||
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");
|
||||
|
||||
|
||||
$('.collapsible-header').live('click',function() {
|
||||
$(this).next().toggle('fast');
|
||||
$(this).toggleClass("close");
|
||||
return false;
|
||||
}).next().hide();
|
||||
|
||||
|
||||
$("#SupportFeedback").click( function(){
|
||||
var pub = $("#Publicise");
|
||||
if( !$(this).is(':checked') ){
|
||||
|
@ -16,9 +68,10 @@ $(document).ready(function() {
|
|||
pub.removeAttr("disabled");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
showErrorSections();
|
||||
|
||||
setWatchedDirEvents();
|
||||
|
||||
});
|
||||
|
||||
function showErrorSections() {
|
||||
|
@ -35,17 +88,17 @@ function showErrorSections() {
|
|||
|
||||
function resizeImg(ele){
|
||||
var img = $(ele);
|
||||
|
||||
|
||||
var width = ele.width;
|
||||
var height = ele.height;
|
||||
|
||||
|
||||
// resize img proportionaly
|
||||
if( width > height && width > 450){
|
||||
var ratio = 450/width;
|
||||
img.css("width", "450px");
|
||||
var newHeight = height * ratio;
|
||||
img.css("height", newHeight );
|
||||
|
||||
|
||||
}else if( width < height && height > 450){
|
||||
var ratio = 450/height;
|
||||
img.css("height", "450px");
|
||||
|
@ -55,7 +108,10 @@ function resizeImg(ele){
|
|||
img.css("height", "450px");
|
||||
img.css("width", "450px" );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue