|
@@ -37,6 +37,7 @@ exports.showDialog = function(data, callback) { |
|
@@ -37,6 +37,7 @@ exports.showDialog = function(data, callback) { |
37
|
|
37
|
|
38
|
var dialogStr = dialogTemplate(data),
|
38
|
var dialogStr = dialogTemplate(data),
|
39
|
$dialogBox,
|
39
|
$dialogBox,
|
|
|
40
|
+ defaultHideDuraton,
|
40
|
dialogWrapperHammer;
|
41
|
dialogWrapperHammer;
|
41
|
|
42
|
|
42
|
$('.dialog-wrapper').remove();
|
43
|
$('.dialog-wrapper').remove();
|
|
@@ -63,9 +64,13 @@ exports.showDialog = function(data, callback) { |
|
@@ -63,9 +64,13 @@ exports.showDialog = function(data, callback) { |
63
|
|
64
|
|
64
|
//隐藏
|
65
|
//隐藏
|
65
|
if (data.autoHide) {
|
66
|
if (data.autoHide) {
|
|
|
67
|
+ defaultHideDuraton = 1000;
|
|
|
68
|
+ if (data.autoHide > 1) {
|
|
|
69
|
+ defaultHideDuraton = data.autoHide;
|
|
|
70
|
+ }
|
66
|
setTimeout(function() {
|
71
|
setTimeout(function() {
|
67
|
$dialogWrapper.fadeOut();
|
72
|
$dialogWrapper.fadeOut();
|
68
|
- }, 1000);
|
73
|
+ }, defaultHideDuraton);
|
69
|
}
|
74
|
}
|
70
|
|
75
|
|
71
|
dialogWrapperHammer.on('tap', function(event) {
|
76
|
dialogWrapperHammer.on('tap', function(event) {
|
|
@@ -76,9 +81,5 @@ exports.showDialog = function(data, callback) { |
|
@@ -76,9 +81,5 @@ exports.showDialog = function(data, callback) { |
76
|
callback();
|
81
|
callback();
|
77
|
}
|
82
|
}
|
78
|
});
|
83
|
});
|
79
|
-
|
|
|
80
|
};
|
84
|
};
|
81
|
|
85
|
|
82
|
-exports.hideDialog = function() {
|
|
|
83
|
- $dialogWrapper.fadeOut();
|
|
|
84
|
-}; |
|
|