Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

Commit

Permalink
Merge pull request #181 from quran/hotfix-ie
Browse files Browse the repository at this point in the history
Hotfix ie
  • Loading branch information
mmahalwy committed Nov 20, 2015
2 parents 6cb6eb2 + fcccd25 commit 29024e4
Show file tree
Hide file tree
Showing 17 changed files with 217 additions and 130 deletions.
2 changes: 1 addition & 1 deletion client.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*global document, window, $ */
require('babel/polyfill');
import 'babel-polyfill';

import ReactDOM from 'react-dom';
import app from './app';
Expand Down
2 changes: 1 addition & 1 deletion nightwatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ require('dotenv').config({path: (process.env.NODE_ENV || 'development') + '.env'
require('app-module-path').addPath(__dirname);
require('app-module-path').addPath('./src/scripts');

require("babel/register")({
require("babel-core/register")({
stage: 0,
plugins: ["typecheck"]
});
Expand Down
124 changes: 64 additions & 60 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,116 +22,120 @@
"iojs": ">= 1.0.3"
},
"dependencies": {
"app-module-path": "^1.0.2",
"app-module-path": "^1.0.4",
"autoprefixer-loader": "^3.1.0",
"babel": "^5.8.23",
"babel-loader": "5.3.2",
"babel-plugin-typecheck": "1.2.0",
"babel": "^6.1.18",
"babel-loader": "^6.1.0",
"babel-plugin-transform-object-assign": "^6.1.18",
"babel-plugin-typecheck": "^3.0.0",
"babel-polyfill": "^6.2.0",
"body-parser": "^1.14.1",
"bootstrap-sass": "~3.3.1",
"bootstrap-sass": "^3.3.5",
"bootstrap-sass-loader": "^1.0.9",
"bundle-loader": "~0.5.0",
"cache-manager": "^1.1.0",
"classnames": "^2.1.2",
"classnames": "^2.2.0",
"compression": "^1.6.0",
"cookie-parser": "^1.3.5",
"copy-to-clipboard": "^1.0.4",
"cookie-parser": "^1.4.0",
"copy-to-clipboard": "^1.1.1",
"cors": "^2.7.1",
"css-loader": "^0.18.0",
"csurf": "^1.6.3",
"csurf": "^1.8.3",
"debug": "^2.2.0",
"dotenv": "^1.2.0",
"errorhandler": "^1.4.2",
"express": "^4.3.2",
"express-state": "^1.2.0",
"express": "^4.13.3",
"express-state": "^1.3.0",
"express-useragent": "^0.2.0",
"extract-text-webpack-plugin": "^0.8.0",
"fluxible": "^1.0.0",
"fluxible": "^1.0.3",
"fluxible-addons-react": "^0.2.0",
"fluxible-plugin-fetchr": "^0.3.7",
"fluxible-plugin-fetchr": "^0.3.8",
"fluxible-router": "^0.3.0",
"html-webpack-plugin": "^1.4.0",
"immutable": "^3.7.4",
"html-webpack-plugin": "^1.6.2",
"immutable": "^3.7.5",
"imports-loader": "^0.6.3",
"jquery": "^2.1.4",
"json-loader": "~0.5.1",
"jsx-loader": "^0.13.2",
"loopstacks": "0.0.3",
"morgan": "^1.6.1",
"node-sass": "^3.2.0",
"node-sass": "^3.4.2",
"phantomjs": "^1.9.18",
"promise": "^7.0.4",
"proxy-middleware": "^0.14.0",
"raw-loader": "^0.5.1",
"react": "^0.14.2",
"react": "^0.14.3",
"react-cookie": "^0.3.4",
"react-dom": "^0.14.0",
"react-dom": "^0.14.3",
"react-google-analytics": "^0.2.0",
"react-i13n": "^1.0.0",
"react-i13n-ga": "^0.1.3",
"react-paginate": "^0.4.0",
"sass-loader": "2.0.1",
"serialize-javascript": "^1.0.0",
"serve-favicon": "^2.2.1",
"react-paginate": "^0.4.1",
"sass-loader": "^3.1.1",
"serialize-javascript": "^1.1.2",
"serve-favicon": "^2.3.0",
"style-loader": "~0.12.2",
"superagent": "^1.2.0",
"superagent": "^1.4.0",
"superagent-promise": "^1.0.3",
"url": "^0.11.0",
"url-loader": "~0.5.5",
"webpack": "^1.10.3",
"webpack-isomorphic-tools": "^0.9.3",
"winston": "^1.1.2"
"webpack": "^1.12.6",
"webpack-isomorphic-tools": "^2.2.15",
"winston": "^2.1.1"
},
"devDependencies": {
"autoprefixer-loader": "^3.1.0",
"babel-core": "^5.8.24",
"babel-eslint": "^4.1.1",
"babel-loader": "5.3.2",
"babel-core": "^6.2.0",
"babel-eslint": "^4.1.5",
"babel-loader": "^6.2.0",
"babel-plugin-react-transform": "^1.1.1",
"babel-plugin-typecheck": "^1.2.0",
"babel-runtime": "^5.8.24",
"bundle-loader": "~0.5.0",
"chai": "^3.0.0",
"chromedriver": "^2.19.0",
"clean-webpack-plugin": "^0.1.3",
"del": "^2.0.2",
"eslint": "^1.4.1",
"eslint-loader": "^1.0.0",
"eslint-plugin-react": "^3.3.2",
"babel-plugin-typecheck": "^3.0.0",
"babel-preset-es2015": "^6.1.18",
"babel-preset-react": "^6.1.18",
"babel-preset-stage-0": "^6.1.18",
"babel-runtime": "^6.2.0",
"bundle-loader": "^0.5.4",
"chai": "^3.4.1",
"chromedriver": "^2.20.0",
"clean-webpack-plugin": "^0.1.4",
"del": "^2.1.0",
"eslint": "^1.9.0",
"eslint-loader": "^1.1.1",
"eslint-plugin-react": "^3.9.0",
"extract-text-webpack-plugin": "^0.8.0",
"file-loader": "^0.8.4",
"gulp": "^3.8.11",
"gulp-nodemon": "^2.0.2",
"gulp-util": "^3.0.4",
"imports-loader": "^0.6.3",
"jscs": "^2.1.1",
"json-loader": "~0.5.1",
"karma": "^0.13.9",
"gulp": "^3.9.0",
"gulp-nodemon": "^2.0.4",
"gulp-util": "^3.0.7",
"imports-loader": "^0.6.5",
"jscs": "^2.5.1",
"json-loader": "^0.5.3",
"karma": "^0.13.15",
"karma-chai": "^0.1.0",
"karma-chai-sinon": "^0.1.5",
"karma-chrome-launcher": "^0.2.0",
"karma-junit-reporter": "^0.3.4",
"karma-mocha": "^0.2.0",
"karma-phantomjs-launcher": "~0.2.1",
"karma-script-launcher": "~0.1.0",
"karma-chrome-launcher": "^0.2.1",
"karma-junit-reporter": "^0.3.8",
"karma-mocha": "^0.2.1",
"karma-phantomjs-launcher": "^0.2.1",
"karma-script-launcher": "^0.1.0",
"karma-sinon": "^1.0.4",
"karma-sourcemap-loader": "^0.3.5",
"karma-webpack": "^1.6.0",
"mocha": "^2.2.5",
"karma-sourcemap-loader": "^0.3.6",
"karma-webpack": "^1.7.0",
"mocha": "^2.3.4",
"nightwatch": "^0.8.6",
"nodemon": "^1.7.1",
"nodemon": "^1.8.1",
"path": "^0.11.14",
"phantomjs-polyfill": "0.0.1",
"raw-loader": "^0.5.1",
"react-transform-catch-errors": "^1.0.0",
"react-transform-hmr": "^1.0.1",
"redbox-react": "^1.1.1",
"redbox-react": "^1.2.0",
"selenium-server": "^2.48.2",
"sinon": "^1.15.3",
"sinon": "^1.17.2",
"sinon-chai": "^2.8.0",
"style-loader": "^0.12.4",
"url-loader": "~0.5.5",
"webpack-dev-server": "^1.6.5"
"url-loader": "^0.5.6",
"webpack-dev-server": "^1.12.1"
},
"pre-commit": [
"lint",
Expand Down
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import debugLib from 'debug';
const debug = debugLib('quran');

import app from './app';
import * as Settings from 'constants/Settings';
import Settings from 'constants/Settings';
import * as ExpressActions from 'actions/ExpressActions';
import * as Fonts from 'utils/FontFace';

Expand Down
3 changes: 2 additions & 1 deletion server/config/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import cookieParser from 'cookie-parser';
import cors from 'cors';

import config from './environment';
import routes from '../routes';

export default function(server) {
server.use(compression());
Expand All @@ -27,7 +28,7 @@ export default function(server) {
server.set('state namespace', 'App');
server.set('view cache', true);

require('../routes')(server);
routes(server);

server.use(errorhandler()); // Must be last!
}
2 changes: 1 addition & 1 deletion server/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var Promise = require('promise');
var request = require('superagent-promise')(require('superagent'), Promise);

import ls from 'loopstacks';
import * as Settings from 'constants/Settings';
import Settings from 'constants/Settings';
import debug from 'utils/Debug';

export default function(server) {
Expand Down
18 changes: 9 additions & 9 deletions src/scripts/components/Application.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if (process.env.BROWSER) ga('require', 'linkid');

class Application extends React.Component {
render() {
const Handler = this.props.currentRoute.get('handler');
const Handler = this.props.currentRoute.get('handler').get('default');

debug('component:APPLICATION', 'Render');
return (
Expand Down Expand Up @@ -56,20 +56,20 @@ class Application extends React.Component {
if (this.props.pageTitle !== nextProps.pageTitle) {
document.title = nextProps.pageTitle;
// ga('send', 'pageview', nextProps.url);
nextProps.i13n.executeEvent('pageview', {
url: nextProps.url,
title: nextProps.pageTitle
});
// nextProps.i13n.executeEvent('pageview', {
// url: nextProps.url,
// title: nextProps.pageTitle
// });
}

return this.props.currentRoute.get('handler') !== nextProps.currentRoute.get('handler');
}

componentDidMount() {
this.props.i13n.executeEvent('pageview', {
url: this.props.currentNavigate.url,
title: this.props.pageTitle
});
// this.props.i13n.executeEvent('pageview', {
// url: this.props.currentNavigate.url,
// title: this.props.pageTitle
// });
}

componentDidUpdate(prevProps, prevState) {
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/components/header/ContentDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ContentDropdown extends React.Component {
this.setState({
options: res.body
});
}.bind(this));
});
}

chosenOption(id, e) {
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/components/surah/Ayah.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class Ayah extends React.Component {
return;
}

let text = this.props.ayah.quran.map(word => {
let ayahText = this.props.ayah.quran.map(word => {
let className = `${word.char.font} ${word.highlight ? word.highlight: null}`;

if (word.word.translation) {
Expand Down Expand Up @@ -103,7 +103,7 @@ class Ayah extends React.Component {

return (
<h1 className="word-font text-right">
{text}
{ayahText}
</h1>
);
}
Expand Down
5 changes: 2 additions & 3 deletions src/scripts/components/surah/Line.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable consistent-return */

import React from 'react';
import * as AudioplayerActions from 'actions/AudioplayerActions';
import debug from 'utils/Debug';
Expand All @@ -12,7 +11,7 @@ class Line extends React.Component {
return;
}

let text = this.props.line.map(data => {
let lineText = this.props.line.map(data => {
if (data.word.translation) {
let tooltip = data.word.translation;

Expand All @@ -37,7 +36,7 @@ class Line extends React.Component {

return (
<span className="line text-center">
{text}
{lineText}
</span>
);

Expand Down
2 changes: 1 addition & 1 deletion src/scripts/stores/UserStore.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import BaseStore from 'fluxible/addons/BaseStore';
import reactCookie from 'react-cookie';
import * as Settings from 'constants/Settings';
import Settings from 'constants/Settings';

class UserStore extends BaseStore {
constructor(dispatcher) {
Expand Down
23 changes: 17 additions & 6 deletions start.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
require('babel-core/register')({
presets: [
'es2015',
'stage-0',
'react'
],
plugins: [
'typecheck',
'transform-object-assign'
]
});

require('dotenv').config({path: (process.env.NODE_ENV || 'development') + '.env'});
require('app-module-path').addPath(__dirname);
require('app-module-path').addPath('./src/scripts');

require("babel/register")({
stage: 0,
plugins: ["typecheck"]
});
var witm = require('./webpack-isomorphic-tools-main');

global.__CLIENT__ = false;
global.__SERVER__ = true;

require('./webpack-isomorphic-tools-main')(function() {
require('./server.js')();
witm(function() {
var server = require('./server');

server.default();
});
Binary file added static/fonts/.DS_Store
Binary file not shown.
9 changes: 9 additions & 0 deletions webpack-assets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"javascript": {
"main": "/public/main.js"
},
"styles": {
"main": "/public/main.css"
},
"assets": {}
}
Loading

0 comments on commit 29024e4

Please sign in to comment.