Bug 1086729 - builds page is unusable without allowing 3rd party javascript
Summary: builds page is unusable without allowing 3rd party javascript
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Copr
Classification: Community
Component: frontend
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact:
URL:
Whiteboard:
Depends On: js-jquery1
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-11 11:48 UTC by Petr Lautrbach
Modified: 2014-04-30 07:11 UTC (History)
1 user (show)

Fixed In Version: copr-frontend-1.34-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-04-30 07:11:13 UTC


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.