diff --git a/Gruntfile.js b/Gruntfile.js index 55c15596a..7dd557a52 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -4,14 +4,15 @@ module.exports = function (grunt) { // middleware for grunt.connect var middleware = function (connect, options, middlewares) { // inject a custom middleware into the array of default middlewares for proxy page + var bodyParser = require('body-parser'); var proxypage = require('proxypage'); var proxyRe = /\/proxy\/proxy.ashx/i; var enableCORS = function (req, res, next) { - res.setHeader('Access-Control-Allow-Origin', req.headers.origin); + res.setHeader('Access-Control-Allow-Origin', req.headers.origin || '*'); res.setHeader('Access-Control-Allow-Credentials', true); res.setHeader('Access-Control-Allow-Methods', 'GET,HEAD,PUT,PATCH,POST,DELETE'); - res.setHeader('Access-Control-Allow-Headers', req.headers['access-control-request-headers']); + res.setHeader('Access-Control-Allow-Headers', req.headers['access-control-request-headers'] || 'Origin, X-Requested-With, Content-Type, Accept'); return next(); }; @@ -24,8 +25,8 @@ module.exports = function (grunt) { middlewares.unshift(proxyMiddleware); middlewares.unshift(enableCORS); - middlewares.unshift(connect.json()); //body parser, see https://github.com/senchalabs/connect/wiki/Connect-3.0 - middlewares.unshift(connect.urlencoded()); //body parser + middlewares.unshift(bodyParser.json()); //body parser, see https://github.com/senchalabs/connect/wiki/Connect-3.0 + middlewares.unshift(bodyParser.urlencoded({extended: true})); //body parser return middlewares; }; @@ -124,6 +125,8 @@ module.exports = function (grunt) { port: 3000, base: 'viewer', hostname: '*', + protocol: 'https', + keepalive: true, middleware: middleware } }, @@ -132,16 +135,18 @@ module.exports = function (grunt) { port: 3001, base: 'dist/viewer', hostname: '*', + protocol: 'https', + keepalive: true, middleware: middleware } } }, open: { 'dev_browser': { - path: 'http://localhost:3000/index.html' + path: 'https://localhost:3000/index.html' }, 'build_browser': { - path: 'http://localhost:3001/index.html' + path: 'https://localhost:3001/index.html' } }, compress: { diff --git a/package.json b/package.json index 59520732c..905f125b3 100644 --- a/package.json +++ b/package.json @@ -3,26 +3,27 @@ "version": "2.0.0-beta.1", "author": "cmv.io - https://github.com/cmv/", "license": "MIT", - "year": "2016", - "homepage": "http://cmv.io/", + "year": "2017", + "homepage": "https://cmv.io/", "repository": "https://github.com/cmv/cmv-app/", "dependencies": { - "babel-eslint": "6.1.x", + "babel-eslint": "~7.1.1", "csslint": "1.0.x", "eslint": "3.5.x", "grunt": "1.0.x", "grunt-contrib-clean": "1.0.x", - "grunt-contrib-compress": "1.3.x", + "grunt-contrib-compress": "~1.4.1", "grunt-contrib-connect": "1.0.x", "grunt-contrib-copy": "1.0.x", - "grunt-contrib-csslint": "1.0.x", + "grunt-contrib-csslint": "~2.0.x", "grunt-contrib-cssmin": "1.0.x", - "grunt-contrib-uglify": "2.0.x", + "grunt-contrib-uglify": "2.1.x", "grunt-contrib-watch": "1.0.x", "grunt-eslint": "19.0.x", "grunt-newer": "1.2.x", "grunt-open": "0.2.x", "grunt-postcss": "0.8.x", + "body-parser": "1.16.x", "proxypage": "*" }, "engine": "node >= 4", diff --git a/viewer/css/cmv-theme-overrides.css b/viewer/css/cmv-theme-overrides.css index 3f118cb1e..55219bc4a 100644 --- a/viewer/css/cmv-theme-overrides.css +++ b/viewer/css/cmv-theme-overrides.css @@ -104,7 +104,9 @@ /* end esri mobile popup overrides */ /* esri directions widget overrides */ -.cmv .simpleDirections .esriDirectionsButton { +.cmv .simpleDirections .esriStopsGetDirections, +.cmv .simpleDirections .esriResultsPrint, +.simpleDirections .esriActivateButton { background-color: #E6E6E6; background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(1, #e6e6e6)); background-image: -webkit-linear-gradient(top, #fff 0%, #e6e6e6 100%); @@ -136,6 +138,30 @@ font-size: 14px; } +.cmv .simpleDirections .esriActivateButton { + padding: 8px; +} + +.cmv .simpleDirections .esriActivateButton:before { + content: '\f041'; + font-family: 'FontAwesome'; + font-size: 14px; +} + +.cmv .esriDirectionsPressedButton { + background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #fff), color-stop(1, #e6e6e6)); + background-image: -webkit-linear-gradient(bottom, #fff 0%, #e6e6e6 100%); + background-image: -moz-linear-gradient(bottom, #fff 0%, #e6e6e6 100%); + background-image: -o-linear-gradient(bottom, #fff 0%, #e6e6e6 100%); + background-image: -ms-linear-gradient(bottom, #fff 0%, #e6e6e6 100%); + background-image: linear-gradient(bottom, #fff 0%, #e6e6e6 100%); + background-repeat: repeat-x; + box-shadow: inset 0 2px 4px rgba(0,0,0,0.4), 0 1px 1px rgba(0,0,0,0.2); + border-top-color: #444; + border-color: #666; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,0.4), 0 1px 1px rgba(0,0,0,0.2); +} + .cmv .simpleDirections .esriLinkButton { color: #000; letter-spacing: 0; @@ -183,24 +209,51 @@ border-top: none; } -.flat .dijitButton .dijitButtonNode, -.flat .dijitDropDownButton .dijitButtonNode, -.flat .dijitComboButton .dijitButtonNode, -.flat .dijitToggleButton .dijitButtonNode, -.flat .dijitComboBox .dijitButtonNode, -.flat .dijitSpinnerButtonContainer.dijitButtonNode, -.flat .dijitSelect .dijitButtonNode { - background-color: #E6E6E6; - background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(1, #e6e6e6)); - background-image: -webkit-linear-gradient(top, #fff 0%, #e6e6e6 100%); - background-image: -moz-linear-gradient(top, #fff 0%, #e6e6e6 100%); - background-image: -o-linear-gradient(top, #fff 0%, #e6e6e6 100%); - background-image: -ms-linear-gradient(top, #fff 0%, #e6e6e6 100%); - background-image: linear-gradient(top, #fff 0%, #e6e6e6 100%); +.flat .dijitButtonHover .dijitButtonNode, +.flat .dijitDropDownButtonHover .dijitButtonNode, +.flat .dijitComboButton .dijitButtonNodeHover, +.flat .dijitComboButton .dijitDownArrowButtonHover, +.flat .dijitToggleButtonHover .dijitButtonNode, +.flat .dijitDropDownButtonActive .dijitButtonNode { + background-position: 0 -15px; + text-decoration: none; + transition: background-position 0.1s linear; + -moz-transition: background-position 0.1s linear; + -ms-transition: background-position 0.1s linear; + -o-transition: background-position 0.1s linear; + -webkit-transition: background-position 0.1s linear; +} +.flat .dijitButtonActive .dijitButtonNode, +.flat .dijitComboButton .dijitButtonNodeActive, +.flat .dijitToggleButtonActive .dijitButtonNode, +.flat .dijitToggleButtonChecked .dijitButtonNode, +.flat .dijitComboButton .dijitArrowButton.dijitHasDropDownOpen { + background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #fff), color-stop(1, #e6e6e6)); + background-image: -webkit-linear-gradient(bottom, #fff 0%, #e6e6e6 100%); + background-image: -moz-linear-gradient(bottom, #fff 0%, #e6e6e6 100%); + background-image: -o-linear-gradient(bottom, #fff 0%, #e6e6e6 100%); + background-image: -ms-linear-gradient(bottom, #fff 0%, #e6e6e6 100%); + background-image: linear-gradient(bottom, #fff 0%, #e6e6e6 100%); background-repeat: repeat-x; - border-color: #BBB; - border-bottom-color: #A8A8A8; - padding: 4px 12px; + box-shadow: inset 0 2px 4px rgba(0,0,0,0.4), 0 1px 1px rgba(0,0,0,0.2); + border-top-color: #444; + border-color: #666; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,0.4), 0 1px 1px rgba(0,0,0,0.2); +} +.flat .dijitButtonDisabled .dijitButtonNode, +.flat .dijitDropDownButtonDisabled .dijitButtonNode, +.flat .dijitComboButtonDisabled .dijitButtonNode, +.flat .dijitToggleButtonDisabled .dijitButtonNode, +.flat .dijitComboBoxDisabled .dijitButtonNode, +.flat .dijitSpinnerDisabled .dijitButtonNode, +.flat .dijitSelectDisabled .dijitButtonNode { + background-image: none; + box-shadow: none; + cursor: not-allowed; + filter: alpha(opacity=65); + opacity: 0.65; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=65); + -webkit-box-shadow: none; } .flat .success .dijitButtonNode {