From b64501991a2360d6e6862bbc82ae8dd689635845 Mon Sep 17 00:00:00 2001 From: farhaanbukhsh Date: Apr 28 2016 15:07:51 +0000 Subject: [PATCH 1/6] Fix spinner for ajax calls --- diff --git a/pagure/static/pagure.css b/pagure/static/pagure.css index e6b4cd3..5c38480 100644 --- a/pagure/static/pagure.css +++ b/pagure/static/pagure.css @@ -391,6 +391,12 @@ a.notblue { background-repeat: no-repeat; min-height: 150px; } +.content-loading { + background-image: url("images/spinner.gif"); + background-position: center center; + background-repeat: no-repeat; + min-height: 150px; +} .repoinfo-branchlistitem { diff --git a/pagure/templates/pull_request.html b/pagure/templates/pull_request.html index 4e268cc..90a96c5 100644 --- a/pagure/templates/pull_request.html +++ b/pagure/templates/pull_request.html @@ -435,7 +435,9 @@ {% endif %} - + + + {% if pull_request.status != 'Open'%}
Date: Apr 28 2016 15:07:51 +0000 Subject: [PATCH 2/6] Fix ajax call on fail --- diff --git a/pagure/templates/pull_request.html b/pagure/templates/pull_request.html index 90a96c5..73a0ee2 100644 --- a/pagure/templates/pull_request.html +++ b/pagure/templates/pull_request.html @@ -816,6 +816,7 @@ function setup_reply_btns() { } }, error: function(res) { + $('#merge-load').hide(); var _obj = $('#pr_flags').find('tbody'); if (res.responseJSON.message) { _obj.append( From f63ac803015686e8ce4414d35ba144912e7e6aec Mon Sep 17 00:00:00 2001 From: farhaanbukhsh Date: Apr 28 2016 15:07:52 +0000 Subject: [PATCH 3/6] Fix hidden div issue --- diff --git a/pagure/templates/pull_request.html b/pagure/templates/pull_request.html index 73a0ee2..8b36e8a 100644 --- a/pagure/templates/pull_request.html +++ b/pagure/templates/pull_request.html @@ -779,6 +779,7 @@ function setup_reply_btns() { {% if pull_request.status == 'Open' %} $(function(){ + $('#merge-alert').show(); $('#merge-load').show(); $.ajax({ url: '{{ url_for("internal_ns.mergeable_request_pull") }}' , @@ -790,6 +791,7 @@ function setup_reply_btns() { dataType: 'json', success: function(res) { $('#merge-load').hide(); + $('#merge-alert').hide(); if (res.code == 'FFORWARD'){ $('#merge_btn').addClass("btn-success"); $('#merge-alert').addClass("alert-success"); From 70eb7a6a72603cecea2d8763cf3c5228e2816ba7 Mon Sep 17 00:00:00 2001 From: farhaanbukhsh Date: Apr 28 2016 15:07:52 +0000 Subject: [PATCH 4/6] Fix the overlay merge button --- diff --git a/pagure/templates/pull_request.html b/pagure/templates/pull_request.html index 8b36e8a..9b5c8b6 100644 --- a/pagure/templates/pull_request.html +++ b/pagure/templates/pull_request.html @@ -425,6 +425,7 @@
{% if pull_request %}
+ {% if pull_request.status != 'Open'%} @@ -779,7 +779,6 @@ function setup_reply_btns() { {% if pull_request.status == 'Open' %} $(function(){ - $('#merge-alert').show(); $('#merge-load').show(); $.ajax({ url: '{{ url_for("internal_ns.mergeable_request_pull") }}' , @@ -791,7 +790,6 @@ function setup_reply_btns() { dataType: 'json', success: function(res) { $('#merge-load').hide(); - $('#merge-alert').hide(); if (res.code == 'FFORWARD'){ $('#merge_btn').addClass("btn-success"); $('#merge-alert').addClass("alert-success"); From 8dc5a02ca947572fc6b9042bc169022f301686fa Mon Sep 17 00:00:00 2001 From: farhaanbukhsh Date: Apr 28 2016 15:07:52 +0000 Subject: [PATCH 5/6] Fix id name and min-height --- diff --git a/pagure/static/pagure.css b/pagure/static/pagure.css index 5c38480..b0cc905 100644 --- a/pagure/static/pagure.css +++ b/pagure/static/pagure.css @@ -395,7 +395,7 @@ a.notblue { background-image: url("images/spinner.gif"); background-position: center center; background-repeat: no-repeat; - min-height: 150px; + min-height: 30px; } .repoinfo-branchlistitem diff --git a/pagure/templates/pull_request.html b/pagure/templates/pull_request.html index 9b5c8b6..fbb55cd 100644 --- a/pagure/templates/pull_request.html +++ b/pagure/templates/pull_request.html @@ -425,7 +425,7 @@
{% if pull_request %}
- + {% if pull_request.status != 'Open'%}
Date: Apr 28 2016 15:07:52 +0000 Subject: [PATCH 6/6] Fix indentation --- diff --git a/pagure/templates/pull_request.html b/pagure/templates/pull_request.html index fbb55cd..b9e42fd 100644 --- a/pagure/templates/pull_request.html +++ b/pagure/templates/pull_request.html @@ -436,7 +436,7 @@
{% endif %} - +
{% if pull_request.status != 'Open'%}