I am using the Kendo Upload control in a form and didn't want the form to be submit if the upload is still in process. I dont see any event I can use to let me know all files have been uploaded.
https://docs.telerik.com/kendo-ui/controls/editors/upload/modes
You can see a list of all events for the Kendo UI Upload here.
Among them you'll find the following events:
progress - provides you with the list of selected files and the percentage of the upload progress
success - Fires when the upload has finished (can be used only in async mode)
Related
Scenario is as below:
Upload file in s3 bucket.
Open the application
Refresh page till the data from uploaded file is appeared on UI
I have tried refresh(), waitUntilText, waitUntil till text is appeared. However, its not working. The text is appeared after some time (which is not consistent to provide delay) and need to refresh the page to have check is the data is updated on UI under certain web element.
I am trying to merge surveyjs along with my NativeScript application. I have referred URL for merging the same with Angular application
From the Angular demo code given on website, we have to add event handler for Complete button where we can get the response from surveyjs. Is it possible to integrate similarly for Nativescript Mobile application? Here is the approach which i feel can be taken.
Display
Create a HTML as provided by SurveyJS with required CSS and JS
referenced and add them as a file in project.
Modify HTML once i get the survey question json back from server.
Show the HTML as part of WebView. This will take care of displaying
the survey on my Application.
Here are my challenges during Submission
As per the process given on SurveyJS, i need to add handler for
oncomplete which will get the result json for me. How can i add
handlers for Complete button click in my code? Also please note that
there is a possibility that there may be multiple surveys on a single
page.
Apart from Survey, there are other fields also on the page and user
will submit them all in one go by clicking submit button of the page.
Hence i am planning to hide Complete button provided by SurveyJS
page. This needs to be triggered via code. Can this be done?
If someone can give directions on whether this scenario can be handled in nativescript application with Angular,it would help immensely.
yes it can be done using nativescript-webview-interface plugin.
add jS code inside WebView to handle oncomplete event from surveyJS. and on that function call emit some event to native app. after that add nativescript code to listen for that event and get the JSON back.
inside webView JS function
var oWebViewInterface = window.nsWebViewInterface;
// emit event to native app
oWebViewInterface.emit('anyEvent', jsonData);
inside native App
oWebViewInterface.on('anyEvent', function(jsonData){
// perform action on event
});
for more details on this you can check plugin readme file https://github.com/shripalsoni04/nativescript-webview-interface
I have a kendo scheduler with transport function. Below is the url
http://runner.telerik.io/fullscreen/IgOba
Here in this scheduler when I try to resize the event or move the event event widget is getting resized/moved for a fraction of second and then comes back to the previous stage. But the data is getting updated in backend(it is not there in above example) if I refresh the page its showing the updated event widget. From the Kendo UI demo (http://demos.telerik.com/kendo-ui/scheduler/index) I removed the create and delete event from transport and made update as a javascript function. With this small change the event widget failing to get updated the size...
Please help me if you know any help is appreciated.
Once a user has uploaded a file via any means (file selection, DnD or Cut and Paste), I would like to disable the Upload widget, to prevent users to upload again.
This disabling should be done for a specific upload widget since I may have many on the same page.
Is there a method I can call to do this?
Thanks.
Simply present an alert/message to the user in your UI once they are no longer able to upload additional files (which you should do no matter what) and then return false in your onValidateBatch handler for all subsequently dropped/selected files. This will prevent files submitted via the file chooser, file submitted via DnD, AND pasted images from being uploaded.
I want to upload a file using the < s:file > tag, but Struts2 doesn't support Ajax for this functionality, as far as I know. I tried to do it using the Struts2 jquery plugin but it overwrites some jquery functions that i need an can't change right now (like .dialog()).
Is there an alternative way to do it?
There are many jquery based plugins for this purpose.
I am using this library. Its the most simple and elegant plugin, minimal requirements and lots of options.
Here are some other plugins which I considered(my preference was a plugin which doesnt use flash)
This one shows thumbnail before uploading and also overall progress
This one shows remaining time, uploading speed and remaining size
This is how I do it (I'm not using JQuery):
I hide an iframe inside my page. I give it an id (iframe for example) and a name (the same than the id).
I set the attribute "target" on my form to the id of the hidden iframe (then, the response from the server is loaded inside the iframe.
I register an event handler on the iframe to react on the onload event. The handler analyse the response from the server. Alternatively, I sometime just return javascript code from the server in a <script> tag. This code performs action on the client upon success or failure of the intended action.
If you like the idea, you may want to read this article or this one: