Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
debomatic-webui
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
debomatic-webui-admins
debomatic-webui
Commits
8876785a
Commit
8876785a
authored
Jun 21, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'github/master' into portable
parents
eee44aee
83690692
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
debomatic-webui/public/javascripts/page_distribution.js
debomatic-webui/public/javascripts/page_distribution.js
+3
-1
debomatic-webui/public/javascripts/utils.js
debomatic-webui/public/javascripts/utils.js
+14
-0
No files found.
debomatic-webui/public/javascripts/page_distribution.js
View file @
8876785a
...
...
@@ -355,9 +355,10 @@ function Page_Distrubion(socket) {
var
file
=
{
set
:
function
(
socket_data
)
{
var
new_content
=
Utils
.
escape_html
(
socket_data
.
file
.
content
);
var
file_content
=
$
(
'
#file pre
'
);
view
.
file
=
Utils
.
clone
(
socket_data
.
file
);
file_content
.
text
(
socket_data
.
file
.
content
);
file_content
.
html
(
new_
content
);
file_content
.
show
();
if
(
current_file_in_preview
)
file_content
.
scrollTop
(
file_content
[
0
].
scrollHeight
);
...
...
@@ -368,6 +369,7 @@ function Page_Distrubion(socket) {
},
append
:
function
(
new_content
)
{
var
file_content
=
$
(
'
#file pre
'
);
new_content
=
Utils
.
escape_html
(
new_content
);
if
(
!
current_file_in_preview
)
{
file_content
.
append
(
new_content
);
if
(
config
.
preferences
.
autoscroll
)
{
...
...
debomatic-webui/public/javascripts/utils.js
View file @
8876785a
...
...
@@ -91,5 +91,19 @@ var Utils = {
// clone an object via JSON
clone
:
function
(
object
)
{
return
JSON
.
parse
(
JSON
.
stringify
(
object
));
},
// escape html entities
escape_html
:
function
(
string
)
{
return
String
(
string
).
replace
(
/
[
&<>"'
\/]
/g
,
function
(
s
)
{
return
{
"
&
"
:
"
&
"
,
"
<
"
:
"
<
"
,
"
>
"
:
"
>
"
,
"
\"
"
:
"
"
"
,
"
'
"
:
"
'
"
,
"
/
"
:
"
/
"
}[
s
];
});
}
};
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