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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Rekall
Memorekall Member New
Commits
0774f3ed
Verified
Commit
0774f3ed
authored
3 years ago
by
David Beniamine
Browse files
Options
Downloads
Patches
Plain Diff
Refactor + css colors coherent + fix bug double open mosaic
parent
e52c5b1c
Branches
Branches containing commit
Tags
preprod20220209-1535
Tags containing commit
2 merge requests
!55
demo version for Clarisse workshop
,
!50
Open edit popup on click on mosaic
Pipeline
#792
passed
3 years ago
Stage: test
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
capsule-prototype/css/online-theme.css
+17
-16
17 additions, 16 deletions
capsule-prototype/css/online-theme.css
capsule-prototype/js/online-script.js
+28
-24
28 additions, 24 deletions
capsule-prototype/js/online-script.js
legacy/create.zip
+0
-0
0 additions, 0 deletions
legacy/create.zip
with
45 additions
and
40 deletions
capsule-prototype/css/online-theme.css
+
17
−
16
View file @
0774f3ed
...
...
@@ -324,6 +324,7 @@ html, body {
.mosaic_category
{
display
:
grid
;
grid-template-columns
:
repeat
(
auto-fit
,
minmax
(
125px
,
1
fr
));
background
:
rgba
(
0
,
0
,
0
,
.15
);
grid-auto-rows
:
150px
;
border-radius
:
3px
;
padding
:
1.0em
1vw
;
...
...
This diff is collapsed.
Click to expand it.
capsule-prototype/js/online-script.js
+
28
−
24
View file @
0774f3ed
...
...
@@ -818,31 +818,25 @@ function openMosaic() {
function
getMosaicItem
(
tagOrDoc
)
{
let
path
=
Utils
.
getPreviewPath
(
tagOrDoc
);
let
name
=
tagOrDoc
.
getMetadata
(
"
Rekall->Name
"
);
let
type
=
tagOrDoc
.
getMetadata
(
"
Rekall->Type
"
);
let
url
=
''
;
if
(
typeof
path
===
'
undefined
'
)
{
if
(
type
==
'
rekall/link
'
)
{
url
=
"
../shared/css/images/img-link.png
"
;
}
else
{
url
=
"
../shared/css/images/img-note.png
"
;
}
if
(
'
undefined
'
===
typeof
path
)
{
let
icon
=
(
'
rekall/link
'
===
tagOrDoc
.
getMetadata
(
"
Rekall->Type
"
))
?
"
link
"
:
"
note
"
;
url
=
"
../shared/css/images/img-
"
+
icon
+
"
.png
"
;
}
else
{
url
=
path
;
}
let
div
=
$
(
'
<div/>
'
).
addClass
(
'
mosaic_item
'
)
let
div
=
$
(
'
<div/>
'
).
addClass
(
'
mosaic_item
'
)
.
on
(
'
click
'
,
function
()
{
tagOrDoc
.
openPopupEdit
();});
div
.
append
(
$
(
'
<img/>
'
).
attr
(
'
src
'
,
url
));
div
.
append
(
$
(
'
<span/>
'
).
addClass
(
'
caption
'
).
text
(
name
));
div
.
on
(
'
click
'
,
function
()
{
tagOrDoc
.
openPopupEdit
();});
return
div
;
}
$
(
"
#popupMosaicSpace
"
).
show
();
let
container
=
$
(
'
#popupMosaicMosaic
'
);
container
.
html
(
''
);
// TODO is there a better way to iterate over tags or documents ?
for
(
let
[
k
,
v
]
of
Object
.
entries
(
rekall
.
sortings
.
colors
.
categories
))
{
let
category
=
$
(
'
<div/>
'
);
category
.
addClass
(
'
mosaic_category
'
);
category
.
css
(
'
background
'
,
v
.
color
);
let
category
=
$
(
'
<div/>
'
).
addClass
(
'
mosaic_category
'
).
css
(
'
background
'
,
getTagGradientColor
(
v
));
for
(
let
i
in
v
.
tags
){
category
.
append
(
getMosaicItem
(
v
.
tags
[
i
]));
}
...
...
@@ -850,6 +844,24 @@ function openMosaic() {
}
}
function
getTagGradientColor
(
tag
)
{
var
isOpera
=
!!
window
.
opera
||
navigator
.
userAgent
.
indexOf
(
'
OPR/
'
)
>=
0
;
// Opera 8.0+ (UA detection to detect Blink/v8-powered Opera)
var
isFirefox
=
typeof
InstallTrigger
!==
'
undefined
'
;
// Firefox 1.0+
var
isSafari
=
Object
.
prototype
.
toString
.
call
(
window
.
HTMLElement
).
indexOf
(
'
Constructor
'
)
>
0
;
// At least Safari 3+: "[object HTMLElementConstructor]"
var
isChrome
=
!!
window
.
chrome
&&
!
isOpera
;
// Chrome 1+
var
isIE
=
/*@cc_on!@*/
false
||
!!
document
.
documentMode
;
// At least IE6
if
(
isOpera
)
{
return
"
-o-linear-gradient(right bottom, rgba(20,46,51,1) 0%,
"
+
tag
.
color
+
"
100%)
"
;
}
if
(
isFirefox
)
{
return
"
-moz-linear-gradient(right bottom, rgba(20,46,51,1) 0%,
"
+
tag
.
color
+
"
100%)
"
;
}
if
((
isSafari
)
||
(
isChrome
)){
return
"
-webkit-linear-gradient(right bottom, rgba(20,46,51,1) 0%,
"
+
tag
.
color
+
"
100%)
"
;
}
}
function
closeMosaic
()
{
$
(
"
#popupMosaicSpace
"
).
hide
();
}
...
...
@@ -866,17 +878,9 @@ function fillPopupEdit(tag) {
$
(
"
#popupTC
"
).
css
(
"
background
"
,
tag
.
color
);
/*$("#popupType").css("color",tag.color);*/
var
isOpera
=
!!
window
.
opera
||
navigator
.
userAgent
.
indexOf
(
'
OPR/
'
)
>=
0
;
// Opera 8.0+ (UA detection to detect Blink/v8-powered Opera)
var
isFirefox
=
typeof
InstallTrigger
!==
'
undefined
'
;
// Firefox 1.0+
var
isSafari
=
Object
.
prototype
.
toString
.
call
(
window
.
HTMLElement
).
indexOf
(
'
Constructor
'
)
>
0
;
// At least Safari 3+: "[object HTMLElementConstructor]"
var
isChrome
=
!!
window
.
chrome
&&
!
isOpera
;
// Chrome 1+
var
isIE
=
/*@cc_on!@*/
false
||
!!
document
.
documentMode
;
// At least IE6
var
bgColorLeft
=
tag
.
color
.
replace
(
/rgb/g
,
"
rgba
"
).
replace
(
/
\)
/g
,
"
,.35)
"
);
if
(
isOpera
)
bgColorLeft
=
"
-o-linear-gradient(right bottom, rgba(20,46,51,1) 0%,
"
+
tag
.
color
+
"
100%)
"
;
else
if
(
isFirefox
)
bgColorLeft
=
"
-moz-linear-gradient(right bottom, rgba(20,46,51,1) 0%,
"
+
tag
.
color
+
"
100%)
"
;
else
if
((
isSafari
)
||
(
isChrome
))
bgColorLeft
=
"
-webkit-linear-gradient(right bottom, rgba(20,46,51,1) 0%,
"
+
tag
.
color
+
"
100%)
"
;
bgColorLeft
=
getTagGradientColor
(
tag
);
$
(
"
#popupLeft
"
).
css
(
"
background
"
,
bgColorLeft
);
...
...
This diff is collapsed.
Click to expand it.
legacy/create.zip
+
0
−
0
View file @
0774f3ed
No preview for this file type
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
register
or
sign in
to comment