kopia lustrzana https://github.com/OpenDroneMap/WebODM
Merge pull request #724 from nchamo/fix-cloud-import
Fix Cloud Import: Task Button Is Never Shownpull/725/head
commit
aa189f0370
|
@ -2,7 +2,7 @@
|
||||||
"name": "Cloud Import",
|
"name": "Cloud Import",
|
||||||
"webodmMinVersion": "1.1.2",
|
"webodmMinVersion": "1.1.2",
|
||||||
"description": "Import images from external sources directly",
|
"description": "Import images from external sources directly",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"author": "Nicolas Chamo",
|
"author": "Nicolas Chamo",
|
||||||
"email": "nicolas@chamo.com.ar",
|
"email": "nicolas@chamo.com.ar",
|
||||||
"repository": "https://github.com/OpenDroneMap/WebODM",
|
"repository": "https://github.com/OpenDroneMap/WebODM",
|
||||||
|
|
|
@ -11,18 +11,20 @@ PluginsAPI.Dashboard.addNewTaskButton(
|
||||||
|
|
||||||
PluginsAPI.Dashboard.addTaskActionButton(
|
PluginsAPI.Dashboard.addTaskActionButton(
|
||||||
["cloudimport/build/TaskView.js"],
|
["cloudimport/build/TaskView.js"],
|
||||||
function(args, ImportView) {
|
function(args, TaskView) {
|
||||||
|
var reactElement;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{{ api_url }}/projects/" + args.task.project + "/tasks/" + args.task.id + "/checkforurl",
|
url: "{{ api_url }}/projects/" + args.task.project + "/tasks/" + args.task.id + "/checkforurl",
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
async: false,
|
async: false,
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
if (data.folder_url) {
|
if (data.folder_url) {
|
||||||
return React.createElement(ImportView, {
|
reactElement = React.createElement(TaskView, {
|
||||||
folderUrl: data.folder_url,
|
folderUrl: data.folder_url,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
return reactElement;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Ładowanie…
Reference in New Issue