You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by hu...@apache.org on 2016/02/08 12:22:09 UTC

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

Author: humbedooh
Date: Mon Feb  8 11:22:08 2016
New Revision: 1729138

URL: http://svn.apache.org/viewvc?rev=1729138&view=rev
Log:
multi-replace

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

Modified: comdev/helpwanted.apache.org/site/js/hw.js
URL: http://svn.apache.org/viewvc/comdev/helpwanted.apache.org/site/js/hw.js?rev=1729138&r1=1729137&r2=1729138&view=diff
==============================================================================
--- comdev/helpwanted.apache.org/site/js/hw.js (original)
+++ comdev/helpwanted.apache.org/site/js/hw.js Mon Feb  8 11:22:08 2016
@@ -382,7 +382,7 @@ function renderItem(json, state) {
     var obj = document.getElementById('item')
     var cdate = new Date(json.created*1000).toDateString()
     var rid = json.request_id.substring(0,8)
-    json.description = json.description.replace("\n", "<br/>").replace(hw_weburl, function(a) { return "<a href='"+a+"'>"+a+"</a>"})
+    json.description = json.description.replace(/\n/g, "<br/>").replace(hw_weburl, function(a) { return "<a href='"+a+"'>"+a+"</a>"})
     obj.innerHTML = "<h2>Task #" + state + ":<br/><span style='color: #369;'>" + json.title + "</span></h2>"
     var 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 https://helpwanted.apache.org/task.html?" + rid + "\n\n")
     obj.innerHTML += "<p style='text-align: left;'><b>Project: </b> " + json.project + "<br/>" +

Modified: comdev/helpwanted.apache.org/site/widget.js
URL: http://svn.apache.org/viewvc/comdev/helpwanted.apache.org/site/widget.js?rev=1729138&r1=1729137&r2=1729138&view=diff
==============================================================================
--- comdev/helpwanted.apache.org/site/widget.js (original)
+++ comdev/helpwanted.apache.org/site/widget.js Mon Feb  8 11:22:08 2016
@@ -161,7 +161,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", "<br/>").replace(hw_weburl, function(a) { return "<a href='"+a+"'>"+a+"</a>"})
+        item.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_" + i + "');\"><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>"