Show
Ignore:
Timestamp:
11/01/08 18:11:02 (5 years ago)
Author:
Cyrus
Message:

Merge pageactions

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • luci/trunk/libs/web/luasrc/dispatcher.lua

    r3678 r3684  
    500500 
    501501--- Create a CBI model dispatching target. 
    502 -- @param   model   CBI model tpo be rendered 
     502-- @param   model   CBI model to be rendered 
    503503function cbi(model, config) 
    504504    config = config or {} 
     
    522522        end 
    523523 
     524        local pageaction = true 
    524525        http.header("X-CBI-State", state or 0) 
    525526        luci.template.render("cbi/header", {state = state}) 
    526527        for i, res in ipairs(maps) do 
    527528            res:render() 
    528         end 
    529         luci.template.render("cbi/footer", {state = state, autoapply = config.autoapply}) 
     529            if res.pageaction == false then 
     530                pageaction = false 
     531            end 
     532        end 
     533        luci.template.render("cbi/footer", {pageaction=pageaction, state = state, autoapply = config.autoapply}) 
    530534    end 
    531535end