and_cesbo

Tab for web interface

Feb 18th, 2017
567
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. astra_storage["/mod.js"] = astra_storage["/mod.js"] .. [[
  2. (function() {
  3. "use strict";
  4.  
  5. window.ExampleModule = {
  6. label: "Example",
  7. link: "#/example",
  8. order: 999,
  9. };
  10.  
  11. ExampleModule.run = function() {
  12. //
  13. };
  14.  
  15. ExampleModule.render = function(object) {
  16. object
  17. .setStyle("padding", "60px 20px 20px 20px")
  18. .addClass("text-center")
  19. .addChild($.element("iframe")
  20. .addAttr("src", "http://" + location.host)
  21. .setStyle("width", "100%")
  22. .setStyle("height", "400px"));
  23.  
  24. self.on("destroy", function() {
  25. //
  26. });
  27. };
  28.  
  29. ExampleModule.init = function() {
  30. window.renderContent = ExampleModule.render;
  31.  
  32. $.body
  33. .bindScope({})
  34. .on("destroy", function() {
  35. delete(window.renderContent);
  36. });
  37. };
  38.  
  39. app.modules.push(ExampleModule);
  40. app.menu.push(ExampleModule);
  41. })();
  42. ]]
Advertisement
Add Comment
Please, Sign In to add comment