/[cvs]/nfo/php/libs/org.netfrag.app/WebExplorer/MVC.php
ViewVC logotype

Diff of /nfo/php/libs/org.netfrag.app/WebExplorer/MVC.php

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

revision 1.16 by joko, Tue May 13 14:53:56 2003 UTC revision 1.18 by jonen, Wed Jul 2 12:18:00 2003 UTC
# Line 4  Line 4 
4   * $Id$   * $Id$
5   *   *
6   * $Log$   * $Log$
7     * Revision 1.18  2003/07/02 12:18:00  jonen
8     * fixed bugs
9     *
10     * Revision 1.17  2003/06/25 23:45:05  joko
11     * trying to switch from "ap" completely to "t"
12     *
13   * Revision 1.16  2003/05/13 14:53:56  joko   * Revision 1.16  2003/05/13 14:53:56  joko
14   * reset mvc-params "filter" and "meta" in tree mode!?   * reset mvc-params "filter" and "meta" in tree mode!?
15   *   *
# Line 286  class WebExplorer_MVC extends Site_WebAp Line 292  class WebExplorer_MVC extends Site_WebAp
292    
293          // rewrite idents          // rewrite idents
294          create_function('&$_in, &$_out', '          create_function('&$_in, &$_out', '
295            
296              // old version: ap == explorer
297             // map Topic to Page if exists             // map Topic to Page if exists
298             if($_in[topic]) {             //if ($_in[topic]) {
299              $_in[ap] = $_in[topic];             // $_in[ap] = $_in[topic];
300            }             //}          
301            $idents = array ( ap, );            //$idents = array ( ap );
302            foreach($idents as $key) {            //foreach($idents as $key) {
303              $_out[options][idents][$key] = $_in[$key];            //  $_out[options][idents][$key] = $_in[$key];
304            }            //}
305              
306              // 2003-06-26: switched from ap=explorer to t=DataBrowser
307              $_out[options][idents][t] = $_in[topic];
308    
309          '),          '),
310                    
311          // check right $_GET[ap]          // check right $_GET[ap] - depreciated
312          create_function('&$_in, &$_out', 'return ($_in[ap] != "explorer") ? print "Wrong application value [ap]: $_in[ap], sure this is right here?<br>" : null;'),          //create_function('&$_in, &$_out', 'return ($_in[ap] != "explorer") ? print "Wrong application value [ap]: $_in[ap], sure this is right here?<br>" : null;'),
313    
314          // write components variables to out          // write components variables to out
315          create_function('&$_in, &$_out', '          create_function('&$_in, &$_out', '
# Line 309  class WebExplorer_MVC extends Site_WebAp Line 321  class WebExplorer_MVC extends Site_WebAp
321            if($_in[ecom_label]) {            if($_in[ecom_label]) {
322              foreach($vars as $key) {              foreach($vars as $key) {
323                if($_in[$key]) {                if($_in[$key]) {
324                    //print "var: " . $key . " value: " . $_in[$key] . "<br>";
325                  $label = $_in[ecom_label];                  $label = $_in[ecom_label];
326                  $_out[options][ecoms][$label][$key] = $_in[$key];                  $_out[options][ecoms][$label][$key] = $_in[$key];
327                }                }
# Line 366  class WebExplorer_MVC extends Site_WebAp Line 379  class WebExplorer_MVC extends Site_WebAp
379                  if($ident) { array_push($tmp, $ident); }                  if($ident) { array_push($tmp, $ident); }
380              }              }
381              if($cnt == 1) {              if($cnt == 1) {
382                 //print "Single selection, ident : " . $tmp[0] . "<br>";                 print "Single selection, ident : " . $tmp[0] . "<br>";
383                  $_out[options][ecoms][$label][ecom_data_ident] = $tmp[0];                  $_out[options][ecoms][$label][ecom_data_ident] = $tmp[0];
384                  $_out[options][ecoms][$label][ecom_abstract_type] = "item";
385              } elseif($cnt > 1) {              } elseif($cnt > 1) {
386                // TODO: implement multi-selection actions on rows(items) here!!                // TODO: implement multi-selection actions on rows(items) here!!
387                  print "Multi-Selection!! Current Ident(s) $tmp" . "<br>";                  print "Multi-Selection!! Current Ident(s) $tmp" . "<br>";
# Line 376  class WebExplorer_MVC extends Site_WebAp Line 390  class WebExplorer_MVC extends Site_WebAp
390             } else {             } else {
391               print "ident: " . Dumper($_out[options][ecoms][$label][ecom_data_ident]) . "<br>";               print "ident: " . Dumper($_out[options][ecoms][$label][ecom_data_ident]) . "<br>";
392             }             }
393             //$_out[options][ecoms][$label][ecom_data_meta] = $_in[ecom_data_ident];             $_out[options][ecoms][$label][ecom_data_meta] = $_in[ecom_data_ident];
394             $_out[options][ecoms][$label][ecom_mode] = $_in[ecom_data_form_action];             $_out[options][ecoms][$label][ecom_mode] = $_in[ecom_data_form_action];
395             $_out[options][ecoms][$label][ecom_abstract_type] = "item";             //print "in: " . Dumper($_in) . "<br>";
396               //print "out: " . Dumper($_out) . "<br>";
397            }            }
398          '),          '),
399    
# Line 386  class WebExplorer_MVC extends Site_WebAp Line 401  class WebExplorer_MVC extends Site_WebAp
401          // handle data form buttons          // handle data form buttons
402          create_function('&$_in, &$_out', '          create_function('&$_in, &$_out', '
403            $label = $_in[ecom_label];            $label = $_in[ecom_label];
404            if($_in[ecom_data_action_edit]) { $_out[options][ecoms][$label][ecom_mode] = "edit"; }            if($_in[ecom_data_action_edit]) {
405            if($_in[ecom_data_action_cancel]) { $_out[options][ecoms][$label][ecom_mode] = "view"; }              $_out[options][ecoms][$label][ecom_mode] = "edit";
406                $_out[options][ecoms][$label][ecom_abstract_type] = "item";
407              }
408              if($_in[ecom_data_action_cancel]) {
409                $_out[options][ecoms][$label][ecom_mode] = "view";
410                $_out[options][ecoms][$label][ecom_abstract_type] = "item";
411              }
412    
413            // Action.Create            // Action.Create
414            if($_in[ecom_data_action_create]) {            if($_in[ecom_data_action_create]) {
415              print Dumper($_out[options][ecoms][$label]);              //print Dumper($_out[options][ecoms][$label]);
416              $_out[options][ecoms][$label][ecom_mode] = "create";              $_out[options][ecoms][$label][ecom_mode] = "create";
417                $_out[options][ecoms][$label][ecom_abstract_type] = "item";
418            }            }
419                        
420            // Action.Delete [new of 2003-04-09]            // Action.Delete [new of 2003-04-09]
# Line 404  class WebExplorer_MVC extends Site_WebAp Line 426  class WebExplorer_MVC extends Site_WebAp
426              // could/should we do this for "edit" and/or "view" actions as well?              // could/should we do this for "edit" and/or "view" actions as well?
427              // look at ecom/FlexibleDataItem!              // look at ecom/FlexibleDataItem!
428    
429                $_out[options][ecoms][$label][ecom_abstract_type] = "item";
430            }            }
           
431          '),          '),
432    
433          // propagate datasources to ecoms          // propagate datasources to ecoms

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.18

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed