|
@ -1,30 +1,21 @@
|
1
|
1
|
mui.plusReady(function() {
|
2
|
|
document.getElementById("searchval").focus()
|
3
|
|
if(mui.os.ios) {
|
4
|
|
var webView = plus.webview.currentWebview().nativeInstanceObject();
|
5
|
|
webView.plusCallMethod({
|
6
|
|
"setKeyboardDisplayRequiresUserAction": false
|
7
|
|
});
|
8
|
|
} else {
|
9
|
|
var webview = plus.android.currentWebview();
|
10
|
|
plus.android.importClass(webview);
|
11
|
|
webview.requestFocus();
|
12
|
|
var Context = plus.android.importClass("android.content.Context");
|
13
|
|
var InputMethodManager = plus.android.importClass("android.view.inputmethod.InputMethodManager");
|
14
|
|
var main = plus.android.runtimeMainActivity();
|
15
|
|
var imm = main.getSystemService(Context.INPUT_METHOD_SERVICE);
|
16
|
|
imm.toggleSoftInput(0, InputMethodManager.SHOW_FORCED);
|
17
|
|
}
|
18
|
|
var fff=1;
|
19
|
|
document.getElementById("searchval").addEventListener("blur",aa,false);
|
20
|
|
function aa() {
|
21
|
|
if(fff==1) {
|
22
|
|
this.focus();
|
23
|
|
fff=0;
|
24
|
|
this.blur()
|
25
|
|
}
|
26
|
|
document.getElementById("searchval").removeEventListener("blur",aa,false);
|
27
|
|
}
|
|
2
|
//document.getElementById("searchval").focus()
|
|
3
|
// if(mui.os.ios) {
|
|
4
|
// var webView = plus.webview.currentWebview().nativeInstanceObject();
|
|
5
|
// webView.plusCallMethod({
|
|
6
|
// "setKeyboardDisplayRequiresUserAction": false
|
|
7
|
// });
|
|
8
|
// } else {
|
|
9
|
// var webview = plus.android.currentWebview();
|
|
10
|
// plus.android.importClass(webview);
|
|
11
|
// webview.requestFocus();
|
|
12
|
// var Context = plus.android.importClass("android.content.Context");
|
|
13
|
// var InputMethodManager = plus.android.importClass("android.view.inputmethod.InputMethodManager");
|
|
14
|
// var main = plus.android.runtimeMainActivity();
|
|
15
|
// var imm = main.getSystemService(Context.INPUT_METHOD_SERVICE);
|
|
16
|
// imm.toggleSoftInput(0, InputMethodManager.SHOW_FORCED);
|
|
17
|
// }
|
|
18
|
|
28
|
19
|
var search = {
|
29
|
20
|
oAjaxGet: function(url, obj, oType, oFun) {
|
30
|
21
|
mui.ajax(url, {
|
|
@ -59,6 +50,7 @@ mui.plusReady(function() {
|
59
|
50
|
}
|
60
|
51
|
},
|
61
|
52
|
createWin: function(keyValue) {
|
|
53
|
document.activeElement.blur();
|
62
|
54
|
mui.openWindow({
|
63
|
55
|
url: '../html/searchListNew.html',
|
64
|
56
|
id: '../html/searchListNew.html',
|
|
@ -71,6 +63,7 @@ mui.plusReady(function() {
|
71
|
63
|
qiFlag: 1
|
72
|
64
|
}
|
73
|
65
|
});
|
|
66
|
|
74
|
67
|
}
|
75
|
68
|
}
|
76
|
69
|
|
|
@ -81,11 +74,9 @@ mui.plusReady(function() {
|
81
|
74
|
});
|
82
|
75
|
|
83
|
76
|
/*按键字搜索*/
|
84
|
|
document.getElementById("searchval").addEventListener("keyup", function() {
|
85
|
|
var e = event || window.event || arguments.caller.arguments[0];
|
|
77
|
document.getElementById("searchval").addEventListener("keyup", function(e) {
|
86
|
78
|
if(e.keyCode == 13) {
|
87
|
79
|
search.createWin(this.value);
|
88
|
|
|
89
|
80
|
}
|
90
|
81
|
})
|
91
|
82
|
|