Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
fb8735588d
14 changed files with 217 additions and 24 deletions
|
@ -279,11 +279,20 @@ function addMetadataQtip(){
|
|||
})
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
/**
|
||||
* Use user preference for number of entries to show;
|
||||
* defaults to 10 if preference was never set
|
||||
*/
|
||||
function getNumEntriesPreference(data) {
|
||||
var numEntries = data.libraryInit.numEntries;
|
||||
if(numEntries == '') {
|
||||
numEntries = '10';
|
||||
}
|
||||
return parseInt(numEntries);
|
||||
}
|
||||
|
||||
$('.tabs').tabs();
|
||||
|
||||
$('#library_display').dataTable( {
|
||||
function createDataTable(data) {
|
||||
var dTable = $('#library_display').dataTable( {
|
||||
"bProcessing": true,
|
||||
"bServerSide": true,
|
||||
"sAjaxSource": "/Library/contents/format/json",
|
||||
|
@ -313,8 +322,28 @@ $(document).ready(function() {
|
|||
"bAutoWidth": false,
|
||||
"oLanguage": {
|
||||
"sSearch": ""
|
||||
}
|
||||
}).fnSetFilteringDelay(350);
|
||||
},
|
||||
"iDisplayLength": getNumEntriesPreference(data)
|
||||
});
|
||||
dTable.fnSetFilteringDelay(350);
|
||||
|
||||
// Updates pref db when user changes the # of entries to show
|
||||
$('select[name=library_display_length]').change(function() {
|
||||
var url = '/Library/set-num-entries/format/json';
|
||||
$.post(url, {numEntries: $(this).val()},
|
||||
function(json){
|
||||
if(json.error) {
|
||||
alert(json.error);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('.tabs').tabs();
|
||||
|
||||
$.ajax({ url: "/Api/library-init/format/json", dataType:"json", success:createDataTable
|
||||
, error:function(jqXHR, textStatus, errorThrown){}});
|
||||
|
||||
checkImportStatus()
|
||||
setInterval( "checkImportStatus()", 5000 );
|
||||
|
|
|
@ -13,7 +13,7 @@ function setWatchedDirEvents() {
|
|||
//knownPaths: [{text:'Desktop', image:'desktop.png', path:'/home'}],
|
||||
knownPaths: [],
|
||||
imageUrl: 'img/icons/',
|
||||
systemImageUrl: 'img/browser/',
|
||||
systemImageUrl: '/css/img/',
|
||||
handlerUrl: '/Preference/server-browse/format/json',
|
||||
title: 'Choose Storage Folder',
|
||||
basePath: '',
|
||||
|
|
|
@ -308,6 +308,17 @@ function getTimeScalePreference(data) {
|
|||
return timeScale;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use user preference for time interval; defaults to 30m if preference was never set
|
||||
*/
|
||||
function getTimeIntervalPreference(data) {
|
||||
var timeInterval = data.calendarInit.timeInterval;
|
||||
if(timeInterval == '') {
|
||||
timeInterval = '30';
|
||||
}
|
||||
return parseInt(timeInterval);
|
||||
}
|
||||
|
||||
function createFullCalendar(data){
|
||||
|
||||
serverTimezoneOffset = data.calendarInit.timezoneOffset;
|
||||
|
@ -321,6 +332,8 @@ function createFullCalendar(data){
|
|||
right: 'agendaDay, agendaWeek, month'
|
||||
},
|
||||
defaultView: getTimeScalePreference(data),
|
||||
slotMinutes: getTimeIntervalPreference(data),
|
||||
firstDay: data.calendarInit.weekStartDay,
|
||||
editable: false,
|
||||
allDaySlot: false,
|
||||
axisFormat: 'H:mm',
|
||||
|
@ -347,7 +360,7 @@ function createFullCalendar(data){
|
|||
|
||||
//Update time scale preference when day/week/month button is clicked
|
||||
$(".fc-button-content").click(function() {
|
||||
url = '/Schedule/set-time-scale/format/json';
|
||||
var url = '/Schedule/set-time-scale/format/json';
|
||||
$.post(url, {timeScale: $(this).text()},
|
||||
function(json){
|
||||
if(json.error) {
|
||||
|
@ -355,6 +368,17 @@ function createFullCalendar(data){
|
|||
}
|
||||
});
|
||||
});
|
||||
|
||||
//Update time interval preference when dropdown is updated
|
||||
$(".schedule_change_slots.input_select").change(function() {
|
||||
var url = '/Schedule/set-time-interval/format/json';
|
||||
$.post(url, {timeInterval: $(this).val()},
|
||||
function(json){
|
||||
if(json.error) {
|
||||
alert(json.error);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$(window).load(function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue