Skip to content

Commit

Permalink
a tag preventDefault
Browse files Browse the repository at this point in the history
  • Loading branch information
Levan-Du committed Jun 15, 2017
1 parent 98a4449 commit 442d7ef
Show file tree
Hide file tree
Showing 30 changed files with 412 additions and 243 deletions.
428 changes: 243 additions & 185 deletions dist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html><head> <meta charset="utf-8"> <meta name="viewport" content="wdith=device-width,initial-scale=1"> <title>avalon spa demo</title></head><body class="clearfix" ms-controller="app"> <aside class="sidebar" ms-controller="vm_sidebar"> <header class="sidebar__header"> <ms-logininfo /> </header> <nav class="sidebar__nav"> <ms-menu ms-widget="{menus:menus,submenus:submenus}" /> </nav> </aside> <article class="main"> <header class="main__top"> <ms-topbar /> </header> <article class="main__content"> <ms-tab ms-widget="{items:tabItems}" /> </article> <footer class="main__footer"> <ms-statusbar /> </footer> </article><script type="text/javascript" src="bundle.js"></script></body></html>
<!DOCTYPE html><html><head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <title>avalon spa demo</title> <!--[if lt IE 9]> <script src="js/html5shiv.min.js"></script> <script src="js/respond.min.js"></script> <![endif]--></head><body> <div class="container-full clearfix" ms-controller="app"> <aside class="sidebar" ms-controller="vm_sidebar"> <header class="sidebar__header"> <ms-logininfo /> </header> <nav class="sidebar__nav"> <ms-menu ms-widget="{menus:menus,submenus:submenus,removeItem:removeTabItem}" /> </nav> </aside> <article class="main"> <header class="main__top"> <ms-topbar /> </header> <article class="main__content"> <ms-tab ms-widget="{items:tabItems,removeItem:removeTabItem}" /> </article> <footer class="main__footer"> <ms-statusbar /> </footer> </article> </div><script type="text/javascript" src="bundle.js"></script></body></html>
Expand Down
4 changes: 4 additions & 0 deletions dist/js/html5shiv-printshiv.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions dist/js/html5shiv.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions dist/js/respond.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"html-withimg-loader": "^0.1.16",
"raw-loader": "^0.5.1",
"style-loader": "^0.16.1",
"transfer-webpack-plugin": "^0.1.4",
"url-loader": "^0.5.8",
"webpack": "^2.6.1",
"webpack-dev-server": "^2.4.5"
Expand Down
4 changes: 1 addition & 3 deletions src/common/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ export var parseCssModule = (styles, tmpl) => {
var div = document.createElement('div');
div.innerHTML = tmpl;

console.log(styles);

var eles = div.getElementsByTagName('*');
for (var l = eles.length; l--;) {
var ele = eles[l],
Expand All @@ -23,4 +21,4 @@ export var parseCssModule = (styles, tmpl) => {
};

return div.innerHTML;
}
}
33 changes: 33 additions & 0 deletions src/common/hack.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
if (!Array.prototype.forEach) {
Array.prototype.forEach = function(callback) {
var arr = this;
for (var i in arr) {
callback(arr[i], parseInt(i));
}
}
}

if (!Array.prototype.find) {
Array.prototype.find = function(callback) {
var arr = [];
this.forEach(function(el, i) {
if (callback(el, i)) {
arr.push(el);
}
});
return arr;
}
}

if (!Array.prototype.findIndex) {
Array.prototype.findIndex = function(callback) {
var arr = this;
for (var i in arr) {
var j = parseInt(i)
if (callback(arr[i], j)) {
return j;
}
}
return -1;
}
}
Loading

0 comments on commit 442d7ef

Please sign in to comment.