Skip to content

Instantly share code, notes, and snippets.

View khepin's full-sized avatar

Sebastien Armand khepin

  • San Francisco, USA
View GitHub Profile
$('#booking_end_date_jquery_control').datepicker(
'option',
'onSelect',
function(date) {
// keep the original symfony function to update day / month / year select boxes
wfd_booking_end_date_update_linked(date);
// our own stuff
alert('haha');
});
.routes_for_module_a:
design:
class: sfDoctrineRouteCollection
options:
model: Design
actions: [show]
.routes_for_module_b:
...
# You can find more information about this file on the symfony website:
# http://www.symfony-project.org/reference/1_4/en/10-Routing
<?php foreach(glob(dirname(__FILE__).'/routing/*.yml') as $filename):?>
<?php include($filename)?>
# Note that this empty line is important.
# If not present you have to make all your other
# routing files end with an empty line in order to prevent indentation errors
<?php endforeach?>
all:
...
request:
param:
formats:
xlsx: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
exceltest:
url: /a/test.:sf_format
param: { module: excel, action: index }
...
<Worksheet ss:Name="Sheet1">
<Table>
<Row>
<Cell><Data ss:Type="String">Name</Data></Cell>
<Cell><Data ss:Type="String">Company</Data></Cell>
<Cell><Data ss:Type="String">Phone</Data></Cell>
<Cell><Data ss:Type="String">Mobile</Data></Cell>
<Cell><Data ss:Type="String">Gender</Data></Cell>
<Cell><Data ss:Type="String">Duty</Data></Cell>
<?php
require_once dirname(__FILE__).'/../lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php';
sfCoreAutoload::register();
class ProjectConfiguration extends sfProjectConfiguration
{
public function setup()
{
$this->enablePlugins('sfDoctrinePlugin');
<?php
class MyExcel {
private static $format = '';
public static function setFormat(sfEvent $event) {
self::$format = $event['format'];
}
public static function setContent(sfEvent $event, $response) {
var lastFormId = 1;
function getBrandForm(){
$('a.get_ajax_form').click(function(){
// load the form for Brands. Call back to attach js to the form
$.get(url, function(data){
$('#brand_form_container').append(data.replace('%my_form_tag%', lastFormId);
lastFormId++;
})
.form_fields:
form_fields:
book:
- price
- name
- print_quality
user:
- name
- city