| | |
| | | editStyleCard: fromJS(col).toJS() |
| | | }) |
| | | |
| | | MKEmitter.emit('changeStyle', [col.uuid], ['font', 'padding'], col.style || {}) |
| | | MKEmitter.emit('changeStyle', ['font', 'padding'], col.style || {}, this.getStyle) |
| | | } |
| | | |
| | | changeSubmitStyle = () => { |
| | | const { config } = this.props |
| | | |
| | | MKEmitter.emit('changeStyle', [config.uuid, 'submit'], ['font', 'background', 'border', 'margin', 'padding'], config.submit.style || {}) |
| | | MKEmitter.emit('changeStyle', ['font', 'background', 'border', 'margin', 'padding'], config.submit.style || {}, this.getSubmitStyle) |
| | | } |
| | | |
| | | getStyle = (comIds, style) => { |
| | | getSubmitStyle = (style) => { |
| | | const { config } = this.props |
| | | |
| | | let submit = {...config.submit, style} |
| | | |
| | | this.props.updatecolumn({...config, submit: submit}) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | | const { editStyleCard } = this.state |
| | | |
| | | if (comIds.length === 2 && comIds[0] === config.uuid && comIds[1] === 'submit') { |
| | | let submit = {...config.submit, style} |
| | | |
| | | this.props.updatecolumn({...config, submit: submit}) |
| | | |
| | | return |
| | | } |
| | | if (comIds.length !== 1 || !editStyleCard || comIds[0] !== editStyleCard.uuid) return |
| | | |
| | | let _card = {...editStyleCard, style} |
| | | |