Browse Source

Mettre en place une map sur la page d'accueil pour présenter les boulangeries partenaires.

Ajouter le dossier "vendor" à GIT
prodstable
keun 8 years ago
parent
commit
1737537122
100 changed files with 7716 additions and 1084 deletions
  1. +0
    -0
      backend/web/.htaccess~
  2. +0
    -1
      composer.json
  3. +265
    -215
      composer.lock
  4. +8
    -7
      frontend/controllers/SiteController.php
  5. +1
    -1
      frontend/views/layouts/main.php
  6. +2
    -2
      frontend/views/site/index.php
  7. +0
    -0
      frontend/web/.htaccess~
  8. BIN
      frontend/web/.sass-cache/e1a48ee3204d3a535cdbe440c2995954a615ac19/screen.scssc
  9. +69
    -63
      frontend/web/css/screen.css
  10. +1
    -1
      frontend/web/js/lechatdesnoisettes.js
  11. +13
    -4
      frontend/web/sass/screen.scss
  12. +4
    -4
      vendor/2amigos/yii2-chartjs-widget/README.md
  13. +2
    -2
      vendor/2amigos/yii2-chartjs-widget/composer.json
  14. +13
    -7
      vendor/2amigos/yii2-chartjs-widget/src/ChartJs.php
  15. +7
    -7
      vendor/2amigos/yii2-chartjs-widget/src/ChartJsAsset.php
  16. +32
    -0
      vendor/2amigos/yii2-leaflet-extension/CONTRIBUTING.md
  17. +28
    -0
      vendor/2amigos/yii2-leaflet-extension/LICENSE.md
  18. +115
    -0
      vendor/2amigos/yii2-leaflet-extension/README.md
  19. +48
    -0
      vendor/2amigos/yii2-leaflet-extension/composer.json
  20. +393
    -0
      vendor/2amigos/yii2-leaflet-extension/src/LeafLet.php
  21. +46
    -0
      vendor/2amigos/yii2-leaflet-extension/src/LeafLetAsset.php
  22. +118
    -0
      vendor/2amigos/yii2-leaflet-extension/src/Plugin.php
  23. +85
    -0
      vendor/2amigos/yii2-leaflet-extension/src/PluginManager.php
  24. +87
    -0
      vendor/2amigos/yii2-leaflet-extension/src/controls/Control.php
  25. +134
    -0
      vendor/2amigos/yii2-leaflet-extension/src/controls/Layers.php
  26. +41
    -0
      vendor/2amigos/yii2-leaflet-extension/src/controls/Zoom.php
  27. +54
    -0
      vendor/2amigos/yii2-leaflet-extension/src/layers/Circle.php
  28. +44
    -0
      vendor/2amigos/yii2-leaflet-extension/src/layers/CircleMarker.php
  29. +91
    -0
      vendor/2amigos/yii2-leaflet-extension/src/layers/FeatureGroup.php
  30. +54
    -0
      vendor/2amigos/yii2-leaflet-extension/src/layers/GeoJson.php
  31. +72
    -0
      vendor/2amigos/yii2-leaflet-extension/src/layers/ImageOverlay.php
  32. +33
    -0
      vendor/2amigos/yii2-leaflet-extension/src/layers/LatLngTrait.php
  33. +86
    -0
      vendor/2amigos/yii2-leaflet-extension/src/layers/Layer.php
  34. +131
    -0
      vendor/2amigos/yii2-leaflet-extension/src/layers/LayerGroup.php
  35. +80
    -0
      vendor/2amigos/yii2-leaflet-extension/src/layers/Marker.php
  36. +45
    -0
      vendor/2amigos/yii2-leaflet-extension/src/layers/NameTrait.php
  37. +113
    -0
      vendor/2amigos/yii2-leaflet-extension/src/layers/PolyLine.php
  38. +53
    -0
      vendor/2amigos/yii2-leaflet-extension/src/layers/Polygon.php
  39. +63
    -0
      vendor/2amigos/yii2-leaflet-extension/src/layers/Popup.php
  40. +45
    -0
      vendor/2amigos/yii2-leaflet-extension/src/layers/PopupTrait.php
  41. +70
    -0
      vendor/2amigos/yii2-leaflet-extension/src/layers/Rectangle.php
  42. +77
    -0
      vendor/2amigos/yii2-leaflet-extension/src/layers/TileLayer.php
  43. +26
    -0
      vendor/2amigos/yii2-leaflet-extension/src/types/ArrayableInterface.php
  44. +110
    -0
      vendor/2amigos/yii2-leaflet-extension/src/types/Bounds.php
  45. +130
    -0
      vendor/2amigos/yii2-leaflet-extension/src/types/DivIcon.php
  46. +217
    -0
      vendor/2amigos/yii2-leaflet-extension/src/types/Icon.php
  47. +81
    -0
      vendor/2amigos/yii2-leaflet-extension/src/types/LatLng.php
  48. +151
    -0
      vendor/2amigos/yii2-leaflet-extension/src/types/LatLngBounds.php
  49. +76
    -0
      vendor/2amigos/yii2-leaflet-extension/src/types/Point.php
  50. +25
    -0
      vendor/2amigos/yii2-leaflet-extension/src/types/Type.php
  51. +116
    -0
      vendor/2amigos/yii2-leaflet-extension/src/widgets/Map.php
  52. +1
    -0
      vendor/bin/markdown
  53. +1
    -0
      vendor/bin/yii
  54. +5
    -0
      vendor/bower/bootstrap/CHANGELOG.md
  55. +6
    -0
      vendor/bower/bootstrap/Gemfile
  56. +43
    -0
      vendor/bower/bootstrap/Gemfile.lock
  57. +78
    -76
      vendor/bower/bootstrap/Gruntfile.js
  58. +22
    -0
      vendor/bower/bootstrap/ISSUE_TEMPLATE.md
  59. +1
    -1
      vendor/bower/bootstrap/LICENSE
  60. +50
    -40
      vendor/bower/bootstrap/README.md
  61. +4
    -8
      vendor/bower/bootstrap/bower.json
  62. +126
    -15
      vendor/bower/bootstrap/dist/css/bootstrap-theme.css
  63. +1
    -1
      vendor/bower/bootstrap/dist/css/bootstrap-theme.css.map
  64. +4
    -3
      vendor/bower/bootstrap/dist/css/bootstrap-theme.min.css
  65. +1
    -0
      vendor/bower/bootstrap/dist/css/bootstrap-theme.min.css.map
  66. +353
    -162
      vendor/bower/bootstrap/dist/css/bootstrap.css
  67. +1
    -1
      vendor/bower/bootstrap/dist/css/bootstrap.css.map
  68. +4
    -3
      vendor/bower/bootstrap/dist/css/bootstrap.min.css
  69. +1
    -0
      vendor/bower/bootstrap/dist/css/bootstrap.min.css.map
  70. +266
    -195
      vendor/bower/bootstrap/dist/js/bootstrap.js
  71. +5
    -5
      vendor/bower/bootstrap/dist/js/bootstrap.min.js
  72. +9
    -2
      vendor/bower/bootstrap/grunt/bs-commonjs-generator.js
  73. +4
    -3
      vendor/bower/bootstrap/grunt/bs-glyphicons-data-generator.js
  74. +8
    -9
      vendor/bower/bootstrap/grunt/bs-lessdoc-parser.js
  75. +6
    -8
      vendor/bower/bootstrap/grunt/bs-raw-files-generator.js
  76. +109
    -0
      vendor/bower/bootstrap/grunt/change-version.js
  77. +5
    -4
      vendor/bower/bootstrap/grunt/configBridge.json
  78. +2679
    -0
      vendor/bower/bootstrap/grunt/npm-shrinkwrap.json
  79. +2
    -2
      vendor/bower/bootstrap/grunt/sauce_browsers.yml
  80. +6
    -6
      vendor/bower/bootstrap/js/affix.js
  81. +4
    -4
      vendor/bower/bootstrap/js/alert.js
  82. +23
    -14
      vendor/bower/bootstrap/js/button.js
  83. +7
    -7
      vendor/bower/bootstrap/js/carousel.js
  84. +9
    -8
      vendor/bower/bootstrap/js/collapse.js
  85. +49
    -45
      vendor/bower/bootstrap/js/dropdown.js
  86. +48
    -33
      vendor/bower/bootstrap/js/modal.js
  87. +4
    -9
      vendor/bower/bootstrap/js/popover.js
  88. +18
    -21
      vendor/bower/bootstrap/js/scrollspy.js
  89. +7
    -5
      vendor/bower/bootstrap/js/tab.js
  90. +84
    -36
      vendor/bower/bootstrap/js/tooltip.js
  91. +2
    -2
      vendor/bower/bootstrap/js/transition.js
  92. +2
    -2
      vendor/bower/bootstrap/less/alerts.less
  93. +7
    -6
      vendor/bower/bootstrap/less/badges.less
  94. +6
    -0
      vendor/bower/bootstrap/less/bootstrap.less
  95. +4
    -3
      vendor/bower/bootstrap/less/button-groups.less
  96. +11
    -5
      vendor/bower/bootstrap/less/buttons.less
  97. +9
    -8
      vendor/bower/bootstrap/less/carousel.less
  98. +1
    -2
      vendor/bower/bootstrap/less/component-animations.less
  99. +4
    -2
      vendor/bower/bootstrap/less/dropdowns.less
  100. +61
    -14
      vendor/bower/bootstrap/less/forms.less

vendor/bower/jquery/src/sizzle/test/data/empty.js → backend/web/.htaccess~ View File


+ 0
- 1
composer.json View File

"yiisoft/yii2": "*", "yiisoft/yii2": "*",
"yiisoft/yii2-bootstrap": "*", "yiisoft/yii2-bootstrap": "*",
"yiisoft/yii2-swiftmailer": "*", "yiisoft/yii2-swiftmailer": "*",
"fxp/composer-asset-plugin": "dev-master",
"2amigos/yii2-chartjs-widget": "~2.0.0", "2amigos/yii2-chartjs-widget": "~2.0.0",
"2amigos/yii2-leaflet-extension" : "*" "2amigos/yii2-leaflet-extension" : "*"
}, },

+ 265
- 215
composer.lock View File

"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"hash": "9ac6fd89ba06838267dc2a76575ab5fd",
"content-hash": "f851f7ba9d097dd52e2c1711e9627d15",
"hash": "60af2f259c01d843983ec6c8dc54c6d0",
"content-hash": "6c00361804798cb6dd632972211c3e5e",
"packages": [ "packages": [
{ {
"name": "2amigos/yii2-chartjs-widget", "name": "2amigos/yii2-chartjs-widget",
"version": "2.0.0",
"version": "2.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/2amigos/yii2-chartjs-widget.git", "url": "https://github.com/2amigos/yii2-chartjs-widget.git",
"reference": "6637e1559cb4b365fcc3966e1776a67f03ba6c2a"
"reference": "9e9c55212f80870820739a3b6e5deea88789876a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/2amigos/yii2-chartjs-widget/zipball/6637e1559cb4b365fcc3966e1776a67f03ba6c2a",
"reference": "6637e1559cb4b365fcc3966e1776a67f03ba6c2a",
"url": "https://api.github.com/repos/2amigos/yii2-chartjs-widget/zipball/9e9c55212f80870820739a3b6e5deea88789876a",
"reference": "9e9c55212f80870820739a3b6e5deea88789876a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"bower-asset/chartjs": "1.0.2",
"bower-asset/chartjs": "2.1.6",
"yiisoft/yii2": "*" "yiisoft/yii2": "*"
}, },
"require-dev": { "require-dev": {
"yii 2", "yii 2",
"yii2" "yii2"
], ],
"time": "2015-03-18 13:16:41"
"time": "2016-07-09 19:09:35"
},
{
"name": "2amigos/yii2-leaflet-extension",
"version": "1.0.2",
"source": {
"type": "git",
"url": "https://github.com/2amigos/yii2-leaflet-extension.git",
"reference": "05ac1496b0b7a5c7bdeec110a02f0e36d0a91e88"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/2amigos/yii2-leaflet-extension/zipball/05ac1496b0b7a5c7bdeec110a02f0e36d0a91e88",
"reference": "05ac1496b0b7a5c7bdeec110a02f0e36d0a91e88",
"shasum": ""
},
"require": {
"bower-asset/leaflet": "0.7.*@stable",
"yiisoft/yii2": "~2.0.0"
},
"require-dev": {
"phpunit/phpunit": "4.*"
},
"type": "yii2-extension",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
},
"asset-installer-paths": {
"bower-asset-library": "vendor/bower"
}
},
"autoload": {
"psr-4": {
"dosamigos\\leaflet\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "2amigOS! Consulting Group",
"email": "hola@2amigos.us",
"homepage": "http://2amigos.us",
"role": "Developer"
}
],
"description": "LeafLet Mobile-Friendly Interactive Maps Extension Library for Yii2.",
"homepage": "http://yiiwheels.com/extension/leaflet-extension-library",
"keywords": [
"2amigos",
"extension",
"leaflet",
"maps",
"widget",
"yii",
"yii2"
],
"time": "2016-02-05 23:47:38"
}, },
{ {
"name": "bower-asset/bootstrap", "name": "bower-asset/bootstrap",
"version": "v3.3.2",
"version": "v3.3.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/twbs/bootstrap.git", "url": "https://github.com/twbs/bootstrap.git",
"reference": "bcf7dd38b5ab180256e2e4fb5da0369551b3f082"
"reference": "0b9c4a4007c44201dce9a6cc1a38407005c26c86"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/twbs/bootstrap/zipball/bcf7dd38b5ab180256e2e4fb5da0369551b3f082",
"reference": "bcf7dd38b5ab180256e2e4fb5da0369551b3f082",
"url": "https://api.github.com/repos/twbs/bootstrap/zipball/0b9c4a4007c44201dce9a6cc1a38407005c26c86",
"reference": "0b9c4a4007c44201dce9a6cc1a38407005c26c86",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"bower-asset/jquery": ">=1.9.1"
"bower-asset/jquery": ">=1.9.1,<=3"
}, },
"type": "bower-asset-library", "type": "bower-asset-library",
"extra": { "extra": {
"bower-asset-main": [ "bower-asset-main": [
"less/bootstrap.less", "less/bootstrap.less",
"dist/css/bootstrap.css",
"dist/js/bootstrap.js",
"dist/fonts/glyphicons-halflings-regular.eot",
"dist/fonts/glyphicons-halflings-regular.svg",
"dist/fonts/glyphicons-halflings-regular.ttf",
"dist/fonts/glyphicons-halflings-regular.woff"
"dist/js/bootstrap.js"
], ],
"bower-asset-ignore": [ "bower-asset-ignore": [
"/.*", "/.*",
"test-infra" "test-infra"
] ]
}, },
"license": [
"MIT"
],
"description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
"keywords": [ "keywords": [
"css", "css",
}, },
{ {
"name": "bower-asset/chartjs", "name": "bower-asset/chartjs",
"version": "v1.0.2",
"version": "v2.1.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nnnick/Chart.js.git",
"reference": "930b16a0af59201dcfcd1594b0e7540db4d04c9f"
"url": "https://github.com/chartjs/Chart.js.git",
"reference": "07662b158d829f395b2c97d732e60599b8b5c4e4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nnnick/Chart.js/zipball/930b16a0af59201dcfcd1594b0e7540db4d04c9f",
"reference": "930b16a0af59201dcfcd1594b0e7540db4d04c9f",
"url": "https://api.github.com/repos/chartjs/Chart.js/zipball/07662b158d829f395b2c97d732e60599b8b5c4e4",
"reference": "07662b158d829f395b2c97d732e60599b8b5c4e4",
"shasum": "" "shasum": ""
}, },
"require-dev": {
"bower-asset/jquery": "~2.1.4"
},
"type": "bower-asset-library", "type": "bower-asset-library",
"extra": { "extra": {
"bower-asset-main": [ "bower-asset-main": [
"Chart.js"
"dist/Chart.js"
] ]
}, },
"license": [
"MIT"
],
"description": "Simple HTML5 Charts using the canvas element" "description": "Simple HTML5 Charts using the canvas element"
}, },
{ {
"name": "bower-asset/jquery", "name": "bower-asset/jquery",
"version": "2.1.3",
"version": "2.2.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/jquery/jquery.git",
"reference": "8f2a9d9272d6ed7f32d3a484740ab342c02541e0"
"url": "https://github.com/jquery/jquery-dist.git",
"reference": "c0185ab7c75aab88762c5aae780b9d83b80eda72"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/jquery/jquery/zipball/8f2a9d9272d6ed7f32d3a484740ab342c02541e0",
"reference": "8f2a9d9272d6ed7f32d3a484740ab342c02541e0",
"url": "https://api.github.com/repos/jquery/jquery-dist/zipball/c0185ab7c75aab88762c5aae780b9d83b80eda72",
"reference": "c0185ab7c75aab88762c5aae780b9d83b80eda72",
"shasum": "" "shasum": ""
}, },
"require-dev": {
"bower-asset/qunit": "1.14.0",
"bower-asset/requirejs": "2.1.10",
"bower-asset/sinon": "1.8.1",
"bower-asset/sizzle": "2.1.1-patch2"
},
"type": "bower-asset-library", "type": "bower-asset-library",
"extra": { "extra": {
"bower-asset-main": "dist/jquery.js", "bower-asset-main": "dist/jquery.js",
"bower-asset-ignore": [ "bower-asset-ignore": [
"**/.*",
"build",
"speed",
"test",
"*.md",
"AUTHORS.txt",
"Gruntfile.js",
"package.json" "package.json"
] ]
}, },
"MIT" "MIT"
], ],
"keywords": [ "keywords": [
"browser",
"javascript", "javascript",
"jquery", "jquery",
"library" "library"
}, },
{ {
"name": "bower-asset/jquery.inputmask", "name": "bower-asset/jquery.inputmask",
"version": "3.1.61",
"version": "3.2.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/RobinHerbots/jquery.inputmask.git",
"reference": "f2c086411d2557fc485c47afb3cecfa6c1de9ee2"
"url": "https://github.com/RobinHerbots/Inputmask.git",
"reference": "5a72c563b502b8e05958a524cdfffafe9987be38"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/RobinHerbots/jquery.inputmask/zipball/f2c086411d2557fc485c47afb3cecfa6c1de9ee2",
"reference": "f2c086411d2557fc485c47afb3cecfa6c1de9ee2",
"url": "https://api.github.com/repos/RobinHerbots/Inputmask/zipball/5a72c563b502b8e05958a524cdfffafe9987be38",
"reference": "5a72c563b502b8e05958a524cdfffafe9987be38",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"type": "bower-asset-library", "type": "bower-asset-library",
"extra": { "extra": {
"bower-asset-main": [ "bower-asset-main": [
"./dist/inputmask/jquery.inputmask.js",
"./dist/inputmask/jquery.inputmask.extensions.js",
"./dist/inputmask/jquery.inputmask.date.extensions.js",
"./dist/inputmask/jquery.inputmask.numeric.extensions.js",
"./dist/inputmask/jquery.inputmask.phone.extensions.js",
"./dist/inputmask/jquery.inputmask.regex.extensions.js"
"./dist/inputmask/inputmask.js"
], ],
"bower-asset-ignore": [ "bower-asset-ignore": [
"**/.*",
"qunit/",
"nuget/",
"tools/",
"js/",
"*.md",
"build.properties",
"build.xml",
"jquery.inputmask.jquery.json"
"**/*",
"!dist/*",
"!dist/inputmask/*",
"!dist/min/*",
"!dist/min/inputmask/*",
"!extra/bindings/*",
"!extra/dependencyLibs/*",
"!extra/phone-codes/*"
] ]
}, },
"license": [ "license": [
"plugins" "plugins"
] ]
}, },
{
"name": "bower-asset/leaflet",
"version": "v0.7.7",
"source": {
"type": "git",
"url": "https://github.com/Leaflet/Leaflet.git",
"reference": "197f9d43b7bbc73c0492bf62cd666a5a98038098"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Leaflet/Leaflet/zipball/197f9d43b7bbc73c0492bf62cd666a5a98038098",
"reference": "197f9d43b7bbc73c0492bf62cd666a5a98038098",
"shasum": ""
},
"type": "bower-asset-library",
"extra": {
"bower-asset-main": [
"dist/leaflet.css",
"dist/leaflet-src.js",
"dist/images/layers-2x.png",
"dist/images/layers.png",
"dist/images/marker-icon-2x.png",
"dist/images/marker-icon.png",
"dist/images/marker-shadow.png"
],
"bower-asset-ignore": [
".*",
"CHANGELOG.json",
"FAQ.md",
"debug",
"spec",
"src",
"build"
]
},
"description": "JavaScript library for mobile-friendly interactive maps"
},
{ {
"name": "bower-asset/punycode", "name": "bower-asset/punycode",
"version": "v1.3.2", "version": "v1.3.2",
}, },
{ {
"name": "bower-asset/yii2-pjax", "name": "bower-asset/yii2-pjax",
"version": "v2.0.2",
"version": "v2.0.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/yiisoft/jquery-pjax.git", "url": "https://github.com/yiisoft/jquery-pjax.git",
"reference": "fb92be865c0fd6583714475cb7d629020749d73f"
"reference": "60728da6ade5879e807a49ce59ef9a72039b8978"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/yiisoft/jquery-pjax/zipball/fb92be865c0fd6583714475cb7d629020749d73f",
"reference": "fb92be865c0fd6583714475cb7d629020749d73f",
"url": "https://api.github.com/repos/yiisoft/jquery-pjax/zipball/60728da6ade5879e807a49ce59ef9a72039b8978",
"reference": "60728da6ade5879e807a49ce59ef9a72039b8978",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
".travis.yml", ".travis.yml",
"Gemfile", "Gemfile",
"Gemfile.lock", "Gemfile.lock",
"CONTRIBUTING.md",
"vendor/", "vendor/",
"script/", "script/",
"test/" "test/"
] ]
}
},
"license": [
"MIT"
]
}, },
{ {
"name": "cebe/markdown", "name": "cebe/markdown",
"version": "1.0.1",
"version": "1.1.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/cebe/markdown.git", "url": "https://github.com/cebe/markdown.git",
"reference": "9d6c36d6623497523ed421a31d940bc1d7435578"
"reference": "c30eb5e01fe021cc5bba2f9ee0eeef96d4931166"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/cebe/markdown/zipball/9d6c36d6623497523ed421a31d940bc1d7435578",
"reference": "9d6c36d6623497523ed421a31d940bc1d7435578",
"url": "https://api.github.com/repos/cebe/markdown/zipball/c30eb5e01fe021cc5bba2f9ee0eeef96d4931166",
"reference": "c30eb5e01fe021cc5bba2f9ee0eeef96d4931166",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"require-dev": { "require-dev": {
"cebe/indent": "*", "cebe/indent": "*",
"facebook/xhprof": "*@dev", "facebook/xhprof": "*@dev",
"phpunit/phpunit": "3.7.*"
"phpunit/phpunit": "4.1.*"
}, },
"bin": [ "bin": [
"bin/markdown" "bin/markdown"
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.0.x-dev"
"dev-master": "1.1.x-dev"
} }
}, },
"autoload": { "autoload": {
"markdown", "markdown",
"markdown-extra" "markdown-extra"
], ],
"time": "2014-10-25 16:16:49"
"time": "2016-09-14 20:40:20"
}, },
{ {
"name": "ezyang/htmlpurifier", "name": "ezyang/htmlpurifier",
"version": "v4.6.0",
"version": "v4.8.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/ezyang/htmlpurifier.git", "url": "https://github.com/ezyang/htmlpurifier.git",
"reference": "6f389f0f25b90d0b495308efcfa073981177f0fd"
"reference": "d0c392f77d2f2a3dcf7fcb79e2a1e2b8804e75b2"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/6f389f0f25b90d0b495308efcfa073981177f0fd",
"reference": "6f389f0f25b90d0b495308efcfa073981177f0fd",
"url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/d0c392f77d2f2a3dcf7fcb79e2a1e2b8804e75b2",
"reference": "d0c392f77d2f2a3dcf7fcb79e2a1e2b8804e75b2",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"keywords": [ "keywords": [
"html" "html"
], ],
"time": "2013-11-30 08:25:19"
},
{
"name": "fxp/composer-asset-plugin",
"version": "v1.1.1",
"source": {
"type": "git",
"url": "https://github.com/francoispluchino/composer-asset-plugin.git",
"reference": "daca454b94539a4e6d30937dfc6b817eceb03f28"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/francoispluchino/composer-asset-plugin/zipball/daca454b94539a4e6d30937dfc6b817eceb03f28",
"reference": "daca454b94539a4e6d30937dfc6b817eceb03f28",
"shasum": ""
},
"require": {
"composer-plugin-api": "^1.0",
"php": ">=5.3.3"
},
"require-dev": {
"composer/composer": "~1.0@dev"
},
"type": "composer-plugin",
"extra": {
"class": "Fxp\\Composer\\AssetPlugin\\FxpAssetPlugin",
"branch-alias": {
"dev-master": "1.1-dev"
}
},
"autoload": {
"psr-4": {
"Fxp\\Composer\\AssetPlugin\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "François Pluchino",
"email": "francois.pluchino@gmail.com"
}
],
"description": "NPM/Bower Dependency Manager for Composer",
"homepage": "https://github.com/francoispluchino/composer-asset-plugin",
"keywords": [
"asset",
"bower",
"composer",
"dependency manager",
"nodejs",
"npm",
"package"
],
"time": "2015-11-20 14:58:24"
"time": "2016-07-16 12:58:58"
}, },
{ {
"name": "swiftmailer/swiftmailer", "name": "swiftmailer/swiftmailer",
"version": "v5.3.1",
"version": "v5.4.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/swiftmailer/swiftmailer.git", "url": "https://github.com/swiftmailer/swiftmailer.git",
"reference": "c5f963e7f9d6f6438fda4f22d5cc2db296ec621a"
"reference": "4cc92842069c2bbc1f28daaaf1d2576ec4dfe153"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/c5f963e7f9d6f6438fda4f22d5cc2db296ec621a",
"reference": "c5f963e7f9d6f6438fda4f22d5cc2db296ec621a",
"url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/4cc92842069c2bbc1f28daaaf1d2576ec4dfe153",
"reference": "4cc92842069c2bbc1f28daaaf1d2576ec4dfe153",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "5.3-dev"
"dev-master": "5.4-dev"
} }
}, },
"autoload": { "autoload": {
"description": "Swiftmailer, free feature-rich PHP mailer", "description": "Swiftmailer, free feature-rich PHP mailer",
"homepage": "http://swiftmailer.org", "homepage": "http://swiftmailer.org",
"keywords": [ "keywords": [
"email",
"mail", "mail",
"mailer" "mailer"
], ],
"time": "2014-12-05 14:17:14"
"time": "2016-07-08 11:51:25"
}, },
{ {
"name": "yiisoft/yii2", "name": "yiisoft/yii2",
"version": "2.0.3",
"version": "2.0.9",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/yiisoft/yii2-framework.git", "url": "https://github.com/yiisoft/yii2-framework.git",
"reference": "85b773a384f3894d558905cb13522bb338c99dba"
"reference": "2b75151ea60e1fd820046416eee2e89c3dda1133"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/yiisoft/yii2-framework/zipball/85b773a384f3894d558905cb13522bb338c99dba",
"reference": "85b773a384f3894d558905cb13522bb338c99dba",
"url": "https://api.github.com/repos/yiisoft/yii2-framework/zipball/2b75151ea60e1fd820046416eee2e89c3dda1133",
"reference": "2b75151ea60e1fd820046416eee2e89c3dda1133",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"bower-asset/jquery": "2.1.*@stable | 1.11.*@stable",
"bower-asset/jquery.inputmask": "3.1.*",
"bower-asset/jquery": "2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable",
"bower-asset/jquery.inputmask": "~3.2.2",
"bower-asset/punycode": "1.3.*", "bower-asset/punycode": "1.3.*",
"bower-asset/yii2-pjax": ">=2.0.1",
"cebe/markdown": "~1.0.0",
"bower-asset/yii2-pjax": "~2.0.1",
"cebe/markdown": "~1.0.0 | ~1.1.0",
"ext-ctype": "*",
"ext-mbstring": "*", "ext-mbstring": "*",
"ezyang/htmlpurifier": "4.6.*",
"ezyang/htmlpurifier": "~4.6",
"lib-pcre": "*", "lib-pcre": "*",
"php": ">=5.4.0", "php": ">=5.4.0",
"yiisoft/yii2-composer": "*"
"yiisoft/yii2-composer": "~2.0.4"
}, },
"bin": [ "bin": [
"yii" "yii"
"name": "Paul Klimov", "name": "Paul Klimov",
"email": "klimov.paul@gmail.com", "email": "klimov.paul@gmail.com",
"role": "Core framework development" "role": "Core framework development"
},
{
"name": "Dmitry Naumenko",
"email": "d.naumenko.a@gmail.com",
"role": "Core framework development"
} }
], ],
"description": "Yii PHP Framework Version 2", "description": "Yii PHP Framework Version 2",
"framework", "framework",
"yii2" "yii2"
], ],
"time": "2015-03-01 06:22:44"
"time": "2016-07-11 13:36:42"
}, },
{ {
"name": "yiisoft/yii2-bootstrap", "name": "yiisoft/yii2-bootstrap",
"version": "2.0.3",
"version": "2.0.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/yiisoft/yii2-bootstrap.git", "url": "https://github.com/yiisoft/yii2-bootstrap.git",
"reference": "d4bd9c5f97ea891ebbfaf276d3083d85e27fbcb6"
"reference": "3fd2b8c950cce79d60e9702d6bcb24eb3c80f6c5"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/yiisoft/yii2-bootstrap/zipball/d4bd9c5f97ea891ebbfaf276d3083d85e27fbcb6",
"reference": "d4bd9c5f97ea891ebbfaf276d3083d85e27fbcb6",
"url": "https://api.github.com/repos/yiisoft/yii2-bootstrap/zipball/3fd2b8c950cce79d60e9702d6bcb24eb3c80f6c5",
"reference": "3fd2b8c950cce79d60e9702d6bcb24eb3c80f6c5",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"bower-asset/bootstrap": "3.3.* | 3.2.* | 3.1.*", "bower-asset/bootstrap": "3.3.* | 3.2.* | 3.1.*",
"yiisoft/yii2": "*"
"yiisoft/yii2": ">=2.0.6"
}, },
"type": "yii2-extension", "type": "yii2-extension",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.0.x-dev" "dev-master": "2.0.x-dev"
},
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
} }
}, },
"autoload": { "autoload": {
"bootstrap", "bootstrap",
"yii2" "yii2"
], ],
"time": "2015-03-01 06:22:44"
"time": "2016-03-17 03:29:28"
}, },
{ {
"name": "yiisoft/yii2-composer", "name": "yiisoft/yii2-composer",
"version": "2.0.3",
"version": "2.0.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/yiisoft/yii2-composer.git", "url": "https://github.com/yiisoft/yii2-composer.git",
"reference": "ca8d23707ae47d20b0454e4b135c156f6da6d7be"
"reference": "7452fd908a5023b8bb5ea1b123a174ca080de464"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/yiisoft/yii2-composer/zipball/ca8d23707ae47d20b0454e4b135c156f6da6d7be",
"reference": "ca8d23707ae47d20b0454e4b135c156f6da6d7be",
"url": "https://api.github.com/repos/yiisoft/yii2-composer/zipball/7452fd908a5023b8bb5ea1b123a174ca080de464",
"reference": "7452fd908a5023b8bb5ea1b123a174ca080de464",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"composer-plugin-api": "1.0.0"
"composer-plugin-api": "^1.0"
}, },
"type": "composer-plugin", "type": "composer-plugin",
"extra": { "extra": {
"extension installer", "extension installer",
"yii2" "yii2"
], ],
"time": "2015-03-01 06:22:44"
"time": "2016-02-06 00:49:24"
}, },
{ {
"name": "yiisoft/yii2-swiftmailer", "name": "yiisoft/yii2-swiftmailer",
"version": "2.0.3",
"version": "2.0.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/yiisoft/yii2-swiftmailer.git", "url": "https://github.com/yiisoft/yii2-swiftmailer.git",
"reference": "cb5f0a70d871b409bef7333fc3e0d262fb57eb5c"
"reference": "26b900767f1031ff3a4668dfa36c10595875f0a5"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/yiisoft/yii2-swiftmailer/zipball/cb5f0a70d871b409bef7333fc3e0d262fb57eb5c",
"reference": "cb5f0a70d871b409bef7333fc3e0d262fb57eb5c",
"url": "https://api.github.com/repos/yiisoft/yii2-swiftmailer/zipball/26b900767f1031ff3a4668dfa36c10595875f0a5",
"reference": "26b900767f1031ff3a4668dfa36c10595875f0a5",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"swiftmailer/swiftmailer": "*",
"yiisoft/yii2": "*"
"swiftmailer/swiftmailer": "~5.0",
"yiisoft/yii2": "~2.0.4"
}, },
"type": "yii2-extension", "type": "yii2-extension",
"extra": { "extra": {
"swiftmailer", "swiftmailer",
"yii2" "yii2"
], ],
"time": "2015-03-01 06:22:44"
"time": "2016-09-09 11:48:11"
} }
], ],
"packages-dev": [ "packages-dev": [
{ {
"name": "bower-asset/typeahead.js", "name": "bower-asset/typeahead.js",
"version": "v0.10.5",
"version": "v0.11.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/twitter/typeahead.js.git", "url": "https://github.com/twitter/typeahead.js.git",
"reference": "5f198b87d1af845da502ea9df93a5e84801ce742"
"reference": "588440f66559714280628a4f9799f0c4eb880a4a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/twitter/typeahead.js/zipball/5f198b87d1af845da502ea9df93a5e84801ce742",
"reference": "5f198b87d1af845da502ea9df93a5e84801ce742",
"url": "https://api.github.com/repos/twitter/typeahead.js/zipball/588440f66559714280628a4f9799f0c4eb880a4a",
"reference": "588440f66559714280628a4f9799f0c4eb880a4a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"bower-asset/jquery": ">=1.7" "bower-asset/jquery": ">=1.7"
}, },
"require-dev": { "require-dev": {
"bower-asset/jasmine-ajax": ">=1.3.1,<1.4",
"bower-asset/jasmine-jquery": ">=1.5.2,<1.6",
"bower-asset/jquery": ">=1.7,<1.8"
"bower-asset/jasmine-ajax": "~1.3.1",
"bower-asset/jasmine-jquery": "~1.5.2",
"bower-asset/jquery": "~1.7"
}, },
"type": "bower-asset-library", "type": "bower-asset-library",
"extra": { "extra": {
}, },
{ {
"name": "fzaninotto/faker", "name": "fzaninotto/faker",
"version": "v1.4.0",
"version": "v1.6.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/fzaninotto/Faker.git", "url": "https://github.com/fzaninotto/Faker.git",
"reference": "010c7efedd88bf31141a02719f51fb44c732d5a0"
"reference": "44f9a286a04b80c76a4e5fb7aad8bb539b920123"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/fzaninotto/Faker/zipball/010c7efedd88bf31141a02719f51fb44c732d5a0",
"reference": "010c7efedd88bf31141a02719f51fb44c732d5a0",
"url": "https://api.github.com/repos/fzaninotto/Faker/zipball/44f9a286a04b80c76a4e5fb7aad8bb539b920123",
"reference": "44f9a286a04b80c76a4e5fb7aad8bb539b920123",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3"
"php": "^5.3.3|^7.0"
}, },
"require-dev": { "require-dev": {
"ext-intl": "*",
"phpunit/phpunit": "~4.0", "phpunit/phpunit": "~4.0",
"squizlabs/php_codesniffer": "~1.5" "squizlabs/php_codesniffer": "~1.5"
}, },
"branch-alias": [] "branch-alias": []
}, },
"autoload": { "autoload": {
"psr-0": {
"Faker": "src/",
"Faker\\PHPUnit": "test/"
"psr-4": {
"Faker\\": "src/Faker/"
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"faker", "faker",
"fixtures" "fixtures"
], ],
"time": "2014-06-04 14:43:02"
"time": "2016-04-29 12:21:54"
}, },
{ {
"name": "phpspec/php-diff", "name": "phpspec/php-diff",
"version": "v1.0.2",
"version": "v1.1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpspec/php-diff.git", "url": "https://github.com/phpspec/php-diff.git",
"reference": "30e103d19519fe678ae64a60d77884ef3d71b28a"
"reference": "0464787bfa7cd13576c5a1e318709768798bec6a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpspec/php-diff/zipball/30e103d19519fe678ae64a60d77884ef3d71b28a",
"reference": "30e103d19519fe678ae64a60d77884ef3d71b28a",
"url": "https://api.github.com/repos/phpspec/php-diff/zipball/0464787bfa7cd13576c5a1e318709768798bec6a",
"reference": "0464787bfa7cd13576c5a1e318709768798bec6a",
"shasum": "" "shasum": ""
}, },
"type": "library", "type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": { "autoload": {
"psr-0": { "psr-0": {
"Diff": "lib/" "Diff": "lib/"
"authors": [ "authors": [
{ {
"name": "Chris Boulton", "name": "Chris Boulton",
"homepage": "http://github.com/chrisboulton",
"role": "Original developer"
"homepage": "http://github.com/chrisboulton"
} }
], ],
"description": "A comprehensive library for generating differences between two hashable objects (strings or arrays).", "description": "A comprehensive library for generating differences between two hashable objects (strings or arrays).",
"time": "2013-11-01 13:02:21"
"time": "2016-04-07 12:29:16"
}, },
{ {
"name": "yiisoft/yii2-codeception", "name": "yiisoft/yii2-codeception",
"version": "2.0.3",
"version": "2.0.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/yiisoft/yii2-codeception.git", "url": "https://github.com/yiisoft/yii2-codeception.git",
"reference": "c2fdee4e7e9846e141ceddeb4386325e921e375a"
"reference": "c916a36d09fc128b05a374e7922bc56854334d56"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/yiisoft/yii2-codeception/zipball/c2fdee4e7e9846e141ceddeb4386325e921e375a",
"reference": "c2fdee4e7e9846e141ceddeb4386325e921e375a",
"url": "https://api.github.com/repos/yiisoft/yii2-codeception/zipball/c916a36d09fc128b05a374e7922bc56854334d56",
"reference": "c916a36d09fc128b05a374e7922bc56854334d56",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"yiisoft/yii2": "*"
"yiisoft/yii2": ">=2.0.4"
}, },
"type": "yii2-extension", "type": "yii2-extension",
"extra": { "extra": {
"codeception", "codeception",
"yii2" "yii2"
], ],
"time": "2015-03-01 06:22:44"
"time": "2016-03-17 03:41:26"
}, },
{ {
"name": "yiisoft/yii2-debug", "name": "yiisoft/yii2-debug",
"version": "2.0.3",
"version": "2.0.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/yiisoft/yii2-debug.git", "url": "https://github.com/yiisoft/yii2-debug.git",
"reference": "8a0db5130a9ea3941304dd77cef23d69257e8d48"
"reference": "55ed2e853ed8050a34415f63a4da84f88a56f895"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/yiisoft/yii2-debug/zipball/8a0db5130a9ea3941304dd77cef23d69257e8d48",
"reference": "8a0db5130a9ea3941304dd77cef23d69257e8d48",
"url": "https://api.github.com/repos/yiisoft/yii2-debug/zipball/55ed2e853ed8050a34415f63a4da84f88a56f895",
"reference": "55ed2e853ed8050a34415f63a4da84f88a56f895",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"yiisoft/yii2": "*",
"yiisoft/yii2": ">=2.0.4",
"yiisoft/yii2-bootstrap": "*" "yiisoft/yii2-bootstrap": "*"
}, },
"type": "yii2-extension", "type": "yii2-extension",
"debugger", "debugger",
"yii2" "yii2"
], ],
"time": "2015-03-01 06:22:44"
"time": "2016-03-17 03:50:19"
}, },
{ {
"name": "yiisoft/yii2-faker", "name": "yiisoft/yii2-faker",
}, },
{ {
"name": "yiisoft/yii2-gii", "name": "yiisoft/yii2-gii",
"version": "2.0.3",
"version": "2.0.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/yiisoft/yii2-gii.git", "url": "https://github.com/yiisoft/yii2-gii.git",
"reference": "bb79aeafa8e3b89dd25e07ac895b269680e537a8"
"reference": "1bd6df6804ca077ec022587905a0d43eb286f507"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/yiisoft/yii2-gii/zipball/bb79aeafa8e3b89dd25e07ac895b269680e537a8",
"reference": "bb79aeafa8e3b89dd25e07ac895b269680e537a8",
"url": "https://api.github.com/repos/yiisoft/yii2-gii/zipball/1bd6df6804ca077ec022587905a0d43eb286f507",
"reference": "1bd6df6804ca077ec022587905a0d43eb286f507",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"bower-asset/typeahead.js": "0.10.*",
"bower-asset/typeahead.js": "0.10.* | ~0.11.0",
"phpspec/php-diff": ">=1.0.2", "phpspec/php-diff": ">=1.0.2",
"yiisoft/yii2": "*",
"yiisoft/yii2-bootstrap": "*"
"yiisoft/yii2": ">=2.0.4",
"yiisoft/yii2-bootstrap": "~2.0"
}, },
"type": "yii2-extension", "type": "yii2-extension",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "2.0.x-dev" "dev-master": "2.0.x-dev"
},
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
} }
}, },
"autoload": { "autoload": {
"gii", "gii",
"yii2" "yii2"
], ],
"time": "2015-03-01 06:22:44"
"time": "2016-03-18 14:09:46"
} }
], ],
"aliases": [], "aliases": [],

+ 8
- 7
frontend/controllers/SiteController.php View File

use yii\web\Controller; use yii\web\Controller;
use yii\filters\VerbFilter; use yii\filters\VerbFilter;
use yii\filters\AccessControl; use yii\filters\AccessControl;
use yii\helpers\Html;


use dosamigos\leaflet\types\LatLng; use dosamigos\leaflet\types\LatLng;
use dosamigos\leaflet\layers\Marker; use dosamigos\leaflet\layers\Marker;
} }
// map // map
/*$center = new dosamigos\leaflet\types\LatLng(['lat' => $resource->address->lat, 'lng' => $resource->address->lon]);
$center = new LatLng(['lat' => '46,9991224', 'lng' => '6,0582595']);
$tileLayer = new TileLayer([ $tileLayer = new TileLayer([
'map' => 'test',
'map' => 'test1',
'urlTemplate' => 'http://{s}.tile.osm.org/{z}/{x}/{y}.png', 'urlTemplate' => 'http://{s}.tile.osm.org/{z}/{x}/{y}.png',
'clientOptions' => [ 'clientOptions' => [
'attribution' => 'Tiles Courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> ' . 'attribution' => 'Tiles Courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> ' .
]); ]);
$map = new LeafLet([ $map = new LeafLet([
'tileLayer' => $tileLayer, 'tileLayer' => $tileLayer,
'center' => $center,
'center' => $center
]); ]);
$point = new LatLng(['lat' => $resource->address->lat, 'lng' => $resource->address->lon]);
$marker = new Marker(['latLng' => $point, 'popupContent' => Html::encode($resource->name)]);
$map->addLayer($marker);*/
$point = new LatLng(['lat' => '46,9991224', 'lng' => '6,0582595']);
$marker = new Marker(['latLng' => $point, 'popupContent' => Html::encode('Le Chat des Noisettes')]);
$map->addLayer($marker);
return $this->render('index',[ return $this->render('index',[
'page_principale'=>true, 'page_principale'=>true,
'produits' => $produits, 'produits' => $produits,
'model' => $model, 'model' => $model,
//('map' => $map
'map' => $map
]); ]);
} }

+ 1
- 1
frontend/views/layouts/main.php View File

<header id="header"> <header id="header">
<div class="container"> <div class="container">
<a id="link-home" href="<?= Yii::$app->urlManager->createUrl('site/index') ; ?>"> <a id="link-home" href="<?= Yii::$app->urlManager->createUrl('site/index') ; ?>">
<img class="icon" src="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/img/laboulange.png" alt="" /><br />
<img class="icon" src="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/img/laboulange.png" alt="" />
La boulange La boulange
</a> </a>
<nav class=""> <nav class="">

+ 2
- 2
frontend/views/site/index.php View File

</div> </div>
<div class="row"> <div class="row">
<!--<h2>Boulangeries partenaires</h2>-->
<h1>Boulangeries partenaires</h1>
<?php <?php
//echo Map::widget(['leafLet' => $map,]);
echo Map::widget(['leafLet' => $map,'height' => 400]);
?> ?>
</div> </div>

+ 0
- 0
frontend/web/.htaccess~ View File


BIN
frontend/web/.sass-cache/e1a48ee3204d3a535cdbe440c2995954a615ac19/screen.scssc View File


+ 69
- 63
frontend/web/css/screen.css View File

-moz-box-shadow: 0px 0px 3px gray; -moz-box-shadow: 0px 0px 3px gray;
-webkit-box-shadow: 0px 0px 3px gray; -webkit-box-shadow: 0px 0px 3px gray;
box-shadow: 0px 0px 3px gray; box-shadow: 0px 0px 3px gray;
height: 86px;
} }
/* line 114, ../sass/screen.scss */
/* line 115, ../sass/screen.scss */
#header .container { #header .container {
position: relative; position: relative;
} }
/* line 119, ../sass/screen.scss */
/* line 120, ../sass/screen.scss */
#header #link-home { #header #link-home {
position: fixed;
z-index: 1000;
text-align: center;
/*position: fixed ;
z-index: 1000 ;
text-align: center ;
position: absolute ;
top: 0px ;
left: 0px ;
padding: 10px ;
background-color: white ;
@include box-shadow(0px 0px 5px black) ;
@include border-radius(0px 0px 8px 8px) ;
*/
position: absolute; position: absolute;
top: 0px;
top: 10px;
left: 0px; left: 0px;
padding: 10px;
text-decoration: none; text-decoration: none;
background-color: white;
-moz-box-shadow: 0px 0px 5px black;
-webkit-box-shadow: 0px 0px 5px black;
box-shadow: 0px 0px 5px black;
-moz-border-radius: 0px 0px 8px 8px;
-webkit-border-radius: 0px;
border-radius: 0px 0px 8px 8px;
font-size: 18px;
font-size: 22px;
} }
/* line 133, ../sass/screen.scss */
/* line 140, ../sass/screen.scss */
#header #link-home img { #header #link-home img {
width: 90px;
height: 60px;
margin-bottom: 5px; margin-bottom: 5px;
} }
/* line 139, ../sass/screen.scss */
/* line 146, ../sass/screen.scss */
#header #link-espace-boulanger { #header #link-espace-boulanger {
border-left: solid 1px #e0e0e0; border-left: solid 1px #e0e0e0;
} }
/* line 144, ../sass/screen.scss */
/* line 150, ../sass/screen.scss */
#header nav {
padding-top: 22px;
}
/* line 152, ../sass/screen.scss */
#header nav ul { #header nav ul {
float: right; float: right;
} }
/* line 147, ../sass/screen.scss */
/* line 155, ../sass/screen.scss */
#header nav ul li a { #header nav ul li a {
text-decoration: none; text-decoration: none;
} }
/* line 150, ../sass/screen.scss */
/* line 159, ../sass/screen.scss */
#header nav ul li a.active { #header nav ul li a.active {
background-color: #eee; background-color: #eee;
} }
/* line 159, ../sass/screen.scss */
/* line 168, ../sass/screen.scss */
#header #link-logout .nom { #header #link-logout .nom {
font-size: 10px; font-size: 10px;
/*position: relative ; /*position: relative ;
top: -3px ;*/ top: -3px ;*/
} }


/* line 168, ../sass/screen.scss */
/* line 177, ../sass/screen.scss */
#main { #main {
padding: 0px; padding: 0px;
} }


/* line 178, ../sass/screen.scss */
/* line 187, ../sass/screen.scss */
#content { #content {
position: relative; position: relative;
padding: 20px 0px; padding: 20px 0px;
padding-top: 35px; padding-top: 35px;
min-height: 500px; min-height: 500px;
} }
/* line 186, ../sass/screen.scss */
/* line 195, ../sass/screen.scss */
#content #description img { #content #description img {
width: 100%; width: 100%;
} }
/* line 191, ../sass/screen.scss */
/* line 200, ../sass/screen.scss */
#content #main-img { #content #main-img {
max-width: 100%; max-width: 100%;
border: solid 1px #e0e0e0; border: solid 1px #e0e0e0;
-webkit-border-radius: 5px; -webkit-border-radius: 5px;
border-radius: 5px; border-radius: 5px;
} }
/* line 198, ../sass/screen.scss */
/* line 207, ../sass/screen.scss */
#content #row-presentation { #content #row-presentation {
text-align: center; text-align: center;
} }
/* line 202, ../sass/screen.scss */
/* line 211, ../sass/screen.scss */
#content #row-signup { #content #row-signup {
text-align: center; text-align: center;
margin-top: 20px; margin-top: 20px;
} }
/* line 207, ../sass/screen.scss */
/* line 216, ../sass/screen.scss */
#content #row-clients-boulanger { #content #row-clients-boulanger {
margin-bottom: 50px; margin-bottom: 50px;
} }
/* line 209, ../sass/screen.scss */
/* line 218, ../sass/screen.scss */
#content #row-clients-boulanger h2 { #content #row-clients-boulanger h2 {
text-align: center; text-align: center;
margin-bottom: 15px; margin-bottom: 15px;
padding-bottom: 0px; padding-bottom: 0px;
} }
/* line 213, ../sass/screen.scss */
/* line 222, ../sass/screen.scss */
#content #row-clients-boulanger h2 img { #content #row-clients-boulanger h2 img {
height: 70px; height: 70px;
margin-bottom: 60px; margin-bottom: 60px;
} }
/* line 219, ../sass/screen.scss */
/* line 228, ../sass/screen.scss */
#content #row-clients-boulanger ul { #content #row-clients-boulanger ul {
text-align: center; text-align: center;
} }
/* line 221, ../sass/screen.scss */
/* line 230, ../sass/screen.scss */
#content #row-clients-boulanger ul li { #content #row-clients-boulanger ul li {
list-style-type: none; list-style-type: none;
} }
/* line 226, ../sass/screen.scss */
/* line 235, ../sass/screen.scss */
#content #row-clients-boulanger #clients { #content #row-clients-boulanger #clients {
border-right: dotted 1px gray; border-right: dotted 1px gray;
} }
/* line 231, ../sass/screen.scss */
/* line 240, ../sass/screen.scss */
#content .item { #content .item {
position: relative; position: relative;
min-height: 250px; min-height: 250px;
} }
/* line 235, ../sass/screen.scss */
/* line 244, ../sass/screen.scss */
#content .item .container { #content .item .container {
padding: 20px; padding: 20px;
position: relative; position: relative;
} }
/* line 240, ../sass/screen.scss */
/* line 249, ../sass/screen.scss */
#content .item .separateur { #content .item .separateur {
width: 600px; width: 600px;
border-top: 1px solid #e0e0e0; border-top: 1px solid #e0e0e0;
padding-top: 20px; padding-top: 20px;
margin-top: 20px; margin-top: 20px;
} }
/* line 248, ../sass/screen.scss */
/* line 257, ../sass/screen.scss */
#content .item h2 { #content .item h2 {
color: black; color: black;
padding-bottom: 30px; padding-bottom: 30px;
position: relative; position: relative;
margin-top: 30px; margin-top: 30px;
} }
/* line 260, ../sass/screen.scss */
/* line 269, ../sass/screen.scss */
#content .item h3 { #content .item h3 {
color: black; color: black;
font-family: "comfortaalight"; font-family: "comfortaalight";
font-size: 20px; font-size: 20px;
padding-bottom: 12px; padding-bottom: 12px;
} }
/* line 267, ../sass/screen.scss */
/* line 276, ../sass/screen.scss */
#content .item .icon { #content .item .icon {
position: absolute; position: absolute;
} }


/* line 276, ../sass/screen.scss */
/* line 285, ../sass/screen.scss */
#content #contact { #content #contact {
display: none; display: none;
} }
/* line 280, ../sass/screen.scss */
/* line 289, ../sass/screen.scss */
#content #contact .icon { #content #contact .icon {
width: 55px; width: 55px;
top: -15px; top: -15px;
margin-left: -70px; margin-left: -70px;
} }
/* line 289, ../sass/screen.scss */
/* line 298, ../sass/screen.scss */
#content #contact .form-control:focus { #content #contact .form-control:focus {
/*@include box-shadow(0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px $jaune) ; /*@include box-shadow(0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px $jaune) ;
border-color: $jaune ;*/ border-color: $jaune ;*/
} }
/* line 294, ../sass/screen.scss */
/* line 303, ../sass/screen.scss */
#content #contact .form-group { #content #contact .form-group {
text-align: center; text-align: center;
} }
/* line 298, ../sass/screen.scss */
/* line 307, ../sass/screen.scss */
#content #contact .img-right { #content #contact .img-right {
float: right; float: right;
} }
/* line 301, ../sass/screen.scss */
/* line 310, ../sass/screen.scss */
#content #contact .img-right img { #content #contact .img-right img {
width: 300px; width: 300px;
} }


/* line 308, ../sass/screen.scss */
/* line 317, ../sass/screen.scss */
.form-control:focus { .form-control:focus {
/*@include box-shadow(0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px $jaune) ; /*@include box-shadow(0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px $jaune) ;
border-color: $jaune ;*/ border-color: $jaune ;*/
} }


/* line 313, ../sass/screen.scss */
/* line 322, ../sass/screen.scss */
#footer { #footer {
height: 50px; height: 50px;
background-color: white; background-color: white;
padding-bottom: 60px; padding-bottom: 60px;
position: relative; position: relative;
} }
/* line 325, ../sass/screen.scss */
/* line 334, ../sass/screen.scss */
#footer a { #footer a {
color: #7e7e7e; color: #7e7e7e;
text-transform: uppercase; text-transform: uppercase;
text-decoration: none; text-decoration: none;
} }
/* line 330, ../sass/screen.scss */
/* line 339, ../sass/screen.scss */
#footer a:hover { #footer a:hover {
color: black; color: black;
} }


/* line 336, ../sass/screen.scss */
/* line 345, ../sass/screen.scss */
#content #mentions { #content #mentions {
padding-top: 20px; padding-top: 20px;
} }
/* line 339, ../sass/screen.scss */
/* line 348, ../sass/screen.scss */
#content #mentions div.content { #content #mentions div.content {
width: 60%; width: 60%;
font-size: 90%; font-size: 90%;
} }
/* line 344, ../sass/screen.scss */
/* line 353, ../sass/screen.scss */
#content #mentions p { #content #mentions p {
padding-bottom: 15px; padding-bottom: 15px;
} }
/* line 348, ../sass/screen.scss */
/* line 357, ../sass/screen.scss */
#content #mentions h2 { #content #mentions h2 {
color: black; color: black;
padding-bottom: 40px; padding-bottom: 40px;
line-height: 35px; line-height: 35px;
font-family: "myriadpro-regular"; font-family: "myriadpro-regular";
} }
/* line 356, ../sass/screen.scss */
/* line 365, ../sass/screen.scss */
#content #mentions h3 { #content #mentions h3 {
font-family: "comfortaaregular"; font-family: "comfortaaregular";
font-size: 18px; font-size: 18px;
color: black; color: black;
} }


/* line 367, ../sass/screen.scss */
/* line 376, ../sass/screen.scss */
.mentions #main, .mentions body { .mentions #main, .mentions body {
background-color: white; background-color: white;
} }


/* line 372, ../sass/screen.scss */
/* line 381, ../sass/screen.scss */
.vegas-loading { .vegas-loading {
display: none; display: none;
} }


/* line 379, ../sass/screen.scss */
/* line 388, ../sass/screen.scss */
#profil-user .form-group.field-user-no_mail label { #profil-user .form-group.field-user-no_mail label {
font-weight: normal; font-weight: normal;
} }
/* line 383, ../sass/screen.scss */
/* line 392, ../sass/screen.scss */
#profil-user .form-group label { #profil-user .form-group label {
cursor: pointer; cursor: pointer;
} }
/* line 388, ../sass/screen.scss */
/* line 397, ../sass/screen.scss */
#profil-user #mails-jours-prod .form-group { #profil-user #mails-jours-prod .form-group {
float: left; float: left;
margin-right: 15px; margin-right: 15px;
} }
/* line 391, ../sass/screen.scss */
/* line 400, ../sass/screen.scss */
#profil-user #mails-jours-prod .form-group label { #profil-user #mails-jours-prod .form-group label {
font-weight: normal; font-weight: normal;
} }
/* line 397, ../sass/screen.scss */
/* line 406, ../sass/screen.scss */
#profil-user p.strong { #profil-user p.strong {
font-weight: bold; font-weight: bold;
} }


/* signup */ /* signup */
/* line 406, ../sass/screen.scss */
/* line 415, ../sass/screen.scss */
#form-signup #champs-boulanger { #form-signup #champs-boulanger {
display: none; display: none;
} }

+ 1
- 1
frontend/web/js/lechatdesnoisettes.js View File





$(document).ready(function() { $(document).ready(function() {
chat_scroll() ;
//chat_scroll() ;
chat_tabs_gamme_saison() ; chat_tabs_gamme_saison() ;
//chat_slideshow() ; //chat_slideshow() ;
$('[data-toggle="tooltip"]').tooltip() ; $('[data-toggle="tooltip"]').tooltip() ;

+ 13
- 4
frontend/web/sass/screen.scss View File

background-color: white ; background-color: white ;
//border-top: 4px solid #2b669a ; //border-top: 4px solid #2b669a ;
@include box-shadow(0px 0px 3px gray) ; @include box-shadow(0px 0px 3px gray) ;
height: 86px ;
//@include box-shadow(0px 0px 5px #ededed) ; //@include box-shadow(0px 0px 5px #ededed) ;
//@include box-shadow(0px 0px 5px #dcdcdc) ; //@include box-shadow(0px 0px 5px #dcdcdc) ;
} }


#link-home { #link-home {
position: fixed ;
/*position: fixed ;
z-index: 1000 ; z-index: 1000 ;
text-align: center ; text-align: center ;
position: absolute ; position: absolute ;
top: 0px ; top: 0px ;
left: 0px ; left: 0px ;
padding: 10px ; padding: 10px ;
text-decoration: none ;
background-color: white ; background-color: white ;
@include box-shadow(0px 0px 5px black) ; @include box-shadow(0px 0px 5px black) ;
@include border-radius(0px 0px 8px 8px) ; @include border-radius(0px 0px 8px 8px) ;
font-size: 18px ;
*/
position: absolute ;
top: 10px ;
left: 0px ;
text-decoration: none ;
font-size: 22px ;
img { img {
width: 90px ;
height: 60px ;
margin-bottom: 5px ; margin-bottom: 5px ;
} }
} }
} }
nav { nav {
padding-top: 22px ;
ul { ul {
float: right ; float: right ;
li { li {
a { a {
text-decoration: none ; text-decoration: none ;
//color: #9d9d9d ; //color: #9d9d9d ;
&.active { &.active {
background-color: #eee ; background-color: #eee ;
} }

+ 4
- 4
vendor/2amigos/yii2-chartjs-widget/README.md View File

Either run Either run


``` ```
composer require 2amigos/yii2-chartjs-widget:~1.0
composer require 2amigos/yii2-chartjs-widget:~2.0
``` ```
or add or add


```json ```json
"2amigos/yii2-chartjs-widget" : "~1.0"
"2amigos/yii2-chartjs-widget" : "~2.0"
``` ```


to the require section of your application's `composer.json` file. to the require section of your application's `composer.json` file.
documentation for the different types supported by the plugin. documentation for the different types supported by the plugin.


``` ```
use dosamigos\chartjs\Chart;
use dosamigos\chartjs\ChartJs;


<?= Chart::widget([
<?= ChartJs::widget([
'type' => 'Line', 'type' => 'Line',
'options' => [ 'options' => [
'height' => 400, 'height' => 400,

+ 2
- 2
vendor/2amigos/yii2-chartjs-widget/composer.json View File

}, },
"require": { "require": {
"yiisoft/yii2": "*", "yiisoft/yii2": "*",
"bower-asset/chartjs": "1.0.2"
"bower-asset/chartjs": "2.1.6"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "4.*" "phpunit/phpunit": "4.*"
"bower-asset-library": "vendor/bower" "bower-asset-library": "vendor/bower"
} }
} }
}
}

+ 13
- 7
vendor/2amigos/yii2-chartjs-widget/src/ChartJs.php View File

<?php <?php
/** /**
* @link https://github.com/2amigos/yii2-selectize-widget
* @link https://github.com/2amigos/yii2-chartjs-widget
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC * @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @license http://opensource.org/licenses/BSD-3-Clause * @license http://opensource.org/licenses/BSD-3-Clause
*/ */


use yii\base\InvalidConfigException; use yii\base\InvalidConfigException;
use yii\base\Widget; use yii\base\Widget;
use yii\helpers\ArrayHelper;
use yii\helpers\Html; use yii\helpers\Html;
use yii\helpers\Json; use yii\helpers\Json;
use yii\web\JsExpression;


/** /**
* *
protected function registerClientScript() protected function registerClientScript()
{ {
$id = $this->options['id']; $id = $this->options['id'];
$type = $this->type;
$view = $this->getView(); $view = $this->getView();
$data = !empty($this->data) ? Json::encode($this->data) : '{}';
$options = !empty($this->clientOptions) ? Json::encode($this->clientOptions) : '{}';

ChartJsAsset::register($view); ChartJsAsset::register($view);


$js = ";var chartJS_{$id} = new Chart(document.getElementById('{$id}').getContext('2d')).{$type}({$data}, {$options});";
$config = Json::encode(
[
'type' => $this->type,
'data' => $this->data ?: new JsExpression('{}'),
'options' => $this->clientOptions ?: new JsExpression('{}')
]
);

$js = ";var chartJS_{$id} = new Chart($('#{$id}'),{$config});";
$view->registerJs($js); $view->registerJs($js);
} }
}
}

+ 7
- 7
vendor/2amigos/yii2-chartjs-widget/src/ChartJsAsset.php View File

<?php <?php
/** /**
* @link https://github.com/2amigos/yii2-selectize-widget
* @link https://github.com/2amigos/yii2-chartjs-widget
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC * @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @license http://opensource.org/licenses/BSD-3-Clause * @license http://opensource.org/licenses/BSD-3-Clause
*/ */
*/ */
class ChartJsAsset extends AssetBundle class ChartJsAsset extends AssetBundle
{ {
public $sourcePath = '@bower/chartjs';
public $sourcePath = '@bower/chartjs/dist';


public function init()
{
$this->js = YII_DEBUG ? ['Chart.js'] : ['Chart.min.js'];
}
}
public $js = [
'Chart.js'
];
}

+ 32
- 0
vendor/2amigos/yii2-leaflet-extension/CONTRIBUTING.md View File

# Contributing

Contributions are **welcome** and will be fully **credited**.

We accept contributions via Pull Requests on [Github](https://github.com/2amigos/yii2-leaflet-extension).


## Pull Requests

- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer).

- **Add tests!** - Your patch won't be accepted if it doesn't have tests.

- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.

- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.

- **Create feature branches** - Don't ask us to pull from your master branch.

- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.

- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting.


## Running Tests

``` bash
$ phpunit
```


**Happy coding**!

+ 28
- 0
vendor/2amigos/yii2-leaflet-extension/LICENSE.md View File

# The BSD License (BSD)

Copyright (c) 2013-2015, 2amigOS! Consulting Group LLC.

> Redistribution and use in source and binary forms, with or without modification,
> are permitted provided that the following conditions are met:
>
> Redistributions of source code must retain the above copyright notice, this
> list of conditions and the following disclaimer.
>
> Redistributions in binary form must reproduce the above copyright notice, this
> list of conditions and the following disclaimer in the documentation and/or
> other materials provided with the distribution.
>
> Neither the name of 2amigOS! Consulting Group, LLC. nor the names of its
> contributors may be used to endorse or promote products derived from
> this software without specific prior written permission.
>
>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
>ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
>WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
>DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
>ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
>(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
>LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
>ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
>(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
>SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 115
- 0
vendor/2amigos/yii2-leaflet-extension/README.md View File

LeafLet Extension for Yii2
==========================

[![Latest Version](https://img.shields.io/github/tag/2amigos/yii2-leaflet-extension.svg?style=flat-square&label=release)](https://github.com/2amigos/yii2-leaflet-extension/tags)
[![Software License](https://img.shields.io/badge/license-BSD-brightgreen.svg?style=flat-square)](LICENSE.md)
[![Build Status](https://img.shields.io/travis/2amigos/yii2-leaflet-extension/master.svg?style=flat-square)](https://travis-ci.org/2amigos/yii2-leaflet-extension)
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/2amigos/yii2-leaflet-extension.svg?style=flat-square)](https://scrutinizer-ci.com/g/2amigos/yii2-leaflet-extension/code-structure)
[![Total Downloads](https://img.shields.io/packagist/dt/2amigos/yii2-leaflet-extension.svg?style=flat-square)](https://packagist.org/packages/2amigos/yii2-leaflet-extension)

Extension library to display interactive maps with [LeafletJs](http://leafletjs.com/)

Installation
------------

The preferred way to install this extension is through
[composer](http://getcomposer.org/download/). This requires the
[`composer-asset-plugin`](https://github.com/francoispluchino/composer-asset-plugin),
which is also a dependency for yii2 – so if you have yii2 installed, you are
most likely already set.

Either run

```
composer require 2amigos/yii2-leaflet-extension:~1.0
```
or add

```json
"2amigos/yii2-leaflet-extension" : "~1.0"
```

to the require section of your application's `composer.json` file.

Usage
-----

One of the things to take into account when working with [LeafletJs](http://leafletjs.com/) is that we need a Tile
Provider. Is very important, if we fail to provide a Tile Provider Url, the map will display plain, without any maps at
all.

The following example, is making use of [MapQuest](http://developer.mapquest.com/):

```
// first lets setup the center of our map
$center = new dosamigos\leaflet\types\LatLng(['lat' => 51.508, 'lng' => -0.11]);

// now lets create a marker that we are going to place on our map
$marker = new \dosamigos\leaflet\layers\Marker(['latLng' => $center, 'popupContent' => 'Hi!']);

// The Tile Layer (very important)
$tileLayer = new \dosamigos\leaflet\layers\TileLayer([
'urlTemplate' => 'http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpeg',
'clientOptions' => [
'attribution' => 'Tiles Courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> ' .
'<img src="http://developer.mapquest.com/content/osm/mq_logo.png">, ' .
'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
'subdomains' => '1234'
]
]);

// now our component and we are going to configure it
$leaflet = new \dosamigos\leaflet\LeafLet([
'center' => $center, // set the center
]);
// Different layers can be added to our map using the `addLayer` function.
$leaflet->addLayer($marker) // add the marker
->addLayer($tileLayer); // add the tile layer

// finally render the widget
echo \dosamigos\leaflet\widgets\Map::widget(['leafLet' => $leaflet]);

// we could also do
// echo $leaflet->widget();
```

Testing
-------

To test the extension, is better to clone this repository on your computer. After, go to the extensions folder and do
the following (assuming you have `composer` installed on your computer):

```bash
$ composer install --no-interaction --prefer-source --dev
```
Once all required libraries are installed then do:

```bash
$ vendor/bin/phpunit
```

Further Information
-------------------

For further information regarding the multiple settings of LeafLetJS library please visit
[its API reference](http://leafletjs.com/reference.html)

Contributing
------------

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

- [Antonio Ramirez](https://github.com/tonydspaniard)
- [All Contributors](../../contributors)

License
-------

The BSD License (BSD). Please see [License File](LICENSE.md) for more information.

> [![2amigOS!](http://www.gravatar.com/avatar/55363394d72945ff7ed312556ec041e0.png)](http://www.2amigos.us)
<i>Web development has never been so fun!</i>
[www.2amigos.us](http://www.2amigos.us)

+ 48
- 0
vendor/2amigos/yii2-leaflet-extension/composer.json View File

{
"name": "2amigos/yii2-leaflet-extension",
"description": "LeafLet Mobile-Friendly Interactive Maps Extension Library for Yii2.",
"type": "yii2-extension",
"keywords": [
"2amigos",
"yii",
"yii2",
"extension",
"widget",
"maps",
"leaflet"
],
"homepage": "http://yiiwheels.com/extension/leaflet-extension-library",
"license": "BSD-3-Clause",
"authors": [
{
"name": "2amigOS! Consulting Group",
"email": "hola@2amigos.us",
"homepage": "http://2amigos.us",
"role": "Developer"
}
],
"support": {
"issues": "https://github.com/2amigos/yii2-leaflet-extension/issues",
"source": "https://github.com/2amigos/yii2-leaflet-extension"
},
"require": {
"yiisoft/yii2": "~2.0.0",
"bower-asset/leaflet": "0.7.*@stable"
},
"require-dev": {
"phpunit/phpunit": "4.*"
},
"autoload": {
"psr-4": {
"dosamigos\\leaflet\\": "src"
}
},
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
},
"asset-installer-paths": {
"bower-asset-library": "vendor/bower"
}
}
}

+ 393
- 0
vendor/2amigos/yii2-leaflet-extension/src/LeafLet.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/
namespace dosamigos\leaflet;

use dosamigos\leaflet\controls\Control;
use dosamigos\leaflet\layers\Layer;
use dosamigos\leaflet\layers\LayerGroup;
use dosamigos\leaflet\layers\TileLayer;
use dosamigos\leaflet\layers\Polygon;
use dosamigos\leaflet\types\LatLng;
use dosamigos\leaflet\widgets\Map;
use yii\base\Component;
use yii\base\InvalidConfigException;
use yii\base\InvalidParamException;
use yii\helpers\ArrayHelper;

/**
* Class LeafLet
* @package dosamigos\leaflet
*/

/**
* @property LatLng $center
*
*/
class LeafLet extends Component
{
// JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_NUMERIC_CHECK
const JSON_OPTIONS = 352;

/**
* @var integer a counter used to generate [[name]] for layers.
* @internal
*/
public static $counter = 0;
/**
* @var string the prefix to the automatically generated object names.
* @see [[generateName()]]
*/
public static $autoNamePrefix = 'l';
/**
* @var string the name to give to the variable. The name of the map specified on the
* [[TileLayer]] component overrides this one.
*/
public $name = 'map';
/**
* @var int the zoom level of the map
*/
public $zoom = 13;
/**
* @var array the options for the underlying LeafLetJs JS component.
* Please refer to the LeafLetJs api reference for possible
* [options](http://leafletjs.com/reference.html).
*/
public $clientOptions = [];
/**
* @var array the event handlers for the underlying LeafletJs JS plugin.
* Please refer to the LeafLetJs js api object options for possible events.
*/
public $clientEvents = [];
/**
* @var Layer[] holding ui layers (do not confuse with map layers, these are markers, popups, polygons, etc)
*/
private $_layers = [];
/**
* @var LayerGroup[] holding layer groups
*/
private $_layerGroups = [];
/**
* @var LatLng sets the center of the map
*/
private $_center;

/**
* Returns the center of the map.
* @return LatLng center of the map.
*/
public function getCenter()
{
return $this->_center;
}

/**
* Sets the center of the map.
*
* @param LatLng $value center of the map.
*/
public function setCenter(LatLng $value)
{
$this->_center = $value;
}

/**
* @var Control[] holding controls to be added to the map.
*/
private $_controls = [];

/**
* @param \dosamigos\leaflet\controls\Control[] $controls
*
* @throws \yii\base\InvalidParamException
*/
public function setControls(array $controls)
{
foreach ($controls as $control) {
if (!($control instanceof Control)) {
throw new InvalidParamException("All controls must be of type Control.");
}
}
$this->_controls = $controls;
}

/**
* @return \dosamigos\leaflet\controls\Control[]
*/
public function getControls()
{
return $this->_controls;
}

/**
* @param Control $control
*/
public function addControl(Control $control)
{
$this->_controls[] = $control;
}

/**
* @var \dosamigos\leaflet\layers\TileLayer
*/
private $_tileLayer;

/**
* @param \dosamigos\leaflet\layers\TileLayer $tileLayer
*
* @return static the component itself
*/
public function setTileLayer(TileLayer $tileLayer)
{
if (!empty($tileLayer->map) && strcmp($tileLayer->map, $this->name) !== 0) {
$this->name = $tileLayer->map;
}
if (empty($tileLayer->map)) {
$tileLayer->map = $this->name;
}
$this->_tileLayer = $tileLayer;

return $this;
}

/**
* @return \dosamigos\leaflet\layers\TileLayer
*/
public function getTileLayer()
{
return $this->_tileLayer;
}

/**
* @var array holds the js script lines to be registered.
*/
private $_js = [];

/**
* @param string|array $js custom javascript code to be registered.
* *Warning*: This method overrides any previous settings.
*
* @return static the component itself
*/
public function setJs($js)
{
$this->_js = is_array($js) ? $js : [$js];
return $this;
}

/**
* @param string $js appends javascript code to be registered.
*
* @return static the component itself
*/
public function appendJs($js)
{
$this->_js[] = $js;
return $this;
}

/**
* @return array the queued javascript code to be registered.
* *Warning*: This method does not include map initialization.
*/
public function getJs()
{
$js = [];
foreach ($this->getLayers() as $layer) {

if ($layer instanceof Polygon) {
$layerJs = $layer->encode();
$insertAtTheBottom = $layer->insertAtTheBottom ? 'true' : 'false';
$js[] = "$this->name.addLayer($layerJs, $insertAtTheBottom);";
continue;
}
$layer->map = $this->name;
$js[] = $layer->encode();
}
$groups = $this->getEncodedLayerGroups($this->getLayerGroups());
$controls = $this->getEncodedControls($this->getControls());
$plugins = $this->getEncodedPlugins($this->getPlugins()->getInstalledPlugins());
$js = ArrayHelper::merge($js, $groups);
$js = ArrayHelper::merge($js, $controls);
$js = ArrayHelper::merge($js, $plugins);
$js = ArrayHelper::merge($js, $this->_js);
return $js;
}

/**
* @var PluginManager
*/
private $_plugins;

/**
* @return PluginManager
*/
public function getPlugins()
{
return $this->_plugins;
}

/**
* Installs a plugin
*
* @param Plugin $plugin
*/
public function installPlugin(Plugin $plugin)
{
$plugin->map = $this->name;
$this->getPlugins()->install($plugin);
}

/**
* Removes an installed plugin
*
* @param $plugin
*
* @return mixed|null
*/
public function removePlugin($plugin)
{
return $this->getPlugins()->remove($plugin);
}

/**
* Initializes the widget.
*/
public function init()
{
parent::init();
if (empty($this->center) || empty($this->zoom)) {
throw new InvalidConfigException("'center' and/or 'zoom' attributes cannot be empty.");
}
$this->_plugins = new PluginManager();
$this->clientOptions['center'] = $this->center->toArray(true);
$this->clientOptions['zoom'] = $this->zoom;
}

/**
* Helper method to render the widget. It is also possible to use the widget directly:
* ```
* echo Map::widget(['leafLet' => $leafLetObject, ...]);
* ```
*
* @param array $config
*
* @return string
*/
public function widget($config = [])
{
ob_start();
ob_implicit_flush(false);
$config['leafLet'] = $this;
$widget = new Map($config);
$out = $widget->run();
return ob_get_clean() . $out;
}

/**
* @param Layer $layer the layer script to add to the js script code. It could be any object extending from [[Layer]]
* component (markers, polylines, popup, etc)
*
* @return static the component itself
*/
public function addLayer(Layer $layer)
{
$this->_layers[] = $layer;
return $this;
}

/**
* @return Layer[] the stored layers
*/
public function getLayers()
{
return $this->_layers;
}

/**
* @param LayerGroup $group sets a layer group
*
* @return static the component itself
*/
public function addLayerGroup(LayerGroup $group)
{
$this->_layerGroups[] = $group;
return $this;
}

/**
* @return layers\LayerGroup[] all stored layer groups
*/
public function getLayerGroups()
{
return $this->_layerGroups;
}

/**
* Clears all stored layer groups
* @return static the component itself
*/
public function clearLayerGroups()
{
$this->_layerGroups = [];
return $this;
}

/**
* @param Control[] $controls
*
* @return array
*/
public function getEncodedControls($controls)
{
return $this->getEncodedObjects($controls);
}

/**
* @param LayerGroup[] $groups
*
* @return array
*/
public function getEncodedLayerGroups($groups)
{
return $this->getEncodedObjects($groups);
}

/**
* @param Plugin[] $plugins
*
* @return array
*/
public function getEncodedPlugins($plugins)
{
return $this->getEncodedObjects($plugins);
}

/**
* @return string
*/
public static function generateName()
{
return self::$autoNamePrefix . self::$counter++;
}

/**
* @param $objects
*
* @return array
*/
protected function getEncodedObjects($objects)
{
$js = [];
foreach ((array)$objects as $object) {
if (property_exists($object, 'map')) {
$object->map = $this->name;
}
$js[] = method_exists($object, 'encode') ? $object->encode() : null;
}
return array_filter($js);
}
}

+ 46
- 0
vendor/2amigos/yii2-leaflet-extension/src/LeafLetAsset.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/
namespace dosamigos\leaflet;

use yii\web\AssetBundle;

/**
* LeafLetAsset Registers widget requires files. Please, use the following in order to override bundles for CDN:
*
* ```
* return [
* // ...
* 'components' => [
* 'bundles' => [
* 'dosamigos\leaftlet\LeafLetAsset' => [
* 'sourcePath' => null,
* 'js' => [ 'http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js' ],
* 'css' => [ 'http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css' ]
* ]
* ]
* ]
* ]
* ```
*
* @author Antonio Ramirez <amigo.cobos@gmail.com>
* @link http://www.ramirezcobos.com/
* @link http://www.2amigos.us/
* @package dosamigos\leaflet
*/
class LeafLetAsset extends AssetBundle
{
public $sourcePath = '@bower/leaflet/dist';

public $css = [
'leaflet.css'
];

public function init()
{
$this->js = YII_DEBUG ? ['leaflet-src.js'] : ['leaflet.js'];
}
}

+ 118
- 0
vendor/2amigos/yii2-leaflet-extension/src/Plugin.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/

namespace dosamigos\leaflet;

use yii\base\Component;
use yii\helpers\Json;

/**
* @property string $name
*/

/**
* Plugin is the abstract class where all plugins should extend from
*
* @author Antonio Ramirez <amigo.cobos@gmail.com>
* @link http://www.ramirezcobos.com/
* @link http://www.2amigos.us/
* @package dosamigos\leaflet
*/
abstract class Plugin extends Component
{
/**
* @var string the map name
*/
public $map;
/**
* @var array the options for the underlying LeafLetJs JS component.
* Please refer to the LeafLetJs api reference for possible
* [options](http://leafletjs.com/reference.html).
*/
public $clientOptions = [];
/**
* @var array the event handlers for the underlying LeafletJs JS plugin.
* Please refer to the LeafLetJs js api object options for possible events.
*/
public $clientEvents = [];
/**
* @var string the variable name. If not null, then the js creation script
* will be returned as a variable. If null, then the js creation script will
* be returned as a constructor that you can use on other object's configuration options.
*/
private $_name;

/**
* Returns the name of the layer.
*
* @param boolean $autoGenerate whether to generate a name if it is not set previously
*
* @return string name of the layer.
*/
public function getName($autoGenerate = false)
{
if ($autoGenerate && $this->_name === null) {
$this->_name = LeafLet::generateName();
}
return $this->_name;
}

/**
* Sets the name of the layer.
*
* @param string $value name of the layer.
*/
public function setName($value)
{
$this->_name = $value;
}

/**
* Returns the processed js options
* @return array
*/
public function getOptions()
{
return empty($this->clientOptions) ? '{}' : Json::encode($this->clientOptions, LeafLet::JSON_OPTIONS);
}

/**
* @return string the processed js events
*/
public function getEvents()
{
$js = [];
if (!empty($this->name) && !empty($this->clientEvents)) {
$name = $this->name;
foreach ($this->clientEvents as $event => $handler) {
$js[] = "$name.on('$event', $handler);";
}
}
return !empty($js) ? implode("\n", $js) : "";
}

/**
* Returns the plugin name
* @return string
*/
abstract public function getPluginName();

/**
* Registers plugin asset bundle
*
* @param \yii\web\View $view
*
* @return mixed
*/
abstract public function registerAssetBundle($view);

/**
* Returns the javascript ready code for the object to render
* @return \yii\web\JsExpression
*/
abstract public function encode();
}

+ 85
- 0
vendor/2amigos/yii2-leaflet-extension/src/PluginManager.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/
namespace dosamigos\leaflet;

use yii\base\Component;
use yii\helpers\ArrayHelper;

class PluginManager extends Component
{
private $_plugins = [];

/**
* Check whether we have a plugin installed with that name previous firing up the call
*
* @param string $name
*
* @return mixed|void
*/
public function __get($name)
{
if (ArrayHelper::keyExists($name, $this->getInstalledPlugins())) {
return $this->getPlugin($name);
}
return parent::__get($name);
}

/**
* Installs a plugin
*
* @param Plugin $plugin
*
* @return void
*/
public function install(Plugin $plugin)
{
$this->_plugins[$plugin->name] = $plugin;
}

/**
* Removes a plugin
*
* @param Plugin $plugin
*
* @return mixed|null the value of the element if found, default value otherwise
*/
public function remove(Plugin $plugin)
{
return ArrayHelper::remove($this->_plugins, $plugin->name);
}

/**
* @param \yii\web\View $view
* Registers plugin bundles
*/
public function registerAssetBundles($view)
{
foreach ($this->_plugins as $plugin) {
$plugin->registerAssetBundle($view);
}
}

/**
* @return array of installed plugins
*/
public function getInstalledPlugins()
{
return $this->_plugins;
}

/**
* Returns an installed plugin by name
*
* @param string $name
*
* @return Plugin|null
*/
public function getPlugin($name)
{
return isset($this->_plugins[$name]) ? $this->_plugins[$name] : null;
}
}

+ 87
- 0
vendor/2amigos/yii2-leaflet-extension/src/controls/Control.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/

namespace dosamigos\leaflet\controls;

use dosamigos\leaflet\LeafLet;
use yii\base\Component;
use yii\helpers\Json;

/**
* Control is the base class for all Controls
*
* @property string $name
*
* @author Antonio Ramirez <amigo.cobos@gmail.com>
* @link http://www.ramirezcobos.com/
* @link http://www.2amigos.us/
* @package dosamigos\leaflet\controls
*/
abstract class Control extends Component
{
/**
* @var string the name of the javascript variable that will hold the reference
* to the map object.
*/
public $map;
/**
* @var string the initial position of the control (one of the map corners).
*/
public $position = 'topright';
/**
* @var array the options for the underlying LeafLetJs JS component.
* Please refer to the LeafLetJs api reference for possible
* [options](http://leafletjs.com/reference.html).
*/
public $clientOptions = [];
/**
* @var string the variable name. If not null, then the js creation script
* will be returned as a variable. If null, then the js creation script will
* be returned as a constructor that you can use on other object's configuration options.
*/
private $_name;

/**
* Returns the name of the layer.
*
* @param boolean $autoGenerate whether to generate a name if it is not set previously
*
* @return string name of the layer.
*/
public function getName($autoGenerate = false)
{
if ($autoGenerate && $this->_name === null) {
$this->_name = LeafLet::generateName();
}
return $this->_name;
}

/**
* Sets the name of the layer.
*
* @param string $value name of the layer.
*/
public function setName($value)
{
$this->_name = $value;
}

/**
* Returns the processed js options
* @return array
*/
public function getOptions()
{
return empty($this->clientOptions) ? '{}' : Json::encode($this->clientOptions, LeafLet::JSON_OPTIONS);
}

/**
* Returns the javascript ready code for the object to render
* @return \yii\web\JsExpression
*/
abstract public function encode();
}

+ 134
- 0
vendor/2amigos/yii2-leaflet-extension/src/controls/Layers.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/
namespace dosamigos\leaflet\controls;


use dosamigos\leaflet\layers\LayerGroup;
use dosamigos\leaflet\layers\TileLayer;
use dosamigos\leaflet\LeafLet;
use yii\base\InvalidParamException;
use yii\helpers\Json;
use yii\web\JsExpression;

/**
* Layers The layers control gives users the ability to switch between different base layers and switch overlays on/off.
*
* @see http://leafletjs.com/reference.html#control-layers
* @author Antonio Ramirez <amigo.cobos@gmail.com>
* @link http://www.ramirezcobos.com/
* @link http://www.2amigos.us/
* @package dosamigos\leaflet\controls
*/
class Layers extends Control
{
/**
* @var \dosamigos\leaflet\layers\TileLayer[]
*/
private $_baseLayers = [];

/**
* @param mixed $baseLayers
*
* @throws \yii\base\InvalidParamException
*/
public function setBaseLayers(array $baseLayers)
{
foreach ($baseLayers as $key => $layer) {
if (!($layer instanceof TileLayer)) {
throw new InvalidParamException("All baselayers should be of type TileLayer ");
}
$this->_baseLayers[$key] = $layer;
}
}

/**
* @return \dosamigos\leaflet\layers\TileLayer[]
*/
public function getBaseLayers()
{
return $this->_baseLayers;
}

/**
* @return array of encoded base layers
*/
public function getEncodedBaseLayers()
{
$layers = [];
foreach ($this->getBaseLayers() as $key => $layer) {
$layer->name = null;
$layers[$key] = new JsExpression(str_replace(";", "", $layer->encode()));
}
return $layers;
}

/**
* @var \dosamigos\leaflet\layers\Layer[]
*/
private $_overlays = [];

/**
* @param \dosamigos\leaflet\layers\LayerGroup[] $overlays
*
* @throws \yii\base\InvalidParamException
*/
public function setOverlays($overlays)
{
foreach ($overlays as $key => $overlay) {
if (!($overlay instanceof LayerGroup)) {
throw new InvalidParamException("All overlays should be of type LayerGroup");
}
$this->_overlays[$key] = $overlay;
}
}

/**
* @return \dosamigos\leaflet\layers\Layer[]
*/
public function getOverlays()
{
return $this->_overlays;
}

/**
* @return array of encoded overlays
*/
public function getEncodedOverlays()
{
$overlays = [];
/**
* @var \dosamigos\leaflet\layers\LayerGroup $overlay
*/
foreach ($this->getOverlays() as $key => $overlay) {
$overlays[$key] = $overlay->oneLineEncode();
}
return $overlays;
}

/**
* Returns the javascript ready code for the object to render
* @return \yii\web\JsExpression
*/
public function encode()
{
$this->clientOptions['position'] = $this->position;
$layers = $this->getEncodedBaseLayers();
$overlays = $this->getEncodedOverlays();
$options = $this->getOptions();
$name = $this->name;
$map = $this->map;

$layers = empty($layers) ? '{}' : Json::encode($layers, LeafLet::JSON_OPTIONS);
$overlays = empty($overlays) ? '{}' : Json::encode($overlays, LeafLet::JSON_OPTIONS);

$js = "L.control.layers($layers, $overlays, $options)" . ($map !== null ? ".addTo($map);" : "");
if (!empty($name)) {
$js = "var $name = $js" . ($map !== null ? "" : ";");
}
return new JsExpression($js);
}
}

+ 41
- 0
vendor/2amigos/yii2-leaflet-extension/src/controls/Zoom.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/

namespace dosamigos\leaflet\controls;

use yii\web\JsExpression;

/**
* Zoom renders basic zoom control with two buttons (zoom in and zoom out). It is put on the map by default unless you
* set the map's zoomControl option to false
*
* @see http://leafletjs.com/reference.html#control-zoom
* @author Antonio Ramirez <amigo.cobos@gmail.com>
* @link http://www.ramirezcobos.com/
* @link http://www.2amigos.us/
* @package dosamigos\leaflet\controls
*/
class Zoom extends Control
{
/**
* Returns the javascript ready code for the object to render
* @return \yii\web\JsExpression
*/
public function encode()
{
$this->clientOptions['position'] = $this->position;
$options = $this->getOptions();
$name = $this->getName();
$map = $this->map;
$js = "L.control.zoom($options)" . ($map !== null ? ".addTo($map);" : "");
if (!empty($name)) {
$js = "var $name = $js" . ($map !== null ? "" : ";");
}
return new JsExpression($js);
}

}

+ 54
- 0
vendor/2amigos/yii2-leaflet-extension/src/layers/Circle.php View File

<?php
/**
* /**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/

namespace dosamigos\leaflet\layers;


use yii\web\JsExpression;

/**
* Circle a class for drawing circle overlays on a map.
*
* @see http://leafletjs.com/reference.html#circle
* @author Antonio Ramirez <amigo.cobos@gmail.com>
* @link http://www.ramirezcobos.com/
* @link http://www.2amigos.us/
* @package dosamigos\leaflet\layers
*/
/**
* @property string $name
*/
class Circle extends Layer
{
use LatLngTrait;
use PopupTrait;

/**
* @var float Sets the radius of a circle. Units are in meters.
*/
public $radius;

/**
* Returns the javascript ready code for the object to render
* @return JsExpression
*/
public function encode()
{
$bounds = $this->getLatLng()->toArray(true);
$radius = $this->radius;
$options = $this->getOptions();
$name = $this->name;
$map = $this->map;
$js = $this->bindPopupContent("L.circle($bounds, $radius, $options)") . ($map !== null ? ".addTo($map);" : "");
if (!empty($name)) {
$js = "var $name = $js" . ($map !== null ? "" : ";");
}
return new JsExpression($js);
}

}

+ 44
- 0
vendor/2amigos/yii2-leaflet-extension/src/layers/CircleMarker.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/

namespace dosamigos\leaflet\layers;


use yii\web\JsExpression;

/**
* CircleMarker is a circle of a fixed size with radius specified in pixels. Setting its radius wont change its size.
*
* @see http://leafletjs.com/reference.html#circlemarker
* @author Antonio Ramirez <amigo.cobos@gmail.com>
* @link http://www.ramirezcobos.com/
* @link http://www.2amigos.us/
* @package dosamigos\leaflet\layers
*/
/**
* @property string $name
*/
class CircleMarker extends Circle
{
/**
* Returns the javascript ready code for the object to render
* @return JsExpression
*/
public function encode()
{
$bounds = $this->getLatLng()->toArray(true);
$options = $this->getOptions();
$name = $this->name;
$map = $this->map;
$js = $this->bindPopupContent("L.circleMarker($bounds, $options)") . ($map !== null ? ".addTo($map);" : "");
if (!empty($name)) {
$js = "var $name = $js" . ($map !== null ? "" : ";");
}
return new JsExpression($js);
}

}

+ 91
- 0
vendor/2amigos/yii2-leaflet-extension/src/layers/FeatureGroup.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/

namespace dosamigos\leaflet\layers;


use yii\helpers\Json;
use yii\web\JsExpression;

/**
* FeatureGroup
*
* @see http://leafletjs.com/reference.html#featuregroup
* @author Antonio Ramirez <amigo.cobos@gmail.com>
* @link http://www.ramirezcobos.com/
* @link http://www.2amigos.us/
* @package dosamigos\leaflet\layers
*/
/**
* @property string $name
*/
class FeatureGroup extends LayerGroup
{
use PopupTrait;

/**
* @var array the event handlers for the underlying LeafletJs featureGroup JS plugin.
* Please refer to the [LeafLetJs::featureGroup](http://leafletjs.com/reference.html#featuregroup)
* js api object options for possible events.
*/
public $clientEvents = [];

/**
* @return JsExpression
*/
public function encode()
{
$js = [];
$layers = $this->getLayers();
$name = $this->name;
$names = str_replace(array('"', "'"), "", Json::encode(array_keys($layers)));
$map = $this->map;
foreach ($layers as $layer) {
$js[] = $layer->encode();
}
$initJs = "L.featureGroup($names)" . $this->getEvents() . ($map !== null ? ".addTo($map);" : "");

if (empty($name)) {
$js[] = $initJs . ($map !== null ? "" : ";");
} else {
$js[] = "var $name = $initJs" . ($map !== null ? "" : ";");
}
return new JsExpression(implode("\n", $js));
}

/**
* @inheritdoc
*/
public function oneLineEncode() {
$map = $this->map;
$layers = $this->getLayers();
$layersJs = [];
/** @var \dosamigos\leaflet\layers\Layer $layer */
foreach ($layers as $layer) {
$layer->setName(null);
$layersJs[] = $layer->encode();
}
$js = "L.featureGroup([" . implode(",", $layersJs) . "])" .
$this->getEvents() .
($map !== null ? ".addTo($map);" : "");
return new JsExpression($js);
}

/**
* @return string the processed js events
*/
protected function getEvents()
{
$js = [];
if (!empty($this->clientEvents)) {
foreach ($this->clientEvents as $event => $handler) {
$js[] = ".on('$event', $handler)";
}
}
return !empty($js) ? implode("\n", $js) : "";
}
}

+ 54
- 0
vendor/2amigos/yii2-leaflet-extension/src/layers/GeoJson.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/

namespace dosamigos\leaflet\layers;


use dosamigos\leaflet\LeafLet;
use yii\helpers\Json;
use yii\web\JsExpression;

/**
* GeoJson allows you to parse GeoJSON data and display it on the map
*
* @see http://leafletjs.com/reference.html#geojson
* @author Antonio Ramirez <amigo.cobos@gmail.com>
* @link http://www.ramirezcobos.com/
* @link http://www.2amigos.us/
* @package dosamigos\leaflet\layers
*/
/**
* @property string $name
*/
class GeoJson extends Layer
{
/**
* @var array geo spatial data interchange json object. For information related to GeoJSON format, please visit
* [http://geojson.org/geojson-spec.html](http://geojson.org/geojson-spec.html). This component does not validate
* this data, it just renders it. This array will be converted into a json object previous encoding.
*/
public $data = [];

/**
* Returns the javascript ready code for the object to render
* @return string|JsExpression
*/
public function encode()
{
$data = Json::encode($this->data, LeafLet::JSON_OPTIONS);
$options = $this->getOptions();
$name = $this->name;
$map = $this->map;
$js = "L.geoJson($data, $options)" . ($map !== null ? ".addTo($map)" : "") . ";";
if (!empty($name)) {
$js = "var $name = $js";
}

return new JsExpression($js);
}

}

+ 72
- 0
vendor/2amigos/yii2-leaflet-extension/src/layers/ImageOverlay.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/
namespace dosamigos\leaflet\layers;


use dosamigos\leaflet\types\LatLngBounds;
use yii\web\JsExpression;

/**
* ImageOverlay it is used to load and display a single image over specific bounds of the map
*
* @see http://leafletjs.com/reference.html#imageoverlay
* @author Antonio Ramirez <amigo.cobos@gmail.com>
* @link http://www.ramirezcobos.com/
* @link http://www.2amigos.us/
* @package extensions\leafletjs\layers
*/
/**
* @property string $name
*/
class ImageOverlay extends Layer
{
/**
* @var string the image Url
*/
public $imageUrl;

/**
* @var LatLngBounds
*/
private $_bounds;

/**
* @param LatLngBounds $bounds
*/
public function setImageBounds(LatLngBounds $bounds)
{
$this->_bounds = $bounds;
}

/**
* @return LatLngBounds
*/
public function getImageBounds()
{
return $this->_bounds;
}

/**
* Returns the javascript ready code for the object to render
* @return \yii\web\JsExpression
*/
public function encode()
{
$name = $this->name;
$imageUrl = $this->imageUrl;
$bounds = $this->getImageBounds()->encode();
$options = $this->getOptions();
$map = $this->map;
$js = "L.imageOverlay('$imageUrl', $bounds, $options)" . ($map !== null ? ".addTo($map);" : "");
if (!empty($name)) {
$js = "var $name = $js" . ($map !== null ? "" : ";");
}

return new JsExpression($js);
}

}

+ 33
- 0
vendor/2amigos/yii2-leaflet-extension/src/layers/LatLngTrait.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/
namespace dosamigos\leaflet\layers;

use dosamigos\leaflet\types\LatLng;

trait LatLngTrait
{
/**
* @var \dosamigos\leaflet\types\LatLng holds the latitude and longitude values.
*/
private $_latLon;

/**
* @param \dosamigos\leaflet\types\LatLng $latLon the position to render the marker
*/
public function setLatLng(LatLng $latLon)
{
$this->_latLon = $latLon;
}

/**
* @return \dosamigos\leaflet\types\LatLng
*/
public function getLatLng()
{
return $this->_latLon;
}
}

+ 86
- 0
vendor/2amigos/yii2-leaflet-extension/src/layers/Layer.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/
namespace dosamigos\leaflet\layers;

use dosamigos\leaflet\LeafLet;
use yii\base\Component;
use dosamigos\leaflet\types\Type;
use yii\helpers\Json;

/**
* Layer is the base class for UI Layers
*
* @property string $name
*
* @package dosamigos\leaflet\layers
*/
abstract class Layer extends Component
{

use NameTrait;

/**
* @var string the name of the javascript variable that will hold the reference
* to the map object.
*/
public $map;
/**
* @var array the options for the underlying LeafLetJs JS component.
* Please refer to the LeafLetJs api reference for possible
* [options](http://leafletjs.com/reference.html).
*/
public $clientOptions = [];
/**
* @var array the event handlers for the underlying LeafletJs JS plugin.
* Please refer to the LeafLetJs js api object options for possible events.
*/
public $clientEvents = [];

/**
* Returns the processed js options
* @return array
*/
public function getOptions()
{
$options = [];
foreach ($this->clientOptions as $key => $option) {
if ($option instanceof Type) {
$option = $option->encode();
}
$options[$key] = $option;
}
return empty($options) ? '{}' : Json::encode($options, LeafLet::JSON_OPTIONS);
}

/**
* @return string the processed js events
*/
public function getEvents()
{
$js = [];
if (!empty($this->clientEvents)) {
if (!empty($this->name)) {
$name = $this->name;
$js[] = "{$name}";
foreach ($this->clientEvents as $event => $handler) {
$js[] = ".on('$event', $handler)";
}
} else {
foreach ($this->clientEvents as $event => $handler) {
$js[] = ".on('$event', $handler)";
}
}
}
return !empty($js) ? implode("", $js) . ($this->name !== null ? ";" : "") : "";
}

/**
* Returns the javascript ready code for the object to render
* @return \yii\web\JsExpression
*/
abstract public function encode();
}

+ 131
- 0
vendor/2amigos/yii2-leaflet-extension/src/layers/LayerGroup.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/
namespace dosamigos\leaflet\layers;


use yii\base\Component;
use yii\base\InvalidParamException;
use yii\helpers\ArrayHelper;
use yii\helpers\Json;
use yii\web\JsExpression;

/**
* LayerGroup Used to group several layers and handle them as one.
*
* @see http://leafletjs.com/reference.html#layergroup
* @author Antonio Ramirez <amigo.cobos@gmail.com>
* @link http://www.ramirezcobos.com/
* @link http://www.2amigos.us/
* @package dosamigos\leaflet\layers
*/
class LayerGroup extends Component
{
use NameTrait;

/**
* @var string the name of the javascript variable that will hold the reference
* to the map object.
*/
public $map;

/**
* @var Layer[]
*/
private $_layers = [];

/**
* Adds a layer to the group. If no name given it will be automatically generated.
*
* @param Layer $layer
*
* @return $this
* @throws \yii\base\InvalidParamException
*/
public function addLayer(Layer $layer)
{
if (($layer instanceof Popup) || ($layer instanceof TileLayer)) {
throw new InvalidParamException("'\$layer' cannot be of type Popup or TileLayer.");
}
$layer->map = null;
$this->_layers[$layer->getName(true)] = $layer;
return $this;
}

/**
* Returns a specific layer. Please note that if the layer didn't have a name, it will be dynamically created. This
* method works for those that we know the name previously.
*
* @param string $name the name of the layer
*
* @return mixed
*/
public function getLayer($name)
{
return ArrayHelper::getValue($this->_layers, $name);
}

/**
* Removes a layer with the given name from the group.
*
* @param $name
*
* @return mixed|null
*/
public function removeLayer($name)
{
return ArrayHelper::remove($this->_layers, $name);
}

/**
* @return Layer[] the added layers
*/
public function getLayers()
{
return $this->_layers;
}

/**
* @return JsExpression
*/
public function encode()
{
$js = [];
$layers = $this->getLayers();
$name = $this->getName();
$names = str_replace(array('"', "'"), "", Json::encode(array_keys($layers)));
$map = $this->map;
foreach ($layers as $layer) {
$js[] = $layer->encode();
}
$initJs = "L.layerGroup($names)" . ($map !== null ? ".addTo($map);\n" : "");

if (empty($name)) {
$js[] = $initJs . ($map !== null ? "" : ";");
} else {
$js[] = "var $name = $initJs" . ($map !== null ? "" : ";");
}
return new JsExpression(implode("\n", $js));
}

/**
* Returns the initialization
* @return JsExpression
*/
public function oneLineEncode()
{
$map = $this->map;
$layers = $this->getLayers();
$layersJs = [];
/** @var \dosamigos\leaflet\layers\Layer $layer */
foreach ($layers as $layer) {
$layer->name = null;
$layersJs[] = $layer->encode();
}
$js = "L.layerGroup([" . implode(",", $layersJs) . "])" . ($map !== null ? ".addTo($map);" : "");
return new JsExpression($js);
}
}

+ 80
- 0
vendor/2amigos/yii2-leaflet-extension/src/layers/Marker.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/
namespace dosamigos\leaflet\layers;

use dosamigos\leaflet\types\Icon;
use yii\base\InvalidConfigException;
use yii\web\JsExpression;

/**
* Marker is used to put a marker on the map
*
* @see http://leafletjs.com/reference.html#circle
* @author Antonio Ramirez <amigo.cobos@gmail.com>
* @link http://www.ramirezcobos.com/
* @link http://www.2amigos.us/
* @package dosamigos\leaflet\layers
*/
/**
* @property string $name
* @property \dosamigos\leaflet\types\LatLng $latLng
* @property string $popupContent
* @property bool $openPopup
*/
class Marker extends Layer
{
use LatLngTrait;
use PopupTrait;

/**
* Sets the marker's icon
*
* @param Icon $icon
*/
public function setIcon($icon) //Icon - if you force the icon as type, the makimarker won't work...:(
{
$this->clientOptions['icon'] = $icon;
}

/**
* @return \dosamigos\leaflet\types\Icon
*/
public function getIcon()
{
return isset($this->clientOptions['icon']) ? $this->clientOptions['icon'] : null;
}

/**
* Initializes the marker.
* @throws \yii\base\InvalidConfigException
*/
public function init()
{
parent::init();
if (empty($this->latLng)) {
throw new InvalidConfigException("'latLng' attribute cannot be empty.");
}
}

/**
* @return \yii\web\JsExpression the marker constructor string
*/
public function encode()
{
$latLon = $this->getLatLng()->toArray(true);
$options = $this->getOptions();
$name = $this->name;
$map = $this->map;
$js = $this->bindPopupContent("L.marker($latLon, $options)") . ($map !== null ? ".addTo($map)" : "");
if (!empty($name)) {
$js = "var $name = $js;";
}
$js .= $this->getEvents() . ($map !== null && empty($name)? ";" : "");

return new JsExpression($js);
}
}

+ 45
- 0
vendor/2amigos/yii2-leaflet-extension/src/layers/NameTrait.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/
namespace dosamigos\leaflet\layers;


use dosamigos\leaflet\LeafLet;

trait NameTrait
{
/**
* @var string the variable name. If not null, then the js creation script
* will be returned as a variable. If null, then the js creation script will
* be returned as a constructor that you can use on other object's configuration options.
*/
private $_name;

/**
* Returns the name of the layer.
*
* @param boolean $autoGenerate whether to generate a name if it is not set previously
*
* @return string name of the layer.
*/
public function getName($autoGenerate = false)
{
if ($autoGenerate && $this->_name === null) {
$this->_name = LeafLet::generateName();
}
return $this->_name;
}

/**
* Sets the name of the layer.
*
* @param string $value name of the layer.
*/
public function setName($value)
{
$this->_name = $value;
}
}

+ 113
- 0
vendor/2amigos/yii2-leaflet-extension/src/layers/PolyLine.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/

namespace dosamigos\leaflet\layers;

use dosamigos\leaflet\LeafLet;
use dosamigos\leaflet\types\LatLng;
use dosamigos\leaflet\types\LatLngBounds;
use yii\base\InvalidParamException;
use yii\helpers\Json;
use yii\web\JsExpression;

/**
* PolyLine is a class for drawing a polygon overlay on the map.
*
* @see http://leafletjs.com/reference.html#polyline
* @package dosamigos\leaflet\layers
*/
/**
* @property string $name
* @property string $popupContent
* @property bool $openPopup
*/
class PolyLine extends Layer
{
use PopupTrait;

/**
* @var LatLng[]
*/
private $_latLngs = [];
/**
* @var LatLngBounds
*/
private $_bounds;

/**
* @param array $latLngs
*
* @throws \yii\base\InvalidParamException
*/
public function setLatLngs(array $latLngs)
{
foreach ($latLngs as $latLng) {
if (!($latLng instanceof LatLng)) {
throw new InvalidParamException("Wrong parameter. All items should be of type LatLng.");
}
}
$this->_latLngs = $latLngs;
$this->setBounds();
}

/**
* @return \dosamigos\leaflet\types\LatLng[]
*/
public function getLatLngs()
{
return $this->_latLngs;
}

/**
* Returns the latLngs as array objects
* @return array
*/
public function getLatLngstoArray()
{
$latLngs = [];
foreach ($this->getLatLngs() as $latLng) {
$latLngs[] = $latLng->toArray();
}
return $latLngs;
}

/**
* Returns the LatLngBounds of the polyline.
* @return LatLngBounds
*/
public function getBounds()
{
return $this->_bounds;
}

/**
* Sets bounds after initialization of the [[LatLng]] objects that compound the polyline.
*/
protected function setBounds()
{
$this->_bounds = LatLngBounds::getBoundsOfLatLngs($this->getLatLngs());
}

/**
* Returns the javascript ready code for the object to render
* @return string
*/
public function encode()
{
$latLngs = Json::encode($this->getLatLngstoArray(), LeafLet::JSON_OPTIONS);
$options = $this->getOptions();
$name = $this->name;
$map = $this->map;
$js = $this->bindPopupContent("L.polyline($latLngs, $options)") . ($map !== null ? ".addTo($map);" : "");
if (!empty($name)) {
$js = "var $name = $js" . ($map !== null ? "" : ";");
}

return new JsExpression($js);
}

}

+ 53
- 0
vendor/2amigos/yii2-leaflet-extension/src/layers/Polygon.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/

namespace dosamigos\leaflet\layers;

use dosamigos\leaflet\LeafLet;
use yii\helpers\Json;
use yii\web\JsExpression;

/**
* Polygon is a class for drawing polygon overlays on a map
*
* @see http://leafletjs.com/reference.html#polygon
* @author Antonio Ramirez <amigo.cobos@gmail.com>
* @link http://www.ramirezcobos.com/
* @link http://www.2amigos.us/
* @package dosamigos\leaflet\layers
*/
/**
* @property string $name
*/
class Polygon extends PolyLine
{

/**
* @var bool whether to insert the layer at the bottom most position (z-index) on the map in reference to other
* ui layers.
*/
public $insertAtTheBottom = false;

/**
* Returns the javascript ready code for the object to render on the map.
* To add a Polygon to the map, you need to use the special method [[LetLeaf::addPolygon]].
* @return string
*/
public function encode()
{
$latLngs = Json::encode($this->getLatLngstoArray(), LeafLet::JSON_OPTIONS);
$options = $this->getOptions();
$name = $this->name;
$map = $this->map;
$js = $this->bindPopupContent("L.polygon($latLngs, $options)") . ($map !== null ? ".addTo($map);" : "");
if (!empty($name)) {
$js = "var $name = $js" . ($map !== null ? "" : ";");
}
return new JsExpression($js);
}

}

+ 63
- 0
vendor/2amigos/yii2-leaflet-extension/src/layers/Popup.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/

namespace dosamigos\leaflet\layers;

use yii\base\InvalidConfigException;
use yii\web\JsExpression;

/**
* Popup is used to open popups in certain places of the map. For popups directly attached to an
* object (ie [[Marker]]) better use their `popup` attribute.
*
* @see http://leafletjs.com/reference.html#popup
* @package dosamigos\leaflet\layers
*/

/**
* @property \dosamigos\leaflet\types\LatLng $latLng
*/
class Popup extends Layer
{

use LatLngTrait;

/**
* @var string the HTML content of the popup
*/
public $content;

/**
* Initializes the marker.
* @throws \yii\base\InvalidConfigException
*/
public function init()
{
parent::init();
if (empty($this->latLng)) {
throw new InvalidConfigException("'latLon' attribute cannot be empty.");
}
}

/**
* Returns the javascript ready code for the object to render
* @return string
*/
public function encode()
{
$latLon = $this->getLatLng()->encode();
$options = $this->getOptions();
$name = $this->name;
$map = $this->map;
$js = "L.popup($options).setLatLng($latLon).setContent('$this->content')" . ($map !== null ? ".addTo($map);" : "");
if (!empty($name)) {
$js = "var $name = $js" . ($map !== null ? "" : ";");
}

return new JsExpression($js);
}
}

+ 45
- 0
vendor/2amigos/yii2-leaflet-extension/src/layers/PopupTrait.php View File

<?php
/**
*
* PopupTrait.php
*
* Date: 15/02/14
* Time: 11:03
* @author Antonio Ramirez <amigo.cobos@gmail.com>
* @link http://www.ramirezcobos.com/
* @link http://www.2amigos.us/
*/

namespace dosamigos\leaflet\layers;


trait PopupTrait
{
/**
* @var string the HTML content of the popup to display when clicking on the marker.
*/
public $popupContent;
/**
* @var bool whether to open the popup dialog on display.
*/
public $openPopup = false;

/**
* Binds popup content (if any) to the js code to register
*
* @param string $js
*
* @return string
*/
protected function bindPopupContent($js)
{
if (!empty($this->popupContent)) {
$content = addslashes($this->popupContent);
$js .= ".bindPopup(\"{$content}\")";
if ($this->openPopup) {
$js .= ".openPopup()";
}
}
return $js;
}
}

+ 70
- 0
vendor/2amigos/yii2-leaflet-extension/src/layers/Rectangle.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/

namespace dosamigos\leaflet\layers;

use dosamigos\leaflet\types\LatLngBounds;
use yii\web\JsExpression;

/**
* Rectangle a class for drawing rectangle overlays on a map.
*
* @see http://leafletjs.com/reference.html#rectangle
* @author Antonio Ramirez <amigo.cobos@gmail.com>
* @link http://www.ramirezcobos.com/
* @link http://www.2amigos.us/
* @package dosamigos\leaflet\layers
*/
/**
* @property string $name
* @property string $popupContent
* @property bool $openPopup
*/
class Rectangle extends Layer
{
use PopupTrait;

/**
* @var LatLngBounds
*/
private $_bounds;

/**
* @param LatLngBounds $bounds
*/
public function setBounds(LatLngBounds $bounds)
{
$bounds->name = null;
$this->_bounds = $bounds;
}

/**
* @return LatLngBounds
*/
public function getBounds()
{
return $this->_bounds;
}

/**
* Returns the javascript ready code for the object to render
* @return string
*/
public function encode()
{
$bounds = $this->getBounds()->encode();
$options = $this->getOptions();
$name = $this->name;
$map = $this->map;
$js = $this->bindPopupContent("L.rectangle($bounds, $options)") . ($map !== null ? ".addTo($map);" : "");
if (!empty($name)) {
$js = "var $name = $js" . ($map !== null ? "" : ";");
}
return new JsExpression($js);
}

}

+ 77
- 0
vendor/2amigos/yii2-leaflet-extension/src/layers/TileLayer.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/

namespace dosamigos\leaflet\layers;


use yii\base\InvalidConfigException;
use yii\web\JsExpression;

/**
* TileLayer is used to load and display tile layers on the map
*
* @see http://leafletjs.com/reference.html#tilelayer
* @author Antonio Ramirez <amigo.cobos@gmail.com>
* @link http://www.ramirezcobos.com/
* @link http://www.2amigos.us/
* @package dosamigos\leaflet\layers
*/
class TileLayer extends Layer
{

/**
* @var string a template has the following form:
*
* ```
* 'http://{s}.somedomain.com/blabla/{z}/{x}/{y}.png'
* ```
*
* {s} means one of the available subdomains (used sequentially to help with browser parallel requests per domain
* limitation; subdomain values are specified in options; a, b or c by default, can be omitted), {z} — zoom level,
* {x} and {y} — tile coordinates.
*
* You can use custom keys in the template, which will be evaluated from TileLayer options, like this:
*
* ```
* $layer = new TileLayer([
* 'urlTemplate' => 'L.tileLayer('http://{s}.somedomain.com/{foo}/{z}/{x}/{y}.png',
* 'clientOptions' => [
* 'foo' => 'bar'
* ]
* ]);
* ```
*/
public $urlTemplate;

/**
* @throws \yii\base\InvalidConfigException
*/
public function init()
{
parent::init();
if (empty($this->urlTemplate)) {
throw new InvalidConfigException("'urlTemplate' cannot be empty.");
}
}

/**
* @return \yii\web\JsExpression the marker constructor string
*/
public function encode()
{
$options = $this->getOptions();
$name = $this->getName();
$map = $this->map;
$js = "L.tileLayer('$this->urlTemplate', $options)" . ($map !== null ? ".addTo($map);" : "");
if (!empty($name)) {
$js = "var $name = $js" . ($map !== null ? "" : ";");
$js .= $this->getEvents();
}

return new JsExpression($js);
}
}

+ 26
- 0
vendor/2amigos/yii2-leaflet-extension/src/types/ArrayableInterface.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/

namespace dosamigos\leaflet\types;


/**
* Arrayable should be implemented by classes that need to be represented in array format.
*
* @package dosamigos\leaflet\types
*/
interface ArrayableInterface
{
/**
* Converts the object into an array.
*
* @param bool $encode whether to return the array json_encoded or raw
*
* @return array the array representation of this object
*/
public function toArray($encode = false);
}

+ 110
- 0
vendor/2amigos/yii2-leaflet-extension/src/types/Bounds.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/

namespace dosamigos\leaflet\types;

use yii\base\InvalidConfigException;
use yii\web\JsExpression;


/**
* Bounds represents a rectangular area in pixel coordinates.
*
* @see http://leafletjs.com/reference.html#bounds
* @author Antonio Ramirez <amigo.cobos@gmail.com>
* @link http://www.ramirezcobos.com/
* @link http://www.2amigos.us/
* @package dosamigos\leaflet\types
*/

/**
* @property Point $min
* @property Point $max
*/
class Bounds extends Type implements ArrayableInterface
{

/**
* @var Point the top left corner of the rectangle
*/
private $_min;

/**
* @var Point the bottom right corner of the rectangle
*/
private $_max;

/**
* @param Point $max
*/
public function setMax(Point $max)
{
$this->_max = $max;
}

/**
* @return Point
*/
public function getMax()
{
return $this->_max;
}

/**
* @param Point $min
*/
public function setMin(Point $min)
{
$this->_min = $min;
}

/**
* @return Point
*/
public function getMin()
{
return $this->_min;
}

/**
* Initializes the object
* @throws \yii\base\InvalidConfigException
*/
public function init()
{
if (empty($this->min) || empty($this->max)) {
throw new InvalidConfigException("'min' and 'max' attributes cannot be empty.");
}
}

/**
* @return \yii\web\JsExpression the js initialization code of the object
*/
public function encode()
{
$min = $this->getMin()->toArray(true);
$max = $this->getMax()->toArray(true);

return new JsExpression("L.bounds($min, $max)");
}

/**
* Converts the object into an array.
*
* @param bool $encode whether to return the array json_encoded or raw
*
* @return array the array representation of this object
*/
public function toArray($encode = false)
{
$min = $this->getMin()->toArray($encode);
$max = $this->getMax()->toArray($encode);
return $encode ? "[$min, $max]" : [$min, $max];
}


}

+ 130
- 0
vendor/2amigos/yii2-leaflet-extension/src/types/DivIcon.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/

namespace dosamigos\leaflet\types;

use dosamigos\leaflet\LeafLet;
use yii\helpers\Json;
use yii\web\JsExpression;

/**
*
* DivIcon represents a lightweight icon for markers that uses a simple div element instead of an image.
*
* @see http://leafletjs.com/reference.html#divicon
* @author Antonio Ramirez <amigo.cobos@gmail.com>
* @link http://www.ramirezcobos.com/
* @link http://www.2amigos.us/
* @package dosamigos\leaflet\types
*/
class DivIcon extends Type
{
/**
* @var string the variable name. If not null, then the js icon creation script
* will be returned as a variable:
*
* ```
* var iconName = L.divIcon({...});
* // after it can be shared among other markers
* L.marker({icon: iconName, ...).addTo(map);
* L.marker({icon: iconName, ...).addTo(map);
* ```
* If null, the js icon creation script will be returned to be used as constructor so it can be used within another
* constructor options:
*
* ```
* L.marker({icon: L.icon({...}), ...).addTo(map);
* ```
*/
public $name;
/**
* @var string a custom class name to assign to both icon and shadow images. Empty by default.
*/
public $className;
/**
* @var string a custom HTML code to put inside the div element, empty by default.
*/
public $html;
/**
* @var Point size of the icon image in pixels.
*/
private $_iconSize;
/**
* @var Point the coordinates of the "tip" of the icon (relative to its top left corner). The icon will be aligned so
* that this point is at the marker's geographical location. Centered by default if size is specified, also can be
* set in CSS with negative margins.
*/
private $_iconAnchor;

/**
* @param Point $iconSize
*/
public function setIconSize(Point $iconSize)
{
$this->_iconSize = $iconSize;
}

/**
* @return Point
*/
public function getIconSize()
{
return $this->_iconSize;
}

/**
* @param Point $iconAnchor
*/
public function setIconAnchor(Point $iconAnchor)
{
$this->_iconAnchor = $iconAnchor;
}

/**
* @return Point
*/
public function getIconAnchor()
{
return $this->_iconAnchor;
}

/**
* @return \yii\web\JsExpression the js initialization code of the object
*/
public function encode()
{
$options = Json::encode($this->getOptions(), LeafLet::JSON_OPTIONS);

$js = "L.divIcon($options)";
if ($this->name) {
$js = "var $this->name = $js;";
}
return new JsExpression($js);
}

/**
* @return array the configuration options of the array
*/
public function getOptions()
{
$options = [];
$class = new \ReflectionClass(__CLASS__);
foreach ($class->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) {
if (!$property->isStatic()) {
$name = $property->getName();
$options[$name] = $this->$name;
}
}
foreach (['iconSize', 'iconAnchor'] as $property) {
$point = $this->$property;
if ($point instanceof Point) {
$options[$property] = $point->toArray(true);
}
}
return array_filter($options);
}
}

+ 217
- 0
vendor/2amigos/yii2-leaflet-extension/src/types/Icon.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/

namespace dosamigos\leaflet\types;

use dosamigos\leaflet\LeafLet;
use yii\base\InvalidConfigException;
use yii\helpers\Json;
use yii\web\JsExpression;


/**
* Icon represents an icon to provide when creating a marker.
*
* @see http://leafletjs.com/reference.html#icon
* @author Antonio Ramirez <amigo.cobos@gmail.com>
* @link http://www.ramirezcobos.com/
* @link http://www.2amigos.us/
* @package dosamigos\leaflet\types
*/
class Icon extends Type
{
/**
* @var string the variable name. If not null, then the js icon creation script
* will be returned as a variable:
*
* ```
* var iconName = L.icon({...});
* // after it can be shared among other markers
* L.marker({icon: iconName, ...).addTo(map);
* L.marker({icon: iconName, ...).addTo(map);
* ```
* If null, the js icon creation script will be returned to be used as constructor so it can be used within another
* constructor options:
*
* ```
* L.marker({icon: L.icon({...}), ...).addTo(map);
* ```
*/
public $name;
/**
* @var string (required) the URL to the icon image (absolute or relative to your script path).
*/
public $iconUrl;
/**
* @var string the URL to a retina sized version of the icon image (absolute or relative to your script path). Used
* for Retina screen devices.
*/
public $iconRetinaUrl;
/**
* @var string the URL to the icon shadow image. If not specified, no shadow image will be created.
*/
public $shadowUrl;
/**
* @var string the URL to the retina sized version of the icon shadow image. If not specified, no shadow image will
* be created. Used for Retina screen devices.
*/
public $shadowRetinaUrl;
/**
* @var string a custom class name to assign to both icon and shadow images. Empty by default.
*/
public $className;
/**
* @var Point size of the icon image in pixels.
*/
private $_iconSize;
/**
* @var Point the coordinates of the "tip" of the icon (relative to its top left corner). The icon will be aligned so
* that this point is at the marker's geographical location. Centered by default if size is specified, also can be
* set in CSS with negative margins.
*/
private $_iconAnchor;
/**
* @var Point size of the shadow image in pixels.
*/
private $_shadowSize;
/**
* @var Point the coordinates of the "tip" of the shadow (relative to its top left corner) (the same as iconAnchor
* if not specified).
*/
private $_shadowAnchor;
/**
* @var Point the coordinates of the point from which popups will "open", relative to the icon anchor.
*/
private $_popupAnchor;

/**
* @param Point $iconAnchor
*/
public function setIconAnchor(Point $iconAnchor)
{
$this->_iconAnchor = $iconAnchor;
}

/**
* @return Point
*/
public function getIconAnchor()
{
return $this->_iconAnchor;
}

/**
* @param Point $iconSize
*/
public function setIconSize(Point $iconSize)
{
$this->_iconSize = $iconSize;
}

/**
* @return Point
*/
public function getIconSize()
{
return $this->_iconSize;
}

/**
* @param Point $popupAnchor
*/
public function setPopupAnchor(Point $popupAnchor)
{
$this->_popupAnchor = $popupAnchor;
}

/**
* @return Point
*/
public function getPopupAnchor()
{
return $this->_popupAnchor;
}

/**
* @param Point $shadowAnchor
*/
public function setShadowAnchor(Point $shadowAnchor)
{
$this->_shadowAnchor = $shadowAnchor;
}

/**
* @return Point
*/
public function getShadowAnchor()
{
return $this->_shadowAnchor;
}

/**
* @param Point $shadowSize
*/
public function setShadowSize(Point $shadowSize)
{
$this->_shadowSize = $shadowSize;
}

/**
* @return Point
*/
public function getShadowSize()
{
return $this->_shadowSize;
}

/**
* Initializes the object
* @throws \yii\base\InvalidConfigException
*/
public function init()
{
if (empty($this->iconUrl)) {
throw new InvalidConfigException("'iconUrl' attribute cannot be empty.");
}
}

/**
* @return string the js initialization code of the object
*/
public function encode()
{
$options = Json::encode($this->getOptions(), LeafLet::JSON_OPTIONS);

$js = "L.icon($options)";
if ($this->name) {
$js = "var $this->name = $js;";
}
return new JsExpression($js);
}

/**
* @return array the configuration options of the array
*/
public function getOptions()
{
$options = [];
$class = new \ReflectionClass(__CLASS__);
foreach ($class->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) {
if (!$property->isStatic()) {
$name = $property->getName();
$options[$name] = $this->$name;
}
}
foreach (['iconAnchor', 'iconSize', 'popupAnchor', 'shadowAnchor', 'shadowSize'] as $property) {
$point = $this->$property;
if ($point instanceof Point) {
$options[$property] = $point->toArray(true);
}
}
return array_filter($options);
}
}

+ 81
- 0
vendor/2amigos/yii2-leaflet-extension/src/types/LatLng.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/
namespace dosamigos\leaflet\types;

use dosamigos\leaflet\LeafLet;
use yii\base\InvalidConfigException;
use yii\helpers\Json;
use yii\web\JsExpression;

/**
* LatLng
* Represents a geographical point with a certain latitude and longitude. Please, note that
* all Leaflet methods that accept LatLng objects also accept them in a simple Array form and simple object form
* (unless noted otherwise), so these lines are equivalent:
*
* ```
* use dosamigos\leafletjs\layers\Marker;
* use dosamigos\leafletjs\types\LatLng;
*
* $marker = new Marker(['latLong'=>[50, 30]]);
* $marker = new Marker(new LatLng(['latLng'=>[50,30]]));
* ```
*
* @see http://leafletjs.com/reference.html#latlng
* @see http://leafletjs.com/reference.html#bounds
* @author Antonio Ramirez <amigo.cobos@gmail.com>
* @link http://www.ramirezcobos.com/
* @link http://www.2amigos.us/
* @package dosamigos\leaflet\types
*/
class LatLng extends Type implements ArrayableInterface
{
/**
* @var float the latitude in degrees.
*/
public $lat;
/**
* @var float the longitude in degrees.
*/
public $lng;

/**
* Initializes the object
* @throws \yii\base\InvalidConfigException
*/
public function init()
{
if ($this->lat === null || $this->lng === null) {
throw new InvalidConfigException("'lat' and 'lng' attributes cannot be empty.");
}
}

/**
* LatLng is and object to be used
* @return \yii\web\JsExpression the js initialization code of the object
*/
public function encode()
{
return new JsExpression("L.latLng($this->lat, $this->lng)"); // no semicolon
}

/**
* Returns the lat and lng as array
*
* @param bool $encode whether to return the array json_encoded or raw
*
* @return array|JsExpression
*/
public function toArray($encode = false)
{
$latLng = [$this->lat, $this->lng];

return $encode
? new JsExpression(Json::encode($latLng, LeafLet::JSON_OPTIONS))
: $latLng;
}
}

+ 151
- 0
vendor/2amigos/yii2-leaflet-extension/src/types/LatLngBounds.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/
namespace dosamigos\leaflet\types;

use yii\base\InvalidConfigException;
use yii\base\InvalidParamException;
use yii\web\JsExpression;

/**
* LatLngBounds represents a rectangular geographical area on a map.
*
* @see http://leafletjs.com/reference.html#latlngbounds
* @author Antonio Ramirez <amigo.cobos@gmail.com>
* @link http://www.ramirezcobos.com/
* @link http://www.2amigos.us/
* @package dosamigos\leaflet\types
*/

/**
* @property LatLng $southWest
* @property LatLng $northEast
*/
class LatLngBounds extends Type
{
/**
* @var string the variable name. If not null, then the js icon creation script
* will be returned as a variable:
*
* ```
* var bounds = L.latLngBounds(...);
* // after it can be included to the map
* map.fitBounds(bounds);
* ```
* If null, the js icon creation script will be returned to be used as constructor so it can be used within another
* constructor options:
*
* ```
* L.map({maxBounds: L.latLngBounds(...));
* ```
*/
public $name;
/**
* @var LatLng the southWest boundary
*/
private $_southWest;
/**
* @var LatLng the northEast boundary
*/
private $_northEast;

/**
* @return LatLng
*/
public function getSouthWest()
{
return $this->_southWest;
}

/**
* @param LatLng $latLng
*/
public function setSouthWest(LatLng $latLng)
{
$this->_southWest = $latLng;
}

/**
* @return LatLng
*/
public function getNorthEast()
{
return $this->_northEast;
}

/**
* @param LatLng $latLng
*/
public function setNorthEast(LatLng $latLng)
{
$this->_northEast = $latLng;
}

/**
* Initializes the class
* @throws \yii\base\InvalidConfigException
*/
public function init()
{
parent::init();
if (empty($this->southWest) || empty($this->northEast)) {
throw new InvalidConfigException("'southEast' and/or 'northEast' cannot be empty");
}
}

/**
* @return \yii\web\JsExpression the js initialization code of the object
*/
public function encode()
{
$southWest = $this->getSouthWest()->toArray(true);
$northEast = $this->getNorthEast()->toArray(true);
$js = "L.latLngBounds($southWest, $northEast)";
if (!empty($this->name)) {
$js = "var $this->name = $js;";
}
return new JsExpression($js);
}

/**
* Finds bounds of an array of LatLng instances
*
* @param LatLng[] $latLngs
* @param int $margin
*
* @return LatLngBounds
*/
public static function getBoundsOfLatLngs(array $latLngs, $margin = 0)
{
$min_lat = 1000;
$max_lat = -1000;
$min_lng = 1000;
$max_lng = -1000;
foreach ($latLngs as $latLng) {
if (!($latLng instanceof LatLng)) {
throw new InvalidParamException('"$latLngs" should be an array of LatLng instances.');
}
/* @var $coord LatLng */
$min_lat = min($min_lat, $latLng->lat);
$max_lat = max($max_lat, $latLng->lat);
$min_lng = min($min_lng, $latLng->lng);
$max_lng = max($max_lng, $latLng->lng);
}
if ($margin > 0) {
$min_lat = $min_lat - $margin * ($max_lat - $min_lat);
$min_lng = $min_lng - $margin * ($max_lng - $min_lng);
$max_lat = $max_lat + $margin * ($max_lat - $min_lat);
$max_lng = $max_lng + $margin * ($max_lng - $min_lng);
}
$bounds = new LatLngBounds(
[
'southWest' => new LatLng(['lat' => $min_lat, 'lng' => $min_lng]),
'northEast' => new LatLng(['lat' => $max_lat, 'lng' => $max_lng])
]
);
return $bounds;
}
}

+ 76
- 0
vendor/2amigos/yii2-leaflet-extension/src/types/Point.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/

namespace dosamigos\leaflet\types;

use dosamigos\leaflet\LeafLet;
use yii\base\InvalidConfigException;
use yii\helpers\Json;
use yii\web\JsExpression;

/**
* Point represents a point with x and y coordinates in pixels.
*
* ```
* $map->panBy(new Point(['x' => 200, 'y' => '300']));
* ```
*
* @see http://leafletjs.com/reference.html#point
* @author Antonio Ramirez <amigo.cobos@gmail.com>
* @link http://www.ramirezcobos.com/
* @link http://www.2amigos.us/
* @package dosamigos\leaflet\types
*/
class Point extends Type implements ArrayableInterface
{
/**
* @var float x coordinate
*/
public $x;
/**
* @var float y coordinate
*/
public $y;
/**
* @var bool if round is set to true, LetLeaf will round the x and y values.
*/
public $round = false;

/**
* Initializes the class
* @throws \yii\base\InvalidConfigException
*/
public function init()
{
if (empty($this->x) || empty($this->y)) {
throw new InvalidConfigException("'x' or 'y' cannot be empty.");
}
}

/**
* @return \yii\web\JsExpression the js initialization code of the object
*/
public function encode()
{
$x = $this->x;
$y = $this->y;
return new JsExpression("L.point($x, $y)"); // no semicolon
}

/**
* Returns the point values as array
*
* @param bool $encode whether to return the array json_encoded or raw
*
* @return array|JsExpression
*/
public function toArray($encode = false)
{
$point = [$this->x, $this->y];
return $encode ? new JsExpression(Json::encode($point, LeafLet::JSON_OPTIONS)) : $point;
}
}

+ 25
- 0
vendor/2amigos/yii2-leaflet-extension/src/types/Type.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/
namespace dosamigos\leaflet\types;

use yii\base\Component;

/**
* Type is the abstract class for all Types
*
* @author Antonio Ramirez <amigo.cobos@gmail.com>
* @link http://www.ramirezcobos.com/
* @link http://www.2amigos.us/
* @package dosamigos\leaflet\types
*/
abstract class Type extends Component
{
/**
* @return string|\yii\web\JsExpression the js initialization code of the object
*/
abstract public function encode();
}

+ 116
- 0
vendor/2amigos/yii2-leaflet-extension/src/widgets/Map.php View File

<?php
/**
* @copyright Copyright (c) 2013-2015 2amigOS! Consulting Group LLC
* @link http://2amigos.us
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
*/

namespace dosamigos\leaflet\widgets;

use dosamigos\leaflet\LeafLet;
use dosamigos\leaflet\LeafLetAsset;
use yii\base\InvalidConfigException;
use yii\base\Widget;
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
use yii\helpers\Json;

/**
* Widget Map renders the map using the LeafLet component configurations for rendering on the view.
* *Important* It is very important to specify the height of the widget, whether with a class name or through an inline
* style. Failing to configure the height may have unexpected rendering results.
*
* @package dosamigos\leaflet\widgets
*/
class Map extends Widget
{
/**
* @var \dosamigos\leaflet\LeafLet component holding all configuration
*/
public $leafLet;
/**
* @var string the height of the map. Failing to configure the height of the map, will result in
* unexpected results.
*/
public $height = '200px';
/**
* @var array the HTML attributes for the widget container tag.
*/
public $options = [];

/**
* Initializes the widget.
* This method will register the bootstrap asset bundle. If you override this method,
* make sure you call the parent implementation first.
*/
public function init()
{
parent::init();
if (!isset($this->options['id'])) {
$this->options['id'] = $this->getId();
}
if (empty($this->leafLet) || !($this->leafLet instanceof LeafLet)) {
throw new InvalidConfigException(
"'leafLet' attribute cannot be empty and should be of type LeafLet component."
);
}
if(is_numeric($this->height)) {
$this->height .= 'px';
}

Html::addCssStyle($this->options, ['height' => $this->height], false);
}

/**
* Renders the map
* @return string|void
*/
public function run()
{
echo "\n" . Html::tag('div', '', $this->options);
$this->registerScript();
}

/**
* Register the script for the map to be rendered according to the configurations on the LeafLet
* component.
*/
public function registerScript()
{
$view = $this->getView();

LeafLetAsset::register($view);
$this->leafLet->getPlugins()->registerAssetBundles($view);

$id = $this->options['id'];
$name = $this->leafLet->name;
$js = $this->leafLet->getJs();

$clientOptions = $this->leafLet->clientOptions;

// for map load event to fire, we have to postpone setting view, until events are bound
// see https://github.com/Leaflet/Leaflet/issues/3560
$lateInitClientOptions['center'] = Json::encode($clientOptions['center']);
$lateInitClientOptions['zoom'] = $clientOptions['zoom'];
unset($clientOptions['center']);
unset($clientOptions['zoom']);

$options = empty($clientOptions) ? '{}' : Json::encode($clientOptions, LeafLet::JSON_OPTIONS);
array_unshift($js, "var $name = L.map('$id', $options);");
if ($this->leafLet->getTileLayer() !== null) {
$js[] = $this->leafLet->getTileLayer()->encode();
}

$clientEvents = $this->leafLet->clientEvents;

if (!empty($clientEvents)) {
foreach ($clientEvents as $event => $handler) {
$js[] = "$name.on('$event', $handler);";
}
}

$js[] = "$name.setView({$lateInitClientOptions['center']}, {$lateInitClientOptions['zoom']});";

$view->registerJs("function {$name}_init(){\n" . implode("\n", $js) . "}\n{$name}_init();");
}
}

+ 1
- 0
vendor/bin/markdown View File

../cebe/markdown/bin/markdown

+ 1
- 0
vendor/bin/yii View File

../yiisoft/yii2/yii

+ 5
- 0
vendor/bower/bootstrap/CHANGELOG.md View File

Bootstrap uses [GitHub's Releases feature](https://github.com/blog/1547-release-your-software) for its changelogs.

See [the Releases section of our GitHub project](https://github.com/twbs/bootstrap/releases) for changelogs for each release version of Bootstrap.

Release announcement posts on [the official Bootstrap blog](http://blog.getbootstrap.com) contain summaries of the most noteworthy changes made in each release.

+ 6
- 0
vendor/bower/bootstrap/Gemfile View File

source 'https://rubygems.org'

group :development, :test do
gem 'jekyll', '~> 3.1.2'
gem 'jekyll-sitemap', '~> 0.11.0'
end

+ 43
- 0
vendor/bower/bootstrap/Gemfile.lock View File

GEM
remote: https://rubygems.org/
specs:
addressable (2.4.0)
colorator (0.1)
ffi (1.9.14-x64-mingw32)
jekyll (3.1.6)
colorator (~> 0.1)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1)
kramdown (~> 1.3)
liquid (~> 3.0)
mercenary (~> 0.3.3)
rouge (~> 1.7)
safe_yaml (~> 1.0)
jekyll-sass-converter (1.4.0)
sass (~> 3.4)
jekyll-sitemap (0.11.0)
addressable (~> 2.4.0)
jekyll-watch (1.4.0)
listen (~> 3.0, < 3.1)
kramdown (1.11.1)
liquid (3.0.6)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
mercenary (0.3.6)
rb-fsevent (0.9.7)
rb-inotify (0.9.7)
ffi (>= 0.5.0)
rouge (1.11.1)
safe_yaml (1.0.4)
sass (3.4.22)

PLATFORMS
x64-mingw32

DEPENDENCIES
jekyll (~> 3.1.2)
jekyll-sitemap (~> 0.11.0)

BUNDLED WITH
1.12.5

+ 78
- 76
vendor/bower/bootstrap/Gruntfile.js View File

/*! /*!
* Bootstrap's Gruntfile * Bootstrap's Gruntfile
* http://getbootstrap.com * http://getbootstrap.com
* Copyright 2013-2015 Twitter, Inc.
* Copyright 2013-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */




var fs = require('fs'); var fs = require('fs');
var path = require('path'); var path = require('path');
var npmShrinkwrap = require('npm-shrinkwrap');
var generateGlyphiconsData = require('./grunt/bs-glyphicons-data-generator.js'); var generateGlyphiconsData = require('./grunt/bs-glyphicons-data-generator.js');
var BsLessdocParser = require('./grunt/bs-lessdoc-parser.js'); var BsLessdocParser = require('./grunt/bs-lessdoc-parser.js');
var getLessVarsData = function () { var getLessVarsData = function () {
banner: '/*!\n' + banner: '/*!\n' +
' * Bootstrap v<%= pkg.version %> (<%= pkg.homepage %>)\n' + ' * Bootstrap v<%= pkg.version %> (<%= pkg.homepage %>)\n' +
' * Copyright 2011-<%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' + ' * Copyright 2011-<%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
' * Licensed under <%= pkg.license.type %> (<%= pkg.license.url %>)\n' +
' * Licensed under the <%= pkg.license %> license\n' +
' */\n', ' */\n',
jqueryCheck: configBridge.config.jqueryCheck.join('\n'), jqueryCheck: configBridge.config.jqueryCheck.join('\n'),
jqueryVersionCheck: configBridge.config.jqueryVersionCheck.join('\n'), jqueryVersionCheck: configBridge.config.jqueryVersionCheck.join('\n'),
options: { options: {
jshintrc: 'grunt/.jshintrc' jshintrc: 'grunt/.jshintrc'
}, },
src: ['Gruntfile.js', 'grunt/*.js']
src: ['Gruntfile.js', 'package.js', 'grunt/*.js']
}, },
core: { core: {
src: 'js/*.js' src: 'js/*.js'


uglify: { uglify: {
options: { options: {
preserveComments: 'some'
compress: {
warnings: false
},
mangle: true,
preserveComments: /^!|@preserve|@license|@cc_on/i
}, },
core: { core: {
src: '<%= concat.bootstrap.dest %>', src: '<%= concat.bootstrap.dest %>',
src: 'dist/css/<%= pkg.name %>-theme.css' src: 'dist/css/<%= pkg.name %>-theme.css'
}, },
docs: { docs: {
src: 'docs/assets/css/src/docs.css'
src: ['docs/assets/css/src/docs.css']
}, },
examples: { examples: {
expand: true, expand: true,


cssmin: { cssmin: {
options: { options: {
// TODO: disable `zeroUnits` optimization once clean-css 3.2 is released
// and then simplify the fix for https://github.com/twbs/bootstrap/issues/14837 accordingly
compatibility: 'ie8', compatibility: 'ie8',
keepSpecialComments: '*', keepSpecialComments: '*',
sourceMap: true,
sourceMapInlineSources: true,
advanced: false advanced: false
}, },
minifyCore: { minifyCore: {
}, },
docs: { docs: {
src: [ src: [
'docs/assets/css/src/docs.css',
'docs/assets/css/src/pygments-manni.css'
'docs/assets/css/ie10-viewport-bug-workaround.css',
'docs/assets/css/src/pygments-manni.css',
'docs/assets/css/src/docs.css'
], ],
dest: 'docs/assets/css/docs.min.css' dest: 'docs/assets/css/docs.min.css'
} }
}, },


usebanner: {
options: {
position: 'top',
banner: '<%= banner %>'
},
files: {
src: 'dist/css/*.css'
}
},

csscomb: { csscomb: {
options: { options: {
config: 'less/.csscomb.json' config: 'less/.csscomb.json'


copy: { copy: {
fonts: { fonts: {
src: 'fonts/*',
expand: true,
src: 'fonts/**',
dest: 'dist/' dest: 'dist/'
}, },
docs: { docs: {
src: 'dist/*/*',
dest: 'docs/'
expand: true,
cwd: 'dist/',
src: [
'**/*'
],
dest: 'docs/dist/'
} }
}, },




jekyll: { jekyll: {
options: { options: {
config: '_config.yml'
bundleExec: true,
config: '_config.yml',
incremental: false
}, },
docs: {}, docs: {},
github: { github: {
} }
}, },


jade: {
htmlmin: {
dist: {
options: {
collapseBooleanAttributes: true,
collapseWhitespace: true,
conservativeCollapse: true,
decodeEntities: false,
minifyCSS: {
compatibility: 'ie8',
keepSpecialComments: 0
},
minifyJS: true,
minifyURLs: false,
processConditionalComments: true,
removeAttributeQuotes: true,
removeComments: true,
removeOptionalAttributes: true,
removeOptionalTags: true,
removeRedundantAttributes: true,
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true,
removeTagWhitespace: false,
sortAttributes: true,
sortClassName: true
},
expand: true,
cwd: '_gh_pages',
dest: '_gh_pages',
src: [
'**/*.html',
'!examples/**/*.html'
]
}
},

pug: {
options: { options: {
pretty: true, pretty: true,
data: getLessVarsData data: getLessVarsData
}, },
customizerVars: { customizerVars: {
src: 'docs/_jade/customizer-variables.jade',
src: 'docs/_pug/customizer-variables.pug',
dest: 'docs/_includes/customizer-variables.html' dest: 'docs/_includes/customizer-variables.html'
}, },
customizerNav: { customizerNav: {
src: 'docs/_jade/customizer-nav.jade',
src: 'docs/_pug/customizer-nav.pug',
dest: 'docs/_includes/nav/customize.html' dest: 'docs/_includes/nav/customize.html'
} }
}, },


validation: {
htmllint: {
options: { options: {
charset: 'utf-8',
doctype: 'HTML5',
failHard: true,
reset: true,
relaxerror: [
'Element img is missing required attribute src.',
'Attribute autocomplete not allowed on element input at this point.',
'Attribute autocomplete not allowed on element button at this point.',
'Bad value separator for attribute role on element li.'
ignore: [
'Attribute "autocomplete" not allowed on element "button" at this point.',
'Attribute "autocomplete" is only allowed when the input type is "color", "date", "datetime", "datetime-local", "email", "hidden", "month", "number", "password", "range", "search", "tel", "text", "time", "url", or "week".',
'Element "img" is missing required attribute "src".'
] ]
}, },
files: {
src: '_gh_pages/**/*.html'
}
src: '_gh_pages/**/*.html'
}, },


watch: { watch: {
src: { src: {
files: '<%= jshint.core.src %>', files: '<%= jshint.core.src %>',
tasks: ['jshint:src', 'qunit', 'concat']
tasks: ['jshint:core', 'qunit', 'concat']
}, },
test: { test: {
files: '<%= jshint.test.src %>', files: '<%= jshint.test.src %>',
} }
}, },


sed: {
versionNumber: {
pattern: (function () {
var old = grunt.option('oldver');
return old ? RegExp.quote(old) : old;
})(),
replacement: grunt.option('newver'),
recursive: true
}
},

'saucelabs-qunit': { 'saucelabs-qunit': {
all: { all: {
options: { options: {
throttled: 10, throttled: 10,
maxRetries: 3, maxRetries: 3,
maxPollRetries: 4, maxPollRetries: 4,
urls: ['http://127.0.0.1:3000/js/tests/index.html'],
urls: ['http://127.0.0.1:3000/js/tests/index.html?hidepassed'],
browsers: grunt.file.readYAML('grunt/sauce_browsers.yml') browsers: grunt.file.readYAML('grunt/sauce_browsers.yml')
} }
} }
require('time-grunt')(grunt); require('time-grunt')(grunt);


// Docs HTML validation task // Docs HTML validation task
grunt.registerTask('validate-html', ['jekyll:docs', 'validation']);
grunt.registerTask('validate-html', ['jekyll:docs', 'htmllint']);


var runSubset = function (subset) { var runSubset = function (subset) {
return !process.env.TWBS_TEST || process.env.TWBS_TEST === subset; return !process.env.TWBS_TEST || process.env.TWBS_TEST === subset;


// CSS distribution task. // CSS distribution task.
grunt.registerTask('less-compile', ['less:compileCore', 'less:compileTheme']); grunt.registerTask('less-compile', ['less:compileCore', 'less:compileTheme']);
grunt.registerTask('dist-css', ['less-compile', 'autoprefixer:core', 'autoprefixer:theme', 'usebanner', 'csscomb:dist', 'cssmin:minifyCore', 'cssmin:minifyTheme']);
grunt.registerTask('dist-css', ['less-compile', 'autoprefixer:core', 'autoprefixer:theme', 'csscomb:dist', 'cssmin:minifyCore', 'cssmin:minifyTheme']);


// Full distribution task. // Full distribution task.
grunt.registerTask('dist', ['clean:dist', 'dist-css', 'copy:fonts', 'dist-js']); grunt.registerTask('dist', ['clean:dist', 'dist-css', 'copy:fonts', 'dist-js']);
// Default task. // Default task.
grunt.registerTask('default', ['clean:dist', 'copy:fonts', 'test']); grunt.registerTask('default', ['clean:dist', 'copy:fonts', 'test']);


// Version numbering task.
// grunt change-version-number --oldver=A.B.C --newver=X.Y.Z
// This can be overzealous, so its changes should always be manually reviewed!
grunt.registerTask('change-version-number', 'sed');

grunt.registerTask('build-glyphicons-data', function () { generateGlyphiconsData.call(this, grunt); }); grunt.registerTask('build-glyphicons-data', function () { generateGlyphiconsData.call(this, grunt); });


// task for building customizer // task for building customizer
grunt.registerTask('build-customizer', ['build-customizer-html', 'build-raw-files']); grunt.registerTask('build-customizer', ['build-customizer-html', 'build-raw-files']);
grunt.registerTask('build-customizer-html', 'jade');
grunt.registerTask('build-customizer-html', 'pug');
grunt.registerTask('build-raw-files', 'Add scripts/less files to customizer.', function () { grunt.registerTask('build-raw-files', 'Add scripts/less files to customizer.', function () {
var banner = grunt.template.process('<%= banner %>'); var banner = grunt.template.process('<%= banner %>');
generateRawFiles(grunt, banner); generateRawFiles(grunt, banner);
grunt.registerTask('docs-js', ['uglify:docsJs', 'uglify:customize']); grunt.registerTask('docs-js', ['uglify:docsJs', 'uglify:customize']);
grunt.registerTask('lint-docs-js', ['jshint:assets', 'jscs:assets']); grunt.registerTask('lint-docs-js', ['jshint:assets', 'jscs:assets']);
grunt.registerTask('docs', ['docs-css', 'lint-docs-css', 'docs-js', 'lint-docs-js', 'clean:docs', 'copy:docs', 'build-glyphicons-data', 'build-customizer']); grunt.registerTask('docs', ['docs-css', 'lint-docs-css', 'docs-js', 'lint-docs-js', 'clean:docs', 'copy:docs', 'build-glyphicons-data', 'build-customizer']);
grunt.registerTask('docs-github', ['jekyll:github', 'htmlmin']);


grunt.registerTask('prep-release', ['jekyll:github', 'compress']);

// Task for updating the cached npm packages used by the Travis build (which are controlled by test-infra/npm-shrinkwrap.json).
// This task should be run and the updated file should be committed whenever Bootstrap's dependencies change.
grunt.registerTask('update-shrinkwrap', ['exec:npmUpdate', '_update-shrinkwrap']);
grunt.registerTask('_update-shrinkwrap', function () {
var done = this.async();
npmShrinkwrap({ dev: true, dirname: __dirname }, function (err) {
if (err) {
grunt.fail.warn(err);
}
var dest = 'test-infra/npm-shrinkwrap.json';
fs.renameSync('npm-shrinkwrap.json', dest);
grunt.log.writeln('File ' + dest.cyan + ' updated.');
done();
});
});
grunt.registerTask('prep-release', ['dist', 'docs', 'docs-github', 'compress']);
}; };

+ 22
- 0
vendor/bower/bootstrap/ISSUE_TEMPLATE.md View File

Before opening an issue:

- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue)
- [Validate](http://validator.w3.org/nu/) and [lint](https://github.com/twbs/bootlint#in-the-browser) any HTML to avoid common problems
- Prepare a [reduced test case](https://css-tricks.com/reduced-test-cases/) for any bugs
- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md)

When asking general "how to" questions:

- Please do not open an issue here
- Instead, ask for help on [StackOverflow, IRC, or Slack](https://github.com/twbs/bootstrap/blob/master/README.md#community)

When reporting a bug, include:

- Operating system and version (Windows, Mac OS X, Android, iOS, Win10 Mobile)
- Browser and version (Chrome, Firefox, Safari, IE, MS Edge, Opera 15+, Android Browser)
- Reduced test cases and potential fixes using [JS Bin](https://jsbin.com)

When suggesting a feature, include:

- As much detail as possible for what we should add and why it's important to Bootstrap
- Relevant links to prior art, screenshots, or live demos whenever possible

+ 1
- 1
vendor/bower/bootstrap/LICENSE View File

The MIT License (MIT) The MIT License (MIT)


Copyright (c) 2011-2015 Twitter, Inc
Copyright (c) 2011-2016 Twitter, Inc.


Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

+ 50
- 40
vendor/bower/bootstrap/README.md View File

# [Bootstrap](http://getbootstrap.com) # [Bootstrap](http://getbootstrap.com)
![Bower version](https://img.shields.io/bower/v/bootstrap.svg?style=flat)
[![npm version](https://img.shields.io/npm/v/bootstrap.svg?style=flat)](https://www.npmjs.com/package/bootstrap)
[![Build Status](https://img.shields.io/travis/twbs/bootstrap/master.svg?style=flat)](https://travis-ci.org/twbs/bootstrap)
[![devDependency Status](https://img.shields.io/david/dev/twbs/bootstrap.svg?style=flat)](https://david-dm.org/twbs/bootstrap#info=devDependencies)

[![Slack](https://bootstrap-slack.herokuapp.com/badge.svg)](https://bootstrap-slack.herokuapp.com)
![Bower version](https://img.shields.io/bower/v/bootstrap.svg)
[![npm version](https://img.shields.io/npm/v/bootstrap.svg)](https://www.npmjs.com/package/bootstrap)
[![Build Status](https://img.shields.io/travis/twbs/bootstrap/master.svg)](https://travis-ci.org/twbs/bootstrap)
[![devDependency Status](https://img.shields.io/david/dev/twbs/bootstrap.svg)](https://david-dm.org/twbs/bootstrap#info=devDependencies)
[![NuGet](https://img.shields.io/nuget/v/bootstrap.svg)](https://www.nuget.org/packages/Bootstrap)
[![Selenium Test Status](https://saucelabs.com/browser-matrix/bootstrap.svg)](https://saucelabs.com/u/bootstrap) [![Selenium Test Status](https://saucelabs.com/browser-matrix/bootstrap.svg)](https://saucelabs.com/u/bootstrap)


Bootstrap is a sleek, intuitive, and powerful front-end framework for faster and easier web development, created by [Mark Otto](https://twitter.com/mdo) and [Jacob Thornton](https://twitter.com/fat), and maintained by the [core team](https://github.com/orgs/twbs/people) with the massive support and involvement of the community. Bootstrap is a sleek, intuitive, and powerful front-end framework for faster and easier web development, created by [Mark Otto](https://twitter.com/mdo) and [Jacob Thornton](https://twitter.com/fat), and maintained by the [core team](https://github.com/orgs/twbs/people) with the massive support and involvement of the community.


To get started, check out <http://getbootstrap.com>! To get started, check out <http://getbootstrap.com>!



## Table of contents ## Table of contents


- [Quick start](#quick-start)
- [Bugs and feature requests](#bugs-and-feature-requests)
- [Documentation](#documentation)
- [Contributing](#contributing)
- [Community](#community)
- [Versioning](#versioning)
- [Creators](#creators)
- [Copyright and license](#copyright-and-license)
* [Quick start](#quick-start)
* [Bugs and feature requests](#bugs-and-feature-requests)
* [Documentation](#documentation)
* [Contributing](#contributing)
* [Community](#community)
* [Versioning](#versioning)
* [Creators](#creators)
* [Copyright and license](#copyright-and-license)



## Quick start ## Quick start


Four quick start options are available:
Several quick start options are available:


- [Download the latest release](https://github.com/twbs/bootstrap/archive/v3.3.2.zip).
- Clone the repo: `git clone https://github.com/twbs/bootstrap.git`.
- Install with [Bower](http://bower.io): `bower install bootstrap`.
- Install with [npm](https://www.npmjs.org): `npm install bootstrap`.
* [Download the latest release](https://github.com/twbs/bootstrap/archive/v3.3.7.zip).
* Clone the repo: `git clone https://github.com/twbs/bootstrap.git`.
* Install with [Bower](http://bower.io): `bower install bootstrap`.
* Install with [npm](https://www.npmjs.com): `npm install bootstrap@3`.
* Install with [Meteor](https://www.meteor.com): `meteor add twbs:bootstrap`.
* Install with [Composer](https://getcomposer.org): `composer require twbs/bootstrap`.


Read the [Getting started page](http://getbootstrap.com/getting-started/) for information on the framework contents, templates and examples, and more. Read the [Getting started page](http://getbootstrap.com/getting-started/) for information on the framework contents, templates and examples, and more.


│ ├── bootstrap.css │ ├── bootstrap.css
│ ├── bootstrap.css.map │ ├── bootstrap.css.map
│ ├── bootstrap.min.css │ ├── bootstrap.min.css
│ ├── bootstrap.min.css.map
│ ├── bootstrap-theme.css │ ├── bootstrap-theme.css
│ ├── bootstrap-theme.css.map │ ├── bootstrap-theme.css.map
│ └── bootstrap-theme.min.css
│ ├── bootstrap-theme.min.css
│ └── bootstrap-theme.min.css.map
├── js/ ├── js/
│ ├── bootstrap.js │ ├── bootstrap.js
│ └── bootstrap.min.js │ └── bootstrap.min.js
└── glyphicons-halflings-regular.woff2 └── glyphicons-halflings-regular.woff2
``` ```


We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). CSS [source maps](https://developers.google.com/chrome-developer-tools/docs/css-preprocessors) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Fonts from Glyphicons are included, as is the optional Bootstrap theme.

We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). CSS [source maps](https://developer.chrome.com/devtools/docs/css-preprocessors) (`bootstrap.*.map`) are available for use with certain browsers' developer tools. Fonts from Glyphicons are included, as is the optional Bootstrap theme.




## Bugs and feature requests ## Bugs and feature requests


Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#using-the-issue-tracker) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/twbs/bootstrap/issues/new). Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#using-the-issue-tracker) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/twbs/bootstrap/issues/new).


Note that **feature requests must target [Bootstrap v4](https://github.com/twbs/bootstrap/tree/v4-dev),** because Bootstrap v3 is now in maintenance mode and is closed off to new features. This is so that we can focus our efforts on Bootstrap v4.



## Documentation ## Documentation




### Running documentation locally ### Running documentation locally


1. If necessary, [install Jekyll](http://jekyllrb.com/docs/installation) (requires v2.5.x).
- **Windows users:** Read [this unofficial guide](http://jekyll-windows.juthilo.com/) to get Jekyll up and running without problems.
2. Install the Ruby-based syntax highlighter, [Rouge](https://github.com/jneen/rouge), with `gem install rouge`.
3. From the root `/bootstrap` directory, run `jekyll serve` in the command line.
4. Open <http://localhost:9001> in your browser, and voilà.
1. If necessary, [install Jekyll](http://jekyllrb.com/docs/installation) and other Ruby dependencies with `bundle install`.
**Note for Windows users:** Read [this unofficial guide](http://jekyll-windows.juthilo.com/) to get Jekyll up and running without problems.
2. From the root `/bootstrap` directory, run `bundle exec jekyll serve` in the command line.
4. Open `http://localhost:9001` in your browser, and voilà.


Learn more about using Jekyll by reading its [documentation](http://jekyllrb.com/docs/home/). Learn more about using Jekyll by reading its [documentation](http://jekyllrb.com/docs/home/).


[Previous releases](https://github.com/twbs/bootstrap/releases) and their documentation are also available for download. [Previous releases](https://github.com/twbs/bootstrap/releases) and their documentation are also available for download.





## Contributing ## Contributing


Please read through our [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development. Please read through our [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.


Moreover, if your pull request contains JavaScript patches or features, you must include relevant unit tests. All HTML and CSS should conform to the [Code Guide](https://github.com/mdo/code-guide), maintained by [Mark Otto](https://github.com/mdo).
Moreover, if your pull request contains JavaScript patches or features, you must include [relevant unit tests](https://github.com/twbs/bootstrap/tree/master/js/tests). All HTML and CSS should conform to the [Code Guide](https://github.com/mdo/code-guide), maintained by [Mark Otto](https://github.com/mdo).


Editor preferences are available in the [editor config](https://github.com/twbs/bootstrap/blob/master/.editorconfig) for easy use in common text editors. Read more and download plugins at <http://editorconfig.org>.
**Bootstrap v3 is now closed off to new features.** It has gone into maintenance mode so that we can focus our efforts on [Bootstrap v4](https://github.com/twbs/bootstrap/tree/v4-dev), the future of the framework. Pull requests which add new features (rather than fix bugs) should target [Bootstrap v4 (the `v4-dev` git branch)](https://github.com/twbs/bootstrap/tree/v4-dev) instead.


Editor preferences are available in the [editor config](https://github.com/twbs/bootstrap/blob/master/.editorconfig) for easy use in common text editors. Read more and download plugins at <http://editorconfig.org>.




## Community ## Community


Keep track of development and community news.

- Follow [@twbootstrap on Twitter](https://twitter.com/twbootstrap).
- Read and subscribe to [The Official Bootstrap Blog](http://blog.getbootstrap.com).
- Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel.
- Implementation help may be found at Stack Overflow (tagged [`twitter-bootstrap-3`](http://stackoverflow.com/questions/tagged/twitter-bootstrap-3)).
Get updates on Bootstrap's development and chat with the project maintainers and community members.


* Follow [@getbootstrap on Twitter](https://twitter.com/getbootstrap).
* Read and subscribe to [The Official Bootstrap Blog](http://blog.getbootstrap.com).
* Join [the official Slack room](https://bootstrap-slack.herokuapp.com).
* Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##bootstrap` channel.
* Implementation help may be found at Stack Overflow (tagged [`twitter-bootstrap-3`](https://stackoverflow.com/questions/tagged/twitter-bootstrap-3)).
* Developers should use the keyword `bootstrap` on packages which modify or add to the functionality of Bootstrap when distributing through [npm](https://www.npmjs.com/browse/keyword/bootstrap) or similar delivery mechanisms for maximum discoverability.




## Versioning ## Versioning


For transparency into our release cycle and in striving to maintain backward compatibility, Bootstrap is maintained under [the Semantic Versioning guidelines](http://semver.org/). Sometimes we screw up, but we'll adhere to those rules whenever possible. For transparency into our release cycle and in striving to maintain backward compatibility, Bootstrap is maintained under [the Semantic Versioning guidelines](http://semver.org/). Sometimes we screw up, but we'll adhere to those rules whenever possible.


See [the Releases section of our GitHub project](https://github.com/twbs/bootstrap/releases) for changelogs for each release version of Bootstrap. Release announcement posts on [the official Bootstrap blog](http://blog.getbootstrap.com) contain summaries of the most noteworthy changes made in each release.




## Creators ## Creators


**Mark Otto** **Mark Otto**


- <https://twitter.com/mdo>
- <https://github.com/mdo>
* <https://twitter.com/mdo>
* <https://github.com/mdo>


**Jacob Thornton** **Jacob Thornton**


- <https://twitter.com/fat>
- <https://github.com/fat>

* <https://twitter.com/fat>
* <https://github.com/fat>




## Copyright and license ## Copyright and license


Code and documentation copyright 2011-2015 Twitter, Inc. Code released under [the MIT license](https://github.com/twbs/bootstrap/blob/master/LICENSE). Docs released under [Creative Commons](https://github.com/twbs/bootstrap/blob/master/docs/LICENSE).
Code and documentation copyright 2011-2016 Twitter, Inc. Code released under [the MIT license](https://github.com/twbs/bootstrap/blob/master/LICENSE). Docs released under [Creative Commons](https://github.com/twbs/bootstrap/blob/master/docs/LICENSE).

+ 4
- 8
vendor/bower/bootstrap/bower.json View File

{ {
"name": "bootstrap", "name": "bootstrap",
"description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
"version": "3.3.2",
"keywords": [ "keywords": [
"css", "css",
"js", "js",
"web" "web"
], ],
"homepage": "http://getbootstrap.com", "homepage": "http://getbootstrap.com",
"license": "MIT",
"moduleType": "globals",
"main": [ "main": [
"less/bootstrap.less", "less/bootstrap.less",
"dist/css/bootstrap.css",
"dist/js/bootstrap.js",
"dist/fonts/glyphicons-halflings-regular.eot",
"dist/fonts/glyphicons-halflings-regular.svg",
"dist/fonts/glyphicons-halflings-regular.ttf",
"dist/fonts/glyphicons-halflings-regular.woff"
"dist/js/bootstrap.js"
], ],
"ignore": [ "ignore": [
"/.*", "/.*",
"test-infra" "test-infra"
], ],
"dependencies": { "dependencies": {
"jquery": ">= 1.9.1"
"jquery": "1.9.1 - 3"
} }
} }

+ 126
- 15
vendor/bower/bootstrap/dist/css/bootstrap-theme.css View File

/*! /*!
* Bootstrap v3.3.2 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */

.btn-default, .btn-default,
.btn-primary, .btn-primary,
.btn-success, .btn-success,
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
} }
.btn-default.disabled,
.btn-primary.disabled,
.btn-success.disabled,
.btn-info.disabled,
.btn-warning.disabled,
.btn-danger.disabled,
.btn-default[disabled],
.btn-primary[disabled],
.btn-success[disabled],
.btn-info[disabled],
.btn-warning[disabled],
.btn-danger[disabled],
fieldset[disabled] .btn-default,
fieldset[disabled] .btn-primary,
fieldset[disabled] .btn-success,
fieldset[disabled] .btn-info,
fieldset[disabled] .btn-warning,
fieldset[disabled] .btn-danger {
-webkit-box-shadow: none;
box-shadow: none;
}
.btn-default .badge, .btn-default .badge,
.btn-primary .badge, .btn-primary .badge,
.btn-success .badge, .btn-success .badge,
border-color: #dbdbdb; border-color: #dbdbdb;
} }
.btn-default.disabled, .btn-default.disabled,
.btn-default:disabled,
.btn-default[disabled] {
.btn-default[disabled],
fieldset[disabled] .btn-default,
.btn-default.disabled:hover,
.btn-default[disabled]:hover,
fieldset[disabled] .btn-default:hover,
.btn-default.disabled:focus,
.btn-default[disabled]:focus,
fieldset[disabled] .btn-default:focus,
.btn-default.disabled.focus,
.btn-default[disabled].focus,
fieldset[disabled] .btn-default.focus,
.btn-default.disabled:active,
.btn-default[disabled]:active,
fieldset[disabled] .btn-default:active,
.btn-default.disabled.active,
.btn-default[disabled].active,
fieldset[disabled] .btn-default.active {
background-color: #e0e0e0; background-color: #e0e0e0;
background-image: none; background-image: none;
} }
border-color: #245580; border-color: #245580;
} }
.btn-primary.disabled, .btn-primary.disabled,
.btn-primary:disabled,
.btn-primary[disabled] {
.btn-primary[disabled],
fieldset[disabled] .btn-primary,
.btn-primary.disabled:hover,
.btn-primary[disabled]:hover,
fieldset[disabled] .btn-primary:hover,
.btn-primary.disabled:focus,
.btn-primary[disabled]:focus,
fieldset[disabled] .btn-primary:focus,
.btn-primary.disabled.focus,
.btn-primary[disabled].focus,
fieldset[disabled] .btn-primary.focus,
.btn-primary.disabled:active,
.btn-primary[disabled]:active,
fieldset[disabled] .btn-primary:active,
.btn-primary.disabled.active,
.btn-primary[disabled].active,
fieldset[disabled] .btn-primary.active {
background-color: #265a88; background-color: #265a88;
background-image: none; background-image: none;
} }
border-color: #3e8f3e; border-color: #3e8f3e;
} }
.btn-success.disabled, .btn-success.disabled,
.btn-success:disabled,
.btn-success[disabled] {
.btn-success[disabled],
fieldset[disabled] .btn-success,
.btn-success.disabled:hover,
.btn-success[disabled]:hover,
fieldset[disabled] .btn-success:hover,
.btn-success.disabled:focus,
.btn-success[disabled]:focus,
fieldset[disabled] .btn-success:focus,
.btn-success.disabled.focus,
.btn-success[disabled].focus,
fieldset[disabled] .btn-success.focus,
.btn-success.disabled:active,
.btn-success[disabled]:active,
fieldset[disabled] .btn-success:active,
.btn-success.disabled.active,
.btn-success[disabled].active,
fieldset[disabled] .btn-success.active {
background-color: #419641; background-color: #419641;
background-image: none; background-image: none;
} }
border-color: #28a4c9; border-color: #28a4c9;
} }
.btn-info.disabled, .btn-info.disabled,
.btn-info:disabled,
.btn-info[disabled] {
.btn-info[disabled],
fieldset[disabled] .btn-info,
.btn-info.disabled:hover,
.btn-info[disabled]:hover,
fieldset[disabled] .btn-info:hover,
.btn-info.disabled:focus,
.btn-info[disabled]:focus,
fieldset[disabled] .btn-info:focus,
.btn-info.disabled.focus,
.btn-info[disabled].focus,
fieldset[disabled] .btn-info.focus,
.btn-info.disabled:active,
.btn-info[disabled]:active,
fieldset[disabled] .btn-info:active,
.btn-info.disabled.active,
.btn-info[disabled].active,
fieldset[disabled] .btn-info.active {
background-color: #2aabd2; background-color: #2aabd2;
background-image: none; background-image: none;
} }
border-color: #e38d13; border-color: #e38d13;
} }
.btn-warning.disabled, .btn-warning.disabled,
.btn-warning:disabled,
.btn-warning[disabled] {
.btn-warning[disabled],
fieldset[disabled] .btn-warning,
.btn-warning.disabled:hover,
.btn-warning[disabled]:hover,
fieldset[disabled] .btn-warning:hover,
.btn-warning.disabled:focus,
.btn-warning[disabled]:focus,
fieldset[disabled] .btn-warning:focus,
.btn-warning.disabled.focus,
.btn-warning[disabled].focus,
fieldset[disabled] .btn-warning.focus,
.btn-warning.disabled:active,
.btn-warning[disabled]:active,
fieldset[disabled] .btn-warning:active,
.btn-warning.disabled.active,
.btn-warning[disabled].active,
fieldset[disabled] .btn-warning.active {
background-color: #eb9316; background-color: #eb9316;
background-image: none; background-image: none;
} }
border-color: #b92c28; border-color: #b92c28;
} }
.btn-danger.disabled, .btn-danger.disabled,
.btn-danger:disabled,
.btn-danger[disabled] {
.btn-danger[disabled],
fieldset[disabled] .btn-danger,
.btn-danger.disabled:hover,
.btn-danger[disabled]:hover,
fieldset[disabled] .btn-danger:hover,
.btn-danger.disabled:focus,
.btn-danger[disabled]:focus,
fieldset[disabled] .btn-danger:focus,
.btn-danger.disabled.focus,
.btn-danger[disabled].focus,
fieldset[disabled] .btn-danger.focus,
.btn-danger.disabled:active,
.btn-danger[disabled]:active,
fieldset[disabled] .btn-danger:active,
.btn-danger.disabled.active,
.btn-danger[disabled].active,
fieldset[disabled] .btn-danger.active {
background-color: #c12e2a; background-color: #c12e2a;
background-image: none; background-image: none;
} }
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x; background-repeat: repeat-x;
border-radius: 4px;
} }
.navbar-inverse .navbar-nav > .open > a, .navbar-inverse .navbar-nav > .open > a,
.navbar-inverse .navbar-nav > .active > a { .navbar-inverse .navbar-nav > .active > a {

+ 1
- 1
vendor/bower/bootstrap/dist/css/bootstrap-theme.css.map
File diff suppressed because it is too large
View File


+ 4
- 3
vendor/bower/bootstrap/dist/css/bootstrap-theme.min.css
File diff suppressed because it is too large
View File


+ 1
- 0
vendor/bower/bootstrap/dist/css/bootstrap-theme.min.css.map
File diff suppressed because it is too large
View File


+ 353
- 162
vendor/bower/bootstrap/dist/css/bootstrap.css
File diff suppressed because it is too large
View File


+ 1
- 1
vendor/bower/bootstrap/dist/css/bootstrap.css.map
File diff suppressed because it is too large
View File


+ 4
- 3
vendor/bower/bootstrap/dist/css/bootstrap.min.css
File diff suppressed because it is too large
View File


+ 1
- 0
vendor/bower/bootstrap/dist/css/bootstrap.min.css.map
File diff suppressed because it is too large
View File


+ 266
- 195
vendor/bower/bootstrap/dist/js/bootstrap.js
File diff suppressed because it is too large
View File


+ 5
- 5
vendor/bower/bootstrap/dist/js/bootstrap.min.js
File diff suppressed because it is too large
View File


+ 9
- 2
vendor/bower/bootstrap/grunt/bs-commonjs-generator.js View File

/*!
* Bootstrap Grunt task for the CommonJS module generation
* http://getbootstrap.com
* Copyright 2014-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/

'use strict'; 'use strict';

var fs = require('fs'); var fs = require('fs');
var path = require('path'); var path = require('path');


var moduleOutputJs = COMMONJS_BANNER + srcFiles.map(srcPathToDestRequire).join('\n'); var moduleOutputJs = COMMONJS_BANNER + srcFiles.map(srcPathToDestRequire).join('\n');
try { try {
fs.writeFileSync(destFilepath, moduleOutputJs); fs.writeFileSync(destFilepath, moduleOutputJs);
}
catch (err) {
} catch (err) {
grunt.fail.warn(err); grunt.fail.warn(err);
} }
grunt.log.writeln('File ' + destFilepath.cyan + ' created.'); grunt.log.writeln('File ' + destFilepath.cyan + ' created.');

+ 4
- 3
vendor/bower/bootstrap/grunt/bs-glyphicons-data-generator.js View File

/*! /*!
* Bootstrap Grunt task for Glyphicons data generation * Bootstrap Grunt task for Glyphicons data generation
* http://getbootstrap.com * http://getbootstrap.com
* Copyright 2014 Twitter, Inc.
* Copyright 2014-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */

'use strict'; 'use strict';

var fs = require('fs'); var fs = require('fs');


module.exports = function generateGlyphiconsData(grunt) { module.exports = function generateGlyphiconsData(grunt) {


try { try {
fs.writeFileSync(glyphiconsYml, glyphiconsData); fs.writeFileSync(glyphiconsYml, glyphiconsData);
}
catch (err) {
} catch (err) {
grunt.fail.warn(err); grunt.fail.warn(err);
} }
grunt.log.writeln('File ' + glyphiconsYml.cyan + ' created.'); grunt.log.writeln('File ' + glyphiconsYml.cyan + ' created.');

+ 8
- 9
vendor/bower/bootstrap/grunt/bs-lessdoc-parser.js View File

/*! /*!
* Bootstrap Grunt task for parsing Less docstrings * Bootstrap Grunt task for parsing Less docstrings
* http://getbootstrap.com * http://getbootstrap.com
* Copyright 2014 Twitter, Inc.
* Copyright 2014-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */

'use strict'; 'use strict';


var Remarkable = require('remarkable');
var Markdown = require('markdown-it');


function markdown2html(markdownString) { function markdown2html(markdownString) {
var md = new Remarkable();
var md = new Markdown();


// the slice removes the <p>...</p> wrapper output by Markdown processor // the slice removes the <p>...</p> wrapper output by Markdown processor
return md.render(markdownString.trim()).slice(3, -5); return md.render(markdownString.trim()).slice(3, -5);
return new VarDocstring(match[1]); return new VarDocstring(match[1]);
} }
var commentStart = line.lastIndexOf('//'); var commentStart = line.lastIndexOf('//');
var varLine = (commentStart === -1) ? line : line.slice(0, commentStart);
var varLine = commentStart === -1 ? line : line.slice(0, commentStart);
match = VAR_ASSIGNMENT.exec(varLine); match = VAR_ASSIGNMENT.exec(varLine);
if (match !== null) { if (match !== null) {
return new Variable(match[1], match[2]); return new Variable(match[1], match[2]);
var docstring = this._tokenizer.shift(); var docstring = this._tokenizer.shift();
if (docstring instanceof SectionDocstring) { if (docstring instanceof SectionDocstring) {
section.docstring = docstring; section.docstring = docstring;
}
else {
} else {
this._tokenizer.unshift(docstring); this._tokenizer.unshift(docstring);
} }
this.parseSubSections(section); this.parseSubSections(section);
// Presume an implicit initial subsection // Presume an implicit initial subsection
subsection = new SubSection(''); subsection = new SubSection('');
this.parseVars(subsection); this.parseVars(subsection);
}
else {
} else {
break; break;
} }
} }
section.addSubSection(subsection); section.addSubSection(subsection);
} }


if (section.subsections.length === 1 && !(section.subsections[0].heading) && section.subsections[0].variables.length === 0) {
if (section.subsections.length === 1 && !section.subsections[0].heading && section.subsections[0].variables.length === 0) {
// Ignore lone empty implicit subsection // Ignore lone empty implicit subsection
section.subsections = []; section.subsections = [];
} }

+ 6
- 8
vendor/bower/bootstrap/grunt/bs-raw-files-generator.js View File

/*! /*!
* Bootstrap Grunt task for generating raw-files.min.js for the Customizer * Bootstrap Grunt task for generating raw-files.min.js for the Customizer
* http://getbootstrap.com * http://getbootstrap.com
* Copyright 2014 Twitter, Inc.
* Copyright 2014-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */


/* global btoa: true */

'use strict'; 'use strict';

var fs = require('fs'); var fs = require('fs');
var btoa = require('btoa'); var btoa = require('btoa');
var glob = require('glob'); var glob = require('glob');


function getFiles(type) { function getFiles(type) {
var files = {}; var files = {};
var recursive = (type === 'less');
var globExpr = (recursive ? '/**/*' : '/*');
var recursive = type === 'less';
var globExpr = recursive ? '/**/*' : '/*';
glob.sync(type + globExpr) glob.sync(type + globExpr)
.filter(function (path) { .filter(function (path) {
return type === 'fonts' ? true : new RegExp('\\.' + type + '$').test(path); return type === 'fonts' ? true : new RegExp('\\.' + type + '$').test(path);
}) })
.forEach(function (fullPath) { .forEach(function (fullPath) {
var relativePath = fullPath.replace(/^[^/]+\//, ''); var relativePath = fullPath.replace(/^[^/]+\//, '');
files[relativePath] = (type === 'fonts' ? btoa(fs.readFileSync(fullPath)) : fs.readFileSync(fullPath, 'utf8'));
files[relativePath] = type === 'fonts' ? btoa(fs.readFileSync(fullPath)) : fs.readFileSync(fullPath, 'utf8');
}); });
return 'var __' + type + ' = ' + JSON.stringify(files) + '\n'; return 'var __' + type + ' = ' + JSON.stringify(files) + '\n';
} }
var rawFilesJs = 'docs/assets/js/raw-files.min.js'; var rawFilesJs = 'docs/assets/js/raw-files.min.js';
try { try {
fs.writeFileSync(rawFilesJs, files); fs.writeFileSync(rawFilesJs, files);
}
catch (err) {
} catch (err) {
grunt.fail.warn(err); grunt.fail.warn(err);
} }
grunt.log.writeln('File ' + rawFilesJs.cyan + ' created.'); grunt.log.writeln('File ' + rawFilesJs.cyan + ' created.');

+ 109
- 0
vendor/bower/bootstrap/grunt/change-version.js View File

#!/usr/bin/env node
'use strict';

/* globals Set */
/*!
* Script to update version number references in the project.
* Copyright 2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
var fs = require('fs');
var path = require('path');
var sh = require('shelljs');
sh.config.fatal = true;
var sed = sh.sed;

// Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37
RegExp.quote = function (string) {
return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&');
};
RegExp.quoteReplacement = function (string) {
return string.replace(/[$]/g, '$$');
};

var DRY_RUN = false;

function walkAsync(directory, excludedDirectories, fileCallback, errback) {
if (excludedDirectories.has(path.parse(directory).base)) {
return;
}
fs.readdir(directory, function (err, names) {
if (err) {
errback(err);
return;
}
names.forEach(function (name) {
var filepath = path.join(directory, name);
fs.lstat(filepath, function (err, stats) {
if (err) {
process.nextTick(errback, err);
return;
}
if (stats.isSymbolicLink()) {
return;
}
else if (stats.isDirectory()) {
process.nextTick(walkAsync, filepath, excludedDirectories, fileCallback, errback);
}
else if (stats.isFile()) {
process.nextTick(fileCallback, filepath);
}
});
});
});
}

function replaceRecursively(directory, excludedDirectories, allowedExtensions, original, replacement) {
original = new RegExp(RegExp.quote(original), 'g');
replacement = RegExp.quoteReplacement(replacement);
var updateFile = !DRY_RUN ? function (filepath) {
if (allowedExtensions.has(path.parse(filepath).ext)) {
sed('-i', original, replacement, filepath);
}
} : function (filepath) {
if (allowedExtensions.has(path.parse(filepath).ext)) {
console.log('FILE: ' + filepath);
}
else {
console.log('EXCLUDED:' + filepath);
}
};
walkAsync(directory, excludedDirectories, updateFile, function (err) {
console.error('ERROR while traversing directory!:');
console.error(err);
process.exit(1);
});
}

function main(args) {
if (args.length !== 2) {
console.error('USAGE: change-version old_version new_version');
console.error('Got arguments:', args);
process.exit(1);
}
var oldVersion = args[0];
var newVersion = args[1];
var EXCLUDED_DIRS = new Set([
'.git',
'node_modules',
'vendor'
]);
var INCLUDED_EXTENSIONS = new Set([
// This extension whitelist is how we avoid modifying binary files
'',
'.css',
'.html',
'.js',
'.json',
'.less',
'.md',
'.nuspec',
'.ps1',
'.scss',
'.txt',
'.yml'
]);
replaceRecursively('.', EXCLUDED_DIRS, INCLUDED_EXTENSIONS, oldVersion, newVersion);
}

main(process.argv.slice(2));

+ 5
- 4
vendor/bower/bootstrap/grunt/configBridge.json View File

"../assets/js/src/customizer.js" "../assets/js/src/customizer.js"
], ],
"docsJs": [ "docsJs": [
"../assets/js/vendor/holder.js",
"../assets/js/vendor/holder.min.js",
"../assets/js/vendor/ZeroClipboard.min.js", "../assets/js/vendor/ZeroClipboard.min.js",
"../assets/js/vendor/anchor.min.js",
"../assets/js/src/application.js" "../assets/js/src/application.js"
] ]
}, },
"+function ($) {", "+function ($) {",
" 'use strict';", " 'use strict';",
" var version = $.fn.jquery.split(' ')[0].split('.')", " var version = $.fn.jquery.split(' ')[0].split('.')",
" if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {",
" throw new Error('Bootstrap\\'s JavaScript requires jQuery version 1.9.1 or higher')",
" if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) {",
" throw new Error('Bootstrap\\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4')",
" }", " }",
"}(jQuery);\n\n" "}(jQuery);\n\n"
] ]
} }
}
}

+ 2679
- 0
vendor/bower/bootstrap/grunt/npm-shrinkwrap.json
File diff suppressed because it is too large
View File


+ 2
- 2
vendor/bower/bootstrap/grunt/sauce_browsers.yml View File



{ {
browserName: "iphone", browserName: "iphone",
platform: "OS X 10.9",
version: "8.1"
platform: "OS X 10.10",
version: "9.2"
}, },


# iOS Chrome not currently supported by Sauce Labs # iOS Chrome not currently supported by Sauce Labs

+ 6
- 6
vendor/bower/bootstrap/js/affix.js View File

/* ======================================================================== /* ========================================================================
* Bootstrap: affix.js v3.3.2
* Bootstrap: affix.js v3.3.7
* http://getbootstrap.com/javascript/#affix * http://getbootstrap.com/javascript/#affix
* ======================================================================== * ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */ * ======================================================================== */


.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))


this.$element = $(element) this.$element = $(element)
this.affixed =
this.unpin =
this.affixed = null
this.unpin = null
this.pinnedOffset = null this.pinnedOffset = null


this.checkPosition() this.checkPosition()
} }


Affix.VERSION = '3.3.2'
Affix.VERSION = '3.3.7'


Affix.RESET = 'affix affix-top affix-bottom' Affix.RESET = 'affix affix-top affix-bottom'


var offset = this.options.offset var offset = this.options.offset
var offsetTop = offset.top var offsetTop = offset.top
var offsetBottom = offset.bottom var offsetBottom = offset.bottom
var scrollHeight = $('body').height()
var scrollHeight = Math.max($(document).height(), $(document.body).height())


if (typeof offset != 'object') offsetBottom = offsetTop = offset if (typeof offset != 'object') offsetBottom = offsetTop = offset
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)

+ 4
- 4
vendor/bower/bootstrap/js/alert.js View File

/* ======================================================================== /* ========================================================================
* Bootstrap: alert.js v3.3.2
* Bootstrap: alert.js v3.3.7
* http://getbootstrap.com/javascript/#alerts * http://getbootstrap.com/javascript/#alerts
* ======================================================================== * ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */ * ======================================================================== */


$(el).on('click', dismiss, this.close) $(el).on('click', dismiss, this.close)
} }


Alert.VERSION = '3.3.2'
Alert.VERSION = '3.3.7'


Alert.TRANSITION_DURATION = 150 Alert.TRANSITION_DURATION = 150


selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
} }


var $parent = $(selector)
var $parent = $(selector === '#' ? [] : selector)


if (e) e.preventDefault() if (e) e.preventDefault()



+ 23
- 14
vendor/bower/bootstrap/js/button.js View File

/* ======================================================================== /* ========================================================================
* Bootstrap: button.js v3.3.2
* Bootstrap: button.js v3.3.7
* http://getbootstrap.com/javascript/#buttons * http://getbootstrap.com/javascript/#buttons
* ======================================================================== * ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */ * ======================================================================== */


this.isLoading = false this.isLoading = false
} }


Button.VERSION = '3.3.2'
Button.VERSION = '3.3.7'


Button.DEFAULTS = { Button.DEFAULTS = {
loadingText: 'loading...' loadingText: 'loading...'
var val = $el.is('input') ? 'val' : 'html' var val = $el.is('input') ? 'val' : 'html'
var data = $el.data() var data = $el.data()


state = state + 'Text'
state += 'Text'


if (data.resetText == null) $el.data('resetText', $el[val]()) if (data.resetText == null) $el.data('resetText', $el[val]())




if (state == 'loadingText') { if (state == 'loadingText') {
this.isLoading = true this.isLoading = true
$el.addClass(d).attr(d, d)
$el.addClass(d).attr(d, d).prop(d, true)
} else if (this.isLoading) { } else if (this.isLoading) {
this.isLoading = false this.isLoading = false
$el.removeClass(d).removeAttr(d)
$el.removeClass(d).removeAttr(d).prop(d, false)
} }
}, this), 0) }, this), 0)
} }
if ($parent.length) { if ($parent.length) {
var $input = this.$element.find('input') var $input = this.$element.find('input')
if ($input.prop('type') == 'radio') { if ($input.prop('type') == 'radio') {
if ($input.prop('checked') && this.$element.hasClass('active')) changed = false
else $parent.find('.active').removeClass('active')
if ($input.prop('checked')) changed = false
$parent.find('.active').removeClass('active')
this.$element.addClass('active')
} else if ($input.prop('type') == 'checkbox') {
if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
this.$element.toggleClass('active')
} }
if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
$input.prop('checked', this.$element.hasClass('active'))
if (changed) $input.trigger('change')
} else { } else {
this.$element.attr('aria-pressed', !this.$element.hasClass('active')) this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
this.$element.toggleClass('active')
} }

if (changed) this.$element.toggleClass('active')
} }






$(document) $(document)
.on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
var $btn = $(e.target)
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
var $btn = $(e.target).closest('.btn')
Plugin.call($btn, 'toggle') Plugin.call($btn, 'toggle')
e.preventDefault()
if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) {
// Prevent double click on radios, and the double selections (so cancellation) on checkboxes
e.preventDefault()
// The target component still receive the focus
if ($btn.is('input,button')) $btn.trigger('focus')
else $btn.find('input:visible,button:visible').first().trigger('focus')
}
}) })
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type)) $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))

+ 7
- 7
vendor/bower/bootstrap/js/carousel.js View File

/* ======================================================================== /* ========================================================================
* Bootstrap: carousel.js v3.3.2
* Bootstrap: carousel.js v3.3.7
* http://getbootstrap.com/javascript/#carousel * http://getbootstrap.com/javascript/#carousel
* ======================================================================== * ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */ * ======================================================================== */


this.$element = $(element) this.$element = $(element)
this.$indicators = this.$element.find('.carousel-indicators') this.$indicators = this.$element.find('.carousel-indicators')
this.options = options this.options = options
this.paused =
this.sliding =
this.interval =
this.$active =
this.paused = null
this.sliding = null
this.interval = null
this.$active = null
this.$items = null this.$items = null


this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this)) this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this)) .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
} }


Carousel.VERSION = '3.3.2'
Carousel.VERSION = '3.3.7'


Carousel.TRANSITION_DURATION = 600 Carousel.TRANSITION_DURATION = 600



+ 9
- 8
vendor/bower/bootstrap/js/collapse.js View File

/* ======================================================================== /* ========================================================================
* Bootstrap: collapse.js v3.3.2
* Bootstrap: collapse.js v3.3.7
* http://getbootstrap.com/javascript/#collapse * http://getbootstrap.com/javascript/#collapse
* ======================================================================== * ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */ * ======================================================================== */


/* jshint latedef: false */


+function ($) { +function ($) {
'use strict'; 'use strict';
var Collapse = function (element, options) { var Collapse = function (element, options) {
this.$element = $(element) this.$element = $(element)
this.options = $.extend({}, Collapse.DEFAULTS, options) this.options = $.extend({}, Collapse.DEFAULTS, options)
this.$trigger = $(this.options.trigger).filter('[href="#' + element.id + '"], [data-target="#' + element.id + '"]')
this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
'[data-toggle="collapse"][data-target="#' + element.id + '"]')
this.transitioning = null this.transitioning = null


if (this.options.parent) { if (this.options.parent) {
if (this.options.toggle) this.toggle() if (this.options.toggle) this.toggle()
} }


Collapse.VERSION = '3.3.2'
Collapse.VERSION = '3.3.7'


Collapse.TRANSITION_DURATION = 350 Collapse.TRANSITION_DURATION = 350


Collapse.DEFAULTS = { Collapse.DEFAULTS = {
toggle: true,
trigger: '[data-toggle="collapse"]'
toggle: true
} }


Collapse.prototype.dimension = function () { Collapse.prototype.dimension = function () {
var data = $this.data('bs.collapse') var data = $this.data('bs.collapse')
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)


if (!data && options.toggle && option == 'show') options.toggle = false
if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
if (typeof option == 'string') data[option]() if (typeof option == 'string') data[option]()
}) })


var $target = getTargetFromTrigger($this) var $target = getTargetFromTrigger($this)
var data = $target.data('bs.collapse') var data = $target.data('bs.collapse')
var option = data ? 'toggle' : $.extend({}, $this.data(), { trigger: this })
var option = data ? 'toggle' : $this.data()


Plugin.call($target, option) Plugin.call($target, option)
}) })

+ 49
- 45
vendor/bower/bootstrap/js/dropdown.js View File

/* ======================================================================== /* ========================================================================
* Bootstrap: dropdown.js v3.3.2
* Bootstrap: dropdown.js v3.3.7
* http://getbootstrap.com/javascript/#dropdowns * http://getbootstrap.com/javascript/#dropdowns
* ======================================================================== * ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */ * ======================================================================== */


$(element).on('click.bs.dropdown', this.toggle) $(element).on('click.bs.dropdown', this.toggle)
} }


Dropdown.VERSION = '3.3.2'
Dropdown.VERSION = '3.3.7'

function getParent($this) {
var selector = $this.attr('data-target')

if (!selector) {
selector = $this.attr('href')
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}

var $parent = selector && $(selector)

return $parent && $parent.length ? $parent : $this.parent()
}

function clearMenus(e) {
if (e && e.which === 3) return
$(backdrop).remove()
$(toggle).each(function () {
var $this = $(this)
var $parent = getParent($this)
var relatedTarget = { relatedTarget: this }

if (!$parent.hasClass('open')) return

if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return

$parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))

if (e.isDefaultPrevented()) return

$this.attr('aria-expanded', 'false')
$parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))
})
}


Dropdown.prototype.toggle = function (e) { Dropdown.prototype.toggle = function (e) {
var $this = $(this) var $this = $(this)
if (!isActive) { if (!isActive) {
if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
// if mobile we use a backdrop because click events don't delegate // if mobile we use a backdrop because click events don't delegate
$('<div class="dropdown-backdrop"/>').insertAfter($(this)).on('click', clearMenus)
$(document.createElement('div'))
.addClass('dropdown-backdrop')
.insertAfter($(this))
.on('click', clearMenus)
} }


var relatedTarget = { relatedTarget: this } var relatedTarget = { relatedTarget: this }


$parent $parent
.toggleClass('open') .toggleClass('open')
.trigger('shown.bs.dropdown', relatedTarget)
.trigger($.Event('shown.bs.dropdown', relatedTarget))
} }


return false return false
var $parent = getParent($this) var $parent = getParent($this)
var isActive = $parent.hasClass('open') var isActive = $parent.hasClass('open')


if ((!isActive && e.which != 27) || (isActive && e.which == 27)) {
if (!isActive && e.which != 27 || isActive && e.which == 27) {
if (e.which == 27) $parent.find(toggle).trigger('focus') if (e.which == 27) $parent.find(toggle).trigger('focus')
return $this.trigger('click') return $this.trigger('click')
} }


var desc = ' li:not(.divider):visible a'
var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc)
var desc = ' li:not(.disabled):visible a'
var $items = $parent.find('.dropdown-menu' + desc)


if (!$items.length) return if (!$items.length) return


var index = $items.index(e.target) var index = $items.index(e.target)


if (e.which == 38 && index > 0) index-- // up
if (e.which == 40 && index < $items.length - 1) index++ // down
if (!~index) index = 0
if (e.which == 38 && index > 0) index-- // up
if (e.which == 40 && index < $items.length - 1) index++ // down
if (!~index) index = 0


$items.eq(index).trigger('focus') $items.eq(index).trigger('focus')
} }


function clearMenus(e) {
if (e && e.which === 3) return
$(backdrop).remove()
$(toggle).each(function () {
var $this = $(this)
var $parent = getParent($this)
var relatedTarget = { relatedTarget: this }

if (!$parent.hasClass('open')) return

$parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))

if (e.isDefaultPrevented()) return

$this.attr('aria-expanded', 'false')
$parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
})
}

function getParent($this) {
var selector = $this.attr('data-target')

if (!selector) {
selector = $this.attr('href')
selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}

var $parent = selector && $(selector)

return $parent && $parent.length ? $parent : $this.parent()
}



// DROPDOWN PLUGIN DEFINITION // DROPDOWN PLUGIN DEFINITION
// ========================== // ==========================
.on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
.on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown) .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
.on('keydown.bs.dropdown.data-api', '[role="menu"]', Dropdown.prototype.keydown)
.on('keydown.bs.dropdown.data-api', '[role="listbox"]', Dropdown.prototype.keydown)
.on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)


}(jQuery); }(jQuery);

+ 48
- 33
vendor/bower/bootstrap/js/modal.js View File

/* ======================================================================== /* ========================================================================
* Bootstrap: modal.js v3.3.2
* Bootstrap: modal.js v3.3.7
* http://getbootstrap.com/javascript/#modals * http://getbootstrap.com/javascript/#modals
* ======================================================================== * ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */ * ======================================================================== */


// ====================== // ======================


var Modal = function (element, options) { var Modal = function (element, options) {
this.options = options
this.$body = $(document.body)
this.$element = $(element)
this.$backdrop =
this.isShown = null
this.scrollbarWidth = 0
this.options = options
this.$body = $(document.body)
this.$element = $(element)
this.$dialog = this.$element.find('.modal-dialog')
this.$backdrop = null
this.isShown = null
this.originalBodyPad = null
this.scrollbarWidth = 0
this.ignoreBackdropClick = false


if (this.options.remote) { if (this.options.remote) {
this.$element this.$element
} }
} }


Modal.VERSION = '3.3.2'
Modal.VERSION = '3.3.7'


Modal.TRANSITION_DURATION = 300 Modal.TRANSITION_DURATION = 300
Modal.BACKDROP_TRANSITION_DURATION = 150 Modal.BACKDROP_TRANSITION_DURATION = 150


this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this)) this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))


this.$dialog.on('mousedown.dismiss.bs.modal', function () {
that.$element.one('mouseup.dismiss.bs.modal', function (e) {
if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
})
})

this.backdrop(function () { this.backdrop(function () {
var transition = $.support.transition && that.$element.hasClass('fade') var transition = $.support.transition && that.$element.hasClass('fade')


.show() .show()
.scrollTop(0) .scrollTop(0)


if (that.options.backdrop) that.adjustBackdrop()
that.adjustDialog() that.adjustDialog()


if (transition) { if (transition) {
that.$element[0].offsetWidth // force reflow that.$element[0].offsetWidth // force reflow
} }


that.$element
.addClass('in')
.attr('aria-hidden', false)
that.$element.addClass('in')


that.enforceFocus() that.enforceFocus()


var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget }) var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })


transition ? transition ?
that.$element.find('.modal-dialog') // wait for modal to slide in
that.$dialog // wait for modal to slide in
.one('bsTransitionEnd', function () { .one('bsTransitionEnd', function () {
that.$element.trigger('focus').trigger(e) that.$element.trigger('focus').trigger(e)
}) })


this.$element this.$element
.removeClass('in') .removeClass('in')
.attr('aria-hidden', true)
.off('click.dismiss.bs.modal') .off('click.dismiss.bs.modal')
.off('mouseup.dismiss.bs.modal')

this.$dialog.off('mousedown.dismiss.bs.modal')


$.support.transition && this.$element.hasClass('fade') ? $.support.transition && this.$element.hasClass('fade') ?
this.$element this.$element
$(document) $(document)
.off('focusin.bs.modal') // guard against infinite focus loop .off('focusin.bs.modal') // guard against infinite focus loop
.on('focusin.bs.modal', $.proxy(function (e) { .on('focusin.bs.modal', $.proxy(function (e) {
if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
if (document !== e.target &&
this.$element[0] !== e.target &&
!this.$element.has(e.target).length) {
this.$element.trigger('focus') this.$element.trigger('focus')
} }
}, this)) }, this))
if (this.isShown && this.options.backdrop) { if (this.isShown && this.options.backdrop) {
var doAnimate = $.support.transition && animate var doAnimate = $.support.transition && animate


this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
.prependTo(this.$element)
.on('click.dismiss.bs.modal', $.proxy(function (e) {
if (e.target !== e.currentTarget) return
this.options.backdrop == 'static'
? this.$element[0].focus.call(this.$element[0])
: this.hide.call(this)
}, this))
this.$backdrop = $(document.createElement('div'))
.addClass('modal-backdrop ' + animate)
.appendTo(this.$body)

this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
if (this.ignoreBackdropClick) {
this.ignoreBackdropClick = false
return
}
if (e.target !== e.currentTarget) return
this.options.backdrop == 'static'
? this.$element[0].focus()
: this.hide()
}, this))


if (doAnimate) this.$backdrop[0].offsetWidth // force reflow if (doAnimate) this.$backdrop[0].offsetWidth // force reflow


// these following methods are used to handle overflowing modals // these following methods are used to handle overflowing modals


Modal.prototype.handleUpdate = function () { Modal.prototype.handleUpdate = function () {
if (this.options.backdrop) this.adjustBackdrop()
this.adjustDialog() this.adjustDialog()
} }


Modal.prototype.adjustBackdrop = function () {
this.$backdrop
.css('height', 0)
.css('height', this.$element[0].scrollHeight)
}

Modal.prototype.adjustDialog = function () { Modal.prototype.adjustDialog = function () {
var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight


} }


Modal.prototype.checkScrollbar = function () { Modal.prototype.checkScrollbar = function () {
this.bodyIsOverflowing = document.body.scrollHeight > document.documentElement.clientHeight
var fullWindowWidth = window.innerWidth
if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
var documentElementRect = document.documentElement.getBoundingClientRect()
fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
}
this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
this.scrollbarWidth = this.measureScrollbar() this.scrollbarWidth = this.measureScrollbar()
} }


Modal.prototype.setScrollbar = function () { Modal.prototype.setScrollbar = function () {
var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10) var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
this.originalBodyPad = document.body.style.paddingRight || ''
if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth) if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
} }


Modal.prototype.resetScrollbar = function () { Modal.prototype.resetScrollbar = function () {
this.$body.css('padding-right', '')
this.$body.css('padding-right', this.originalBodyPad)
} }


Modal.prototype.measureScrollbar = function () { // thx walsh Modal.prototype.measureScrollbar = function () { // thx walsh

+ 4
- 9
vendor/bower/bootstrap/js/popover.js View File

/* ======================================================================== /* ========================================================================
* Bootstrap: popover.js v3.3.2
* Bootstrap: popover.js v3.3.7
* http://getbootstrap.com/javascript/#popovers * http://getbootstrap.com/javascript/#popovers
* ======================================================================== * ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */ * ======================================================================== */




if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js') if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')


Popover.VERSION = '3.3.2'
Popover.VERSION = '3.3.7'


Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, { Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
placement: 'right', placement: 'right',
return (this.$arrow = this.$arrow || this.tip().find('.arrow')) return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
} }


Popover.prototype.tip = function () {
if (!this.$tip) this.$tip = $(this.options.template)
return this.$tip
}



// POPOVER PLUGIN DEFINITION // POPOVER PLUGIN DEFINITION
// ========================= // =========================
var data = $this.data('bs.popover') var data = $this.data('bs.popover')
var options = typeof option == 'object' && option var options = typeof option == 'object' && option


if (!data && option == 'destroy') return
if (!data && /destroy|hide/.test(option)) return
if (!data) $this.data('bs.popover', (data = new Popover(this, options))) if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
if (typeof option == 'string') data[option]() if (typeof option == 'string') data[option]()
}) })

+ 18
- 21
vendor/bower/bootstrap/js/scrollspy.js View File

/* ======================================================================== /* ========================================================================
* Bootstrap: scrollspy.js v3.3.2
* Bootstrap: scrollspy.js v3.3.7
* http://getbootstrap.com/javascript/#scrollspy * http://getbootstrap.com/javascript/#scrollspy
* ======================================================================== * ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */ * ======================================================================== */


// ========================== // ==========================


function ScrollSpy(element, options) { function ScrollSpy(element, options) {
var process = $.proxy(this.process, this)

this.$body = $('body')
this.$scrollElement = $(element).is('body') ? $(window) : $(element)
this.$body = $(document.body)
this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
this.options = $.extend({}, ScrollSpy.DEFAULTS, options) this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
this.selector = (this.options.target || '') + ' .nav li > a' this.selector = (this.options.target || '') + ' .nav li > a'
this.offsets = [] this.offsets = []
this.activeTarget = null this.activeTarget = null
this.scrollHeight = 0 this.scrollHeight = 0


this.$scrollElement.on('scroll.bs.scrollspy', process)
this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
this.refresh() this.refresh()
this.process() this.process()
} }


ScrollSpy.VERSION = '3.3.2'
ScrollSpy.VERSION = '3.3.7'


ScrollSpy.DEFAULTS = { ScrollSpy.DEFAULTS = {
offset: 10 offset: 10
} }


ScrollSpy.prototype.refresh = function () { ScrollSpy.prototype.refresh = function () {
var offsetMethod = 'offset'
var offsetBase = 0
var that = this
var offsetMethod = 'offset'
var offsetBase = 0

this.offsets = []
this.targets = []
this.scrollHeight = this.getScrollHeight()


if (!$.isWindow(this.$scrollElement[0])) { if (!$.isWindow(this.$scrollElement[0])) {
offsetMethod = 'position' offsetMethod = 'position'
offsetBase = this.$scrollElement.scrollTop() offsetBase = this.$scrollElement.scrollTop()
} }


this.offsets = []
this.targets = []
this.scrollHeight = this.getScrollHeight()

var self = this

this.$body this.$body
.find(this.selector) .find(this.selector)
.map(function () { .map(function () {
}) })
.sort(function (a, b) { return a[0] - b[0] }) .sort(function (a, b) { return a[0] - b[0] })
.each(function () { .each(function () {
self.offsets.push(this[0])
self.targets.push(this[1])
that.offsets.push(this[0])
that.targets.push(this[1])
}) })
} }


for (i = offsets.length; i--;) { for (i = offsets.length; i--;) {
activeTarget != targets[i] activeTarget != targets[i]
&& scrollTop >= offsets[i] && scrollTop >= offsets[i]
&& (!offsets[i + 1] || scrollTop <= offsets[i + 1])
&& (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
&& this.activate(targets[i]) && this.activate(targets[i])
} }
} }
this.clear() this.clear()


var selector = this.selector + var selector = this.selector +
'[data-target="' + target + '"],' +
this.selector + '[href="' + target + '"]'
'[data-target="' + target + '"],' +
this.selector + '[href="' + target + '"]'


var active = $(selector) var active = $(selector)
.parents('li') .parents('li')

+ 7
- 5
vendor/bower/bootstrap/js/tab.js View File

/* ======================================================================== /* ========================================================================
* Bootstrap: tab.js v3.3.2
* Bootstrap: tab.js v3.3.7
* http://getbootstrap.com/javascript/#tabs * http://getbootstrap.com/javascript/#tabs
* ======================================================================== * ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */ * ======================================================================== */


// ==================== // ====================


var Tab = function (element) { var Tab = function (element) {
// jscs:disable requireDollarBeforejQueryAssignment
this.element = $(element) this.element = $(element)
// jscs:enable requireDollarBeforejQueryAssignment
} }


Tab.VERSION = '3.3.2'
Tab.VERSION = '3.3.7'


Tab.TRANSITION_DURATION = 150 Tab.TRANSITION_DURATION = 150


var $active = container.find('> .active') var $active = container.find('> .active')
var transition = callback var transition = callback
&& $.support.transition && $.support.transition
&& (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length)
&& ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)


function next() { function next() {
$active $active
element.removeClass('fade') element.removeClass('fade')
} }


if (element.parent('.dropdown-menu')) {
if (element.parent('.dropdown-menu').length) {
element element
.closest('li.dropdown') .closest('li.dropdown')
.addClass('active') .addClass('active')

+ 84
- 36
vendor/bower/bootstrap/js/tooltip.js View File

/* ======================================================================== /* ========================================================================
* Bootstrap: tooltip.js v3.3.2
* Bootstrap: tooltip.js v3.3.7
* http://getbootstrap.com/javascript/#tooltip * http://getbootstrap.com/javascript/#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame * Inspired by the original jQuery.tipsy by Jason Frame
* ======================================================================== * ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */ * ======================================================================== */


// =============================== // ===============================


var Tooltip = function (element, options) { var Tooltip = function (element, options) {
this.type =
this.options =
this.enabled =
this.timeout =
this.hoverState =
this.type = null
this.options = null
this.enabled = null
this.timeout = null
this.hoverState = null
this.$element = null this.$element = null
this.inState = null


this.init('tooltip', element, options) this.init('tooltip', element, options)
} }


Tooltip.VERSION = '3.3.2'
Tooltip.VERSION = '3.3.7'


Tooltip.TRANSITION_DURATION = 150 Tooltip.TRANSITION_DURATION = 150


this.type = type this.type = type
this.$element = $(element) this.$element = $(element)
this.options = this.getOptions(options) this.options = this.getOptions(options)
this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)
this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
this.inState = { click: false, hover: false, focus: false }

if (this.$element[0] instanceof document.constructor && !this.options.selector) {
throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
}


var triggers = this.options.trigger.split(' ') var triggers = this.options.trigger.split(' ')


var self = obj instanceof this.constructor ? var self = obj instanceof this.constructor ?
obj : $(obj.currentTarget).data('bs.' + this.type) obj : $(obj.currentTarget).data('bs.' + this.type)


if (self && self.$tip && self.$tip.is(':visible')) {
self.hoverState = 'in'
return
}

if (!self) { if (!self) {
self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
$(obj.currentTarget).data('bs.' + this.type, self) $(obj.currentTarget).data('bs.' + this.type, self)
} }


if (obj instanceof $.Event) {
self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
}

if (self.tip().hasClass('in') || self.hoverState == 'in') {
self.hoverState = 'in'
return
}

clearTimeout(self.timeout) clearTimeout(self.timeout)


self.hoverState = 'in' self.hoverState = 'in'
}, self.options.delay.show) }, self.options.delay.show)
} }


Tooltip.prototype.isInStateTrue = function () {
for (var key in this.inState) {
if (this.inState[key]) return true
}

return false
}

Tooltip.prototype.leave = function (obj) { Tooltip.prototype.leave = function (obj) {
var self = obj instanceof this.constructor ? var self = obj instanceof this.constructor ?
obj : $(obj.currentTarget).data('bs.' + this.type) obj : $(obj.currentTarget).data('bs.' + this.type)
$(obj.currentTarget).data('bs.' + this.type, self) $(obj.currentTarget).data('bs.' + this.type, self)
} }


if (obj instanceof $.Event) {
self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
}

if (self.isInStateTrue()) return

clearTimeout(self.timeout) clearTimeout(self.timeout)


self.hoverState = 'out' self.hoverState = 'out'
.data('bs.' + this.type, this) .data('bs.' + this.type, this)


this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
this.$element.trigger('inserted.bs.' + this.type)


var pos = this.getPosition() var pos = this.getPosition()
var actualWidth = $tip[0].offsetWidth var actualWidth = $tip[0].offsetWidth


if (autoPlace) { if (autoPlace) {
var orgPlacement = placement var orgPlacement = placement
var $container = this.options.container ? $(this.options.container) : this.$element.parent()
var containerDim = this.getPosition($container)
var viewportDim = this.getPosition(this.$viewport)


placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top' :
placement == 'top' && pos.top - actualHeight < containerDim.top ? 'bottom' :
placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' :
placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' :
placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' :
placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' :
placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' :
placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' :
placement placement


$tip $tip
if (isNaN(marginTop)) marginTop = 0 if (isNaN(marginTop)) marginTop = 0
if (isNaN(marginLeft)) marginLeft = 0 if (isNaN(marginLeft)) marginLeft = 0


offset.top = offset.top + marginTop
offset.left = offset.left + marginLeft
offset.top += marginTop
offset.left += marginLeft


// $.fn.offset doesn't round pixel values // $.fn.offset doesn't round pixel values
// so we use setOffset directly with our own function B-0 // so we use setOffset directly with our own function B-0
this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical) this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
} }


Tooltip.prototype.replaceArrow = function (delta, dimension, isHorizontal) {
Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
this.arrow() this.arrow()
.css(isHorizontal ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
.css(isHorizontal ? 'top' : 'left', '')
.css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
.css(isVertical ? 'top' : 'left', '')
} }


Tooltip.prototype.setContent = function () { Tooltip.prototype.setContent = function () {


Tooltip.prototype.hide = function (callback) { Tooltip.prototype.hide = function (callback) {
var that = this var that = this
var $tip = this.tip()
var $tip = $(this.$tip)
var e = $.Event('hide.bs.' + this.type) var e = $.Event('hide.bs.' + this.type)


function complete() { function complete() {
if (that.hoverState != 'in') $tip.detach() if (that.hoverState != 'in') $tip.detach()
that.$element
.removeAttr('aria-describedby')
.trigger('hidden.bs.' + that.type)
if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.
that.$element
.removeAttr('aria-describedby')
.trigger('hidden.bs.' + that.type)
}
callback && callback() callback && callback()
} }




$tip.removeClass('in') $tip.removeClass('in')


$.support.transition && this.$tip.hasClass('fade') ?
$.support.transition && $tip.hasClass('fade') ?
$tip $tip
.one('bsTransitionEnd', complete) .one('bsTransitionEnd', complete)
.emulateTransitionEnd(Tooltip.TRANSITION_DURATION) : .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :


Tooltip.prototype.fixTitle = function () { Tooltip.prototype.fixTitle = function () {
var $e = this.$element var $e = this.$element
if ($e.attr('title') || typeof ($e.attr('data-original-title')) != 'string') {
if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
$e.attr('data-original-title', $e.attr('title') || '').attr('title', '') $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
} }
} }
// width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093 // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top }) elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
} }
var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
var isSvg = window.SVGElement && el instanceof window.SVGElement
// Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.
// See https://github.com/twbs/bootstrap/issues/20280
var elOffset = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())
var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() } var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null


var rightEdgeOffset = pos.left + viewportPadding + actualWidth var rightEdgeOffset = pos.left + viewportPadding + actualWidth
if (leftEdgeOffset < viewportDimensions.left) { // left overflow if (leftEdgeOffset < viewportDimensions.left) { // left overflow
delta.left = viewportDimensions.left - leftEdgeOffset delta.left = viewportDimensions.left - leftEdgeOffset
} else if (rightEdgeOffset > viewportDimensions.width) { // right overflow
} else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
} }
} }
} }


Tooltip.prototype.tip = function () { Tooltip.prototype.tip = function () {
return (this.$tip = this.$tip || $(this.options.template))
if (!this.$tip) {
this.$tip = $(this.options.template)
if (this.$tip.length != 1) {
throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
}
}
return this.$tip
} }


Tooltip.prototype.arrow = function () { Tooltip.prototype.arrow = function () {
} }
} }


self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
if (e) {
self.inState.click = !self.inState.click
if (self.isInStateTrue()) self.enter(self)
else self.leave(self)
} else {
self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
}
} }


Tooltip.prototype.destroy = function () { Tooltip.prototype.destroy = function () {
clearTimeout(this.timeout) clearTimeout(this.timeout)
this.hide(function () { this.hide(function () {
that.$element.off('.' + that.type).removeData('bs.' + that.type) that.$element.off('.' + that.type).removeData('bs.' + that.type)
if (that.$tip) {
that.$tip.detach()
}
that.$tip = null
that.$arrow = null
that.$viewport = null
that.$element = null
}) })
} }


var data = $this.data('bs.tooltip') var data = $this.data('bs.tooltip')
var options = typeof option == 'object' && option var options = typeof option == 'object' && option


if (!data && option == 'destroy') return
if (!data && /destroy|hide/.test(option)) return
if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))) if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
if (typeof option == 'string') data[option]() if (typeof option == 'string') data[option]()
}) })

+ 2
- 2
vendor/bower/bootstrap/js/transition.js View File

/* ======================================================================== /* ========================================================================
* Bootstrap: transition.js v3.3.2
* Bootstrap: transition.js v3.3.7
* http://getbootstrap.com/javascript/#transitions * http://getbootstrap.com/javascript/#transitions
* ======================================================================== * ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */ * ======================================================================== */



+ 2
- 2
vendor/bower/bootstrap/less/alerts.less View File

// Specified for the h4 to prevent conflicts of changing @headings-color // Specified for the h4 to prevent conflicts of changing @headings-color
color: inherit; color: inherit;
} }
// Provide class for links that match alerts // Provide class for links that match alerts
.alert-link { .alert-link {
font-weight: @alert-link-font-weight; font-weight: @alert-link-font-weight;
> ul { > ul {
margin-bottom: 0; margin-bottom: 0;
} }
> p + p { > p + p {
margin-top: 5px; margin-top: 5px;
} }

+ 7
- 6
vendor/bower/bootstrap/less/badges.less View File

font-weight: @badge-font-weight; font-weight: @badge-font-weight;
color: @badge-color; color: @badge-color;
line-height: @badge-line-height; line-height: @badge-line-height;
vertical-align: baseline;
vertical-align: middle;
white-space: nowrap; white-space: nowrap;
text-align: center; text-align: center;
background-color: @badge-bg; background-color: @badge-bg;
position: relative; position: relative;
top: -1px; top: -1px;
} }
.btn-xs & {

.btn-xs &,
.btn-group-xs > .btn & {
top: 0; top: 0;
padding: 1px 5px; padding: 1px 5px;
} }
color: @badge-active-color; color: @badge-active-color;
background-color: @badge-active-bg; background-color: @badge-active-bg;
} }
.list-group-item > & { .list-group-item > & {
float: right; float: right;
} }
.list-group-item > & + & { .list-group-item > & + & {
margin-right: 5px; margin-right: 5px;
} }
.nav-pills > li > a > & { .nav-pills > li > a > & {
margin-left: 3px; margin-left: 3px;
} }

+ 6
- 0
vendor/bower/bootstrap/less/bootstrap.less View File

/*!
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/

// Core variables and mixins // Core variables and mixins
@import "variables.less"; @import "variables.less";
@import "mixins.less"; @import "mixins.less";

+ 4
- 3
vendor/bower/bootstrap/less/button-groups.less View File

margin-left: -5px; // Offset the first child's margin margin-left: -5px; // Offset the first child's margin
&:extend(.clearfix all); &:extend(.clearfix all);


.btn,
.btn-group, .btn-group,
.input-group { .input-group {
float: left; float: left;
.border-right-radius(0); .border-right-radius(0);
} }
} }
// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
// Need .dropdown-toggle since :last-child doesn't apply, given that a .dropdown-menu is used immediately after it
.btn-group > .btn:last-child:not(:first-child), .btn-group > .btn:last-child:not(:first-child),
.btn-group > .dropdown-toggle:not(:first-child) { .btn-group > .dropdown-toggle:not(:first-child) {
.border-left-radius(0); .border-left-radius(0);
border-radius: 0; border-radius: 0;
} }
&:first-child:not(:last-child) { &:first-child:not(:last-child) {
border-top-right-radius: @border-radius-base;
.border-top-radius(@btn-border-radius-base);
.border-bottom-radius(0); .border-bottom-radius(0);
} }
&:last-child:not(:first-child) { &:last-child:not(:first-child) {
border-bottom-left-radius: @border-radius-base;
.border-top-radius(0); .border-top-radius(0);
.border-bottom-radius(@btn-border-radius-base);
} }
} }
.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {

+ 11
- 5
vendor/bower/bootstrap/less/buttons.less View File

background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
border: 1px solid transparent; border: 1px solid transparent;
white-space: nowrap; white-space: nowrap;
.button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @border-radius-base);
.button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @btn-border-radius-base);
.user-select(none); .user-select(none);


&, &,
&[disabled], &[disabled],
fieldset[disabled] & { fieldset[disabled] & {
cursor: @cursor-disabled; cursor: @cursor-disabled;
pointer-events: none; // Future-proof disabling of clicks
.opacity(.65); .opacity(.65);
.box-shadow(none); .box-shadow(none);
} }

a& {
&.disabled,
fieldset[disabled] & {
pointer-events: none; // Future-proof disabling of clicks on `<a>` elements
}
}
} }






.btn-lg { .btn-lg {
// line-height: ensure even-numbered height of button next to large input // line-height: ensure even-numbered height of button next to large input
.button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
.button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @btn-border-radius-large);
} }
.btn-sm { .btn-sm {
// line-height: ensure proper height of button next to small input // line-height: ensure proper height of button next to small input
.button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
.button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small);
} }
.btn-xs { .btn-xs {
.button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @border-radius-small);
.button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small);
} }





+ 9
- 8
vendor/bower/bootstrap/less/carousel.less View File

@media all and (transform-3d), (-webkit-transform-3d) { @media all and (transform-3d), (-webkit-transform-3d) {
.transition-transform(~'0.6s ease-in-out'); .transition-transform(~'0.6s ease-in-out');
.backface-visibility(~'hidden'); .backface-visibility(~'hidden');
.perspective(1000);
.perspective(1000px);


&.next, &.next,
&.active.right { &.active.right {
color: @carousel-control-color; color: @carousel-control-color;
text-align: center; text-align: center;
text-shadow: @carousel-text-shadow; text-shadow: @carousel-text-shadow;
background-color: rgba(0, 0, 0, 0); // Fix IE9 click-thru bug
// We can't have this transition here because WebKit cancels the carousel // We can't have this transition here because WebKit cancels the carousel
// animation if you trip this while in the middle of another animation. // animation if you trip this while in the middle of another animation.


.glyphicon-chevron-right { .glyphicon-chevron-right {
position: absolute; position: absolute;
top: 50%; top: 50%;
margin-top: -10px;
z-index: 5; z-index: 5;
display: inline-block; display: inline-block;
} }
.icon-next { .icon-next {
width: 20px; width: 20px;
height: 20px; height: 20px;
margin-top: -10px;
line-height: 1; line-height: 1;
font-family: serif; font-family: serif;
} }
.glyphicon-chevron-right, .glyphicon-chevron-right,
.icon-prev, .icon-prev,
.icon-next { .icon-next {
width: 30px;
height: 30px;
margin-top: -15px;
font-size: 30px;
width: (@carousel-control-font-size * 1.5);
height: (@carousel-control-font-size * 1.5);
margin-top: (@carousel-control-font-size / -2);
font-size: (@carousel-control-font-size * 1.5);
} }
.glyphicon-chevron-left, .glyphicon-chevron-left,
.icon-prev { .icon-prev {
margin-left: -15px;
margin-left: (@carousel-control-font-size / -2);
} }
.glyphicon-chevron-right, .glyphicon-chevron-right,
.icon-next { .icon-next {
margin-right: -15px;
margin-right: (@carousel-control-font-size / -2);
} }
} }



+ 1
- 2
vendor/bower/bootstrap/less/component-animations.less View File



.collapse { .collapse {
display: none; display: none;
visibility: hidden;


&.in { display: block; visibility: visible; }
&.in { display: block; }
tr&.in { display: table-row; } tr&.in { display: table-row; }
tbody&.in { display: table-row-group; } tbody&.in { display: table-row-group; }
} }

+ 4
- 2
vendor/bower/bootstrap/less/dropdowns.less View File

height: 0; height: 0;
margin-left: 2px; margin-left: 2px;
vertical-align: middle; vertical-align: middle;
border-top: @caret-width-base solid;
border-top: @caret-width-base dashed;
border-top: @caret-width-base solid ~"\9"; // IE8
border-right: @caret-width-base solid transparent; border-right: @caret-width-base solid transparent;
border-left: @caret-width-base solid transparent; border-left: @caret-width-base solid transparent;
} }
// Reverse the caret // Reverse the caret
.caret { .caret {
border-top: 0; border-top: 0;
border-bottom: @caret-width-base solid;
border-bottom: @caret-width-base dashed;
border-bottom: @caret-width-base solid ~"\9"; // IE8
content: ""; content: "";
} }
// Different positioning for bottom up menu // Different positioning for bottom up menu

+ 61
- 14
vendor/bower/bootstrap/less/forms.less View File

line-height: normal; line-height: normal;
} }


// Set the height of file controls to match text inputs
input[type="file"] { input[type="file"] {
display: block; display: block;
} }
// Placeholder // Placeholder
.placeholder(); .placeholder();


// Unstyle the caret on `<select>`s in IE10+.
&::-ms-expand {
border: 0;
background-color: transparent;
}

// Disabled and read-only inputs // Disabled and read-only inputs
// //
// HTML5 says that controls under a fieldset > legend:first-child won't be // HTML5 says that controls under a fieldset > legend:first-child won't be
&[disabled], &[disabled],
&[readonly], &[readonly],
fieldset[disabled] & { fieldset[disabled] & {
cursor: @cursor-disabled;
background-color: @input-bg-disabled; background-color: @input-bg-disabled;
opacity: 1; // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655 opacity: 1; // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655
} }


&[disabled],
fieldset[disabled] & {
cursor: @cursor-disabled;
}

// Reset height for `textarea`s // Reset height for `textarea`s
textarea& { textarea& {
height: auto; height: auto;
// text within the input to become vertically misaligned. As a workaround, we // text within the input to become vertically misaligned. As a workaround, we
// set a pixel line-height that matches the given height of the input, but only // set a pixel line-height that matches the given height of the input, but only
// for Safari. See https://bugs.webkit.org/show_bug.cgi?id=139848 // for Safari. See https://bugs.webkit.org/show_bug.cgi?id=139848
//
// Note that as of 9.3, iOS doesn't support `week`.


@media screen and (-webkit-min-device-pixel-ratio: 0) { @media screen and (-webkit-min-device-pixel-ratio: 0) {
input[type="date"], input[type="date"],
input[type="time"], input[type="time"],
input[type="datetime-local"], input[type="datetime-local"],
input[type="month"] { input[type="month"] {
line-height: @input-height-base;
&.form-control {
line-height: @input-height-base;
}


&.input-sm, &.input-sm,
.input-group-sm & { .input-group-sm & {
// horizontal forms, use the predefined grid classes. // horizontal forms, use the predefined grid classes.


.form-group { .form-group {
margin-bottom: 15px;
margin-bottom: @form-group-margin-bottom;
} }




// Radios and checkboxes on same line // Radios and checkboxes on same line
.radio-inline, .radio-inline,
.checkbox-inline { .checkbox-inline {
position: relative;
display: inline-block; display: inline-block;
padding-left: 20px; padding-left: 20px;
margin-bottom: 0; margin-bottom: 0;
padding-bottom: (@padding-base-vertical + 1); padding-bottom: (@padding-base-vertical + 1);
// Remove default margin from `p` // Remove default margin from `p`
margin-bottom: 0; margin-bottom: 0;
min-height: (@line-height-computed + @font-size-base);


&.input-lg, &.input-lg,
&.input-sm { &.input-sm {
} }
.form-group-sm { .form-group-sm {
.form-control { .form-control {
.input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @input-border-radius-small);
height: @input-height-small;
padding: @padding-small-vertical @padding-small-horizontal;
font-size: @font-size-small;
line-height: @line-height-small;
border-radius: @input-border-radius-small;
}
select.form-control {
height: @input-height-small;
line-height: @input-height-small;
}
textarea.form-control,
select[multiple].form-control {
height: auto;
} }
.form-control-static { .form-control-static {
height: @input-height-small; height: @input-height-small;
padding: @padding-small-vertical @padding-small-horizontal;
min-height: (@line-height-computed + @font-size-small);
padding: (@padding-small-vertical + 1) @padding-small-horizontal;
font-size: @font-size-small; font-size: @font-size-small;
line-height: @line-height-small; line-height: @line-height-small;
} }
} }
.form-group-lg { .form-group-lg {
.form-control { .form-control {
.input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @input-border-radius-large);
height: @input-height-large;
padding: @padding-large-vertical @padding-large-horizontal;
font-size: @font-size-large;
line-height: @line-height-large;
border-radius: @input-border-radius-large;
}
select.form-control {
height: @input-height-large;
line-height: @input-height-large;
}
textarea.form-control,
select[multiple].form-control {
height: auto;
} }
.form-control-static { .form-control-static {
height: @input-height-large; height: @input-height-large;
padding: @padding-large-vertical @padding-large-horizontal;
min-height: (@line-height-computed + @font-size-large);
padding: (@padding-large-vertical + 1) @padding-large-horizontal;
font-size: @font-size-large; font-size: @font-size-large;
line-height: @line-height-large; line-height: @line-height-large;
} }
text-align: center; text-align: center;
pointer-events: none; pointer-events: none;
} }
.input-lg + .form-control-feedback {
.input-lg + .form-control-feedback,
.input-group-lg + .form-control-feedback,
.form-group-lg .form-control + .form-control-feedback {
width: @input-height-large; width: @input-height-large;
height: @input-height-large; height: @input-height-large;
line-height: @input-height-large; line-height: @input-height-large;
} }
.input-sm + .form-control-feedback {
.input-sm + .form-control-feedback,
.input-group-sm + .form-control-feedback,
.form-group-sm .form-control + .form-control-feedback {
width: @input-height-small; width: @input-height-small;
height: @input-height-small; height: @input-height-small;
line-height: @input-height-small; line-height: @input-height-small;
.has-feedback label { .has-feedback label {


& ~ .form-control-feedback { & ~ .form-control-feedback {
top: (@line-height-computed + 5); // Height of the `label` and its margin
top: (@line-height-computed + 5); // Height of the `label` and its margin
} }
&.sr-only ~ .form-control-feedback { &.sr-only ~ .form-control-feedback {
top: 0;
top: 0;
} }
} }


// Reposition the icon because it's now within a grid column and columns have // Reposition the icon because it's now within a grid column and columns have
// `position: relative;` on them. Also accounts for the grid gutter padding. // `position: relative;` on them. Also accounts for the grid gutter padding.
.has-feedback .form-control-feedback { .has-feedback .form-control-feedback {
right: (@grid-gutter-width / 2);
right: floor((@grid-gutter-width / 2));
} }


// Form group sizes // Form group sizes
.form-group-lg { .form-group-lg {
@media (min-width: @screen-sm-min) { @media (min-width: @screen-sm-min) {
.control-label { .control-label {
padding-top: ((@padding-large-vertical * @line-height-large) + 1);
padding-top: (@padding-large-vertical + 1);
font-size: @font-size-large;
} }
} }
} }
@media (min-width: @screen-sm-min) { @media (min-width: @screen-sm-min) {
.control-label { .control-label {
padding-top: (@padding-small-vertical + 1); padding-top: (@padding-small-vertical + 1);
font-size: @font-size-small;
} }
} }
} }

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save