From aedb34a40651947f7a24aed03738a5370c099d06 Mon Sep 17 00:00:00 2001 From: Thomas Kunambi Date: Wed, 10 Oct 2012 11:28:31 +0200 Subject: [PATCH] Version 1.3 * Added option cssClass, easier to allow different styling for different modals --- README | 5 +++++ README.md | 5 +++++ Source/MooryPopins.js | 6 ++++-- package.yml | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/README b/README index ce09b5e..8207df6 100644 --- a/README +++ b/README @@ -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
| 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 @@ -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 diff --git a/README.md b/README.md index ce09b5e..8207df6 100644 --- a/README.md +++ b/README.md @@ -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
| 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 @@ -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 diff --git a/Source/MooryPopins.js b/Source/MooryPopins.js index 0bfd4b3..4e3d787 100644 --- a/Source/MooryPopins.js +++ b/Source/MooryPopins.js @@ -35,6 +35,7 @@ var MooryPopins = new Class({ @since 1.1 * */ framename: "uniquemoorypopinname", + cssClass: "", css: { id: "overlay-popin", cu: "ease", @@ -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 } diff --git a/package.yml b/package.yml index 56acb12..e8a3827 100644 --- a/package.yml +++ b/package.yml @@ -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)