Merge branch 'bbcmicrobitacc' into bbcmicrobit
This commit is contained in:
Коммит
e3e24b28b5
|
@ -38,6 +38,9 @@
|
||||||
// always use in-app menu selection
|
// always use in-app menu selection
|
||||||
TemplateManager.createScript();
|
TemplateManager.createScript();
|
||||||
} },
|
} },
|
||||||
|
{ id: "importcode", name: lf("Import Code"), tick: Ticks.siteMenuImportCode, handler: () => {
|
||||||
|
ArtUtil.importFileDialog();
|
||||||
|
}},
|
||||||
{ id: "help", name: lf("Help"), tick: Ticks.siteMenuHelp, handler: () => Util.navigateInWindow("/help") },
|
{ id: "help", name: lf("Help"), tick: Ticks.siteMenuHelp, handler: () => Util.navigateInWindow("/help") },
|
||||||
{ id: "myscripts", name: lf("My Scripts"), tick: Ticks.siteMenuMyScripts, handler: () => {
|
{ id: "myscripts", name: lf("My Scripts"), tick: Ticks.siteMenuMyScripts, handler: () => {
|
||||||
this.showList("installed-scripts");
|
this.showList("installed-scripts");
|
||||||
|
@ -53,8 +56,6 @@
|
||||||
menuItems.push({ id: "signin", name: lf("● Sign in"), tick: Ticks.siteMenuSignIn, handler: () => Login.show() });
|
menuItems.push({ id: "signin", name: lf("● Sign in"), tick: Ticks.siteMenuSignIn, handler: () => Login.show() });
|
||||||
else menuItems.push({ id: "settings", name: username ? username : lf("My Profile"), tick: Ticks.siteMenuProfile, handler: () => this.loadDetails(this.getUserInfoById("me", "me")) });
|
else menuItems.push({ id: "settings", name: username ? username : lf("My Profile"), tick: Ticks.siteMenuProfile, handler: () => this.loadDetails(this.getUserInfoById("me", "me")) });
|
||||||
|
|
||||||
var siteLogo = elt("siteLogo");
|
|
||||||
if (siteLogo) siteLogo.withClick(() => window.location.href = "/");
|
|
||||||
if (Cloud.getUserId()) {
|
if (Cloud.getUserId()) {
|
||||||
var siteNotifications = elt("siteNotifications");
|
var siteNotifications = elt("siteNotifications");
|
||||||
if (siteNotifications) this.addNotificationCounter(siteNotifications);
|
if (siteNotifications) this.addNotificationCounter(siteNotifications);
|
||||||
|
@ -123,7 +124,7 @@
|
||||||
private theList = div("slList");
|
private theList = div("slList");
|
||||||
private header = div("sdListLabel");
|
private header = div("sdListLabel");
|
||||||
private botDiv = div(null);
|
private botDiv = div(null);
|
||||||
private searchBox = HTML.mkTextInput("search", lf("Search..."), "search", lf("Search"));
|
private searchBox = HTML.mkTextInput("text", lf("Search..."), "search", lf("Search"));
|
||||||
private autoUpdate:KeyboardAutoUpdate;
|
private autoUpdate:KeyboardAutoUpdate;
|
||||||
private slideButton = div("slSlideContainer");
|
private slideButton = div("slSlideContainer");
|
||||||
private backContainer = div("slBackContainer");
|
private backContainer = div("slBackContainer");
|
||||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -191,15 +191,33 @@ module TDev {
|
||||||
this.dialog.setAttribute("aria-labelledby", h1.id);
|
this.dialog.setAttribute("aria-labelledby", h1.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// find first input field or buttondiv
|
|
||||||
setTimeout(() => {
|
// add one more fake element to trap the keyboard focus and reset it to the first focusable element
|
||||||
var focus = this.dialog.getElementsByTagName("input")[0] || this.dialog.getElementsByTagName("button")[0];
|
var trap = div('focustrap');
|
||||||
if (focus) focus.focus();
|
trap.tabIndex = 0;
|
||||||
}, 10);
|
trap.setAttribute("aria-hidden", "true");
|
||||||
|
trap.onfocus = () => this.focusFirstAsync().done();
|
||||||
|
this.dialog.appendChild(trap)
|
||||||
|
|
||||||
|
this.focusFirstAsync().done();
|
||||||
|
|
||||||
Ticker.dbg("ModalDialog.showBare1");
|
Ticker.dbg("ModalDialog.showBare1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public focusFirstAsync() {
|
||||||
|
return new Promise((onSuccess, onError, onProgress) => {
|
||||||
|
// find first input field or buttondiv
|
||||||
|
setTimeout(() => {
|
||||||
|
try {
|
||||||
|
var focus = this.dialog.getElementsByTagName("input")[0] || this.dialog.getElementsByTagName("button")[0];
|
||||||
|
if (focus) focus.focus();
|
||||||
|
} catch (e) {
|
||||||
|
}
|
||||||
|
onSuccess(undefined);
|
||||||
|
}, 10);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public dismiss() {
|
public dismiss() {
|
||||||
if (!this.canDismiss) {
|
if (!this.canDismiss) {
|
||||||
Ticker.dbg("ModalDialog.dismiss - cannot");
|
Ticker.dbg("ModalDialog.dismiss - cannot");
|
||||||
|
|
|
@ -174,7 +174,10 @@ module TDev {
|
||||||
elt("root").style.height = h + "px";
|
elt("root").style.height = h + "px";
|
||||||
if (phoneSimulationW > 0)
|
if (phoneSimulationW > 0)
|
||||||
elt("root").style.width = w + "px";
|
elt("root").style.width = w + "px";
|
||||||
elt("root").style.fontSize = Browser.isMobile ? topFontSize +"px" : "16px";
|
|
||||||
|
if (!Browser.isMobile) topFontSize = 16; // allow zooming;
|
||||||
|
|
||||||
|
elt("root").style.fontSize = topFontSize +"px";
|
||||||
|
|
||||||
var rootClass = portraitMode ? "portrait" : "landscape";
|
var rootClass = portraitMode ? "portrait" : "landscape";
|
||||||
if (phoneMode) rootClass += " phone";
|
if (phoneMode) rootClass += " phone";
|
||||||
|
|
|
@ -178,6 +178,7 @@ module TDev {
|
||||||
actionPropAtomic,
|
actionPropAtomic,
|
||||||
|
|
||||||
siteMenuCreateCode,
|
siteMenuCreateCode,
|
||||||
|
siteMenuImportCode,
|
||||||
siteMenuGroups,
|
siteMenuGroups,
|
||||||
siteMenuTutorials,
|
siteMenuTutorials,
|
||||||
siteMenuProjects,
|
siteMenuProjects,
|
||||||
|
|
|
@ -584,6 +584,14 @@ input.wall-textbox:hover, input.wall-textbox:focus {
|
||||||
border-color: white;
|
border-color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.modalDialog .trap {
|
||||||
|
position:absolute;
|
||||||
|
right:0;
|
||||||
|
bottom:0;
|
||||||
|
width:1px;
|
||||||
|
height:1px;
|
||||||
|
}
|
||||||
|
|
||||||
.modalFullYellow .modalDialog .wall-button,
|
.modalFullYellow .modalDialog .wall-button,
|
||||||
.modalFullWhite .modalDialog .wall-button
|
.modalFullWhite .modalDialog .wall-button
|
||||||
{
|
{
|
||||||
|
|
|
@ -1698,6 +1698,7 @@ div.insertStmtHint
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
.stmt[data-current^="yes"] > .line > .hintMessage,
|
.stmt[data-current^="yes"] > .line > .hintMessage,
|
||||||
.stmt[data-current^="yes"] > .hintMessage,
|
.stmt[data-current^="yes"] > .hintMessage,
|
||||||
.stmt[data-current^="yes"] > .line > .errorBr,
|
.stmt[data-current^="yes"] > .line > .errorBr,
|
||||||
|
@ -1705,7 +1706,7 @@ div.insertStmtHint
|
||||||
.stmt[data-current^="yes"] > .line > .errorMessage,
|
.stmt[data-current^="yes"] > .line > .errorMessage,
|
||||||
.stmt[data-current^="yes"] > .errorMessage
|
.stmt[data-current^="yes"] > .errorMessage
|
||||||
{
|
{
|
||||||
}
|
} */
|
||||||
|
|
||||||
.stmt[data-current^="yes"]
|
.stmt[data-current^="yes"]
|
||||||
{
|
{
|
||||||
|
|
Загрузка…
Ссылка в новой задаче