Commit Graph

4395 Commits

Author SHA1 Message Date
Emily Stark
2b87aa1f00 Do feature detection instead of browser detection for ui test.
The previous `isIE()` check returned false for IE11.
2014-06-22 16:31:13 -07:00
Emily Stark
69455d4df7 Use _.toArray to make IE8 happy 2014-06-22 08:27:42 -07:00
Emily Stark
7b1cddad0c Merge branch 'fix-ui-hooks-nested-domranges' into release-0.8.2 2014-06-20 17:10:32 -07:00
Emily Stark
abd92999a4 Meteor.user()._id -> Meteor.userId() 2014-06-20 16:44:12 -07:00
Emily Stark
367516a966 Replace accidentally deleted comment line 2014-06-20 16:22:38 -07:00
Emily Stark
ea231729de Revert "Add a changePassword test"
This reverts commit 7e519e11b7.

This commit added a test that upgraded from srp to bcrypt via
changePassword for a user with only an email address, in addition to the
test that existed for a user with a username. Having two such tests is
now silly because Meteor.changePassword no longer has different code
paths for email/username users.
2014-06-20 16:22:38 -07:00
Emily Stark
76cfdd44a6 Use id as user selector instead of username or email 2014-06-20 16:22:38 -07:00
Emily Stark
924f51a0ed Add a changePassword test 2014-06-20 16:22:38 -07:00
Emily Stark
84774800b8 Add a comment 2014-06-20 16:22:38 -07:00
Emily Stark
137129b358 Upgrade from SRP to bcrypt on password change 2014-06-20 16:22:38 -07:00
Matthew Arbesfeld
42b0cad48f Allow styles to not have a trailing semicolon. Fix cannonicalize_html to
remove trailing semicolons from styles.
2014-06-20 14:06:37 -07:00
Matthew Arbesfeld
02c0c4de68 IE8 fix for StyleAttrHandler. 2014-06-20 13:28:23 -07:00
David Greenspan
085441524f Separate element removal and “teardown”
DomRange now never removes elements except through the removeElement UI hook.  If you write a hook that prevents removal, teardown still happens (e.g. templates stop updating).

This code also provides the basis for stopping updates to part of the DOM by triggering teardown without removal.

Before, DomBackend.removeElement would both trigger teardown and actually deparent the element.  Now we have DomBackend.tearDownElement, which just triggers the jQuery teardown (which in turn triggers finalization of DomRanges that have been inserted in the DOM tree).

The flag to {node,members,range}Removed is now named “alreadyTornDown” and documented.  Its purpose is to prevent redundant teardown walks through the DOM.
2014-06-20 12:34:23 -07:00
David Greenspan
4ec9cb5847 Prevent a test from leaving a DIV behind 2014-06-20 12:08:08 -07:00
Emily Stark
80ee5c19ee Add comment to findHelperHostComponent 2014-06-19 09:40:28 -07:00
Emily Stark
dc2b03aee6 Tentative maybe fix for UI hooks on nested domranges. 2014-06-18 17:03:46 -07:00
Emily Stark
86aeec461a Fix canonicalizeHtml regexes.
Allows empty, quoted attributes (e.g. <div foo="">)
2014-06-17 22:32:21 -07:00
Emily Stark
7d9c1da444 Fix removeNode indentation 2014-06-17 21:09:14 -07:00
Emily Stark
b84c7662f3 Fix UI._templateInstance() to look at surrounding template.
Previously we were using the current component to retrieve the template
instance, but what we actually want is the template instance of the
surrounding component that is a template.
2014-06-17 16:58:54 -07:00
Matthew Arbesfeld
6b48630160 Adds UI._parentData(n) method in template helpers.
This method returns the parent data context which surrounds the
helper call. This mirrors the effect of {{..}} in Spacebars. So
UI._parentData(2) is equivalent to {{../..}}.
2014-06-17 14:02:17 -07:00
Emily Stark
566302f1cb Export the number of bcrypt rounds and checkPassword 2014-06-14 14:23:08 -07:00
Emily Stark
dd034b3f0b Maintain old behavior of plaintext password handler.
This is for backwards compatibility with old standalone DDP clients
(like the Meteor command line tool). Note that we are not maintaining
back-compat with old standalone DDP clients that implemented SRP.
2014-06-13 09:44:29 -07:00
Emily Stark
a6ecfb3825 Use $.trim in StyleHandler when String.trim isn't available.
(Safari 4)
2014-06-12 20:24:20 -07:00
Matthew Arbesfeld
961965a7c5 fix merge 2014-06-12 20:24:20 -07:00
Matthew Arbesfeld
4f20802cf9 Fix test expectations 2014-06-12 20:24:20 -07:00
Emily Stark
15804badf4 Remove forgotten debugging argument 2014-06-12 20:24:19 -07:00
Emily Stark
0950952c26 partial fix to ui reactive attributes style diffing test
It's failing in IE10, maybe other IEs also
2014-06-12 20:24:19 -07:00
Emily Stark
8b9a61b39c Use 'protocol' property to detect javascript: URLs.
This strategy works in Safari 4, unlike what we were doing previously.
2014-06-11 15:13:27 -07:00
Emily Stark
81dbf20ea3 Ensure that user fields exist before setting them.
Follow-up to 4acfc5c6f
2014-06-11 10:11:20 -07:00
Maxime Quandalle
f65451e196 Upgrade Stylus from 0.42.3 to 0.46.3 2014-06-10 17:28:17 -07:00
Frederico Carvalho
4acfc5c6ff before passing 'user' to email template functions, update with new token information 2014-06-10 16:59:51 -07:00
Emily Stark
05bfdc297e Merge branch 'pr/2183' into devel 2014-06-10 15:17:24 -07:00
David Greenspan
832f3bab02 Test the interpretation of event map selectors
If you listen on “div p”, for example, both the div and the p have to be in the template.
2014-06-10 14:51:58 -07:00
Matthew Arbesfeld
c346568cef Update StyleAttributeHandler to prevent conflicts in css styles. This fix will ensure that Blaze and external javascript cannot both set the same property on an element. If both Blaze and external javascript modify the same property, then the most recent modification will win. 2014-06-10 11:33:33 -07:00
Matthew Arbesfeld
5ab3fbc17e Allow external CSS style attributes to interop with Blaze style attributes. This fixes cases where jQuery calls .hide() or .show() on an element which also has a Blaze defined dynamic attribute. 2014-06-10 11:05:43 -07:00
Cangit
dbca6908f3 Don't decrement the line number in LESS error reporting.
LESS fixed their math problem in 1.6.0
2014-06-10 09:45:03 -07:00
Emily Stark
d61a676ac3 Extract number of bcrypt rounds to top of file 2014-06-09 20:43:40 -07:00
Emily Stark
e1669f464c Remove 'plaintextPassword'.
'password' can always be either a string or an object (indicating that
it's been hashed already with something). When the server receives a
string, it hashes it with SHA256 before bcrypt.
2014-06-09 20:42:49 -07:00
Emily Stark
55cecde404 Make an error message nicer 2014-06-09 20:42:49 -07:00
Emily Stark
254075587c Nick code review items (mostly comments) 2014-06-09 20:42:49 -07:00
Andrew Wilcox
338ede1266 code review II 2014-06-09 20:42:49 -07:00
Andrew Wilcox
ef697a6fa7 code review items 2014-06-09 20:42:49 -07:00
Andrew Wilcox
644dde0382 account data is no longer used for the srp challenge 2014-06-09 20:42:48 -07:00
Andrew Wilcox
b567046300 Migrate from SRP to bcrypt.
See the spec https://meteor.hackpad.com/SRP-bcrypt-J5mdBojeVfe for
details.
2014-06-09 20:42:48 -07:00
Emily Stark
f6cb154770 Make sure autoruns for {{#with}} get cleaned up.
Related to #2145, #2023, #2031.
2014-06-09 19:13:23 -07:00
Avital Oliver
6aba501e46 Fix ui hooks tests on IE 2014-06-09 18:10:02 -07:00
Andrew Mao
e2ac94b89d Check for localStorage, catching exceptions - fixes #1291, fixes #1688.
Accessing `window.localStorage` can immediately throw an exception, which needs to be caught.
For more information, see http://www.w3.org/TR/webstorage/#dom-localstorage.
2014-06-09 15:53:17 -07:00
Emily Stark
65b1eadf53 Tweak UI._templateInstance error message 2014-06-05 18:31:20 -07:00
Emily Stark
5f0067c4f8 Make UI._templateInstance throw when not in helper. 2014-06-05 18:20:51 -07:00
Avital Oliver
e3cfccb206 Stop not updating form controls if they're focused
On Blaze, we copied functionality we had on Spark: Don't update
form controls (INPUT, TEXTAREA) if they are focused and their underlying
value reactively updates. This was never meant to be the eventual
solution -- we'd eventually have a way to define strategies for two-way
data binding. Maybe you'd be able to define a callback that notifies
the app when a change happens to a field that hasn't been saved yet.

Moreover, not only is the feature incomplete, but with Blaze it works
much more poorly than in Spark. Due to fine-grained updates, users
his this more frequently and don't seem to like the behavior
(in Spark you would only hit this behavior if you set up your
preserve rules exactly right, which many users did not do).

So, we're just ripping out this functionality. Now if a field gets
edited by some other user while you're focused it will just lose its
value. Focus will remain.

Fixes #1965
2014-06-05 18:14:25 -07:00