[Koha-bugs] [Bug 23837] detail.pl contains a lot of whitespace in the td.status cell
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23837 --- Comment #7 from Christopher Brannon --- (In reply to Owen Leonard from comment #6) > Does this come down to lacking specific classes in the markup to target with > jQuery? I think developers have made huge strides in adding the classes that are currently there. If you saw the attachment above, you can see what we have done to dress up the statuses and make them stand out better for different statuses. Here is the code I use to achieve this: //Item Status Enhancement on detail.pl (v22.05) if ($('#catalog_detail').length) { $('td.status').wrapInner(''); //Fix missing status classes (v22.05); $('.status span:contains("Available")').addClass('available'); //END Fix missing status classes $('#holdings_table span.available').addClass('label label-success').unwrap().wrap(''); $('.status span.holdonitem').wrapInner(''); $('.status li.holdonitem').unwrap().prepend(''); $('.status span.intransit').wrapInner(''); $('.status li.intransit').unwrap().prepend(''); $('.status span.waitingat').wrapInner(''); $('.status li.waitingat').unwrap().prepend(''); $('.status span.heldfor').wrapInner(''); $('.status li.heldfor').unwrap().prepend(''); $('.status li.heldfor').wrap(''); $('.status li.heldfor').each(function() { $(this).parent('ul').next('a').appendTo(this); }); var status_triangle = ['lost','dmg','notforloan','wdn']; status_triangle.forEach(function(item) { $('.status span.' + item).wrapInner(''); $('.status li.' + item).unwrap().prepend(''); }); $('.status span.datedue').wrapInner(''); $('.status li.datedue').unwrap().prepend(''); $('.status li.datedue').each(function() { var UnwrappedText = $(this).contents().filter(function() { return this.nodeType == 3 && this.nodeValue.trim(); }).wrap('').end(); $('span.datedue_text').each(function() { var cleantext = $(this).html().replace(/(?:(?:\r\n|\r|\n)\s*)/gm, " "); $(this).html(cleantext); if (cleantext.includes(': due')) { $(this).addClass('patrondue'); } }); }); $('.status span.patrondue').wrapInner(''); $('.status li.patrondue').unwrap().wrap(''); $('.status li.patrondue').each(function() { $(this).text($(this).text().replace(/.: due/g, "Due")); $(this).prepend(''); }); $('#catalog_detail .shelvingloc:contains("Recently Returned")').each(function() { $(this).html($(this).html().replace(/\(Recently Returned\)/g, 'Recently Returned')); }); } //END Item Status Enhancement on detail.pl I think the issue is that there are a lot of elements within the status that are challenging to isolate. The whitespace is one hurdle, but isolating specific sections of the status remains a challenge. I think classes to each part would be helpful, but I don't know if I am asking too much. I do there is enough data being pumped into the single status cell that it would warrant some granular classes. Again, it just might be me. I think the end result of what I do works and looks great, but not everyone cares. I guess it is up to any developer that thinks it is worth adding classes to each section or not. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 23837] detail.pl contains a lot of whitespace in the td.status cell
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23837 --- Comment #6 from Owen Leonard --- Does this come down to lacking specific classes in the markup to target with jQuery? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 23837] detail.pl contains a lot of whitespace in the td.status cell
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23837 --- Comment #5 from Christopher Brannon --- Created attachment 159776 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159776=edit Modifying statuses exmple Katrin, in response to your question (which I never saw, sorry), we modify the look of the statuses so they stand out better. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 23837] detail.pl contains a lot of whitespace in the td.status cell
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23837 Katrin Fischer changed: What|Removed |Added CC||oleon...@myacpl.org --- Comment #4 from Katrin Fischer --- I am pondering if this is a WONTFIX because I don't think we can easily fix it. Adding Owen. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 23837] detail.pl contains a lot of whitespace in the td.status cell
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23837 --- Comment #3 from Katrin Fischer --- (In reply to Christopher Brannon from comment #2) > (In reply to Katrin Fischer from comment #1) > > That will not be the only place where you will see something like this. When > > writing TT syntax, it leaves 'whitespace' in the code, unless you do > > something like [%- ... -%]. > > > > See: > > http://www.template-toolkit.org/docs/manual/Syntax. > > html#section_Chomping_Whitespace > > > > It will not hurt the output either way. HTML doesn't care about extra > > spaces. > > It doesn't hurt the output, until you try to manipulate it with jQuery. > Then it becomes a nightmare. Let's check that then - what are you trying to do with jQuery? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 23837] detail.pl contains a lot of whitespace in the td.status cell
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23837 --- Comment #2 from Christopher Brannon --- (In reply to Katrin Fischer from comment #1) > That will not be the only place where you will see something like this. When > writing TT syntax, it leaves 'whitespace' in the code, unless you do > something like [%- ... -%]. > > See: > http://www.template-toolkit.org/docs/manual/Syntax. > html#section_Chomping_Whitespace > > It will not hurt the output either way. HTML doesn't care about extra spaces. It doesn't hurt the output, until you try to manipulate it with jQuery. Then it becomes a nightmare. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 23837] detail.pl contains a lot of whitespace in the td.status cell
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23837 Katrin Fischer changed: What|Removed |Added Version|18.11 |master CC||katrin.fisc...@bsz-bw.de --- Comment #1 from Katrin Fischer --- That will not be the only place where you will see something like this. When writing TT syntax, it leaves 'whitespace' in the code, unless you do something like [%- ... -%]. See: http://www.template-toolkit.org/docs/manual/Syntax.html#section_Chomping_Whitespace It will not hurt the output either way. HTML doesn't care about extra spaces. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/