AlainCouthures / xsltforms

XForms to XHTML+Javascript (AJAX) conversion based on a unique XSL transformation. Suitable server-side (PHP) or client-side (Google Chrome, Edge, Internet Explorer, Mozilla FireFox, Opera, Safari) browser treatment where an XSLT 1.0 engine is available
37 stars 17 forks source link

Problem with upload field #5

Closed rysi3k closed 9 years ago

rysi3k commented 9 years ago

Hello, I have that field:

<xf:upload
    _bind="ID14" ref="wnio:ID14">
    <xf:filename ref="../@nazwaPliku"/>
    <xf:label>
    <span/>
    </xf:label>
</xf:upload>

XSLTForms renders that field propertly but after select file there there are alert with "Error". I have fixed this with modifing XsltForms_binding.prototype.evaluate to that:

XsltForms_binding.prototype.evaluate = function() {
    return this.bind_evaluate.apply(this, arguments);
};

I don't know it's ok? it's bug or I missed something?

Regards

AlainCouthures commented 9 years ago

Hello, There are still some "meaningless" method names in XSLTForms due to its ancestor project and it is difficult to read source lines and immediately recognize the class of an object.

Being the worse case, the evaluate method had to be renamed and it was just maintained to catch missed replacements with an alert. Could you please use a browser debugger, add a breakpoint for the alert instruction then get corresponding source line for the call to be renamed?

Thank you in advance!

rysi3k commented 9 years ago

This call is in line 12437 http://scr.hu/1b8d/pqw9z in XsltForms_upload.prototype.change i think the same call is in XsltForms_upload.prototype.directclick in 12330

AlainCouthures commented 9 years ago

This has be fixed in latest commit.

Thanks!