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

Develop #60

Merged
merged 33 commits into from
Jul 25, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
8d7e402
Set up basis for github pages
pzi May 5, 2016
2d51803
Add new gulp task to copy minified source into demo folder
pzi May 5, 2016
dce3cf3
Fix asset paths in default layout
pzi May 5, 2016
3fba65f
Add npm script to deploy to gh-pages
pzi May 5, 2016
5ccee23
Remove unused page layout
pzi May 5, 2016
70ec40d
Add inline-attribute-configuration example
pzi May 5, 2016
28d9d85
Add inline content example
pzi May 5, 2016
2df8b9e
Add fullscreen mode example
pzi May 5, 2016
a9f24ad
Add ajax example
pzi May 5, 2016
a1d0c79
Add single image modal example
pzi May 5, 2016
bd6dcd4
Add image gallery example
pzi May 5, 2016
7a05c0a
Add video example
pzi May 5, 2016
5c652fc
Add iframe example
pzi May 5, 2016
28973e9
Add confirmation modaal example
pzi May 5, 2016
816e1e7
Add instagram example
pzi May 5, 2016
22d18e8
Replaced php ajax content with basic html content
pzi May 5, 2016
89038c9
Consistent code example indenting
pzi May 5, 2016
3f1f2a7
Remove unused id from index frontmatter
pzi May 5, 2016
cdde6d2
Remove modaal-logo.php
pzi May 5, 2016
d83cc67
Add .gitattributes to ensure line endings are normalized
pzi May 5, 2016
c6f2ab2
Exchange npm script with gulp task to deploy gh-pages
pzi May 6, 2016
79e008c
Uncomment Google Analytics
pzi May 7, 2016
e98672b
Update demo js/css
pzi Jun 3, 2016
d898598
Remove use of jekyll and use static HTML page
pzi Jun 3, 2016
3603bdd
Update demo js/css with v0.3.0 source
pzi Jun 21, 2016
5db0d00
Added method to determine whether to open the modal #53 and added can…
danb-humaan Jul 7, 2016
acce911
Gallery updates to conincide with issues #44 and #48
danhumaan Jul 25, 2016
b358e8f
Merge branch 'develop' of github.com:humaan/Modaal into develop
danhumaan Jul 25, 2016
e146d65
asset updates ready for v0.3.1 release
danhumaan Jul 25, 2016
5a651ff
Testing repo changes from pzi for PR #31
danhumaan Jul 25, 2016
1afbe7a
Merge branch 'pzi-modaal-gh-pages' into develop
danhumaan Jul 25, 2016
868c04f
Enhancement for task #41 - Close localisation options
danhumaan Jul 25, 2016
68481cd
updated modal to Modaal to be consistent
danhumaan Jul 25, 2016
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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<img src="http://www.humaan.com/modaal/demo/social-share-modaal.png" />
<img src="http://humaan.com/modaal/demo/social-share-modaal.png" />

***

- Version 0.3.0
- Version 0.3.1
- Requires jQuery 1.11.2. v2+ not tested
- Built by [Humaan](http://www.humaan.com)

Expand Down Expand Up @@ -66,15 +66,18 @@ animation|`string`|`fade`|`fade`, `none`|
animation_speed|`integer`|`300`||Animation speed is the duration it takes to reveal the Modaal window once triggered. It's important to note, that if you change this, you must also change the `after_callback_delay` below so that callback events sync up. This will be overwritten and set to `0` if `type` is `none`.
after_callback_delay|`integer`|`350`||Specify a delay value for the after open callbacks. This is necessary because with the bundled animations have a set duration in the bundled CSS. Specify a delay of the same amount as the animation duration in so more accurately fire the after open/close callbacks. Defaults 350, does not apply if animation is 'none', after open callbacks are dispatched immediately
is_locked|`boolean`|`false`|`true`<br /> `false`|Set this to `true` to disable closing the modal via keypress or by clicking the close or background. Beware that if `type` is `confirm` there will be no interface to dismiss the modal. If `is_locked` is `true`, you'd have to programmatically arrange to dismiss the modal. Confirm modals are always locked regardless of this option.
hide_close|`boolean`|`false`|`true`<br /> `false`|Set this to true to hide the close modal button. Key press and overlay click will still close the modal. This method is best used when you want to put a custom close button inside the modal container space.
hide_close|`boolean`|`false`|`true`<br /> `false`|Set this to `true` to hide the close modal button. Key press and overlay click will still close the modal. This method is best used when you want to put a custom close button inside the modal container space.
background|`string`|`#000`||Sets the background overlay color
overlay_opacity|`float`|`0.8`||Sets the background overlay transparency
overlay_close|`boolean`|`true`|`true`<br /> `false`|Controls whether the overlay background can be clicked to close.
accessible_title|`string`|`Dialog Window`||Set the `aria-label` attribute value used for Accessibility purposes.
start_open|`boolean`|`false`|`true`<br /> `false`|Set this to `true` if you want the Modaal window to launch immediately on load.
fullscreen|`boolean`|`false`|`true`<br /> `false`|Set this to true to make the modaal fill the entire screen, false will default to own width/height attributes.
fullscreen|`boolean`|`false`|`true`<br /> `false`|Set this to `true` to make the Modaal fill the entire screen, false will default to own width/height attributes.
custom_class|`string`|`''`||Fill in this string with a custom class that will be applied to the outer most modal wrapper.
background_scroll|`boolean`|`false`|`true`<br /> `false`|Set this to true to enable the page to scroll behind the open modaal
background_scroll|`boolean`|`false`|`true`<br /> `false`|Set this to` true` to enable the page to scroll behind the open modal
should_open|`boolean`<br />`function`|`true`||Set to `false` or make the closure return `false` to prevent the modal from opening
close_text|`string`|`Close`||String for close button text. Available for localisation and alternative languages to be used.
close_aria_label|`string`|`Close (Press escape to close)`||String for close button aria-label attribute (value that screen readers will read out). Available for localisation and alternative languages to be used.
width|`integer`|null||Set the desired width of the modal.
height|`integer`|null||Set the desired height of the modal.
gallery_active_class|`string`|`gallery_active_item`|| Active class applied to the currently active image or image slide in a gallery
Expand All @@ -83,12 +86,12 @@ confirm_cancel_button_text|`string`|`Cancel`||Text on the confirm modal cancel b
confirm_title|`string`|`Confirm Title`||Title for confirm modal. Default
confirm_content|`string`|`<p>This is the default confirm dialog content. Replace me through the options</p>`||HTML content for confirm message
loading_content|`string`|`Loading &hellip;`||HTML content for loading message.
loading_class|`string`|`is_loading`||Class name to be applied while content is loaded via ajax.
loading_class|`string`|`is_loading`||Class name to be applied while content is loaded via AJAX.
ajax_error_class|`string`|`modaal-error`||Class name to be applied when content has failed to load. Default is ''
instagram_id|`string`|`null`||Unique photo ID for an Instagram photo.

#### 2.3. Inline Attribute Configuration
Modaal has been developed to support common jQuery configuration options, but in an effort to extend functionality and widen it's usage we've developed support for inline `data-option-name` attribute support.
Modaal has been developed to support common jQuery configuration options, but in an effort to extend functionality and widen its usage we've developed support for inline `data-option-name` attribute support.

To enable this, the Modaal trigger link must have a class of `modaal`, then you can add attributes to the link as needed like so:

Expand All @@ -108,7 +111,8 @@ before_close|`modal_wrapper`|Executed once the Modaal has been instructed to clo
after_close||Executed once the the duration for `after_callback_delay` has expired after the close method is called.
before_image_change|`current_item`<br /> `incoming_item`|Executed before the image changes in a gallery Modaal.
after_image_change|`current_item`| Executed after the image has changed in a gallery Modaal.
confirm_callback|`lastFocus`|Executed when the confirm button is pressed as opposed to cancel
confirm_callback|`lastFocus`|Executed when the confirm button is pressed as opposed to cancel.
confirm_cancel_callback|`lastFocus`|Executed when the cancel button is pressed as opposed to confirm.
source||Callback function executed on the default source, it is intended to transform the source (href in an AJAX modal or iframe). The function passes in the triggering element as well as the default source depending of the modal type. The default output of the function is an untransformed default source.
ajax_success|`target`|Callback for when AJAX content is loaded in

Expand Down
3 changes: 1 addition & 2 deletions demo/ajax-content.php → demo/ajax-content.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<? sleep(2) ?>
<p>Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Aenean lacinia bibendum nulla sed consectetur. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
<p>Aenean eu leo quam. <a href="#">Pellentesque ornare</a> sem lacinia quam venenatis vestibulum. Donec id elit non mi porta gravida at eget metus. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Nullam id dolor id nibh ultricies vehicula ut id elit. Maecenas faucibus mollis interdum. Cras mattis consectetur purus sit amet fermentum.</p>
<p>Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Etiam porta sem malesuada magna mollis euismod. Vestibulum id ligula porta felis euismod semper. Vestibulum id ligula porta felis euismod semper. Donec sed odio dui.</p>
<p>Natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Cras mattis consectetur purus sit amet fermentum.</p>
<p>Natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Cras mattis consectetur purus sit amet fermentum.</p>
Loading