Advertisement
mikeymop

Untitled

Oct 10th, 2019
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ------------------- settings page
  2. var PanelView = require("./widgets/panelview.js");
  3. var SettingsNotificationPage = require("./settingsNotificationPage.js");
  4.  
  5. var SettingsPage = function(){
  6.     this.page = null;
  7.     this.create();
  8. };
  9.  
  10. SettingsPage.prototype.create = function() {
  11.     ....
  12.     this.panelView = new PanelView(this.getItems(), true, true, this);
  13.  
  14.     this.panelView.on("tap", function(e, item) {
  15.         var options = server.getOptions();
  16.  
  17.         switch (e.data.id) {
  18.             ....
  19.             case "permits": new SettingsNotificationPage("Permits", "permits", options).open(); break;
  20. };
  21.  
  22.  
  23. -------------- settings notification page
  24.  
  25. var PanelView = require("./widgets/panelview.js");
  26.  
  27. var SettingsNotificationPage = function(title, type, options){
  28.     this.page  = null;
  29.     this.title = title;
  30.     this.type  = type;
  31.     this.options = options;
  32.     this.dirty = false;
  33.     this.create();
  34. };
  35.  
  36. SettingsNotificationPage.prototype.create = function() {
  37.     var self   = this;
  38.     var server = util.getServer();
  39.  
  40.     util.recordEvent("settingsNotification.view");
  41.  
  42.     ....
  43.     // this.page = page;
  44.     this.panelView = new PanelView(this.getItems(), true, true); // issue resides here, PanelView from import is {} instead of function
  45.     this.refresh();
  46.     this.page.append(this.panelView.control);
  47.  
  48. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement