|
@@ -187,13 +187,13 @@ $(window).one("load", () => {
|
|
|
|
|
|
// 判断从python blcokly 跳转过来是ai或者iot
|
|
// 判断从python blcokly 跳转过来是ai或者iot
|
|
if (window.location.search.indexOf('name') > -1 || getLocalStorage("type") == 1) {
|
|
if (window.location.search.indexOf('name') > -1 || getLocalStorage("type") == 1) {
|
|
- $("#mode")[0].selectedIndex = 1;
|
|
|
|
|
|
+ $("#mode")[0].selectedIndex = 0;
|
|
$("#mode")[0].onchange();
|
|
$("#mode")[0].onchange();
|
|
$('.selectMode_input')[0].value = Ardublockly.LOCALISED_TEXT.iot_module;
|
|
$('.selectMode_input')[0].value = Ardublockly.LOCALISED_TEXT.iot_module;
|
|
selectmode($("#mode")[0], true);
|
|
selectmode($("#mode")[0], true);
|
|
appearExample(1);
|
|
appearExample(1);
|
|
} else {
|
|
} else {
|
|
- $("#mode")[0].selectedIndex = 0;
|
|
|
|
|
|
+ $("#mode")[0].selectedIndex = 1;
|
|
$("#mode")[0].onchange();
|
|
$("#mode")[0].onchange();
|
|
$('.selectMode_input')[0].value = Ardublockly.LOCALISED_TEXT.ai_module;
|
|
$('.selectMode_input')[0].value = Ardublockly.LOCALISED_TEXT.ai_module;
|
|
selectmode($("#mode")[0], true);
|
|
selectmode($("#mode")[0], true);
|
|
@@ -314,7 +314,7 @@ $(window).one("load", () => {
|
|
|
|
|
|
|
|
|
|
window.onbeforeunload = window.onunload = function () {
|
|
window.onbeforeunload = window.onunload = function () {
|
|
- if ($("#mode")[0].selectedIndex == 0) {
|
|
|
|
|
|
+ if ($("#mode")[0].selectedIndex == 1) {
|
|
saveLocalStorage("type", 0);
|
|
saveLocalStorage("type", 0);
|
|
saveLocalStorageBlocks("pythonai-mode-blocks-xml");
|
|
saveLocalStorageBlocks("pythonai-mode-blocks-xml");
|
|
} else {
|
|
} else {
|
|
@@ -760,13 +760,13 @@ function selectOnload() {
|
|
var e = e.target;
|
|
var e = e.target;
|
|
if (e.parentElement.children[2] && e.parentElement.children[2].children.length > 0) { } else {
|
|
if (e.parentElement.children[2] && e.parentElement.children[2].children.length > 0) { } else {
|
|
if (e.innerHTML == Ardublockly.LOCALISED_TEXT.iot_module) {
|
|
if (e.innerHTML == Ardublockly.LOCALISED_TEXT.iot_module) {
|
|
- $("#mode")[0].selectedIndex = 1;
|
|
|
|
|
|
+ $("#mode")[0].selectedIndex = 0;
|
|
$("#mode")[0].onchange();
|
|
$("#mode")[0].onchange();
|
|
$('.selectMode_input')[0].value = Ardublockly.LOCALISED_TEXT.iot_module;
|
|
$('.selectMode_input')[0].value = Ardublockly.LOCALISED_TEXT.iot_module;
|
|
appearExample(1);
|
|
appearExample(1);
|
|
}
|
|
}
|
|
else if (e.innerHTML == Ardublockly.LOCALISED_TEXT.ai_module) {
|
|
else if (e.innerHTML == Ardublockly.LOCALISED_TEXT.ai_module) {
|
|
- $("#mode")[0].selectedIndex = 0;
|
|
|
|
|
|
+ $("#mode")[0].selectedIndex = 1;
|
|
$("#mode")[0].onchange();
|
|
$("#mode")[0].onchange();
|
|
$('.selectMode_input')[0].value = Ardublockly.LOCALISED_TEXT.ai_module;
|
|
$('.selectMode_input')[0].value = Ardublockly.LOCALISED_TEXT.ai_module;
|
|
appearExample(0);
|
|
appearExample(0);
|
|
@@ -954,12 +954,12 @@ function selectOnload() {
|
|
$('#ai_tt div')[j].onclick = (function (i, j) {
|
|
$('#ai_tt div')[j].onclick = (function (i, j) {
|
|
return function () {
|
|
return function () {
|
|
if (_arr[i][j].split("/")[0] == "Main") {
|
|
if (_arr[i][j].split("/")[0] == "Main") {
|
|
- $("#mode")[0].selectedIndex = 1;
|
|
|
|
|
|
+ $("#mode")[0].selectedIndex = 0;
|
|
$("#mode")[0].onchange();
|
|
$("#mode")[0].onchange();
|
|
$('.selectMode_input')[0].value = Ardublockly.LOCALISED_TEXT.iot_module;
|
|
$('.selectMode_input')[0].value = Ardublockly.LOCALISED_TEXT.iot_module;
|
|
appearExample(1);
|
|
appearExample(1);
|
|
} else {
|
|
} else {
|
|
- $("#mode")[0].selectedIndex = 0;
|
|
|
|
|
|
+ $("#mode")[0].selectedIndex = 1;
|
|
$("#mode")[0].onchange();
|
|
$("#mode")[0].onchange();
|
|
$('.selectMode_input')[0].value = Ardublockly.LOCALISED_TEXT.ai_module;
|
|
$('.selectMode_input')[0].value = Ardublockly.LOCALISED_TEXT.ai_module;
|
|
appearExample(0);
|
|
appearExample(0);
|
|
@@ -990,12 +990,12 @@ function selectOnload() {
|
|
ai_tt.children[j].onclick = (function (i, j) {
|
|
ai_tt.children[j].onclick = (function (i, j) {
|
|
return function () {
|
|
return function () {
|
|
if (_arr[i][j].split("/")[0] == "Main") {
|
|
if (_arr[i][j].split("/")[0] == "Main") {
|
|
- $("#mode")[0].selectedIndex = 1;
|
|
|
|
|
|
+ $("#mode")[0].selectedIndex = 0;
|
|
$("#mode")[0].onchange();
|
|
$("#mode")[0].onchange();
|
|
$('.selectMode_input')[0].value = Ardublockly.LOCALISED_TEXT.iot_module;
|
|
$('.selectMode_input')[0].value = Ardublockly.LOCALISED_TEXT.iot_module;
|
|
appearExample(1);
|
|
appearExample(1);
|
|
} else {
|
|
} else {
|
|
- $("#mode")[0].selectedIndex = 0;
|
|
|
|
|
|
+ $("#mode")[0].selectedIndex = 1;
|
|
$("#mode")[0].onchange();
|
|
$("#mode")[0].onchange();
|
|
$('.selectMode_input')[0].value = Ardublockly.LOCALISED_TEXT.ai_module;
|
|
$('.selectMode_input')[0].value = Ardublockly.LOCALISED_TEXT.ai_module;
|
|
appearExample(0);
|
|
appearExample(0);
|
|
@@ -1020,12 +1020,12 @@ function selectOnload() {
|
|
$('ul.HarxA')[i].children[j].onclick = (function (i, j) {
|
|
$('ul.HarxA')[i].children[j].onclick = (function (i, j) {
|
|
return function () {
|
|
return function () {
|
|
if (_arr[i][j].split("/")[0] == "Main") {
|
|
if (_arr[i][j].split("/")[0] == "Main") {
|
|
- $("#mode")[0].selectedIndex = 1;
|
|
|
|
|
|
+ $("#mode")[0].selectedIndex = 0;
|
|
$("#mode")[0].onchange();
|
|
$("#mode")[0].onchange();
|
|
$('.selectMode_input')[0].value = Ardublockly.LOCALISED_TEXT.iot_module;
|
|
$('.selectMode_input')[0].value = Ardublockly.LOCALISED_TEXT.iot_module;
|
|
appearExample(1);
|
|
appearExample(1);
|
|
} else {
|
|
} else {
|
|
- $("#mode")[0].selectedIndex = 0;
|
|
|
|
|
|
+ $("#mode")[0].selectedIndex = 1;
|
|
$("#mode")[0].onchange();
|
|
$("#mode")[0].onchange();
|
|
$('.selectMode_input')[0].value = Ardublockly.LOCALISED_TEXT.ai_module;
|
|
$('.selectMode_input')[0].value = Ardublockly.LOCALISED_TEXT.ai_module;
|
|
appearExample(0);
|
|
appearExample(0);
|