Kevin Sawicki
1ee1fa02ba
Merge pull request #255 from github/rearrange-tabs
...
Drag and drop tabs
2013-02-12 08:38:52 -08:00
Kevin Sawicki
a61b0ab9da
Toggle dev tools in spec helper when no root view
...
Previously the keybinding for toggling the dev tools
would not function correctly after the root view had
been destroyed.
2013-02-11 10:22:19 -08:00
Justin Palmer
b2ce4ca6d5
merge dev, fix conflicts from package rewrite
2013-02-09 20:17:29 -08:00
Corey Johnson & Kevin Sawicki
4619e1847f
Manage package lifecycle in Atom instead of in RootView
2013-02-08 17:28:08 -08:00
Corey Johnson & Kevin Sawicki
3b4f07701b
Build packages using paths instead of filenames
2013-02-08 17:28:04 -08:00
Corey Johnson
a89fdd7714
Reset the loadedPackages before each test.
...
Also stop including fixturePackagesPath in configs.packageDirPaths. Instead load fixture packages as needed
2013-02-08 17:28:03 -08:00
Corey Johnson
74ae4a6413
Remove getTextMatePackages
2013-02-08 17:28:03 -08:00
Nathan Sobo
1cab51cefa
RootView can no longer be focused.
...
Allowing root view to be focused was stealing focus away from the
editor whenever a click event made it to the root view. This unnecessary
switching of focus was interfering with the ability to drag tabs.
But if RootView can't be focused, focus ends up being returned to the
document body when there are no focusable elements. This would be fine,
except for the fact that we frequently bind global events on root view,
and so they aren't triggered when events are triggered on the body. We
could just bind all global events on the body, but this would require
us to always attach elements to the DOM during specs, which is a serious
performance killer in specs.
The workaround is in the keymap. When the keymap handles a key event
that was triggered on the body, it triggers the corresponding semantic
event on the root view anyway, so from the event perspective, it's as
if the root view actually had focus. The only place this might fall
down is if someone wants to capture raw key events. But that's the
keymap's job anyway, and we maybe add a hook on the keymap if such a
need ever arises.
2013-02-08 17:33:37 -07:00
Nathan Sobo
e25d83ccbc
Use new addEqualityTester
method to employ _.isEqual in specs
2013-02-02 17:58:39 -07:00
Corey Johnson
8e0b6aec40
Longer spec timeout
2013-01-31 15:46:54 -08:00
Nathan Sobo
c16acc6b2c
Disable 'package-that-throws-an-exception' except in spec that uses it
...
Loading this package logs a warning, so to minimize noise in the spec
console, it should only be loaded when `console.warn` is mocked.
2013-01-27 13:11:42 -07:00
Kevin Sawicki
a950673767
Remove duplicate simulateDomAttachment function
2013-01-11 10:42:43 -08:00
Kevin Sawicki & Nathan Sobo
4dc7ade4e6
Globally mock pasteboard read and write in specs
2013-01-10 11:41:07 -08:00
Corey Johnson
d2521ca8b8
Set editor.autoIndent to false for tests
...
Auto-indenting makes it more difficult to write simple tests. So we turn it off.
2013-01-10 09:41:49 -08:00
Corey Johnson & Nathan Sobo
f008ff52e8
Load snippets from any atom package with a snippets
directory
2013-01-07 14:28:47 -07:00
Corey Johnson & Nathan Sobo
6efe533650
Add atom.getPackages
so we can access package objects anywhere
2013-01-07 14:28:47 -07:00
Nathan Sobo
a9bb4ea163
When loading a package, honor the 'keymaps' manifest in package.json
...
Also, add a spec to cover the loading of keymaps in `atom-spec` and
reset the `keymap`'s internal data after each spec gets run to prevent
test pollution with keymaps.
2013-01-03 15:17:09 -07:00
Nathan Sobo
08a27cf93d
Load grammars from TextMatePackage
. Delete TextMateBundle
.
...
TextMatePackage is only designed to load resources out of a TextMate
bundle. It's used only at load time, and from that point out we only
refer to our own global `syntax` data structure to access the data that
it loads.
2012-12-31 18:28:38 -06:00
Nathan Sobo
25aadda742
Merge branch 'master' into config
2012-12-20 22:17:32 -07:00
Nathan Sobo
880edcd408
Increase waitsFor
timeout in attempt to address intermittent failure
2012-12-20 22:17:08 -07:00
Nathan Sobo
c7605b8aa6
Move loadPackages
to atom
global. Handle '-tmbundle' in regex.
...
This simplifies the loading of TextMate bundles in the spec and benchmark helpers. Since `loadBundle` was already implemented on `atom`, it made sense to move this logic here. Config is now more focused on its core job of handling configuration, not loading bundles.
2012-12-20 21:34:07 -07:00
Corey Johnson
5ea9a4d365
Load TextMate Bundles from packages
directories
2012-12-20 16:25:08 -08:00
Nathan Sobo
37f0aa3f90
Replace window.requireExtension
with atom.loadPackage
...
The goal is that `loadPackage` will be the go-to place for loading all kinds of resources out of directories. `requireExtension` was only designed to load and activate extension modules.
2012-12-18 19:47:20 -07:00
Nathan Sobo
fc9bf38a2a
*Must* use get
and set
to access config
values.
...
The `config` object no longer stores config properties directly. Instead it stores them on an internal `settings` object, which makes it easier to serialize settings without getting them mixed up with non-setting state on the `config` object.
2012-12-17 20:56:37 -07:00
Nathan Sobo
7bf0022d3f
Make the font size 16 in specs, because a few specs depend on it
2012-12-12 16:39:30 -08:00
Nathan Sobo
ff468371ae
Nuke the config between specs
2012-12-12 15:58:50 -08:00
Nathan Sobo
c19c9e0d1f
Save config changes on update
2012-12-12 15:49:01 -08:00
Nathan Sobo
3c2b84a46d
Add config.editor.fontSize
2012-12-12 15:23:36 -08:00
Nathan Sobo
9c31ab3a79
Add global config
object. Config#load
loads user's atom.coffee.
2012-12-12 11:40:09 -08:00
Corey Johnson & Nathan Sobo
702b8047e4
Unwatch all paths after each test
2012-11-29 15:31:05 -08:00
Corey Johnson & Nathan Sobo
2f6566d1c5
Make jasmine timeout quicker (the right way)
2012-11-28 17:15:35 -08:00
Corey Johnson & Nathan Sobo
db78d6a7e5
Ensure PathWatcher isn't watching anything at the end of each spec
...
This replaces the old functionality of ensuring no files or directories have subscriptions in javascript. We allow this now, but we just don't allow leaked watches at the native layer.
2012-11-28 17:16:15 -07:00
Corey Johnson & Nathan Sobo
ce82439420
Make jasmine time out faster on waitsFor
blocks
2012-11-28 16:56:30 -07:00
Corey Johnson & Nathan Sobo
d6009df44e
Buffers retain path when file is deleted and can be re-saved
...
Path watching resumes once the file is saved again. This commit allows files to be created for as-yet nonexistent paths. We won't call `$native.watchPath` until we have at least 1 subscription to the file in JS and the file exists on disk.
Also, we moved execution of the path watcher callbacks until after the callbacks data structure is updated in order to avoid confusing behavior in specs.
2012-11-28 16:55:10 -07:00
Corey Johnson & Nathan Sobo
d5d4751776
Don't set Buffer's file to null when the file is deleted (retain path)
2012-11-28 13:40:37 -07:00
Nathan Sobo
5aba8596a9
Make tokenization synchronous in all specs
...
Disabled some specs that need to make it asynchronous again… will deal with those soon.
2012-11-21 08:22:13 -07:00
Corey Johnson & Nathan Sobo
79036f60bc
Fix bug when setTimeout is called from within a timeout in specs
2012-11-19 16:50:07 -07:00
Corey Johnson & Nathan Sobo
f9563f5e55
Fix PathWatcher
failures
...
Now when a file is removed, we always remove its subscriptions and its kevent.
2012-11-19 13:16:14 -07:00
Corey Johnson
726345d93d
Use spyOn for window.setTimeout and window.clearTimeout in SpecHelper
2012-11-16 16:13:08 -08:00
Corey Johnson
e57cd48c54
Add jasmine.unspy
2012-11-16 16:12:04 -08:00
Corey Johnson
5bdfc49f3f
Window's title matches TextMate pattern of "#{basename} – #{project.path}"
2012-11-15 17:08:37 -08:00
Corey Johnson
7f999f4a96
Store the RootView's title as a member var instead of on document.title.
...
Now the window title is mocked to remain static when the spec suite is run.
2012-11-15 15:55:37 -08:00
Nathan Sobo
5803332501
Allow specs results to be scrolled
...
I added overflow hidden on the html and body tags in a previous commit to prevent rubber banding when scrolling the editor. But it broke the ability to scroll specs. This fixes that.
2012-11-15 13:52:29 -07:00
Nathan Sobo
5a1a1da386
Make editor display updates synchronous in all specs
2012-11-14 13:13:57 -07:00
Nathan Sobo
d1d3b45474
Don't focus the specs window in beforeEach
2012-11-07 16:00:39 -07:00
Nathan Sobo
72d25b405f
Don't show dev tools by default during specs. They steal the focus.
2012-11-07 12:04:47 -07:00
Nathan Sobo
b71fa308a3
Always run window.startup
when window.coffee is required
...
When we actually want to attach the root view in window-bootstrap.coffee, we call `window.attachRootView(path)` instead of calling `window.startup(path)`. Having `startup` called automatically means we can be sure any code we add there runs in every environment (including benchmark and specs). This is where we do things like setup the global keymap, parse text mate bundles and themes, and establish the window close handler. Any globals other than the root view that we want to be available in all environments should be established here. Right now that's just the keymap, but soon I want to add a global pasteboard.
2012-10-24 12:34:45 -06:00
Nathan Sobo
5f253d78e9
Optimization: Use absolute positioning instead of flexbox in editor
...
Flexbox was causing layouts and repaints to cover the entire scroll view instead of just the edited line. This cuts down on DOM manipulation cost significantly.
2012-09-25 14:58:31 -06:00
Corey Johnson
7f8531d10f
Show dev tools when specs are run
2012-09-06 15:36:28 -07:00
Corey Johnson & Nathan Sobo
44db540528
All specs pass
2012-08-30 17:12:52 -06:00
Corey Johnson & Nathan Sobo
08b9d69f59
Focus specs window before each test to ensure focus assertions pass
2012-08-30 16:11:42 -06:00
Nathan Sobo
3cc2faf7c2
Add atom.showDevTools
and replace calls to $native.showDevTools
2012-08-30 11:24:01 -06:00
Corey Johnson & Nathan Sobo
12b06ddf0c
Get spec suite running (lots of failures)
2012-08-27 17:36:36 -05:00
Nathan Sobo
c2c8724ad0
Initial commit
2012-08-10 13:32:19 -06:00
Nathan Sobo
c8154e4e8c
Use Twilight theme stylesheet based on TextMateTheme
2012-08-08 16:55:34 -06:00
Corey Johnson
b378620c54
Add TextMateBundle which handles all bundle loading
2012-08-02 11:38:14 -07:00
Corey Johnson & Nathan Sobo
058f63c01f
load all bundle grammars in window.startup
2012-08-01 17:09:29 -07:00
Corey Johnson & Nathan Sobo
b959d5aa37
Buffers are memoized on project by path
2012-07-18 12:56:09 -07:00
Corey Johnson & Nathan Sobo
c7b7135388
Temporary fix: When editor is resized, adjust width of rendered lines.
...
We do this to ensure that the lines aren't longer than the scroll view if they don't have to be. We really should use min-width instead because it's automatic. Also, trigger window resize when we make the editor narrower.
2012-07-13 17:17:18 -06:00
Corey Johnson & Nathan Sobo
ded4ac7fa1
WaitsForPromise outputs reject callback arguments
2012-07-12 12:11:48 -07:00
Corey Johnson & Nathan Sobo
1331cfb749
When promise resolution throws an exception, waitsForPromise is halted
2012-07-12 11:45:44 -07:00
Corey Johnson & Nathan Sobo
0d50066dad
Add window.originalSetTimeout
...
Signed-off-by: Corey Johnson & Nathan Sobo <cj+nathan@github.com>
2012-07-12 11:44:07 -07:00
Corey Johnson & Nathan Sobo
76d71c82d0
waitsForPromise takes a expectRejection option
...
If we expect rejection, we expect the promises's `fail` callback to be invoked and throw an exception if it isn't. Vice versa is also true.
2012-07-12 11:11:09 -06:00
Corey Johnson
5b2781aec2
waitsForPromise can wait for calls to fail
2012-07-10 15:05:29 -07:00
Nathan Sobo
06cdcaa820
Use fs.md5ForPath in spec-helpert o ensure sample.js isn't modified
2012-07-02 19:21:24 -06:00
Corey Johnson
801a91ec9b
Specs cleanup buffers
2012-06-29 15:38:12 -07:00
Corey Johnson
2ff1cc9baf
Never again will changes to 'sample.js' bite us in the ass
2012-06-29 15:09:31 -07:00
Corey Johnson
1059a6a495
Make dev tools work with specs
2012-06-26 16:41:13 -07:00
Nathan Sobo
e3d7ab31b5
Merge branch 'project-refactor'
2012-06-20 16:41:54 -06:00
Nathan Sobo
b4d77fd107
Load user configuration as part of RootView initialization, before any editors are created
2012-06-20 16:06:45 -06:00
Corey Johnson & Nathan Sobo
1280370fd1
Editor constructor requires an editSession (unless it is a mini buffer)
2012-06-20 09:28:23 -07:00
Corey Johnson
0cfb2e9ef4
Rename Editor.visibleLines to Editor.renderedLines
2012-06-04 17:53:58 -07:00
Corey Johnson
3983a25a98
Use requireStylesheet to load jasmine.css
2012-06-01 15:22:24 -07:00
Nathan Sobo
5045d68be2
2012-05-16 14:47:09 -06:00
Corey Johnson & Nathan Sobo
af65bd785c
fix test failures
2012-05-11 16:06:42 -07:00
Corey Johnson & Nathan Sobo
d51b229d56
When the editor buffer changes and the path is not visible in the TreeView, It selects the closes ancestor entry of that file.
2012-05-11 15:44:18 -07:00
Corey Johnson & Nathan Sobo
38582a22d3
These tests shall pass
2012-05-11 11:25:27 -07:00
Corey Johnson & Nathan Sobo
9427c82084
WIP: Getting specs passing with new stand-in vertical scrollbar
2012-05-11 11:52:03 -06:00
Nathan Sobo
f2f44b9ab6
Can match key patterns with the '-' character
...
Add a parser to parse keystroke patterns instead of splitting on '-' with a regex
2012-05-09 10:56:31 -06:00
Nathan Sobo
eeb28111f3
Double clicking a file changes focus to editor. Double clicking a directory toggles expansion. Single clicking doesn't ever change focus away from tree view.
2012-05-07 14:55:33 -06:00
Corey Johnson & Nathan Sobo
28ff26e845
Merge branch 'master' into statusbar
...
Conflicts:
src/app/editor.coffee
src/app/project.coffee
src/app/root-view.coffee
2012-05-04 11:41:13 -06:00
Corey Johnson & Nathan Sobo
bb689574d0
Project drawer state is restored upon refresh
2012-05-02 16:08:02 -07:00
Nathan Sobo
47c013f817
After each spec runs, make sure there are no subscriptions on directories (which would leak memory)
2012-04-26 15:54:54 -06:00
Corey Johnson & Nathan Sobo
f652b4e357
Position autocomplete menu above cursor if there isn't room below
2012-04-20 17:18:07 -06:00
Corey Johnson & Nathan Sobo
b1ab0735c7
Add ability to simulate DOM attachment to spec helper
2012-04-19 17:56:08 -07:00
Corey Johnson & Nathan Sobo
49b5263fd7
Listen on Editor for bubbled textInput events instead of directly on hidden input
2012-04-19 10:14:45 -06:00
Nathan Sobo
a5a573d732
StatusBar.initialize appends a status bar view to every current and future editor pane
2012-04-17 11:37:01 -06:00
Nathan Sobo
6c5b2a47ec
Reset document.title after each spec to prevent test pollution
2012-04-13 15:11:33 -06:00
Corey Johnson & Nathan Sobo
877b4dc336
RootView constructor can be called with serialized view state data
...
Move the saving of serialized root view data to window.coffee. The window.startup method looks for window state on the atom object and instantiates the root view with that if it is present.
2012-04-12 14:47:51 -06:00
Corey Johnson & Nathan Sobo
416a15e3af
Editors in #panes are always contained by .pane wrappers
...
This prepares us to refactor the split view and editor state code into Column, Row, and Pane objects.
2012-04-11 18:37:22 -06:00
Nathan Sobo
3c53f20aad
Split panes arrangements and editors are restored after refresh
2012-04-11 13:17:12 -06:00
Corey Johnson
37a9d88b48
Spec helper uses window's keymap
2012-04-03 17:20:48 -07:00
Corey Johnson
a372a2b411
Add Editor.bounds() and Editor.screenPositionInBounds()
2012-04-03 15:36:25 -07:00
Corey Johnson
edbd378879
All keybindings are stored in the src/keybindings folder now
2012-04-02 08:57:08 -07:00
Corey Johnson & Nathan Sobo
60affb5d55
Defer cursor auto-scrolling until next tick.
...
Reading the DOM causes a reflow, which slows down character insertion.
2012-03-08 14:04:54 -08:00
Nathan Sobo
8e4a6f65f7
Translate clicks to screen positions correctly when lines are scrolled right
2012-03-07 17:22:13 -07:00
Nathan Sobo
65920fdc25
Rename GlobalKeymap to Keymap
2012-03-07 14:45:26 -07:00
Nathan Sobo
62319113c1
Meta-w closes specs window
2012-03-07 14:27:21 -07:00
Nathan Sobo
20deb80d9f
Give specs window a keymap with the default bindings
2012-03-07 11:04:41 -07:00
Corey Johnson & Nathan Sobo
5a4f4955b2
Set LineWrapper.maxLength based on lines width, not editor with.
...
Because there's a gutter now that doesn't count.
2012-03-02 17:09:45 -08:00
Corey Johnson & Nathan Sobo
e7f7e121f7
Gutter updates line numbers when buffer lines are inserted/removed
2012-03-02 16:24:03 -08:00
Corey Johnson & Nathan Sobo
b3c4fd5cce
Add a nonfunctional gutter to editor layout.
2012-03-02 15:42:04 -08:00
Corey Johnson & Nathan Sobo
f894f11e5f
remove references to native
2012-03-01 16:22:05 -08:00
Corey Johnson & Nathan Sobo
ffeaf7ed17
Remove menu code and tests
2012-02-29 13:47:48 -08:00
Corey Johnson & Nathan Sobo
be463abe42
Move keymap from app to window
2012-02-29 11:33:15 -08:00
Corey Johnson & Nathan Sobo
c84320b536
window-bootstrap is called when a file is opened.
2012-02-28 17:24:58 -08:00
Corey Johnson & Nathan Sobo
b37b45b4b1
atom variable holds all global state and is shared across contexts.
2012-02-28 13:14:35 -08:00
Corey Johnson
a41676e84e
Use event.originalEvent.keyIdentifier instead of event.which.
...
Events match patterns if event.keyStroke == key pattern.
2012-02-15 10:04:02 -08:00
Nathan Sobo
5ab91c3f47
WIP: Handle changes that aren't affected by wrapping
2012-02-08 14:04:55 -07:00
Corey Johnson
b45c00d90e
If an object implements inspect
jasmine will use it in test output
2012-02-03 16:05:57 -08:00
Corey Johnson & Nathan Sobo
82366b1226
Jasmine will call toString() if available to print an object.
2012-02-02 17:00:10 -08:00
Corey Johnson & Nathan Sobo
bb2af7333a
Point -> pixel conversion should be relative to editor.lines
2012-02-02 17:25:23 -07:00
Corey Johnson & Nathan Sobo
a62bd4b304
Double clicking selects a word.
2012-02-02 14:57:05 -08:00
Corey Johnson
c6c762ba23
Double mouse click selects word
...
The mousedown event on editor is causing this to fail right now.
2012-02-02 14:13:28 -08:00
Corey Johnson
d8975e7a94
SpecHelper has a method for getting pixel points from a row/column
2012-02-02 11:14:50 -08:00
Nathan Sobo
1dd718f896
Can select text with the mouse
2012-01-28 17:00:59 -08:00
Nathan Sobo
3e5cef9672
Cursor can be re-positioned with the mouse
2012-01-28 15:54:01 -08:00
Corey Johnson & Nathan Sobo
dea99216d4
Cursor blinks
2012-01-27 17:33:02 -08:00
Nathan Sobo
5aeef9e58f
WIP: Starting on creating a selection with shift-arrows
...
Introduce Point and Range objects. Selection.selectRight places an
anchor object before moving right if no anchor yet exists. Still no
visual treatment.
2012-01-26 15:45:49 -08:00
Corey Johnson & Nathan Sobo
b4d91f2bc7
Typing inserts a character at the cursor position
2012-01-24 17:19:01 -08:00
Corey Johnson & Nathan Sobo
5ddf4e1a0b
Ensure combined scroll margins are smaller than editor height.
...
This prevents jerky scrolling when the window is very short.
2012-01-23 17:15:11 -08:00
Corey Johnson & Nathan Sobo
1a52890d19
Cursor scrolls editor as it moves
2012-01-23 16:45:00 -08:00
Danny Greg & Nathan Sobo
cd127c009e
Cursor can move around screen
...
Still not handling corner cases like moving off the edge of screen,
line, etc.
2012-01-17 18:13:50 -08:00
Nathan Sobo
5198a88cce
Half-baked: Have a lines reasonably looking cursor working.
...
A bunch of tests are failing but you can load a buffer and display its
lines.
2012-01-16 22:11:38 -08:00
Nathan Sobo
bde3a9f5f5
Use requireStylesheet for editor stylesheet.
2012-01-16 20:17:07 -08:00
Nathan Sobo
1a16a755b4
Merge branch 'master' into editor
...
Conflicts:
spec/spec-helper.coffee
2012-01-16 20:04:50 -08:00
Nathan Sobo
f4aa8daa52
Add window.requireStylesheet
...
This allows you to synchronously load a stylesheet into the document's
head whenever it is needed.
2012-01-16 20:03:48 -08:00
Nathan Sobo
7d7b119927
WIP
2012-01-16 19:23:27 -08:00
Nathan Sobo
13d7f93dd9
GlobalKeyMap adds a 'keystroke' string to events
...
The keystroke is a string representation of the event... like
"alt-ctrl-x" or "q"
2012-01-13 14:03:22 -08:00
Nathan Sobo
2c2423f985
Single-digit numeric prefixes can repeat commands in vim-mode
...
Vim mode has an operator stack. Every time an operator is pushed to the
stack, we ask if it is complete. If it's complete, we compose it with
the operator below it, then pop that operator if its complete. When no
operators remain on the stack, we call execute the final composed
operator. So far we only have DeleteChar (x) and NumericPrefix
operators.
2012-01-11 22:02:47 -08:00
Corey Johnson & Nathan Sobo
17ad7a26e7
Ensure focus returns to the editor when file finder closes.
...
We just capture focusout events on root view… if anything other than the editors text area lost focus, we focus the editor again. This will likely need refinement when we add more widgets to the system, but its enough to make the fuzzy finder behave appropriately.
2012-01-11 13:16:11 -08:00
Corey Johnson & Nathan Sobo
1aa99c379f
Move GlobalKeymap instance to App. Clear bindings between examples.
2012-01-11 13:16:11 -08:00
Corey Johnson & Nathan Sobo
e58f699681
Remove KeyBinder and CommandMap.
2012-01-11 13:16:11 -08:00
Nathan Sobo
7f4120ce36
Toggle file-finder with a new CSS-style keybinding
...
Still doesn't hide when the text field is focused because we need to
handle key events that didn't emerge from Ace. That's next.
2012-01-11 13:16:11 -08:00
Corey Johnson & Nathan Sobo
7f3396c125
Rename createKeyEvent to keydownEvent
2012-01-11 13:16:10 -08:00
Nathan Sobo
18e614e88d
Start experiment: associate key bindings with CSS selectors
...
KeyEventHandler holds references to BindingSets. The name "binding set"
is based on the concept of a CSS ruleset. The idea is to choose a key
binding for an event based on what selectors (match / most closely
contain) the event's target DOM node.
2012-01-11 13:16:10 -08:00
Nathan Sobo
6dddb1aa26
RootView.toggleFileFinder scans urls asynchronously.
2012-01-03 16:39:09 -07:00
Nathan Sobo
a1e0039890
Centralize key binding logic in KeyBinder and jQuery.fn.bindKey extension.
...
This commit removes window.bindKey in favor of binding keys on dom elements. It also refactors pattern parsing in the test helper to use KeyBinder.parseKeyPattern.
2011-12-30 13:19:41 -06:00
Nathan Sobo
5273cb0638
Add $.fn.bindKey, which works on any jquery-wrapped element.
...
If given a string as an action, it attempts to call a method by that name on the element's view object. If given a function, it calls it directly.
2011-12-30 12:33:55 -06:00
Corey Johnson & Nathan Sobo
e4d73ace25
Bound up / down keys to moveUp / moveDown in fileFinder
2011-12-29 17:38:08 -08:00
Nathan Sobo
a7aa1d2b75
Add jasmine jquery matchers.
2011-12-27 17:42:29 -06:00
Nathan Sobo
ae4fdf8812
Add Native.resetMainMenu and call it in global afterEach
...
This method removes any AtomMenuItems that aren't marked as 'global'. It ignores menu items that aren't instances of our custom subclass. This is needed by specs to clear any menu items added during tests. It will also be needed when a window loses focus and we want to remove any non-global menus associated with the window.
2011-12-23 12:43:32 -06:00
Corey Johnson
2d6ddcedfd
Add window.bindKey which matches a pattern to an action.
2011-12-22 16:24:09 -08:00
Corey Johnson
5ec94fc28c
Triggers the event created with window.keydown.
2011-12-19 12:58:35 -08:00
Nathan Sobo
7dcb00f0ec
When saving buffer with no url, pop up 'save as' dialog.
...
Remove a lot of old code.
2011-12-16 16:31:02 -08:00
Nathan Sobo
c75c3555bb
Meta+s triggers save on Editor.
...
Still can't save buffers that don't have a url.
2011-12-16 16:30:51 -08:00