/[papo]/papo/forms/components/inlineSearch.nebc
ViewVC logotype

Diff of /papo/forms/components/inlineSearch.nebc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by styxman, Wed Jun 25 15:43:04 2003 UTC revision 1.2 by styxman, Thu Jun 26 15:50:11 2003 UTC
# Line 191  $target_table=> '' Line 191  $target_table=> ''
191    def set_<neb:Inline>$object</neb:Inline> (recNo):    def set_<neb:Inline>$object</neb:Inline> (recNo):
192      if recNo>=0:      if recNo>=0:
193        <neb:Inline>$block_name</neb:Inline>.jumpRecord (recNo)        <neb:Inline>$block_name</neb:Inline>.jumpRecord (recNo)
194        <neb:Inline>"$target_block\.$id_entry"</neb:Inline>= str(<neb:Inline>"$block_name\.$id_entry"</neb:Inline>)        <neb:Inline>"$target_block\.$id_entry"</neb:Inline>= str(<neb:Inline>"$block_name\.idEntry"</neb:Inline>)
195        <neb:Block>if ($use_code) {</neb:Block>        <neb:Block>if ($use_code) {</neb:Block>
196        <!-- don't ident! -->        <!-- don't ident! -->
197        <neb:Inline>"$target_block\.$code_entry"</neb:Inline>= str(<neb:Inline>"$block_name\.$code_entry"</neb:Inline>)        <neb:Inline>"$target_block\.$code_entry"</neb:Inline>= str(<neb:Inline>"$block_name\.codeEntry"</neb:Inline>)
198          callTrigger ('<neb:Inline>"${object}_codePFI"</neb:Inline>')
199        <neb:Block>}</neb:Block>        <neb:Block>}</neb:Block>
200        <neb:Inline>"$target_block\.$name_entry"</neb:Inline>= str(<neb:Inline>"$block_name\.$name_entry"</neb:Inline>)        <neb:Inline>"$target_block\.$name_entry"</neb:Inline>= str(<neb:Inline>"$block_name\.nameEntry"</neb:Inline>)
201        callTrigger ('codePFI')        callTrigger ('<neb:Inline>"${object}_namePFI"</neb:Inline>')
       callTrigger ('namePFI')  
202    
203    # go fetch!...    # go fetch!...
204    <neb:Inline>$block_name</neb:Inline>.clear ()    <neb:Inline>$block_name</neb:Inline>.clear ()
# Line 206  $target_table=> '' Line 206  $target_table=> ''
206    <neb:Block>if ($use_code) {</neb:Block>    <neb:Block>if ($use_code) {</neb:Block>
207    <!-- don't ident! -->    <!-- don't ident! -->
208    if str(<neb:Inline>"$target_block\.hid_$code_entry"</neb:Inline>)!=str(<neb:Inline>"$target_block\.$code_entry"</neb:Inline>):    if str(<neb:Inline>"$target_block\.hid_$code_entry"</neb:Inline>)!=str(<neb:Inline>"$target_block\.$code_entry"</neb:Inline>):
209      <neb:Inline>"$block_name\.$code_entry"</neb:Inline>= str(<neb:Inline>"$target_block\.$code_entry"</neb:Inline>)+'%'      <neb:Inline>"$block_name\.codeEntry"</neb:Inline>= str(<neb:Inline>"$target_block\.$code_entry"</neb:Inline>)+'%'
210    else:    else:
211      <neb:Inline>"$block_name\.$code_entry"</neb:Inline>= ''      <neb:Inline>"$block_name\.codeEntry"</neb:Inline>= ''
212    <neb:Block>}</neb:Block>    <neb:Block>}</neb:Block>
213    if str(<neb:Inline>"$target_block\.hid_$name_entry"</neb:Inline>)!=str(<neb:Inline>"$target_block\.$name_entry"</neb:Inline>):    if str(<neb:Inline>"$target_block\.hid_$name_entry"</neb:Inline>)!=str(<neb:Inline>"$target_block\.$name_entry"</neb:Inline>):
214      <neb:Inline>"$block_name\.$name_entry"</neb:Inline>= str(<neb:Inline>"$target_block\.$name_entry"</neb:Inline>)+'%'      <neb:Inline>"$block_name\.nameEntry"</neb:Inline>= str(<neb:Inline>"$target_block\.$name_entry"</neb:Inline>)+'%'
215    else:    else:
216      <neb:Inline>"$block_name\.$name_entry"</neb:Inline>= ''      <neb:Inline>"$block_name\.nameEntry"</neb:Inline>= ''
217    <neb:Inline>$block_name</neb:Inline>.processQuery ()    <neb:Inline>$block_name</neb:Inline>.processQuery ()
218    
219    callTrigger('endWaitingModeTrigger')    callTrigger('endWaitingModeTrigger')
# Line 235  $target_table=> '' Line 235  $target_table=> ''
235  </trigger>  </trigger>
236    
237  <neb:Block>if ($use_code) {</neb:Block>  <neb:Block>if ($use_code) {</neb:Block>
238    <trigger name="codePFI" type="NAMED">    <trigger name="neb:qq(${object}_codePFI)" type="NAMED">
239      # copy our contents to the hidden one      # copy our contents to the hidden one
240      <neb:Inline>"$target_block\.hid_$code_entry"</neb:Inline>= str(<neb:Inline>"$target_block\.$code_entry"</neb:Inline>)      <neb:Inline>"$target_block\.hid_$code_entry"</neb:Inline>= str(<neb:Inline>"$target_block\.$code_entry"</neb:Inline>)
241      <neb:Inline>"$target_block\.hid_$name_entry"</neb:Inline>= str(<neb:Inline>"$target_block\.$name_entry"</neb:Inline>)      <neb:Inline>"$target_block\.hid_$name_entry"</neb:Inline>= str(<neb:Inline>"$target_block\.$name_entry"</neb:Inline>)
242    </trigger>    </trigger>
243    <trigger name="codePFO" type="NAMED">    <trigger name="neb:qq(${object}_codePFO)" type="NAMED">
244      # copy back      # copy back
245      <neb:Inline>"$target_block\.$code_entry"</neb:Inline>= str(<neb:Inline>"$target_block\.hid_$code_entry"</neb:Inline>)      <neb:Inline>"$target_block\.$code_entry"</neb:Inline>= str(<neb:Inline>"$target_block\.hid_$code_entry"</neb:Inline>)
246      <neb:Inline>"$target_block\.$name_entry"</neb:Inline>= str(<neb:Inline>"$target_block\.hid_$name_entry"</neb:Inline>)      <neb:Inline>"$target_block\.$name_entry"</neb:Inline>= str(<neb:Inline>"$target_block\.hid_$name_entry"</neb:Inline>)
247    </trigger>    </trigger>
248  <neb:Block>}</neb:Block>  <neb:Block>}</neb:Block>
249  <trigger name="namePFI" type="NAMED">  <trigger name="neb:qq(${object}_namePFI)" type="NAMED">
250    # copy our contents to the hidden one    # copy our contents to the hidden one
251    <neb:Block>if ($use_code) {</neb:Block>    <neb:Block>if ($use_code) {</neb:Block>
252    <!--  *don't* ident!  //-->    <!--  *don't* ident!  //-->
# Line 254  $target_table=> '' Line 254  $target_table=> ''
254    <neb:Block>}</neb:Block>    <neb:Block>}</neb:Block>
255    <neb:Inline>"$target_block\.hid_$name_entry"</neb:Inline>= str(<neb:Inline>"$target_block\.$name_entry"</neb:Inline>)    <neb:Inline>"$target_block\.hid_$name_entry"</neb:Inline>= str(<neb:Inline>"$target_block\.$name_entry"</neb:Inline>)
256  </trigger>  </trigger>
257  <trigger name="namePFO" type="NAMED">  <trigger name="neb:qq(${object}_namePFO)" type="NAMED">
258    # copy back    # copy back
259    <neb:Block>if ($use_code) {</neb:Block>    <neb:Block>if ($use_code) {</neb:Block>
260    <!--  *don't* ident!  //-->    <!--  *don't* ident!  //-->
# Line 279  $target_table=> '' Line 279  $target_table=> ''
279        <!-- left for debug purposses -->        <!-- left for debug purposses -->
280        <!-- label text=">"/ -->        <!-- label text=">"/ -->
281        <entry name="neb:$code_entry" trigger="neb:qq(idFor_${object}CodeTrigger)" width="neb:$code_width">        <entry name="neb:$code_entry" trigger="neb:qq(idFor_${object}CodeTrigger)" width="neb:$code_width">
282          <trigger src="codePFI" type="Pre-FocusIn"/>          <trigger src="neb:qq(${object}_codePFI)" type="Pre-FocusIn"/>
283          <trigger src="codePFO" type="Pre-FocusOut"/>          <trigger src="neb:qq(${object}_codePFO)" type="Pre-FocusOut"/>
284        </entry>        </entry>
285      <neb:Block>}</neb:Block>      <neb:Block>}</neb:Block>
286      <entry name="neb:qq(hid_$name_entry)" hidden="y"/>      <entry name="neb:qq(hid_$name_entry)" hidden="y"/>
287      <!-- ditto -->      <!-- ditto -->
288      <!-- label text=">"/ -->      <!-- label text=">"/ -->
289      <entry name="neb:$name_entry" trigger="neb:qq(idFor_${object}NameTrigger)">      <entry name="neb:$name_entry" trigger="neb:qq(idFor_${object}NameTrigger)">
290        <trigger src="namePFI" type="Pre-FocusIn"/>        <trigger src="neb:qq(${object}_namePFI)" type="Pre-FocusIn"/>
291        <trigger src="namePFO" type="Pre-FocusOut"/>        <trigger src="neb:qq(${object}_namePFO)" type="Pre-FocusOut"/>
292      </entry>      </entry>
293      <button label="..." trigger="neb:$object.'ABMFormTrigger'" width="5">      <button label="..." trigger="neb:$object.'ABMFormTrigger'" width="5">
294        <trigger name="neb:$object.'ABMFormTrigger'" type="NAMED">        <trigger name="neb:$object.'ABMFormTrigger'" type="NAMED">
# Line 301  $target_table=> '' Line 301  $target_table=> ''
301      <!-- the block that is used to do the actual search -->      <!-- the block that is used to do the actual search -->
302      <block name="neb:$block_name" datasource="neb:$ds_name">      <block name="neb:$block_name" datasource="neb:$ds_name">
303        <!-- the ones to be used to do the real search, so they're hidden -->        <!-- the ones to be used to do the real search, so they're hidden -->
304        <entry name="neb:qq($id_entry)" field="neb:qq($table.$id_field)" hidden="y"/>        <entry name="idEntry" field="neb:qq($table.$id_field)" hidden="y"/>
305        <neb:Block>if ($use_code) {</neb:Block>        <neb:Block>if ($use_code) {</neb:Block>
306          <entry name="neb:qq($code_entry)" field="neb:qq($table.$code_field)" hidden="y"/>          <entry name="codeEntry" field="neb:qq($table.$code_field)" hidden="y"/>
307        <neb:Block>}</neb:Block>        <neb:Block>}</neb:Block>
308        <entry name="neb:qq($name_entry)" field="neb:qq($table.$name_field)" hidden="y"/>        <entry name="nameEntry" field="neb:qq($table.$name_field)" hidden="y"/>
309      </block>      </block>
310    </lam:box>    </lam:box>
311  </lam:box>  </lam:box>
312    
313  <!-- the trigger that searchs -->  <!-- the trigger that shows values given id -->
314  <trigger name="neb:qq(${object}ForId)" type="NAMED">  <trigger name="neb:qq(${object}ForId)" type="NAMED">
315    if str(<neb:Inline>qq($target_block.$id_entry)</neb:Inline>)!='':    if str(<neb:Inline>qq($target_block.$id_entry)</neb:Inline>)!='':
316      <neb:Inline>qq($block_name)</neb:Inline>.clear ()      <neb:Inline>qq($block_name)</neb:Inline>.clear ()
317      <neb:Inline>qq($block_name)</neb:Inline>.initQuery ()      <neb:Inline>qq($block_name)</neb:Inline>.initQuery ()
318      <neb:Inline>qq($block_name.$id_entry)</neb:Inline>= str(<neb:Inline>qq($target_block.$id_entry)</neb:Inline>)      <neb:Inline>qq($block_name.idEntry)</neb:Inline>= str(<neb:Inline>qq($target_block.$id_entry)</neb:Inline>)
319      <neb:Inline>qq($block_name)</neb:Inline>.processQuery ()      <neb:Inline>qq($block_name)</neb:Inline>.processQuery ()
320      # copy the database contents in the fields      # copy the database contents in the fields
321      <neb:Block>if ($use_code) {</neb:Block>      <neb:Block>if ($use_code) {</neb:Block>
322      <!-- don't ident! -->      <!-- don't ident! -->
323      <neb:Inline>qq($target_block.$code_entry)</neb:Inline>= str(<neb:Inline>qq($block_name.$code_entry)</neb:Inline>)      <neb:Inline>qq($target_block.$code_entry)</neb:Inline>= str(<neb:Inline>qq($block_name.codeEntry)</neb:Inline>)
324      <neb:Block>}</neb:Block>      <neb:Block>}</neb:Block>
325      <neb:Inline>qq($target_block.$name_entry)</neb:Inline>= str(<neb:Inline>qq($block_name.$name_entry)</neb:Inline>)      <neb:Inline>qq($target_block.$name_entry)</neb:Inline>= str(<neb:Inline>qq($block_name.nameEntry)</neb:Inline>)
326      else:
327        <neb:Block>if ($use_code) {</neb:Block>
328        <!-- don't ident! -->
329        <neb:Inline>qq($target_block.$code_entry)</neb:Inline>= ''
330        <neb:Block>}</neb:Block>
331        <neb:Inline>qq($target_block.$name_entry)</neb:Inline>= ''
332  </trigger>  </trigger>

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26