From 9e5aacd02536aa825c00bdb1fbca80fd2c3bf90c Mon Sep 17 00:00:00 2001 From: jlukic Date: Wed, 30 Jul 2014 16:43:03 -0400 Subject: [PATCH] Fix some popup examples --- RELEASE NOTES.md | 1 + server/documents/modules/popup.html.eco | 7 ++++--- src/definitions/modules/popup.js | 10 ++++++---- src/definitions/modules/popup.less | 6 +++++- src/themes/packages/default/modules/popup.variables | 3 ++- 5 files changed, 18 insertions(+), 9 deletions(-) diff --git a/RELEASE NOTES.md b/RELEASE NOTES.md index ddfc5f5d3..dc9a1123e 100755 --- a/RELEASE NOTES.md +++ b/RELEASE NOTES.md @@ -31,6 +31,7 @@ - **List** - List spacing defaults have been adjusted to be more consistent - **Popup** - Popup can now allow itself not to be closed when hovered over - **Popup** - Popup content can now be specified on initialization. +- **Popup** - Positioned popups will now extend in the opposite direction to fit better with floated content - **Rating** - Rating now uses an embedded icon font to maximize compatibility - **Sidebar** - Sidebar now has tall / very tall variations for resizing top/bottom sidebars - **Steps** - Steps can now have icons, descriptions and titles. Step default theme has been modified significantly to be more flexible. diff --git a/server/documents/modules/popup.html.eco b/server/documents/modules/popup.html.eco index 5d78978f7..c1521658c 100755 --- a/server/documents/modules/popup.html.eco +++ b/server/documents/modules/popup.html.eco @@ -41,7 +41,7 @@ themes : ['Default']

Title

A popup can be formatted with a title

- PonyDog22 + PonyDog22
@@ -54,9 +54,10 @@ themes : ['Default']

Size

-

A popup can be large or small

+

A popup can vary in size

+
@@ -202,7 +203,7 @@ themes : ['Default']
$('.test.button') .popup({ - position : 'top right', + position : 'right center', target : '.test.image', title : 'My favorite dog', content : 'My favorite dog would like other dogs as much as themselves' diff --git a/src/definitions/modules/popup.js b/src/definitions/modules/popup.js index 7e204b261..a2a98f1a4 100755 --- a/src/definitions/modules/popup.js +++ b/src/definitions/modules/popup.js @@ -125,9 +125,6 @@ $.fn.popup = function(parameters) { destroy: function() { module.debug('Destroying previous module'); - $window - .off(eventNamespace) - ; $popup .remove() ; @@ -192,6 +189,11 @@ $.fn.popup = function(parameters) { .addClass(variation) .html(html) ; + if(variation) { + $popup + .addClass(variation) + ; + } if(settings.inline) { module.verbose('Inserting popup element inline', $popup); $popup @@ -838,7 +840,7 @@ $.fn.popup.settings = { onShow : function(){}, onHide : function(){}, - variation : '', + variation : false, content : false, html : false, title : false, diff --git a/src/definitions/modules/popup.less b/src/definitions/modules/popup.less index a0b7955f5..547eb6155 100755 --- a/src/definitions/modules/popup.less +++ b/src/definitions/modules/popup.less @@ -231,8 +231,12 @@ .ui.popup { font-size: @medium; } -.ui.large.poup { +.ui.large.popup { font-size: @large; } +.ui.huge.popup { + font-size: @huge; +} + .loadUIOverrides(); diff --git a/src/themes/packages/default/modules/popup.variables b/src/themes/packages/default/modules/popup.variables index c1c93b25a..4629facd5 100644 --- a/src/themes/packages/default/modules/popup.variables +++ b/src/themes/packages/default/modules/popup.variables @@ -80,4 +80,5 @@ /* Sizes */ @small: 0.8rem; @medium: 0.875rem; -@large: 1rem; \ No newline at end of file +@large: 1rem; +@huge: 1.1rem; \ No newline at end of file