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
968a9c2d
Commit
968a9c2d
authored
May 3, 2022
by
Sebastien
Browse files
Options
Downloads
Patches
Plain Diff
Remove direct dependency from rekall to online-script.js
parent
006d4f58
No related branches found
No related tags found
1 merge request
!98
refresh the mosaic on annotation modification
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
capsule-prototype/js/online-rekall/Rekall.js
+28
-15
28 additions, 15 deletions
capsule-prototype/js/online-rekall/Rekall.js
capsule-prototype/js/online-script.js
+7
-0
7 additions, 0 deletions
capsule-prototype/js/online-script.js
with
35 additions
and
15 deletions
capsule-prototype/js/online-rekall/Rekall.js
+
28
−
15
View file @
968a9c2d
...
@@ -70,6 +70,10 @@ Rekall.prototype.allowProjectDeletion = function () {
...
@@ -70,6 +70,10 @@ Rekall.prototype.allowProjectDeletion = function () {
this
.
Settings
.
_allowProjectDeletion
=
arguments
[
0
];
this
.
Settings
.
_allowProjectDeletion
=
arguments
[
0
];
}
}
Rekall
.
prototype
.
publish
=
function
(
eventName
,
data
){
return
window
.
app
.
rekall
.
Rekall
(
'
pubSub
'
).
publish
(
eventName
,
data
);
}
Rekall
.
prototype
.
loadXMLFile
=
function
()
{
Rekall
.
prototype
.
loadXMLFile
=
function
()
{
var
oldURL
=
window
.
document
.
location
+
""
;
var
oldURL
=
window
.
document
.
location
+
""
;
var
index
=
0
;
var
index
=
0
;
...
@@ -92,16 +96,19 @@ Rekall.prototype.loadXMLFile = function () {
...
@@ -92,16 +96,19 @@ Rekall.prototype.loadXMLFile = function () {
this
.
baseUrl
=
url
;
this
.
baseUrl
=
url
;
let
that
=
this
;
let
that
=
this
;
roulette
S
tart
(
);
this
.
publish
(
'
roulette
.s
tart
ed
'
);
$
.
ajax
(
"
php/file.php?r=project.xml
"
,
{
$
.
ajax
(
"
php/file.php?r=project.xml
"
,
{
type
:
"
GET
"
,
type
:
"
GET
"
,
cache
:
false
,
cache
:
false
,
data
:
{
"
rand
"
:
random
()},
data
:
{
"
rand
"
:
Math
.
random
()},
dataType
:
"
xml
"
,
dataType
:
"
xml
"
,
success
:
function
(
xml
)
{
success
:
function
(
xml
)
{
if
((
xml
==
null
)
||
(
xml
==
undefined
))
if
((
xml
==
null
)
||
(
xml
==
undefined
))
{
openAlert
(
"
Your project is unreachable. Did you move the folder to an other location?
"
,
60
);
that
.
publish
(
'
alert
'
,
{
else
{
message
:
"
Your project is unreachable. Did you move the folder to an other location?
"
,
buttons
:
60
});
}
else
{
$
(
xml
).
find
(
'
project
'
).
each
(
function
()
{
$
(
xml
).
find
(
'
project
'
).
each
(
function
()
{
//if($(this).find('document').length == 0) {
//if($(this).find('document').length == 0) {
// openAlert("Start by adding files to your project.", 60);
// openAlert("Start by adding files to your project.", 60);
...
@@ -112,21 +119,27 @@ Rekall.prototype.loadXMLFile = function () {
...
@@ -112,21 +119,27 @@ Rekall.prototype.loadXMLFile = function () {
//}
//}
});
});
}
}
rouletteEnd
(
);
that
.
publish
(
'
roulette.terminated
'
,
{}
);
},
},
error
:
function
()
{
error
:
function
()
{
$
.
ajax
(
"
file/project.xml
"
,
{
$
.
ajax
(
"
file/project.xml
"
,
{
type
:
"
GET
"
,
type
:
"
GET
"
,
cache
:
false
,
cache
:
false
,
data
:
{
"
rand
"
:
random
()},
data
:
{
"
rand
"
:
Math
.
random
()},
dataType
:
"
xml
"
,
dataType
:
"
xml
"
,
success
:
function
(
xml
)
{
success
:
function
(
xml
)
{
if
((
xml
==
null
)
||
(
xml
==
undefined
))
if
((
xml
==
null
)
||
(
xml
==
undefined
))
{
openAlert
(
"
Your project is unreachable. Did you move the folder to an other location?
"
,
60
);
that
.
publish
(
'
alert
'
,
{
else
{
message
:
"
Your project is unreachable. Did you move the folder to an other location?
"
,
buttons
:
60
});
}
else
{
$
(
xml
).
find
(
'
project
'
).
each
(
function
()
{
$
(
xml
).
find
(
'
project
'
).
each
(
function
()
{
if
(
$
(
this
).
find
(
'
document
'
).
length
==
0
)
{
if
(
$
(
this
).
find
(
'
document
'
).
length
==
0
)
{
openAlert
(
"
Start by adding files to your project.
"
,
60
);
that
.
publish
(
'
alert
'
,
{
message
:
"
Start by adding files to your project.
"
,
buttons
:
60
});
}
else
{
}
else
{
if
(
that
.
project
==
undefined
)
if
(
that
.
project
==
undefined
)
that
.
project
=
new
Project
(
url
,
that
);
that
.
project
=
new
Project
(
url
,
that
);
...
@@ -134,13 +147,13 @@ Rekall.prototype.loadXMLFile = function () {
...
@@ -134,13 +147,13 @@ Rekall.prototype.loadXMLFile = function () {
}
}
});
});
}
}
rouletteEnd
(
);
that
.
publish
(
'
roulette.terminated
'
,
{}
);
},
},
error
:
function
()
{
error
:
function
()
{
rouletteEnd
(
);
that
.
publish
(
'
roulette.terminated
'
,
{}
);
}
}
});
});
rouletteEnd
(
);
that
.
publish
(
'
roulette.terminated
'
);
}
}
});
});
}
}
...
...
This diff is collapsed.
Click to expand it.
capsule-prototype/js/online-script.js
+
7
−
0
View file @
968a9c2d
...
@@ -12,6 +12,9 @@ window.onload = function() {
...
@@ -12,6 +12,9 @@ window.onload = function() {
pubSub
.
subscribe
(
'
open_paste_modal
'
,
openPasteModal
);
pubSub
.
subscribe
(
'
open_paste_modal
'
,
openPasteModal
);
pubSub
.
subscribe
(
'
close_paste_modal
'
,
closePasteModal
);
pubSub
.
subscribe
(
'
close_paste_modal
'
,
closePasteModal
);
pubSub
.
subscribe
(
'
updated.project.name
'
,
onUpdatedProjectName
);
pubSub
.
subscribe
(
'
updated.project.name
'
,
onUpdatedProjectName
);
pubSub
.
subscribe
(
'
alert
'
,
openAlertWrapper
);
pubSub
.
subscribe
(
'
roulette.terminated
'
,
rouletteEnd
);
pubSub
.
subscribe
(
'
roulette.started
'
,
rouletteStart
);
};
};
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
...
@@ -655,6 +658,10 @@ function openAlert(message, buttons) {
...
@@ -655,6 +658,10 @@ function openAlert(message, buttons) {
}
}
}
}
function
openAlertWrapper
(
message
,
data
){
openAlert
(
data
.
message
,
data
.
buttons
);
}
function
closeAlert
()
{
function
closeAlert
()
{
$
(
"
#popupAlertMessage
"
).
html
(
""
);
$
(
"
#popupAlertMessage
"
).
html
(
""
);
$
(
"
.popupAlertButton
"
).
hide
();
$
(
"
.popupAlertButton
"
).
hide
();
...
...
This diff is collapsed.
Click to expand it.
Loïs Poujade
@lpo
mentioned in issue
#13 (closed)
·
Jun 15, 2022
mentioned in issue
#13 (closed)
mentioned in issue #13
Toggle commit list
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