Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/studioartcz/imageslave

Nette plugin: Form extension for upload picture (JPG, PNG, SVG, ..) with thumbnail preview & lightbox original. Front-end solution for thumbnails.
https://github.com/studioartcz/imageslave

administration forms nette-framework svg thumbnails upload-pictures

Last synced: 3 months ago
JSON representation

Nette plugin: Form extension for upload picture (JPG, PNG, SVG, ..) with thumbnail preview & lightbox original. Front-end solution for thumbnails.

Awesome Lists containing this project

README

        

# ImageSlave
Nette plugin: Form extension for upload picture (JPG, PNG, SVG, ..) with thumbnail preview & lightbox original. Front-end solution for thumbnails.

Example in form:

![Preview](https://raw.githubusercontent.com/studioartcz/imageslave/master/doc/images/preview.png)

## How install actual version

Add via composer to your project:

$ composer require studioartcz/imageslave @dev

Add to extensions in your config.neon (for advanced setup see [doc](doc/extension-setup.md))

extensions:
imageslave: App\Form\Control\ImageSlaveExtension

For lightbox preview download [client-side assets](client-side/) via bower:

$ cd {fill-your-path}/vendors/studioartcz/imageslave/
$ bower install

Add rules to Grunt - [example](docs/grunt-sample.md) and add your copied JS with files from [client-side](client-side/) folder.

## Using in Forms

Create form:

public function create()
{
$form = new Form();
$form->addImageSlave("picture", "Pretty picture");
$form->onSuccess[] = array($this, "processForm");
return $form;
}

Working with data:

public function processForm(Form $form, $values)
{
var_dump($values->picture);
}