|
|
|
@ -30,38 +30,17 @@
|
|
|
|
|
</head> |
|
|
|
|
<body> |
|
|
|
|
<script> |
|
|
|
|
// var EVENT_POPULATE = "EVENT_POPULATE"; |
|
|
|
|
|
|
|
|
|
// var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; |
|
|
|
|
// |
|
|
|
|
// var observer = new MutationObserver(function(mutations) { |
|
|
|
|
// mutations.forEach(function(mutation) { |
|
|
|
|
// if (mutation.type === "attributes" && window.Pool) { |
|
|
|
|
// console.log("attributes changed"); |
|
|
|
|
// window.fireEvent(EVENT_POPULATE); |
|
|
|
|
// } |
|
|
|
|
// }); |
|
|
|
|
// }); |
|
|
|
|
// |
|
|
|
|
// observer.observe(window, { |
|
|
|
|
// attributes: true //configure it to listen to attribute changes |
|
|
|
|
// }); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function i18nText(key) { |
|
|
|
|
return Pool.data.i18nText(key); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
window.addEventListener("load", function (ev) { |
|
|
|
|
// alert(window.Pool.data); |
|
|
|
|
// todo: 开发临时方案 |
|
|
|
|
// setTimeout(function () { |
|
|
|
|
|
|
|
|
|
console.log(window.Pool.data); |
|
|
|
|
var title = BI.createWidget({ |
|
|
|
|
type: "bi.vertical", |
|
|
|
|
items: [ |
|
|
|
|
{ |
|
|
|
|
type: "bi.label", |
|
|
|
|
text: "发现新版本", |
|
|
|
|
text: i18nText("Fine-Design_Find_New_Version"), |
|
|
|
|
cls: "title", |
|
|
|
|
textAlign: "left" |
|
|
|
|
}, |
|
|
|
@ -79,21 +58,15 @@
|
|
|
|
|
items: [ |
|
|
|
|
{ |
|
|
|
|
type: "bi.label", |
|
|
|
|
// text: "1) xxx", |
|
|
|
|
text: Pool.data.getContent(), |
|
|
|
|
textAlign: "left" |
|
|
|
|
} |
|
|
|
|
// { |
|
|
|
|
// type: "bi.label", |
|
|
|
|
// text: "2) ldsnvls df", |
|
|
|
|
// textAlign: "left" |
|
|
|
|
// } |
|
|
|
|
] |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
var moreInfo = BI.createWidget({ |
|
|
|
|
type: "bi.text_button", |
|
|
|
|
text: "更多信息", |
|
|
|
|
text: i18nText("Fine-Design_Basic_More_Information"), |
|
|
|
|
cls: "moreInfo", |
|
|
|
|
textAlign: "left" |
|
|
|
|
}); |
|
|
|
@ -104,7 +77,7 @@
|
|
|
|
|
items: [ |
|
|
|
|
{ |
|
|
|
|
type: 'bi.button', |
|
|
|
|
text: '立即更新', |
|
|
|
|
text: i18nText("Fine-Design_Update_Now"), |
|
|
|
|
level: 'common', |
|
|
|
|
height: 30, |
|
|
|
|
handler: function() { |
|
|
|
@ -114,7 +87,7 @@
|
|
|
|
|
{ |
|
|
|
|
el: { |
|
|
|
|
type: 'bi.button', |
|
|
|
|
text: '下次启动提醒我', |
|
|
|
|
text: i18nText("Fine-Design_Remind_Me_Next_Time"), |
|
|
|
|
level: 'ignore', |
|
|
|
|
height: 30, |
|
|
|
|
handler: function() { |
|
|
|
@ -126,7 +99,7 @@
|
|
|
|
|
{ |
|
|
|
|
el: { |
|
|
|
|
type: 'bi.button', |
|
|
|
|
text: '跳过此版本', |
|
|
|
|
text: i18nText("Fine-Design_Skip_This_Version"), |
|
|
|
|
level: 'ignore', |
|
|
|
|
height: 30, |
|
|
|
|
handler: function() { |
|
|
|
@ -155,23 +128,6 @@
|
|
|
|
|
"background-color": "white", |
|
|
|
|
"border": "1px solid white" |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// }, 2000); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// setTimeout(function() { |
|
|
|
|
// // alert(Pool.data); |
|
|
|
|
// alert(Pool.data.getName() + " " + Pool.data.getAge()); |
|
|
|
|
// }, 2000); |
|
|
|
|
|
|
|
|
|
// Pool.update = function () { |
|
|
|
|
// Pool.data.setAge(12); |
|
|
|
|
// Pool.data.setName("Tom"); |
|
|
|
|
// return Pool.data; |
|
|
|
|
// }; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
|