You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

controller.js 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /**
  2. * Copyright (c) 2015, Arthur Schiwon <blizzz@owncloud.com>
  3. * This file is licensed under the Affero General Public License version 3 or later.
  4. * See the COPYING-README file.
  5. */
  6. OCA = OCA || {};
  7. OCA.LDAP = {};
  8. OCA.LDAP.Wizard = {};
  9. (function(){
  10. /**
  11. * @classdesc minimalistic controller that basically makes the view render
  12. *
  13. * @constructor
  14. */
  15. var WizardController = function() {};
  16. WizardController.prototype = {
  17. /**
  18. * initializes the instance. Always call it after creating the instance.
  19. */
  20. init: function() {
  21. this.view = false;
  22. this.configModel = false;
  23. },
  24. /**
  25. * sets the model instance
  26. *
  27. * @param {OCA.LDAP.Wizard.ConfigModel} [model]
  28. */
  29. setModel: function(model) {
  30. this.configModel = model;
  31. },
  32. /**
  33. * sets the view instance
  34. *
  35. * @param {OCA.LDAP.Wizard.WizardView} [view]
  36. */
  37. setView: function(view) {
  38. this.view = view;
  39. },
  40. /**
  41. * makes the view render i.e. ready to be used
  42. */
  43. run: function() {
  44. this.view.render();
  45. }
  46. };
  47. OCA.LDAP.Wizard.Controller = WizardController;
  48. })();