PageRenderTime 37ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/wwwroot/widgets/sample/sample.ui.js

http://github.com/AF83/ucengine
JavaScript | 33 lines | 24 code | 2 blank | 7 comment | 0 complexity | 35e7845bcbd1a30545b49303baeaba30 MD5 | raw file
  1. (function($) {
  2. $.uce.Sample = function() {}
  3. $.uce.Sample.prototype = {
  4. options: {
  5. // uce meeting instance
  6. ucemeeting : null,
  7. // widget title
  8. title : "My widget",
  9. },
  10. // ucengine events
  11. meetingsEvents : {},
  12. //
  13. _widgetClass: 'ui-widget uce-widget uce-sample',
  14. /**
  15. * Constructor
  16. */
  17. _create: function() {
  18. var that = this;
  19. this.element.addClass(this._widgetClass);
  20. this.addHeader();
  21. this._content = $("<div>").addClass("ui-widget-content").appendTo(this.element);
  22. this._content.append($("<p>").text("insert text here"));
  23. },
  24. destroy: function() {
  25. this.element.find('*').remove();
  26. this.element.removeClass(this._widgetClass);
  27. $.Widget.prototype.destroy.apply(this, arguments); // default destroy
  28. }
  29. };
  30. $.uce.widget("sample", new $.uce.Sample());
  31. })(jQuery);