Commit Graph

20 Commits

Author SHA1 Message Date
Bryan Bess
4d1fa1ba75 Remove unused import and add missing semicolons 2015-09-30 20:55:35 -05:00
Zeno Rocha
aeec3fd520 Source formatting #19 2015-09-29 22:28:15 -07:00
Mauricio Soares
4534fc4ca0 Adds test for browserify
This commit adds tests to make sure that the browserify bundle will work in the dist file of clipboard.js

This commit adds the mocha and chai modules, since karma doesn't work well with node only tests.

Also splited tests tasks in package.json and updated .gitignore
2015-09-29 22:16:32 -07:00
Zeno Rocha
a5e29bd420 Removes code from #constructor to separate functions 2015-09-29 22:14:26 -07:00
Jory Graham
d66aab1124 Default options for ClipboardAction too 2015-09-29 20:23:05 -04:00
Jory Graham
902c730a4d Use undefined for default parameters 2015-09-29 20:09:17 -04:00
Zeno Rocha
1f61e16eb5 Fails silently in favor of speed 2015-09-28 21:59:18 -07:00
Eduardo Lundgren
b842987292 Adds support to set action/target/text via function 2015-09-29 01:15:21 -03:00
Eduardo Lundgren
beab7bc087 Changes target to support selector instead of id 2015-09-28 23:37:58 -03:00
Mauricio Soares
157b0fb5a2 Rename data-attributes to prefix "clipboard"
This PR renames all the data-attributes for data-clipboard-X, this is due the possibility of conflict with projects that already uses these data-attributes.
2015-09-28 14:06:22 -03:00
Zeno Rocha
b0e118f750 Improves test coverage 2015-09-27 11:53:52 -07:00
Zeno Rocha
1acd23049e Asserts error messages on tests 2015-09-26 09:26:54 -07:00
Zeno Rocha
abeee82bdc Throws error if either data-target or data-text were passed and throws error if neither data-target nor data-text were passed too 2015-09-26 09:25:15 -07:00
Zeno Rocha
bb60a866b2 Fixes tests 2015-09-26 07:32:27 -07:00
Zeno Rocha
ced945f11a Replaces every single event listener in favor of event delegation 2015-09-24 17:02:33 -07:00
Zeno Rocha
1febe4eecc Adds karma test suite 2015-09-24 15:11:56 -07:00
Zeno Rocha
f3c042a364 Only fire detailed events if copy was successful 2015-09-21 01:15:01 -07:00
Zeno Rocha
cd7c8bfc27 Adds tests for Clipboard.validate 2015-09-20 15:40:59 -07:00
Zeno Rocha
ec20389775 Adds tests for constructor 2015-09-20 00:57:19 -07:00
Zeno Rocha
bea448d6c5 Includes base test structure 2015-09-20 00:23:33 -07:00