You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by am...@apache.org on 2018/10/24 15:25:07 UTC

[couchdb-fauxton] branch master updated: Increase the width of string editor modal (#1140)

This is an automated email from the ASF dual-hosted git repository.

amaranhao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-fauxton.git


The following commit(s) were added to refs/heads/master by this push:
     new e8f9600  Increase the width of string editor modal (#1140)
e8f9600 is described below

commit e8f960013ed3b6d9dfe4532dd531cbd8e6ecb500
Author: Tim <ti...@wants.coffee>
AuthorDate: Wed Oct 24 23:25:00 2018 +0800

    Increase the width of string editor modal (#1140)
    
    Moves specified width styling from the parent .modal the .model-content
    so child models are able to specify their own width. Also removed the
    modal padding surrounding the text editor.
    
    Fixed an issue with mouse pointer not being visible on a few buttons.
    It was using `cursor: hand` which was only supported in very
    old IE's.
---
 .../components/assets/less/header-breadcrumbs.less      |  2 +-
 app/addons/components/assets/less/modals.less           |  2 +-
 app/addons/components/components/stringeditmodal.js     |  2 +-
 app/addons/documents/assets/less/doc-editor.less        | 17 ++++++++++++-----
 app/addons/documents/assets/less/documents.less         |  8 --------
 app/addons/documents/assets/less/view-editor.less       |  2 +-
 assets/less/fauxton.less                                | 15 +++++++++++++++
 7 files changed, 31 insertions(+), 17 deletions(-)

diff --git a/app/addons/components/assets/less/header-breadcrumbs.less b/app/addons/components/assets/less/header-breadcrumbs.less
index c4bacc4..7e4b8a0 100644
--- a/app/addons/components/assets/less/header-breadcrumbs.less
+++ b/app/addons/components/assets/less/header-breadcrumbs.less
@@ -33,7 +33,7 @@ a.faux-header__breadcrumbs-link {
   &:hover {
   color: @hoverHighlight;
   text-decoration: none;
-  cursor: hand;
+  cursor: pointer;
   }
 }
 
diff --git a/app/addons/components/assets/less/modals.less b/app/addons/components/assets/less/modals.less
index 2bc0472..93e1ba3 100644
--- a/app/addons/components/assets/less/modals.less
+++ b/app/addons/components/assets/less/modals.less
@@ -20,6 +20,6 @@
   &:hover {
     color: @hoverHighlight;
     text-decoration: none;
-    cursor: hand;
+    cursor: pointer;
   }
 }
diff --git a/app/addons/components/components/stringeditmodal.js b/app/addons/components/components/stringeditmodal.js
index edee0c9..0c699be 100644
--- a/app/addons/components/components/stringeditmodal.js
+++ b/app/addons/components/components/stringeditmodal.js
@@ -56,7 +56,7 @@ export class StringEditModal extends React.Component {
 
   render() {
     return (
-      <Modal dialogClassName="string-editor-modal" show={this.props.visible} onHide={this.closeModal}>
+      <Modal className="string-editor-modal" show={this.props.visible} onHide={this.closeModal}>
         <Modal.Header closeButton={true}>
           <Modal.Title>Edit Value <span id="string-edit-header"></span></Modal.Title>
         </Modal.Header>
diff --git a/app/addons/documents/assets/less/doc-editor.less b/app/addons/documents/assets/less/doc-editor.less
index 97895e8..b0f3e9e 100644
--- a/app/addons/documents/assets/less/doc-editor.less
+++ b/app/addons/documents/assets/less/doc-editor.less
@@ -83,7 +83,7 @@
     &:hover {
       color: @hoverHighlight;
       text-decoration: none;
-      cursor: hand;
+      cursor: pointer;
     }
   }
   .panel-button {
@@ -91,7 +91,7 @@
     &:hover {
       color: @hoverHighlight;
       text-decoration: none;
-      cursor: hand;
+      cursor: pointer;
     }
   }
 
@@ -195,9 +195,16 @@
   }
 }
 
-#editor-container div.string-editor-modal {
-  height: inherit;
-  max-height: 600px;
+div.string-editor-modal {
+  width: 80%;
+
+  .modal-content {
+    min-width: initial;
+  }
+
+  .modal-body {
+    padding: 0px;
+  }
 }
 
 .attachment-delimiter {
diff --git a/app/addons/documents/assets/less/documents.less b/app/addons/documents/assets/less/documents.less
index c161e9b..6e31c63 100644
--- a/app/addons/documents/assets/less/documents.less
+++ b/app/addons/documents/assets/less/documents.less
@@ -131,14 +131,6 @@ button.string-edit[disabled] {
   display: none;
 }
 
-#string-edit-modal {
-  div.modal {
-    overflow-x: visible;
-    width: initial;
-    min-width: 560px;
-  }
-}
-
 #string-editor-wrapper {
   height: 500px;
   width: 100%;
diff --git a/app/addons/documents/assets/less/view-editor.less b/app/addons/documents/assets/less/view-editor.less
index ddfb6ce..163c244 100644
--- a/app/addons/documents/assets/less/view-editor.less
+++ b/app/addons/documents/assets/less/view-editor.less
@@ -250,6 +250,6 @@ a.index-cancel-link {
   &:hover {
     color: @hoverHighlight;
     text-decoration: none;
-    cursor: hand;
+    cursor: pointer;
   }
 }
diff --git a/assets/less/fauxton.less b/assets/less/fauxton.less
index bffd722..5658e2e 100644
--- a/assets/less/fauxton.less
+++ b/assets/less/fauxton.less
@@ -142,6 +142,21 @@ a:hover {
   }
 }
 
+.modal {
+  transform: translateX(-50%);
+  margin-left: inherit;
+}
+
+.modal-dialog {
+  display: flex;
+  flex-direction: row;
+}
+
+.modal-content {
+  flex: 1;
+  width: 560px;
+}
+
 /*TABLE STYLES*/
 table.table {
   table-layout: fixed;