Beispiel #1
0
                    Ext.Msg.alert('Invalid Data', 'Please correct form errors.')
                }
            }
        }
    ],
    //defaultType: 'textfield',
    items: [   
    <?php 
$columns = Cache::get('ext' . $model);
$iteration = 0;
foreach ($columns as $column) {
    if ($column->field == 'id') {
        continue;
    }
    if ($iteration) {
        echo ',';
    }
    $type = lext::getExtType($column->field);
    echo "{\n            fieldLabel: '" . lext::text($column->field) . "',\n            name: '{$column->field}',\n            xtype: '{$type}',\n            } ";
    $iteration++;
}
?>
    ]
});

});


</script>

Beispiel #2
0
<?php

lext::tree('Files');
Beispiel #3
0
<?php

lext::form('Files');
Beispiel #4
0
<?php

lext::form('Cars');
Beispiel #5
0
<?php

echo lext::grid('Movies');
Beispiel #6
0
 private function generateExtModel($columns, $model, $options)
 {
     $fields = '';
     $iteration = 0;
     foreach ($columns as $column) {
         if ($iteration > 0) {
             $fields .= ',';
             $fields .= "\n";
         }
         $fields .= self::s(8, $iteration != 0) . "{ name: '{$column->field}' , type: '" . lext::getExtType($column->type) . '\' }';
         $iteration++;
     }
     $handle = fopen(path('public') . 'js/EXTmodels/' . $model . '.js', "w");
     $content = str_replace(array('MODEL', 'FIELDS'), array($options['Model'], $fields), file_get_contents(Bundle::path('extjs') . '/tasks/templates/ExtModel.template.js'));
     fwrite($handle, $content);
     fclose($handle);
 }
Beispiel #7
0
<?php

echo lext::grid('Files');