diff --git a/README.md b/README.md index 678a71869..9b41e4f48 100755 --- a/README.md +++ b/README.md @@ -1,9 +1,17 @@ -# Semantic [![Build Status](https://travis-ci.org/Semantic-Org/Semantic-UI.png)](https://travis-ci.org/Semantic-Org/Semantic-UI) [![Coverage Status](https://coveralls.io/repos/optikfluffel/Semantic-UI/badge.png?branch=coveralls-integration)](https://coveralls.io/r/optikfluffel/Semantic-UI?branch=coveralls-integration) +# Semantic [![Build Status](https://travis-ci.org/Semantic-Org/Semantic-UI.png)](https://travis-ci.org/Semantic-Org/Semantic-UI) Semantic is a UI Component library implemented using a set of specifications designed around natural language Semantic UI is under constant development, so **be sure to check out our [release notes](https://github.com/Semantic-Org/Semantic-UI/blob/master/RELEASE%20NOTES.md) for recent changes**. [![Flattr This](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=jlukic&url=https%3A%2F%2Fgithub.com%2Fjlukic%2FSemantic-UI) + +### Translations +* [中国翻译 Semantic UI](http://semantic.icoolxue.com/) + +We need people who can contribute to translations of Semantic UI's documentation. + +Please [reach out by e-mail](mailto:jack@semantic-ui.com) if you can help. + ### Bugs and Issues > Semantic UI is production ready, but is "pre-release" until build and theming tools are available, and documentation is complete for all components. diff --git a/src/modules/popup.js b/src/modules/popup.js index a609457ef..372aa3b77 100755 --- a/src/modules/popup.js +++ b/src/modules/popup.js @@ -204,6 +204,7 @@ $.fn.popup = function(parameters) { if( !module.exists() ) { module.create(); } + module.save.conditions(); module.set.position(); module.animate.show(callback); }, @@ -214,6 +215,7 @@ $.fn.popup = function(parameters) { $module .removeClass(className.visible) ; + module.restore.conditions(); module.unbind.close(); if( module.is.visible() ) { module.animate.hide(callback); @@ -250,6 +252,29 @@ $.fn.popup = function(parameters) { ; }, + save: { + conditions: function () { + module.cache = { + title: $module.attr('title') + }; + if (module.cache.title) { + $module.attr('title', ''); + } + module.verbose('Saving original attributes', module.cache); + } + }, + restore: { + conditions: function () { + if (module.cache === undefined) { + module.error(error.cache); + return false; + } + if (module.cache.title) { + $module.attr('title', module.cache.title); + } + module.verbose('Restoring original attributes', module.cache); + } + }, animate: { show: function(callback) { callback = callback || function(){}; diff --git a/src/modules/transition.js b/src/modules/transition.js index 4129836fa..e1a2f1d89 100755 --- a/src/modules/transition.js +++ b/src/modules/transition.js @@ -165,9 +165,20 @@ $.fn.transition = function() { $.proxy(settings.complete, this)(); }, - repaint: function(fakeAssignment) { + repaint: function(removeThenAdd) { module.verbose('Forcing repaint event'); - fakeAssignment = element.offsetWidth; + var fakeAssignment = element.offsetWidth; + if (removeThenAdd) { + var parent = $module.parent(); + //element not attached yet. + if (parent.length == 0) + return; + var next = $module.next(); + if (next.length == 0) + $module.detach().appendTo(parent); + else + $module.detach().insertBefore(next); + } }, has: { @@ -250,7 +261,7 @@ $.fn.transition = function() { restore: { conditions: function() { - if(typeof module.cache === undefined) { + if(module.cache === undefined) { module.error(error.cache); return false; } @@ -426,7 +437,7 @@ $.fn.transition = function() { .addClass(className.transition) .addClass(className.visible) ; - module.repaint(); + module.repaint(true/*or better: true only if its IE*/); }, start: function() {