diff --git a/src/firefly/java/edu/caltech/ipac/firefly/public/images/Help-16x16.png b/src/firefly/java/edu/caltech/ipac/firefly/public/images/Help-16x16.png new file mode 100755 index 0000000000..283335d9da Binary files /dev/null and b/src/firefly/java/edu/caltech/ipac/firefly/public/images/Help-16x16.png differ diff --git a/src/firefly/java/edu/caltech/ipac/firefly/public/images/Help.png b/src/firefly/java/edu/caltech/ipac/firefly/public/images/Help.png new file mode 100755 index 0000000000..c44195b1c7 Binary files /dev/null and b/src/firefly/java/edu/caltech/ipac/firefly/public/images/Help.png differ diff --git a/src/firefly/js/core/AppDataCntlr.js b/src/firefly/js/core/AppDataCntlr.js index 21a027ca85..3d9e4f901d 100644 --- a/src/firefly/js/core/AppDataCntlr.js +++ b/src/firefly/js/core/AppDataCntlr.js @@ -12,6 +12,7 @@ import strLeft from 'underscore.string/strLeft'; import strRight from 'underscore.string/strRight'; import {fetchUrl} from '../util/WebUtil.js'; import Point, {isValidPoint} from '../visualize/Point.js'; +import {getModuleName} from '../util/WebUtil.js'; const APP_DATA_PATH = 'app-data'; const SEARCH_TYPE = 'search'; @@ -38,6 +39,8 @@ const DISPLAY_MODE_CHANGE = `${APP_DATA_PATH}.displayModeChange`; const ADD_PREF = `${APP_DATA_PATH}.addPreference`; const REMOVE_PREF = `${APP_DATA_PATH}.removePreference`; +//const HELP_LOAD = `${APP_DATA_PATH}.helpLoad`; +const HELP_LOAD = `overviewHelp`; //note: consistent with AppMenu.prop /*---------------------------- CREATORS ----------------------------*/ @@ -58,7 +61,6 @@ const makeTaskId= function() { return TASK+taskCnt++; }; - const updateActiveTarget= function(state,action) { var {worldPt,corners}= action; if (!worldPt || !corners) return state; @@ -151,6 +153,30 @@ function loadAppData() { }; } +function onlineHelpLoad( action ) +{ + return () => { + var url = flux.getState()[APP_DATA_PATH].props['help.base.url']; // ending with '/' + var windowName = 'onlineHelp'; + var moduleName = getModuleName(); + + if (moduleName) { + url += moduleName; + windowName += '-' + moduleName; + } + + if (action.payload && action.payload.helpId) { + url += '/#id=' + action.payload.helpId; + } else { + url += '/'; + } + + if (url) { + window.open(url, windowName); + } + }; +} + /** * * @param appData {Object} The partial object to merge with the appData branch under root @@ -338,8 +364,10 @@ export default { UPDATE_LAYOUT, SEARCH_TYPE, DISPLAY_MODE_CHANGE, + HELP_LOAD, reducer, loadAppData, + onlineHelpLoad, updateAppData, isDialogVisible, getDialogOwner, diff --git a/src/firefly/js/core/ReduxFlux.js b/src/firefly/js/core/ReduxFlux.js index 9ce9bc2742..c14a69c9b0 100644 --- a/src/firefly/js/core/ReduxFlux.js +++ b/src/firefly/js/core/ReduxFlux.js @@ -67,6 +67,7 @@ let redux = null; // pre-map a set of action => creator prior to boostraping. actionCreators.set(AppDataCntlr.APP_LOAD, AppDataCntlr.loadAppData); +actionCreators.set(AppDataCntlr.HELP_LOAD, AppDataCntlr.onlineHelpLoad); actionCreators.set(FieldGroupCntlr.VALUE_CHANGE, FieldGroupCntlr.valueChangeActionCreator); actionCreators.set(ExternalAccessCntlr.EXTENSION_ACTIVATE, ExternalAccessCntlr.extensionActivateActionCreator); actionCreators.set(ImagePlotCntlr.PLOT_IMAGE, plotImageActionCreator); diff --git a/src/firefly/js/ui/FitsDownloadDialog.jsx b/src/firefly/js/ui/FitsDownloadDialog.jsx index 6128ad606d..35b28abc03 100644 --- a/src/firefly/js/ui/FitsDownloadDialog.jsx +++ b/src/firefly/js/ui/FitsDownloadDialog.jsx @@ -26,6 +26,7 @@ import {encodeUrl, ParamType} from '../util/WebUtil.js'; import RequestType from '../visualize/RequestType.js'; import {ServiceType} from '../visualize/WebPlotRequest.js'; +import HelpIcon from './HelpIcon.jsx'; function getDialogBuilder() { @@ -264,15 +265,33 @@ function FitsDownloadDialogForm() { {renderThreeBandButtons} -
| + |
+
+ < CompleteButton
+ text='Download'
+ onSuccess={ (request) => resultsSuccess(request, plot )}
+ onFail={resultsFail}
+ dialogId='fitsDownloadDialog'
+ />
+
+ |
+
+
+
+ |
+
| + |
+
+ < CompleteButton
+ text='OK' groupKey='FITS_ROTATION_FORM'
+ onSuccess={(request) =>resultsSuccess(request,plot.plotId)}
+ onFail={resultsFail}
+ dialogId='fitsRotationDialog'
+
+ />
+
+ |
+
+
+
+ |
+
|
+ |
+
+ |
+