migration.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. require.config({
  2. hbs: {
  3. disableI18n: !0,
  4. helperPathCallback: function(name) {
  5. return "modules/Helpers";
  6. },
  7. templateExtension: "html",
  8. compileOptions: {}
  9. },
  10. urlArgs: "bust=" + getBustValue(),
  11. deps: [ "marionette" ],
  12. waitSeconds: 30,
  13. shim: {
  14. backbone: {
  15. deps: [ "underscore", "jquery" ],
  16. exports: "Backbone"
  17. },
  18. bootstrap: {
  19. deps: [ "jquery" ],
  20. exports: "jquery"
  21. },
  22. underscore: {
  23. exports: "_"
  24. },
  25. marionette: {
  26. deps: [ "backbone" ]
  27. },
  28. hbs: {
  29. deps: [ "underscore", "handlebars" ]
  30. },
  31. "jquery-placeholder": {
  32. deps: [ "jquery" ]
  33. },
  34. "jquery-ui": {
  35. deps: [ "jquery" ]
  36. },
  37. "moment-timezone": {
  38. deps: [ "moment" ]
  39. },
  40. moment: {
  41. exports: [ "moment" ]
  42. },
  43. pnotify: {
  44. exports: [ "pnotify" ]
  45. },
  46. d3: {
  47. exports: [ "d3" ]
  48. }
  49. },
  50. paths: {
  51. jquery: "libs/jquery/js/jquery.min",
  52. underscore: "libs/underscore/underscore-min",
  53. bootstrap: "libs/bootstrap/js/bootstrap.min",
  54. backbone: "libs/backbone/backbone-min",
  55. "backbone.babysitter": "libs/backbone.babysitter/lib/backbone.babysitter.min",
  56. marionette: "libs/backbone-marionette/backbone.marionette.min",
  57. "backbone.paginator": "libs/backbone-paginator/backbone.paginator.min",
  58. tmpl: "templates",
  59. "requirejs.text": "libs/requirejs-text/text",
  60. handlebars: "external_lib/require-handlebars-plugin/js/handlebars",
  61. hbs: "external_lib/require-handlebars-plugin/js/hbs",
  62. i18nprecompile: "external_lib/require-handlebars-plugin/js/i18nprecompile",
  63. "jquery-placeholder": "libs/jquery-placeholder/js/jquery.placeholder",
  64. platform: "libs/platform/platform",
  65. pnotify: "external_lib/pnotify/pnotify.custom.min",
  66. "pnotify.buttons": "external_lib/pnotify/pnotify.custom.min",
  67. "pnotify.confirm": "external_lib/pnotify/pnotify.custom.min",
  68. moment: "libs/moment/js/moment.min",
  69. "moment-timezone": "libs/moment-timezone/moment-timezone-with-data.min",
  70. "jquery-ui": "external_lib/jquery-ui/jquery-ui.min",
  71. d3: "libs/d3/d3.min"
  72. },
  73. enforceDefine: !1
  74. }), require([ "marionette", "utils/Helper", "bootstrap" ], function(Marionette, Helper) {
  75. var App = new Marionette.Application();
  76. App.addRegions({
  77. rContent: ".page-wrapper"
  78. }), App.addInitializer(function() {
  79. Backbone.history.start();
  80. });
  81. var Router = Backbone.Router.extend({
  82. routes: {
  83. "": "defaultAction",
  84. "*actions": "defaultAction"
  85. },
  86. initialize: function(options) {},
  87. showRegions: function() {},
  88. execute: function(callback, args) {
  89. this.preRouteExecute(), callback && callback.apply(this, args), this.postRouteExecute();
  90. },
  91. preRouteExecute: function() {},
  92. postRouteExecute: function(name, args) {},
  93. defaultAction: function() {
  94. require([ "views/migration/MigrationView" ], function(MigrationView) {
  95. App.rContent.show(new MigrationView());
  96. });
  97. }
  98. });
  99. App.appRouter = new Router({
  100. entityDefCollection: this.entityDefCollection
  101. }), App.start();
  102. });