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 10:33:39 UTC

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

Author: sebb
Date: Sun Mar 19 10:33:39 2023
New Revision: 1908511

URL: http://svn.apache.org/viewvc?rev=1908511&view=rev
Log:
Don't change input

Modified:
    comdev/helpwanted.apache.org/site/js/coffee/hw.coffee
    comdev/helpwanted.apache.org/site/js/hw.js
    comdev/helpwanted.apache.org/site/widget.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=1908511&r1=1908510&r2=1908511&view=diff
==============================================================================
--- comdev/helpwanted.apache.org/site/js/coffee/hw.coffee (original)
+++ comdev/helpwanted.apache.org/site/js/coffee/hw.coffee Sun Mar 19 10:33:39 2023
@@ -449,7 +449,7 @@ renderItem = (json, state) ->
     if (overrides[json.project])
         json.project = overrides[json.project]
     
-    json.description = json.description.replace(/\n/g, "<br/>").replace(hw_weburl, (a) => ("<a href='"+a+"'>"+a+"</a>"))
+    description = json.description.replace(/\n/g, "<br/>").replace(hw_weburl, (a) => ("<a href='"+a+"'>"+a+"</a>"))
     obj.innerHTML = "<h2>Task #" + state.substring(0,8) + ": " + json.title + "</h2>"
     mlink = "mailto:dev@" + json.project + ".apache.org?subject=" + escape("Help with task: " + json.title) + "&body=" + escape("I would like to help out with the task listed at /task.html?" + rid + "\n\n")
     rgba = "rgba(" + p.r + "," + p.g + "," + p.b + ", 1)"
@@ -461,7 +461,7 @@ renderItem = (json, state) ->
         (if json.url and json.url.length > 10 then ("<b>Additional information:</b> <a href='" + json.url + "'>" + json.url + "</a><br/>") else "")+
         (if json.estimate and json.estimate.length > 0 then ("<b>Estimated time to complete:</b> " + json.estimate) else "") +
         (if json.timeout and json.timeout > 0 then ("<b>Task expires:</b> " + new Date(json.timeout*1000).toDateString()) else "") +
-        "<blockquote style='text-align: left;'><q>" + json.description + "</q></blockquote>" +
+        "<blockquote style='text-align: left;'><q>" + description + "</q></blockquote>" +
         "<br/></p>" +
         "<h3 style='text-align: left;'>How to help:</h3><p style='text-align: left;'>" +
         (if json.curl and json.curl.length > 10 then ("<b>Contributor's guide for this project: </b><a href='" + json.curl + "'>" + json.curl + "</a><br/>") else "") +

Modified: comdev/helpwanted.apache.org/site/js/hw.js
URL: http://svn.apache.org/viewvc/comdev/helpwanted.apache.org/site/js/hw.js?rev=1908511&r1=1908510&r2=1908511&view=diff
==============================================================================
--- comdev/helpwanted.apache.org/site/js/hw.js (original)
+++ comdev/helpwanted.apache.org/site/js/hw.js Sun Mar 19 10:33:39 2023
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 2.7.0
+// Generated by CoffeeScript 2.6.1
 
 /*
  Licensed to the Apache Software Foundation (ASF) under one or more
@@ -669,7 +669,7 @@ fetchItemsAdmin = function() {
 };
 
 renderItem = function(json, state) {
-  var cdate, mlink, obj, overrides, p, rgba, rid;
+  var cdate, description, mlink, obj, overrides, p, rgba, rid;
   p = pastels[parseInt(Math.random() * pastels.length)];
   obj = get('item');
   cdate = new Date(json.created * 1000).toDateString();
@@ -681,13 +681,13 @@ renderItem = function(json, state) {
   if (overrides[json.project]) {
     json.project = overrides[json.project];
   }
-  json.description = json.description.replace(/\n/g, "<br/>").replace(hw_weburl, (a) => {
+  description = json.description.replace(/\n/g, "<br/>").replace(hw_weburl, (a) => {
     return "<a href='" + a + "'>" + a + "</a>";
   });
   obj.innerHTML = "<h2>Task #" + state.substring(0, 8) + ": " + json.title + "</h2>";
   mlink = "mailto:dev@" + json.project + ".apache.org?subject=" + escape("Help with task: " + json.title) + "&body=" + escape("I would like to help out with the task listed at /task.html?" + rid + "\n\n");
   rgba = "rgba(" + p.r + "," + p.g + "," + p.b + ", 1)";
-  obj.innerHTML += "<div id='pickerparent' style='background: " + rgba + "; padding:12px;'><p style='text-align: left;'><b>Project: </b> " + json.project + "<br/>" + "<b>Created by:</b> " + json.author + "@apache.org<br/>" + "<b>Task added: </b>" + cdate + "<br/>" + "<b>Difficulty: </b> <img style='width: 16px; height: 16px; vertical-align: middle;' src='/images/level_" + (parseInt(json.difficulty) + 1) + ".png'/> " + diff[json.difficulty] + " - " + diff_explanation[parseInt(json.difficulty)] + "<br/>" + "<b>Task type:</b> " + types[json.type] + "<br/>" + (json.url && json.url.length > 10 ? "<b>Additional information:</b> <a href='" + json.url + "'>" + json.url + "</a><br/>" : "") + (json.estimate && json.estimate.length > 0 ? "<b>Estimated time to complete:</b> " + json.estimate : "") + (json.timeout && json.timeout > 0 ? "<b>Task expires:</b> " + new Date(json.timeout * 1000).toDateString() : "") + "<blockquote style='text-align: left;'><q>" + json.description + "</q></blockquote>
 " + "<br/></p>" + "<h3 style='text-align: left;'>How to help:</h3><p style='text-align: left;'>" + (json.curl && json.curl.length > 10 ? "<b>Contributor's guide for this project: </b><a href='" + json.curl + "'>" + json.curl + "</a><br/>" : "") + "If you want to help with this task, please get in touch with the project at: <a href=\"" + mlink + "\">dev@" + json.project + ".apache.org</a>!" + "<br/>You should also check out the additional information URL (if such is provided above) for more information.";
+  obj.innerHTML += "<div id='pickerparent' style='background: " + rgba + "; padding:12px;'><p style='text-align: left;'><b>Project: </b> " + json.project + "<br/>" + "<b>Created by:</b> " + json.author + "@apache.org<br/>" + "<b>Task added: </b>" + cdate + "<br/>" + "<b>Difficulty: </b> <img style='width: 16px; height: 16px; vertical-align: middle;' src='/images/level_" + (parseInt(json.difficulty) + 1) + ".png'/> " + diff[json.difficulty] + " - " + diff_explanation[parseInt(json.difficulty)] + "<br/>" + "<b>Task type:</b> " + types[json.type] + "<br/>" + (json.url && json.url.length > 10 ? "<b>Additional information:</b> <a href='" + json.url + "'>" + json.url + "</a><br/>" : "") + (json.estimate && json.estimate.length > 0 ? "<b>Estimated time to complete:</b> " + json.estimate : "") + (json.timeout && json.timeout > 0 ? "<b>Task expires:</b> " + new Date(json.timeout * 1000).toDateString() : "") + "<blockquote style='text-align: left;'><q>" + description + "</q></blockquote>" + "
 <br/></p>" + "<h3 style='text-align: left;'>How to help:</h3><p style='text-align: left;'>" + (json.curl && json.curl.length > 10 ? "<b>Contributor's guide for this project: </b><a href='" + json.curl + "'>" + json.curl + "</a><br/>" : "") + "If you want to help with this task, please get in touch with the project at: <a href=\"" + mlink + "\">dev@" + json.project + ".apache.org</a>!" + "<br/>You should also check out the additional information URL (if such is provided above) for more information.";
   return "<br/>&nbsp;<br/>&nbsp;<br/></p></div>";
 };
 

Modified: comdev/helpwanted.apache.org/site/widget.js
URL: http://svn.apache.org/viewvc/comdev/helpwanted.apache.org/site/widget.js?rev=1908511&r1=1908510&r2=1908511&view=diff
==============================================================================
--- comdev/helpwanted.apache.org/site/widget.js (original)
+++ comdev/helpwanted.apache.org/site/widget.js Sun Mar 19 10:33:39 2023
@@ -179,7 +179,7 @@ function displayItemsWidget(json, state,
         if (state.admin) {
             add = " &nbsp; <a href='/admin/close.lua?id=" + item.request_id + "'>Mark as done</a>"
         }
-        item.description = item.description.replace(/\n/g, "<br/>").replace(hw_weburl, function(a) { return "<a href='"+a+"'>"+a+"</a>"})
+        let description = item.description.replace(/\n/g, "<br/>").replace(hw_weburl, function(a) { return "<a href='"+a+"'>"+a+"</a>"})
         tbl += "<tr style='cursor: pointer; ' onclick=\"sw('hw_details_" + rid + "');\"><td style='text-align: left;'><div class='itemNumber-widget'>" + z + "</div><img title='" + types_long[item.type] + "' style='width:16px; height: 16px;' float: left;' src='https://helpwanted.apache.org/images/icon_" + ptype + ".png'/>" +
         item.title + "</td>" +
         "<td>" + lingos + "</td><td style='text-align: left;' title='" + diff_explanation[parseInt(item.difficulty)] + "'><img style='width:16px; height: 16px;' src='https://helpwanted.apache.org/images/level_" + (parseInt(item.difficulty)+1) + ".png'/> " + diff[item.difficulty] + add + "</td><td>" + cdate + "</td></tr>"
@@ -188,7 +188,7 @@ function displayItemsWidget(json, state,
             fi = "<b>Further information: </b> <a href='" + item.url + "'>" + item.url + "</a><br/>"
         }
         
-        tbl += "<tr style='display:none;' id='hw_details_" + rid + "'><td colspan='6'><b>Project:</b> " + item.project + "<br/><b>Requested by:</b> " + item.author + "@apache.org<br/><b>Type: </b> " + types_long[item.type] + "<br/><b>Created:</b> " + cdate + "<br/><b>Description:</b> <blockquote>" + item.description + "</blockquote>" + fi + "<input type='button' class='dibbutton' onclick='location.href=\"https://helpwanted.apache.org/task.html?" + item.request_id + "\";' value='I am interested in this'/></td></tr>"
+        tbl += "<tr style='display:none;' id='hw_details_" + rid + "'><td colspan='6'><b>Project:</b> " + item.project + "<br/><b>Requested by:</b> " + item.author + "@apache.org<br/><b>Type: </b> " + types_long[item.type] + "<br/><b>Created:</b> " + cdate + "<br/><b>Description:</b> <blockquote>" + description + "</blockquote>" + fi + "<input type='button' class='dibbutton' onclick='location.href=\"https://helpwanted.apache.org/task.html?" + item.request_id + "\";' value='I am interested in this'/></td></tr>"
         
     }
     tbl += "<tr><td colspan='4' style='text-align: center;'>Powered by <a href='https://helpwanted.apache.org/'>Help Wanted</a> - a task directory for Apache projects</td></tr></table>"