Development

Changeset 7074 for plugins

You must first sign up to be able to contribute.

Changeset 7074 for plugins

Show
Ignore:
Timestamp:
01/17/08 01:51:32 (5 years ago)
Author:
Leon.van.der.Ree
Message:

improved div-naming for edit-pages somewhat, but things are still broken, commit for laptop tomorrow

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_renderer.php

    r6885 r7074  
    8282      $default_collapse = false; 
    8383      //TODO remove hardcoded tag for underline, add option to set stylesheet-class, don't forget to remove the closing tag as well... 
    84       $headerText .= "<u><a href=\'".$controller->genUrl($h_moduleName."/edit?".$url_pkn."=")."/'+record.data['".$record_pkn."']+'\'>"; 
     84      $headerText .= "<u><a href=\'".$controller->genUrl($h_moduleName."/edit?".$url_pkn."=")."/'+record.data['".$record_pkn."']+'\' id=\'".$h_moduleName."'+record.data['".$record_pkn."']+'\'>"; 
    8585    } 
    8686    $headerText .= $h_valuePrefix."'+record.data['".str_replace('/', $tableDelimiter, $columnName)."']+'".$h_valueSuffix; 
  • plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/editAjaxSuccess.php

    r7073 r7074  
     1<?php 
     2  $pkn = $this->getPrimaryKeyAdminColumn()->getName(); 
     3?> 
    14[?php use_helper('Object', 'Validation', 'ObjectAdmin', 'I18N', 'Date') ?] 
    25 
     
    2326</script> 
    2427 
    25 [?php if ($<?php echo $this->getSingularName() ?>->isNew()): ?] 
    26 <script type="text/javascript"> 
    27 //  Dialog.setDialogTitle('<?php echo $this->getI18NString('edit.newtitle', 'Add new '.$this->getModuleName()); ?>'); 
    28 </script> 
    29 [?php else: ?] 
    30 <script type="text/javascript"> 
    31 //  Dialog.setDialogTitle('<?php echo $this->getI18NString('edit.title', 'Edit '.$this->getModuleName()); ?>'); 
    32 </script> 
    33 [?php endif; ?] 
     28[?php  
     29  $pk = '<?php echo $this->getModuleName() ?>_new'; 
     30  if ($<?php echo $this->getSingularName() ?>->isNew()) 
     31  { 
     32  } 
     33  else 
     34  { 
     35    $pk = '<?php echo $this->getModuleName() ?>'.$sf_request->getParameter('<?php echo $pkn ?>'); 
     36  } 
     37?] 
    3438 
    3539<?php  
     
    3943 
    4044$sfExtjs2Plugin_EditPage_Panel = $sfExtjs2Plugin->Panel(array( 
    41   'applyTo' => 'sf_admin_container', 
    42   'id' => 'edit_page', 
     45  'applyTo' => 'sf_admin_container_[?php echo $pk ?]', 
     46  'id' => 'edit_page_[?php echo $pk ?]', 
    4347  'layout' => 'border', 
    4448 
     
    4953    $sfExtjs2Plugin->Panel(array( 
    5054      'region' => 'north', 
    51       'contentEl' => 'sf_admin_header
     55      'contentEl' => 'sf_admin_header_[?php echo $pk ?]
    5256    )), 
    5357    $sfExtjs2Plugin->Panel(array( 
    5458      'region' => 'west', 
    5559       
    56       'id'=> 'sf_admin_content_menu', 
    57       'contentEl' => 'sf_admin_content_menu_div', 
     60      'id'=> 'sf_admin_content_menu_[?php echo $pk ?]', 
     61      'contentEl' => 'sf_admin_content_menu_div_[?php echo $pk ?]', 
    5862     
    5963      'split' => true, 
     
    8084        $sfExtjs2Plugin->Panel(array( 
    8185          'region' => 'north', 
    82           'contentEl' => 'sf_admin_content_message
     86          'contentEl' => 'sf_admin_content_message_[?php echo $pk ?]
    8387        )), 
    8488        $sfExtjs2Plugin->Panel(array( 
    8589          'region' => 'center', 
    86           'contentEl' => 'sf_admin_content_main
     90          'contentEl' => 'sf_admin_content_main_[?php echo $pk ?]
    8791        )), 
    8892        $sfExtjs2Plugin->Panel(array( 
    8993          'region' => 'south', 
    90           'contentEl' => 'sf_admin_content_pages
     94          'contentEl' => 'sf_admin_content_pages_[?php echo $pk ?]
    9195        )) 
    9296      ) 
     
    9498    $sfExtjs2Plugin->Panel(array( 
    9599      'region' => 'south', 
    96       'contentEl' => 'sf_admin_footer
     100      'contentEl' => 'sf_admin_footer_[?php echo $pk ?]
    97101    )) 
    98102  ) 
     
    100104 
    101105$sfExtjs2Plugin->beginApplication(array( 
    102   'name'   => 'EditLayout', 
     106  'name'   => 'EditLayout_[?php echo $pk ?] ', // don't ask me why But if I leave out this last space the definition of the function gets on the same line as the comment 
    103107  'private' => array 
    104108  ( 
     
    112116      if (content){ 
    113117        content.add(editpage); 
    114         content.layout.setActiveItem(0); 
     118        content.layout.setActiveItem('edit_page_[?php echo \$pk ?]'); 
    115119      } 
    116        
    117120    ")     
    118121  ) 
     
    120123$sfExtjs2Plugin->endApplication(); 
    121124     
    122 $sfExtjs2Plugin->initApplication('EditLayout'); 
     125//$sfExtjs2Plugin->initApplication('EditLayout_[?php echo $pk ?]'); 
    123126$sfExtjs2Plugin->end(); 
    124127?> 
    125128 
    126 <div id="sf_admin_container"> 
     129<div id="sf_admin_container_[?php echo $pk ?]"> 
    127130 
    128 <div id="sf_admin_header"> 
     131<div id="sf_admin_header_[?php echo $pk ?]"> 
    129132[?php include_partial('edit_header', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>)) ?] 
    130133</div> 
    131134 
    132 <div id="sf_admin_content_menu_div"> 
     135<div id="sf_admin_content_menu_div_[?php echo $pk ?]"> 
    133136[?php include_partial('edit_ajax_menu', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>)) ?] 
    134137</div> 
    135138 
    136 <div id="sf_admin_content_message"> 
     139<div id="sf_admin_content_message_[?php echo $pk ?]"> 
    137140[?php include_partial('edit_messages', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>, 'labels' => $labels)) ?] 
    138141</div> 
    139 <div id="sf_admin_content_main"> 
     142<div id="sf_admin_content_main_[?php echo $pk ?]"> 
    140143[?php include_partial('edit_form_ajax', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>, 'labels' => $labels)) ?] 
    141144[?php include_partial('edit_form_ajax_tabpages', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>, 'labels' => $labels)) ?] 
    142145</div> 
    143146 
    144 <div id="sf_admin_content_pages"> 
     147<div id="sf_admin_content_pages_[?php echo $pk ?]"> 
    145148 
    146149</div> 
    147150 
    148 <div id="sf_admin_footer"> 
     151<div id="sf_admin_footer_[?php echo $pk ?]"> 
    149152[?php include_partial('edit_footer', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>)) ?] 
    150153</div>