Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metal issues #8 #1

Closed
wants to merge 83 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
508b70d
Splits karma coverage config into a separate file
mairatma Jun 17, 2015
9eb0a72
Renames namespace to be "crystal" instead of "alloy"
mairatma Jun 17, 2015
746c344
Removes reference to alloy on README.md
mairatma Jun 17, 2015
f04e27f
Update bower.json
eduardolundgren Jun 17, 2015
2b40fb4
Changes bower.json to point to master branches for metal dependencies…
mairatma Jun 18, 2015
2cb3b91
Updates soy template to stop using deltemplates
mairatma Jul 13, 2015
8628f0f
Adds "component" class to soy template
mairatma Jul 14, 2015
cf411f0
Updates compiled soy file
mairatma Jul 14, 2015
7a106e9
Makes elementClasses param optional
mairatma Jul 23, 2015
0908808
Adds test for not passing elementClasses to soy call
mairatma Jul 23, 2015
9ca3182
Adds setup instructions to README.md
mairatma Aug 3, 2015
d5ee8d8
Add escape key functionality to close the Modal
Aug 4, 2015
ba031d6
Rename hideOnEsc attribute to hideOnEscape
Aug 4, 2015
c4e3b62
Updates dependencies
mairatma Sep 1, 2015
15f5e8a
Adds feature for auto focusing elements inside the modal
mairatma Sep 3, 2015
f2e9310
Adds feature for shifting focus back to last active element when moda…
mairatma Sep 3, 2015
3e2b829
Adds "role" and "aria-labelledby" attributes for accessibility
mairatma Sep 3, 2015
0eb9518
Restricts focus to elements inside the modal while it's visible
mairatma Sep 3, 2015
49f35f2
Improves demos for mobile phones
mairatma Sep 4, 2015
b86a7ac
Adds clean up for tests that were adding elements to the document
mairatma Sep 10, 2015
239c27c
Adds clean up for more tests adding elements to the document
mairatma Sep 10, 2015
800e352
Fixes documentation to fit the standard
mairatma Sep 11, 2015
1c7b783
Updates version of gulp-metal
mairatma Sep 16, 2015
a03917a
Makes the `role` param optional for soy
mairatma Sep 16, 2015
5e63c59
Converts Modal.js to the new version of Metal.js
mairatma Nov 4, 2015
46a07b6
Fixes AMD demo to work with babel 6 compiled code
mairatma Nov 24, 2015
ad40c15
Updates code to work with new version of gulp-metal
mairatma Nov 25, 2015
59c8bad
Updates gulp-metal and removes now unnecessary karma.conf files
mairatma Nov 26, 2015
59f7102
Adds missing license file
mairatma Nov 27, 2015
34ae7f3
Adds isHtml property to html attributes
mairatma Nov 30, 2015
361ab05
Renames crystal to metal
mairatma Dec 14, 2015
d5e5a09
Renames "content" template to "render"
mairatma Dec 29, 2015
b75ac73
Replaces "bower:" prefix with "npm:"
mairatma Jan 25, 2016
50c2351
Adds supported npm version to package.json
mairatma Jan 26, 2016
34501a9
Removes bower.json
mairatma Jan 26, 2016
018568e
Removes unnecessary "github:" prefix from dependency on package.json
mairatma Jan 26, 2016
c16dcce
Includes only src and test files on package.json
mairatma Jan 26, 2016
8140c78
Removes "npm:" prefix
mairatma Jan 27, 2016
5556d16
Includes all files from src and test in package.json
mairatma Jan 27, 2016
77a380d
Starts using the new Metal.js modules
mairatma Feb 10, 2016
e59b3c6
Fixes tests due to changes on dependencies
mairatma Feb 17, 2016
a744802
Prepares dependencies so metal-modal can be published for the first time
mairatma Mar 9, 2016
28ff180
1.0.0-rc
mairatma Mar 9, 2016
3146b07
Updates metal-modal to use incremental dom
mairatma Mar 18, 2016
9e84e65
Stops dirtying the body on tests
mairatma Mar 23, 2016
5d9bfe3
Removes unused id param
mairatma Mar 29, 2016
36732b0
Fixes tests to use previously rendered element
mairatma Mar 30, 2016
373d80c
Replaces "decorate" call with "render"
mairatma Mar 31, 2016
d12ae13
Updates dependencies
mairatma Apr 1, 2016
b25568c
1.0.0-rc.1
mairatma Apr 1, 2016
acd180b
Updates code to stop using "render" function
mairatma Apr 7, 2016
81c5123
Fixes bug where changing the modal element would not refocus correct …
mairatma Apr 7, 2016
8d8396d
1.0.0-rc.2
mairatma Apr 7, 2016
e5858e4
Cleans up unused element from test
mairatma Apr 7, 2016
5fb058e
1.0.0-rc.3
mairatma Apr 7, 2016
8488cbc
Removes unnecessary isHtml state configuration
mairatma Apr 8, 2016
e9610f8
Adds option for removing the close button
mairatma May 16, 2016
d1db57a
1.0.0-rc.4
mairatma May 16, 2016
dbaf7b8
Replaces "data-on[eventname]" with "on[EventName]"
mairatma Jun 10, 2016
10ff52e
1.0.0-rc.5
mairatma Jun 16, 2016
15079a5
Revert "Replaces "data-on[eventname]" with "on[EventName]""
mairatma Jun 16, 2016
dcf7706
1.0.0-rc.6
mairatma Jun 16, 2016
d089e0a
Removes compiled soy files from repo
mairatma Jun 20, 2016
7e63a4f
Precompiles code to commonjs before publishing
mairatma Jun 20, 2016
2a7494a
Adds ".js" extension to soy import to avoid conflicts
mairatma Jun 20, 2016
f328ae1
1.0.0-rc.7
mairatma Jun 20, 2016
5df3883
Ignores "lib" files
mairatma Jun 20, 2016
ab87097
Adds "jsnext:main" field to package.json
mairatma Jun 27, 2016
53ec122
1.0.0-rc.8
mairatma Jun 29, 2016
a3c9b60
Upgrades metal dependencies to v1.0.0
mairatma Jul 5, 2016
633f731
1.0.0
mairatma Jul 5, 2016
990042a
Adds missing bootstrap dependency
mairatma Jul 5, 2016
0d1650f
Updates code to use version 2.0.0 of Metal.js
mairatma Jul 22, 2016
19ea41f
2.0.0
mairatma Jul 22, 2016
b156597
Adds more aria attributes to improve screen reader accessibility
mairatma Aug 12, 2016
ef28aab
2.0.1
mairatma Aug 12, 2016
3182123
Allows passing body/header/footer as strings via soy
mairatma Aug 12, 2016
93ca183
2.0.2
mairatma Sep 15, 2016
52c4cc5
Adds "display: none" to modal when not visible - Fixes #6
mairatma Sep 20, 2016
2d2abd0
2.0.3
mairatma Sep 20, 2016
6ffc6a7
Allow Modal to scroll when it extends past the body
bjohnson7 Jan 7, 2017
3a48443
Test scroll functionality
bjohnson7 Jan 10, 2017
79e3928
Formatting
bjohnson7 Jan 10, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adds test for not passing elementClasses to soy call
  • Loading branch information
mairatma committed Jul 23, 2015
commit 090880872e87881ee04aa66cde182f79770ca677
2 changes: 1 addition & 1 deletion src/Modal.soy
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
* @param? elementClasses
*/
{template .content}
<div id="{$id}" class="modal component {$elementClasses}">
<div id="{$id}" class="modal component{$elementClasses ? ' ' + $elementClasses : ''}">
<div class="modal-dialog">
<div class="modal-content">
{call .header data="all" /}
2 changes: 1 addition & 1 deletion src/Modal.soy.js
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ if (typeof Templates.Modal == 'undefined') { Templates.Modal = {}; }
* @suppress {checkTypes}
*/
Templates.Modal.content = function(opt_data, opt_ignored, opt_ijData) {
return soydata.VERY_UNSAFE.ordainSanitizedHtml('<div id="' + soy.$$escapeHtmlAttribute(opt_data.id) + '" class="modal component ' + soy.$$escapeHtmlAttribute(opt_data.elementClasses) + '"><div class="modal-dialog"><div class="modal-content">' + Templates.Modal.header(opt_data, null, opt_ijData) + Templates.Modal.body(opt_data, null, opt_ijData) + Templates.Modal.footer(opt_data, null, opt_ijData) + '</div></div></div>');
return soydata.VERY_UNSAFE.ordainSanitizedHtml('<div id="' + soy.$$escapeHtmlAttribute(opt_data.id) + '" class="modal component' + soy.$$escapeHtmlAttribute(opt_data.elementClasses ? ' ' + opt_data.elementClasses : '') + '"><div class="modal-dialog"><div class="modal-content">' + Templates.Modal.header(opt_data, null, opt_ijData) + Templates.Modal.body(opt_data, null, opt_ijData) + Templates.Modal.footer(opt_data, null, opt_ijData) + '</div></div></div>');
};
if (goog.DEBUG) {
Templates.Modal.content.soyTemplateName = 'Templates.Modal.content';
16 changes: 16 additions & 0 deletions test/Modal.js
Original file line number Diff line number Diff line change
@@ -199,6 +199,22 @@ describe('Modal', function() {
assert.ok(!dom.hasClass(modal.element, 'hidden'));
});

it('should handle calling template without passing "elementClasses"', function() {
var markup = ComponentRegistry.Templates.Modal.content({
id: 'modal',
header: 'header',
body: 'body',
footer: 'footer',
overlay: true
}, null);
dom.append(document.body, markup.content);

var element = document.querySelector('#modal');
assert.strictEqual('modal component', element.className);

element.remove();
});

it('should set "visible" attr to false when "hide" method is called', function() {
modal = new Modal().render();
modal.hide();