##// END OF EJS Templates
strip: cleaning code, plus fixing changes after switch from <i/> to <div/>
Bartłomiej Wołyńczyk -
r1605:a40f72fa default
parent child Browse files
Show More
@@ -43,14 +43,15 b' addNew = function(number){'
43 if (number >= ${c.strip_limit}){
43 if (number >= ${c.strip_limit}){
44 return;
44 return;
45 }
45 }
46 var minus = '<i id="i_minus_icon-'+(number+1)+'" class="icon-minus">${_('Remove')}</i>';
46 var minus = '<i class="icon-minus">${_('Remove')}</i>';
47 $('#plus_icon-'+number).detach();
47 $('#plus_icon-'+number).detach();
48 number++;
48 number++;
49
49
50 var input = '<div id="box-'+number+'" class="inputx locked_input">'+
50 var input = '<div id="box-'+number+'" class="inputx locked_input">'+
51 '<input class="text" id="changeset_id-'+number+'" name="changeset_id-'+number+'" size="59" type="text" value="">'+
51 '<input class="text" id="changeset_id-'+number+'" name="changeset_id-'+number+'" size="59" type="text" value=""' +
52 'placeholder="${_('Enter full 40 character commit sha')}">'+
52 '<div id="plus_icon-'+number+'" class="btn btn-default plus_input_button" onclick="addNew('+number+');return false">'+
53 '<div id="plus_icon-'+number+'" class="btn btn-default plus_input_button" onclick="addNew('+number+');return false">'+
53 '<i id="i_plus_icon-'+(number)+'" class="icon-plus">${_('Add another commit')}</i>'+
54 '<i class="icon-plus">${_('Add another commit')}</i>'+
54 '</div>'+
55 '</div>'+
55 '<div id="minus_icon-'+number+'" class="btn btn-default minus_input_button" onclick="delOld('+(number)+');return false">'+
56 '<div id="minus_icon-'+number+'" class="btn btn-default minus_input_button" onclick="delOld('+(number)+');return false">'+
56 minus +
57 minus +
@@ -65,21 +66,23 b' reIndex = function(number){'
65 var check = $('#box-'+i);
66 var check = $('#box-'+i);
66 if (check.length == 0){
67 if (check.length == 0){
67 var change = $('#box-'+(i+1));
68 var change = $('#box-'+(i+1));
68
69 change.attr('id','box-'+i);
69 change.attr('id','box-'+i);
70 var plus = $('#plus_icon-'+(i+1));
70 var plus = $('#plus_icon-'+(i+1));
71 var i_plus = $('#i_plus_icon-'+(i+1));
71
72 if (plus.length != 0){
72 if (plus.length != 0){
73 plus.attr('id','plus_icon-'+i);
73 plus.attr('id','plus_icon-'+i);
74 i_plus.attr('id','i_plus_icon-'+i);
74 plus.attr('onclick','addNew('+i+');return false');
75 i_plus.attr('onclick','addNew('+i+');return false');
76 plus_leaf--;
75 plus_leaf--;
77 }
76 }
78 var minus = $('#minus_icon-'+(i+1));
77 var minus = $('#minus_icon-'+(i+1));
79 var i_minus = $('#i_minus_icon-'+(i+1));
78
80 minus.attr('id','minus_icon-'+i);
79 minus.attr('id','minus_icon-'+i);
81 i_minus.attr('id','i_minus_icon-'+i);
80
82 i_minus.attr('onclick','delOld('+i+');return false');
81 minus.attr('onclick','delOld('+i+');re' +
82 'turn false');
83 var input = $('input#changeset_id-'+(i+1));
84 input.attr('name','changeset_id-'+i);
85 input.attr('id','changeset_id-'+i);
83 }
86 }
84 }
87 }
85 };
88 };
General Comments 0
You need to be logged in to leave comments. Login now