Skip to content

Commit

Permalink
#29
Browse files Browse the repository at this point in the history
close #29
  • Loading branch information
guoxunbo committed Aug 12, 2019
1 parent 52dabbe commit eb9167d
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 29 deletions.
11 changes: 0 additions & 11 deletions src/api/question-manager/QuestionRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,6 @@ export default class QuestionRequest {
MessageUtils.sendRequest(requestObject);
}

static sendDeleteRquest = (object) => {
let requestBody = QuestionRequestBody.buildDelete(object.question);
let requestHeader = new QuestionRequestHeader();
let request = new Request(requestHeader, requestBody, UrlConstant.QuestionManagerUrl);
let requestObject = {
request: request,
success: object.success
}
MessageUtils.sendRequest(requestObject);
}

static sendWatchRquest = (object) => {
let requestBody = QuestionRequestBody.buildWatching(object.question);
let requestHeader = new QuestionRequestHeader();
Expand Down
6 changes: 1 addition & 5 deletions src/api/question-manager/QuestionRequestBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const ActionType = {
Create: "Create",
Update: "Update",
Watching: "Watching",
Delete: "Delete"
}

export default class QuestionRequestBody {
Expand All @@ -30,10 +29,7 @@ export default class QuestionRequestBody {
static buildClose(question) {
return new QuestionRequestBody(ActionType.Close, question);
}

static buildDelete(question) {
return new QuestionRequestBody(ActionType.Delete, question);
}


static buildWatching(question) {
return new QuestionRequestBody(ActionType.Watching, question);
Expand Down
11 changes: 0 additions & 11 deletions src/components/Table/QuestionTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,6 @@ export default class QuestionTable extends EntityListTable {
this.buildSubTabelColumns();
}

handleDelete = (record) => {
const self = this;
let object = {
question: record,
success: function(responseBody) {
self.refreshDelete(record);
}
};
QuestionRequest.sendDeleteRquest(object);
}

handleWatch = () => {
let self = this;
let selectedRow = this.getSingleSelectedRow();
Expand Down
2 changes: 0 additions & 2 deletions src/components/Table/edit/EditorTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,6 @@ class EditableTable extends React.Component {
};
});
return (


<div>
{(this.props.editFlag && !this.props.newFlag) ? this.createButtonGroup() : ''};
<EditableContext.Provider value={this.props.form}>
Expand Down

0 comments on commit eb9167d

Please sign in to comment.