Fixed responsiveness for flashing process
authorSteven Barth <steven@midlink.org>
Sat, 6 Sep 2008 15:59:18 +0000 (15:59 +0000)
committerSteven Barth <steven@midlink.org>
Sat, 6 Sep 2008 15:59:18 +0000 (15:59 +0000)
modules/admin-full/luasrc/view/admin_system/upgrade.htm
modules/admin-mini/luasrc/controller/mini/system.lua
modules/admin-mini/luasrc/view/mini/upgrade.htm

index 03cd555c75247b832705bf79905760d88e6a749c..569a0bbd278676c347175e4e266c2b113d71dee5 100644 (file)
@@ -36,6 +36,9 @@ $Id$
 <% elseif ret then %>
        <p><%:a_s_flash_received%></p>
        <p><%:a_s_flash_inprogress%></p>
+       
+<!-- <%=string.rep(" ", 2048)%> -->
+       <% %>
        <% local ret = ret() 
        if ret == 0 then %>
 <div class="ok"><%:a_s_flash_flashed%></div>
index c3910a302084fa66ef673973a3213924aaee4845..265443bd32025a320ab63c4f83c9e760b025d900 100644 (file)
@@ -105,7 +105,9 @@ function action_upgrade()
        local keepcfg = keep_avail and luci.http.formvalue("keepcfg")
 
        if plat and fname then
-               ret = luci.sys.flash(tmpfile, keepcfg and _keep_pattern())
+               ret = function()
+                       return luci.sys.flash(tmpfile, keepcfg and _keep_pattern())
+               end
        end
 
        luci.template.render("mini/upgrade", {sysupgrade=plat, ret=ret, keep_avail=keep_avail})
index e0fbb933262a41dd72d6de56fe9dfc8f823e1f66..569a0bbd278676c347175e4e266c2b113d71dee5 100644 (file)
@@ -34,7 +34,13 @@ $Id$
        </div>
 </form>
 <% elseif ret then %>
-       <% if ret == 0 then %>
+       <p><%:a_s_flash_received%></p>
+       <p><%:a_s_flash_inprogress%></p>
+       
+<!-- <%=string.rep(" ", 2048)%> -->
+       <% %>
+       <% local ret = ret() 
+       if ret == 0 then %>
 <div class="ok"><%:a_s_flash_flashed%></div>
        <% else %>
 <div class="error"><%:a_s_flash_flasherr%>! (<%:code%> <%=ret%>)</div>