Misc fixes + note about stuff to fix

This commit is contained in:
Alexandre Aubin 2019-03-14 17:38:44 +01:00
parent 70e27e53a1
commit 328c0b73f0
2 changed files with 7 additions and 5 deletions

View file

@ -306,11 +306,11 @@ end
-- --
function scandir(directory, callback) function scandir(directory, callback)
local i, popen = 0, io.popen -- FIXME : this sometime fails (randomly...)
-- because of 'interrupted system call'
-- use find (and not ls) to list only files recursively and with their full path relative to the asked directory -- use find (and not ls) to list only files recursively and with their full path relative to the asked directory
local pfile = popen('cd "'..directory..'" && find * -type f') local pfile = io.popen('cd "'..directory..'" && find * -type f')
for filename in pfile:lines() do for filename in pfile:lines() do
i = i + 1
callback(filename) callback(filename)
end end
pfile:close() pfile:close()

View file

@ -257,6 +257,7 @@ function init_portal_button_and_overlay()
// Inject portal stylesheet // Inject portal stylesheet
// (we need it for the portal button to be displayed correctly) // (we need it for the portal button to be displayed correctly)
// FIXME : Really wondering if we shouldn't set this in data/templates/nginx/plain/yunohost_panel.conf.inc ...
var portalStyle = document.createElement("link"); var portalStyle = document.createElement("link");
portalStyle.setAttribute("rel", "stylesheet"); portalStyle.setAttribute("rel", "stylesheet");
portalStyle.setAttribute("type", "text/css"); portalStyle.setAttribute("type", "text/css");
@ -276,8 +277,9 @@ function init_portal_button_and_overlay()
// Bind portal button // Bind portal button
// FIXME : this somehow prevent the portalButton // FIXME : this somehow prevent the portalButton
// from being dragged correctly // from being dragged correctly when mouse is moving too fast
// when mouse is moving too fast // ... this seem to be okay in the "app" itself, but the bug
// is happening when *in* the portal overlay inside an app...
window.addEvent(portalButton, 'click', function(e){ window.addEvent(portalButton, 'click', function(e){
// Prevent default click // Prevent default click
window.eventPreventDefault(e); window.eventPreventDefault(e);