Skip to content

Daarii/sfJQueryFileUploadPlugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requirement

jquery-1.7.min.js, bootstrap.min.js, bootstrap.min.css

In apps/backend/config/view.yml

default:
  stylesheets:
    - bootstrap.css
    # other css files

  javascripts:
    - jquery-1.7.min.js
    - bootstrap.min.js
    # other js files

How to setup

In config/ProjectConfiguration.class.php

class ProjectConfiguration extends sfProjectConfiguration
{
  public function setup()
  {
    $this->enablePlugins('sfJQueryFileUploadPlugin');
    ...

In apps/backend/config/settings.yml

all:
  .settings:
    enabled_modules: [default, jQueryFileUpload, ...]

In apps/backend/config/routing.yml

jquery_file_upload_ajax:
  url:   /jquery-file-upload
  param: { module: jQueryFileUpload, action: uploadAjax }

How to use (demo)

In schema.yml

Demo:
  columns:
    pictures:
      type:     clob
    #other fields ...

In your form class

class DemoForm extends BaseDemoForm
{
    public function configure()
    {
        $this->setWidget('pictures', new sfWidgetFormJQueryFileUpload());
    }
}

If you use Admin Generator with sfTwitterBootstrapPlugin then it looks like:

Preview:

Preview

About

sfJQueryFileUploadPlugin is symfony integration of https://github.com/blueimp/jQuery-File-Upload

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published