Changeset 8934
- Timestamp:
- 05/14/08 01:30:09 (2 months ago)
- Files:
-
- plugins/sfExtjsThemePlugin/config/app.yml (modified) (1 diff)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_renderer.php (modified) (3 diffs)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_related_ajax_renderer.php (modified) (1 diff)
- plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/listAjaxGridPanelJsSuccess.pjs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfExtjsThemePlugin/config/app.yml
r8911 r8934 17 17 use_tinymce: false 18 18 19 # grid_open_link: window.open19 #open_panel: App.openPanel # a method which accepts the moduleName and the item's-key, if not defined, the url will open in a new window. 20 20 21 21 combo_box_class: ux.ComboBoxAutoLoad # form.ComboBox # todo: obsolete should only use xtypes! not new form.combobox... plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_renderer.php
r8714 r8934 69 69 $default_collapse = false; 70 70 //TODO remove hardcoded tag for underline, add option to set stylesheet-class, don't forget to remove the closing tag as well... 71 $headerText .= "<u><a href=\'".$controller->genUrl($h_moduleName."/edit?".$relatedTablePK->getName()."=")."/'+record.data['".$record_pkn."']+'\' id=\'".$h_moduleName."'+record.data['".$record_pkn."']+'\'>";71 $headerText .= "<u><a class=\'gridlink\' sf_ns:modulename=\'".$h_moduleName."\' sf_ns:key=\'record.data['".$record_pkn."']\' href=\'".$controller->genUrl($h_moduleName."/edit?".$relatedTablePK->getName()."=")."/'+record.data['".$record_pkn."']+'\'>"; 72 72 } 73 73 $headerText .= $h_valuePrefix."'+record.data['".str_replace('/', $tableDelimiter, $columnName)."']+'".$h_valueSuffix; … … 123 123 // a column with a value which is a link (to edit) 124 124 function renderLink(value, params, record, rowIndex, colIndex, store, attr){ 125 var begin = '<u><b><a ';125 var begin = '<u><b><a class=\'gridlink\' '; 126 126 127 127 if (typeof(attr)!=='undefined') … … 130 130 } 131 131 132 return begin+String.format(' key=\'{1}\' href=\'<?php echo $controller->genUrl($this->getModuleName().'/edit?'.$pkn.'=') ?>/{1}\'>{0}</a></b></u>', value, record.data['<?php echo $key ?>']);132 return begin+String.format('sf_ns:modulename=\'<?php echo $this->getModuleName() ?>\' sf_ns:key=\'{1}\' href=\'<?php echo $controller->genUrl($this->getModuleName().'/edit?'.$pkn.'=') ?>/{1}\'>{0}</a></b></u>', value, record.data['<?php echo $key ?>']); 133 133 } 134 134 plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_related_ajax_renderer.php
r8909 r8934 75 75 <?php if ($column->isLink()): ?> 76 76 <?php 77 $url = $controller->genUrl($h_moduleName."/edit?".$relatedTablePK->getName()."="). 78 '/"+record.data[\''.$record_pkn.'\']+"\' id=\''.$h_moduleName.'"+record.data[\''.$record_pkn.'\']+"'; 77 $url = $controller->genUrl($h_moduleName."/edit?".$relatedTablePK->getName()."=").'/"+record.data[\''.$record_pkn.'\']+"'; 79 78 ?> 80 result = "<u><b><a href='<?php echo $url ?>'>"+result+"</a></b></u>";79 result = "<u><b><a class='gridlink' sf_ns:modulename='<?php echo $h_moduleName ?>' sf_ns:key='"+record.data['<?php echo $record_pkn ?>']+"' href='<?php echo $url ?>'>"+result+"</a></b></u>"; 81 80 <?php endif ?> 82 81 return result; plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/listAjaxGridPanelJsSuccess.pjs
r8910 r8934 109 109 110 110 this.on('afteredit', this.updateDB, this, true); 111 112 <?php if (sfConfig::get('app_sf_extjs_theme_plugin_open_panel', null)): ?> 113 this.body.on({ 114 scope: this, 115 click: this.onLinkClick, 116 delegate: 'a.gridlink', 117 stopEvent: true 118 }); 119 <?php endif; ?> 111 120 "; 121 122 // openLink method 123 $sfExtjs2_<?php echo $panelName ?>_onLinkClick = " 124 var el = Ext.get(e.getTarget()); 125 var modulename = el.getAttributeNS('sf_ns','modulename'); 126 var key = el.getAttributeNS('sf_ns','key'); 127 128 <?php echo sfConfig::get('app_sf_extjs_theme_plugin_open_panel', 'NS.openPanelMethod') ?>(modulename, key); 129 "; 130 112 131 113 132 // app.sx from Symfony eXtended (instead of ux: user eXtention) … … 123 142 'initComponent' => $sfExtjs2Plugin->asMethod($sfExtjs2_<?php echo $panelName ?>_initComponent), 124 143 'initEvents' => $sfExtjs2Plugin->asMethod($sfExtjs2_<?php echo $panelName ?>_initEvents), 144 145 'onLinkClick' => $sfExtjs2Plugin->asMethod(array( 146 'parameters' => 'e, t', 147 'source' => $sfExtjs2_<?php echo $panelName ?>_onLinkClick 148 )), 125 149 ) 126 150 );