Improved debugging. Removed hard coded url "http://localhost:3000".

This commit is contained in:
Martin Edenhofer 2016-02-02 07:59:13 +01:00
parent 94eabedabb
commit 15a3430ee8
2 changed files with 6 additions and 6 deletions

View file

@ -38,7 +38,7 @@
<script src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
<script id="zammad_form_script" src="http://localhost:3000/assets/form/form.js"></script>
<script id="zammad_form_script" src="/assets/form/form.js"></script>
<script>
$('#feedback-form-modal').ZammadForm({

View file

@ -94,10 +94,10 @@ $(function() {
this._script_location = '/assets/form/form.js'
this._css_location = '/assets/form/form.css'
src = document.getElementById('zammad_form_script').src
this.css_location = src.replace(this._script_location, this._css_location)
this.endpoint_config = src.replace(this._script_location, this._endpoint_config)
this.endpoint_submit = src.replace(this._script_location, this._endpoint_submit)
this._src = document.getElementById('zammad_form_script').src
this.css_location = this._src.replace(this._script_location, this._css_location)
this.endpoint_config = this._src.replace(this._script_location, this._endpoint_config)
this.endpoint_submit = this._src.replace(this._script_location, this._endpoint_submit)
this._config = {}
@ -108,7 +108,7 @@ $(function() {
Plugin.prototype.init = function () {
var _this = this
_this.log('debug', 'init')
_this.log('debug', 'init', this._src)
if (!_this.options.noCSS) {
_this.loadCss(_this.css_location)