Browse Source

modal fixes

Former-commit-id: 224027841b
Former-commit-id: 56af6df3bf
pull/258/head
jlukic 11 years ago
parent
commit
ed4c1fc550
13 changed files with 65 additions and 26 deletions
  1. 14
      build/minified/modules/modal.js
  2. 14
      build/packaged/modules/modal.js
  3. 2
      build/uncompressed/elements/step.css
  4. 3
      build/uncompressed/modules/modal.css
  5. 14
      build/uncompressed/modules/modal.js
  6. 2
      node/src/documents/modules/modal.html
  7. 4
      node/src/documents/modules/rating.html
  8. 2
      node/src/files/components/semantic/elements/step.css
  9. 3
      node/src/files/components/semantic/modules/modal.css
  10. 14
      node/src/files/components/semantic/modules/modal.js
  11. 2
      node/src/files/stylesheets/semantic.css
  12. 14
      src/modules/modal.js
  13. 3
      src/modules/modal.less

14
build/minified/modules/modal.js

@ -56,10 +56,13 @@ $.fn.modal = function(parameters) {
modal = { modal = {
initialize: function() { initialize: function() {
modal.verbose('Initializing modal');
modal.verbose('Attaching events');
$closeButton $closeButton
.on('click', modal.event.close) .on('click', modal.event.close)
; ;
modal.cache.sizes();
modal.verbose('Creating dimmer');
$context $context
.dimmer({ .dimmer({
closable: settings.closable, closable: settings.closable,
@ -81,12 +84,11 @@ $.fn.modal = function(parameters) {
$dimmer = $context.children(selector.dimmer); $dimmer = $context.children(selector.dimmer);
if( $modal.parent()[0] !== $dimmer[0] ) { if( $modal.parent()[0] !== $dimmer[0] ) {
modal.debug('Moving element inside dimmer', $context); modal.debug('Moving element inside dimmer', $context);
$modal
$modal = $modal
.detach() .detach()
.appendTo($dimmer) .appendTo($dimmer)
; ;
} }
modal.cache.sizes();
modal.instantiate(); modal.instantiate();
}, },
@ -140,6 +142,7 @@ $.fn.modal = function(parameters) {
}, },
show: function() { show: function() {
modal.debug('Showing modal');
modal.set.type(); modal.set.type();
modal.set.position(); modal.set.position();
modal.hideAll(); modal.hideAll();
@ -153,10 +156,12 @@ $.fn.modal = function(parameters) {
.fadeIn(settings.duration, settings.easing, modal.set.active) .fadeIn(settings.duration, settings.easing, modal.set.active)
; ;
} }
modal.debug('Triggering dimmer');
$context.dimmer('show'); $context.dimmer('show');
}, },
hide: function() { hide: function() {
modal.debug('Hiding modal');
// remove keyboard detection // remove keyboard detection
$document $document
.off('keyup.' + namespace) .off('keyup.' + namespace)
@ -209,6 +214,7 @@ $.fn.modal = function(parameters) {
? $(window).height() ? $(window).height()
: $context.height() : $context.height()
}; };
console.log($modal);
modal.debug('Caching modal and container sizes', modal.cache); modal.debug('Caching modal and container sizes', modal.cache);
} }
}, },
@ -240,7 +246,7 @@ $.fn.modal = function(parameters) {
} }
}, },
position: function() { position: function() {
modal.verbose('Centering modal on page');
modal.verbose('Centering modal on page', modal.cache.height / 2);
if(modal.can.fit()) { if(modal.can.fit()) {
$modal $modal
.css({ .css({

14
build/packaged/modules/modal.js

@ -56,10 +56,13 @@ $.fn.modal = function(parameters) {
modal = { modal = {
initialize: function() { initialize: function() {
modal.verbose('Initializing modal');
modal.verbose('Attaching events');
$closeButton $closeButton
.on('click', modal.event.close) .on('click', modal.event.close)
; ;
modal.cache.sizes();
modal.verbose('Creating dimmer');
$context $context
.dimmer({ .dimmer({
closable: settings.closable, closable: settings.closable,
@ -81,12 +84,11 @@ $.fn.modal = function(parameters) {
$dimmer = $context.children(selector.dimmer); $dimmer = $context.children(selector.dimmer);
if( $modal.parent()[0] !== $dimmer[0] ) { if( $modal.parent()[0] !== $dimmer[0] ) {
modal.debug('Moving element inside dimmer', $context); modal.debug('Moving element inside dimmer', $context);
$modal
$modal = $modal
.detach() .detach()
.appendTo($dimmer) .appendTo($dimmer)
; ;
} }
modal.cache.sizes();
modal.instantiate(); modal.instantiate();
}, },
@ -140,6 +142,7 @@ $.fn.modal = function(parameters) {
}, },
show: function() { show: function() {
modal.debug('Showing modal');
modal.set.type(); modal.set.type();
modal.set.position(); modal.set.position();
modal.hideAll(); modal.hideAll();
@ -153,10 +156,12 @@ $.fn.modal = function(parameters) {
.fadeIn(settings.duration, settings.easing, modal.set.active) .fadeIn(settings.duration, settings.easing, modal.set.active)
; ;
} }
modal.debug('Triggering dimmer');
$context.dimmer('show'); $context.dimmer('show');
}, },
hide: function() { hide: function() {
modal.debug('Hiding modal');
// remove keyboard detection // remove keyboard detection
$document $document
.off('keyup.' + namespace) .off('keyup.' + namespace)
@ -209,6 +214,7 @@ $.fn.modal = function(parameters) {
? $(window).height() ? $(window).height()
: $context.height() : $context.height()
}; };
console.log($modal);
modal.debug('Caching modal and container sizes', modal.cache); modal.debug('Caching modal and container sizes', modal.cache);
} }
}, },
@ -240,7 +246,7 @@ $.fn.modal = function(parameters) {
} }
}, },
position: function() { position: function() {
modal.verbose('Centering modal on page');
modal.verbose('Centering modal on page', modal.cache.height / 2);
if(modal.can.fit()) { if(modal.can.fit()) {
$modal $modal
.css({ .css({

2
build/uncompressed/elements/step.css

@ -31,7 +31,7 @@
z-index: 2; z-index: 2;
content: ''; content: '';
top: 0em; top: 0em;
right: -1.48em;
right: -1.45em;
border-bottom: 1.5em solid transparent; border-bottom: 1.5em solid transparent;
border-left: 1.5em solid #FFFFFF; border-left: 1.5em solid #FFFFFF;
border-top: 1.5em solid transparent; border-top: 1.5em solid transparent;

3
build/uncompressed/modules/modal.css

@ -77,6 +77,9 @@
vertical-align: middle; vertical-align: middle;
box-shadow: -1px 0px 0px 0px rgba(0, 0, 0, 0.1); box-shadow: -1px 0px 0px 0px rgba(0, 0, 0, 0.1);
} }
.ui.modal > .content p {
line-height: 1.6;
}
/*-------------- /*--------------
Actions Actions
---------------*/ ---------------*/

14
build/uncompressed/modules/modal.js

@ -56,10 +56,13 @@ $.fn.modal = function(parameters) {
modal = { modal = {
initialize: function() { initialize: function() {
modal.verbose('Initializing modal');
modal.verbose('Attaching events');
$closeButton $closeButton
.on('click', modal.event.close) .on('click', modal.event.close)
; ;
modal.cache.sizes();
modal.verbose('Creating dimmer');
$context $context
.dimmer({ .dimmer({
closable: settings.closable, closable: settings.closable,
@ -81,12 +84,11 @@ $.fn.modal = function(parameters) {
$dimmer = $context.children(selector.dimmer); $dimmer = $context.children(selector.dimmer);
if( $modal.parent()[0] !== $dimmer[0] ) { if( $modal.parent()[0] !== $dimmer[0] ) {
modal.debug('Moving element inside dimmer', $context); modal.debug('Moving element inside dimmer', $context);
$modal
$modal = $modal
.detach() .detach()
.appendTo($dimmer) .appendTo($dimmer)
; ;
} }
modal.cache.sizes();
modal.instantiate(); modal.instantiate();
}, },
@ -140,6 +142,7 @@ $.fn.modal = function(parameters) {
}, },
show: function() { show: function() {
modal.debug('Showing modal');
modal.set.type(); modal.set.type();
modal.set.position(); modal.set.position();
modal.hideAll(); modal.hideAll();
@ -153,10 +156,12 @@ $.fn.modal = function(parameters) {
.fadeIn(settings.duration, settings.easing, modal.set.active) .fadeIn(settings.duration, settings.easing, modal.set.active)
; ;
} }
modal.debug('Triggering dimmer');
$context.dimmer('show'); $context.dimmer('show');
}, },
hide: function() { hide: function() {
modal.debug('Hiding modal');
// remove keyboard detection // remove keyboard detection
$document $document
.off('keyup.' + namespace) .off('keyup.' + namespace)
@ -209,6 +214,7 @@ $.fn.modal = function(parameters) {
? $(window).height() ? $(window).height()
: $context.height() : $context.height()
}; };
console.log($modal);
modal.debug('Caching modal and container sizes', modal.cache); modal.debug('Caching modal and container sizes', modal.cache);
} }
}, },
@ -240,7 +246,7 @@ $.fn.modal = function(parameters) {
} }
}, },
position: function() { position: function() {
modal.verbose('Centering modal on page');
modal.verbose('Centering modal on page', modal.cache.height / 2);
if(modal.can.fit()) { if(modal.can.fit()) {
$modal $modal
.css({ .css({

2
node/src/documents/modules/modal.html

@ -42,7 +42,7 @@ type : 'UI Module'
<img class="ui medium image" src="/images/demo/avatar2.jpg"> <img class="ui medium image" src="/images/demo/avatar2.jpg">
</div> </div>
<div class="right"> <div class="right">
<div class="ui header">Are you sure you want to upload that photo?</div>
<div class="ui header">Are you sure you want to upload that?</div>
<p>I mean it's not really the best profile photo.</p> <p>I mean it's not really the best profile photo.</p>
<p>It's resampled to like two times the size it's suppose to be. Our image detection software also says it might even be inappropriate.</p> <p>It's resampled to like two times the size it's suppose to be. Our image detection software also says it might even be inappropriate.</p>
</div> </div>

4
node/src/documents/modules/rating.html

@ -81,7 +81,7 @@ type : 'UI Module'
<div class="example"> <div class="example">
<h4 class="ui header">Star</h4> <h4 class="ui header">Star</h4>
<p>A star rating uses a set of star glyphs to show a rating</p>
<p>A rating can use a set of star icons</p>
<div class="ui star rating"> <div class="ui star rating">
<i class="icon"></i> <i class="icon"></i>
<i class="icon"></i> <i class="icon"></i>
@ -93,7 +93,7 @@ type : 'UI Module'
<div class="example"> <div class="example">
<h4 class="ui header">Heart</h4> <h4 class="ui header">Heart</h4>
<p>A heart rating uses a set of heart glyphs to show a rating</p>
<p>A rating can use a set of heart icons</p>
<div class="ui heart rating"> <div class="ui heart rating">
<i class="icon"></i> <i class="icon"></i>
<i class="icon"></i> <i class="icon"></i>

2
node/src/files/components/semantic/elements/step.css

@ -31,7 +31,7 @@
z-index: 2; z-index: 2;
content: ''; content: '';
top: 0em; top: 0em;
right: -1.48em;
right: -1.45em;
border-bottom: 1.5em solid transparent; border-bottom: 1.5em solid transparent;
border-left: 1.5em solid #FFFFFF; border-left: 1.5em solid #FFFFFF;
border-top: 1.5em solid transparent; border-top: 1.5em solid transparent;

3
node/src/files/components/semantic/modules/modal.css

@ -77,6 +77,9 @@
vertical-align: middle; vertical-align: middle;
box-shadow: -1px 0px 0px 0px rgba(0, 0, 0, 0.1); box-shadow: -1px 0px 0px 0px rgba(0, 0, 0, 0.1);
} }
.ui.modal > .content p {
line-height: 1.6;
}
/*-------------- /*--------------
Actions Actions
---------------*/ ---------------*/

14
node/src/files/components/semantic/modules/modal.js

@ -56,10 +56,13 @@ $.fn.modal = function(parameters) {
modal = { modal = {
initialize: function() { initialize: function() {
modal.verbose('Initializing modal');
modal.verbose('Attaching events');
$closeButton $closeButton
.on('click', modal.event.close) .on('click', modal.event.close)
; ;
modal.cache.sizes();
modal.verbose('Creating dimmer');
$context $context
.dimmer({ .dimmer({
closable: settings.closable, closable: settings.closable,
@ -81,12 +84,11 @@ $.fn.modal = function(parameters) {
$dimmer = $context.children(selector.dimmer); $dimmer = $context.children(selector.dimmer);
if( $modal.parent()[0] !== $dimmer[0] ) { if( $modal.parent()[0] !== $dimmer[0] ) {
modal.debug('Moving element inside dimmer', $context); modal.debug('Moving element inside dimmer', $context);
$modal
$modal = $modal
.detach() .detach()
.appendTo($dimmer) .appendTo($dimmer)
; ;
} }
modal.cache.sizes();
modal.instantiate(); modal.instantiate();
}, },
@ -140,6 +142,7 @@ $.fn.modal = function(parameters) {
}, },
show: function() { show: function() {
modal.debug('Showing modal');
modal.set.type(); modal.set.type();
modal.set.position(); modal.set.position();
modal.hideAll(); modal.hideAll();
@ -153,10 +156,12 @@ $.fn.modal = function(parameters) {
.fadeIn(settings.duration, settings.easing, modal.set.active) .fadeIn(settings.duration, settings.easing, modal.set.active)
; ;
} }
modal.debug('Triggering dimmer');
$context.dimmer('show'); $context.dimmer('show');
}, },
hide: function() { hide: function() {
modal.debug('Hiding modal');
// remove keyboard detection // remove keyboard detection
$document $document
.off('keyup.' + namespace) .off('keyup.' + namespace)
@ -209,6 +214,7 @@ $.fn.modal = function(parameters) {
? $(window).height() ? $(window).height()
: $context.height() : $context.height()
}; };
console.log($modal);
modal.debug('Caching modal and container sizes', modal.cache); modal.debug('Caching modal and container sizes', modal.cache);
} }
}, },
@ -240,7 +246,7 @@ $.fn.modal = function(parameters) {
} }
}, },
position: function() { position: function() {
modal.verbose('Centering modal on page');
modal.verbose('Centering modal on page', modal.cache.height / 2);
if(modal.can.fit()) { if(modal.can.fit()) {
$modal $modal
.css({ .css({

2
node/src/files/stylesheets/semantic.css

@ -282,7 +282,7 @@ a:hover {
#example .masthead { #example .masthead {
text-align: center; text-align: center;
background: #00B5AD url(/images/tile-bg.png) repeat fixed 0% 0%; background: #00B5AD url(/images/tile-bg.png) repeat fixed 0% 0%;
margin-top: 40px;
margin-top: 38px;
padding: 50px 0px; padding: 50px 0px;
color: rgba(255, 255, 255, 0.9); color: rgba(255, 255, 255, 0.9);
margin-bottom: 0px; margin-bottom: 0px;

14
src/modules/modal.js

@ -56,10 +56,13 @@ $.fn.modal = function(parameters) {
modal = { modal = {
initialize: function() { initialize: function() {
modal.verbose('Initializing modal');
modal.verbose('Attaching events');
$closeButton $closeButton
.on('click', modal.event.close) .on('click', modal.event.close)
; ;
modal.cache.sizes();
modal.verbose('Creating dimmer');
$context $context
.dimmer({ .dimmer({
closable: settings.closable, closable: settings.closable,
@ -81,12 +84,11 @@ $.fn.modal = function(parameters) {
$dimmer = $context.children(selector.dimmer); $dimmer = $context.children(selector.dimmer);
if( $modal.parent()[0] !== $dimmer[0] ) { if( $modal.parent()[0] !== $dimmer[0] ) {
modal.debug('Moving element inside dimmer', $context); modal.debug('Moving element inside dimmer', $context);
$modal
$modal = $modal
.detach() .detach()
.appendTo($dimmer) .appendTo($dimmer)
; ;
} }
modal.cache.sizes();
modal.instantiate(); modal.instantiate();
}, },
@ -140,6 +142,7 @@ $.fn.modal = function(parameters) {
}, },
show: function() { show: function() {
modal.debug('Showing modal');
modal.set.type(); modal.set.type();
modal.set.position(); modal.set.position();
modal.hideAll(); modal.hideAll();
@ -153,10 +156,12 @@ $.fn.modal = function(parameters) {
.fadeIn(settings.duration, settings.easing, modal.set.active) .fadeIn(settings.duration, settings.easing, modal.set.active)
; ;
} }
modal.debug('Triggering dimmer');
$context.dimmer('show'); $context.dimmer('show');
}, },
hide: function() { hide: function() {
modal.debug('Hiding modal');
// remove keyboard detection // remove keyboard detection
$document $document
.off('keyup.' + namespace) .off('keyup.' + namespace)
@ -209,6 +214,7 @@ $.fn.modal = function(parameters) {
? $(window).height() ? $(window).height()
: $context.height() : $context.height()
}; };
console.log($modal);
modal.debug('Caching modal and container sizes', modal.cache); modal.debug('Caching modal and container sizes', modal.cache);
} }
}, },
@ -240,7 +246,7 @@ $.fn.modal = function(parameters) {
} }
}, },
position: function() { position: function() {
modal.verbose('Centering modal on page');
modal.verbose('Centering modal on page', modal.cache.height / 2);
if(modal.can.fit()) { if(modal.can.fit()) {
$modal $modal
.css({ .css({

3
src/modules/modal.less

@ -98,6 +98,9 @@
box-shadow: -1px 0px 0px 0px rgba(0, 0, 0, 0.1); box-shadow: -1px 0px 0px 0px rgba(0, 0, 0, 0.1);
} }
.ui.modal > .content p {
line-height: 1.6;
}
/*-------------- /*--------------
Actions Actions

Loading…
Cancel
Save