diff --git a/js/components/ascribe_accordion_list/accordion_list_item.js b/js/components/ascribe_accordion_list/accordion_list_item.js index 939c7fdd..a5537b51 100644 --- a/js/components/ascribe_accordion_list/accordion_list_item.js +++ b/js/components/ascribe_accordion_list/accordion_list_item.js @@ -13,6 +13,9 @@ import CreateEditionsForm from '../ascribe_forms/create_editions_form'; import PieceListActions from '../../actions/piece_list_actions'; import EditionListActions from '../../actions/edition_list_actions'; +import GlobalNotificationModel from '../../models/global_notification_model'; +import GlobalNotificationActions from '../../actions/global_notification_actions'; + import { getLangText } from '../../utils/lang_utils'; let Link = Router.Link; @@ -63,6 +66,9 @@ let AccordionListItem = React.createClass({ }); EditionListActions.toggleEditionList(pieceId); + + let notification = new GlobalNotificationModel('Editions successfully created', 'success', 10000); + GlobalNotificationActions.appendGlobalNotification(notification); }, getCreateEditionsDialog() { diff --git a/js/components/ascribe_detail/piece.js b/js/components/ascribe_detail/piece.js index 4b1430f2..b43b0173 100644 --- a/js/components/ascribe_detail/piece.js +++ b/js/components/ascribe_detail/piece.js @@ -24,6 +24,9 @@ import AclButtonList from './../ascribe_buttons/acl_button_list'; import CreateEditionsForm from '../ascribe_forms/create_editions_form'; import CreateEditionsButton from '../ascribe_buttons/create_editions_button'; +import GlobalNotificationModel from '../../models/global_notification_model'; +import GlobalNotificationActions from '../../actions/global_notification_actions'; + import { getLangText } from '../../utils/lang_utils'; import { mergeOptions } from '../../utils/general_utils'; @@ -89,6 +92,9 @@ let Piece = React.createClass({ key: 'num_editions', value: numEditions }); + + let notification = new GlobalNotificationModel('Editions successfully created', 'success', 10000); + GlobalNotificationActions.appendGlobalNotification(notification); }, render() { diff --git a/js/components/ascribe_forms/form.js b/js/components/ascribe_forms/form.js index e051928d..7e0d6b42 100644 --- a/js/components/ascribe_forms/form.js +++ b/js/components/ascribe_forms/form.js @@ -59,7 +59,6 @@ let Form = React.createClass({ for (let ref in this.refs){ data[this.refs[ref].props.name] = this.refs[ref].state.value; } - console.log(data); if ('getFormData' in this.props){ data = mergeOptionsWithDuplicates(data, this.props.getFormData()); } diff --git a/js/components/ascribe_piece_list_bulk_modal/piece_list_bulk_modal.js b/js/components/ascribe_piece_list_bulk_modal/piece_list_bulk_modal.js index ad48887f..d57afe13 100644 --- a/js/components/ascribe_piece_list_bulk_modal/piece_list_bulk_modal.js +++ b/js/components/ascribe_piece_list_bulk_modal/piece_list_bulk_modal.js @@ -10,10 +10,12 @@ import EditionListActions from '../../actions/edition_list_actions'; import UserStore from '../../stores/user_store'; import UserActions from '../../actions/user_actions'; +import PieceListStore from '../../stores/piece_list_store'; +import PieceListActions from '../../actions/piece_list_actions'; + import PieceListBulkModalSelectedEditionsWidget from './piece_list_bulk_modal_selected_editions_widget'; import AclButtonList from '../ascribe_buttons/acl_button_list'; - import { getAvailableAcls } from '../../utils/acl_utils'; import { getLangText } from '../../utils/lang_utils.js'; @@ -23,7 +25,11 @@ let PieceListBulkModal = React.createClass({ }, getInitialState() { - return mergeOptions(EditionListStore.getState(), UserStore.getState()); + return mergeOptions( + EditionListStore.getState(), + UserStore.getState(), + PieceListStore.getState() + ); }, onChange(state) { @@ -69,6 +75,8 @@ let PieceListBulkModal = React.createClass({ }, handleSuccess() { + PieceListActions.fetchPieceList(this.state.page, this.state.pageSize, this.state.search, this.state.orderBy, this.state.orderAsc); + this.fetchSelectedPieceEditionList() .forEach((pieceId) => { let editionsForPiece = this.state.editionList[pieceId]; diff --git a/js/components/ascribe_table/table_item_acl_filtered.js b/js/components/ascribe_table/table_item_acl_filtered.js index b3a6adb7..9eb3befa 100644 --- a/js/components/ascribe_table/table_item_acl_filtered.js +++ b/js/components/ascribe_table/table_item_acl_filtered.js @@ -9,7 +9,7 @@ let TableItemAclFiltered = React.createClass({ }, render() { - var availableAcls = ['acl_consign', 'acl_loan', 'acl_transfer', 'acl_view', 'acl_share', 'acl_unshare']; + var availableAcls = ['acl_consign', 'acl_loan', 'acl_transfer', 'acl_view', 'acl_share', 'acl_unshare', 'acl_delete']; let filteredAcls = Object.keys(this.props.content).filter((key) => { return availableAcls.indexOf(key) > -1 && this.props.content[key];