mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-59382 calendar: rename repository and events
Renamed the calendar_repository and calendar_events to repository and events respectively since they are already in the calendar namespace there is no need for the redundant calendar prefix.
This commit is contained in:
parent
159a2bc1fe
commit
6103fd2efe
1
calendar/amd/build/calendar_events.min.js
vendored
1
calendar/amd/build/calendar_events.min.js
vendored
@ -1 +0,0 @@
|
||||
define([],function(){return{deleted:"calendar-events:deleted"}});
|
1
calendar/amd/build/events.min.js
vendored
Normal file
1
calendar/amd/build/events.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
define([],function(){return{created:"calendar-events:created",deleted:"calendar-events:deleted",updated:"calendar-events:updated",editEvent:"calendar-events:edit_event"}});
|
@ -1 +1 @@
|
||||
define(["jquery","core/ajax"],function(a,b){var c=function(a){var c={methodname:"core_calendar_delete_calendar_events",args:{events:[{eventid:a,repeat:1}]}};return b.call([c])[0]},d=function(a){var c={methodname:"core_calendar_get_calendar_event_by_id",args:{eventid:a}};return b.call([c])[0]};return{getEventById:d,deleteEvent:c}});
|
||||
define(["jquery","core/ajax"],function(a,b){var c=function(a){var c={methodname:"core_calendar_delete_calendar_events",args:{events:[{eventid:a,repeat:1}]}};return b.call([c])[0]},d=function(a){var c={methodname:"core_calendar_get_calendar_event_by_id",args:{eventid:a}};return b.call([c])[0]},e=function(a){var c={methodname:"core_calendar_submit_create_update_form",args:{formdata:a}};return b.call([c])[0]};return{getEventById:d,deleteEvent:c,submitCreateUpdateForm:e}});
|
@ -14,9 +14,9 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Contain the events a modal can fire.
|
||||
* Contain the events the calendar component can fire.
|
||||
*
|
||||
* @module core_calendar/calendar_events
|
||||
* @module core_calendar/events
|
||||
* @class calendar_events
|
||||
* @package core_calendar
|
||||
* @copyright 2017 Simey Lameze <simey@moodle.com>
|
||||
@ -24,6 +24,9 @@
|
||||
*/
|
||||
define([], function() {
|
||||
return {
|
||||
deleted: 'calendar-events:deleted'
|
||||
created: 'calendar-events:created',
|
||||
deleted: 'calendar-events:deleted',
|
||||
updated: 'calendar-events:updated',
|
||||
editEvent: 'calendar-events:edit_event'
|
||||
};
|
||||
});
|
@ -16,7 +16,7 @@
|
||||
/**
|
||||
* A javascript module to handle calendar ajax actions.
|
||||
*
|
||||
* @module core_calendar/calendar_repository
|
||||
* @module core_calendar/repository
|
||||
* @class repository
|
||||
* @package core_calendar
|
||||
* @copyright 2017 Simey Lameze <lameze@moodle.com>
|
||||
@ -65,8 +65,27 @@ define(['jquery', 'core/ajax'], function($, Ajax) {
|
||||
return Ajax.call([request])[0];
|
||||
};
|
||||
|
||||
/**
|
||||
* Submit the form data for the event form.
|
||||
*
|
||||
* @method submitCreateUpdateForm
|
||||
* @param {string} formdata The URL encoded values from the form
|
||||
* @return {promise} Resolved with the new or edited event
|
||||
*/
|
||||
var submitCreateUpdateForm = function(formdata) {
|
||||
var request = {
|
||||
methodname: 'core_calendar_submit_create_update_form',
|
||||
args: {
|
||||
formdata: formdata
|
||||
}
|
||||
};
|
||||
|
||||
return Ajax.call([request])[0];
|
||||
};
|
||||
|
||||
return {
|
||||
getEventById: getEventById,
|
||||
deleteEvent: deleteEvent
|
||||
deleteEvent: deleteEvent,
|
||||
submitCreateUpdateForm: submitCreateUpdateForm
|
||||
};
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user