Selaa lähdekoodia

HUE-6578 [editor] Move row details modal to common footer

Enrico Berti 8 vuotta sitten
vanhempi
commit
ba3c9b6

+ 31 - 0
desktop/core/src/desktop/templates/common_header_footer_components.mako

@@ -430,6 +430,17 @@ from metadata.conf import has_optimizer, OPTIMIZER
   <div class="modal-footer"></div>
 </div>
 
+<div id="rowDetailsModal" class="modal transparent-modal hide" data-backdrop="true" style="width:980px;margin-left:-510px!important;z-index:1071">
+  <div class="modal-header">
+    <button type="button" class="close" data-dismiss="modal" aria-label="${ _('Close') }"><span aria-hidden="true">&times;</span></button>
+    <h2 class="modal-title">${_('Row details')}</h2>
+  </div>
+  <div class="modal-body">
+    <table class="table table-condensed">
+
+    </table>
+  </div>
+</div>
 
 <script type="text/javascript">
 
@@ -446,7 +457,27 @@ from metadata.conf import has_optimizer, OPTIMIZER
     });
   });
 
+
   $(document).ready(function () {
+
+    huePubSub.subscribe('table.row.dblclick', function(data){
+      var $el = $(data.table);
+      var $t = $('#rowDetailsModal').find('table');
+      $t.html('');
+      var html = '';
+      $el.find('thead th').each(function (colIdx, col) {
+        if (colIdx > 0){
+          html += '<tr><th width="10%">' + $(col).text() + '</th><td>' + $el.data('data')[data.idx][colIdx] + '</td></tr>';
+        }
+      });
+      $t.html(html);
+      $('#rowDetailsModal').modal('show');
+    });
+
+    $('#rowDetailsModal').on('shown', function () {
+      $('.modal-backdrop').css('z-index', '1070');
+    });
+
     if ($.fn.editableform) {
       $.fn.editableform.buttons =
           '<button type="submit" class="btn btn-primary editable-submit disable-feedback">' +

+ 0 - 32
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -373,18 +373,6 @@ from notebook.conf import ENABLE_QUERY_BUILDER, ENABLE_QUERY_SCHEDULING, ENABLE_
 
 <%def name="commonHTML(is_embeddable=False)">
 
-<div id="detailsModal" class="modal transparent-modal hide" data-backdrop="true" style="width:980px;margin-left:-510px!important">
-  <div class="modal-header">
-    <button type="button" class="close" data-dismiss="modal" aria-label="${ _('Close') }"><span aria-hidden="true">&times;</span></button>
-    <h2 class="modal-title">${_('Row details')}</h2>
-  </div>
-  <div class="modal-body">
-    <table class="table table-condensed">
-
-    </table>
-  </div>
-</div>
-
 <div id="helpModal" class="modal transparent-modal hide" data-backdrop="true" style="width:980px;margin-left:-510px!important">
   <div class="modal-header">
     <button type="button" class="close" data-dismiss="modal" aria-label="${ _('Close') }"><span aria-hidden="true">&times;</span></button>
@@ -2872,26 +2860,6 @@ from notebook.conf import ENABLE_QUERY_BUILDER, ENABLE_QUERY_SCHEDULING, ENABLE_
       }
     }, HUE_PUB_SUB_APP);
 
-    huePubSub.subscribe('table.row.dblclick', function(data){
-      var $el = $(data.table);
-
-      var $t = $('#detailsModal').find('table');
-      $t.html('');
-
-      var html = '';
-
-      $el.find('thead th').each(function (colIdx, col) {
-        if (colIdx > 0){
-          html += '<tr><th width="10%">' + $(col).text() + '</th><td>' + $el.data('data')[data.idx][colIdx] + '</td></tr>';
-        }
-      });
-
-      $t.html(html);
-
-      $('#detailsModal').modal('show');
-
-    }, HUE_PUB_SUB_APP);
-
     window.redrawFixedHeaders = redrawFixedHeaders;
 
     function addAce(content, snippetType) {