Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
acea881b
Commit
acea881b
authored
Apr 07, 2017
by
Jacob Schatz
Committed by
Luke "Jared" Bennett
Apr 10, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial balsamiq support
parent
c98add15
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
1 deletion
+16
-1
app/models/blob.rb
app/models/blob.rb
+6
-0
app/views/projects/blob/_bmpr.html.haml
app/views/projects/blob/_bmpr.html.haml
+5
-0
app/views/projects/blob/balsamiq_viewer.js
app/views/projects/blob/balsamiq_viewer.js
+3
-0
config/webpack.config.js
config/webpack.config.js
+1
-0
db/schema.rb
db/schema.rb
+1
-1
No files found.
app/models/blob.rb
View file @
acea881b
...
...
@@ -58,6 +58,10 @@ class Blob < SimpleDelegator
binary?
&&
extname
.
downcase
.
delete
(
'.'
)
==
'sketch'
end
def
balsamiq?
binary?
&&
extname
.
downcase
.
delete
(
'.'
)
==
'bmpr'
end
def
stl?
extname
.
downcase
.
delete
(
'.'
)
==
'stl'
end
...
...
@@ -87,6 +91,8 @@ class Blob < SimpleDelegator
'sketch'
elsif
stl?
'stl'
elsif
balsamiq?
'bmpr'
elsif
text?
'text'
else
...
...
app/views/projects/blob/_bmpr.html.haml
0 → 100644
View file @
acea881b
-
content_for
:page_specific_javascripts
do
=
page_specific_javascript_bundle_tag
(
'common_vue'
)
=
page_specific_javascript_bundle_tag
(
'balsamiq_viewer'
)
.file-content
#js-balsamiq-viewer
{
data:
{
endpoint:
namespace_project_raw_path
(
@project
.
namespace
,
@project
,
@id
)
}
}
\ No newline at end of file
app/views/projects/blob/balsamiq_viewer.js
0 → 100644
View file @
acea881b
import
renderBalsamiq
from
'
./balsamiq
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
renderBalsamiq
);
\ No newline at end of file
config/webpack.config.js
View file @
acea881b
...
...
@@ -39,6 +39,7 @@ var config = {
notebook_viewer
:
'
./blob/notebook_viewer.js
'
,
sketch_viewer
:
'
./blob/sketch_viewer.js
'
,
pdf_viewer
:
'
./blob/pdf_viewer.js
'
,
balsamiq_viewer
:
'
./blob/balsamiq_viewer.js
'
,
profile
:
'
./profile/profile_bundle.js
'
,
protected_branches
:
'
./protected_branches/protected_branches_bundle.js
'
,
protected_tags
:
'
./protected_tags
'
,
...
...
db/schema.rb
View file @
acea881b
...
...
@@ -950,9 +950,9 @@ ActiveRecord::Schema.define(version: 20170408033905) do
t
.
boolean
"lfs_enabled"
t
.
text
"description_html"
t
.
boolean
"only_allow_merge_if_all_discussions_are_resolved"
t
.
integer
"auto_cancel_pending_pipelines"
,
default:
0
,
null:
false
t
.
boolean
"printing_merge_request_link_enabled"
,
default:
true
,
null:
false
t
.
string
"import_jid"
t
.
integer
"auto_cancel_pending_pipelines"
,
default:
0
,
null:
false
end
add_index
"projects"
,
[
"ci_id"
],
name:
"index_projects_on_ci_id"
,
using: :btree
...
...
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