Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
6d5f44b3
Commit
6d5f44b3
authored
Mar 21, 2016
by
Craig Watson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Search language matches OpenBoard's language
parent
88782ef9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
index.html
resources/library/search/Pixabay.wgs/index.html
+15
-2
No files found.
resources/library/search/Pixabay.wgs/index.html
View file @
6d5f44b3
...
...
@@ -8,6 +8,7 @@
</head>
<body>
<!--<p id="lang"></p>-->
</body>
<script
type=
"text/javascript"
>
...
...
@@ -32,18 +33,23 @@
// Image type to retrieve. Can be "photo", "illustration", "vector" or "all".
var
imageType
=
"all"
;
//
Language code to search in
//
Default language to search in, if the application can't return a suitable one
var
searchLanguage
=
"en"
;
// Fetch 960px images instead of the default 640px. However the API doesn't
// provide size information in this case, so it is disabled by default.
var
fetchMediumResImages
=
false
;
// ---------------------
// Globals
// ---------------------
var
currentIndex
=
0
;
var
currentTerm
=
""
;
// Pixabay's supported search languages
var
availableLanguages
=
[
'cs'
,
'da'
,
'de'
,
'en'
,
'es'
,
'fr'
,
'id'
,
'it'
,
'hu'
,
'nl'
,
'no'
,
'pl'
,
'pt'
,
'ro'
,
'sk'
,
'fi'
,
'sv'
,
'tr'
,
'vi'
,
'th'
,
'bg'
,
'ru'
,
'el'
,
'ja'
,
'ko'
,
'zh'
];
// ---------------------
$
(
document
).
ready
(
loadPage
)
...
...
@@ -51,6 +57,12 @@
/* Initialize the page layout */
function
loadPage
()
{
// Get OpenBoard's current language
var
appLanguage
=
window
.
sankore
?
sankore
.
locale
().
substr
(
0
,
2
)
:
searchLanguage
;
if
(
availableLanguages
.
indexOf
(
appLanguage
)
>
-
1
)
searchLanguage
=
appLanguage
var
mode
=
false
;
//search or view mode
var
hide
=
false
;
//hide or no main panel
...
...
@@ -106,6 +118,7 @@
+
"&safesearch=true"
;
//console.log(url);
//document.getElementById("lang").innerHTML = "Language: " + searchLanguage;
$
.
ajax
({
url
:
url
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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