modulized navbar script
This commit is contained in:
parent
cdcef88fb0
commit
3ded0a241b
16 changed files with 25 additions and 105 deletions
|
@ -46,13 +46,7 @@
|
|||
{% endcomment %}
|
||||
|
||||
<script>
|
||||
$("#searchInput").on('keyup', function (e) {
|
||||
if (e.keyCode === 13) {
|
||||
let q = $(this).val();
|
||||
if (q)
|
||||
location.href = "{% url 'common:search' %}" + "?q=" + q;
|
||||
}
|
||||
});
|
||||
|
||||
// mark required
|
||||
$("#content input[required]").each(function () {
|
||||
$(this).prev().prepend("*");
|
||||
|
|
|
@ -104,13 +104,7 @@
|
|||
{% endcomment %}
|
||||
|
||||
<script>
|
||||
$("#searchInput").on('keyup', function (e) {
|
||||
if (e.keyCode === 13) {
|
||||
let q = $(this).val();
|
||||
if (q)
|
||||
location.href = "{% url 'common:search' %}" + "?q=" + q;
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
|
|
@ -84,13 +84,7 @@
|
|||
{% endcomment %}
|
||||
|
||||
<script>
|
||||
$("#searchInput").on('keyup', function (e) {
|
||||
if (e.keyCode === 13) {
|
||||
let q = $(this).val();
|
||||
if (q)
|
||||
location.href = "{% url 'common:search' %}" + "?q=" + q;
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
|
|
@ -100,13 +100,7 @@
|
|||
{% endcomment %}
|
||||
|
||||
<script>
|
||||
$("#searchInput").on('keyup', function (e) {
|
||||
if (e.keyCode === 13) {
|
||||
let q = $(this).val();
|
||||
if (q)
|
||||
location.href = "{% url 'common:search' %}" + "?q=" + q;
|
||||
}
|
||||
});
|
||||
|
||||
$(".markdownx textarea").hide();
|
||||
$(".markdownx .markdownx-preview").show();
|
||||
</script>
|
||||
|
|
|
@ -336,13 +336,7 @@
|
|||
<div class="bg-mask"></div>
|
||||
|
||||
<script>
|
||||
$("#searchInput").on('keyup', function (e) {
|
||||
if (e.keyCode === 13) {
|
||||
let q = $(this).val();
|
||||
if (q)
|
||||
location.href = "{% url 'common:search' %}" + "?q=" + q;
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
|
|
@ -256,13 +256,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$("#searchInput").on('keyup', function (e) {
|
||||
if (e.keyCode === 13) {
|
||||
let q = $(this).val();
|
||||
if (q)
|
||||
location.href = "{% url 'common:search' %}" + "?q=" + q;
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
|
|
@ -137,13 +137,7 @@
|
|||
{% endcomment %}
|
||||
|
||||
<script>
|
||||
$("#searchInput").on('keyup', function (e) {
|
||||
if (e.keyCode === 13) {
|
||||
let q = $(this).val();
|
||||
if (q)
|
||||
location.href = "{% url 'common:search' %}" + "?q=" + q;
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
|
|
@ -117,13 +117,7 @@
|
|||
{% endcomment %}
|
||||
|
||||
<script>
|
||||
$("#searchInput").on('keyup', function (e) {
|
||||
if (e.keyCode === 13) {
|
||||
let q = $(this).val();
|
||||
if (q)
|
||||
location.href = "{% url 'common:search' %}" + "?q=" + q;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$(".markdownx textarea").hide();
|
||||
</script>
|
||||
|
|
|
@ -124,13 +124,7 @@
|
|||
{% endcomment %}
|
||||
|
||||
<script>
|
||||
$("#searchInput").on('keyup', function (e) {
|
||||
if (e.keyCode === 13) {
|
||||
let q = $(this).val();
|
||||
if (q)
|
||||
location.href = "{% url 'common:search' %}" + "?q=" + q;
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
|
|
@ -97,13 +97,7 @@ ISBN: 9787020104345
|
|||
|
||||
</div>
|
||||
<script>
|
||||
$("#searchInput").on('keyup', function (e) {
|
||||
if (e.keyCode === 13) {
|
||||
let q = $(this).val();
|
||||
if (q)
|
||||
location.href = "{% url 'common:search' %}" + "?q=" + q;
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
|
|
@ -239,13 +239,7 @@
|
|||
</div>
|
||||
|
||||
<script>
|
||||
$("#searchInput").on('keyup', function (e) {
|
||||
if (e.keyCode === 13) {
|
||||
let q = $(this).val();
|
||||
if (q)
|
||||
location.href = "{% url 'common:search' %}" + "?q=" + q;
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
|
|
@ -170,13 +170,7 @@
|
|||
{% endcomment %}
|
||||
|
||||
<script>
|
||||
$("#searchInput").on('keyup', function (e) {
|
||||
if (e.keyCode === 13) {
|
||||
let q = $(this).val();
|
||||
if (q)
|
||||
location.href = "{% url 'common:search' %}" + "?q=" + q;
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
|
|
@ -33,4 +33,14 @@
|
|||
|
||||
</div>
|
||||
</nav>
|
||||
<script>
|
||||
$("#searchInput").on('keyup', function (e) {
|
||||
if (e.keyCode === 13) {
|
||||
let q = $(this).val();
|
||||
if (q) {
|
||||
location.href = "{% url 'common:search' %}" + "?q=" + q;
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</section>
|
|
@ -59,13 +59,7 @@
|
|||
{% endcomment %}
|
||||
|
||||
<script>
|
||||
$("#searchInput").on('keyup', function (e) {
|
||||
if (e.keyCode === 13) {
|
||||
let q = $(this).val();
|
||||
if (q)
|
||||
location.href = "{% url 'common:search' %}" + "?q=" + q;
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
|
|
@ -158,13 +158,7 @@
|
|||
</div>
|
||||
|
||||
<script>
|
||||
$("#searchInput").on('keyup', function (e) {
|
||||
if (e.keyCode === 13) {
|
||||
let q = $(this).val();
|
||||
if (q)
|
||||
location.href = "{% url 'common:search' %}" + "?q=" + q;
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
|
|
@ -48,13 +48,7 @@
|
|||
{% endcomment %}
|
||||
|
||||
<script>
|
||||
$("#searchInput").on('keyup', function (e) {
|
||||
if (e.keyCode === 13) {
|
||||
let q = $(this).val();
|
||||
if (q)
|
||||
location.href = "{% url 'common:search' %}" + "?q=" + q;
|
||||
}
|
||||
});
|
||||
|
||||
// preview uploaded pic
|
||||
$("input[type='file']").change(function () {
|
||||
if (this.files && this.files[0]) {
|
||||
|
|
Loading…
Add table
Reference in a new issue