[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[6922] trunk/bin/arap.pl



Revision: 6922
          http://sourceforge.net/p/ledger-smb/code/6922
Author:   einhverfr
Date:     2014-03-03 13:51:46 +0000 (Mon, 03 Mar 2014)
Log Message:
-----------
Removing unused code

Modified Paths:
--------------
    trunk/bin/arap.pl

Modified: trunk/bin/arap.pl
===================================================================
--- trunk/bin/arap.pl	2014-03-03 13:11:10 UTC (rev 6921)
+++ trunk/bin/arap.pl	2014-03-03 13:51:46 UTC (rev 6922)
@@ -316,13 +316,6 @@
           qq|<option value="$_->{name}--$_->{id}">$_->{name}\n|;
     }
     $form->{selectprojectnumber} = "";
-    if ( @{ $form->{all_project} } ) {
-        $form->{selectprojectnumber} = "<option>\n";
-        for ( @{ $form->{all_project} } ) {
-            $form->{selectprojectnumber} .=
-qq|<option value="$_->{projectnumber}--$_->{id}">$_->{projectnumber}\n|;
-        }
-    }
 
     1;
 }
@@ -344,173 +337,7 @@
 
 }
 
-sub check_project {
 
-    for $i ( 1 .. $form->{rowcount} ) {
-        $form->{"project_id_$i"} = "" unless $form->{"projectnumber_$i"};
-        if ( $form->{"projectnumber_$i"} ne $form->{"oldprojectnumber_$i"} ) {
-            if ( $form->{"projectnumber_$i"} ) {
-
-                # get new project
-                $form->{projectnumber} = $form->{"projectnumber_$i"};
-                if ( ( $rows = PE->projects( \%myconfig, $form ) ) > 1 ) {
-
-                    # check form->{project_list} how many there are
-                    $form->{rownumber} = $i;
-                    &select_project;
-                    $form->finalize_request();
-                }
-
-                if ( $rows == 1 ) {
-                    $form->{"project_id_$i"} = $form->{project_list}->[0]->{id};
-                    $form->{"projectnumber_$i"} =
-                      $form->{project_list}->[0]->{projectnumber};
-                    $form->{"oldprojectnumber_$i"} =
-                      $form->{project_list}->[0]->{projectnumber};
-                }
-                else {
-
-                    # not on file
-                    $form->error( $locale->text('Project not on file!') );
-                }
-            }
-            else {
-                $form->{"oldprojectnumber_$i"} = "";
-            }
-        }
-    }
-
-}
-
-sub select_project {
-
-    @column_index = qw(ndx projectnumber description);
-
-    $column_data{ndx} = qq|<th>&nbsp;</th>|;
-    $column_data{projectnumber} =
-      qq|<th>| . $locale->text('Number') . qq|</th>|;
-    $column_data{description} =
-      qq|<th>| . $locale->text('Description') . qq|</th>|;
-
-    # list items with radio button on a form
-    $form->header;
-
-    $title = $locale->text('Select from one of the projects below');
-
-    print qq|
-<body class="$form->{dojo_theme}">
-
-<form method=post action=$form->{script}>
-
-<input type=hidden name=rownumber value=$form->{rownumber}>
-
-<table width=100%>
-  <tr>
-    <th class=listtop>$title</th>
-  </tr>
-  <tr space=5></tr>
-  <tr>
-    <td>
-      <table width=100%>
-	<tr class=listheading>|;
-
-    for (@column_index) { print "\n$column_data{$_}" }
-
-    print qq|
-        </tr>
-|;
-
-    my $i = 0;
-    foreach $ref ( @{ $form->{project_list} } ) {
-        $checked = ( $i++ ) ? "" : "checked";
-
-        $ref->{name} = $form->quote( $ref->{name} );
-
-        $column_data{ndx} =
-qq|<td><input name=ndx class=radio type=radio value=$i $checked></td>|;
-        $column_data{projectnumber} =
-qq|<td><input name="new_projectnumber_$i" type=hidden value="$ref->{projectnumber}">$ref->{projectnumber}</td>|;
-        $column_data{description} = qq|<td>$ref->{description}</td>|;
-
-        $j++;
-        $j %= 2;
-        print qq|
-        <tr class=listrow$j>|;
-
-        for (@column_index) { print "\n$column_data{$_}" }
-
-        print qq|
-        </tr>
-
-<input name="new_id_$i" type=hidden value=$ref->{id}>
-
-|;
-
-    }
-
-    print qq|
-      </table>
-    </td>
-  </tr>
-  <tr>
-    <td><hr size=3 noshade></td>
-  </tr>
-</table>
-
-<input name=lastndx type=hidden value=$i>
-
-|;
-
-    # delete list variable
-    for (qw(nextsub project_list)) { delete $form->{$_} }
-
-    $form->{action} = "project_selected";
-
-    $form->hide_form;
-
-    print qq|
-<input type=hidden name=nextsub value=project_selected>
-<br>
-<button class="submit" type="submit" name="action" value="continue">|
-      . $locale->text('Continue')
-      . qq|</button>
-</form>
-
-</body>
-</html>
-|;
-
-}
-
-sub project_selected {
-
-    # replace the variable with the one checked
-
-    # index for new item
-    $i = $form->{ndx};
-
-    $form->{"projectnumber_$form->{rownumber}"} =
-      $form->{"new_projectnumber_$i"};
-    $form->{"oldprojectnumber_$form->{rownumber}"} =
-      $form->{"new_projectnumber_$i"};
-    $form->{"project_id_$form->{rownumber}"} = $form->{"new_id_$i"};
-
-    # delete all the new_ variables
-    for $i ( 1 .. $form->{lastndx} ) {
-        for (qw(id projectnumber description)) { delete $form->{"new_${_}_$i"} }
-    }
-
-    for (qw(ndx lastndx nextsub)) { delete $form->{$_} }
-
-    if ( $form->{update} ) {
-        &{ $form->{update} };
-    }
-    else {
-        &update;
-    }
-
-}
-
 sub post_as_new {
 
     for (qw(id printed emailed queued)) { delete $form->{$_} }

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits