Skip to content
Snippets Groups Projects
Commit f79b2100 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Fix wiki popup for new page

parent 4e6f131c
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -39,7 +39,9 @@ class Dispatcher
 
switch path.first()
when 'admin' then new Admin()
when 'wikis' then new Wikis()
when 'projects'
new Wikis() if path[1] == 'wikis'
 
initSearch: ->
autocomplete_json = $('.search-autocomplete-json').data('autocomplete-opts')
Loading
Loading
class Wikis
constructor: ->
modal = $('#modal-new-wiki').modal({modal: true, show:false})
$('.add-new-wiki').bind "click", ->
modal.show()
$('.build-new-wiki').bind "click", ->
field = $('#new_wiki_path')
slug = field.val()
Loading
Loading
@@ -13,7 +8,5 @@ class Wikis
if(slug.length > 0)
location.href = path + "/" + slug
 
$('.modal-header .close').bind "click", ->
modal.hide()
 
@Wikis = Wikis
Loading
Loading
@@ -12,7 +12,7 @@
 
- if can?(current_user, :write_wiki, @project)
.pull-right
= link_to '#', class: "add-new-wiki btn btn-new" do
= link_to '#modal-new-wiki', class: "add-new-wiki btn btn-new", "data-toggle" => "modal" do
%i.icon-plus
New Page
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment