Changeset 84506a in indico


Ignore:
Timestamp:
03/16/11 18:44:26 (2 years ago)
Author:
Jose Benito <jose.benito.gonzalez@…>
Branches:
master, burotel, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, 0da0c1403bae8e51d8229f460181c71b9e6dda72
Children:
bb77c9
Parents:
63bc1c
git-author:
Adrian Moennich <jerome.ernst.monnich@…> (03/16/11 18:33:45)
git-committer:
Jose Benito <jose.benito.gonzalez@…> (03/16/11 18:44:26)
Message:

[REF] Get rid of some obsolete Secure url stuff

Location:
indico
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/webinterface/tpls/js/vars.js.tpl

    ra755c1 r84506a  
    9595    Urls: { 
    9696        JsonRpcService: "<%= urlHandlers.UHJsonRpcService.getURL() %>", 
    97         SecureJsonRpcService: "<%= urlHandlers.UHSecureJsonRpcService.getURL() %>", 
    9897 
    9998        ImagesBase: "<%= Config.getInstance().getImagesBaseURL() %>", 
  • indico/MaKaC/webinterface/urlHandlers.py

    r19825c r84506a  
    42464246    _relativeURL = "services/json-rpc" 
    42474247 
    4248 class UHSecureJsonRpcService (SecureURLHandler): 
    4249     _relativeURL = "services/json-rpc" 
    4250  
    42514248class UHJavascriptCalendar (URLHandler): 
    42524249    _relativeURL = "js/calendar/calendar.js" 
  • indico/htdocs/js/indico/Core/Components.js

    r63bc1c r84506a  
    1616 
    1717if (location.protocol == "https:") { 
    18     indicoSource = curry(jsonRpcValue, Indico.Urls.SecureJsonRpcService); 
    19     indicoRequest = curry(jsonRpc, Indico.Urls.SecureJsonRpcService); 
    20     imageSrc = imageFunctionGenerator(Indico.Urls.SecureImagesBase); 
    21  
    2218    function fixUrls(urls) { 
    2319        for(var key in urls) { 
     
    2824            } 
    2925 
    30             // skip if the url starts with https 
     26            // skip if the url starts with https or it's ImagesBase 
    3127            if(urls[key].indexOf('https:') === 0) { 
    3228                continue; 
    3329            } 
    3430 
    35             urls[key] = urls[key].replace(/^http:/, 'https:'); 
     31            if(urls['Secure' + key]) { 
     32                // we alraedy have a secure url, e.g. for ImageBase 
     33                urls[key] = urls['Secure' + key]; 
     34            } 
     35            else { 
     36                urls[key] = urls[key].replace(/^http:/, 'https:'); 
     37            } 
    3638        } 
    3739    } 
    3840 
    3941    fixUrls(Indico.Urls); 
    40 } else { 
    41     indicoSource = curry(jsonRpcValue, Indico.Urls.JsonRpcService); 
    42     indicoRequest = curry(jsonRpc, Indico.Urls.JsonRpcService); 
    43     imageSrc = imageFunctionGenerator(Indico.Urls.ImagesBase); 
    4442} 
     43 
     44indicoSource = curry(jsonRpcValue, Indico.Urls.JsonRpcService); 
     45indicoRequest = curry(jsonRpc, Indico.Urls.JsonRpcService); 
     46imageSrc = imageFunctionGenerator(Indico.Urls.ImagesBase); 
    4547 
    4648 
Note: See TracChangeset for help on using the changeset viewer.