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",
|
||||
"webodmMinVersion": "1.1.2",
|
||||
"description": "Import images from external sources directly",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"author": "Nicolas Chamo",
|
||||
"email": "nicolas@chamo.com.ar",
|
||||
"repository": "https://github.com/OpenDroneMap/WebODM",
|
||||
|
|
|
@ -11,18 +11,20 @@ PluginsAPI.Dashboard.addNewTaskButton(
|
|||
|
||||
PluginsAPI.Dashboard.addTaskActionButton(
|
||||
["cloudimport/build/TaskView.js"],
|
||||
function(args, ImportView) {
|
||||
function(args, TaskView) {
|
||||
var reactElement;
|
||||
$.ajax({
|
||||
url: "{{ api_url }}/projects/" + args.task.project + "/tasks/" + args.task.id + "/checkforurl",
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
success: function(data) {
|
||||
if (data.folder_url) {
|
||||
return React.createElement(ImportView, {
|
||||
reactElement = React.createElement(TaskView, {
|
||||
folderUrl: data.folder_url,
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
return reactElement;
|
||||
}
|
||||
);
|
||||
|
|
Ładowanie…
Reference in New Issue