Wicket Posted January 31, 2020 Share Posted January 31, 2020 Hi All, I am having a few issues with UniFileUpload. I have recently upgraded to latest unigui - I was previously using 1.10.0.1472 where the upload was working fine. I am running the latest build:1.90.0.1518 and have EnableSynchronousOperations := True; Issue 1: Steps: (Button only false) 1.I am calling UniFileUpload1.Execute; from a UniToolButton - this executes and shows the Upload form. (As expected) 2. I then browse for a single file and select it (The folder browser closes as expected) 3.Then the file does not show in the list but UniFileUpload1Completed is called. (Button only true) Same as above however UniFileUpload1Completed is never called and the upload form does not close upon selected a single file to upload. Issue 2: The layout of the buttons on the upload form - how can I change this? Please see attached gif. I am struggling to debug this as I can not really see where the code is failing. Any ideas? Thanks. Quote Link to comment Share on other sites More sharing options...
Wicket Posted February 1, 2020 Author Share Posted February 1, 2020 Anyone? This was working before upgrading my project, now I can not upload files as it doesn't work. Uploading files is a big feature of project, so any help would be great. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 1, 2020 Share Posted February 1, 2020 Hello, Try to clear your browser cache. Do you see errors in the browser console? Quote Link to comment Share on other sites More sharing options...
Wicket Posted February 1, 2020 Author Share Posted February 1, 2020 Cleared the browser cache and tried in both chrome and firefox browser in incognito mode. All show the same behaviour. No errors present in the browser console, either Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 1, 2020 Share Posted February 1, 2020 19 hours ago, Wicket said: and have EnableSynchronousOperations := True; Was it the same for the previous version!? Quote Link to comment Share on other sites More sharing options...
Wicket Posted February 1, 2020 Author Share Posted February 1, 2020 Yes it was - but I would expect UniFileUpload to work with it on or off. I have come from a fairly dated build though (1472) I've been trying to dig around to find out whats causing the issue with no luck as of yet - this is very difficult without being able to step through to the source. Very strange. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 1, 2020 Share Posted February 1, 2020 Sorry, maybe I don’t fully understand your case. Have you seen the demo examples of using this component? Can you create a simple testcase? Quote Link to comment Share on other sites More sharing options...
Wicket Posted February 1, 2020 Author Share Posted February 1, 2020 I found my issue. I had some code in MainForm.Script: "Ext.form.field.File.override( {onFileChange: function() { this.lastValue = null; // force change event to get fired even if the user selects a file with the same name Ext.form.field.File.superclass.setValue.call(this, this.fileInputEl.dom.value.replace(/C:\\fakepath\\/g, '')); } } )" From: This worked for a long time and I forgot I even had it (I am working on a very large project). Removing this code fixed my first issue. Upgrading to ExtJS 6.7 must of broken this in some strange way. My second issue was to do with the layout of the upload form. Do you know if I can change the layout so the buttons do no overlap when using different themes? Bear in mind I am using EnableSynchronousOperations := True; so need to change the layout before showing the upload form. Thanks. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 1, 2020 Share Posted February 1, 2020 13 minutes ago, Wicket said: This worked for a long time and I forgot I even had it (I am working on a very large project). Removing this code fixed my first issue. Sorry for this... 15 minutes ago, Wicket said: My second issue was to do with the layout of the upload form. Do you know if I can change the layout so the buttons do no overlap when using different themes? ? Quote Link to comment Share on other sites More sharing options...
Wicket Posted February 1, 2020 Author Share Posted February 1, 2020 No reason to apologise Sherzod - I know it was a work around. Thanks for the help - I will take a look at that post and report back. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 1, 2020 Share Posted February 1, 2020 Thank you. Quote Link to comment Share on other sites More sharing options...
Wicket Posted February 1, 2020 Author Share Posted February 1, 2020 That solution does not work if EnableSynchronousOperations := True; As the code is synchronous. Anything else I can do? Could a CSS changes help here? This was the result: Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 1, 2020 Share Posted February 1, 2020 Ok I will check it now. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 1, 2020 Share Posted February 1, 2020 Which theme are you using? Quote Link to comment Share on other sites More sharing options...
Wicket Posted February 1, 2020 Author Share Posted February 1, 2020 I am using a custom theme from GerhardV's theme pack called uni_office_blue, however the issue is also noticeable for uni_emerald: Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 1, 2020 Share Posted February 1, 2020 I will try to analyze. Quote Link to comment Share on other sites More sharing options...
Wicket Posted February 1, 2020 Author Share Posted February 1, 2020 Thanks - I'm looking through the elements in chrome dev tools to see if I can find the correct CSS property to change...so far no luck. If I do find it - I will report back. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 1, 2020 Share Posted February 1, 2020 38 minutes ago, Wicket said: That solution does not work if EnableSynchronousOperations := True; Can you try like this for example? ... UniSession.AddJS( 'Ext.defer(function(){'+ ' var fWin = Ext.WindowManager.getActive();'+ ' if (fWin) {'+ ' fWin.setWidth(310); fWin.setHeight(178); fWin.getEl().select("a.x-btn").setTop(100);'+ ' }'+ '}, 200);' //200 - 400, 600, ... ); UniFileUpload1.Execute; ... Quote Link to comment Share on other sites More sharing options...
Wicket Posted February 1, 2020 Author Share Posted February 1, 2020 That works - thanks so much. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.