PageRenderTime 32ms CodeModel.GetById 7ms RepoModel.GetById 0ms app.codeStats 0ms

/src/Oro/Bundle/CalendarBundle/Resources/public/js/calendar/connection/collection.js

https://github.com/diimpp/platform
JavaScript | 25 lines | 12 code | 2 blank | 11 comment | 0 complexity | 73ff462af3449b40ce26f371f2e65d93 MD5 | raw file
  1. /*global define*/
  2. define(['backbone', 'routing', 'orocalendar/js/calendar/connection/model'
  3. ], function (Backbone, routing, ConnectionModel) {
  4. 'use strict';
  5. /**
  6. * @export orocalendar/js/calendar/connection/collection
  7. * @class oro.calendar.connection.Collection
  8. * @extends Backbone.Collection
  9. */
  10. return Backbone.Collection.extend({
  11. route: 'oro_api_get_calendar_connections',
  12. url: null,
  13. model: ConnectionModel,
  14. /**
  15. * Sets a calendar this collection works with
  16. *
  17. * @param {int} calendarId
  18. */
  19. setCalendar: function (calendarId) {
  20. this.url = routing.generate(this.route, {id: calendarId});
  21. }
  22. });
  23. });