Projet

Général

Profil

0001-backoffice-add-jsonp-support-to-backoffice-menu.json.patch

Frédéric Péters, 18 mai 2015 19:55

Télécharger (1,18 ko)

Voir les différences:

Subject: [PATCH] backoffice: add jsonp support to backoffice/menu.json
 endpoint (#7146)

 wcs/backoffice/root.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
wcs/backoffice/root.py
208 208
            get_response().set_header('Access-Control-Allow-Headers', 'x-requested-with')
209 209
        menu_items = []
210 210
        backoffice_url = get_publisher().get_backoffice_url()
211
        return json.dumps(self.get_menu_items())
211
        json_str = json.dumps(self.get_menu_items())
212
        for variable in ('jsonpCallback', 'callback'):
213
            if variable in get_request().form:
214
                json_str = '%s(%s);' % (get_request().form[variable], json_str)
215
                break
216
        return json_str
212 217

  
213 218
    def pending(self):
214 219
        # kept as a redirection for compatibility with possible bookmarks
215
-