You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by se...@apache.org on 2023/03/19 08:58:08 UTC

svn commit: r1908510 - in /comdev/helpwanted.apache.org/site/js: coffee/hw.coffee hw.js

Author: sebb
Date: Sun Mar 19 08:58:08 2023
New Revision: 1908510

URL: http://svn.apache.org/viewvc?rev=1908510&view=rev
Log:
Don't mangle item

Modified:
    comdev/helpwanted.apache.org/site/js/coffee/hw.coffee
    comdev/helpwanted.apache.org/site/js/hw.js

Modified: comdev/helpwanted.apache.org/site/js/coffee/hw.coffee
URL: http://svn.apache.org/viewvc/comdev/helpwanted.apache.org/site/js/coffee/hw.coffee?rev=1908510&r1=1908509&r2=1908510&view=diff
==============================================================================
--- comdev/helpwanted.apache.org/site/js/coffee/hw.coffee (original)
+++ comdev/helpwanted.apache.org/site/js/coffee/hw.coffee Sun Mar 19 08:58:08 2023
@@ -402,13 +402,13 @@ displayItems = (json, state) ->
         if state and state.admin
             add = " <td><a href='/admin/close.lua?id=" + item.request_id + "'>Mark as done</a></td>"
         
-        item.description = item.description.replace(/\n/g, "<br/>").replace(hw_weburl, (a) => ("<a href='"+a+"'>"+a+"</a>"))
+        description = item.description.replace(/\n/g, "<br/>").replace(hw_weburl, (a) => ("<a href='"+a+"'>"+a+"</a>"))
         tbl += "<tr style='cursor: pointer;' onclick=\"sw('details_" + i + "');\"><td width='68'><div class='itemNumber-yellow'>" + z + "</div><img title='" + item.type + "' style='float: left; width: 24px; height: 24px;' src='/images/icon_" + ptype + ".png'/></td>" +
         "<td>" + item.project + "</td>"+
         "<td style='text-align: left;'>" + item.title + "</td>" +
         "<td>" + lingos + "</td><td title='" + diff_explanation[parseInt(item.difficulty)] + "' style='text-align: left;'><img style='width: 20px; height: 20px; vertical-align: middle;' src='/images/level_" + (parseInt(item.difficulty)+1) + ".png'/> " + diff[item.difficulty] + "</td><td>" + cdate + "</td>" + add + "</tr>"
         
-        tbl += "<tr style='display:none;' id='details_" + i + "'><td colspan='6'><b>Project:</b> " + item.project + "<br/><b>Requested by:</b> " + item.author + "@apache.org<br/><b>Created:</b> " + cdate + "<br/><b>Description:</b> <blockquote>" + item.description + "</blockquote><b>Further information: </b> <a href='" + item.url + "'>" + item.url + "</a><br/><input type='button' onclick='location.href=\"/task.html?" + item.request_id + "\";' value='I am interested in this'/></td></tr>"
+        tbl += "<tr style='display:none;' id='details_" + i + "'><td colspan='6'><b>Project:</b> " + item.project + "<br/><b>Requested by:</b> " + item.author + "@apache.org<br/><b>Created:</b> " + cdate + "<br/><b>Description:</b> <blockquote>" + description + "</blockquote><b>Further information: </b> <a href='" + item.url + "'>" + item.url + "</a><br/><input type='button' onclick='location.href=\"/task.html?" + item.request_id + "\";' value='I am interested in this'/></td></tr>"
      
     tbl += "</table>"
     obj.innerHTML += tbl

Modified: comdev/helpwanted.apache.org/site/js/hw.js
URL: http://svn.apache.org/viewvc/comdev/helpwanted.apache.org/site/js/hw.js?rev=1908510&r1=1908509&r2=1908510&view=diff
==============================================================================
--- comdev/helpwanted.apache.org/site/js/hw.js (original)
+++ comdev/helpwanted.apache.org/site/js/hw.js Sun Mar 19 08:58:08 2023
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 2.6.1
+// Generated by CoffeeScript 2.7.0
 
 /*
  Licensed to the Apache Software Foundation (ASF) under one or more
@@ -534,7 +534,7 @@ populateAdminForm = function() {
 };
 
 displayItems = function(json, state) {
-  var add, admintab, cdate, colors, div, hw_oldstate, i, item, j, len, len1, lingos, m, numItems, obj, ptype, tbl, z;
+  var add, admintab, cdate, colors, description, div, hw_oldstate, i, item, j, len, len1, lingos, m, numItems, obj, ptype, tbl, z;
   json = json ? json.tasks : cjson;
   cjson = json;
   numItems = 0;
@@ -630,11 +630,11 @@ displayItems = function(json, state) {
     if (state && state.admin) {
       add = " <td><a href='/admin/close.lua?id=" + item.request_id + "'>Mark as done</a></td>";
     }
-    item.description = item.description.replace(/\n/g, "<br/>").replace(hw_weburl, (a) => {
+    description = item.description.replace(/\n/g, "<br/>").replace(hw_weburl, (a) => {
       return "<a href='" + a + "'>" + a + "</a>";
     });
     tbl += "<tr style='cursor: pointer;' onclick=\"sw('details_" + i + "');\"><td width='68'><div class='itemNumber-yellow'>" + z + "</div><img title='" + item.type + "' style='float: left; width: 24px; height: 24px;' src='/images/icon_" + ptype + ".png'/></td>" + "<td>" + item.project + "</td>" + "<td style='text-align: left;'>" + item.title + "</td>" + "<td>" + lingos + "</td><td title='" + diff_explanation[parseInt(item.difficulty)] + "' style='text-align: left;'><img style='width: 20px; height: 20px; vertical-align: middle;' src='/images/level_" + (parseInt(item.difficulty) + 1) + ".png'/> " + diff[item.difficulty] + "</td><td>" + cdate + "</td>" + add + "</tr>";
-    tbl += "<tr style='display:none;' id='details_" + i + "'><td colspan='6'><b>Project:</b> " + item.project + "<br/><b>Requested by:</b> " + item.author + "@apache.org<br/><b>Created:</b> " + cdate + "<br/><b>Description:</b> <blockquote>" + item.description + "</blockquote><b>Further information: </b> <a href='" + item.url + "'>" + item.url + "</a><br/><input type='button' onclick='location.href=\"/task.html?" + item.request_id + "\";' value='I am interested in this'/></td></tr>";
+    tbl += "<tr style='display:none;' id='details_" + i + "'><td colspan='6'><b>Project:</b> " + item.project + "<br/><b>Requested by:</b> " + item.author + "@apache.org<br/><b>Created:</b> " + cdate + "<br/><b>Description:</b> <blockquote>" + description + "</blockquote><b>Further information: </b> <a href='" + item.url + "'>" + item.url + "</a><br/><input type='button' onclick='location.href=\"/task.html?" + item.request_id + "\";' value='I am interested in this'/></td></tr>";
   }
   tbl += "</table>";
   obj.innerHTML += tbl;