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
Jérome Perrin
gitlab-ce
Commits
75663d10
Commit
75663d10
authored
Jan 26, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove hard-coded assets path for ace editor modules
parent
763d7ad2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
1 deletion
+27
-1
app/assets/javascripts/lib/ace.js
app/assets/javascripts/lib/ace.js
+2
-1
app/assets/javascripts/lib/ace/ace_config_paths.js.erb
app/assets/javascripts/lib/ace/ace_config_paths.js.erb
+25
-0
No files found.
app/assets/javascripts/lib/ace.js
View file @
75663d10
/*= require ace
-rails-ap
*/
/*= require ace
/ace
*/
/*= require ace/ext-searchbox */
/*= require ace/ext-searchbox */
/*= require ./ace/ace_config_paths */
app/assets/javascripts/lib/ace/ace_config_paths.js.erb
0 → 100644
View file @
75663d10
<%
ace_gem_path
=
Bundler
.
rubygems
.
find_name
(
'ace-rails-ap'
).
first
.
full_gem_path
ace_workers
=
Dir
[
ace_gem_path
+
'/vendor/assets/javascripts/ace/worker-*.js'
].
sort
.
map
do
|
file
|
File
.
basename
(
file
,
'.js'
).
sub
(
/^worker-/
,
''
)
end
ace_modes
=
Dir
[
ace_gem_path
+
'/vendor/assets/javascripts/ace/mode-*.js'
].
sort
.
map
do
|
file
|
File
.
basename
(
file
,
'.js'
).
sub
(
/^mode-/
,
''
)
end
%>
(function() {
window.gon = window.gon || {};
var basePath = (window.gon.relative_url_root || '').replace(/\/$/, '') + '/assets/ace';
ace.config.set('basePath', basePath);
// configure paths for all worker modules
<%
ace_workers
.
each
do
|
worker
|
%>
ace.config.setModuleUrl('ace/mode/
<%=
worker
%>
_worker', basePath + '/worker-
<%=
worker
%>
.js');
<%
end
%>
// configure paths for all mode modules
<%
ace_modes
.
each
do
|
mode
|
%>
ace.config.setModuleUrl('ace/mode/
<%=
mode
%>
', basePath + '/mode-
<%=
mode
%>
.js');
<%
end
%>
})();
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