mirror of
https://github.com/modernw/App-Installer-For-Windows-8.x-Reset.git
synced 2026-06-18 13:20:09 +10:00
Organized the project files.
And also fixed some bugs.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
(function(global) {
|
||||
"use strict";
|
||||
var cmdargs = JSON.parse(Bridge.External.cmdArgs);
|
||||
|
||||
function ready(e) {
|
||||
var page = document.querySelector("#settingpage");
|
||||
@@ -15,6 +16,8 @@
|
||||
var item = items[keys[i]];
|
||||
var inode = document.createElement("li");
|
||||
inode.setAttribute("data-page", item.page);
|
||||
inode.setAttribute("data-name", item.displayName);
|
||||
inode.setAttribute("data-tag", keys[i]);
|
||||
inode.textContent = item.displayName;
|
||||
Windows.UI.Event.Util.addEvent(inode, "click", function(e) {
|
||||
window.location = "settings/" + this.getAttribute("data-page");
|
||||
@@ -22,6 +25,19 @@
|
||||
list.appendChild(inode);
|
||||
// WinJS.UI.Animation.createAddToListAnimation(list, inode).execute();
|
||||
}
|
||||
var current = "";
|
||||
try { if (cmdargs.length > 0) current = cmdargs[0] } catch (e) {}
|
||||
if (current && current.length > 0 && !Bridge.External.jump1) {
|
||||
for (var i = 0; i < list.children.length; i++) {
|
||||
if (Bridge.NString.equals(list.children[i].getAttribute("data-tag"), current)) {
|
||||
Bridge.External.jump1 = true;
|
||||
setTimeout(function(thisnode) {
|
||||
thisnode.click();
|
||||
}, 0, list.children[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
OnLoad.add(ready);
|
||||
})(this);
|
||||
Reference in New Issue
Block a user