kopia lustrzana https://github.com/OpenDroneMap/WebODM
Re-add buttons
rodzic
667b7eb5e5
commit
dee1e0d880
|
@ -181,7 +181,7 @@ class FormDialog extends React.Component {
|
||||||
<i className="fa fa-circle-notch fa-spin"></i> {_("Deleting...")}
|
<i className="fa fa-circle-notch fa-spin"></i> {_("Deleting...")}
|
||||||
</span>
|
</span>
|
||||||
: <span>
|
: <span>
|
||||||
<i className="glyphicon glyphicon-trash"></i> {_("Delete")}
|
<i className="fa fa-trash"></i> {_("Delete")}
|
||||||
</span>}
|
</span>}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -397,6 +397,7 @@ class TaskListItem extends React.Component {
|
||||||
([pendingActions.CANCEL,
|
([pendingActions.CANCEL,
|
||||||
pendingActions.REMOVE,
|
pendingActions.REMOVE,
|
||||||
pendingActions.RESTART].indexOf(task.pending_action) !== -1);
|
pendingActions.RESTART].indexOf(task.pending_action) !== -1);
|
||||||
|
const editable = this.props.hasPermission("change") && [statusCodes.FAILED, statusCodes.COMPLETED, statusCodes.CANCELED].indexOf(task.status) !== -1;
|
||||||
|
|
||||||
let expanded = "";
|
let expanded = "";
|
||||||
if (this.state.expanded){
|
if (this.state.expanded){
|
||||||
|
@ -430,8 +431,17 @@ class TaskListItem extends React.Component {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (editable || (!task.processing_node)){
|
||||||
|
addActionButton(_("Edit"), "btn-primary pull-right edit-button", "glyphicon glyphicon-pencil", () => {
|
||||||
|
this.startEditing();
|
||||||
|
}, {
|
||||||
|
className: "inline"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if ([statusCodes.FAILED, statusCodes.COMPLETED, statusCodes.CANCELED].indexOf(task.status) !== -1 &&
|
if ([statusCodes.FAILED, statusCodes.COMPLETED, statusCodes.CANCELED].indexOf(task.status) !== -1 &&
|
||||||
task.processing_node &&
|
task.processing_node &&
|
||||||
|
this.props.hasPermission("change") &&
|
||||||
!imported){
|
!imported){
|
||||||
// By default restart reruns every pipeline
|
// By default restart reruns every pipeline
|
||||||
// step from the beginning
|
// step from the beginning
|
||||||
|
@ -444,6 +454,13 @@ class TaskListItem extends React.Component {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.props.hasPermission("delete")){
|
||||||
|
addActionButton(_("Delete"), "btn-danger", "fa fa-trash fa-fw", this.genActionApiCall("remove", {
|
||||||
|
confirm: _("All information related to this task, including images, maps and models will be deleted. Continue?"),
|
||||||
|
defaultError: _("Cannot delete task.")
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
actionButtons = (<div className="action-buttons">
|
actionButtons = (<div className="action-buttons">
|
||||||
{task.status === statusCodes.COMPLETED ?
|
{task.status === statusCodes.COMPLETED ?
|
||||||
<AssetDownloadButtons task={this.state.task} disabled={disabled} />
|
<AssetDownloadButtons task={this.state.task} disabled={disabled} />
|
||||||
|
@ -637,9 +654,6 @@ class TaskListItem extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ability to change options
|
// Ability to change options
|
||||||
const editable = [statusCodes.FAILED, statusCodes.COMPLETED, statusCodes.CANCELED].indexOf(task.status) !== -1;
|
|
||||||
|
|
||||||
if (this.props.hasPermission("change")){
|
|
||||||
if (editable || (!task.processing_node)){
|
if (editable || (!task.processing_node)){
|
||||||
taskActions.push(<li key="edit"><a href="javascript:void(0)" onClick={this.startEditing}><i className="glyphicon glyphicon-pencil"></i>{_("Edit")}</a></li>);
|
taskActions.push(<li key="edit"><a href="javascript:void(0)" onClick={this.startEditing}><i className="glyphicon glyphicon-pencil"></i>{_("Edit")}</a></li>);
|
||||||
}
|
}
|
||||||
|
@ -650,7 +664,6 @@ class TaskListItem extends React.Component {
|
||||||
<li key="duplicate"><a href="javascript:void(0)"><i className="fa fa-copy"></i>{_("Duplicate")}</a></li>
|
<li key="duplicate"><a href="javascript:void(0)"><i className="fa fa-copy"></i>{_("Duplicate")}</a></li>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (this.props.hasPermission("delete")){
|
if (this.props.hasPermission("delete")){
|
||||||
|
@ -658,7 +671,7 @@ class TaskListItem extends React.Component {
|
||||||
<li key="sep" role="separator" className="divider"></li>,
|
<li key="sep" role="separator" className="divider"></li>,
|
||||||
);
|
);
|
||||||
|
|
||||||
addTaskAction(_("Delete"), "glyphicon glyphicon-trash", this.genActionApiCall("remove", {
|
addTaskAction(_("Delete"), "fa fa-trash", this.genActionApiCall("remove", {
|
||||||
confirm: _("All information related to this task, including images, maps and models will be deleted. Continue?"),
|
confirm: _("All information related to this task, including images, maps and models will be deleted. Continue?"),
|
||||||
defaultError: _("Cannot delete task.")
|
defaultError: _("Cannot delete task.")
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -56,6 +56,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-danger .fa-trash{
|
||||||
|
margin-right: 2px;
|
||||||
|
margin-left: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
.dz-preview{
|
.dz-preview{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue