Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions application/modules/front/views/collection/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@
<div class=clear></div>
</div>

<div class="indexsearchcontainer">
<div id="indexsearch">
<!-- Go to hadith number: -->
<input type="number" id="hadithNumberInput" class="indexsearchquery" placeholder="Go to Hadith number &#8230;"/>
<button id="hadithNumberButton" style="height: 38px;" class="searchsubmit search-btn" onclick="goToHadithNumber('<?php echo $collection->name; ?>')">></button>
</div>
</div>

<div class="book_titles titles">
<?php
Expand Down
12 changes: 12 additions & 0 deletions public/css/all.css
Original file line number Diff line number Diff line change
Expand Up @@ -2164,3 +2164,15 @@ only screen and ( min-resolution: 2dppx) and (min-width: 700px)
background-size: auto 70%;
}
}

/* Hide number input arrows */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}

input[type=number] {
-moz-appearance: textfield; /* Firefox */
appearance: textfield;
}
9 changes: 9 additions & 0 deletions public/js/sunnah.js
Original file line number Diff line number Diff line change
Expand Up @@ -632,3 +632,12 @@
if ($.cookie('recvis') == null) {
$.cookie('recvis', new Date().toString(), { expires: 30, path: '/' } )
}

function goToHadithNumber(collectionName) {
var hadithNumber = parseInt($("#hadithNumberInput").val(), 10);

if (!isNaN(hadithNumber) && hadithNumber > 0) {
var url = "/" + collectionName + ":" + hadithNumber;
window.location.href = url;
}
}