mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 01:39:36 +01:00
add ContractSettingsUpdateButton boilerplate code
This commit is contained in:
parent
c08f46bd69
commit
c5ef3cacd5
@ -70,7 +70,7 @@ let Property = React.createClass({
|
|||||||
// In order to set this.state.value from another component
|
// In order to set this.state.value from another component
|
||||||
// the state of value should only be set if its not undefined and
|
// the state of value should only be set if its not undefined and
|
||||||
// actually references something
|
// actually references something
|
||||||
if(typeof childInput.getDOMNode().value !== 'undefined') {
|
if(childInput && typeof childInput.getDOMNode().value !== 'undefined') {
|
||||||
this.setState({
|
this.setState({
|
||||||
value: childInput.getDOMNode().value
|
value: childInput.getDOMNode().value
|
||||||
});
|
});
|
||||||
|
@ -9,12 +9,14 @@ import ContractListStore from '../../stores/contract_list_store';
|
|||||||
import ContractListActions from '../../actions/contract_list_actions';
|
import ContractListActions from '../../actions/contract_list_actions';
|
||||||
|
|
||||||
import ActionPanel from '../ascribe_panel/action_panel';
|
import ActionPanel from '../ascribe_panel/action_panel';
|
||||||
|
import ContractSettingsUpdateButton from './contract_settings_update_button';
|
||||||
|
|
||||||
import GlobalNotificationModel from '../../models/global_notification_model';
|
import GlobalNotificationModel from '../../models/global_notification_model';
|
||||||
import GlobalNotificationActions from '../../actions/global_notification_actions';
|
import GlobalNotificationActions from '../../actions/global_notification_actions';
|
||||||
|
|
||||||
import { getLangText } from '../../utils/lang_utils';
|
import { getLangText } from '../../utils/lang_utils';
|
||||||
|
|
||||||
|
|
||||||
let ContractSettings = React.createClass({
|
let ContractSettings = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
defaultExpanded: React.PropTypes.bool
|
defaultExpanded: React.PropTypes.bool
|
||||||
@ -97,7 +99,7 @@ let ContractSettings = React.createClass({
|
|||||||
<CollapsibleParagraph
|
<CollapsibleParagraph
|
||||||
title={getLangText('Contracts')}
|
title={getLangText('Contracts')}
|
||||||
show={true}
|
show={true}
|
||||||
defaultExpanded={false}>
|
defaultExpanded={true}>
|
||||||
<CollapsibleParagraph
|
<CollapsibleParagraph
|
||||||
title={getLangText('Public Contracts')}
|
title={getLangText('Public Contracts')}
|
||||||
show={true}
|
show={true}
|
||||||
@ -155,9 +157,7 @@ let ContractSettings = React.createClass({
|
|||||||
onClick={this.makeContractPublic(contract)}>
|
onClick={this.makeContractPublic(contract)}>
|
||||||
MAKE PUBLIC
|
MAKE PUBLIC
|
||||||
</button>
|
</button>
|
||||||
<button className="btn btn-default btn-sm margin-left-2px">
|
<ContractSettingsUpdateButton />
|
||||||
UPDATE
|
|
||||||
</button>
|
|
||||||
<a
|
<a
|
||||||
className="btn btn-default btn-sm margin-left-2px"
|
className="btn btn-default btn-sm margin-left-2px"
|
||||||
href={contract.blob.url_safe}
|
href={contract.blob.url_safe}
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
|
||||||
|
let ContractSettingsUpdateButton = React.createClass({
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<button className="btn btn-default btn-sm margin-left-2px">
|
||||||
|
UPDATE
|
||||||
|
</button>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
export default ContractSettingsUpdateButton;
|
@ -2,14 +2,11 @@
|
|||||||
|
|
||||||
import React from 'react/addons';
|
import React from 'react/addons';
|
||||||
import Router from 'react-router';
|
import Router from 'react-router';
|
||||||
|
import fineUploader from 'fineUploader';
|
||||||
import Q from 'q';
|
import Q from 'q';
|
||||||
|
|
||||||
import { getCookie } from '../../utils/fetch_api_utils';
|
|
||||||
import { getLangText } from '../../utils/lang_utils';
|
|
||||||
|
|
||||||
import S3Fetcher from '../../fetchers/s3_fetcher';
|
import S3Fetcher from '../../fetchers/s3_fetcher';
|
||||||
|
|
||||||
import fineUploader from 'fineUploader';
|
|
||||||
import FileDragAndDrop from './ascribe_file_drag_and_drop/file_drag_and_drop';
|
import FileDragAndDrop from './ascribe_file_drag_and_drop/file_drag_and_drop';
|
||||||
|
|
||||||
import GlobalNotificationModel from '../../models/global_notification_model';
|
import GlobalNotificationModel from '../../models/global_notification_model';
|
||||||
@ -17,8 +14,11 @@ import GlobalNotificationActions from '../../actions/global_notification_actions
|
|||||||
|
|
||||||
import AppConstants from '../../constants/application_constants';
|
import AppConstants from '../../constants/application_constants';
|
||||||
|
|
||||||
|
import { getCookie } from '../../utils/fetch_api_utils';
|
||||||
|
import { getLangText } from '../../utils/lang_utils';
|
||||||
import { computeHashOfFile } from '../../utils/file_utils';
|
import { computeHashOfFile } from '../../utils/file_utils';
|
||||||
|
|
||||||
|
|
||||||
var ReactS3FineUploader = React.createClass({
|
var ReactS3FineUploader = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
keyRoutine: React.PropTypes.shape({
|
keyRoutine: React.PropTypes.shape({
|
||||||
|
Loading…
Reference in New Issue
Block a user