moodle-atto_iassign-button-min.js 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. var PLUGINNAME = 'atto_iassign';
  2. YUI.add("moodle-atto_iassign-button", function (e, t) {
  3. e.namespace("M.atto_iassign").Button = e.Base.create("button", e.M.editor_atto.EditorPlugin, [], {
  4. _currentSelection: null,
  5. /**
  6. * Function for initialize namespace.
  7. */
  8. initializer: function () {
  9. this.addButton({
  10. icon: M.util.image_url('icon', PLUGINNAME),
  11. callback: this._selectFile
  12. });
  13. },
  14. /**
  15. * Function for callback button in editor.
  16. */
  17. _selectFile: function () {
  18. this._currentSelection = this.get('host').getSelection();
  19. open_ilm_manager = window.open(this.get('iassign_wwwroot') + '?id=' + this.get('iassign_course') + '&from=atto', '', 'width=1000,height=880,menubar=0,location=0,scrollbars,status,fullscreen,resizable');
  20. }
  21. }, {
  22. ATTRS: {
  23. iassign_wwwroot: {
  24. value: null
  25. },
  26. iassign_course: {
  27. value: null
  28. }
  29. }
  30. });
  31. }, "@VERSION@", {requires: ["moodle-editor_atto-plugin"]});