From bf2c8b3332be0c3fdee332a79b2c96078e8562f9 Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Thu, 18 Jun 2015 14:40:11 -0400 Subject: fixes mm-1297 can now scroll through more than 5 images --- web/react/components/post_body.jsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'web/react') diff --git a/web/react/components/post_body.jsx b/web/react/components/post_body.jsx index 55fc32c33..3079917ec 100644 --- a/web/react/components/post_body.jsx +++ b/web/react/components/post_body.jsx @@ -85,20 +85,22 @@ module.exports = React.createClass({ var postFiles = []; var images = []; if (filenames) { - for (var i = 0; i < filenames.length && i < Constants.MAX_DISPLAY_FILES; i++) { + for (var i = 0; i < filenames.length; i++) { var fileInfo = utils.splitFileLocation(filenames[i]); if (Object.keys(fileInfo).length === 0) continue; var type = utils.getFileType(fileInfo.ext); if (type === "image") { - postFiles.push( -
-
-
- ); + if (i < Constants.MAX_DISPLAY_FILES) { + postFiles.push( +
+
+
+ ); + } images.push(filenames[i]); - } else { + } else if (i < Constants.MAX_DISPLAY_FILES) { postFiles.push(
-- cgit v1.2.3-1-g7c22 From 4cabe1baea940f486463296a2e7cf8a40975d9d8 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Thu, 18 Jun 2015 10:55:51 -0800 Subject: fix for dockerhost HELIUM --- web/react/utils/constants.jsx | 1 + web/react/utils/utils.jsx | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'web/react') diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx index 0a3b1db3d..deb07409b 100644 --- a/web/react/utils/constants.jsx +++ b/web/react/utils/constants.jsx @@ -61,6 +61,7 @@ module.exports = { "channel", "internal", "localhost", + "dockerhost", "stag", "post", "cluster", diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index 628d92342..e57088614 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -28,6 +28,9 @@ module.exports.isTestDomain = function() { if ((/^localhost/).test(window.location.hostname)) return true; + if ((/^dockerhost/).test(window.location.hostname)) + return true; + if ((/^test/).test(window.location.hostname)) return true; @@ -75,8 +78,14 @@ module.exports.getDomainWithOutSub = function() { var parts = window.location.host.split("."); - if (parts.length == 1) - return "localhost:8065"; + if (parts.length == 1) { + if (parts[0].indexOf("dockerhost") > -1) { + return "dockerhost:8065"; + } + else { + return "localhost:8065"; + } + } return parts[1] + "." + parts[2]; } -- cgit v1.2.3-1-g7c22