Friday, December 29, 2017

Re: Still having trouble with django-filebrowser

> On 18/12/2017 8:23 PM, Etienne Robillard wrote:
>> Looks likes this is using javascript. What does the javascript
>> console says? Is the markup of the page valid HTML?
>

The javascript is slightly different between dev on localhost and
staging and I'm totally outta my depth :(

In the <head> section of the staging site which DOES show the upload
widget there is a line which isn't in the localhost dev site ...

<script type="text/javascript" src="/tinymce/filebrowser/"></script>

... which bothers me. It doesn't seem to be a js script???

Another difference is directly beneath the TinyMCE HTMLField textarea.
See NOT IN LOCALHOST SCRIPT below.

<script type="text/javascript">(
function($){
    function tinymce4_init(selector){
        var tinymce4_config={
            'file_browser_callback':djangoFileBrowser, <---- NOT IN
LOCALHOST SCRIPT
setup:function(editor){editor.on('change',function(){editor.save();});},
            "language":"en",
            "contextmenu":"formats | link image",
            "statusbar":true,
            "toolbar1":"formatselect | bold italic underline |
alignleft aligncenter alignright alignjustify | bullist numlist |
outdent indent | table | link image | codesample | preview code",
            "directionality":"ltr",
            "height":360,
            "width":"auto",
            "theme":"modern",
            "plugins":"link image preview codesample contextmenu table
code lists",
            "inline":false,
            "selector":"textarea#id_instruction",
            "menubar":false
        };
        if(typeof selector!='undefined'){
            tinymce4_config['selector']=selector;
        }
        tinymce.init(tinymce4_config);
    }tinymce4_init();
})();
</script>

I have found file_browser_callback in a number of files but really don't
understand javascript well enough to make sense of it. Re-venving and
reinstalling everything

bleach==2.1.2
certifi==2017.11.5
chardet==3.0.4
Django==1.11.8
django-filebrowser-no-grappelli==3.7.3
django-tinymce4-lite==1.7.0
html5lib==1.0.1
idna==2.6
jsmin==2.2.2
olefile==0.44
Pillow==4.3.0
psycopg2==2.7.3
pytz==2017.3
requests==2.18.4
six==1.11.0
urllib3==1.22
webencodings==0.5.1

... doesn't make any difference.

On reflection I'm giving up. It is working on the Ubuntu side and while
I don't understand why I don't have any more time to put into it.

Thank you all very much for your input. It makes this community - and
Django - special.

Cheers

Mike


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/79151495-a3ac-5604-bd75-176909fd8d97%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment