import React, { Component, PropTypes } from 'react' import ReactDOM from 'react-dom' import EditorBase from './EditorBase' export default class ValidateEditor extends Component { static propTypes = { content: PropTypes.string.isRequired, onDone: PropTypes.func.isRequired, onInput: PropTypes.func, isValid: PropTypes.func, className: PropTypes.string, } constructor(props) { super(props) this.state = { currentContent: props.content } this.onInput = this.onInput.bind(this) this.onDone = this.onDone.bind(this) } componentWillReceiveProps(nextProps) { this.setState({ currentContent: nextProps.content }) } onInput(currentContent) { this.setState({ currentContent }) this.props.onInput && this.props.onInput(currentContent) } onDone(content) { if (this.props.isValid && !this.props.isValid(content)) { this.refs.editor.reset() content = this.props.content } this.props.onDone(content) } render() { let className = this.props.className || '' if (this.props.isValid) { if (this.props.isValid(this.state.currentContent)) { className += ' has-success' } else { className += ' has-warning' } } return ( ) } } /xen/refs/?h=staging-4.2&id=a0c61c0f77d2e0926bf728623e474fe9126648ae'>refslogtreecommitdiffstats
path: root/xen/arch/x86/boot/x86_64.S
blob: 7932f8aaa942d526687451b6b4a06e62d4c7eee4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125