Skip to content

Commit

Permalink
编译至mui v1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hbcui1984 committed May 19, 2015
1 parent bfb1f58 commit 2b1387f
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 22 deletions.
2 changes: 1 addition & 1 deletion dist/css/mui.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* =====================================================
* Mui v1.6.0 (https://github.com/dcloudio/mui)
* Mui v1.7.0 (https://github.com/dcloudio/mui)
* =====================================================
*/

Expand Down
2 changes: 1 addition & 1 deletion dist/css/mui.min.css

Large diffs are not rendered by default.

16 changes: 13 additions & 3 deletions dist/js/mui.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* =====================================================
* Mui v1.6.0 (https://github.com/dcloudio/mui)
* Mui v1.7.0 (https://github.com/dcloudio/mui)
* =====================================================
*/
/**
Expand Down Expand Up @@ -879,7 +879,7 @@ var mui = (function(document, undefined) {
var tagName = target.tagName;
if (event === 'tap' && (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && tagName !== 'SELECT')) {
e.preventDefault();
e.detail && e.detail.gesture && e.detail.gesture.preventDefault()
e.detail && e.detail.gesture && e.detail.gesture.preventDefault();
}
$.each(handler.handlers, function(index, handler) {
$.each(handler, function(index, callback) {
Expand Down Expand Up @@ -918,6 +918,16 @@ var mui = (function(document, undefined) {
if (isAddEventListener) {
delegateFns[mid(element)] = delegateFn(element, event, selector, callback);
element.addEventListener(event, delegateFns[mid(element)]);
if (event === 'tap') { //TODO 需要找个更好的解决方案
element.addEventListener('click', function(e) {
if (e.target) {
var tagName = e.target.tagName;
if (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && tagName !== 'SELECT') {
e.preventDefault();
}
}
});
}
}
});
};
Expand Down Expand Up @@ -5914,7 +5924,7 @@ var mui = (function(document, undefined) {
var isExpand = false;
var classList = cell.classList;
var ul = cell.parentNode;
if (ul.classList.contains(CLASS_RADIO_VIEW)) {
if (ul && ul.classList.contains(CLASS_RADIO_VIEW)) {
if (classList.contains(CLASS_SELECTED)) {
return;
}
Expand Down
8 changes: 4 additions & 4 deletions dist/js/mui.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/hello-mui/css/mui.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* =====================================================
* Mui v1.6.0 (https://github.com/dcloudio/mui)
* Mui v1.7.0 (https://github.com/dcloudio/mui)
* =====================================================
*/

Expand Down
2 changes: 1 addition & 1 deletion examples/hello-mui/css/mui.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/hello-mui/examples/info.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ <h4>新手指南</h4>
</p>
<p>更多详细介绍,请到<a href="http://dcloudio.github.io/mui">mui官网</a>查看;</p>
<h4>版本介绍</h4>
<p>当前版本为1.6.0,可到<a href="https://github.com/dcloudio/mui">Github</a>上获取最新版本。</p>
<p>当前版本为1.7.0,可到<a href="https://github.com/dcloudio/mui">Github</a>上获取最新版本。</p>
<h4>License</h4>
<p>
mui遵循MIT License,源码已提交至Github,<a href="https://github.com/dcloudio/mui">点击查看</a>;
Expand Down
16 changes: 13 additions & 3 deletions examples/hello-mui/js/mui.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* =====================================================
* Mui v1.6.0 (https://github.com/dcloudio/mui)
* Mui v1.7.0 (https://github.com/dcloudio/mui)
* =====================================================
*/
/**
Expand Down Expand Up @@ -879,7 +879,7 @@ var mui = (function(document, undefined) {
var tagName = target.tagName;
if (event === 'tap' && (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && tagName !== 'SELECT')) {
e.preventDefault();
e.detail && e.detail.gesture && e.detail.gesture.preventDefault()
e.detail && e.detail.gesture && e.detail.gesture.preventDefault();
}
$.each(handler.handlers, function(index, handler) {
$.each(handler, function(index, callback) {
Expand Down Expand Up @@ -918,6 +918,16 @@ var mui = (function(document, undefined) {
if (isAddEventListener) {
delegateFns[mid(element)] = delegateFn(element, event, selector, callback);
element.addEventListener(event, delegateFns[mid(element)]);
if (event === 'tap') { //TODO 需要找个更好的解决方案
element.addEventListener('click', function(e) {
if (e.target) {
var tagName = e.target.tagName;
if (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && tagName !== 'SELECT') {
e.preventDefault();
}
}
});
}
}
});
};
Expand Down Expand Up @@ -5914,7 +5924,7 @@ var mui = (function(document, undefined) {
var isExpand = false;
var classList = cell.classList;
var ul = cell.parentNode;
if (ul.classList.contains(CLASS_RADIO_VIEW)) {
if (ul && ul.classList.contains(CLASS_RADIO_VIEW)) {
if (classList.contains(CLASS_SELECTED)) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/hello-mui/js/mui.locker.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
$.ready(function() {
setTimeout(function() {
$('.' + lockerClassName).locker();
}, 200);
}, 350);
});

}(mui, document));
8 changes: 4 additions & 4 deletions examples/hello-mui/js/mui.min.js

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion js/mui.event.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
var tagName = target.tagName;
if (event === 'tap' && (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && tagName !== 'SELECT')) {
e.preventDefault();
e.detail && e.detail.gesture && e.detail.gesture.preventDefault()
e.detail && e.detail.gesture && e.detail.gesture.preventDefault();
}
$.each(handler.handlers, function(index, handler) {
$.each(handler, function(index, callback) {
Expand Down Expand Up @@ -121,6 +121,16 @@
if (isAddEventListener) {
delegateFns[mid(element)] = delegateFn(element, event, selector, callback);
element.addEventListener(event, delegateFns[mid(element)]);
if (event === 'tap') { //TODO 需要找个更好的解决方案
element.addEventListener('click', function(e) {
if (e.target) {
var tagName = e.target.tagName;
if (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && tagName !== 'SELECT') {
e.preventDefault();
}
}
});
}
}
});
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mui",
"description": "Build mobile apps with simple HTML, CSS, and JS components.",
"version": "1.6.0",
"version": "1.7.0",
"keywords": [
"css",
"fonts",
Expand Down

0 comments on commit 2b1387f

Please sign in to comment.