Changeset 20350
- Timestamp:
- 07/20/09 17:33:24 (4 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfExtjsThemePlugin/branches/1_2/ExtjsGeneratorPlugin/lib/BaseExtjsGeneratorPluginActions.class.php
r20224 r20350 40 40 $result = json_encode($data); 41 41 42 $this->getRequest()->setRequestFormat('json'); 43 42 //TODO: figure out why I have to do this when the route should set the sf_format from the extension 43 $this->getResponse()->setHttpHeader('Content-Type', 'application/json'); 44 44 45 return $this->renderText($result); 45 46 } … … 77 78 } 78 79 sfConfig::set('sf_web_debug', false); 79 $this->getRequest()->setRequestFormat('json'); 80 //TODO: figure out why I have to do this when the route should set the sf_format from the extension 81 $this->getResponse()->setHttpHeader('Content-Type', 'application/json'); 80 82 return $this->renderText($json); 81 83 } plugins/sfExtjsThemePlugin/branches/1_2/ExtjsGeneratorPlugin/lib/ExtjsDbFinderAdminGenerator.class.php
r19079 r20350 73 73 if($column->isLink()) 74 74 { 75 $vars[] = '\'%%' . $matches[1][$i] . '%%\' => link_to(' . $this->getColumnListTag($column) . ', \'' . $this->getModuleName() . '/edit ?' . $this->getPrimaryKeyUrlParams() . ')';75 $vars[] = '\'%%' . $matches[1][$i] . '%%\' => link_to(' . $this->getColumnListTag($column) . ', \'' . $this->getModuleName() . '/edit.json?' . $this->getPrimaryKeyUrlParams() . ')'; 76 76 } 77 77 elseif($column->isPartial()) … … 236 236 ); 237 237 $httpProxy = array( 238 'url' => $this->generator->controller->genUrl($this->getModuleName() . '/list '), 'method' => 'POST'238 'url' => $this->generator->controller->genUrl($this->getModuleName() . '/list.json'), 'method' => 'POST' 239 239 ); 240 240 $options = array(); … … 1682 1682 { 1683 1683 $definition['xtype'] = 'filtertwincombobox'; 1684 $definition['url'] = $this->generator->controller->genUrl($this->getModuleName() . '/jsonCombo ');1684 $definition['url'] = $this->generator->controller->genUrl($this->getModuleName() . '/jsonCombo.json'); 1685 1685 $definition['valueField'] = $key; 1686 1686 $definition['hiddenName'] = $key; … … 1805 1805 $relatedFKColumn = $this->getColumnForFieldName($fields[0]); 1806 1806 $ffcolumn['xtype'] = 'foreignfieldcolumn'; 1807 $ffcolumn['url'] = $this->generator->controller->genUrl($this->getModuleName() . '/jsonAutocomplete ?class=' . $relatedTableName);1807 $ffcolumn['url'] = $this->generator->controller->genUrl($this->getModuleName() . '/jsonAutocomplete.json?class=' . $relatedTableName); 1808 1808 $ffcolumn['valueField'] = $this->getRelatedFieldName($relatedTablePK); 1809 1809 $ffcolumn['displayField'] = $this->getRelatedFieldName($column); … … 1874 1874 $ffcolumn['name'] = strtolower($tableName) . '[' . $relatedTableFKs . ']'; 1875 1875 $ffcolumn['xtype'] = 'comboboxautoload'; 1876 $ffcolumn['url'] = $this->generator->controller->genUrl($this->getModuleName() . '/jsonAutocomplete ?class=' . $relatedTableName);1876 $ffcolumn['url'] = $this->generator->controller->genUrl($this->getModuleName() . '/jsonAutocomplete.json?class=' . $relatedTableName); 1877 1877 $ffcolumn['valueField'] = $relatedTableFKs.$this->generator->tableDelimiter.$relatedTablePK->getName(); 1878 1878 $ffcolumn['displayField'] = $relatedTableFKs.$this->generator->tableDelimiter.$columnname;