| | |
| | | */ |
| | | deleteElement = (card, group) => { |
| | | const { config } = this.props |
| | | let _this = this |
| | | let that = this |
| | | let tabgroups = fromJS(this.state.tabgroups).toJS() |
| | | |
| | | confirm({ |
| | |
| | | return _group |
| | | }) |
| | | |
| | | _this.setState({ |
| | | that.setState({ |
| | | tabgroups: tabgroups |
| | | }, () => { |
| | | _this.props.updatetabs({...config, tabgroups: tabgroups}) |
| | | that.props.updatetabs({...config, tabgroups: tabgroups}) |
| | | }) |
| | | }, |
| | | onCancel() {} |
| | |
| | | */ |
| | | addTabGroup = () => { |
| | | const { config } = this.props |
| | | let _this = this |
| | | let that = this |
| | | let _tabgroups = fromJS(this.state.tabgroups).toJS() |
| | | |
| | | confirm({ |
| | |
| | | sublist:[] |
| | | }) |
| | | |
| | | _this.setState({ |
| | | that.setState({ |
| | | tabgroups: _tabgroups |
| | | }, () => { |
| | | _this.props.updatetabs({...config, tabgroups: _tabgroups}) |
| | | that.props.updatetabs({...config, tabgroups: _tabgroups}) |
| | | }) |
| | | }, |
| | | onCancel() {} |
| | |
| | | */ |
| | | delTabGroup = (group) => { |
| | | const { config } = this.props |
| | | let _this = this |
| | | let that = this |
| | | let _tabgroups = fromJS(this.state.tabgroups).toJS() |
| | | |
| | | confirm({ |
| | |
| | | onOk() { |
| | | _tabgroups = _tabgroups.filter(_group => _group.uuid !== group.uuid) |
| | | |
| | | _this.setState({ |
| | | that.setState({ |
| | | tabgroups: _tabgroups |
| | | }, () => { |
| | | _this.props.updatetabs({...config, tabgroups: _tabgroups}, group.sublist) |
| | | that.props.updatetabs({...config, tabgroups: _tabgroups}, group.sublist) |
| | | }) |
| | | }, |
| | | onCancel() {} |