Bug 1086729

Summary: builds page is unusable without allowing 3rd party javascript
Product: [Community] Copr Reporter: Petr Lautrbach <plautrba>
Component: frontendAssignee: Miroslav Suchý <msuchy>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: msuchy
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: copr-frontend-1.34-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-30 07:11:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1078371    
Bug Blocks:    

Description Petr Lautrbach 2014-04-11 11:48:45 UTC
Description of problem:
The page with builds like [1] is unusable without allowing 3rd party javascript and javascript is only used to show information like [2]. Either this  information can be simply showed directly on the page using html or all javascript should be hosted on copr itself.




[1] http://copr.fedoraproject.org/coprs/plautrba/openssh_vanilla/builds/

[2] Results:
http://copr-be.cloud.fedoraproject.org/results/plautrba/openssh_vanilla/
Package URLs:
http://plautrba.fedorapeople.org/openssh/openssh-6.6p1-1.fc21.src.rpm

Comment 1 Miroslav Suchý 2014-04-11 12:37:16 UTC
I do not plan getting rid of JavaScript. Maybe opposite - add more (welcome to 21th century :).
I will not refer to 3rd party file once bug 1078371 is resolved and jquery is packaged for Fedora.

Comment 2 Petr Lautrbach 2014-04-11 12:51:15 UTC
Why don't you just remove "display: none;" for the details class and hide it using javascript? All the data are already downloaded by browser anyway.

Comment 3 Miroslav Suchý 2014-04-11 13:04:24 UTC
Patches are welcome.

Comment 4 Petr Lautrbach 2014-04-11 15:07:32 UTC
I'm not really familiar with javascript but something like this could work:

copr.css:
table.builds-table tr.details {
  width: 100%;
}

copr.js:
//hide build details
$(document).ready(function () {
  $("table.builds-table tr.details").hide();
});

// showing build details
$(document).ready(function () {
  $("table.builds-table tr[class^='build-']").each(function (i, e) {
    $(this).click(function() { $("table.builds-table tr.details").hide(); $(this).next().show(); });
  });
});

Comment 5 Petr Lautrbach 2014-04-23 10:28:10 UTC
ping. Are there any objections to the proposed solution?

Comment 6 Miroslav Suchý 2014-04-23 13:10:13 UTC
It works. Thanks.

Commited as 00d5f77.

Comment 7 Miroslav Suchý 2014-04-30 07:11:13 UTC
Code deployed to copr.fedoraproject.org