Skip to content

Commit f58c78d

Browse files
committed
Dynamic placeholders
1 parent 09ca4c7 commit f58c78d

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

src/public/_assets/20250502123204-8ee3b0e7a6641aed845899d0645808f6.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,12 +1144,15 @@ function doGrepping() { $('#firstcontainer').fadeOut(); $('#overlay').fadeIn(120
11441144
// Define our own namespace
11451145
var MetaCPANGrep = {
11461146
// Shared default ignore list
1147-
defaultIgnoreList: "*.PL, ppport.h, META.*, /inc/*, /local/*, /t/*, *.md, *.json, *.ya?ml, *.conf, cpanfile*, LICENSE, MANIFEST*, INSTALL, Changes, Copying, *.SKIP, *.ini, *.pod, README, *.xml, *.js, .git*",
1147+
defaultIgnoreList: "*.PL, /t/*, ppport.h, META.*, /inc/*, /local/*, *.md, *.json, *.ya?ml, *.conf, cpanfile*, LICENSE, MANIFEST*, INSTALL, Changes, Copying, *.SKIP, *.ini, README, *.xml, *.js, .git*",
1148+
defaultFilterList: "*.pm, *.t",
11481149

11491150
homepageSetup: function() {
11501151
// On the HomePage always precheck the default values
1151-
MetaCPANGrep.setupIgnoreList();
1152-
MetaCPANGrep.updateIgnoreListCheckbox();
1152+
// MetaCPANGrep.setupIgnoreList();
1153+
// MetaCPANGrep.updateIgnoreListCheckbox();
1154+
$('#qft').val(MetaCPANGrep.defaultFilterList);
1155+
$('#ignore-files-input').attr('placeholder', this.defaultIgnoreList);
11531156
},
11541157

11551158
// Function to toggle the ignore list between default value and empty
@@ -1195,6 +1198,7 @@ var MetaCPANGrep = {
11951198
spellcheck: 'false'
11961199
});
11971200
});
1201+
$('#qft').attr('placeholder', this.defaultFilterList);
11981202
},
11991203
};
12001204

src/views/_display.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<input type="text" name="q" autofocus="autofocus" id="search-input" class="form-control search-input-results w-100" value="<% search | html_entity %>" placeholder="search with Perl Compatible RegEx" title="search">
2222
</div>
2323
<div class="col-md-4 pl-0">
24-
<input type="text" name="qft" id="search-filetype-input-results" class="form-control optional-input w-100" value="<% qft | html_entity %>" autocomplete="off" placeholder="*.pm" title="extension">
24+
<input type="text" name="qft" id="search-filetype-input-results" class="form-control optional-input w-100" value="<% qft | html_entity %>" autocomplete="off" placeholder="*.pm, *.t" title="extension">
2525
</div>
2626
</div>
2727

src/views/index.tt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<!-- Only Search In Files -->
1616
<div class="form-row">
1717
<label for="only-files-input">Search only in files:</label>
18-
<input type="text" id="qft" name="qft" placeholder="*.pl, *.pm">
18+
<input type="text" id="qft" name="qft" placeholder="*.pm, *.t">
1919
</div>
2020

2121
<!-- Only Search In Distro -->
@@ -27,7 +27,7 @@
2727
<!-- Ignore Files -->
2828
<div class="form-row">
2929
<label for="ignore-files-input">Ignore files:</label>
30-
<input type="text" id="ignore-files-input" name="qifl" placeholder="*.PL, ppport.h, /lib/*" title="ignore filter">
30+
<input type="text" id="ignore-files-input" name="qifl" placeholder="*.PL, ppport.h, ..." title="ignore filter">
3131
</div>
3232

3333
<!-- Common exclude rules checkbox -->
@@ -36,7 +36,7 @@
3636
<div>
3737
<label for="ci-default-excludes" style="font-weight: normal;">
3838
<input type="checkbox" name="default-excludes" id="ci-default-excludes" onClick="MetaCPANGrep.setupIgnoreList(); false;">
39-
<span>use common exclude rules <i>(default)</i></span>
39+
<span>use common exclude rules</span>
4040
</label>
4141
</div>
4242
</div>

0 commit comments

Comments
 (0)