Skip to content

Commit

Permalink
Version 1.3
Browse files Browse the repository at this point in the history
	* Added option cssClass, easier to allow different styling for different modals
  • Loading branch information
kunambi committed Oct 10, 2012
1 parent d21e2d9 commit aedb34a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
5 changes: 5 additions & 0 deletions README
Expand Up @@ -42,6 +42,7 @@ Options
fixed: (boolean) Does the popin have a fixed position? If yes, it will follow the user when scrolling | default: false
src: (string) Path to the resource you want to display | default: "about:blank"
duration: (integer) How long should the transitions take? In milliseconds. | default: 250
cssClass: (string) If you want to supply an additional css-class to the <section> | default: ""
css: (object) Some default CSS class-/id-names that are used. Change these if they're conflicting with your webpage
onShow: Triggers callback when the user opens popin
onLoad: Triggers callback when the request has loaded
Expand All @@ -61,6 +62,10 @@ The following methods are availible publicly:

Version history
-----------------
Version 1.3

* Added option cssClass, easier to allow different styling for different modals

Version 1.2

* Fixed bug with position fixed/absolute. Moved the section-layer outside the overlay
Expand Down
5 changes: 5 additions & 0 deletions README.md
Expand Up @@ -42,6 +42,7 @@ Options
fixed: (boolean) Does the popin have a fixed position? If yes, it will follow the user when scrolling | default: false
src: (string) Path to the resource you want to display | default: "about:blank"
duration: (integer) How long should the transitions take? In milliseconds. | default: 250
cssClass: (string) If you want to supply an additional css-class to the <section> | default: ""
css: (object) Some default CSS class-/id-names that are used. Change these if they're conflicting with your webpage
onShow: Triggers callback when the user opens popin
onLoad: Triggers callback when the request has loaded
Expand All @@ -61,6 +62,10 @@ The following methods are availible publicly:

Version history
-----------------
Version 1.3

* Added option cssClass, easier to allow different styling for different modals

Version 1.2

* Fixed bug with position fixed/absolute. Moved the section-layer outside the overlay
Expand Down
6 changes: 4 additions & 2 deletions Source/MooryPopins.js
Expand Up @@ -35,6 +35,7 @@ var MooryPopins = new Class({
@since 1.1
* */
framename: "uniquemoorypopinname",
cssClass: "",
css: {
id: "overlay-popin",
cu: "ease",
Expand Down Expand Up @@ -88,8 +89,9 @@ var MooryPopins = new Class({
*/
_setup: function() {
document.body.addClass(this.options.css.lo);
this.section = new Element("section." + this.options.css.pr, {
styles: {
this.section = new Element("section", {
"class": this.options.cssClass + " " + this.options.css.pr,
"styles": {
"position": this.options.fixed?"fixed":"absolute",
"top": this.options.fixed?0:window.getScroll().y
}
Expand Down
2 changes: 1 addition & 1 deletion package.yml
Expand Up @@ -2,6 +2,6 @@ name: MooryPopins
author: kunambi
category: Widgets
tags: [widget, popin, modal, iframe]
current: v1.2
current: v1.3
copyright: "Thomas Kunambi, 23 Critters"
description: Moory Popins is a nifty widget, written in MooTools framework, that allows you to show popin (modal) windows within a web page. Browsers that doesn't support CSS Transitions will utilize Javascript fading instead. Settings currently allow you to show the information in an Iframe or if you want the popin in a fixed position (follows the user when scrolling)

0 comments on commit aedb34a

Please sign in to comment.