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

HUE-5890 [importer] Steps shouldn't have a pointer cursor if it's not possible to select them

Enrico Berti 8 жил өмнө
parent
commit
d365712

+ 0 - 2
desktop/core/src/desktop/static/desktop/css/wizard.css

@@ -113,12 +113,10 @@
   margin: 0 auto;
   position: relative;
   z-index: 1;
-  cursor: pointer;
 }
 
 .step-indicator .caption {
   box-sizing: border-box;
   color: #dddddd;
   padding: 11px 16px;
-  cursor: pointer;
 }

+ 7 - 3
desktop/libs/indexer/src/indexer/templates/importer.mako

@@ -331,7 +331,7 @@ ${ assist.assistPanel() }
   <div data-bind="visible: createWizard.show">
     <div class="step-indicator-fixed">
       <ol class="list-inline text-center step-indicator">
-        <li data-bind="css: { 'active': currentStep() == 1, 'complete': currentStep() > 1 }, click: function() { currentStep(1) }">
+        <li data-bind="css: { 'active': currentStep() == 1, 'complete': currentStep() > 1, 'pointer': currentStep() > 1 }, click: function() { currentStep(1) }">
           <div class="step" title="${ _('Go to Step 1') }">
             <!-- ko if: currentStep() == 1 -->
               <!-- ko if: createWizard.isGuessingFormat -->
@@ -355,7 +355,7 @@ ${ assist.assistPanel() }
           </div>
         </li>
 
-        <li data-bind="css: { 'inactive': currentStep() == 1, 'active': currentStep() == 2, 'complete': currentStep() == 3 }, click: function() { if (!createWizard.isGuessingFormat() && createWizard.source.show()){ currentStep(2); }}">
+        <li data-bind="css: { 'inactive': currentStep() == 1, 'active': currentStep() == 2, 'complete': currentStep() == 3, 'pointer': currentStep() == 1 && !createWizard.isGuessingFormat() && createWizard.source.show() }, click: function() { if (!createWizard.isGuessingFormat() && createWizard.source.show()){ currentStep(2); }}">
           <div class="step" title="${ _('Go to Step 2') }">
             <!-- ko if: currentStep() < 3 -->
               <!-- ko if: createWizard.isGuessingFieldTypes -->
@@ -386,12 +386,16 @@ ${ assist.assistPanel() }
       <h3 class="card-heading simple">${_('Source')}</h3>
       <div class="card-body">
         <div>
-          <div class="control-group" data-bind="visible: ! createWizard.prefill.target_type || createWizard.prefill.source_type() == 'all'">
+          <div class="control-group" data-bind="visible: !createWizard.prefill.target_type() || createWizard.prefill.source_type() == 'all'">
             <label for="sourceType" class="control-label"><div>${ _('Type') }</div>
               <select id="sourceType" data-bind="selectize: createWizard.source.inputFormats, value: createWizard.source.inputFormat, optionsText: 'name', optionsValue: 'value'"></select>
             </label>
           </div>
 
+          <div class="control-group" data-bind="visible: createWizard.prefill.target_type() == 'database'">
+            <label for="sourceType" class="control-label">${ _('No source is needed for creating a database.') }</label>
+          </div>
+
           <div class="control-group" data-bind="visible: createWizard.source.inputFormat() == 'file'">
             <label for="path" class="control-label"><div>${ _('Path') }</div>
               <input type="text" class="form-control path input-xxlarge" data-bind="value: createWizard.source.path, filechooser: createWizard.source.path, filechooserOptions: { linkMarkup: true, skipInitialPathIfEmpty: true, openOnFocus: true }" placeholder="${ _('Click or drag & drop') }">