Ver Fonte

HUE-7505 [fb] Style file editor should be the same as file viewer

Enrico Berti há 8 anos atrás
pai
commit
14bafa4

+ 1 - 1
apps/filebrowser/src/filebrowser/static/filebrowser/css/display.css

@@ -14,4 +14,4 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
- */#fileviewerComponents .card-body{padding:0;margin:0}#fileviewerComponents .hue-breadcrumbs-bar{margin:0;padding-bottom:0}#fileviewerComponents #fileArea{overflow:auto;background-color:#F8F8F8;position:relative;font-size:12px}#fileviewerComponents #fileArea.loading{opacity:.7}#fileviewerComponents .binary{font-family:Roboto Mono,Menlo,Monaco,Consolas,"Courier New",monospace}#fileviewerComponents pre{border:none}#fileviewerComponents pre a{color:#424242;cursor:default;white-space:inherit}#fileviewerComponents pre a:hover{color:#424242;text-decoration:none}#fileviewerComponents .pagination-input-form{position:relative;right:1em;top:-10px}#fileviewerComponents .pagination-input{text-align:center;width:40px}#fileviewerComponents dd{margin-left:0;margin-bottom:6px}#fileviewerComponents .monospace{font-family:Roboto Mono,Menlo,Monaco,Consolas,"Courier New",monospace}
+ */#fileviewerComponents .card-body{padding:0;margin:0}#fileviewerComponents .hue-breadcrumbs-bar{margin:0;padding-bottom:0}#fileviewerComponents #fileArea{overflow:auto;background-color:#F8F8F8;position:relative;font-size:12px}#fileviewerComponents #fileArea.loading{opacity:.7}#fileviewerComponents .file-editor{font-size:12px}#fileviewerComponents .binary{font-family:Roboto Mono,Menlo,Monaco,Consolas,"Courier New",monospace}#fileviewerComponents pre{border:none}#fileviewerComponents pre a{color:#424242;cursor:default;white-space:inherit}#fileviewerComponents pre a:hover{color:#424242;text-decoration:none}#fileviewerComponents .pagination-input-form{position:relative;right:1em;top:-10px}#fileviewerComponents .pagination-input{text-align:center;width:40px}#fileviewerComponents dd{margin-left:0;margin-bottom:6px}#fileviewerComponents .monospace{font-family:Roboto Mono,Menlo,Monaco,Consolas,"Courier New",monospace}

+ 4 - 0
apps/filebrowser/src/filebrowser/static/filebrowser/less/display.less

@@ -39,6 +39,10 @@
     }
   }
 
+  .file-editor {
+    font-size: 12px;
+  }
+
   .binary {
     font-family: @font-family-monospace;
   }

+ 2 - 2
apps/filebrowser/src/filebrowser/templates/edit.mako

@@ -36,7 +36,7 @@ ${ fb_components.menubar() }
 %endif
 
 
-<div class="container-fluid">
+<div class="container-fluid" style="padding: 0">
   <div class="row-fluid">
     <div class="span12">
       <div class="card card-small">
@@ -58,7 +58,7 @@ ${ fb_components.menubar() }
               % endif
               ${edit.render_field(form["path"], hidden=True, notitle=True)}
               ${edit.render_field(form["encoding"], hidden=True, notitle=True)}
-              <div style="width: 98%; height: 100%;">${edit.render_field(form["contents"], tag="textarea", nolabel=True, notitle=True, klass="monospace", attrs=dict(
+              <div style="width: 98%; height: 100%;">${edit.render_field(form["contents"], tag="textarea", nolabel=True, notitle=True, klass="monospace file-editor", attrs=dict(
                 style="width:100%; height:400px; resize:none")) | n}</div>
               <input class="btn btn-primary" type="submit" name="save" value="${_('Save')}">
               <a id="saveAsBtn" class="btn">${_('Save as')}</a>