Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hooman-mirghasemi/yii2-iviewer
php yii2 extention
https://github.com/hooman-mirghasemi/yii2-iviewer
iviewer php yii2-extension
Last synced: 22 days ago
JSON representation
php yii2 extention
- Host: GitHub
- URL: https://github.com/hooman-mirghasemi/yii2-iviewer
- Owner: hooman-mirghasemi
- Created: 2017-04-10T04:50:19.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-03T05:33:08.000Z (over 6 years ago)
- Last Synced: 2024-10-08T17:01:22.449Z (about 1 month ago)
- Topics: iviewer, php, yii2-extension
- Language: JavaScript
- Homepage:
- Size: 514 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
iviewer
=======
iviewer can use for zoom and rotate image, it is use iviewer jquery pluginInstallation
------------The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
Either run
```
php composer.phar require --prefer-dist hooman.mirghasemi/yii2-iviewer "*"
```or add
```
"hooman.mirghasemi/yii2-iviewer": "*"
```to the require section of your `composer.json` file.
Usage
-----
Note : you should load fontAsome in your project before use it.
Once the extension is installed, simply use it in your code by :```php
'#iviewer-content',
'loadingSelector'=>'#iv-loading',
'beforeIviewer'=>'$("#iviewer-content").html("");',
'imageSrc' => 'path to your image',
]);
?>
در حال بارگذاری تصویر
```Or you can use it as image gallery one or more in a page that open in a bootstrap modal with next and previwe buttons
like this:first config iviewer module in config of application
```php
'modules' => ['iviewer' => [
'class' => 'hoomanMirghasemi\iviewer\Module',
'loadingText' => 'loading ...',
],
],
```for use it in a view file write code like this:
```php
'iviewer-gallery-1',
'modalCloseText' => 'close',
]);
?>
'iviewer-gallery-2',
'modalCloseText' => 'close',
]);
?>
this is on html element between ivewer items
test one element
```
points:
be sure that selectorId and html element contains iviwer elements
are same. and use iviewer-gallery-item-holder and iviewer-gallery-item classes for
elements. data-target should be same with selectorId+"-modal". also
data-iviewer-src is a necessary field