Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
1e1407cd
Commit
1e1407cd
authored
Jan 31, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Debug JSON: improve code mirror
parent
276ebba2
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
580 additions
and
1 deletion
+580
-1
dream/platform/src/dream/Input_viewDebugJson.html
dream/platform/src/dream/Input_viewDebugJson.html
+1
-0
dream/platform/src/dream/Input_viewDebugJson.js
dream/platform/src/dream/Input_viewDebugJson.js
+3
-0
dream/platform/static/lib/codemirror-compressed.js
dream/platform/static/lib/codemirror-compressed.js
+10
-1
dream/platform/static/lib/codemirror.css
dream/platform/static/lib/codemirror.css
+134
-0
dream/platform/static/lib/jsonlint.js
dream/platform/static/lib/jsonlint.js
+432
-0
No files found.
dream/platform/src/dream/Input_viewDebugJson.html
View file @
1e1407cd
...
...
@@ -8,6 +8,7 @@
<script
src=
"../<%= copy.rsvp.relative_dest %>"
type=
"text/javascript"
></script>
<script
src=
"../<%= copy.renderjs.relative_dest %>"
type=
"text/javascript"
></script>
<script
src=
"../lib/codemirror-compressed.js"
type=
"text/javascript"
></script>
<script
src=
"../lib/jsonlint.js"
type=
"text/javascript"
></script>
<script
src=
"mixin_gadget.js"
type=
"text/javascript"
></script>
<script
src=
"mixin_promise.js"
type=
"text/javascript"
></script>
<script
src=
"Input_viewDebugJson.js"
type=
"text/javascript"
></script>
...
...
dream/platform/src/dream/Input_viewDebugJson.js
View file @
1e1407cd
...
...
@@ -48,6 +48,9 @@
gadget
.
props
.
codemirror
=
CodeMirror
.
fromTextArea
(
jsonTextArea
,
{
lineNumbers
:
true
,
mode
:
{
name
:
'
javascript
'
,
json
:
true
},
foldGutter
:
true
,
lint
:
true
,
gutters
:
[
"
CodeMirror-linenumbers
"
,
"
CodeMirror-foldgutter
"
,
"
CodeMirror-lint-markers
"
],
extraKeys
:
{
"
Ctrl-S
"
:
function
(
instance
)
{
// XXX this is outside of promise chain.
...
...
dream/platform/static/lib/codemirror-compressed.js
View file @
1e1407cd
This source diff could not be displayed because it is too large. You can
view the blob
instead.
dream/platform/static/lib/codemirror.css
View file @
1e1407cd
...
...
@@ -307,3 +307,137 @@ div.CodeMirror-cursors {
/* Help users use markselection to safely style text background */
span
.CodeMirror-selectedtext
{
background
:
none
;
}
/* http://codemirror.net/addon/fold/foldgutter.css */
.CodeMirror-foldmarker
{
color
:
blue
;
text-shadow
:
#b9f
1px
1px
2px
,
#b9f
-1px
-1px
2px
,
#b9f
1px
-1px
2px
,
#b9f
-1px
1px
2px
;
font-family
:
arial
;
line-height
:
.3
;
cursor
:
pointer
;
}
.CodeMirror-foldgutter
{
width
:
.7em
;
}
.CodeMirror-foldgutter-open
,
.CodeMirror-foldgutter-folded
{
cursor
:
pointer
;
}
.CodeMirror-foldgutter-open
:after
{
content
:
"\25BE"
;
}
.CodeMirror-foldgutter-folded
:after
{
content
:
"\25B8"
;
}
/* http://codemirror.net/addon/dialog/dialog.css */
.CodeMirror-dialog
{
position
:
absolute
;
left
:
0
;
right
:
0
;
background
:
white
;
z-index
:
15
;
padding
:
.1em
.8em
;
overflow
:
hidden
;
color
:
#333
;
}
.CodeMirror-dialog-top
{
border-bottom
:
1px
solid
#eee
;
top
:
0
;
}
.CodeMirror-dialog-bottom
{
border-top
:
1px
solid
#eee
;
bottom
:
0
;
}
.CodeMirror-dialog
input
{
border
:
none
;
outline
:
none
;
background
:
transparent
;
width
:
20em
;
color
:
inherit
;
font-family
:
monospace
;
}
.CodeMirror-dialog
button
{
font-size
:
70%
;
}
/* http://codemirror.net/addon/lint/lint.css */
/* The lint marker gutter */
.CodeMirror-lint-markers
{
width
:
16px
;
}
.CodeMirror-lint-tooltip
{
background-color
:
infobackground
;
border
:
1px
solid
black
;
border-radius
:
4px
4px
4px
4px
;
color
:
infotext
;
font-family
:
monospace
;
font-size
:
10pt
;
overflow
:
hidden
;
padding
:
2px
5px
;
position
:
fixed
;
white-space
:
pre
;
white-space
:
pre-wrap
;
z-index
:
100
;
max-width
:
600px
;
opacity
:
0
;
transition
:
opacity
.4s
;
-moz-transition
:
opacity
.4s
;
-webkit-transition
:
opacity
.4s
;
-o-transition
:
opacity
.4s
;
-ms-transition
:
opacity
.4s
;
}
.CodeMirror-lint-mark-error
,
.CodeMirror-lint-mark-warning
{
background-position
:
left
bottom
;
background-repeat
:
repeat-x
;
}
.CodeMirror-lint-mark-error
{
background-image
:
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==")
;
}
.CodeMirror-lint-mark-warning
{
background-image
:
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=")
;
}
.CodeMirror-lint-marker-error
,
.CodeMirror-lint-marker-warning
{
background-position
:
center
center
;
background-repeat
:
no-repeat
;
cursor
:
pointer
;
display
:
inline-block
;
height
:
16px
;
width
:
16px
;
vertical-align
:
middle
;
position
:
relative
;
}
.CodeMirror-lint-message-error
,
.CodeMirror-lint-message-warning
{
padding-left
:
18px
;
background-position
:
top
left
;
background-repeat
:
no-repeat
;
}
.CodeMirror-lint-marker-error
,
.CodeMirror-lint-message-error
{
background-image
:
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=")
;
}
.CodeMirror-lint-marker-warning
,
.CodeMirror-lint-message-warning
{
background-image
:
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=")
;
}
.CodeMirror-lint-marker-multiple
{
background-image
:
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC")
;
background-repeat
:
no-repeat
;
background-position
:
right
bottom
;
width
:
100%
;
height
:
100%
;
}
\ No newline at end of file
dream/platform/static/lib/jsonlint.js
0 → 100644
View file @
1e1407cd
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment