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.

65 lines
1.5 KiB

3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. * Document : app.js
  3. * Author : pixelcave
  4. * Description: Main entry point
  5. *
  6. */
  7. // Import required modules
  8. import Template from './modules/template';
  9. // App extends Template
  10. export default class App extends Template {
  11. /*
  12. * Auto called when creating a new instance
  13. *
  14. */
  15. constructor() {
  16. super();
  17. }
  18. /*
  19. * Here you can override or extend any function you want from Template class
  20. * if you would like to change/extend/remove the default functionality.
  21. *
  22. * This way it will be easier for you to update the module files if a new update
  23. * is released since all your changes will be in here overriding the original ones.
  24. *
  25. * Let's have a look at the _uiInit() function, the one that runs the first time
  26. * we create an instance of Template class or App class which extends it. This function
  27. * inits all vital functionality but you can change it to fit your own needs.
  28. *
  29. */
  30. /*
  31. * EXAMPLE #1 - Removing default functionality by making it empty
  32. *
  33. */
  34. // _uiInit() {}
  35. /*
  36. * EXAMPLE #2 - Extending default functionality with additional code
  37. *
  38. */
  39. // _uiInit() {
  40. // // Call original function
  41. // super._uiInit();
  42. //
  43. // // Your extra JS code afterwards
  44. // }
  45. /*
  46. * EXAMPLE #3 - Replacing default functionality by writing your own code
  47. *
  48. */
  49. // _uiInit() {
  50. // // Your own JS code without ever calling the original function's code
  51. // }
  52. }
  53. // Create a new instance of App
  54. window.Dashmix = new App();