Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
gy4443
chemotion_eln_server
Commits
53e7fac1
Commit
53e7fac1
authored
Aug 17, 2015
by
Marco Sehrer
Browse files
Make sharing URL driven and nested to currentURL
parent
e8d76e4b
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/assets/javascripts/components/App.js
View file @
53e7fac1
...
...
@@ -19,10 +19,10 @@ Aviator.setRoutes({
target
:
{
root
:
function
(
e
)
{
let
modalDomNode
=
document
.
getElementById
(
'
modal
'
);
if
(
modalDomNode
)
{
React
.
unmountComponentAtNode
(
modalDomNode
);
}
//
let modalDomNode = document.getElementById('modal');
//
if(modalDomNode) {
//
React.unmountComponentAtNode(modalDomNode);
//
}
}
},
...
...
@@ -49,10 +49,18 @@ Aviator.setRoutes({
},
'
/sharing
'
:
{
'
/*
'
:
'
showShareModal
'
,
'
/
'
:
'
show
'
,
'
/hide
'
:
'
hide
'
,
target
:
{
show
ShareModal
:
function
(
e
)
{
show
:
function
(
e
)
{
React
.
render
(
<
ShareModal
/>
,
document
.
getElementById
(
'
modal
'
));
},
hide
:
function
(
e
)
{
let
modalDomNode
=
document
.
getElementById
(
'
modal
'
);
if
(
modalDomNode
)
{
React
.
unmountComponentAtNode
(
modalDomNode
);
}
Aviator
.
navigate
(
Aviator
.
getCurrentURI
().
replace
(
'
/sharing/hide
'
,
''
))
}
}
}
...
...
app/assets/javascripts/components/managing_actions/ShareButton.js
View file @
53e7fac1
...
...
@@ -8,7 +8,7 @@ export default class ShareButton extends React.Component {
}
showShareModal
()
{
Aviator
.
navigate
(
'
/sharing
'
);
Aviator
.
navigate
(
Aviator
.
getCurrentURI
()
+
'
/sharing
'
);
}
render
()
{
...
...
app/assets/javascripts/components/managing_actions/ShareModal.js
View file @
53e7fac1
...
...
@@ -34,7 +34,8 @@ export default class ShareModal extends React.Component {
}
hideModal
()
{
Aviator
.
navigate
(
'
/
'
);
//window.history.back();
Aviator
.
navigate
(
Aviator
.
getCurrentURI
()
+
'
/hide
'
);
}
handleSharing
()
{
...
...
Write
Preview
Supports
Markdown
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