@@ -25,7 +25,7 @@ TestLink Open Source Project - http://testlink.sourceforge.net/
2525
2626<div class =" workBack" >
2727 <table class =" simple" id =" stepsOnTable" >
28- <tr >
28+ <tr class = " nodrag " >
2929 <th width =" 40px" ><nobr >
3030 { if $edit_enabled && $steps != ' ' && ! is_null($steps ) && $args_frozen_version == " no" }
3131 <img class =" clickable" src =" { $tlImages .reorder} " align =" left"
@@ -58,10 +58,8 @@ TestLink Open Source Project - http://testlink.sourceforge.net/
5858 <img class =" clickable" src =" { $tlImages .reset} "
5959 onclick =" javascript:clearSelectByClassName('step_status');" title =" { $inc_steps_labels .clear_all_status} " ></th >
6060 { /if }
61-
62-
6361 </tr >
64-
62+
6563 { $rowCount =$steps |@count}
6664 { $row =0}
6765
@@ -70,7 +68,7 @@ TestLink Open Source Project - http://testlink.sourceforge.net/
7068
7169 { foreach from= $steps item= step_info}
7270 <tr id =" step_row_{ $step_info .id} " style =" border : 1px solid white ;" >
73- <td style =" text-align :left ;" >
71+ <td style =" text-align :center ;" >
7472 <span class =" order_info" style =' display :none ' >
7573 { if $edit_enabled && $args_frozen_version == " no" }
7674 <input type =" text" class =" step_number{ $args_testcase .id} " name =" step_set[{ $step_info .id} ]" id =" step_set_{ $step_info .id} "
@@ -80,7 +78,7 @@ TestLink Open Source Project - http://testlink.sourceforge.net/
8078 { include file= " error_icon.tpl" field= " step_number" }
8179 { /if }
8280 </span >
83- { $step_info .step_number}
81+ < span id = " tcstep_ { $step_info .id } " > { $ step_info . step_number} </ span >
8482 { if $ghost_control }
8583 <span class =' ghost' style =' display :none ' >{ $step_info .ghost_action} </span >
8684 { /if }
@@ -150,22 +148,6 @@ TestLink Open Source Project - http://testlink.sourceforge.net/
150148 </td >
151149 </tr >
152150 { /if }
153-
154- { *
155- {$rCount=$row+$step_info.step_number}
156- {if ($rCount < $rowCount) && ($rowCount>=1)}
157- <tr width="100%" class="nodrag">
158- {if $session['testprojectOptions']->automationEnabled}
159- <td colspan=6>
160- {else}
161- <td colspan=5>
162- {/if}
163- <hr align="center" width="100%" color="grey" size="1">
164- </td>
165- </tr>
166- {/if}
167- *}
168-
169151 { /foreach }
170152 </table >
171153</div >
@@ -183,7 +165,35 @@ $(document).ready(function() {
183165 .replace(/=/g,' ' )
184166 .replace(/step_row_/g,' ' );
185167 $(' #stepSeq' ).val(xx);
186- alert(' Use the Resequence Steps Button To Save' );
168+
169+ // alert(' Before jQuery AJAX' );
170+ url2call = fRoot+' lib/ajax/stepReorder.php' ;
171+ // alert(url2call);
172+
173+ // -------------------------------------
174+ jQuery.ajax({
175+ url: url2call,
176+ data: {
177+ ' stepSeq' : xx,
178+ } ,
179+ success:function(data) {
180+ /*
181+ update screen
182+ */
183+ var parsec = JSON.parse(data);
184+ for(var prop in parsec) {
185+ jQuery(" span#tcstep_" + prop).html(parsec[prop]);
186+ }
187+ alert(' Steps numbers have been re-sequenced' );
188+ // console.log(data);
189+ // console.log(' done' );
190+ } ,
191+ error: function(){
192+ console.log(' FAILURE AJAX CALL -> ' + url2call);
193+ }
194+ } );
195+
196+ // alert(' Use the Resequence Steps Button To Save' );
187197 }
188198 } );
189199} );
0 commit comments