Browse Source

Drop jquery and use native bootstrap

JC Brand 7 years ago
parent
commit
6f59114989
4 changed files with 345 additions and 337 deletions
  1. 0 5
      mockup/bs4/js/bootstrap.bundle.min.js
  2. 5 0
      mockup/bs4/user-panel.js
  3. 337 330
      package-lock.json
  4. 3 2
      package.json

File diff suppressed because it is too large
+ 0 - 5
mockup/bs4/js/bootstrap.bundle.min.js


+ 5 - 0
mockup/bs4/user-panel.js

@@ -11,6 +11,11 @@ const UserPanel = Backbone.NativeView.extend({
         xhr.open('GET', 'user-panel.html', true);
         xhr.onload = () => {
             this.el.innerHTML = xhr.responseText;
+            this.modals = _.map(this.el.querySelectorAll('[data-toggle="modal"]'), (modal_el) => 
+                new window.Modal(modal_el, {
+                    backdrop: 'static', // we don't want to dismiss Modal when Modal or backdrop is the click event target
+                    keyboard: true // we want to dismiss Modal on pressing Esc key
+                }));
         }
         xhr.send();
     }

File diff suppressed because it is too large
+ 337 - 330
package-lock.json


+ 3 - 2
package.json

@@ -39,7 +39,8 @@
     "backbone.nativeview": "^0.3.3",
     "backbone.overview": "1.0.0",
     "backbone.vdomview": "1.0.0",
-    "bootstrap": "^3.3.7",
+    "bootstrap": "^4.0.0",
+    "bootstrap.native": "^2.0.21",
     "bourbon": "^4.3.2",
     "clean-css-cli": "^4.0.10",
     "emojione": "^3.0.3",
@@ -49,8 +50,8 @@
     "font-awesome": "^4.7.0",
     "http-server": "^0.10.0",
     "install": "^0.9.5",
-    "jed": "1.1.1",
     "jasmine-core": "2.6.4",
+    "jed": "1.1.1",
     "jquery": "3.2.1",
     "jshint": "^2.9.4",
     "lodash": "4.17.4",

Some files were not shown because too many files changed in this diff