gitana / alpaca

Alpaca provides the easiest way to generate interactive HTML5 forms for web and mobile applications. It uses JSON Schema and simple Handlebars templates to generate great looking, dynamic user interfaces on top of Twitter Bootstrap, jQuery UI, jQuery Mobile and HTML5.
http://www.alpacajs.org
Other
1.29k stars 371 forks source link

External source load #599

Open ocdogan opened 6 years ago

ocdogan commented 6 years ago

External sources defined as absolute path directing the existing path with the loaded page does not work. Atleast "./" file path prefix needs to be given to make it work as an external URL.

Not working style:

$("#form").alpaca({ "schemaSource": "connector-custom-schema.json", "optionsSource": "connector-custom-options.json", "dataSource": "connector-custom-data.json", "viewSource": "connector-custom-view.json" });

Working style:

$("#form").alpaca({ "schemaSource": "./connector-custom-schema.json", "optionsSource": "./connector-custom-options.json", "dataSource": "./connector-custom-data.json", "viewSource": "./connector-custom-view.json" });

seanvree commented 6 years ago

Yup, I found this too. I'm assuming a "base URL" would need be defined? But it is weird that it doesn't use the relative URL when defined.