Explorar el Código

rename NewPageNameInput to PagePathAutoComplete

Yuki Takei hace 7 años
padre
commit
af20ef60c7
Se han modificado 2 ficheros con 9 adiciones y 9 borrados
  1. 4 4
      src/client/js/app.js
  2. 5 5
      src/client/js/components/PagePathAutoComplete.jsx

+ 4 - 4
src/client/js/app.js

@@ -29,7 +29,7 @@ import SeenUserList     from './components/SeenUserList';
 import RevisionPath     from './components/Page/RevisionPath';
 import RevisionUrl      from './components/Page/RevisionUrl';
 import BookmarkButton   from './components/BookmarkButton';
-import NewPageNameInput from './components/NewPageNameInput';
+import PagePathAutoComplete from './components/PagePathAutoComplete';
 import RecentCreated from './components/RecentCreated/RecentCreated';
 
 import CustomCssEditor  from './components/Admin/CustomCssEditor';
@@ -281,9 +281,9 @@ const componentMappings = {
   'bookmark-button': <BookmarkButton pageId={pageId} crowi={crowi} />,
   'bookmark-button-lg': <BookmarkButton pageId={pageId} crowi={crowi} size="lg" />,
 
-  'create-page-name-input': <NewPageNameInput crowi={crowi} initializedPath={pagePath} addSlashToTheEnd={true} />,
-  'rename-page-name-input': <NewPageNameInput crowi={crowi} initializedPath={pagePath} />,
-  'duplicate-page-name-input': <NewPageNameInput crowi={crowi} initializedPath={pagePath} />,
+  'create-page-name-input': <PagePathAutoComplete crowi={crowi} initializedPath={pagePath} addSlashToTheEnd={true} />,
+  'rename-page-name-input': <PagePathAutoComplete crowi={crowi} initializedPath={pagePath} />,
+  'duplicate-page-name-input': <PagePathAutoComplete crowi={crowi} initializedPath={pagePath} />,
 
 };
 // additional definitions if data exists

+ 5 - 5
src/client/js/components/NewPageNameInput.js → src/client/js/components/PagePathAutoComplete.jsx

@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
 import * as pagePathUtils from '@commons/util/page-path-utils';
 import SearchTypeahead from './SearchTypeahead';
 
-export default class NewPageNameInput extends React.Component {
+export default class PagePathAutoComplete extends React.Component {
 
   constructor(props) {
 
@@ -59,8 +59,8 @@ export default class NewPageNameInput extends React.Component {
           onSearchError={this.onSearchError}
           onSubmit={this.onSubmit}
           inputName='new_path'
-          emptyLabel={emptyLabel}
-          placeholder="Input page name"
+          emptyLabel={null}
+          placeholder="Input page path"
           keywordOnInit={this.getKeywordOnInit(this.props.initializedPath)}
         />
       </div>
@@ -68,12 +68,12 @@ export default class NewPageNameInput extends React.Component {
   }
 }
 
-NewPageNameInput.propTypes = {
+PagePathAutoComplete.propTypes = {
   crowi:            PropTypes.object.isRequired,
   initializedPath:  PropTypes.string,
   addSlashToTheEnd: PropTypes.bool,
 };
 
-NewPageNameInput.defaultProps = {
+PagePathAutoComplete.defaultProps = {
   initializedPath: '/',
 };