Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | 1x 1x 1x 1x 1x 1x 4x 3x 2x 1x 3x 2x | /*
* Copyright 2020, GeoSolutions Sas.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
export const SAVING_RESOURCE = 'GEONODE:SAVING_RESOURCE';
export const SAVE_SUCCESS = 'GEONODE:SAVE_SUCCESS';
export const SAVE_ERROR = 'GEONODE:SAVE_ERROR';
export const CLEAR_SAVE = 'GEONODE:CLEAR_SAVE';
export const SAVE_CONTENT = 'GEONODE:SAVE_CONTENT';
export const UPDATE_RESOURCE_BEFORE_SAVE = 'GEONODE:UPDATE_RESOURCE_BEFORE_SAVE';
/**
* Actions for GeoNode save workflow
* @name actions.gnsave
*/
/**
* Initialize saving loading state
* @memberof actions.gnsave
*/
export function savingResource() {
return {
type: SAVING_RESOURCE
};
}
/**
* Set success response of save workflow
* @memberof actions.gnsave
* @param {object} success success response
*/
export function saveSuccess(success) {
return {
type: SAVE_SUCCESS,
success
};
}
/**
* Set error response of save workflow
* @memberof actions.gnsave
* @param {object} error error response
*/
export function saveError(error) {
return {
type: SAVE_ERROR,
error
};
}
/**
* Clear state of gnsave reducer
* @memberof actions.gnsave
*/
export function clearSave() {
return {
type: CLEAR_SAVE
};
}
/**
* Save or create a resource (trigger epic gnSaveContent)
* @memberof actions.gnsave
* @param {number|string} id resource id or primary key, create a new resource if undefined
* @param {object} metadata properties to update { name, description, thumbnail }
* @param {bool} reload reload page on create
*/
export function saveContent(id, metadata, reload) {
return {
type: SAVE_CONTENT,
id,
metadata,
reload
};
}
/**
* Update current resource properties (trigger epic gnUpdateResource)
* @memberof actions.gnsave
* @param {number|string} id resource id or primary key
*/
export function updateResourceBeforeSave(id) {
return {
type: UPDATE_RESOURCE_BEFORE_SAVE,
id
};
}
|