Permalink
Browse files

reogranize locatino of CodeMirror modes

--HG--
rename : seed/static/codemirror_parse_haskell.js => seed/static/mode/haskell.js
  • Loading branch information...
mzero committed Feb 19, 2011
1 parent d496d48 commit ea424539cc68fa5637974255e6ffce715de3d9bc
View
14 TODO
@@ -71,6 +71,16 @@ Source Editor
[] expand/close icon on error header
[] pop-out preview into own window (and leave there)
+CodeMirror2
+ [] gutter color doesn't extend to left edge when not-edited
+ [] flaky initial display of rest of paragraph (call refresh?)
+ [x] re-organize haskell mode files (.js and .css)
+ [?] enable other modes
+ [] bug w/onChange being called on creation
+ [] bug: doesn't matchBracket when typing the closer
+ [] bug: double-clicking
+ [] modes should be compressed into one .js and one .css file
+
Compilation
[+m] better module loading...
[-m] model code used by Happstack plugins
@@ -103,7 +113,9 @@ Misc
[+] add Expires: <data> & Cache-Control: max-age=<secs> headers
[+] process If-Modified-Since, If-Unmodified-Since
[] add Cache-Control: no-cache for dynamic content
-
+ [] lib/DevPage.hs shoudn't have to include all the .css files in all pages
+ - find a way to have the page spec extra css
+
--- Tasks ----
[] make common error and warn functions for command line processing
View
@@ -179,7 +179,7 @@ scriptSrcs :: [String]
scriptSrcs =
[ "/static/jquery.js"
, "/static/codemirror.js"
- , "/static/codemirror_parse_haskell.js"
+ , "/static/mode/haskell.js"
, "Source.js"
]
View
@@ -110,7 +110,7 @@ var cmEditor = CodeMirror.fromTextArea($("#txt-src")[0], {
blockDocumentScroll: false,
lineNumbers: true,
matchBrackets: true,
- mode: 'hs',
+ mode: 'haskell',
//onChange: mkEditable,
onCursorActivity: function() {
View
@@ -49,6 +49,8 @@ devpage pageTitle contents modules scriptSrcs =
thetype "text/css"] << noHtml,
thelink ! [href "/static/codemirror.css", rel "stylesheet",
thetype "text/css"] << noHtml,
+ thelink ! [href "/static/mode/haskell.css", rel "stylesheet",
+ thetype "text/css"] << noHtml,
thetitle << fullTitle
] +++
body ! [theclass "with-topbar"] << [
View
@@ -51,35 +51,3 @@ span.CodeMirror-selected {
color: #fff;
font-weight: bold;
}
-
-
-
-.hs-char,
-.hs-float,
-.hs-integer,
-.hs-string { color: #7f7519;}
-
-.hs-comment { color: #236E25; font-style: italic; }
-.hs-pragma { }
-
-.hs-prelude-varid,
-.hs-prelude-varsym,
-.hs-special,
-.hs-varid,
-.hs-varsym { }
-
-.hs-conid,
-.hs-consym { color: #cc2900; }
-
-.hs-reservedid,
-.hs-reservedop { color: #7f3500; }
-
-.hs-qualifier { color: #5e5e5e;}
-.hs-error { background-color: #ffe5e5; }
-
-.hs-prelude-varid,
-.hs-prelude-varsym,
-.hs-prelude-conid { color: #250087; }
-
-
-
@@ -0,0 +1,26 @@
+.hs-char,
+.hs-float,
+.hs-integer,
+.hs-string { color: #7f7519;}
+
+.hs-comment { color: #236E25; font-style: italic; }
+.hs-pragma { }
+
+.hs-prelude-varid,
+.hs-prelude-varsym,
+.hs-special,
+.hs-varid,
+.hs-varsym { }
+
+.hs-conid,
+.hs-consym { color: #cc2900; }
+
+.hs-reservedid,
+.hs-reservedop { color: #7f3500; }
+
+.hs-qualifier { color: #5e5e5e;}
+.hs-error { background-color: #ffe5e5; }
+
+.hs-prelude-varid,
+.hs-prelude-varsym,
+.hs-prelude-conid { color: #250087; }
@@ -1,4 +1,4 @@
-CodeMirror.defineMode("hs", function(cmCfg, modeCfg) {
+CodeMirror.defineMode("haskell", function(cmCfg, modeCfg) {
function switchState(source, setState, f) {
setState(f);

0 comments on commit ea42453

Please sign in to comment.