update js files for new ajax pathes
This commit is contained in:
parent
8cd1027214
commit
cfa284bfa8
|
@ -69,7 +69,7 @@ Calendar={
|
||||||
$('#event').dialog('destroy').remove();
|
$('#event').dialog('destroy').remove();
|
||||||
}else{
|
}else{
|
||||||
Calendar.UI.loading(true);
|
Calendar.UI.loading(true);
|
||||||
$('#dialog_holder').load(OC.filePath('calendar', 'ajax', 'neweventform.php'), {start:start, end:end, allday:allday?1:0}, Calendar.UI.startEventDialog);
|
$('#dialog_holder').load(OC.filePath('calendar', 'ajax/event', 'new.form.php'), {start:start, end:end, allday:allday?1:0}, Calendar.UI.startEventDialog);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
editEvent:function(calEvent, jsEvent, view){
|
editEvent:function(calEvent, jsEvent, view){
|
||||||
|
@ -79,7 +79,7 @@ Calendar={
|
||||||
$('#event').dialog('destroy').remove();
|
$('#event').dialog('destroy').remove();
|
||||||
}else{
|
}else{
|
||||||
Calendar.UI.loading(true);
|
Calendar.UI.loading(true);
|
||||||
$('#dialog_holder').load(OC.filePath('calendar', 'ajax', 'editeventform.php') + '?id=' + id, Calendar.UI.startEventDialog);
|
$('#dialog_holder').load(OC.filePath('calendar', 'ajax/event', 'edit.form.php') + '?id=' + id, Calendar.UI.startEventDialog);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
submitDeleteEventForm:function(url){
|
submitDeleteEventForm:function(url){
|
||||||
|
@ -141,7 +141,7 @@ Calendar={
|
||||||
moveEvent:function(event, dayDelta, minuteDelta, allDay, revertFunc){
|
moveEvent:function(event, dayDelta, minuteDelta, allDay, revertFunc){
|
||||||
$('.tipsy').remove();
|
$('.tipsy').remove();
|
||||||
Calendar.UI.loading(true);
|
Calendar.UI.loading(true);
|
||||||
$.post(OC.filePath('calendar', 'ajax', 'moveevent.php'), { id: event.id, dayDelta: dayDelta, minuteDelta: minuteDelta, allDay: allDay?1:0, lastmodified: event.lastmodified},
|
$.post(OC.filePath('calendar', 'ajax/event', 'move.php'), { id: event.id, dayDelta: dayDelta, minuteDelta: minuteDelta, allDay: allDay?1:0, lastmodified: event.lastmodified},
|
||||||
function(data) {
|
function(data) {
|
||||||
Calendar.UI.loading(false);
|
Calendar.UI.loading(false);
|
||||||
if (data.status == 'success'){
|
if (data.status == 'success'){
|
||||||
|
@ -156,7 +156,7 @@ Calendar={
|
||||||
resizeEvent:function(event, dayDelta, minuteDelta, revertFunc){
|
resizeEvent:function(event, dayDelta, minuteDelta, revertFunc){
|
||||||
$('.tipsy').remove();
|
$('.tipsy').remove();
|
||||||
Calendar.UI.loading(true);
|
Calendar.UI.loading(true);
|
||||||
$.post(OC.filePath('calendar', 'ajax', 'resizeevent.php'), { id: event.id, dayDelta: dayDelta, minuteDelta: minuteDelta, lastmodified: event.lastmodified},
|
$.post(OC.filePath('calendar', 'ajax/event', 'resize.php'), { id: event.id, dayDelta: dayDelta, minuteDelta: minuteDelta, lastmodified: event.lastmodified},
|
||||||
function(data) {
|
function(data) {
|
||||||
Calendar.UI.loading(false);
|
Calendar.UI.loading(false);
|
||||||
if (data.status == 'success'){
|
if (data.status == 'success'){
|
||||||
|
@ -373,7 +373,7 @@ Calendar={
|
||||||
$('#choosecalendar_dialog').dialog('moveToTop');
|
$('#choosecalendar_dialog').dialog('moveToTop');
|
||||||
}else{
|
}else{
|
||||||
Calendar.UI.loading(true);
|
Calendar.UI.loading(true);
|
||||||
$('#dialog_holder').load(OC.filePath('calendar', 'ajax', 'choosecalendar.php'), function(){
|
$('#dialog_holder').load(OC.filePath('calendar', 'ajax/calendar', 'overview.php'), function(){
|
||||||
$('#choosecalendar_dialog').dialog({
|
$('#choosecalendar_dialog').dialog({
|
||||||
width : 600,
|
width : 600,
|
||||||
close : function(event, ui) {
|
close : function(event, ui) {
|
||||||
|
@ -387,7 +387,7 @@ Calendar={
|
||||||
activation:function(checkbox, calendarid)
|
activation:function(checkbox, calendarid)
|
||||||
{
|
{
|
||||||
Calendar.UI.loading(true);
|
Calendar.UI.loading(true);
|
||||||
$.post(OC.filePath('calendar', 'ajax', 'activation.php'), { calendarid: calendarid, active: checkbox.checked?1:0 },
|
$.post(OC.filePath('calendar', 'ajax/calendar', 'activation.php'), { calendarid: calendarid, active: checkbox.checked?1:0 },
|
||||||
function(data) {
|
function(data) {
|
||||||
Calendar.UI.loading(false);
|
Calendar.UI.loading(false);
|
||||||
if (data.status == 'success'){
|
if (data.status == 'success'){
|
||||||
|
@ -402,13 +402,13 @@ Calendar={
|
||||||
},
|
},
|
||||||
newCalendar:function(object){
|
newCalendar:function(object){
|
||||||
var tr = $(document.createElement('tr'))
|
var tr = $(document.createElement('tr'))
|
||||||
.load(OC.filePath('calendar', 'ajax', 'newcalendar.php'),
|
.load(OC.filePath('calendar', 'ajax/calendar', 'new.form.php'),
|
||||||
function(){Calendar.UI.Calendar.colorPicker(this)});
|
function(){Calendar.UI.Calendar.colorPicker(this)});
|
||||||
$(object).closest('tr').after(tr).hide();
|
$(object).closest('tr').after(tr).hide();
|
||||||
},
|
},
|
||||||
edit:function(object, calendarid){
|
edit:function(object, calendarid){
|
||||||
var tr = $(document.createElement('tr'))
|
var tr = $(document.createElement('tr'))
|
||||||
.load(OC.filePath('calendar', 'ajax', 'editcalendar.php') + "?calendarid="+calendarid,
|
.load(OC.filePath('calendar', 'ajax/calendar', 'edit.form.php') + "?calendarid="+calendarid,
|
||||||
function(){Calendar.UI.Calendar.colorPicker(this)});
|
function(){Calendar.UI.Calendar.colorPicker(this)});
|
||||||
$(object).closest('tr').after(tr).hide();
|
$(object).closest('tr').after(tr).hide();
|
||||||
},
|
},
|
||||||
|
@ -417,7 +417,7 @@ Calendar={
|
||||||
if(check == false){
|
if(check == false){
|
||||||
return false;
|
return false;
|
||||||
}else{
|
}else{
|
||||||
$.post(OC.filePath('calendar', 'ajax', 'deletecalendar.php'), { calendarid: calid},
|
$.post(OC.filePath('calendar', 'ajax/calendar', 'delete.php'), { calendarid: calid},
|
||||||
function(data) {
|
function(data) {
|
||||||
if (data.status == 'success'){
|
if (data.status == 'success'){
|
||||||
var url = 'ajax/events.php?calendar_id='+calid;
|
var url = 'ajax/events.php?calendar_id='+calid;
|
||||||
|
@ -442,9 +442,9 @@ Calendar={
|
||||||
|
|
||||||
var url;
|
var url;
|
||||||
if (calendarid == 'new'){
|
if (calendarid == 'new'){
|
||||||
url = OC.filePath('calendar', 'ajax', 'createcalendar.php');
|
url = OC.filePath('calendar', 'ajax/calendar', 'new.php');
|
||||||
}else{
|
}else{
|
||||||
url = OC.filePath('calendar', 'ajax', 'updatecalendar.php');
|
url = OC.filePath('calendar', 'ajax/calendar', 'update.php');
|
||||||
}
|
}
|
||||||
$.post(url, { id: calendarid, name: displayname, active: active, description: description, color: calendarcolor },
|
$.post(url, { id: calendarid, name: displayname, active: active, description: description, color: calendarcolor },
|
||||||
function(data){
|
function(data){
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
*/
|
*/
|
||||||
if (navigator.geolocation) {
|
if (navigator.geolocation) {
|
||||||
navigator.geolocation.getCurrentPosition(function(position) {
|
navigator.geolocation.getCurrentPosition(function(position) {
|
||||||
$.getJSON(OC.filePath('calendar', 'ajax', 'guesstimezone.php?lat=' + position.coords.latitude + '&long=' + position.coords.longitude + ''),
|
$.getJSON(OC.filePath('calendar', 'ajax/settings', 'guesstimezone.php?lat=' + position.coords.latitude + '&long=' + position.coords.longitude + ''),
|
||||||
function(data){
|
function(data){
|
||||||
if (data.status == 'success' && typeof(data.message) != 'undefined'){
|
if (data.status == 'success' && typeof(data.message) != 'undefined'){
|
||||||
$('#notification').html(data.message);
|
$('#notification').html(data.message);
|
||||||
|
|
|
@ -8,7 +8,7 @@ Calendar_Import={
|
||||||
importdialog: function(filename){
|
importdialog: function(filename){
|
||||||
var path = $('#dir').val();
|
var path = $('#dir').val();
|
||||||
$('body').append('<div id="calendar_import"></div>');
|
$('body').append('<div id="calendar_import"></div>');
|
||||||
$('#calendar_import').load(OC.filePath('calendar', 'ajax', 'importdialog.php'), {filename:filename, path:path}, function(){Calendar_Import.initdialog(filename);});
|
$('#calendar_import').load(OC.filePath('calendar', 'ajax/import', 'dialog.php'), {filename:filename, path:path}, function(){Calendar_Import.initdialog(filename);});
|
||||||
},
|
},
|
||||||
initdialog: function(filename){
|
initdialog: function(filename){
|
||||||
$('#calendar_import_dialog').dialog({
|
$('#calendar_import_dialog').dialog({
|
||||||
|
|
|
@ -3,7 +3,7 @@ $(document).ready(function(){
|
||||||
OC.msg.startSaving('#calendar .msg')
|
OC.msg.startSaving('#calendar .msg')
|
||||||
// Serialize the data
|
// Serialize the data
|
||||||
var post = $( '#timezone' ).serialize();
|
var post = $( '#timezone' ).serialize();
|
||||||
$.post( OC.filePath('calendar', 'ajax', 'settimezone.php'), post, function(data){
|
$.post( OC.filePath('calendar', 'ajax/settings', 'settimezone.php'), post, function(data){
|
||||||
//OC.msg.finishedSaving('#calendar .msg', data);
|
//OC.msg.finishedSaving('#calendar .msg', data);
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
|
@ -11,7 +11,7 @@ $(document).ready(function(){
|
||||||
$('#timezone').chosen();
|
$('#timezone').chosen();
|
||||||
$('#timeformat').change( function(){
|
$('#timeformat').change( function(){
|
||||||
var data = $('#timeformat').serialize();
|
var data = $('#timeformat').serialize();
|
||||||
$.post( OC.filePath('calendar', 'ajax', 'settimeformat.php'), data, function(data){
|
$.post( OC.filePath('calendar', 'ajax/settings', 'settimeformat.php'), data, function(data){
|
||||||
if(data == 'error'){
|
if(data == 'error'){
|
||||||
console.log('saving timeformat failed');
|
console.log('saving timeformat failed');
|
||||||
}
|
}
|
||||||
|
@ -19,15 +19,15 @@ $(document).ready(function(){
|
||||||
});
|
});
|
||||||
$('#timezonedetection').change( function(){
|
$('#timezonedetection').change( function(){
|
||||||
var post = $('#timezonedetection').serialize();
|
var post = $('#timezonedetection').serialize();
|
||||||
$.post( OC.filePath('calendar', 'ajax', 'timezonedetection.php'), post, function(data){
|
$.post( OC.filePath('calendar', 'ajax/settings', 'timezonedetection.php'), post, function(data){
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
$.getJSON(OC.filePath('calendar', 'ajax', 'timeformat.php'), function(jsondata, status) {
|
$.getJSON(OC.filePath('calendar', 'ajax/settings', 'timeformat.php'), function(jsondata, status) {
|
||||||
$('#' + jsondata.timeformat).attr('selected',true);
|
$('#' + jsondata.timeformat).attr('selected',true);
|
||||||
$('#timeformat').chosen();
|
$('#timeformat').chosen();
|
||||||
});
|
});
|
||||||
$.getJSON(OC.filePath('calendar', 'ajax', 'gettimezonedetection.php'), function(jsondata, status){
|
$.getJSON(OC.filePath('calendar', 'ajax/settings', 'gettimezonedetection.php'), function(jsondata, status){
|
||||||
if(jsondata.detection == 'true'){
|
if(jsondata.detection == 'true'){
|
||||||
$('#timezonedetection').attr('checked', 'checked');
|
$('#timezonedetection').attr('checked', 'checked');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue