Merge branch 'bbcmicrobitacc' into bbcmicrobit
This commit is contained in:
Коммит
e3e24b28b5
|
@ -38,6 +38,9 @@
|
|||
// always use in-app menu selection
|
||||
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: "myscripts", name: lf("My Scripts"), tick: Ticks.siteMenuMyScripts, handler: () => {
|
||||
this.showList("installed-scripts");
|
||||
|
@ -53,8 +56,6 @@
|
|||
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")) });
|
||||
|
||||
var siteLogo = elt("siteLogo");
|
||||
if (siteLogo) siteLogo.withClick(() => window.location.href = "/");
|
||||
if (Cloud.getUserId()) {
|
||||
var siteNotifications = elt("siteNotifications");
|
||||
if (siteNotifications) this.addNotificationCounter(siteNotifications);
|
||||
|
@ -123,7 +124,7 @@
|
|||
private theList = div("slList");
|
||||
private header = div("sdListLabel");
|
||||
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 slideButton = div("slSlideContainer");
|
||||
private backContainer = div("slBackContainer");
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -154,7 +154,7 @@ module TDev {
|
|||
btnsDiv = e;
|
||||
if (e.withClick && !(<any>e).clickHandler && !(<any>e).onselectstart)
|
||||
e.tabIndex = -1;
|
||||
});
|
||||
});
|
||||
|
||||
if (!what) {
|
||||
Util.showPopup(this.floating);
|
||||
|
@ -191,15 +191,33 @@ module TDev {
|
|||
this.dialog.setAttribute("aria-labelledby", h1.id);
|
||||
}
|
||||
|
||||
// find first input field or buttondiv
|
||||
setTimeout(() => {
|
||||
var focus = this.dialog.getElementsByTagName("input")[0] || this.dialog.getElementsByTagName("button")[0];
|
||||
if (focus) focus.focus();
|
||||
}, 10);
|
||||
|
||||
// add one more fake element to trap the keyboard focus and reset it to the first focusable element
|
||||
var trap = div('focustrap');
|
||||
trap.tabIndex = 0;
|
||||
trap.setAttribute("aria-hidden", "true");
|
||||
trap.onfocus = () => this.focusFirstAsync().done();
|
||||
this.dialog.appendChild(trap)
|
||||
|
||||
this.focusFirstAsync().done();
|
||||
|
||||
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() {
|
||||
if (!this.canDismiss) {
|
||||
Ticker.dbg("ModalDialog.dismiss - cannot");
|
||||
|
|
|
@ -174,7 +174,10 @@ module TDev {
|
|||
elt("root").style.height = h + "px";
|
||||
if (phoneSimulationW > 0)
|
||||
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";
|
||||
if (phoneMode) rootClass += " phone";
|
||||
|
|
|
@ -178,6 +178,7 @@ module TDev {
|
|||
actionPropAtomic,
|
||||
|
||||
siteMenuCreateCode,
|
||||
siteMenuImportCode,
|
||||
siteMenuGroups,
|
||||
siteMenuTutorials,
|
||||
siteMenuProjects,
|
||||
|
|
|
@ -584,6 +584,14 @@ input.wall-textbox:hover, input.wall-textbox:focus {
|
|||
border-color: white;
|
||||
}
|
||||
|
||||
.modalDialog .trap {
|
||||
position:absolute;
|
||||
right:0;
|
||||
bottom:0;
|
||||
width:1px;
|
||||
height:1px;
|
||||
}
|
||||
|
||||
.modalFullYellow .modalDialog .wall-button,
|
||||
.modalFullWhite .modalDialog .wall-button
|
||||
{
|
||||
|
|
|
@ -981,7 +981,7 @@ textarea.commentEdit {
|
|||
}
|
||||
|
||||
.portrait .apiBackContainer {
|
||||
max-width: 7em;
|
||||
max-width: 7em;
|
||||
}
|
||||
|
||||
.landscape .apiBackContainer {
|
||||
|
@ -1698,6 +1698,7 @@ div.insertStmtHint
|
|||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
/*
|
||||
.stmt[data-current^="yes"] > .line > .hintMessage,
|
||||
.stmt[data-current^="yes"] > .hintMessage,
|
||||
.stmt[data-current^="yes"] > .line > .errorBr,
|
||||
|
@ -1705,7 +1706,7 @@ div.insertStmtHint
|
|||
.stmt[data-current^="yes"] > .line > .errorMessage,
|
||||
.stmt[data-current^="yes"] > .errorMessage
|
||||
{
|
||||
}
|
||||
} */
|
||||
|
||||
.stmt[data-current^="yes"]
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче