From 71e9485458d842bb2ffaf86c8bd3df78e4c8c558 Mon Sep 17 00:00:00 2001 From: tengge1 <930372551@qq.com> Date: Tue, 24 Dec 2019 21:58:41 +0800 Subject: [PATCH] EditMapWindow --- .../editor/assets/window/EditMapWindow.jsx | 279 ++++++++++++++++++ .../assets/window/css/EditMapWindow.css | 37 +++ 2 files changed, 316 insertions(+) create mode 100644 ShadowEditor.Web/src/editor/assets/window/EditMapWindow.jsx create mode 100644 ShadowEditor.Web/src/editor/assets/window/css/EditMapWindow.css diff --git a/ShadowEditor.Web/src/editor/assets/window/EditMapWindow.jsx b/ShadowEditor.Web/src/editor/assets/window/EditMapWindow.jsx new file mode 100644 index 00000000..dd86f50c --- /dev/null +++ b/ShadowEditor.Web/src/editor/assets/window/EditMapWindow.jsx @@ -0,0 +1,279 @@ +import './css/EditMapWindow.css'; +import { PropTypes, Window, TabLayout, Content, Buttons, Form, FormControl, Label, Input, Select, ImageUploader, Button, CheckBox, DataGrid, Column, LinkButton } from '../../../third_party'; +import Ajax from '../../../utils/Ajax'; +import CategoryWindow from './CategoryWindow.jsx'; + +/** + * 编辑贴图窗口 + * @author tengge / https://github.com/tengge1 + */ +class EditMapWindow extends React.Component { + constructor(props) { + super(props); + + this.state = { + activeTabIndex: 0, + + name: props.data.Name, + categories: null, + categoryID: props.data.CategoryID, + thumbnail: props.data.Thumbnail, + isPublic: props.data.IsPublic, + + histories: [], + selectedHistory: null + }; + + this.handleActiveTabChange = this.handleActiveTabChange.bind(this); + + this.updateUI = this.updateUI.bind(this); + + this.handleNameChange = this.handleNameChange.bind(this); + this.handleCategoryChange = this.handleCategoryChange.bind(this); + this.handleThumbnailChange = this.handleThumbnailChange.bind(this); + this.handleIsPublicChange = this.handleIsPublicChange.bind(this); + this.handleEditCategoryList = this.handleEditCategoryList.bind(this); + + this.handleSelectHistory = this.handleSelectHistory.bind(this); + this.loadHistoryRenderer = this.loadHistoryRenderer.bind(this); + this.handleLoadHistory = this.handleLoadHistory.bind(this); + + this.handleSave = this.handleSave.bind(this, props.callback); + this.handleClose = this.handleClose.bind(this); + } + + render() { + const { typeName } = this.props; + const { activeTabIndex, name, categories, categoryID, thumbnail, isPublic, histories, selectedHistory } = this.state; + const { enableAuthority, authorities } = app.server; + + return + + +
+ + + + + + +