瀏覽代碼

HUE-8700 [editor] Highlight empty variables.

jdesjean 6 年之前
父節點
當前提交
2307f53

文件差異過大導致無法顯示
+ 0 - 0
desktop/libs/notebook/src/notebook/static/notebook/css/notebook.css


+ 4 - 0
desktop/libs/notebook/src/notebook/static/notebook/less/notebook.less

@@ -1335,6 +1335,10 @@
       line-height: 0px;
     }
 
+    input:not(:focus)[value=""] {
+      border-color: @cui-orange-500;
+    }
+
     input[type="checkbox"] {
       margin: 12px 0px 0px 10px;
     }

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

@@ -1304,20 +1304,20 @@ ${ sqlSyntaxDropdown.sqlSyntaxDropdown() }
           <!-- /ko -->
           <!-- ko if: meta.type() == 'text' -->
             <!-- ko if: meta.placeholder() -->
-              <input class="input-medium" type="text" data-bind="value: value, attr: { type: type, placeholder: meta.placeholder() || '${ _ko('Variable value') }' }, valueUpdate: 'afterkeydown', event: { 'keydown': $parent.onKeydownInVariable }, autogrowInput: { minWidth: 150, maxWidth: 270, comfortZone: 15 }">
+              <input class="input-medium" type="text" data-bind="value: value, attr: { value: value, type: type, placeholder: meta.placeholder() || '${ _ko('Variable value') }' }, valueUpdate: 'afterkeydown', event: { 'keydown': $parent.onKeydownInVariable }, autogrowInput: { minWidth: 150, maxWidth: 270, comfortZone: 15 }">
             <!-- /ko -->
             <!-- ko ifnot: meta.placeholder() -->
               <!-- ko if: type() == 'datetime-local' -->
-              <input class="input-medium" type="text" data-bind="value: value, datepicker: { momentFormat: 'YYYY-MM-DD HH:mm:ss.S' }">
+              <input class="input-medium" type="text" data-bind="attr: { value: value }, value: value, datepicker: { momentFormat: 'YYYY-MM-DD HH:mm:ss.S' }">
               <!-- /ko -->
               <!-- ko if: type() == 'date' -->
-              <input class="input-medium" type="text" data-bind="value: value, datepicker: { momentFormat: 'YYYY-MM-DD' }">
+              <input class="input-medium" type="text" data-bind="attr: { value: value }, value: value, datepicker: { momentFormat: 'YYYY-MM-DD' }">
               <!-- /ko -->
               <!-- ko if: type() == 'checkbox' -->
               <input class="input-medium" type="checkbox" data-bind="checked: value">
               <!-- /ko -->
               <!-- ko ifnot: (type() == 'datetime-local' || type() == 'date' || type() == 'checkbox') -->
-              <input class="input-medium" type="text" value="true" data-bind="value: value, attr: { type: type() || 'text', step: step }, valueUpdate: 'afterkeydown', event: { 'keydown': $parent.onKeydownInVariable }, autogrowInput: { minWidth: 150, maxWidth: 270, comfortZone: 15 }">
+              <input class="input-medium" type="text" value="true" data-bind="value: value, attr: { value: value,  type: type() || 'text', step: step }, valueUpdate: 'afterkeydown', event: { 'keydown': $parent.onKeydownInVariable }, autogrowInput: { minWidth: 150, maxWidth: 270, comfortZone: 15 }">
               <!-- /ko -->
             <!-- /ko -->
           <!-- /ko -->

部分文件因文件數量過多而無法顯示