1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 09:35:10 +01:00

Merge branch 'master' into AD-456-ikonotv-branded-page-for-registra

This commit is contained in:
Tim Daubenschütz 2015-09-01 09:29:58 +02:00
commit af7938dbc7
5 changed files with 19 additions and 10 deletions

View File

@ -23,7 +23,7 @@ var argv = require('yargs').argv;
var server = require('./server.js').app; var server = require('./server.js').app;
var minifyCss = require('gulp-minify-css'); var minifyCss = require('gulp-minify-css');
var uglify = require('gulp-uglify'); var uglify = require('gulp-uglify');
var opn = require('opn');
var config = { var config = {
@ -48,8 +48,7 @@ var config = {
}, },
filesToWatch: [ filesToWatch: [
'build/css/*.css', 'build/css/*.css',
'build/js/*.js', 'build/js/*.js'
'node_modules/react-s3-fine_uploader/*.js'
] ]
}; };
@ -73,6 +72,9 @@ gulp.task('js:build', function() {
gulp.task('serve', ['browser-sync', 'run-server', 'sass:build', 'sass:watch', 'copy'], function() { gulp.task('serve', ['browser-sync', 'run-server', 'sass:build', 'sass:watch', 'copy'], function() {
bundle(true); bundle(true);
// opens the browser window with the correct url, which is localhost.com
opn('http://www.localhost.com:3000');
}); });
gulp.task('jest', function(done) { gulp.task('jest', function(done) {
@ -93,7 +95,9 @@ gulp.task('browser-sync', function() {
browserSync({ browserSync({
files: config.filesToWatch, files: config.filesToWatch,
proxy: 'http://localhost:4000', proxy: 'http://localhost:4000',
port: 3000 port: 3000,
open: false, // does not open the browser-window anymore (handled manually)
ghostMode: false
}); });
}); });

View File

@ -25,8 +25,9 @@ class PieceListActions {
orderBy, orderBy,
orderAsc, orderAsc,
filterBy, filterBy,
'pieceList': [], pieceList: [],
'pieceListCount': -1 pieceListCount: -1,
unfilteredPieceListCount: -1
}); });
// afterwards, we can load the list // afterwards, we can load the list
@ -42,8 +43,9 @@ class PieceListActions {
orderBy, orderBy,
orderAsc, orderAsc,
filterBy, filterBy,
'pieceList': res.pieces, pieceList: res.pieces,
'pieceListCount': res.count pieceListCount: res.count,
unfilteredPieceListCount: res.unfiltered_count
}); });
resolve(); resolve();
}) })

View File

@ -70,7 +70,7 @@ let PieceList = React.createClass({
}, },
componentDidUpdate() { componentDidUpdate() {
if (this.props.redirectTo && this.state.pieceListCount === 0) { if (this.props.redirectTo && this.state.unfilteredPieceListCount === 0) {
// FIXME: hack to redirect out of the dispatch cycle // FIXME: hack to redirect out of the dispatch cycle
window.setTimeout(() => this.transitionTo(this.props.redirectTo), 0); window.setTimeout(() => this.transitionTo(this.props.redirectTo), 0);
} }

View File

@ -21,6 +21,7 @@ class PieceListStore {
this.pieceList = []; this.pieceList = [];
// -1 specifies that the store is currently loading // -1 specifies that the store is currently loading
this.pieceListCount = -1; this.pieceListCount = -1;
this.unfilteredPieceListCount = -1;
this.page = 1; this.page = 1;
this.pageSize = 10; this.pageSize = 10;
this.search = ''; this.search = '';
@ -30,13 +31,14 @@ class PieceListStore {
this.bindActions(PieceListActions); this.bindActions(PieceListActions);
} }
onUpdatePieceList({ page, pageSize, search, pieceList, orderBy, orderAsc, pieceListCount, filterBy }) { onUpdatePieceList({ page, pageSize, search, pieceList, orderBy, orderAsc, pieceListCount, unfilteredPieceListCount, filterBy }) {
this.page = page; this.page = page;
this.pageSize = pageSize; this.pageSize = pageSize;
this.search = search; this.search = search;
this.orderAsc = orderAsc; this.orderAsc = orderAsc;
this.orderBy = orderBy; this.orderBy = orderBy;
this.pieceListCount = pieceListCount; this.pieceListCount = pieceListCount;
this.unfilteredPieceListCount = unfilteredPieceListCount;
this.filterBy = filterBy; this.filterBy = filterBy;
/** /**

View File

@ -69,6 +69,7 @@
"lodash": "^3.9.3", "lodash": "^3.9.3",
"moment": "^2.10.6", "moment": "^2.10.6",
"object-assign": "^2.0.0", "object-assign": "^2.0.0",
"opn": "^3.0.2",
"q": "^1.4.1", "q": "^1.4.1",
"raven-js": "^1.1.19", "raven-js": "^1.1.19",
"react": "^0.13.2", "react": "^0.13.2",