浏览代码

[notebook] Fixed delete snippet dialog and execute/indent icons

Enrico Berti 9 年之前
父节点
当前提交
2b5b259

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

@@ -787,6 +787,13 @@ table.airy tr td {
   color: #338bb8;
 }
 
+.snippet-actions-compact > .snippet-side-btn {
+  line-height: 20px;
+  height: 20px;
+  min-height: 20px;
+  padding: 0 4px;
+}
+
 .execution-timer {
   color: #d1d1d1;
   font-size: 12px;

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

@@ -893,7 +893,7 @@ ${ require.config() }
 </script>
 
 <script type ="text/html" id="snippet-execution-controls">
-  <div class="snippet-actions" style="position: absolute; bottom: 0">
+  <div class="snippet-actions" style="position: absolute; bottom: 0" data-bind="css: {'snippet-actions-compact': !$root.editorMode}">
     <a class="snippet-side-btn" style="cursor: default;" data-bind="visible: status() == 'loading'" title="${ _('Creating session') }">
       <i class="fa fa-fw fa-spinner fa-spin"></i>
     </a>
@@ -1010,8 +1010,8 @@ ${ require.config() }
     <p>${_('Are you sure you want to remove this snippet?')}</p>
   </div>
   <div class="modal-footer" data-bind="with: $root.removeSnippetConfirmation">
-    <a class="btn" data-dismiss="modal" data-bind="click: function() { $root.removeSnippetConfirmation(null); }">${_('No')}</a>
-    <input type="submit" data-dismiss="modal" value="${_('Yes')}" class="btn btn-danger" data-bind="click: function() { notebook.snippets.remove(snippet); window.setTimeout(redrawFixedHeaders, 100); $root.removeSnippetConfirmation(null); }" />
+    <a class="btn" data-bind="click: function() { $root.removeSnippetConfirmation(null); $('#removeSnippetModal').modal('hide'); }">${_('No')}</a>
+    <input type="submit" value="${_('Yes')}" class="btn btn-danger" data-bind="click: function() { notebook.snippets.remove(snippet); window.setTimeout(redrawFixedHeaders, 100); $root.removeSnippetConfirmation(null); $('#removeSnippetModal').modal('hide'); }" />
   </div>
 </div>