tophf
e0650fde71
Editor: fixes for 0e391f9
, refactor, more fixes
...
* recognize changes in applies-to inputs
* recognize changes only in specified controls
* forget the dirty applies-to ids from a deleted section after the style was saved
* toMozillaFormat: use the actual contents of CodeMirror instances
* toMozillaFormat: allow empty code section with non-empty applies-to
* refactor: simplify, de-kludge, de-duplicate, de-obfuscate, use more descriptive names instead of "items", "a", "b" where appropriate
2015-03-21 20:09:58 +03:00
tophf
3ad6fd974b
Editor: fix findNext to not display Chrome's findbar
2015-03-21 05:53:59 +03:00
tophf
fec5306037
Editor: make Ctrl-S work in input boxes
2015-03-20 17:27:21 +03:00
tophf
603da2736f
Editor: don't scroll sections into view on click
2015-03-20 17:27:21 +03:00
tophf
31a9be7c2a
Editor: add "!important" word to autocomplete in css properties
2015-03-20 17:27:21 +03:00
tophf
ed9ce87d99
Editor: add sections asynchronously on init
...
Improves perceived responsiveness.
Becomes noticeable with ~3 sections.
Becomes indispensable with ~10 sections.
2015-03-20 17:27:21 +03:00
tophf
374244fceb
Editor: remember size/pos only for detached windows
2015-03-20 17:27:20 +03:00
hideheader
4e7b15f491
Report element removals correctly
...
An element with a `defaultValue` now becomes dirty when removed; elements
without become clean. As a result, removing an existing section makes the
document dirty while removing a new section makes it clean(er).
2015-03-16 16:47:56 -04:00
hideheader
b7483035d5
Flatten the closure, simplify its functions
2015-03-15 16:16:12 -04:00
hideheader
d3f8e38936
Manage dirty flags on all inputs
...
(1) Record initial value of text, select, and checkbox elements and re/set a
dirty class on each when the value changes.
(2) Combine the individual flags into a global dirty flag.
(3) Add 'dirty' status to the document title.
2015-03-15 14:50:42 -04:00
hideheader
284d4b8ec8
Add editor options
...
(1) Add UI controls for `keyMap`, `tabSize`, `indentWithTabs`, and
`lineWrapping`; `indentUnit` tracks `tabSize`.
(2) Dispatch `change` events from `loadPrefs` to initialize CM options
from the controls' event listener.
(3) Move stock options from the `CM.fromTextArea` call into `CM.defaults`.
Add `CM.setOption` method, analogous to the instance method, which updates
`CM.defaults` and sets the option in all instances; add `CM.getOption`
which simply returns `CM.defaults[option]`.
(4) Move the new editor functions into `CM.commands` and replace the
functions with commands.
2015-03-15 12:40:38 -04:00
hideheader
ae327d4ee1
Remove eval
from css-lint
...
Evaluate string token with `RegExp.exec()` instead of `eval()`.
2015-03-12 19:35:20 -04:00
Jason Barnabe
83bcde6569
Merge pull request #61 from tophf/global-search-in-new
...
Edit style: more tweaks
2015-03-12 13:15:46 -05:00
tophf
a5594eb7f1
fixup: actually autofocus the added section
2015-03-12 20:59:45 +03:00
tophf
0be6f6dfe4
Edit style: remove CodeMirror's Ctrl-S handler, now redundant
2015-03-12 20:41:06 +03:00
tophf
55538f808d
Edit style: allow adding sections midway, autofocus on manual add
2015-03-12 13:21:11 +03:00
tophf
b7fb1f14e1
Edit style: warn on losing changes to applies-to fields
2015-03-12 13:18:57 +03:00
tophf
464d3eb30d
Edit style: save on Ctrl-S outside code blocks too
2015-03-12 13:18:57 +03:00
tophf
c084ea3973
Edit style: retain scroll position of window & editor
2015-03-11 23:31:13 +03:00
tophf
f654cc734f
Edit style: remember detached window position and size
2015-03-11 23:31:13 +03:00
tophf
8844b71aab
Edit style: fix goto next/prev section after deleting one
2015-03-11 23:31:12 +03:00
hideheader
8140e16474
Fix 'dirty' indicator on 'Code' boxes
...
Toggle a class on the container instead of changing label text.
2015-03-10 11:45:13 -04:00
tophf
556c8746f6
New style edit: search in all code sections
2015-03-07 06:07:25 +03:00
Jason Barnabe
0bf5a1c748
Merge pull request #59 from tophf/global-search
...
Search all sections on find, findNext, findPrev when invoked from the editor
2015-03-06 20:08:22 -06:00
Jason Barnabe
9a90e15d45
Merge pull request #57 from tophf/keymap
...
Edit style: use 'sublime' keymap, add custom keys
2015-03-06 19:57:05 -06:00
tophf
cd8d11b137
Scroll the clicked section into view
2015-03-07 04:06:40 +03:00
tophf
514a1227e4
Search all sections on find/findNext/findPrev
2015-03-07 04:06:40 +03:00
9adefaf01e5bf6426d838cd20eae582d2b6ba647
20123760ac
Edit style: use 'sublime' keymap, add custom keys
...
F3, Shift-F3, Ctrl-H - find/find previous/replace
Ctrl-G: go to line dialog
Alt-PgDn: next code section
Alt-PgUp: previous code section
...and many more.
2015-03-05 09:59:11 +03:00
hideheader
279c5a2328
Create new styles with url-prefix()
...
`url-prefix()` is used ca. 100 times as often as `url()`.
2015-03-04 12:03:28 -05:00
Jason Barnabe
ab36efdd71
Merge pull request #50 from tophf/unsaved-code-warning
...
Edit style: warn before losing changes in code areas
2015-03-03 20:55:45 -06:00
hideheader
f54a70fe07
Replace localStorage
calls with prefs
calls
2015-03-03 18:36:18 -05:00
9adefaf01e5bf6426d838cd20eae582d2b6ba647
0fe98e374c
Edit style: warn before losing changes in code areas
2015-03-03 23:44:46 +03:00
Jason Barnabe
110c31d495
Merge pull request #46 from tophf/hotkeys-in-edit
...
Edit style: add Ctrl-S hotkey to save the style
2015-03-03 14:36:50 -06:00
9adefaf01e5bf6426d838cd20eae582d2b6ba647
e8c5c6dfd4
Edit style: add Ctrl-S hotkey to save the style
2015-03-03 23:26:22 +03:00
9adefaf01e5bf6426d838cd20eae582d2b6ba647
5a0e465f2a
Edit style: autocomplete on Ctrl-Space using CodeMirror hint addon
2015-03-03 21:16:24 +03:00
Jason Barnabe
b4173d68f6
Add CodeMirror addons - search, code folding, match brackets, lint
2015-02-24 22:05:00 -06:00
Jason Barnabe
a6616e5637
Fix defaulting of prefs
2015-02-17 13:50:51 -06:00
Jason Barnabe
d879b5e0c4
Add option for smart indentation in editor
2015-02-08 22:02:08 -06:00
Jason Barnabe
0756f2d2b8
Add write new style options to toolbar pop-up #14
2015-01-30 11:28:05 -06:00
Jason Barnabe
c4750a47b2
Convert to Unix linebreaks
2015-01-30 11:05:06 -06:00
Jason Barnabe
41fb65c841
issue #6 Enabled should be checked on new styles
2014-02-06 15:09:12 -06:00
Jason Barnabe
88c3eeaf20
Merge pull request #76 from eric-wood/master
...
Added CodeMirror editor replacement
2012-12-01 14:56:38 -08:00
Eric Wood
a6f3bb5c82
Saving now works, fixed styling
2012-11-27 12:18:06 -06:00
Eric Wood
b87ab87ce0
Replace textarea instaces CodeMirror
...
Added CodeMirror files
TODO: remove unnecessary files
2012-11-27 12:06:37 -06:00
Jason Barnabe
e288d54049
issue 75 To Mozilla Format doesn't work in 1.0b
2012-11-26 22:25:25 -06:00
Jason Barnabe
5623fef058
issue 57 Bad regexp prevents some other styles from applying
2012-11-02 22:25:04 -05:00
Jason Barnabe
a3a5740ea8
add fi locale from babelzilla
2012-09-01 14:43:52 -05:00
Jason Barnabe
9270dc1596
issue 44 Stop using deprecated Chrome APIs
2012-08-19 20:14:33 -05:00
Jason Barnabe
8dbd59b08a
issue 35 To Mozilla Format screws up Unicode chars
2012-08-06 22:00:23 -05:00
Jason Barnabe
ed8abc7cc4
issue 25: only first backslash is escaped when converting to mozilla format
2012-05-05 22:48:03 -05:00