Răsfoiți Sursa

Merge branch 'master' into feat/integrate-with-hackmd

Yuki Takei 7 ani în urmă
părinte
comite
c477c94776

+ 2 - 1
CHANGES.md

@@ -7,7 +7,8 @@ CHANGES
 
 
 ## 3.1.14-RC
 ## 3.1.14-RC
 
 
-* 
+* Improvement: Show help for header search box
+* Fix: Couldn't delete page completely from search result page
 
 
 ## 3.1.13
 ## 3.1.13
 
 

+ 21 - 17
resource/js/components/HeaderSearchBox/SearchForm.js

@@ -46,23 +46,27 @@ export default class SearchForm extends React.Component {
   }
   }
 
 
   getHelpElement() {
   getHelpElement() {
-    return <table className="table m-1">
-            <caption className="text-left text-primary p-2 mb-2">
-              <h5 className="m-1"><i className="icon-magnifier pr-2 mb-2"/>Search Help</h5>
-            </caption>
-            <tr>
-              <td className="text-right mt-0 pr-2 p-1"><code>keyword</code></td>
-              <th className="mr-2"><h6 className="pr-2 m-0 pt-1">記事名 or 本文に<samp>"keyword"</samp>を含む</h6></th>
-            </tr>
-             <tr>
-              <td className="text-right mt-0 pr-2 p-1"><code>a b</code></td>
-              <th><h6 className="m-0 pt-1">文字列<samp>"a"</samp>と<samp>"b"</samp>を含む (スペース区切り)</h6></th>
-            </tr>
-            <tr>
-              <td className="text-right mt-0 pr-2 p-1"><code>-keyword</code></td>
-              <th><h6 className="m-0 pt-1">文字列<samp>"keyword"</samp>を含まない</h6></th>
-            </tr>
-          </table>;
+    return (
+      <table className="table m-1 search-help">
+        <caption className="text-left text-primary p-2 mb-2">
+          <h5 className="m-1"><i className="icon-magnifier pr-2 mb-2"/>Search Help</h5>
+        </caption>
+        <tbody>
+          <tr>
+            <td className="text-right mt-0 pr-2 p-1"><code>keyword</code></td>
+            <th className="mr-2"><h6 className="pr-2 m-0 pt-1">記事名 or 本文に<samp>"keyword"</samp>を含む</h6></th>
+          </tr>
+          <tr>
+            <td className="text-right mt-0 pr-2 p-1"><code>a b</code></td>
+            <th><h6 className="m-0 pt-1">文字列<samp>"a"</samp>と<samp>"b"</samp>を含む (スペース区切り)</h6></th>
+          </tr>
+          <tr>
+            <td className="text-right mt-0 pr-2 p-1"><code>-keyword</code></td>
+            <th><h6 className="m-0 pt-1">文字列<samp>"keyword"</samp>を含まない</h6></th>
+          </tr>
+        </tbody>
+      </table>
+    );
   }
   }
 
 
   onSubmit(query) {
   onSubmit(query) {

+ 2 - 2
resource/js/components/SearchPage/DeletePageListModal.js

@@ -43,8 +43,8 @@ export default class DeletePageListModal extends React.Component {
         <Modal.Footer>
         <Modal.Footer>
           <div className="d-flex justify-content-between">
           <div className="d-flex justify-content-between">
             <span className="text-danger">{this.props.errorMessage}</span>
             <span className="text-danger">{this.props.errorMessage}</span>
-            <span className="d-flex">
-              <Checkbox onClick={this.props.toggleDeleteCompletely}>Delete completely</Checkbox>
+            <span className="d-flex align-items-center">
+              <Checkbox className="text-danger" onClick={this.props.toggleDeleteCompletely} inline={true}>Delete completely</Checkbox>
               <span className="m-l-10">
               <span className="m-l-10">
                 <Button onClick={this.props.confirmedToDelete}><i className="icon-trash"></i>Delete</Button>
                 <Button onClick={this.props.confirmedToDelete}><i className="icon-trash"></i>Delete</Button>
               </span>
               </span>

+ 6 - 0
resource/styles/scss/_search.scss

@@ -92,6 +92,12 @@
       width: 300px;
       width: 300px;
     }
     }
   }
   }
+
+  table.search-help {
+    th, td {
+      border: none;
+    }
+  }
 }
 }
 .search-sidebar {
 .search-sidebar {
   .search-form, .form-group, .rbt-input.form-control, .input-group {
   .search-form, .form-group, .rbt-input.form-control, .input-group {