done is not getting fired after the upload is completed for ngx-uploader
This is the log:
{type: "addedToQueue", file: {…}}
file-upload.component.ts:29 {type: "allAddedToQueue"}
file-upload.component.ts:29 {type: "start", file: {…}}
file-upload.component.ts:29 {type: "uploading", file: {…}}
No done event after this.
The server responds with 200 OK status.
There must be a conflicting library you used with your angular app, that's why it's not triggering the done status.
Related
I am trying to add custom action "Copy" in Ng2SmartTable Grid.
I am facing issue with click event handler of custom action. There are 3 buttons in grid Edit,Delete,Copy. Edit ,Delete is working fine. But 'Copy' method is not getting fired onclick of copy button.
Grid.component.html code
<ng2-smart-table [settings]="settings" (custom)="onCustom($event)" [source]="source" (edit)="onEdit($event)" (delete)="onDelete($event)"></ng2-smart-table>
OnEdit ,OnDelete working fine But OnCustom not working.
Grid.component.ts file code for settings for ng2smarttable.
mode: 'external',
actions: {
add: false,
custom: [{
name: 'copy', title: 'Copy'
}]
},
onCustom method not working at all.
There must be an issue with the function in your component, the code you have shared in your question is setup correctly and works in this stackblitz.
Please note: when the copy button is clicked the event is passed to the onCustom function in the app.component.ts and logs the event in the console.
https://stackblitz.com/edit/smarttable-e8gqql?embed=1&file=app/app.component.ts
I've been using `gulp-ruby-sass#1.0.0-alpha' because < 1.0 doesn't play well with Sass >= 3.4
According to the documentation:
gulp-ruby-sass throws errors like a gulp plugin, but streams the erroring files so you can see the errors in your browser.
I use gulp-notify to handle errors with this code that gives me a popup notification that lets me know that something went wrong.
.on('error', notify.onError({
title: 'Error!',
message: '<%= error.message %>',
sound: 'Beep'
}))
This works as-is for my other tasks (in my 'scripts' task I need to specify the gulp-jshint fail reporter). But in my 'styles' task the error message is being streamed to the console and the browser but not to a popup notification.
It's workable as is, but when using browser-sync for css style injection, the error message can be missed. Sometimes I'm not working at the top of the document where it renders the error message.
Ideally, I would like to receive a notification that can prompt me to check for errors. Does anyone know why I can't create a message with gulp-notify?
The solution I found was to wrap notify.onError in an anonymous function and append this.emit('end'):
.on('error', function(err) {
notify.onError({
title: 'Error!',
message: '<%= error.message %>',
sound: 'Beep'
})(err);
this.emit('end');
})
I have to make a live search , and after hours spent on google I decided to ask here if anyone have an ideea how can I make an live search( using or not combobox) in Ext JS but (the triky part). I have 2 data sets . One data set from one URL and and second from another URL.
I dont know how to start or how can I make the request when I type something in my search box to return small data set first and when is completly loaded second data set ( is much bigger).
Something like when I type "computer" in search field in first block to show me some things related to computers (first request that have few data) after that in second block to show me more thing related to computer when request is over( second request lot of data).
I need this thing because in one of my request i have over 10 k product and i dont want to let user w8 until the request is done, and to show the other request that have fewer data. until the first is done.
I forgot to mention that i want to make both request in the same time and asynchronous.
My solution for exactly this kind of problem was:
Creating a store dedicated only for the combobox content.
When one of the two "source" stores loads data, they push the records into the combo-store.
You also have the reference between the records automatically, so if a record in source-store 1 or 2 is removed, it also disappears in your combostore- and so in your combobox, like magic! Here is the key, for pushing data on load in another store:
http://serversideguy.com/2012/01/31/ext-js-4-merging-store-data/
best regards, hope that helps, write if you need further sugggestion / info on this solution.
If the data is really vital, you can try loading up on memory when the application starts.
Create the stores you need on launch() of the app, load the data and the use it everywhere you want. You can do this on your controller launch() too, to your controller references and granulate this as you wish.
Ext.application({
name: 'Blog',
models: ['Post', 'Comment'],
controllers: ['Posts', 'Comments'],
launch: function() {
Ext.define('User', {
extend: 'Ext.data.Model',
fields: [
{name: 'firstName', type: 'string'},
{name: 'lastName', type: 'string'},
{name: 'age', type: 'int'},
{name: 'eyeColor', type: 'string'}
]
});
Ext.create('Ext.data.Store', {
model: 'User',
storeId: 'userStore',
proxy: {
type: 'ajax',
url: '/users.json',
reader: {
type: 'json',
root: 'users'
}
},
autoLoad: true
}); }
});
I only recently started using dojo and I am doing numerous ajax calls using dojo xhrGet, xhrPost,..etc. Now I have an animated gif image which i want to use to indicate "loading" to the user. I am not too sure how this can be done. Can someone please advise me on this? here is my code,
dojo.xhrGet({
url: registcarturl,
handleAs: "json",
preventCache: true,
load: function(data, ioArgs) {
//DO STUFF WITH data HERE
},
error: function(error) {
alert("sorry ! an error occurred while adding to the cart with ajax");
}
});
How do i get my loading gif file into the interaction? Thank you.
Have a look at dojox.widget.Standby: http://dojotoolkit.org/reference-guide/dojox/widget/Standby.html
To give you an example, define the widget.Standby
<div jsId="basicStandby1" dojoType="dojox.widget.Standby" target="yourDomTarget">
After calling dojo.xhrGet, show it:
basicStandby1.show();
And when you receive your answer, hide it:
basicStandby1.hide();
i have already read this topix : "http://stackoverflow.com/questions/4820637/how-do-i-perform-an-ajax-request-to-the-create-action-on-loading-a-page-in-rails" but it doesn't respond to the question..
I want to make a loading animation into my rails 3 app cause the server takes time to send email and do some other calculation so the user experience is not so good...
I have read this tutorial : http://www.marketingformavens.com/blog/create-a-page-loading-animation-with-ruby-on-rails-and-ajax but it's for rails2 (remote_function doesn't exist anymore in rails 3).
I wonder if someone can tell the way i should do so :
-> having a nice animation loaded onto the screen when the user click on an action (like create, or update)
Thank's a lot.
Hope to find a answer...
If I understand you want to load an animation while your action is done in ajax. Just use the jQuery API to call your controller actions in Ajax and use callbacks to stop your animations :
$("#myaction").click(function(){
//write your animation code here
$.ajax({
url: "http://localhost:3000/yourcontrolleraction",
dataType: "json",
type: "POST",
processData: false,
contentType: "application/json",
data: yourdata
success: function(){
//stop your animation here
}
})
});
For more on using jQuery Ajax with Rails I suggest your read this excellent post : http://blog.project-sierra.de/archives/1788