Closed sleemanj closed 3 years ago
Attachment: XinhaLoader.patch
an example configuration (based on the Newbie config) that shows how to disable XinhaLoader.js's loading message for some editors (needs patch to XinhaLoader.js) Attachment: XinhaConfig.js
ejucovy commented:
I attached a patch to
XinhaLoader.js
which lets the user specify which editors should have loading messages, using a new global variable. I also attached an exampleXinhaConfig.js
that shows how to use this.But, I am leaning towards the last approach in the ticket:
Of course, it could also be argued that if you're using
XinhaLoader.js
you are accepting the unconditional existence of loading messages.Part of the reason I'm leaning towards this is that I don't think we should be adding new functionality to
XinhaLoader.js
; I'd rather try to deprecate it (though I don't know how realistic that is)
ejucovy commented:
I attached a patch to
XinhaLoader.js
which lets the user specify which editors should have loading messages, using a new global variable. I also attached an exampleXinhaConfig.js
that shows how to use this.But, I am leaning towards the last approach in the ticket:
Of course, it could also be argued that if you're using
XinhaLoader.js
you are accepting the unconditional existence of loading messages.Part of the reason I'm leaning towards this is that I don't think we should be adding new functionality to
XinhaLoader.js
; I'd rather try to deprecate it (though I don't know how realistic that is)
wontfix
new
to closed
See http://www.xinha.org/punbb/viewtopic.php?pid=8777#p8777
There is no way to disable the "loading" message if you are using
XinhaLoader.js
, because that file unconditionally callscreateLoadingMessages
for allxinha_editors
.The
config.showLoading
option doesn't work, because when theXinhaLoader.js
script is executed, the configuration object isn't available yet.A simple solution is to let the user specify an explicit list of editors that the loading message should be shown for (in parallel to
xinha_editors
). This is a suboptimal solution because it means configuration of the loading message behavior looks totally different if you useXinhaLoader.js
vsXinhaCore.js
-- but I don't think there's any way around that.More broadly,
XinhaLoader.js
makes me nervous, because it duplicates large chunks of code fromXinhaCore.js
so it's easy for them to get out of sync. And also because of the problem mentioned above -- that there is no way to pass configuration to it without inventing a whole new configuration system just for it. (For the most part this doesn't matter, because most configuration doesn't have any effect until the xinha editors are actually created .. it may just be the showLoading option.)Of course, it could also be argued that if you're using
XinhaLoader.js
you are accepting the unconditional existence of loading messages.Reported by ejucovy, migrated from http://trac.xinha.org/ticket/1563