1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 09:23:13 +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 minifyCss = require('gulp-minify-css');
var uglify = require('gulp-uglify');
var opn = require('opn');
var config = {
@ -48,8 +48,7 @@ var config = {
},
filesToWatch: [
'build/css/*.css',
'build/js/*.js',
'node_modules/react-s3-fine_uploader/*.js'
'build/js/*.js'
]
};
@ -73,6 +72,9 @@ gulp.task('js:build', function() {
gulp.task('serve', ['browser-sync', 'run-server', 'sass:build', 'sass:watch', 'copy'], function() {
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) {
@ -93,7 +95,9 @@ gulp.task('browser-sync', function() {
browserSync({
files: config.filesToWatch,
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,
orderAsc,
filterBy,
'pieceList': [],
'pieceListCount': -1
pieceList: [],
pieceListCount: -1,
unfilteredPieceListCount: -1
});
// afterwards, we can load the list
@ -42,8 +43,9 @@ class PieceListActions {
orderBy,
orderAsc,
filterBy,
'pieceList': res.pieces,
'pieceListCount': res.count
pieceList: res.pieces,
pieceListCount: res.count,
unfilteredPieceListCount: res.unfiltered_count
});
resolve();
})

View File

@ -70,7 +70,7 @@ let PieceList = React.createClass({
},
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
window.setTimeout(() => this.transitionTo(this.props.redirectTo), 0);
}

View File

@ -21,6 +21,7 @@ class PieceListStore {
this.pieceList = [];
// -1 specifies that the store is currently loading
this.pieceListCount = -1;
this.unfilteredPieceListCount = -1;
this.page = 1;
this.pageSize = 10;
this.search = '';
@ -30,13 +31,14 @@ class PieceListStore {
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.pageSize = pageSize;
this.search = search;
this.orderAsc = orderAsc;
this.orderBy = orderBy;
this.pieceListCount = pieceListCount;
this.unfilteredPieceListCount = unfilteredPieceListCount;
this.filterBy = filterBy;
/**

View File

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