Browse Source

#2308, Fix issue with metadata caching prop values

pull/2330/head
jlukic 9 years ago
parent
commit
be5ec6394b
2 changed files with 21 additions and 4 deletions
  1. 1
      RELEASE-NOTES.md
  2. 24
      src/definitions/modules/popup.js

1
RELEASE-NOTES.md

@ -97,6 +97,7 @@
- **Menu** - Vertical dropdown menus are no longer 100% `min-width`
- **Modal** - Modal `onApprove` and `onDeny` now receive the activating element as the first parameter. Added documentation about using `return false` to avoid hiding element on click.
- **Modal** - Modal content now uses flex, image content now requires `image content` class on parent to allow for flex stylings.
- **Popup** - `onShow` and `onHide` callback can now cancel popup from showing or hiding by returning false
- **Popup** - Added more size variations for popup `mini`, `tiny`
- **Progress** - `indicating` labels now are more legible use separate css variables from `indicating` bar color
- **Reveal** - Added new `active` state that allows you to show `reveal` programatically

24
src/definitions/modules/popup.js

@ -125,6 +125,14 @@ $.fn.popup = function(parameters) {
}
},
refreshData: function() {
module.verbose('Refreshing metadata attributes');
$module.removeData(metadata.html);
$module.removeData(metadata.title);
$module.removeData(metadata.content);
$module.removeData(metadata.variation);
},
reposition: function() {
module.refresh();
module.set.position();
@ -176,11 +184,19 @@ $.fn.popup = function(parameters) {
// generates popup html from metadata
create: function() {
var
html = $module.data(metadata.html) || settings.html,
variation = $module.data(metadata.variation) || settings.variation,
title = $module.data(metadata.title) || settings.title,
content = $module.data(metadata.content) || $module.attr('title') || settings.content
html,
variation,
title,
content
;
module.refreshData();
html = $module.data(metadata.html) || settings.html;
variation = $module.data(metadata.variation) || settings.variation;
title = $module.data(metadata.title) || settings.title;
content = $module.data(metadata.content) || $module.attr('title') || settings.content;
if(html || content || title) {
module.debug('Creating pop-up html');
if(!html) {

Loading…
Cancel
Save