Browse Source

Adds fixes for sidebar inside context other than body

pull/1629/merge
jlukic 9 years ago
parent
commit
caf76a7f1f
4 changed files with 29 additions and 10 deletions
  1. 7
      src/definitions/elements/segment.less
  2. 1
      src/definitions/modules/sidebar.js
  3. 22
      src/definitions/modules/sidebar.less
  4. 9
      src/definitions/modules/transition.js

7
src/definitions/elements/segment.less

@ -335,13 +335,6 @@
border-radius: 0px;
}
.ui.basic.segment:first-child {
padding-top: 0em;
}
.ui.basic.segment:last-child {
padding-bottom: 0em;
}
/*-------------------
Fittted

1
src/definitions/modules/sidebar.js

@ -311,6 +311,7 @@ $.fn.sidebar = function(parameters) {
}
if($module.nextAll(selector.pusher).length === 0 || $module.nextAll(selector.pusher)[0] !== $pusher[0]) {
module.debug('Moved sidebar to correct parent element');
debugger;
module.error(error.movedSidebar, element);
$module.detach().prependTo($context);
module.refresh();

22
src/definitions/modules/sidebar.less

@ -85,15 +85,26 @@
/*--------------
Body
Pushable
---------------*/
.pushable {
height: 100%;
overflow-x: hidden;
padding: 0em !important;
}
/* Inside Page */
.pushable:not(body) {
transform: translate3d(0, 0, 0);
}
/* Whole Page */
body.pushable {
background: @canvasBackground !important;
}
/*--------------
Fixed
---------------*/
@ -115,12 +126,17 @@
position: relative;
backface-visibility: hidden;
min-height: 100%;
transition: transform @duration @easing;
background: @pageBackground;
z-index: @middleLayer;
}
body.pushable > .pusher {
background: @pageBackground;
}
.pushable > .pusher {
background: inherit;
}
/*--------------
Dimmer

9
src/definitions/modules/transition.js

@ -240,6 +240,15 @@ $.fn.transition = function() {
if(settings.useFailSafe) {
module.add.failSafe();
}
// showing multiple
$('.inline.sidebar')
.sidebar{
context: $('.application.segment')
})
;
$('.inline.sidebar')
.sidebar('attach events', '.demo.menu .item')
;
module.set.duration(settings.duration);
settings.onStart.call(this);
module.debug('Starting tween', animation, $module.attr('class'));

Loading…
Cancel
Save