Explorar o código

HUE-5831 [assist] Use the svg document icons in the assist

Johan Ahlen %!s(int64=8) %!d(string=hai) anos
pai
achega
7f88750

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue.css


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
desktop/core/src/desktop/static/desktop/css/hue3-extra.css


+ 0 - 7
desktop/core/src/desktop/static/desktop/css/hue3.css

@@ -1620,13 +1620,6 @@ body {
   padding-left: 6px
 }
 
-.hi {
-  display: inline-block;
-  width: 1em;
-  height: 1em;
-  fill: currentColor;
-}
-
 .blurred {
   -webkit-filter: blur(5px);
   -moz-filter: blur(5px);

+ 9 - 0
desktop/core/src/desktop/static/desktop/less/hue-cross-version.less

@@ -128,4 +128,13 @@
 
 .close-popover {
   font-size: 19px;
+}
+
+.hi {
+  vertical-align: middle;
+  display: inline-block !important; //d3 conflict
+  width: 1em !important; //d3 conflict
+  height: 1em !important; //d3 conflict
+  fill: currentColor;
+  margin-bottom: 0.2em;
 }

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

@@ -506,13 +506,8 @@ from notebook.conf import get_ordered_interpreters
                  <i class='fa fa-info' title="${ _('Details') }"></i>
                </a>
              </div>
+               <!-- ko template: 'document-icon-template' --><!-- /ko -->
              <a href="javascript:void(0)" class="assist-entry assist-table-link" data-bind="click: open, attr: {'title': name }">
-               <!-- ko if: isDirectory -->
-               <i class="fa fa-fw fa-folder-o muted valign-middle"></i>
-               <!-- /ko -->
-               <!-- ko ifnot: isDirectory -->
-               <i class="fa fa-fw fa-file-o muted valign-middle"></i>
-               <!-- /ko -->
                <span data-bind="draggableText: { text: definition().name, meta: {'type': 'document', 'definition': definition()} }, text: definition().name"></span>
              </a>
            </li>

+ 1 - 32
desktop/core/src/desktop/templates/document_browser.mako

@@ -204,12 +204,6 @@ from desktop.views import _ko
       vertical-align: middle;
     }
 
-    .doc-browser-primary-col .hi {
-      vertical-align: middle;
-      display: inline-block;
-      margin-bottom: 0.2em;
-    }
-
     .doc-browser-attr-group {
       -ms-flex: 1;
       flex: 1;
@@ -785,32 +779,7 @@ from desktop.views import _ko
                 <!-- /ko -->
               </ul>
               <div class="doc-browser-primary-col">
-                <svg class="hi">
-                  <!-- ko if: isDirectory -->
-                  <use xlink:href="#hi-folder"></use>
-                  <!-- /ko -->
-                  <!-- ko ifnot: isDirectory -->
-                  <!-- ko switch: definition().type -->
-                  <!-- ko case: 'link-pigscript' --><use xlink:href="#hi-file-pig"></use><!-- /ko -->
-                  <!-- ko case: 'link-workflow' --><use xlink:href="#hi-file-job-designer"></use><!-- /ko -->
-                  <!-- ko case: 'notebook' --><use xlink:href="#hi-file-notebook"></use><!-- /ko -->
-                  <!-- ko case: 'oozie-bundle2' --><use xlink:href="#hi-file-oozie-bundle"></use><!-- /ko -->
-                  <!-- ko case: 'oozie-coordinator2' --><use xlink:href="#hi-file-oozie-coordinator"></use><!-- /ko -->
-                  <!-- ko case: 'oozie-workflow2' --><use xlink:href="#hi-file-oozie-workflow"></use><!-- /ko -->
-                  <!-- ko case: 'query-hive' --><use xlink:href="#hi-file-hive"></use><!-- /ko -->
-                  <!-- ko case: 'query-impala' --><use xlink:href="#hi-file-impala"></use><!-- /ko -->
-                  <!-- ko case: 'search-dashboard' --><use xlink:href="#hi-file-search"></use><!-- /ko -->
-                  <!-- ko case: $default --><use xlink:href="#hi-file"></use><!-- /ko -->
-                  <!-- /ko -->
-                  <!-- /ko -->
-
-                  <!-- ko if: (isShared() || isSharedWithMe()) && selected() -->
-                  <use xlink:href="#hi-share-addon-selected"></use>
-                  <!-- /ko -->
-                  <!-- ko if: (isShared() || isSharedWithMe()) && !selected() -->
-                  <use xlink:href="#hi-share-addon"></use>
-                  <!-- /ko -->
-                </svg>
+                <!-- ko template: 'document-icon-template' --><!-- /ko -->
                 <a href="javascript: void(0);" data-bind="text: definition().name, click: open, attr: { 'title': definition().name, 'href': definition().type === 'directory' ? '#' : definition().absoluteUrl }" class="margin-left-5"></a>
               </div>
               <div class="doc-browser-attr-group">

+ 28 - 0
desktop/core/src/desktop/templates/hue_icons.mako

@@ -140,4 +140,32 @@
       <path d="M255.918,317.813c-7.543,0-14.963,3.044-20.305,8.402c-5.347,5.353-8.452,12.767-8.452,20.355   c0,7.543,3.105,14.957,8.452,20.298c5.354,5.358,12.772,8.459,20.305,8.459c7.583,0,15.002-3.101,20.36-8.459   c5.348-5.353,8.453-12.767,8.453-20.298c0-7.589-3.105-15.003-8.453-20.355C270.926,320.863,263.506,317.813,255.918,317.813z"></path>
     </symbol>
   </svg>
+
+  <script type="text/html" id="document-icon-template">
+    <svg class="hi">
+    <!-- ko if: isDirectory -->
+    <use xlink:href="#hi-folder"></use>
+    <!-- /ko -->
+    <!-- ko ifnot: isDirectory -->
+    <!-- ko switch: definition().type -->
+    <!-- ko case: 'link-pigscript' --><use xlink:href="#hi-file-pig"></use><!-- /ko -->
+    <!-- ko case: 'link-workflow' --><use xlink:href="#hi-file-job-designer"></use><!-- /ko -->
+    <!-- ko case: 'notebook' --><use xlink:href="#hi-file-notebook"></use><!-- /ko -->
+    <!-- ko case: 'oozie-bundle2' --><use xlink:href="#hi-file-oozie-bundle"></use><!-- /ko -->
+    <!-- ko case: 'oozie-coordinator2' --><use xlink:href="#hi-file-oozie-coordinator"></use><!-- /ko -->
+    <!-- ko case: 'oozie-workflow2' --><use xlink:href="#hi-file-oozie-workflow"></use><!-- /ko -->
+    <!-- ko case: 'query-hive' --><use xlink:href="#hi-file-hive"></use><!-- /ko -->
+    <!-- ko case: 'query-impala' --><use xlink:href="#hi-file-impala"></use><!-- /ko -->
+    <!-- ko case: 'search-dashboard' --><use xlink:href="#hi-file-search"></use><!-- /ko -->
+    <!-- ko case: $default --><use xlink:href="#hi-file"></use><!-- /ko -->
+    <!-- /ko -->
+    <!-- /ko -->
+    <!-- ko if: (isShared() || isSharedWithMe()) && selected() -->
+    <use xlink:href="#hi-share-addon-selected"></use>
+    <!-- /ko -->
+    <!-- ko if: (isShared() || isSharedWithMe()) && !selected() -->
+    <use xlink:href="#hi-share-addon"></use>
+    <!-- /ko -->
+    </svg>
+  </script>
 </%def>

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio