From c261f45ea3ee05907d3560174184e4383ce630e5 Mon Sep 17 00:00:00 2001 From: Matthias BUSSONNIER Date: Wed, 16 Jul 2014 19:11:10 +0200 Subject: [PATCH] movestyling from js to css + deprecation warnign --- IPython/html/static/base/js/page.js | 6 +++--- IPython/html/static/base/less/page.less | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/IPython/html/static/base/js/page.js b/IPython/html/static/base/js/page.js index 2107aa81a..5771b75e4 100644 --- a/IPython/html/static/base/js/page.js +++ b/IPython/html/static/base/js/page.js @@ -8,13 +8,11 @@ define([ "use strict"; var Page = function () { - this.style(); this.bind_events(); }; Page.prototype.style = function () { - $('div#header').addClass('border-box-sizing'); - $('div#site').addClass('border-box-sizing'); + console.log('page.style() is know an empty function, plese consider removing call.') }; Page.prototype.bind_events = function () { @@ -30,12 +28,14 @@ define([ Page.prototype.show_header = function () { // The header and site divs start out hidden to prevent FLOUC. // Main scripts should call this method after styling everything. + // TODO: selector are hardcoded, pass as constructor argument $('div#header').css('display','block'); }; Page.prototype.show_site = function () { // The header and site divs start out hidden to prevent FLOUC. // Main scripts should call this method after styling everything. + // TODO: selector are hardcoded, pass as constructor argument $('div#site').css('display','block'); }; diff --git a/IPython/html/static/base/less/page.less b/IPython/html/static/base/less/page.less index 11422b510..cbae3d48b 100644 --- a/IPython/html/static/base/less/page.less +++ b/IPython/html/static/base/less/page.less @@ -24,6 +24,7 @@ div#header { padding-left: 30px; padding-bottom: 5px; border-bottom: 1px solid @navbar-default-border; + .border-box-sizing(); } #ipython_notebook { @@ -50,6 +51,7 @@ div#header { #site { width: 100%; display: none; + .border-box-sizing(); } /* Smaller buttons */