Thank you Dave S for testing my code.
I reproduced the issue in my enviroment: windows8 and opera 12.16. Then I
searched for a solution and the issue is gone away by applying the posted
code. In summary I have only added to original function:
contentType: 'application/json',
cache: false,
I had to clear the whole browser cache selecting settings | Delete Private
Data,,, from the menu in Opera in order to obtain a succesful result.
Il giorno venerdì 11 ottobre 2013 20:17:12 UTC+2, Dave S ha scritto:
>
> On Thursday, October 10, 2013 12:49:10 PM UTC-7, Paolo Caruccio wrote:
>>
>> Maybe the issue is due to bad ajax caching in opera.
>>
>> @Dave S
>> Please replace the function "load_file(url)" in
>> "admin/static/js/ajax_editors_js" file with:
>>
>
>
> Short answer: I still got a blank page within the nav-bar, a simple F5
> filled it in. I'll try again later, in case it's a 2-step cleanup.
>
> Details: I stopped the server (^C in the window with the web2py console),
> used an external editor to rename the old function and paste the candidate
> version in. Restarted tje server, went to the admin app's page of the
> target application's files, and selected one with the "edit" button. Left
> slider, nav-bar, and footer appeared, but no file contents until I
> refreshed. I will exit Opera in a bit, and the restart and recheck the
> results.
>
> /dps
>
> function load_file(url) {
>> jQuery.ajax({
>> type: "GET",
>> contentType: 'application/json',
>> cache: false,
>> dataType: 'json',
>> url: url,
>> timeout: 1000,
>> success: function (json) {
>> if(typeof (json['plain_html']) !== undefined) {
>> console.log(json['id']);
>> if(jQuery('#' + json['id']).length === 0 || json['force'] ===
>> true) {
>> // Create a tab and put the code in it
>> var tab_header = '<li><a href="#' + json['id'] + '"
>> data-toggle="tab">' + json['filename'] + '<button type="button"
>> class="close">×</button></a></li>';
>> var tab_body = '<div id="' + json['id'] + '" class="tab-pane
>> fade in " >' + json['plain_html'] + '</div>';
>> if(json['force'] === false) {
>> jQuery('#filesTab').append(jQuery(tab_header));
>> jQuery('#myTabContent').append(jQuery(tab_body));
>> } else {
>> jQuery('#' + json['id']).html(jQuery(tab_body));
>> }
>> }
>> jQuery("a[href='#" + json['id'] + "']").click();
>> }
>> },
>> error: function (x) {
>> on_error();
>> }
>> });
>> }
>>
>> and report if the issue is solved. In the latter case we will submit a
>> patch on issue tracker.
>>
>> Il giorno mercoledì 9 ottobre 2013 22:53:35 UTC+2, Dave S ha scritto:
>>>
>>> On Wednesday, October 9, 2013 1:34:11 PM UTC-7, Niphlod wrote:
>>>>
>>>> does it happen only on opera? if yes, what build on what os ?
>>>>
>>>
>>> Seems to happen on Firefox 18 on Fedora 16, but the CTRL-F5 works
>>> without requiring an F5 after.
>>>
>>> Opera is 12.16 Build 1860 , and it describes the OS as i686,
>>> 3.6.10-2.fc16.i686.PAE
>>>
>>> Those are the two browsers local to the server; I may try remote access
>>> later.
>>>
>>> /dps
>>>
>>>
>>> On Wednesday, October 9, 2013 10:20:49 PM UTC+2, Dave S wrote:
>>>>>
>>>>> On Tuesday, October 8, 2013 11:23:31 AM UTC-7, Niphlod wrote:
>>>>>>
>>>>>> On Tuesday, October 8, 2013 7:36:45 PM UTC+2, Dave S wrote:
>>>>>>>
>>>>>>> On Monday, October 7, 2013 11:45:14 PM UTC-7, Niphlod wrote:
>>>>>>>>
>>>>>>>> I think you just need to ctrl+f5 reloading the cache of the
>>>>>>>> browser. If anyone isn't able to edit files through the admin app, it
>>>>>>>> would
>>>>>>>> rain hell on web2py's developers :P
>>>>>>>>
>>>>>>>>
>>>>>>> You are right again, sir. Thank goodness for people who know what
>>>>>>> they are doing (and usually, what we are doing, too).
>>>>>>>
>>>>>>> /dps
>>>>>>>
>>>>>>>
>>>>>> If it was a bug, it was a hell of one big bug. I mean, it **could**
>>>>>> happen that a release is made turning some feature on or off, but being
>>>>>> unable to edit files was too big to pass unnoticed.
>>>>>>
>>>>>
>>>>> Hmmm, each time I go to edit for the first time after restarting the
>>>>> browser, I need to do CTRL-F5, usually followed by an F5 to load the CSS.
>>>>> Is this an Opera issue, a setting in the browser cache, or are the
>>>>> default
>>>>> headers encouraging this behavior?
>>>>>
>>>>> /dps
>>>>>
>>>>>
>>>>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.