Spacer.js 798 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * Spacer.js
  3. *
  4. * Copyright, Moxiecode Systems AB
  5. * Released under LGPL License.
  6. *
  7. * License: http://www.tinymce.com/license
  8. * Contributing: http://www.tinymce.com/contributing
  9. */
  10. /**
  11. * Creates a spacer. This control is used in flex layouts for example.
  12. *
  13. * @-x-less Spacer.less
  14. * @class tinymce.ui.Spacer
  15. * @extends tinymce.ui.Widget
  16. */
  17. define("tinymce/ui/Spacer", [
  18. "tinymce/ui/Widget"
  19. ], function(Widget) {
  20. "use strict";
  21. return Widget.extend({
  22. /**
  23. * Renders the control as a HTML string.
  24. *
  25. * @method renderHtml
  26. * @return {String} HTML representing the control.
  27. */
  28. renderHtml: function() {
  29. var self = this;
  30. self.addClass('spacer');
  31. self.canFocus = false;
  32. return '<div id="' + self._id + '" class="' + self.classes() + '"></div>';
  33. }
  34. });
  35. });