Browse Source

Merge branch 'master' of github.com:Semantic-Org/Semantic-UI

pull/470/merge
jlukic 11 years ago
parent
commit
fe251294e0
3 changed files with 49 additions and 5 deletions
  1. 10
      README.md
  2. 25
      src/modules/popup.js
  3. 19
      src/modules/transition.js

10
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.

25
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(){};

19
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() {

Loading…
Cancel
Save