Fix pager loading on every page in application

This commit is contained in:
Dmitriy Zaporozhets 2013-01-10 17:38:37 +02:00
parent abc2bdc3aa
commit dd20da1bff
4 changed files with 4 additions and 24 deletions

View file

@ -1,7 +1,4 @@
$ -> window.dashboardPage = ->
dashboardPage()
dashboardPage = ->
Pager.init 20, true Pager.init 20, true
$(".event_filter_link").bind "click", (event) -> $(".event_filter_link").bind "click", (event) ->
event.preventDefault() event.preventDefault()

View file

@ -7,3 +7,6 @@
- else - else
= render "zero_authorized_projects" = render "zero_authorized_projects"
:javascript
dashboardPage();

View file

@ -1,9 +0,0 @@
- if @key.valid?
:plain
$("#new_key_dialog").dialog("close");
$("#keys-table .data").append("#{escape_javascript(render(partial: 'show', locals: {key: @key}))}");
$("#no_ssh_key_defined").hide();
- else
:plain
$("#new_key_dialog").empty();
$("#new_key_dialog").append("#{escape_javascript(render('form'))}");

View file

@ -1,11 +0,0 @@
:plain
var new_key_dialog = $("<div id='new_key_dialog'></div>");
new_key_dialog.html("#{escape_javascript(render('form'))}");
$(new_key_dialog).dialog({
width: 350,
resizable: false,
draggable: false,
title: "Add new public key",
close: function(event, ui) { $("#new_key_dialog").remove();},
modal: true
});