File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,12 @@ Refine.CommonsSourceUI.prototype.addRow = function() {
77
88 var tr = $ ( `<tr id="categoryRow">
99 <td><input size="72" class="category-input-box"/></td>
10- <td class="depth-input-td"><input type="number" min="0" max="6" class="depth-input-box"/></td>
10+ <td class="depth-input-td"><input type="number" value="0" min="0" max="6" class="depth-input-box"/></td>
1111 <td class="x-button-td"><a class="x-button" href><img src='images/close.png'></a></td></tr>` ) ;
1212 $ ( "#categoriesTable" ) . append ( tr ) ;
1313
1414 tr . find ( 'a.x-button' ) . attr ( 'title' , $ . i18n ( 'commons-import/remove-category' ) ) ;
15+ tr . find ( 'input.depth-input-box' ) . prop ( 'disabled' , true ) ;
1516
1617 var endpoint = "https://commons.wikimedia.org/w/api.php"
1718 // FIXME: twik configuration to not use Freebase
@@ -20,10 +21,12 @@ Refine.CommonsSourceUI.prototype.addRow = function() {
2021 language : $ . i18n ( "core-recon/wd-recon-lang" )
2122 } ;
2223
24+ var depthBox = tr . find ( 'input.depth-input-box' ) ;
2325 tr . find ( 'input.category-input-box' ) . suggestCategory ( suggestConfig ) . bind ( "fb-select" , function ( evt , data ) {
2426 tr . find ( 'input.category-input-box' ) . data ( "jsonValue" , {
2527 id : data . id
2628 } ) ;
29+ depthBox . removeAttr ( 'disabled' ) ;
2730 } ) ;
2831
2932 var xButton = tr . find ( '.x-button' ) ;
You can’t perform that action at this time.
0 commit comments