Commit f79b2100 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Fix wiki popup for new page

parent 43fa1c0dc07a
......@@ -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')
......
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()
......@@ -13,7 +8,5 @@ class Wikis
if(slug.length > 0)
location.href = path + "/" + slug
$('.modal-header .close').bind "click", ->
modal.hide()
@Wikis = Wikis
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment