OSDN Git Service

request issue before request quick_view for other plugins
authorakrstjp <akrst@users.osdn.me>
Sun, 20 Dec 2015 11:44:24 +0000 (20:44 +0900)
committerakrstjp <akrst@users.osdn.me>
Sun, 20 Dec 2015 11:44:24 +0000 (20:44 +0900)
app/views/hooks/_quick_view_base_bottom.html.erb

index 15c7bfd..22b5809 100644 (file)
@@ -155,9 +155,12 @@ function quick_view_show_dialog() {
        already_exists.dialog("moveToTop");
        continue;
      }
-
-     var url = '<%= quick_view_issue_path(0) %>'.replace(/0$/,issue_id);
-     $.ajax( { url: url, dataType: 'html', success: quick_view_dialog_open });
+     <%# Issueの中で特殊な処理を行うその他のプラグインのために、先行で通常のIssueにアクセスする %>
+     var url = '<%= issue_path(0) %>'.replace(/0$/,issue_id);
+     $.ajax( { url: url, dataType: 'html' }).done( function () {
+       var url = '<%= quick_view_issue_path(0) %>'.replace(/0$/,issue_id);
+       $.ajax( { url: url, dataType: 'html', success: quick_view_dialog_open });
+     });
   }
 }