Commit d72093ee21d0909c1c93ada68073d65e6fc265a3

Authored by Alexey Boroda
1 parent 4f663c88

-Gallery ready

backend/web/js/galleryWidget.js
... ... @@ -32,7 +32,7 @@ $(
32 32 .on(
33 33 'click', '#add-image', function(e) {
34 34 var hash = Math.floor(Math.random() * 89999) + 10000;
35   - var content = '<div class="col-md-4 gw-item"><input id="' + hash + '" class="gw-image-input" name ="images" ' + 'data-img="' + hash + '_img" data-name="' + hash + '_name" type ="hidden"> ' + '<img id="' + hash + '_img" class="img-rounded" src="/admin/product/create" alt="">' + '<p id="' + hash + '_name" class="text-info"></p>' + '<button type="button" class="open-modal-imagemanager" data-aspect-ratio="" data-crop-view-mode="1" ' + 'data-input-id="' + hash + '"><i class="fa fa-folder-open"></i></button><button type="button" class="remove-img">' + '<i class="fa fa-trash"></i></button></div>';
  35 + var content = '<div class="col-md-4 gw-item"><input id="' + hash + '" class="gw-image-input" name ="images[' + hash + ']" ' + 'data-img="' + hash + '_img" data-name="' + hash + '_name" type ="hidden"> ' + '<img id="' + hash + '_img" class="img-rounded" src="/admin/product/create" alt="">' + '<p id="' + hash + '_name" class="text-info"></p>' + '<button type="button" class="open-modal-imagemanager btn btn-primary" data-aspect-ratio="" data-crop-view-mode="1" ' + 'data-input-id="' + hash + '"><i class="fa fa-folder-open"></i></button><button type="button" class="remove-img btn btn-danger">' + '<i class="fa fa-trash"></i></button></div>';
36 36 $('.gw-container')
37 37 .append(content);
38 38 // if (document.querySelectorAll(".gw-container > .gw-item").length % 3 === 0) {
... ...
composer.json
... ... @@ -30,7 +30,8 @@
30 30 "bower-asset/amcharts-stock": "@dev",
31 31 "speixoto/yii2-amcharts": "^0.1.1",
32 32 "2amigos/yii2-tinymce-widget": "~1.1",
33   - "kartik-v/yii2-widget-select2": "@dev"
  33 + "kartik-v/yii2-widget-select2": "@dev",
  34 + "phpoffice/phpexcel": "^1.8"
34 35 },
35 36 "require-dev": {
36 37 "yiisoft/yii2-debug": "~2.0.0",
... ...
composer.lock
... ... @@ -4,8 +4,8 @@
4 4 "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
5 5 "This file is @generated automatically"
6 6 ],
7   - "hash": "5b092c236d38f0a67965dd93a4417ac8",
8   - "content-hash": "25d3d8f8c01378ef1793a93fc78d65e7",
  7 + "hash": "faab32dd593e809e5ef4b627bfa057a9",
  8 + "content-hash": "910eed691b9ef35e3c8362d0df0af174",
9 9 "packages": [
10 10 {
11 11 "name": "2amigos/yii2-tinymce-widget",
... ... @@ -1607,6 +1607,63 @@
1607 1607 "time": "2016-11-29 18:17:37"
1608 1608 },
1609 1609 {
  1610 + "name": "phpoffice/phpexcel",
  1611 + "version": "1.8.1",
  1612 + "source": {
  1613 + "type": "git",
  1614 + "url": "https://github.com/PHPOffice/PHPExcel.git",
  1615 + "reference": "372c7cbb695a6f6f1e62649381aeaa37e7e70b32"
  1616 + },
  1617 + "dist": {
  1618 + "type": "zip",
  1619 + "url": "https://api.github.com/repos/PHPOffice/PHPExcel/zipball/372c7cbb695a6f6f1e62649381aeaa37e7e70b32",
  1620 + "reference": "372c7cbb695a6f6f1e62649381aeaa37e7e70b32",
  1621 + "shasum": ""
  1622 + },
  1623 + "require": {
  1624 + "ext-xml": "*",
  1625 + "ext-xmlwriter": "*",
  1626 + "php": ">=5.2.0"
  1627 + },
  1628 + "type": "library",
  1629 + "autoload": {
  1630 + "psr-0": {
  1631 + "PHPExcel": "Classes/"
  1632 + }
  1633 + },
  1634 + "notification-url": "https://packagist.org/downloads/",
  1635 + "license": [
  1636 + "LGPL"
  1637 + ],
  1638 + "authors": [
  1639 + {
  1640 + "name": "Maarten Balliauw",
  1641 + "homepage": "http://blog.maartenballiauw.be"
  1642 + },
  1643 + {
  1644 + "name": "Mark Baker"
  1645 + },
  1646 + {
  1647 + "name": "Franck Lefevre",
  1648 + "homepage": "http://blog.rootslabs.net"
  1649 + },
  1650 + {
  1651 + "name": "Erik Tilt"
  1652 + }
  1653 + ],
  1654 + "description": "PHPExcel - OpenXML - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine",
  1655 + "homepage": "http://phpexcel.codeplex.com",
  1656 + "keywords": [
  1657 + "OpenXML",
  1658 + "excel",
  1659 + "php",
  1660 + "spreadsheet",
  1661 + "xls",
  1662 + "xlsx"
  1663 + ],
  1664 + "time": "2015-05-01 07:00:55"
  1665 + },
  1666 + {
1610 1667 "name": "phpseclib/phpseclib",
1611 1668 "version": "2.0.4",
1612 1669 "source": {
... ...