Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cribjs-editor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
cribjs-editor
Commits
a7d5e8b5
Commit
a7d5e8b5
authored
Jul 16, 2020
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Redirection to rendered data is done in new tab
parent
55b64dfe
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
gadget/gadget_cribjs_page_app_list.js
gadget/gadget_cribjs_page_app_list.js
+1
-1
gadget/gadget_cribjs_page_editor.js
gadget/gadget_cribjs_page_editor.js
+1
-1
gadget/gadget_cribjs_router.js
gadget/gadget_cribjs_router.js
+9
-3
No files found.
gadget/gadget_cribjs_page_app_list.js
View file @
a7d5e8b5
...
...
@@ -41,7 +41,7 @@
domsugar
(
"
div
"
,
{
class
:
"
caption
"
},
[
domsugar
(
"
h3
"
,
{
text
:
app_list
[
i
].
application_title
}),
domsugar
(
"
a
"
,
{
href
:
url_list
[
i
],
class
:
"
btn btn-default
"
,
role
:
"
button
"
,
text
:
"
Edit
"
}),
domsugar
(
"
a
"
,
{
href
:
base_url
+
tmp_url
,
class
:
"
btn btn-primary
"
,
role
:
"
button
"
,
text
:
"
GO
"
})
domsugar
(
"
a
"
,
{
href
:
base_url
+
tmp_url
,
class
:
"
btn btn-primary
"
,
role
:
"
button
"
,
text
:
"
GO
"
,
target
:
"
_blank
"
})
])
])
...
...
gadget/gadget_cribjs_page_editor.js
View file @
a7d5e8b5
...
...
@@ -112,7 +112,7 @@
if
(
event
.
submitter
.
name
===
"
go
"
)
{
return
gadget
.
redirect
({
url
:
window
.
location
.
origin
+
window
.
location
.
pathname
+
url
,
toExternal
:
true
newTab
:
true
});
}
return
gadget
.
redirect
({
page
:
"
editor
"
,
url
:
url
});
...
...
gadget/gadget_cribjs_router.js
View file @
a7d5e8b5
...
...
@@ -70,9 +70,15 @@
})
.
declareMethod
(
'
redirect
'
,
function
(
options
)
{
if
(
options
!==
undefined
&&
options
.
toExternal
)
{
window
.
location
.
replace
(
options
.
url
);
return
RSVP
.
timeout
(
REDIRECT_TIMEOUT
);
// timeout if not redirected
if
(
options
!==
undefined
)
{
if
(
options
.
toExternal
)
{
window
.
location
.
replace
(
options
.
url
);
return
RSVP
.
timeout
(
REDIRECT_TIMEOUT
);
// timeout if not redirected
}
if
(
options
.
newTab
)
{
window
.
open
(
options
.
url
,
'
_blank
'
);
return
;
}
}
else
{
return
this
.
getCommandUrlFor
(
options
)
...
...
Write
Preview
Markdown
is supported
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