On 01/25/2016 05:38 PM, Dietmar Maurer wrote:
>> @@ -6,6 +9,13 @@ use warnings;
>>  sub get_index {
>>      my ($lang, $username, $csrftoken, $console) = @_;
>>  
>> +    my $manager_source_dir = '/usr/share/pve-manager/manager6/';
>> +
>> +#    # exit early to avoid this being run by mistake
>> +    if ( ! -d $manager_source_dir) {
>> +    return "$manager_source_dir not found";
>> +    }
>> +
>>      my $page = <<_EOD;
>>  <!DOCTYPE html>
>>  <html>
>> @@ -14,6 +24,7 @@ sub get_index {
>>      <title>Proxmox Virtual Environment</title>
>>      <link rel="stylesheet" type="text/css"
>> href="/pve2/ext6/theme-triton/resources/theme-triton-all.css" />
>>      <link rel="stylesheet" type="text/css" href="/pve2/css/ext-pve.css" />
>> +    <script type="text/javascript"
>> src="/pve2/ext6/ext-all-debug.js"></script>
>>  _EOD
>>  
>>      my $langfile = "/usr/share/pve-manager/locale/pve-lang-${lang}.js";
>> @@ -23,207 +34,219 @@ _EOD
>>      $page .= '<script type="text/javascript">function gettext(buf) { return 
>> buf;
>> }</script>';
>>      }
>>  
>> -    $page .= <<_EOD;
>> -    <script type="text/javascript"
>> src="/pve2/ext6/ext-all-debug.js"></script>
> 
> Why do you change the include ordering? AFAIK pve-lang-${lang}.js needs 
> to be loaded before ext-all-debug.js?

I moved the out the ext-all-debug include upper so it is grouped with
the other include.

pve-lang-${lang}.js do not use the framework code, so it it safe to
include it before including the framework


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to