|
@@ -160,7 +160,7 @@ function openCloudFile(fileid) {
|
|
|
success: (data) => {
|
|
|
var file = data.data.instructions;
|
|
|
var date = data.data.updateTime;
|
|
|
- Materialize.toast(CCB.str_group.success_downloadFile, 4000);
|
|
|
+ Materialize.toast(CCB.str_group.success_downloadFile, 4000, 'shareUrl');
|
|
|
loadCloudXmlFile(file, data.data.title);
|
|
|
$("#cloud_storage_modal").modal("close");
|
|
|
$("#cloud_modal_preload").css("display", "none");
|
|
@@ -171,7 +171,7 @@ function openCloudFile(fileid) {
|
|
|
},
|
|
|
error: () => {
|
|
|
$("#cloud_modal_preload").css("display", "none");
|
|
|
- Materialize.toast(CCB.str_group.error_downloadFile, 4000);
|
|
|
+ Materialize.toast(CCB.str_group.error_downloadFile, 4000, 'shareUrl');
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -546,12 +546,12 @@ function fileUpdate(i) {
|
|
|
uploadlxfilecontentbyid(CCB.cloudFileList[i].filenameId, Ardublockly.generateXml(), function (data) {
|
|
|
if (data.success) {
|
|
|
$("#cloud_modal_preload").css("display", "none");
|
|
|
- Materialize.toast(CCB.str_group.success_updateFile, 4000);
|
|
|
+ Materialize.toast(CCB.str_group.success_updateFile, 4000, 'shareUrl');
|
|
|
$("#cloud_time" + i).html(getCurrentDate());
|
|
|
}
|
|
|
else {
|
|
|
$("#cloud_modal_preload").css("display", "none");
|
|
|
- Materialize.toast(CCB.str_group.error_updateFile, 4000);
|
|
|
+ Materialize.toast(CCB.str_group.error_updateFile, 4000, 'shareUrl');
|
|
|
}
|
|
|
})
|
|
|
//updateCloudFile(CCB.cloudFileList[i].filename);
|
|
@@ -589,7 +589,7 @@ function confirmRename(i) {
|
|
|
upadtelxfilenamebyid(CCB.cloudFileList[i].filenameId, filename, function (data) {
|
|
|
if (data.success) {
|
|
|
$("#cloud_modal_preload").css("display", "none");
|
|
|
- Materialize.toast(CCB.str_group.success_renameFile, 4000);
|
|
|
+ Materialize.toast(CCB.str_group.success_renameFile, 4000,'shareUrl');
|
|
|
CCB.cloudFileList[i].filename = filename;
|
|
|
$("#cloud_name" + i).html(filename + ".xml");
|
|
|
document.getElementById("cloud_name" + i).title = filename + ".xml";
|
|
@@ -597,7 +597,7 @@ function confirmRename(i) {
|
|
|
}
|
|
|
else {
|
|
|
$("#cloud_modal_preload").css("display", "none");
|
|
|
- Materialize.toast(CCB.str_group.error_renameFile, 4000);
|
|
|
+ Materialize.toast(CCB.str_group.error_renameFile, 4000, 'shareUrl');
|
|
|
}
|
|
|
|
|
|
});
|
|
@@ -621,7 +621,7 @@ function confirmDelete(i) {
|
|
|
dellxfilebyid(CCB.cloudFileList[i].filenameId, function (data) {
|
|
|
if (data.success) {
|
|
|
$("#cloud_modal_preload").css("display", "none");
|
|
|
- Materialize.toast(CCB.str_group.success_deleteFile, 4000);
|
|
|
+ Materialize.toast(CCB.str_group.success_deleteFile, 4000, 'shareUrl');
|
|
|
if (CCB.selectCloudFile == CCB.cloudFileList[i].filenameId) {
|
|
|
CCB.selectCloudFile = null;
|
|
|
}
|
|
@@ -631,7 +631,7 @@ function confirmDelete(i) {
|
|
|
}
|
|
|
else {
|
|
|
$("#cloud_modal_preload").css("display", "none");
|
|
|
- Materialize.toast(CCB.str_group.error_deleteFile, 4000);
|
|
|
+ Materialize.toast(CCB.str_group.error_deleteFile, 4000, 'shareUrl');
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -661,7 +661,7 @@ function confirmCreateNew() {
|
|
|
savelxfile(filename, Ardublockly.generateXml(), function (data) {
|
|
|
if (data.success) {
|
|
|
$("#cloud_modal_preload").css("display", "none");
|
|
|
- Materialize.toast(CCB.str_group.success_uploadFile, 4000);
|
|
|
+ Materialize.toast(CCB.str_group.success_uploadFile, 4000, 'shareUrl');
|
|
|
let fileobject = {
|
|
|
filenameId: data.data.id,
|
|
|
filename: filename,
|
|
@@ -676,7 +676,7 @@ function confirmCreateNew() {
|
|
|
}
|
|
|
else {
|
|
|
$("#cloud_modal_preload").css("display", "none");
|
|
|
- Materialize.toast(CCB.str_group.error_uploadFile, 4000);
|
|
|
+ Materialize.toast(CCB.str_group.error_uploadFile, 4000, 'shareUrl');
|
|
|
}
|
|
|
})
|
|
|
|
|
@@ -929,7 +929,7 @@ $("#modal_cloudFileSave").on("click", function () {
|
|
|
createCloudFile(filename);
|
|
|
}
|
|
|
} else {
|
|
|
- Materialize.toast(CCB.str_group.requestLogin, 4000);
|
|
|
+ Materialize.toast(CCB.str_group.requestLogin, 4000, 'shareUrl');
|
|
|
}
|
|
|
});
|
|
|
$("#modal_cloudFileOpen").on("click", function () {
|
|
@@ -938,7 +938,7 @@ $("#modal_cloudFileOpen").on("click", function () {
|
|
|
// var filename = reg.exec($('#cloud_sketchName').val())[0];
|
|
|
openCloudFile(filename);
|
|
|
} else {
|
|
|
- Materialize.toast(CCB.str_group.requestLogin, 4000);
|
|
|
+ Materialize.toast(CCB.str_group.requestLogin, 4000, 'shareUrl');
|
|
|
}
|
|
|
});
|
|
|
$("#modal_cloudFileDelete").on("click", function () {
|
|
@@ -947,7 +947,7 @@ $("#modal_cloudFileDelete").on("click", function () {
|
|
|
// var filename = reg.exec($('#cloud_sketchName').val())[0];
|
|
|
deleteCloudFile(filename);
|
|
|
} else {
|
|
|
- Materialize.toast(CCB.str_group.requestLogin, 4000);
|
|
|
+ Materialize.toast(CCB.str_group.requestLogin, 4000, 'shareUrl');
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -1126,7 +1126,7 @@ window.addEventListener("message", e => {
|
|
|
$("#TM_posenet_login").empty();
|
|
|
$("#before_login").empty();
|
|
|
$("#cloud_askLogin").empty();
|
|
|
- Materialize.toast(CCB.str_group.success_userLogin, 3000);
|
|
|
+ Materialize.toast(CCB.str_group.success_userLogin, 3000, 'shareUrl');
|
|
|
CCB.userState = true;
|
|
|
getUserProfile(data.data);
|
|
|
loginModalStatus();
|