From alinefm at linux.vnet.ibm.com Tue Aug 11 11:25:53 2015 Content-Type: multipart/mixed; boundary="===============5878722352640293742==" MIME-Version: 1.0 From: Aline Manera To: kimchi-devel at ovirt.org Subject: Re: [Kimchi-devel] [PATCH 1/1] Fix :704 -page refreshing issue for wok branch Date: Tue, 11 Aug 2015 12:25:46 -0300 Message-ID: <55CA13FA.3050709@linux.vnet.ibm.com> In-Reply-To: 1438766322-12162-1-git-send-email-atreyee@linux.vnet.ibm.com --===============5878722352640293742== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 05/08/2015 06:18, Atreyee wrote: > 'undefined' value displayed in url and page was getting refreshed after l= ogged into wok page Could you describe the problem you want to fix with this patch? Does the problem happen while running wok without no plugin installed? Isn't it dependent of the "Welcome to Wok" page/patch discussed in other = email? > > Signed-off-by: Atreyee > --- > ui/css/theme-default/message.css | 10 ++++++++++ > ui/js/src/wok.main.js | 15 +++++++++++++-- > 2 files changed, 23 insertions(+), 2 deletions(-) > > diff --git a/ui/css/theme-default/message.css b/ui/css/theme-default/mess= age.css > index 28c392b..7cce15b 100644 > --- a/ui/css/theme-default/message.css > +++ b/ui/css/theme-default/message.css > @@ -133,3 +133,13 @@ > border: 2px solid #444; > color: #444; > } > + > +.noPluginMessage{ > + font-size: 18px; > + height: 48px; > + line-height: 48px; > + text-shadow: -1px -1px 1px #ccc, 1px 1px 1px #fff; > + padding-left: 10px; > + padding-top:10px; > + > +} > diff --git a/ui/js/src/wok.main.js b/ui/js/src/wok.main.js > index f4c9940..0d9baec 100644 > --- a/ui/js/src/wok.main.js > +++ b/ui/js/src/wok.main.js > @@ -102,10 +102,15 @@ wok.main =3D function() { > var defaultTab =3D tabs[0] > > var defaultTabPath =3D defaultTab && defaultTab['path'] > + > + //redirect to empty page when no plugin installed > + if(tabs.length=3D=3D=3D0){ > + DEFAULT_HASH =3D 'wok-empty'; > + }else{ > // Remove file extension from 'defaultTabPath' > DEFAULT_HASH =3D defaultTabPath && > defaultTabPath.substring(0, defaultTabPath.lastIndexOf(= '.')) > - > + } > $('#nav-menu').append(genTabs(tabs)); > > callback && callback(); > @@ -136,11 +141,16 @@ wok.main =3D function() { > * and clear location.hash to jump to home page. > */ > var tab =3D $('#nav-menu a[href=3D"' + url + '"]'); > - if (tab.length =3D=3D=3D 0) { > + if (tab.length =3D=3D=3D 0 && url!=3D'wok-empty.html') { > location.hash =3D ''; > return; > } > + //Remove the tab arrow indicator for no plugin > + if(url=3D=3D'wok-empty.html'){ > + $('.menu-arrow').hide(); > + $('#main').html('No plugins installed currently.You can downlo= ad the available plugins Kimchi and Ging= er from Github').addClass('noPluginMessage'); > + }else{ > // Animate arrow indicator. You should properly write an HTML file to be loaded inside of inject = plain HTML into JS scripts. > var left =3D $(tab).parent().position().left; > var width =3D $(tab).parent().width(); > @@ -163,6 +173,7 @@ wok.main =3D function() { > } > // Load page content. > loadPage(url); > + } > }; > > /** --===============5878722352640293742==--