Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/BuildFire/sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielHindi committed Feb 24, 2016
2 parents e23e4ba + 955fb6a commit a8663e4
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 12 deletions.
13 changes: 13 additions & 0 deletions scripts/buildfire.js
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,16 @@ var buildfire = {
}
/// ref: https://github.com/BuildFire/sdk/wiki/How-to-use-Appearance
, appearance: {
_forceCSSRender: function(){
// WebKit Rendering Reset on Plugins
if(window.location.href.indexOf('widget') > 0){
var html = document.getElementsByTagName('html')[0];
var style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = 'body{position:relative !important; z-index:1 !important;}';
html.appendChild(style);
}
},
insertHTMLAttributes: function () {
var html = document.getElementsByTagName('html')[0];

Expand Down Expand Up @@ -1156,6 +1166,9 @@ document.addEventListener("DOMContentLoaded", function (event) {
}
};
}
setTimeout(function(){
buildfire.appearance._forceCSSRender();
}, 1750);

});
document.addEventListener("resize", function (event) {
Expand Down
28 changes: 20 additions & 8 deletions scripts/buildfire/components/carousel/carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ buildfire.components.carousel.view.prototype = {

this.loadItems(items,true);
},

_initDimensions: function (layout) {
this.width = window.innerWidth;
layout = layout || "WideScreen";
Expand All @@ -376,6 +377,10 @@ buildfire.components.carousel.view.prototype = {

this.cssWidth = this.width + "px";
this.cssHeight = this.height + "px";

// Set Min height on carousel so doesn't push content down on load.
this._minHeight = '180px';
this._minHeight = this.cssHeight;
},
// remove all nodes from the slider
_removeAll: function () {
Expand Down Expand Up @@ -422,7 +427,7 @@ buildfire.components.carousel.view.prototype = {
pagination: false,
items: 1,
itemsMobile: true,
//lazyLoad:true,
lazyLoad:true,
autoHeight: false,
autoplay: true,
autoplaySpeed:800
Expand Down Expand Up @@ -453,12 +458,12 @@ buildfire.components.carousel.view.prototype = {
// render the slider wrapper HTML
_renderSlider: function () {
var me = this;

// Add min-height to carousel to prevent it from pushing content down.
me.selector.style['min-height'] = me._minHeight;
me.selector.style.position = "relative";
me.selector.style.top = "0px";
me.selector.style.left = "0px";

// Temporary fix for -webkit-overflow-scroll bug and prevent carousel from pushing content down.
me.selector.style['min-height'] = "180px";

//me.selector.style.width = this.cssWidth;
//me.selector.style.height = this.cssHeight;
Expand Down Expand Up @@ -494,11 +499,18 @@ buildfire.components.carousel.view.prototype = {
});
});

// Images
var me = this;
var image = document.createElement("img");
image.src = buildfire.components.carousel._cropImage(item.iconUrl, { width: this.width, height: this.height });
// Add data-src attr for lazyLoad
//image.setAttribute('data-src', buildfire.components.carousel._cropImage(item.iconUrl, { width: this.width, height: this.height }));
//image.className = "owl-lazy";
me.$slider = $(me.selector);
if (me.items.length > 1) {
// Add data-src attr for lazyLoad
image.setAttribute('data-src', buildfire.components.carousel._cropImage(item.iconUrl, { width: this.width, height: this.height }));
image.className = "owl-lazy";
}else{
// Add src since it will be static
image.src = buildfire.components.carousel._cropImage(item.iconUrl, { width: this.width, height: this.height });
}

//image.style.width = this.'cssWidth';
//image.style.height = this.cssHeight;
Expand Down
9 changes: 5 additions & 4 deletions styles/siteStyle.css
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,9 @@ nav{
}
nav ul.menu{
padding-top:65px;
border-bottom:1px solid #26282b;
color:#a6abba;
height:100%;
overflow:auto;
}
nav ul.menu li{
position:relative;
Expand All @@ -167,6 +168,9 @@ nav ul.menu li.dark a{
padding:10px 25px;
font-size:14px;
}
nav ul.menu li:last-child{
border-bottom:1px solid #26282b;
}
nav ul.menu li .parent{
color:#a6abba;
padding:20px 10px 20px 45px;
Expand Down Expand Up @@ -195,9 +199,6 @@ nav ul.menu li.datatracer .parent span.icon{
nav ul.menu li.help .parent span.icon{
top:21px;
}
nav ul.menu li.licenses .parent span.icon{
top:21px;
}
nav ul.menu li.selfprovisioning .parent span.icon{
font-size:18px;
top:19px;
Expand Down

0 comments on commit a8663e4

Please sign in to comment.