Changeset 12003
- Timestamp:
- 10/06/08 21:54:27 (5 years ago)
- Files:
-
- plugins/sfExtjsThemePlugin/trunk/config/config.php (modified) (1 diff)
- plugins/sfExtjsThemePlugin/trunk/data/generator/sfPropelAdmin/extjs/template/actions/actions.class.php (modified) (4 diffs)
- plugins/sfExtjsThemePlugin/trunk/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_columnmodel_variable_cmConfig_js.php (modified) (2 diffs)
- plugins/sfExtjsThemePlugin/trunk/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_gridpanel_js.php (modified) (1 diff)
- plugins/sfExtjsThemePlugin/trunk/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_rowactions_js.php (added)
- plugins/sfExtjsThemePlugin/trunk/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_rowactions_method_constructor_js.php (added)
- plugins/sfExtjsThemePlugin/trunk/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_rowactions_method_initComponent_js.php (added)
- plugins/sfExtjsThemePlugin/trunk/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_rowactions_variable_rowActionsConfig_js.php (added)
- plugins/sfExtjsThemePlugin/trunk/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_toolbar_top_variable_ttbConfig_js.php (modified) (1 diff)
- plugins/sfExtjsThemePlugin/trunk/data/generator/sfPropelAdmin/extjs/template/templates/listAjaxRowActionsJsSuccess.pjs (added)
- plugins/sfExtjsThemePlugin/trunk/lib/sfExtjsPropelAdminGenerator.php (modified) (1 diff)
- plugins/sfExtjsThemePlugin/trunk/modules/sfExtjsThemePluginXtypeManager/lib/BasesfExtjsThemePluginXtypeManagerActions.class.php (modified) (1 diff)
- plugins/sfExtjsThemePlugin/trunk/web/css/symfony-extjs.css (modified) (1 diff)
- plugins/sfExtjsThemePlugin/trunk/web/js/Ext.ux.grid.ActionColumn.js (added)
- plugins/sfExtjsThemePlugin/trunk/web/js/Ext.ux.grid.RowAction.js (added)
- plugins/sfExtjsThemePlugin/trunk/web/js/Ext.ux.grid.RowActions.js (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfExtjsThemePlugin/trunk/config/config.php
r11979 r12003 51 51 '/sfExtjsThemePlugin/js/Ext.ux.BoxButton.js', // changes button to extend BoxComponent so that it can properly be used in forms 52 52 '/sfExtjsThemePlugin/js/Ext.ux.ValidationStatus.js', 53 '/sfExtjsThemePlugin/js/Ext.ux.grid.RowActions.js', 53 54 54 55 '/sfExtjsThemePlugin/js/Ext.ux.grid.ForeignFieldColumn.js', // grid-column which knows how to handle data from related- les (sets renderers, and combos) plugins/sfExtjsThemePlugin/trunk/data/generator/sfPropelAdmin/extjs/template/actions/actions.class.php
r11859 r12003 858 858 ?> 859 859 <?php $columnName = strtoupper($cname); ?> 860 <?php if (($column->key == '*') || ($c name=='')) continue ?>860 <?php if (($column->key == '*') || ($column->key == '^expander') || ($column->key == '^rowactions') || ($cname=='')) continue ?> 861 861 <?php $type = $column->getCreoleType() ?> 862 862 <?php … … 916 916 ?> 917 917 <?php $columnName = strtoupper($cname); ?> 918 <?php if (($column->key == '*') || ($c name=='')) continue ?>918 <?php if (($column->key == '*') || ($column->key == '^expander') || ($column->key == '^rowactions') ||($cname=='')) continue ?> 919 919 <?php $type = $column->getCreoleType() ?> 920 920 <?php … … 1115 1115 } 1116 1116 1117 public function executeListAjaxRowActionsJs() 1118 { 1119 1120 } 1117 1121 1118 1122 public function executeRelatedAjaxEditors() … … 1245 1249 1246 1250 foreach ($columns as $columnName => $column) : 1247 if ($column->key == '*' ) continue;1251 if ($column->key == '*' || $column->key == '^expander' || $column->key == '^rowactions') continue; 1248 1252 if (in_array($column->key, $hs)) continue; 1249 1253 if ($column->isPartial()) continue; //partials will not end up in json-data plugins/sfExtjsThemePlugin/trunk/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_columnmodel_variable_cmConfig_js.php
r11595 r12003 32 32 } 33 33 34 //captures the * in the list.display and sets the rowexpander at that position 35 if ($column->key == '*') 34 //captures the *expander in the list.display and sets the rowexpander at that position 35 //new syntax is *expander, need to obsolete plain * 36 if ($column->key == '*'||$column->key == '^expander') 36 37 { 37 38 $cmItems[] = "{xtype: 'rowexpander'}"; 39 $i++; 40 continue; 41 } 42 43 //captures the *expander in the list.display and sets the rowexpander at that position 44 //new syntax is *expander, need to obsolete plain * 45 if ($column->key == '^rowactions') 46 { 47 $pluginArrName = strtolower($moduleName).'_rowactions'; 48 $plugins[$pluginArrName] = array('xtype' => 'list'.strtolower($moduleName).'rowactions'); 49 //set the column item to our generated plugin 50 $cmItems[] = 'this.'.$pluginArrName; 38 51 $i++; 39 52 continue; … … 67 80 } 68 81 //set the column item to our generated plugin 69 $cmItems[] = 'this.'.$pluginArrName 70 ; 82 $cmItems[] = 'this.'.$pluginArrName; 71 83 $i++; 72 84 continue; plugins/sfExtjsThemePlugin/trunk/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_gridpanel_js.php
r11931 r12003 33 33 { 34 34 if($this->getParameterValue('list.fields.'.$col.'.plugin')) $pluginArr[] = 'this.cm.'.$col.'_'.$this->getParameterValue('list.fields.'.$col.'.plugin'); 35 if($col == '^rowactions') $pluginArr[] = 'this.cm.'.strtolower($moduleName).'_rowactions'; 35 36 } 36 37 } 38 37 39 ?> 38 40 [?php plugins/sfExtjsThemePlugin/trunk/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_toolbar_top_variable_ttbConfig_js.php
r11595 r12003 1 1 <?php 2 $moduleName = ucfirst(sfInflector::camelize($this->getModuleName()));3 $toolbarName = "List".$moduleName."ToolbarTop";4 5 2 $listActions = $this->getParameterValue('list.actions'); 6 3 if (null === $listActions) plugins/sfExtjsThemePlugin/trunk/lib/sfExtjsPropelAdminGenerator.php
r11945 r12003 115 115 } 116 116 117 function getAjaxRowAction($actionName, $params) 118 { 119 $params = (array) $params; 120 $options = isset($params['params']) ? sfToolkit::stringToArray($params['params']) : array(); 121 sfLoader::loadHelpers('Partial'); 122 $default_callback = 'this.'.$actionName; 123 $callback = false; 124 $default_icon = 'page_white'; 125 $default_qtip = $actionName; 126 // default values 127 if ($actionName[0] == '_') 128 { 129 $actionName = substr($actionName, 1); 130 $default_name = ucfirst(strtr($actionName, '_', ' ')); 131 $default_action = $actionName; 132 switch ($actionName) 133 { 134 case 'delete': 135 $default_icon = 'cross'; 136 $callback = "console.log(this)"; 137 $default_qtip = ucfirst($actionName); 138 break; 139 } 140 } 141 $icon = isset($params['icon']) ? sfToolkit::replaceConstants($params['icon']) : $default_icon; 142 $qtip = isset($params['qtip']) ? $params['qtip'] : $default_qtip; 143 $callback = (!$callback)?"\$sfExtjs2Plugin->asVar('".$default_callback."')":'$sfExtjs2Plugin->asMethod("'.$callback.'")'; 144 $callback = isset($params['callback']) ? '$sfExtjs2Plugin->asMethod("'.$params['callback'].'")' : $callback; 145 $jsOptions = " 146 'qtip' => '$qtip', 147 'iconCls' => \$sfExtjs2Plugin->asVar(\"Ext.ux.IconMgr.getIcon('".$icon."')\"), 148 'cb' => $callback 149 "; 150 151 return $jsOptions; 152 153 } 117 154 /** 118 155 * Returns javascript code for an action button in the toolbar new (config)style (with sfExtjs2Plugin usage). plugins/sfExtjsThemePlugin/trunk/modules/sfExtjsThemePluginXtypeManager/lib/BasesfExtjsThemePluginXtypeManagerActions.class.php
r10892 r12003 30 30 $action = 'listAjaxTabPanelJs'; 31 31 } 32 else if (substr($xtype,-10) == 'rowactions') 33 { 34 $module = substr($xtype,4,-10); 35 $action = 'listAjaxRowActionsJs'; 36 } 32 37 33 38 if ($module) $url = 'js/'.$module.'/'.$action.'.pjs'; plugins/sfExtjsThemePlugin/trunk/web/css/symfony-extjs.css
r11803 r12003 122 122 text-decoration: underline; 123 123 } 124 125 .ux-row-action-cell .x-grid3-cell-inner { 126 padding: 1px 0 0 0; 127 } 128 129 .ux-row-action-item { 130 float: left; 131 min-width: 16px; 132 height: 16px; 133 background-repeat: no-repeat; 134 margin: 0 5px 0 0; 135 cursor: pointer; 136 overflow: hidden; 137 } 138 139 .ext-ie .ux-row-action-item { 140 width: 16px; 141 } 142 143 .ext-ie .ux-row-action-text { 144 width: auto; 145 } 146 147 .ux-row-action-item span { 148 vertical-align: middle; 149 padding: 0 0 0 20px; 150 line-height: 18px; 151 } 152 153 .ext-ie .ux-row-action-item span { 154 width: auto; 155 } 156 157 /* styles for groups */ 158 .x-grid-group-hd div { 159 position: relative; 160 height: 16px; 161 } 162 163 .ux-grow-action-item { 164 min-width: 16px; 165 height: 16px; 166 background-repeat: no-repeat; 167 background-position: 0 50% ! important; 168 margin: 0 0 0 4px; 169 padding: 0 ! important; 170 cursor: pointer; 171 float: left; 172 } 173 174 .ext-ie .ux-grow-action-item { 175 width: 16px; 176 } 177 178 .ux-action-right { 179 float: right; 180 margin: 0 3px 0 2px; 181 padding: 0 ! important; 182 } 183 184 .ux-grow-action-text { 185 padding: 0 ! important; 186 margin: 0 ! important; 187 background: transparent none ! important; 188 float: left; 189 }