Эх сурвалжийг харах

[notebook] Show snippet title on hover

It's now also possible to edit the name inline, outside the edit mode.
Johan Ahlen 10 жил өмнө
parent
commit
74559e2

+ 7 - 1
desktop/libs/notebook/src/notebook/static/notebook/css/notebook.css

@@ -344,12 +344,18 @@ body {
   -ms-transition: color 0.2s ease;
 }
 
+.hover-actions .editable {
+  color: #D1D1D1;
+}
+
+.hover-actions:hover .editable,
 .hover-actions:hover .snippet-icon {
   color: #338bb8;
 }
 
 .hover-actions sup,
-.hover-actions .caret {
+.hover-actions .caret,
+.hover-actions .editable {
   -webkit-transition: color 0.2s ease;
   -moz-transition: color 0.2s ease;
   -ms-transition: color 0.2s ease;

+ 1 - 1
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -367,7 +367,7 @@ ${ require.config() }
           </ul>
         </div>
 
-        <span data-bind="editable: name, editableOptions: {enabled: $root.isEditing(), placement: 'right'}"></span>
+        <div class="hover-actions"><span data-bind="editable: name, editableOptions: { emptytext: '${_ko('Untitled')}', mode: 'inline', enabled: true, placement: 'right' }" style="border:none;"></span></div>
 
         <div class="hover-actions inline pull-right" style="font-size: 15px;">
           <a href="javascript:void(0)" class="move-widget"><i class="fa fa-arrows"></i></a>