소스 검색

HUE-3708 [editor] Name and description edit pop-overs are misaligned for long values

Johan Ahlen 9 년 전
부모
커밋
842f852d76

+ 5 - 0
desktop/libs/notebook/src/notebook/static/notebook/css/notebook.css

@@ -1034,3 +1034,8 @@ h4.header {
   font-size: 60px;
   color: #DDD;
 }
+
+.notebook-name-desc {
+  overflow: hidden;
+  text-overflow: ellipsis;
+}

+ 4 - 2
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -300,11 +300,13 @@ ${ hueIcons.symbols() }
             <a title="${ _('Query history query') }"><i class="fa fa-fw fa-history"></i></a>
           </li>
           <li class="query-name">
-            <a href="javascript:void(0)"><span data-bind="editable: name, editableOptions: {enabled: true, placement: 'right', emptytext: '${_ko('Add a name...')}', tpl: '<input type=\'text\' maxlength=\'255\'>' }"></span></a>
+            <a href="javascript:void(0)">
+              <div class="notebook-name-desc" data-bind="editable: name, editableOptions: { enabled: true, placement: 'bottom', emptytext: '${_ko('Add a name...')}', tpl: '<input type=\'text\' maxlength=\'255\'>' }"></div>
+            </a>
           </li>
           <li data-bind="tooltip: { placement: 'bottom', title: description }">
             <a href="javascript:void(0)">
-              <span data-bind="editable: description, editableOptions: {enabled: true, placement: 'right', emptytext: '${_ko('Add a description...')}'}"></span>
+              <div class="notebook-name-desc" data-bind="editable: description, editableOptions: { enabled: true, placement: 'bottom', emptytext: '${_ko('Add a description...')}' }"></div>
             </a>
           </li>
           <!-- /ko -->