formstrap 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5afd41f3d2d060b685fc6357bca9761bf8c48e4a1b84d7749ea74ead04ebe31a
4
- data.tar.gz: 103a7f552523b866e29460eb42ba1007e0ab558a1818eba5a6728500b07ac820
3
+ metadata.gz: 40f3e1c17b291e264dbe5dc51b0b478c6ca4b92d33a0ecc1f758cc4a9d48510a
4
+ data.tar.gz: 271fd64f522260f1845475094be4a6abf4c7a8e527dc36cbf43ffe1e8f00007b
5
5
  SHA512:
6
- metadata.gz: 5e90e2f3c3e5589459b4f48c1c8ee73a5720a0dbbb00fc543e70ef59d8045111b41b20c973fd80708404b05a074b4ef81d3a9d7e8206b3c1bd3c358b8b4e531b
7
- data.tar.gz: debe1ba9cefa1bfd484bb50df731c0b0fe555fe89e06140ec311e0e722ab93771fae0c1d9220aded9810b83c14e3869cf2336686c9169333262526aa295227ec
6
+ metadata.gz: a164e51245520da0e05bb9c6ddb899791f113f00b5b76a50e48e4c1e4ebc4a551c35586814c3697e087ae0050b2d5f2b2ed104b2ce340368fb5ddb7c2d845e66
7
+ data.tar.gz: 801723b921f1f07c8de24799b75532fa9a3cc591e8d98f13c116b4dea4013cf6fc4795d0859d64f34546fd771943190880a1cb8537b2934c79829e4e300a81bb
@@ -31,7 +31,7 @@ export default class extends Controller {
31
31
  const ids = this.activeIds()
32
32
 
33
33
  this.modalButtonTargets.forEach((button) => {
34
- const sourceLocation = location.protocol + '//' + location.host
34
+ const sourceLocation = window.location.protocol + '//' + window.location.host
35
35
  const url = new URL(button.getAttribute('href'), sourceLocation)
36
36
 
37
37
  // Remove all ids[]
@@ -10974,7 +10974,7 @@ var media_controller_default = class extends Controller {
10974
10974
  syncIds() {
10975
10975
  const ids = this.activeIds();
10976
10976
  this.modalButtonTargets.forEach((button) => {
10977
- const sourceLocation = location.protocol + "//" + location.host;
10977
+ const sourceLocation = window.location.protocol + "//" + window.location.host;
10978
10978
  const url = new URL(button.getAttribute("href"), sourceLocation);
10979
10979
  url.searchParams.delete("ids[]");
10980
10980
  ids.forEach((id) => {
@@ -152,13 +152,7 @@ module Formstrap
152
152
  end
153
153
 
154
154
  def render_input(name, attribute, options)
155
- # ToDo: Find a way to import the host of the application
156
- renderer = ApplicationController.renderer.new(
157
- http_host: "headmin.test",
158
- https: true
159
- )
160
-
161
- renderer.render(template: "formstrap/_#{name}", locals: {form: self, attribute: attribute, **options})
155
+ @template.render("formstrap/#{name}", form: self, attribute: attribute, **options)
162
156
  end
163
157
 
164
158
  def method_missing(name, *args, &block)
@@ -1,3 +1,3 @@
1
1
  module Formstrap
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontierdotbe/formstrap",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Bootstrap-powered Form Helpers",
5
5
  "module": "app/assets/javascripts/formstrap.js",
6
6
  "main": "app/assets/javascripts/formstrap.js",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jef Vlamings