Commit d0e2e9ef authored by tron's avatar tron
Browse files

bibsonemy query url now added to search input

search can be copied to clipboard
parent cafc05fc
Pipeline #24501 passed with stage
in 13 minutes and 13 seconds
import $ from "jquery";
/**
* Public
*/
......@@ -12,31 +11,32 @@ function initBibsonomy(){
})
$("#react-placeholder-filterInput[bibType='filter'] > div > input").keyup(function(e) {
updateBib($("#react-placeholder-filterInput[bibType='filter']").attr('bibsonomyUrl'), e.target.value);
})
})
$("input[type='text'][bibType='filter']").keyup(function(e) {
updateBib($(e.target).attr('bibsonomyUrl'), e.target.value)
})
$("input[type='checkbox'][bibType='filter']").change(function(e) {
updateBib($(e.target).attr('bibsonomyUrl'))
})
var query = parseGetParameters("query");
})
var query = parseGetParameters("query");
if(query != "") {
$("input[type='text'][bibType='filter']").val(query);
}
$("#react-placeholder-filterInput[bibType='filter'] > div > input").val(query).trigger('change');;
}
}
//http://localhost:4200/publications/?query=avatar&query=embodiment
function parseGetParameters(val) {
var result = "",
tmp = [];
var items = location.search.substr(1).split("&");
for (var index = 0; index < items.length; index++) {
tmp = items[index].split("=");
if (tmp[0] === val) result = decodeURIComponent(tmp[1]);
if (tmp[0] === val) result += decodeURIComponent(tmp[1])+' ';
}
return result;
return result.trim();
}
/**
* Private
*/
......
......@@ -364,10 +364,20 @@ if (document.getElementById("react-placeholder-filterInput") !== null) {
}
};
const copyURL = (event) => {
var copyText = window.location.origin +'/publications?query='+ $("#react-placeholder-filterInput[bibType='filter'] > div > input").val().replace(' ','&query=');
var $temp = $("<input>");
$("body").append($temp);
$temp.val(copyText).select();
document.execCommand("copy");
$temp.remove();
};
return (
<div className="filterInput">
<i className="icon-search"></i>
<input type="text" onChange={onChange} placeholder="Filter..." />
<i class="icon-copy ripple" onClick={copyURL}></i>
</div>
);
}
......
......@@ -59,12 +59,12 @@
.icon-right-open-top-item:before {
color: #004a8f;
content: '\e800';
content: '\e802';
}
/* '' */
.icon-right-open:before {
content: '\e800';
content: '\e802';
}
/* '' */
......@@ -72,9 +72,31 @@
content: '\e801';
}
/* '' */
.icon-copy:before {
content: '\f0c5';
}
.icon-copy {
cursor: pointer;
}
.ripple {
background-position: center;
transition: background 0.8s;
}
.ripple:hover {
background: #ffffff radial-gradient(circle, transparent 1%, #ffffff 1%) center/15000%;
}
.ripple:active {
background-color: #7f8285;
background-size: 100%;
transition: background 0s;
}
/* '' */
.icon-minus-circled:before {
content: '\e802';
content: '\e800';
}
/* '' */
......
<svg height="1024" width="896" xmlns="http://www.w3.org/2000/svg"><path d="M704 896H64V320h640v192h64V192c0-35-29-64-64-64H512C512 57 455 0 384 0S256 57 256 128H64c-35 0-64 29-64 64v704c0 35 29 64 64 64h640c35 0 64-29 64-64V768h-64v128zM192 192h64s64-29 64-64 29-64 64-64 64 29 64 64 32 64 64 64h64s64 29 64 64H128c0-39 28-64 64-64zm-64 512h128v-64H128v64zm448-128V448L320 640l256 192V704h320V576H576zM128 832h192v-64H128v64zm320-448H128v64h320v-64zM256 512H128v64h128v-64z"/></svg>
No preview for this file type
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Copyright (C) 2017 by original authors @ fontello.com</metadata>
<metadata>Copyright (C) 2020 by original authors @ fontello.com</metadata>
<defs>
<font id="fontello" horiz-adv-x="1000" >
<font-face font-family="fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
<missing-glyph horiz-adv-x="1000" />
<glyph glyph-name="right-open" unicode="&#xe800;" d="M618 361l-414-415q-11-10-25-10t-25 10l-93 93q-11 11-11 25t11 25l296 297-296 296q-11 11-11 25t11 25l93 93q10 11 25 11t25-11l414-414q10-11 10-25t-10-25z" horiz-adv-x="714.3" />
<glyph glyph-name="minus-circled" unicode="&#xe800;" d="M679 314v72q0 14-11 25t-25 10h-429q-14 0-25-10t-10-25v-72q0-14 10-25t25-10h429q14 0 25 10t11 25z m178 36q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.1" />
<glyph glyph-name="search" unicode="&#xe801;" d="M746 209l254-255-105-105-254 254q-106-72-232-72-169 0-289 120t-120 289 120 289 289 120 289-120 120-289q0-127-72-231z m-65 231q0 113-79 193t-193 80-193-80-80-193 80-192 193-80 193 80 79 192z" horiz-adv-x="1000" />
<glyph glyph-name="search-1" unicode="&#xe801;" d="M643 386q0 103-73 176t-177 74-177-74-73-176 73-177 177-73 177 73 73 177z m286-465q0-29-22-50t-50-21q-30 0-50 21l-191 191q-100-69-223-69-80 0-153 31t-125 84-84 125-31 153 31 152 84 126 125 84 153 31 153-31 125-84 84-126 31-152q0-123-69-223l191-191q21-21 21-51z" horiz-adv-x="928.6" />
<glyph glyph-name="minus-circled" unicode="&#xe802;" d="M0 350q0 207 147 354t353 146 354-146 146-354-146-354-354-146-353 146-147 354z m213-82l574 0 0 164-574 0 0-164z" horiz-adv-x="1000" />
<glyph glyph-name="right-open" unicode="&#xe802;" d="M618 361l-414-415q-11-10-25-10t-25 10l-93 93q-11 11-11 25t11 25l296 297-296 296q-11 11-11 25t11 25l93 93q10 11 25 11t25-11l414-414q10-11 10-25t-10-25z" horiz-adv-x="714.3" />
<glyph glyph-name="plus-circled" unicode="&#xe803;" d="M0 350q0 207 147 354t353 146 354-146 146-354-146-354-354-146-353 146-147 354z m219-80l201 0 0-201 160 0 0 201 201 0 0 160-201 0 0 201-160 0 0-201-201 0 0-160z" horiz-adv-x="1000" />
<glyph glyph-name="plus-circled" unicode="&#xe803;" d="M679 314v72q0 14-11 25t-25 10h-143v143q0 15-11 25t-25 11h-71q-15 0-25-11t-11-25v-143h-143q-14 0-25-10t-10-25v-72q0-14 10-25t25-10h143v-143q0-15 11-25t25-11h71q15 0 25 11t11 25v143h143q14 0 25 10t11 25z m178 36q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.1" />
<glyph glyph-name="docs" unicode="&#xf0c5;" d="M946 636q23 0 38-16t16-38v-678q0-23-16-38t-38-16h-535q-23 0-38 16t-16 38v160h-303q-23 0-38 16t-16 38v375q0 22 11 49t27 42l228 228q15 16 42 27t49 11h232q23 0 38-16t16-38v-183q38 23 71 23h232z m-303-119l-167-167h167v167z m-357 214l-167-167h167v167z m109-361l176 176v233h-214v-233q0-22-15-37t-38-16h-233v-357h286v143q0 22 11 49t27 42z m534-449v643h-215v-232q0-22-15-38t-38-15h-232v-358h500z" horiz-adv-x="1000" />
<glyph glyph-name="menu" unicode="&#xf0c9;" d="M857 100v-71q0-15-10-25t-26-11h-785q-15 0-25 11t-11 25v71q0 15 11 25t25 11h785q15 0 26-11t10-25z m0 286v-72q0-14-10-25t-26-10h-785q-15 0-25 10t-11 25v72q0 14 11 25t25 10h785q15 0 26-10t10-25z m0 285v-71q0-14-10-25t-26-11h-785q-15 0-25 11t-11 25v71q0 15 11 26t25 10h785q15 0 26-10t10-26z" horiz-adv-x="857.1" />
</font>
......
No preview for this file type
No preview for this file type
No preview for this file type
#!/usr/bin/env bash
mkdir public/assets/js/
cp ./../assets/js/bundle.js ./public/assets/js/bundle.js
# Resize Images
batch-resize ./assets/images/ ./public/assets/images/
watch-and-resize ./assets/images/ ./public/assets/images/ &
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment