Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
m4lab_tv1
Project Page
Commits
ca127401
Commit
ca127401
authored
Oct 18, 2021
by
Rosanny Sihombing
Browse files
call a function from generalFunction.js
parent
1c93eed7
Changes
2
Hide whitespace changes
Inline
Side-by-side
views/DE/project/pagesList.pug
View file @
ca127401
...
...
@@ -72,6 +72,8 @@ html(lang="de")
script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous")
// Header
script(src="/js/headfoot.js")
// General functions
script(src="/js/generalFunction.js")
script.
function searchFunction() {
var input = document.getElementById("searchInput")
...
...
@@ -105,15 +107,6 @@ html(lang="de")
$("#sortingSelect").change(function() {
window.location.replace('/projektinformationen?sort='+$("#sortingSelect").val())
});
function getQueryStringParams(params, url) {
// first decode URL to get readable data
var href = decodeURIComponent(url || window.location.href);
// regular expression to get value
var regEx = new RegExp('[?&]' + params + '=([^&#]*)', 'i');
var value = regEx.exec(href);
// return the value if exist
return value ? value[1] : null;
}
function setSortSelect() {
let sortKeyword = getQueryStringParams('sort', window.location.href)
if (sortKeyword == "created_at") {
...
...
views/DE/project/projectList.pug
View file @
ca127401
...
...
@@ -72,6 +72,8 @@ html(lang="de")
script(src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous")
// Header
script(src="/js/headfoot.js")
// General functions
script(src="/js/generalFunction.js")
script.
function searchFunction() {
var input = document.getElementById("searchInput")
...
...
@@ -105,15 +107,6 @@ html(lang="de")
$("#sortingSelect").change(function() {
window.location.replace('/projektdaten?sort='+$("#sortingSelect").val())
});
function getQueryStringParams(params, url) {
// first decode URL to get readable data
var href = decodeURIComponent(url || window.location.href);
// regular expression to get value
var regEx = new RegExp('[?&]' + params + '=([^&#]*)', 'i');
var value = regEx.exec(href);
// return the value if exist
return value ? value[1] : null;
}
function setSortSelect() {
let sortKeyword = getQueryStringParams('sort', window.location.href)
if (sortKeyword == "created_at") {
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment