浏览代码

HUE-6719 [assist] Add a close button to the assist function panel

Johan Ahlen 8 年之前
父节点
当前提交
92ffdf8

文件差异内容过多而无法显示
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue.css


文件差异内容过多而无法显示
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue3-extra.css


+ 8 - 0
desktop/core/src/desktop/static/desktop/less/hue-assist.less

@@ -891,6 +891,14 @@
   margin: 0;
 }
 
+.assist-panel-close {
+  position: absolute;
+  right: 5px;
+  top: 5px;
+  width: 16px;
+  height: 16px;
+}
+
 .assist-assistant-panel {
   left: 0;
 

+ 1 - 0
desktop/core/src/desktop/templates/assist.mako

@@ -1677,6 +1677,7 @@ from notebook.conf import get_ordered_interpreters
         </div>
         <!-- ko if: selectedFunction -->
         <div class="assist-flex-half assist-function-details" data-bind="with: selectedFunction">
+          <div class="assist-panel-close"><button class="close" data-bind="click: function() { $parent.selectedFunction(null); }">&times;</button></div>
           <div class="assist-function-signature blue" data-bind="draggableText: { text: draggable, meta: { type: 'function' } }, text: signature, event: { 'dblclick': function () { huePubSub.publish('editor.insert.at.cursor', draggable); } }"></div>
           <!-- ko if: description -->
           <div data-bind="text: description"></div>

部分文件因为文件数量过多而无法显示