From 553a8dd585079475113269f36e602be71ba135c6 Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 17 May 2013 17:15:50 -0700 Subject: [PATCH] fixed bootstrap button alignment issue when duplicating poll entries. --- e107_web/js/core/all.jquery.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/e107_web/js/core/all.jquery.js b/e107_web/js/core/all.jquery.js index 0a6ddb5d8..4a3e5812b 100644 --- a/e107_web/js/core/all.jquery.js +++ b/e107_web/js/core/all.jquery.js @@ -984,15 +984,17 @@ function mozSwap(txtarea, newtext){ var e107_dupCounter = 1; function duplicateHTML(copy,paste,baseid){ + if(document.getElementById(copy)){ e107_dupCounter++; var type = document.getElementById(copy).nodeName; // get the tag name of the source copy. - var but = document.createElement('input'); + var but = document.createElement('button'); var br = document.createElement('br'); but.type = 'button'; + but.innerHTML = 'x'; but.value = 'x'; but.className = 'btn button'; but.onclick = function(){ this.parentNode.parentNode.removeChild(this.parentNode); }; @@ -1004,6 +1006,7 @@ function duplicateHTML(copy,paste,baseid){ newentry.appendChild(source); newentry.value=''; + newentry.className = 'form-inline'; newentry.appendChild(but); newentry.appendChild(br); if(baseid)