Subversion Repositories VORC

Rev

Rev 219 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 219 Rev 222
Line 91... Line 91...
91
  if ($filter)  {
91
  if ($filter)  {
92
    if ($filter eq "-blank-") {
92
    if ($filter eq "-blank-") {
93
      return "($colName = '' or isNull($colName) = 1)";
93
      return "($colName = '' or isNull($colName) = 1)";
94
    }
94
    }
Line 95... Line 95...
95
    
95
    
96
    no strict;
96
#    no strict;
97
    if ($filtered_by_access ne "") {
97
#    if ($filtered_by_access ne "") {
98
      return "$colName like \"%$filter-$filtered_by_access%\"";
98
#      return "$colName like \"%$filter-$filtered_by_access%\"";
99
    } else {
99
#    } else {
100
      return "$colName like \"%$filter%\"";
100
#      return "$colName like \"%$filter%\"";
-
 
101
#    }
101
    }
102
    return "department like '%$filter-2%' or department like '%$filter-3%' or department like '%$filter-4%'";
102
  } else {
103
  } else {
103
    my @options = ();
104
    my @options = ();
Line 104... Line 105...
104
    my $tmpFormValue = param ("filter-".$colName);
105
    my $tmpFormValue = param ("filter-".$colName);
Line 110... Line 111...
110
                       ( $h->option ({ selected=>[], value=>$_ }, $_ eq "-blank-" ? $_ : $DepartmentNames->{$_}) ) :
111
                       ( $h->option ({ selected=>[], value=>$_ }, $_ eq "-blank-" ? $_ : $DepartmentNames->{$_}) ) :
111
                       ( $h->option ({ value=>$_ },               $_ eq "-blank-" ? $_ : $DepartmentNames->{$_}) )  } @options;
112
                       ( $h->option ({ value=>$_ },               $_ eq "-blank-" ? $_ : $DepartmentNames->{$_}) )  } @options;
Line 112... Line 113...
112
    
113
    
Line -... Line 114...
-
 
114
    unshift @options, $tmpFormValue eq "" ? "<option selected></option>" : "<option></option>";
113
    unshift @options, $tmpFormValue eq "" ? "<option selected></option>" : "<option></option>";
115
    
114
    
116
    my $autoload = param ("autoload") // 1;
115
    return param ("autoload") ? $h->select ({ name=>"filter-".$colName, onChange=>"page.value = 1; submit();" }, [@options]) : $h->select ({ name=>"filter-".$colName }, [$h->option (), @options]);
117
    return $autoload ? $h->select ({ name=>"filter-".$colName, onChange=>"page.value = 1; submit();" }, [@options]) : $h->select ({ name=>"filter-".$colName }, [$h->option (), @options]);
Line 116... Line 118...
116
  }
118
  }
117
}
119
}
Line 132... Line 134...
132
                       ( $h->option ({ selected=>[], value=>$_ }, $ROLE->{$_}) ) :
134
                       ( $h->option ({ selected=>[], value=>$_ }, $ROLE->{$_}) ) :
133
                       ( $h->option ({ value=>$_ },               $ROLE->{$_}) )  } @options;
135
                       ( $h->option ({ value=>$_ },               $ROLE->{$_}) )  } @options;
Line 134... Line 136...
134
    
136
    
Line -... Line 137...
-
 
137
    unshift @options, $tmpFormValue eq "" ? "<option selected></option>" : "<option></option>";
135
    unshift @options, $tmpFormValue eq "" ? "<option selected></option>" : "<option></option>";
138
    
136
    
139
    my $autoload = param ("autoload") // 1;
137
    return param ("autoload") ? $h->select ({ name=>"filter-".$colName, onChange=>"page.value = 1; submit();" }, [@options]) : $h->select ({ name=>"filter-".$colName }, [$h->option (), @options]);
140
    return $autoload ? $h->select ({ name=>"filter-".$colName, onChange=>"page.value = 1; submit();" }, [@options]) : $h->select ({ name=>"filter-".$colName }, [$h->option (), @options]);
Line 138... Line 141...
138
  }
141
  }
139
}
142
}
Line 150... Line 153...
150
    
153
    
151
    @options = map { $tmpFormValue eq $_ ?
154
    @options = map { $tmpFormValue eq $_ ?
152
                       ( $h->option ({ selected=>[] }, $_) ) :
155
                       ( $h->option ({ selected=>[] }, $_) ) :
Line -... Line 156...
-
 
156
                       ( $h->option (                  $_) )  } @options;
153
                       ( $h->option (                  $_) )  } @options;
157
    
154
    
158
    my $autoload = param ("autoload") // 1;
155
    return param ("autoload") ? $h->select ({ name=>"filter-".$colName, onChange=>"page.value = 1; submit();" }, [@options]) : $h->select ({ name=>"filter-".$colName }, [$h->option (), @options]);
159
    return $autoload ? $h->select ({ name=>"filter-".$colName, onChange=>"page.value = 1; submit();" }, [@options]) : $h->select ({ name=>"filter-".$colName }, [$h->option (), @options]);
Line 156... Line 160...
156
  }
160
  }
157
}
161
}
Line 168... Line 172...
168
    
172
    
169
    @options = map { $tmpFormValue eq $_ ?
173
    @options = map { $tmpFormValue eq $_ ?
170
                       ( $h->option ({ selected=>[] }, $_) ) :
174
                       ( $h->option ({ selected=>[] }, $_) ) :
Line -... Line 175...
-
 
175
                       ( $h->option (                  $_) )  } @options;
171
                       ( $h->option (                  $_) )  } @options;
176
    
172
    
177
    my $autoload = param ("autoload") // 1;
173
    return param ("autoload") ? $h->select ({ name=>"filter-".$colName, onChange=>"page.value = 1; submit();" }, [@options]) : $h->select ({ name=>"filter-".$colName }, [$h->option (), @options]);
178
    return $autoload ? $h->select ({ name=>"filter-".$colName, onChange=>"page.value = 1; submit();" }, [@options]) : $h->select ({ name=>"filter-".$colName }, [$h->option (), @options]);
Line 174... Line 179...
174
  }
179
  }
175
}
180
}