Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Memorekall Member New
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Rekall
Memorekall Member New
Commits
50c5b2e1
Verified
Commit
50c5b2e1
authored
Feb 21, 2022
by
David Beniamine
Browse files
Options
Downloads
Patches
Plain Diff
Improve CSS and add reset filter
parent
6322b724
No related branches found
No related tags found
1 merge request
!61
156 mosaic view filter
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
capsule-prototype/css/online-theme.css
+22
-1
22 additions, 1 deletion
capsule-prototype/css/online-theme.css
capsule-prototype/js/online-script.js
+23
-9
23 additions, 9 deletions
capsule-prototype/js/online-script.js
with
45 additions
and
10 deletions
capsule-prototype/css/online-theme.css
+
22
−
1
View file @
50c5b2e1
...
@@ -312,7 +312,6 @@ html, body {
...
@@ -312,7 +312,6 @@ html, body {
font-weight
:
200
;
font-weight
:
200
;
font-size
:
0.9em
;
font-size
:
0.9em
;
cursor
:
pointer
;
padding-bottom
:
0
;
padding-bottom
:
0
;
line-height
:
1.2em
;
line-height
:
1.2em
;
...
@@ -345,10 +344,31 @@ html, body {
...
@@ -345,10 +344,31 @@ html, body {
padding
:
1.0em
1vw
;
padding
:
1.0em
1vw
;
margin
:
2vh
0.5vw
1.5vh
0.5vw
;
margin
:
2vh
0.5vw
1.5vh
0.5vw
;
border-radius
:
3px
;
border-radius
:
3px
;
cursor
:
pointer
;
}
}
.mosaic_filter_disabled
{
.mosaic_filter_disabled
{
opacity
:
0.5
;
opacity
:
0.5
;
}
}
.mosaic_filter_disabled
>
h2
:after
{
background-image
:
url
(
'images/icn-menu-filter.png'
);
}
.mosaic_filter_item
:not
(
.mosaic_filter_disabled
)>
h2
:after
{
background-image
:
url
(
'images/icn-menu-preview.png'
);
}
.mosaic_filter_item
>
h2
:after
{
display
:
inline-block
;
height
:
20px
;
width
:
20px
;
content
:
" "
;
background-size
:
20px
20px
;
margin-left
:
5px
;
padding-top
:
3px
;
background-repeat
:
no-repeat
;
}
.mosaic_filter_item_all
>
h2
:after
{
background-image
:
url
(
'images/icn-reload.png'
)
!important
;
}
.mosaic_item
img
{
.mosaic_item
img
{
/* To correctly align image, regardless of content height: */
/* To correctly align image, regardless of content height: */
...
@@ -359,6 +379,7 @@ html, body {
...
@@ -359,6 +379,7 @@ html, body {
/* The width of the container also implies margin around the images. */
/* The width of the container also implies margin around the images. */
width
:
100px
;
width
:
100px
;
margin
:
2vh
0
1.5vh
0
;
margin
:
2vh
0
1.5vh
0
;
cursor
:
pointer
;
}
}
.mosaic_item
.caption
{
.mosaic_item
.caption
{
display
:
block
;
display
:
block
;
...
...
This diff is collapsed.
Click to expand it.
capsule-prototype/js/online-script.js
+
23
−
9
View file @
50c5b2e1
...
@@ -830,11 +830,28 @@ function openMosaic() {
...
@@ -830,11 +830,28 @@ function openMosaic() {
div
.
append
(
$
(
'
<span/>
'
).
addClass
(
'
caption
'
).
text
(
name
));
div
.
append
(
$
(
'
<span/>
'
).
addClass
(
'
caption
'
).
text
(
name
));
return
div
;
return
div
;
}
}
function
getFilterElement
(
text
,
color
,
callback
,
css_class
)
{
return
$
(
'
<div/>
'
)
.
addClass
(
'
mosaic_filter_item
'
)
.
addClass
(
css_class
)
.
on
(
'
click
'
,
callback
)
.
css
(
'
background
'
,
color
)
.
append
(
$
(
'
<h2/>
'
).
text
(
text
));
}
$
(
"
#popupMosaicSpace
"
).
show
();
$
(
"
#popupMosaicSpace
"
).
show
();
let
container
=
$
(
'
#popupMosaicMosaic
'
);
let
container
=
$
(
'
#popupMosaicMosaic
'
);
container
.
html
(
''
);
container
.
html
(
''
);
let
filterdiv
=
$
(
'
<div/>
'
).
addClass
(
'
mosaic_filter
'
);
let
filterdiv
=
$
(
'
<div/>
'
).
addClass
(
'
mosaic_filter
'
);
filterdiv
.
append
(
getFilterElement
(
'
Reset filters
'
,
'
rgb(100,100,100)
'
,
function
()
{
$
(
'
.mosaic_filter_item
'
).
removeClass
(
'
mosaic_filter_disabled
'
);
$
(
'
.mosaic_category
'
).
show
();
},
'
mosaic_filter_item_all
'
));
container
.
append
(
filterdiv
);
container
.
append
(
filterdiv
);
// TODO is there a better way to iterate over tags or documents ?
// TODO is there a better way to iterate over tags or documents ?
for
(
let
[
k
,
v
]
of
Object
.
entries
(
rekall
.
sortings
.
colors
.
categories
))
{
for
(
let
[
k
,
v
]
of
Object
.
entries
(
rekall
.
sortings
.
colors
.
categories
))
{
...
@@ -846,17 +863,14 @@ function openMosaic() {
...
@@ -846,17 +863,14 @@ function openMosaic() {
category
.
append
(
$
(
'
<h2/>
'
).
text
(
categoryName
));
category
.
append
(
$
(
'
<h2/>
'
).
text
(
categoryName
));
category
.
append
(
grid
);
category
.
append
(
grid
);
filterdiv
.
append
(
$
(
'
<sdiv/>
'
)
filterdiv
.
append
(
getFilterElement
(
.
addClass
(
'
mosaic_filter_item
'
)
categoryName
,
.
on
(
'
click
'
,
function
()
{
v
.
color
,
function
()
{
category
.
toggle
();
category
.
toggle
();
console
.
log
(
this
);
console
.
log
(
$
(
this
));
$
(
this
).
toggleClass
(
'
mosaic_filter_disabled
'
);
$
(
this
).
toggleClass
(
'
mosaic_filter_disabled
'
);
})
},
.
css
(
'
background
'
,
v
.
color
)
''
.
append
(
$
(
'
<h2/>
'
).
text
(
categoryName
))
));
);
for
(
let
i
in
v
.
tags
){
for
(
let
i
in
v
.
tags
){
grid
.
append
(
getMosaicItem
(
v
.
tags
[
i
]));
grid
.
append
(
getMosaicItem
(
v
.
tags
[
i
]));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
sign in
to comment