Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Pixel Humain
co2
Commits
b1a4ec1a
Commit
b1a4ec1a
authored
May 10, 2019
by
Clément Damiens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
impossible commit named refactor
parent
b2f91802
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
319 additions
and
473 deletions
+319
-473
assets/js/co.js
assets/js/co.js
+91
-36
assets/js/default/profilSocial.js
assets/js/default/profilSocial.js
+2
-2
assets/js/default/search.js
assets/js/default/search.js
+27
-26
config/params.json
config/params.json
+0
-19
views/app/info/CO2/stats.php
views/app/info/CO2/stats.php
+0
-13
views/app/live.php
views/app/live.php
+7
-13
views/app/search.php
views/app/search.php
+5
-13
views/app/welcome.php
views/app/welcome.php
+4
-4
views/docs/de/welcome.php
views/docs/de/welcome.php
+1
-1
views/docs/en/welcome.php
views/docs/en/welcome.php
+1
-1
views/docs/es/welcome.php
views/docs/es/welcome.php
+1
-1
views/docs/fr/welcome.php
views/docs/fr/welcome.php
+1
-1
views/docs/index.php
views/docs/index.php
+178
-169
views/docs/it/welcome.php
views/docs/it/welcome.php
+1
-1
views/search/searchTerla.php
views/search/searchTerla.php
+0
-173
No files found.
assets/js/co.js
View file @
b1a4ec1a
...
@@ -362,9 +362,9 @@ function loadSettings(hash){
...
@@ -362,9 +362,9 @@ function loadSettings(hash){
var
CoAllReadyLoad
=
false
;
var
CoAllReadyLoad
=
false
;
var
coInterface
=
{
var
coInterface
=
{
init
:
function
(){
init
:
function
(){
coInterface
.
initHtmlPosition
();
coInterface
.
scrollTo
(
"
.main-container
"
);
coInterface
.
scrollTo
(
"
.main-container
"
);
coInterface
.
bindResizeEvent
();
coInterface
.
bindResizeEvent
();
coInterface
.
initHtmlPosition
();
// Active button to get dynform
// Active button to get dynform
coInterface
.
bindButtonOpenForm
();
coInterface
.
bindButtonOpenForm
();
coInterface
.
bindLBHLinks
();
coInterface
.
bindLBHLinks
();
...
@@ -471,10 +471,7 @@ var coInterface = {
...
@@ -471,10 +471,7 @@ var coInterface = {
});
});
$
(
"
#btn-apropos
"
).
click
(
function
(){
$
(
"
#btn-apropos
"
).
click
(
function
(){
urlCtrl
.
loadByHash
(
"
#info.p.apropos
"
)
urlCtrl
.
loadByHash
(
"
#info.p.apropos
"
)
});
});
//$(".logo-menutop.hidden-top, .menu-btn-start-search, #input-sec-search").attr("style", "");
$
(
"
.btn-show-map
"
).
off
().
click
(
function
(){
$
(
"
.btn-show-map
"
).
off
().
click
(
function
(){
if
(
typeof
formInMap
!=
"
undefined
"
&&
formInMap
.
actived
==
true
)
if
(
typeof
formInMap
!=
"
undefined
"
&&
formInMap
.
actived
==
true
)
...
@@ -510,7 +507,7 @@ var coInterface = {
...
@@ -510,7 +507,7 @@ var coInterface = {
else
else
$
(
"
#menuApp.subMenuTop
"
).
addClass
(
"
borderShadow
"
);
$
(
"
#menuApp.subMenuTop
"
).
addClass
(
"
borderShadow
"
);
}
}
setTimeout
(
function
(){
headerHeightPos
(
true
)},
250
);
setTimeout
(
function
(){
coInterface
.
setTopPosition
(
true
)
;
},
250
);
});
});
$
(
"
.menu-btn-scope-filter
"
).
click
(
function
(){
$
(
"
.menu-btn-scope-filter
"
).
click
(
function
(){
if
(
$
(
"
#filter-scopes-menu
"
).
is
(
"
:visible
"
)){
if
(
$
(
"
#filter-scopes-menu
"
).
is
(
"
:visible
"
)){
...
@@ -520,7 +517,7 @@ var coInterface = {
...
@@ -520,7 +517,7 @@ var coInterface = {
$
(
"
.menu-btn-scope-filter
"
).
addClass
(
"
visible
"
);
$
(
"
.menu-btn-scope-filter
"
).
addClass
(
"
visible
"
);
$
(
"
#filter-scopes-menu
"
).
show
(
200
);
$
(
"
#filter-scopes-menu
"
).
show
(
200
);
}
}
setTimeout
(
function
(){
headerHeightPos
(
true
)},
250
);
setTimeout
(
function
(){
coInterface
.
setTopPosition
(
true
)},
250
);
if
(
notNull
(
costum
)
if
(
notNull
(
costum
)
&&
typeof
costum
.
scopeHeaderFunction
!=
"
undefined
"
&&
typeof
costum
.
scopeHeaderFunction
!=
"
undefined
"
&&
typeof
costum
.
scopeHeaderFunction
==
"
function
"
)
&&
typeof
costum
.
scopeHeaderFunction
==
"
function
"
)
...
@@ -570,6 +567,7 @@ var coInterface = {
...
@@ -570,6 +567,7 @@ var coInterface = {
}
}
});
});
coInterface
.
bindResizeEvent
();
coInterface
.
bindResizeEvent
();
$
(
"
#loadingModal
"
).
css
({
"
opacity
"
:
0.95
});
},
400
);
},
400
);
},
},
setDomHtmlPosition
:
function
(
initHeight
){
setDomHtmlPosition
:
function
(
initHeight
){
...
@@ -610,7 +608,7 @@ var coInterface = {
...
@@ -610,7 +608,7 @@ var coInterface = {
}
}
if
(
$
(
"
#header-banner
"
).
length
>
0
&&
initHeight
==
0
)
if
(
$
(
"
#header-banner
"
).
length
>
0
&&
initHeight
==
0
)
heightPos
=
heightPos
+
$
(
"
#header-banner
"
).
outerHeight
();
heightPos
=
heightPos
+
$
(
"
#header-banner
"
).
outerHeight
();
$
(
"
.main-container
"
).
css
(
"
padding-top
"
,
heightPos
);
$
(
"
.main-container
"
).
css
(
"
padding-top
"
,
heightPos
);
//, "min-height":($(window).height()-heightPos)+"px"});
setTimeout
(
function
(){
headerScaling
=
false
;},
300
);
setTimeout
(
function
(){
headerScaling
=
false
;},
300
);
},
},
bindResizeEvent
:
function
(){
bindResizeEvent
:
function
(){
...
@@ -663,8 +661,6 @@ var coInterface = {
...
@@ -663,8 +661,6 @@ var coInterface = {
coInterface
.
simpleScroll
(
0
,
500
);
coInterface
.
simpleScroll
(
0
,
500
);
searchObject
.
reset
();
searchObject
.
reset
();
historyReplace
=
true
;
historyReplace
=
true
;
$
(
"
.lbh-menu-app
"
).
removeClass
(
"
active
"
);
$
(
this
).
addClass
(
"
active
"
);
urlCtrl
.
loadByHash
(
$
(
this
).
data
(
"
hash
"
));
urlCtrl
.
loadByHash
(
$
(
this
).
data
(
"
hash
"
));
})
})
//open any url in a modal window
//open any url in a modal window
...
@@ -744,8 +740,74 @@ var coInterface = {
...
@@ -744,8 +740,74 @@ var coInterface = {
$
(
'
html,body
'
).
animate
({
scrollTop
:
scrollToPos
},
speedScroll
,
''
);
$
(
'
html,body
'
).
animate
({
scrollTop
:
scrollToPos
},
speedScroll
,
''
);
},
},
menu
:
{
menu
:
{
set
:
function
(){
showFilters
:
false
,
showScope
:
false
,
set
:
function
(
hash
){
if
(
!
notEmpty
(
hash
)
||
hash
==
"
#
"
){
redirK
=
(
userId
!=
""
)
?
"
logged
"
:
"
unlogged
"
;
pageMenu
=
"
#
"
+
themeParams
[
"
#app.index
"
][
redirK
];
}
else
if
(
hash
.
indexOf
(
"
.
"
)
>=
0
){
pageMenu
=
hash
.
split
(
"
.
"
)[
0
];
}
else
pageMenu
=
hash
;
if
(
pageMenu
.
indexOf
(
"
?
"
)
>=
0
)
pageMenu
=
pageMenu
.
split
(
"
?
"
)[
0
];
mylog
.
log
(
"
checkMenu *******************
"
,
pageMenu
);
inMenu
=
(
typeof
themeParams
.
pages
[
pageMenu
].
inMenu
!=
"
undefined
"
)
?
themeParams
.
pages
[
pageMenu
].
inMenu
:
false
;
useFilter
=
(
typeof
themeParams
.
pages
[
pageMenu
].
useFilter
!=
"
undefined
"
)
?
themeParams
.
pages
[
pageMenu
].
useFilter
:
false
;
subdomainName
=
(
typeof
themeParams
.
pages
[
pageMenu
].
subdomainName
!=
"
undefined
"
)
?
themeParams
.
pages
[
pageMenu
].
subdomainName
:
""
;
icon
=
(
typeof
themeParams
.
pages
[
pageMenu
].
icon
!=
"
undefined
"
)
?
themeParams
.
pages
[
pageMenu
].
icon
:
"
info
"
;
mainTitle
=
(
typeof
themeParams
.
pages
[
pageMenu
].
mainTitle
!=
"
undefined
"
)
?
themeParams
.
pages
[
pageMenu
].
mainTitle
:
themeParams
.
metaTitle
;
dropdownResult
=
(
typeof
themeParams
.
pages
[
pageMenu
].
dropdownResult
!=
"
undefined
"
)
?
themeParams
.
pages
[
pageMenu
].
dropdownResult
:
true
;
//mylog.dir(urlObj);
$
(
"
.lbh-menu-app
"
).
removeClass
(
"
active
"
);
if
(
inMenu
)
$
(
"
.lbh-menu-app[data-hash='
"
+
pageMenu
+
"
']
"
).
addClass
(
"
active
"
);
$
(
"
#filter-scopes-menu
"
).
hide
(
200
);
if
(
notEmpty
(
useFilter
)){
coInterface
.
menu
.
showScope
=
true
;
coInterface
.
menu
.
showFilters
=
true
;
if
(
typeof
useFilter
==
"
object
"
){
coInterface
.
menu
.
showScope
=
(
typeof
useFilter
.
scope
!=
"
undefined
"
&&
useFilter
.
scope
)
?
true
:
false
;
coInterface
.
menu
.
showFilters
=
(
typeof
useFilter
.
filters
!=
"
undefined
"
&&
useFilter
.
filters
)
?
true
:
false
;
}
classToShow
=
(
coInterface
.
menu
.
showScope
)
?
"
.menu-btn-scope-filter
"
:
""
;
if
(
coInterface
.
menu
.
showFilters
){
classToShow
+=
(
notEmpty
(
classToShow
))
?
"
,
"
:
""
;
classToShow
+=
(
coInterface
.
menu
.
showFilters
)
?
"
.btn-show-filters
"
:
""
;
}
$
(
classToShow
).
show
().
removeClass
(
"
forcedHide
"
);
if
(
coInterface
.
menu
.
showFilters
)
coInterface
.
menu
.
resetFilters
();
}
else
{
coInterface
.
menu
.
showScope
=
false
;
coInterface
.
menu
.
showFilters
=
false
;
$
(
"
#filters-nav
"
).
hide
();
$
(
"
.menu-btn-scope-filter, .btn-show-filters
"
).
hide
();
$
(
"
.menu-btn-scope-filter.visible-xs, .btn-show-filters.visible-xs
"
).
addClass
(
"
forcedHide
"
);
}
$
(
"
#second-search-bar, #main-search-bar, #input-search-map
"
).
val
(
""
);
if
(
dropdownResult
){
//Replace id event of app search bar by id event of search bar using dropdown result like in home, element page;
$
.
each
([
"
second-search-bar, second-search-xs-bar-addon, second-search-bar-xs, second-search-xs-bar-addon
"
],
function
(
e
,
v
){
changeId
=
v
.
replace
(
"
second
"
,
"
main
"
);
$
(
"
#
"
+
v
).
attr
(
"
id
"
,
changeId
);
});
}
else
{
//Generate id event for app search bar instead of search bar using dropdown result like in home, element page;
$
.
each
([
"
main-search-bar, main-search-xs-bar-addon, main-search-bar-xs, main-search-xs-bar-addon
"
],
function
(
e
,
v
){
changeId
=
v
.
replace
(
"
main
"
,
"
second
"
);
$
(
"
#
"
+
v
).
attr
(
"
id
"
,
changeId
);
});
}
searchInterface
.
setSearchbar
();
},
resetFilters
:
function
(){
$
(
"
#filters-nav-list li .menu-button
"
).
each
(
function
(){
if
(
$
(
this
).
hasClass
(
"
active
"
)){
$
(
this
).
removeClass
(
"
active
"
);
$
(
this
).
html
(
$
(
this
).
attr
(
"
title
"
)
+
"
<i class='fa fa-angle-down'></i>
"
);
}
});
},
},
renderTools
:
{
renderTools
:
{
...
@@ -882,7 +944,7 @@ var urlCtrl = {
...
@@ -882,7 +944,7 @@ var urlCtrl = {
return
false
;
return
false
;
}
}
c
heckMenu
(
urlObj
,
hash
);
c
oInterface
.
menu
.
set
(
hash
);
endPoint
=
urlCtrl
.
loadableUrls
[
urlIndex
];
endPoint
=
urlCtrl
.
loadableUrls
[
urlIndex
];
mylog
.
log
(
"
jsController 2
"
,
endPoint
,
"
login
"
,
endPoint
.
login
,
endPoint
.
hash
);
mylog
.
log
(
"
jsController 2
"
,
endPoint
,
"
login
"
,
endPoint
.
login
,
endPoint
.
hash
);
...
@@ -1164,6 +1226,7 @@ var urlCtrl = {
...
@@ -1164,6 +1226,7 @@ var urlCtrl = {
}
}
else
{
else
{
//alert( baseUrl+'/'+ moduleId + '/app/index 3' );
//alert( baseUrl+'/'+ moduleId + '/app/index 3' );
coInterface
.
menu
.
set
();
showAjaxPanel
(
baseUrl
+
'
/
'
+
moduleId
+
'
/app/index
'
,
'
Home
'
,
'
home
'
);
showAjaxPanel
(
baseUrl
+
'
/
'
+
moduleId
+
'
/app/index
'
,
'
Home
'
,
'
home
'
);
}
}
...
@@ -1533,7 +1596,6 @@ var smallMenu = {
...
@@ -1533,7 +1596,6 @@ var smallMenu = {
function
showAjaxPanel
(
url
,
title
,
icon
,
mapEnd
,
urlObj
)
{
function
showAjaxPanel
(
url
,
title
,
icon
,
mapEnd
,
urlObj
)
{
//alert("showAjaxPanel"+url);
//alert("showAjaxPanel"+url);
$
(
"
.progressTop
"
).
show
().
val
(
20
);
//$("#loadingModal").css({"opacity": 0.7});
//$("#loadingModal").css({"opacity": 0.7});
var
dest
=
(
typeof
urlObj
==
"
undefined
"
||
typeof
urlObj
.
useHeader
!=
"
undefined
"
)
?
themeObj
.
mainContainer
:
"
.pageContent
"
;
var
dest
=
(
typeof
urlObj
==
"
undefined
"
||
typeof
urlObj
.
useHeader
!=
"
undefined
"
)
?
themeObj
.
mainContainer
:
"
.pageContent
"
;
mylog
.
log
(
"
showAjaxPanel
"
,
url
,
urlObj
,
dest
,
urlCtrl
.
afterLoad
);
mylog
.
log
(
"
showAjaxPanel
"
,
url
,
urlObj
,
dest
,
urlCtrl
.
afterLoad
);
...
@@ -1541,42 +1603,45 @@ function showAjaxPanel (url,title,icon, mapEnd , urlObj) {
...
@@ -1541,42 +1603,45 @@ function showAjaxPanel (url,title,icon, mapEnd , urlObj) {
hideScrollTop
=
false
;
hideScrollTop
=
false
;
//alert("showAjaxPanel"+dest);
//alert("showAjaxPanel"+dest);
showNotif
(
false
);
showNotif
(
false
);
$
(
"
.hover-info,.hover-info2
"
).
hide
();
$
(
"
.hover-info,.hover-info2
"
).
hide
();
showMap
(
false
);
showMap
(
false
);
$
(
"
.box
"
).
hide
(
200
);
$
(
"
.box
"
).
hide
(
200
);
//showPanel('box-ajax');
icon
=
(
icon
)
?
"
<i class='fa fa-
"
+
icon
+
"
'></i>
"
:
""
;
icon
=
(
icon
)
?
"
<i class='fa fa-
"
+
icon
+
"
'></i>
"
:
""
;
$
(
"
.panelTitle
"
).
html
(
icon
+
title
).
fadeIn
();
$
(
"
.panelTitle
"
).
html
(
icon
+
title
).
fadeIn
();
mylog
.
log
(
"
GETAJAX
"
,
icon
+
title
);
mylog
.
log
(
"
GETAJAX
"
,
icon
+
title
);
//showTopMenu(true);
//showTopMenu(true);
userIdBefore
=
userId
;
userIdBefore
=
userId
;
coInterface
.
simpleScroll
(
0
,
300
);
$
(
"
.progressTop
"
).
show
().
val
(
20
);
setTimeout
(
function
(){
setTimeout
(
function
(){
if
(
$
(
dest
).
length
)
if
(
$
(
dest
).
length
)
{
{
setTimeout
(
function
(){
$
(
'
.progressTop
'
).
val
(
40
)},
500
);
setTimeout
(
function
(){
$
(
'
.progressTop
'
).
val
(
40
)},
500
);
setTimeout
(
function
(){
$
(
'
.progressTop
'
).
val
(
60
)},
1500
);
setTimeout
(
function
(){
$
(
'
.progressTop
'
).
val
(
60
)},
1500
);
setTimeout
(
function
(){
$
(
"
#loadingModal
"
).
css
({
"
opacity
"
:
0.6
});},
500
);
/*setTimeout(function(){$("#loadingModal").css({"opacity": 0.});}, 500);
setTimeout
(
function
(){
$
(
"
#loadingModal
"
).
css
({
"
opacity
"
:
0.5
});},
1500
);
setTimeout(function(){$("#loadingModal").css({"opacity": 0.5});}, 1500);*/
$
(
"
#loadingModal
"
).
css
({
"
opacity
"
:
0.9
});
getAjax
(
dest
,
url
,
function
(
data
){
getAjax
(
dest
,
url
,
function
(
data
){
if
(
dest
!=
themeObj
.
mainContainer
)
if
(
dest
!=
themeObj
.
mainContainer
)
$
(
"
.subModuleTitle
"
).
html
(
""
);
$
(
"
.subModuleTitle
"
).
html
(
""
);
$
(
"
.modal-backdrop
"
).
hide
();
$
(
"
.modal-backdrop
"
).
hide
();
if
(
coInterface
.
menu
.
showFilters
)
$
(
"
#filters-nav
"
).
show
();
coInterface
.
setTopPosition
();
coInterface
.
bindTooltips
();
coInterface
.
bindTooltips
();
coInterface
.
bindLBHLinks
();
coInterface
.
bindLBHLinks
();
$
(
"
.progressTop
"
).
val
(
90
);
$
(
"
.progressTop
"
).
val
(
90
);
if
(
$
(
"
#loadingModal
"
).
is
(
"
:visible
"
)){
//$("#loadingModal").hide(1000);
setTimeout
(
function
(){
$
(
"
#loadingModal
"
).
css
({
"
opacity
"
:
0.4
});},
10
);
if
(
$
(
"
#firstLoader
"
).
is
(
"
:visible
"
)){
setTimeout
(
function
(){
$
(
"
#loadingModal
"
).
css
({
"
opacity
"
:
0.3
});},
10
);
setTimeout
(
function
(){
$
(
"
#loadingModal
"
).
css
({
"
opacity
"
:
0.8
});},
250
);
setTimeout
(
function
(){
$
(
"
#loadingModal
"
).
css
({
"
opacity
"
:
0.2
});},
10
);
setTimeout
(
function
(){
$
(
"
#loadingModal
"
).
css
({
"
opacity
"
:
0.6
});},
250
);
setTimeout
(
function
(){
$
(
"
#loadingModal
"
).
css
({
"
opacity
"
:
0.1
});},
10
);
setTimeout
(
function
(){
$
(
"
#loadingModal
"
).
css
({
"
opacity
"
:
0.4
});},
250
);
setTimeout
(
function
(){
$
(
"
#loadingModal
"
).
hide
()},
10
);
setTimeout
(
function
(){
$
(
"
#loadingModal
"
).
css
({
"
opacity
"
:
0.2
});
$
(
"
#firstLoader
"
).
hide
(
400
);},
250
);
//setTimeout(function(){}, 10);
}
}
setTimeout
(
function
(){
$
(
"
.progressTop
"
).
val
(
100
)},
10
);
setTimeout
(
function
(){
$
(
"
.progressTop
"
).
val
(
100
)},
10
);
$
(
"
.progressTop
"
).
fadeOut
(
2
00
);
$
(
"
.progressTop
"
).
fadeOut
(
3
00
);
$
.
unblockUI
();
$
.
unblockUI
();
if
(
!
$
(
"
#page-top
"
).
is
(
"
:visible
"
))
$
(
"
#page-top
"
).
show
();
if
(
!
$
(
"
#page-top
"
).
is
(
"
:visible
"
))
$
(
"
#page-top
"
).
show
();
if
(
mapEnd
)
if
(
mapEnd
)
...
@@ -1707,16 +1772,6 @@ function setTitle(str, icon, topTitle,keywords,shortDesc) { mylog.log("setTitle"
...
@@ -1707,16 +1772,6 @@ function setTitle(str, icon, topTitle,keywords,shortDesc) { mylog.log("setTitle"
}
}
function
checkMenu
(
urlObj
,
hash
){
mylog
.
log
(
"
checkMenu *******************
"
,
hash
);
//mylog.dir(urlObj);
$
(
"
.menu-button-left
"
).
removeClass
(
"
selected
"
);
if
(
typeof
urlObj
.
menuId
!=
"
undefined
"
){
mylog
.
log
(
$
(
"
#
"
+
urlObj
.
menuId
).
data
(
"
hash
"
));
if
(
$
(
"
#
"
+
urlObj
.
menuId
).
attr
(
"
href
"
)
==
hash
)
$
(
"
#
"
+
urlObj
.
menuId
).
addClass
(
"
selected
"
);
}
}
var
backUrl
=
null
;
var
backUrl
=
null
;
function
checkIsLoggued
(
uId
){
function
checkIsLoggued
(
uId
){
if
(
uId
==
""
||
typeof
uId
==
"
undefined
"
){
if
(
uId
==
""
||
typeof
uId
==
"
undefined
"
){
...
...
assets/js/default/profilSocial.js
View file @
b1a4ec1a
...
@@ -992,7 +992,7 @@ var loading = "<div class='loader shadow2 letter-blue text-center margin-bottom
...
@@ -992,7 +992,7 @@ var loading = "<div class='loader shadow2 letter-blue text-center margin-bottom
"
<span>
"
+
trad
.
currentlyloading
+
"
...</span>
"
+
"
<span>
"
+
trad
.
currentlyloading
+
"
...</span>
"
+
"
</div>
"
;
"
</div>
"
;
function
loadStream
(
indexMin
,
indexMax
){
mylog
.
log
(
"
LOAD STREAM PROFILSOCIAL
"
);
//loadLiveNow
/*
function loadStream(indexMin, indexMax){ mylog.log("LOAD STREAM PROFILSOCIAL"); //loadLiveNow
loadingData = true;
loadingData = true;
currentIndexMin = indexMin;
currentIndexMin = indexMin;
currentIndexMax = indexMax;
currentIndexMax = indexMax;
...
@@ -1033,7 +1033,7 @@ function loadStream(indexMin, indexMax){ mylog.log("LOAD STREAM PROFILSOCIAL");
...
@@ -1033,7 +1033,7 @@ function loadStream(indexMin, indexMax){ mylog.log("LOAD STREAM PROFILSOCIAL");
}
}
}
}
});
});
}
}
*/
var
colNotifOpen
=
true
;
var
colNotifOpen
=
true
;
function
toogleNotif
(
open
){
function
toogleNotif
(
open
){
...
...
assets/js/default/search.js
View file @
b1a4ec1a
...
@@ -32,6 +32,7 @@ var searchInterface={
...
@@ -32,6 +32,7 @@ var searchInterface={
init
:
function
(
typeInit
){
init
:
function
(
typeInit
){
searchInterface
.
setSearchTypes
(
typeInit
);
searchInterface
.
setSearchTypes
(
typeInit
);
searchInterface
.
initSearchParams
();
searchInterface
.
initSearchParams
();
searchInterface
.
setSearchbar
();
if
(
searchObject
.
types
.
length
>
1
)
searchAllEngine
.
initSearch
();
if
(
searchObject
.
types
.
length
>
1
)
searchAllEngine
.
initSearch
();
if
(
searchObject
.
text
!=
""
)
$
(
"
.main-search-bar, #second-search-bar
"
).
val
(
searchObject
.
text
);
if
(
searchObject
.
text
!=
""
)
$
(
"
.main-search-bar, #second-search-bar
"
).
val
(
searchObject
.
text
);
$
(
"
.theme-header-filter
"
).
off
().
on
(
"
click
"
,
function
(){
$
(
"
.theme-header-filter
"
).
off
().
on
(
"
click
"
,
function
(){
...
@@ -82,7 +83,7 @@ var searchInterface={
...
@@ -82,7 +83,7 @@ var searchInterface={
activeTagsFilter
();
activeTagsFilter
();
startSearch
(
0
,
indexStepInit
,
searchCallback
);
startSearch
(
0
,
indexStepInit
,
searchCallback
);
});
});
$
(
"
.btn-tags-unik
"
).
off
().
on
(
"
click
"
,
function
(){
$
(
"
.btn-tags-unik
"
).
off
().
on
(
"
click
"
,
function
(){
$
(
"
.btn-tags-unik
"
).
removeClass
(
"
active
"
);
$
(
"
.btn-tags-unik
"
).
removeClass
(
"
active
"
);
if
(
!
notNull
(
$
(
this
).
data
(
"
k
"
))
||
$
(
this
).
data
(
"
k
"
)
==
""
)
if
(
!
notNull
(
$
(
this
).
data
(
"
k
"
))
||
$
(
this
).
data
(
"
k
"
)
==
""
)
searchObject
.
tags
=
[];
searchObject
.
tags
=
[];
...
@@ -96,7 +97,28 @@ var searchInterface={
...
@@ -96,7 +97,28 @@ var searchInterface={
if
(
typeof
searchObject
.
ranges
!=
"
undefined
"
)
searchAllEngine
.
initSearch
();
if
(
typeof
searchObject
.
ranges
!=
"
undefined
"
)
searchAllEngine
.
initSearch
();
startSearch
(
0
,
indexStepInit
,
searchCallback
);
startSearch
(
0
,
indexStepInit
,
searchCallback
);
});
});
$
(
"
#main-search-bar
"
).
keyup
(
function
(
e
){
$
(
"
.main-btn-create
"
).
off
().
on
(
"
click
"
,
function
(){
currentKFormType
=
$
(
this
).
data
(
"
ktype
"
);
var
type
=
$
(
this
).
data
(
"
type
"
);
if
(
type
==
"
all
"
){
$
(
"
#dash-create-modal
"
).
modal
(
"
show
"
);
return
;
}
if
(
type
==
"
events
"
)
type
=
"
event
"
;
if
(
type
==
"
vote
"
)
type
=
"
entry
"
;
dyFObj
.
openForm
(
type
);
});
if
(
typeof
themeParams
!=
"
undefined
"
&&
typeof
themeParams
.
appRendering
!=
"
undefined
"
&&
themeParams
.
appRendering
==
"
vertical
"
){
$
(
"
.headerSearchContainer, .bodySearchContainer
"
).
removeClass
(
"
col-md-10 col-sm-10 col-sm-offset-1 col-md-offset-1
"
);
}
},
setSearchbar
:
function
(){
$
(
"
#main-search-bar
"
).
keyup
(
function
(
e
){
$
(
"
#second-search-bar
"
).
val
(
$
(
this
).
val
());
$
(
"
#second-search-bar
"
).
val
(
$
(
this
).
val
());
$
(
"
#main-search-xs-bar
"
).
val
(
$
(
this
).
val
());
$
(
"
#main-search-xs-bar
"
).
val
(
$
(
this
).
val
());
$
(
"
#input-search-map
"
).
val
(
$
(
this
).
val
());
$
(
"
#input-search-map
"
).
val
(
$
(
this
).
val
());
...
@@ -110,8 +132,7 @@ var searchInterface={
...
@@ -110,8 +132,7 @@ var searchInterface={
startSearch
(
0
,
indexStepInit
,
searchCallback
);
startSearch
(
0
,
indexStepInit
,
searchCallback
);
}
}
});
});
$
(
"
#main-search-xs-bar
"
).
off
().
keyup
(
function
(
e
){
$
(
"
#main-search-xs-bar
"
).
keyup
(
function
(
e
){
$
(
"
#second-search-bar
"
).
val
(
$
(
this
).
val
());
$
(
"
#second-search-bar
"
).
val
(
$
(
this
).
val
());
$
(
"
#main-search-bar
"
).
val
(
$
(
this
).
val
());
$
(
"
#main-search-bar
"
).
val
(
$
(
this
).
val
());
$
(
"
#input-search-map
"
).
val
(
$
(
this
).
val
());
$
(
"
#input-search-map
"
).
val
(
$
(
this
).
val
());
...
@@ -126,7 +147,7 @@ var searchInterface={
...
@@ -126,7 +147,7 @@ var searchInterface={
}
}
});
});
$
(
"
#second-search-bar
"
).
keyup
(
function
(
e
){
$
(
"
#second-search-bar
"
).
off
().
keyup
(
function
(
e
){
$
(
"
.main-search-bar
"
).
val
(
$
(
this
).
val
());
$
(
"
.main-search-bar
"
).
val
(
$
(
this
).
val
());
if
(
e
.
keyCode
==
13
||
$
(
this
).
val
()
==
""
){
if
(
e
.
keyCode
==
13
||
$
(
this
).
val
()
==
""
){
scrollH
=
(
$
(
"
#filter-thematic-menu
"
).
is
(
"
:visible
"
))
?
250
:
0
;
scrollH
=
(
$
(
"
#filter-thematic-menu
"
).
is
(
"
:visible
"
))
?
250
:
0
;
...
@@ -140,7 +161,7 @@ var searchInterface={
...
@@ -140,7 +161,7 @@ var searchInterface={
$
(
"
.btn-directory-type
"
).
removeClass
(
"
active
"
);
$
(
"
.btn-directory-type
"
).
removeClass
(
"
active
"
);
}
}
});
});
$
(
"
#input-search-map
"
).
off
().
keyup
(
function
(
e
){
$
(
"
#input-search-map
"
).
off
().
keyup
(
function
(
e
){
$
(
"
#second-search-bar
"
).
val
(
$
(
"
#input-search-map
"
).
val
());
$
(
"
#second-search-bar
"
).
val
(
$
(
"
#input-search-map
"
).
val
());
$
(
"
.main-search-bar
"
).
val
(
$
(
"
#input-search-map
"
).
val
());
$
(
"
.main-search-bar
"
).
val
(
$
(
"
#input-search-map
"
).
val
());
...
@@ -176,25 +197,6 @@ var searchInterface={
...
@@ -176,25 +197,6 @@ var searchInterface={
startSearch
(
0
,
indexStepInit
,
searchCallback
);
startSearch
(
0
,
indexStepInit
,
searchCallback
);
$
(
"
.btn-directory-type
"
).
removeClass
(
"
active
"
);
$
(
"
.btn-directory-type
"
).
removeClass
(
"
active
"
);
});
});
$
(
"
.main-btn-create
"
).
off
().
on
(
"
click
"
,
function
(){
currentKFormType
=
$
(
this
).
data
(
"
ktype
"
);
var
type
=
$
(
this
).
data
(
"
type
"
);
if
(
type
==
"
all
"
){
$
(
"
#dash-create-modal
"
).
modal
(
"
show
"
);
return
;
}
if
(
type
==
"
events
"
)
type
=
"
event
"
;
if
(
type
==
"
vote
"
)
type
=
"
entry
"
;
dyFObj
.
openForm
(
type
);
});
if
(
typeof
themeParams
!=
"
undefined
"
&&
typeof
themeParams
.
appRendering
!=
"
undefined
"
&&
themeParams
.
appRendering
==
"
vertical
"
){
$
(
"
.headerSearchContainer, .bodySearchContainer
"
).
removeClass
(
"
col-md-10 col-sm-10 col-sm-offset-1 col-md-offset-1
"
);
}
},
},
bindFiltersEvents
:
function
()
{
bindFiltersEvents
:
function
()
{
$
(
"
.btn-directory-type
"
).
off
().
on
(
"
click
"
,
function
(){
$
(
"
.btn-directory-type
"
).
off
().
on
(
"
click
"
,
function
(){
...
@@ -598,7 +600,6 @@ var searchInterface={
...
@@ -598,7 +600,6 @@ var searchInterface={
searchInterface
.
initCategoriesEvent
();
searchInterface
.
initCategoriesEvent
();
},
},
setSearchTypes
:
function
(
typeInit
){
setSearchTypes
:
function
(
typeInit
){
if
(
typeInit
==
"
all
"
)
{
if
(
typeInit
==
"
all
"
)
{
if
(
isCustom
(
"
types
"
)){
if
(
isCustom
(
"
types
"
)){
searchObject
.
types
=
[];
searchObject
.
types
=
[];
...
...
config/params.json
View file @
b1a4ec1a
...
@@ -35,7 +35,6 @@
...
@@ -35,7 +35,6 @@
},
},
"#welcome"
:
{
"#welcome"
:
{
"inMenu"
:
false
,
"inMenu"
:
false
,
"useHeader"
:
true
,
"useFooter"
:
true
,
"useFooter"
:
true
,
"useFilter"
:
false
,
"useFilter"
:
false
,
"dropdownResult"
:
true
,
"dropdownResult"
:
true
,
...
@@ -50,7 +49,6 @@
...
@@ -50,7 +49,6 @@
},
},
"#myhome"
:
{
"#myhome"
:
{
"inMenu"
:
false
,
"inMenu"
:
false
,
"useHeader"
:
true
,
"useFooter"
:
true
,
"useFooter"
:
true
,
"useFilter"
:
false
,
"useFilter"
:
false
,
"subdomain"
:
"home"
,
"subdomain"
:
"home"
,
...
@@ -65,7 +63,6 @@
...
@@ -65,7 +63,6 @@
},
},
"#docs"
:
{
"#docs"
:
{
"inMenu"
:
false
,
"inMenu"
:
false
,
"useHeader"
:
false
,
"subdomain"
:
"docs"
,
"subdomain"
:
"docs"
,
"subdomainName"
:
"Documentation"
,
"subdomainName"
:
"Documentation"
,
"hash"
:
"#app.docs"
,
"hash"
:
"#app.docs"
,
...
@@ -77,7 +74,6 @@
...
@@ -77,7 +74,6 @@
},
},
"#search"
:
{
"#search"
:
{
"inMenu"
:
true
,
"inMenu"
:
true
,
"useHeader"
:
true
,
"useFooter"
:
true
,
"useFooter"
:
true
,
"useFilter"
:
true
,
"useFilter"
:
true
,
"subdomain"
:
"search"
,
"subdomain"
:
"search"
,
...
@@ -103,7 +99,6 @@
...
@@ -103,7 +99,6 @@
},
},
"#web"
:
"#web"
:
{
"inMenu"
:
false
,
{
"inMenu"
:
false
,
"useHeader"
:
true
,
"useFilter"
:
false
,
"useFilter"
:
false
,
"subdomain"
:
"web"
,
"subdomain"
:
"web"
,
"subdomainName"
:
"Web"
,
"subdomainName"
:
"Web"
,
...
@@ -115,7 +110,6 @@
...
@@ -115,7 +110,6 @@
"#referencement"
:
"#referencement"
:
{
{
"inMenu"
:
false
,
"inMenu"
:
false
,
"useHeader"
:
true
,
"subdomain"
:
"referencement"
,
"subdomain"
:
"referencement"
,
"subdomainName"
:
"Referencement"
,
"subdomainName"
:
"Referencement"
,
"hash"
:
"#app.referencement"
,
"hash"
:
"#app.referencement"
,
...
@@ -126,7 +120,6 @@
...
@@ -126,7 +120,6 @@
"#live"
:
{
"#live"
:
{
"inMenu"
:
true
,
"inMenu"
:
true
,
"useHeader"
:
true
,
"useFilter"
:
true
,
"useFilter"
:
true
,
"subdomain"
:
"live"
,
"subdomain"
:
"live"
,
"useFooter"
:
true
,
"useFooter"
:
true
,
...
@@ -145,7 +138,6 @@
...
@@ -145,7 +138,6 @@
"#agenda"
:
{
"#agenda"
:
{
"inMenu"
:
true
,
"inMenu"
:
true
,
"useHeader"
:
true
,
"useFilter"
:
true
,
"useFilter"
:
true
,
"useFooter"
:
true
,
"useFooter"
:
true
,