Skip to content

Commit

Permalink
Merge pull request #197 from bioinformatics-ua/imp/no-old-ie
Browse files Browse the repository at this point in the history
Show warning on IE6-9 + fix side bar show/hide
  • Loading branch information
bastiao committed Feb 3, 2016
2 parents 26b33c4 + b2e1f98 commit 660474a
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<!DOCTYPE html>
<html lang="en">
<!--[if lt IE 7 ]> <html class="ie6"> <![endif]-->
<!--[if IE 7 ]> <html class="ie7"> <![endif]-->
<!--[if IE 8 ]> <html class="ie8"> <![endif]-->
<!--[if IE 9 ]> <html class="ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class="" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Expand Down Expand Up @@ -45,12 +49,22 @@
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->

<!--[if (gt IE 9)|!(IE)]><!-->
<!-- build:remove:dist -->
<script src="lib/bundle.js"></script>
<!--/build-->
<!-- build:remove:dev -->
<script src="lib/bundle.min.js"></script>
<!--/build-->
<!--<![endif]-->

<!--[if lte IE 9]>
<script>
// exhibit a warning on old IE browsers
var warningHtml = document.createElement('div');
warningHtml.innerHTML = '<div class="topbar"><div class="text-center" style="color:#EECD0C;font-size:large;"><b>Your Internet browser is not supported by Dicoogle! Please update your browser.</b></div></div><div style="display:flex;"></div>';
document.body.appendChild(warningHtml);
</script>
<![endif]-->
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ import { hashHistory /*, browserHistory*/ } from 'react-router'
import {UserActions} from './actions/userActions';
import {UserStore} from './stores/userStore';


import 'document-register-element';
require('core-js/shim');

require('jquery-ui');
Expand Down Expand Up @@ -71,10 +69,15 @@ class App extends React.Component {
Webcore.init(Endpoints.base);
}
componentDidMount(){
UserStore.loadLocalStore();
if (localStorage.token === undefined)
UserStore.loadLocalStore();
if (localStorage.token === undefined) {
this.props.history.pushState(null, 'login');
//setTimeout(function(){}, 300);
}

$("#menu-toggle").click(function (e) {
e.preventDefault();
$("#wrapper").toggleClass("toggled");
});
}
fetchPlugins(data) {
if (this.pluginsFetched)
Expand Down Expand Up @@ -115,24 +118,24 @@ class App extends React.Component {
}

render() {

return (
<div>
<div className="topbar">
<img className="btn_drawer" src="assets/drawer_menu.png" id="menu-toggle" />
<a>Dicoogle</a>
<div className="pull-right" bsStyle="padding:15px">
<div className="pull-right" bsStyle="padding:15px">

<span className="user-name usernameLogin" bsStyle="padding-right:10px">
{UserStore.getUsername()}
</span>
<span className="user-name usernameLogin" bsStyle="padding-right:10px">
{UserStore.getUsername()}
</span>

<span className="user-name buttonLogin">
<span className="user-name buttonLogin">
<span onClick={this.logout.bind(this)} className="glyphicon glyphicon-log-out" style={{cursor: 'pointer'}} />
</span>

<span onClick={this.logout.bind(this)} className="glyphicon glyphicon-log-out" style={{cursor: 'pointer'}} />
</span>

</div>
</div>
</div>
</div>

<div id="wrapper">
<div id="sidebar-wrapper">
Expand All @@ -154,11 +157,6 @@ class NotFoundView extends React.Component {
}
}

$("#menu-toggle").click(function (e) {
e.preventDefault();
$("#wrapper").toggleClass("toggled");
});

ReactDOM.render((
<Router history={hashHistory}>
<Route path="/" component={App}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"core-js": "^2.0.3",
"dicoogle-client": "^3.0.2",
"dicoogle-webcore": "../../../../../../../../../../../webcore",
"document-register-element": "^0.5.4",
"history": "^1.13.0",
"jquery": "^1.10.2",
"jquery-ui": "^1.10.5",
Expand Down
3 changes: 2 additions & 1 deletion webcore/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dicoogle-webcore",
"version": "0.11.0",
"version": "0.12.0",
"private": true,
"author": "Universidade de Aveiro, DETI/IEETA, Bioinformatics Group (http://bioinformatics.ua.pt/)",
"maintainers": [
Expand Down Expand Up @@ -33,6 +33,7 @@
},
"dependencies": {
"dicoogle-client": "^3.0.2",
"document-register-element": "^0.5.4",
"events": "^1.1.0"
}
}
1 change: 1 addition & 0 deletions webcore/src/dicoogle-webcore.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'document-register-element';
import {EventEmitter} from 'events';
import request from './request';

Expand Down

0 comments on commit 660474a

Please sign in to comment.