Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

NEW: Show loading indicator when attaching files to UploadField #2914

Merged
merged 1 commit into from Mar 25, 2014

Conversation

Projects
None yet
3 participants
Owner

kinglozzer commented Mar 3, 2014

Currently, no indication is shown to the CMS user than anything is actually happening.

Is the attach functionality used anywhere outside a “standard” UploadField (e.g. AssetUploadField?) I can’t seem to find any usage of it anywhere else.

Attaching:
screen shot 2014-03-03 at 21 13 54

Attaching a second file:
screen shot 2014-03-03 at 21 14 15

Attaching via ‘choose another file’:
screen shot 2014-03-03 at 21 14 44

@chillu chillu commented on an outdated diff Mar 25, 2014

javascript/UploadField.js
$.post(
config['urlAttach'],
{'ids': ids},
function(data, status, xhr) {
+ target.children().show();
@chillu

chillu Mar 25, 2014

Owner

Can we do this on complete rather than just on success?

@chillu chillu commented on an outdated diff Mar 25, 2014

scss/UploadField.scss
@@ -238,4 +238,8 @@
line-height: 30px;
}
}
+ .loader {
+ height: 94px;
@chillu

chillu Mar 25, 2014

Owner

Can you document why that's 94px?

Owner

chillu commented Mar 25, 2014

Great improvement, thanks Loz!

Owner

kinglozzer commented Mar 25, 2014

Documented CSS property, switched to $.ajax() so we can use a ‘complete’ callback and rebased :)

@chillu chillu added a commit that referenced this pull request Mar 25, 2014

@chillu chillu Merge pull request #2914 from kinglozzer/uploadfield-attach-loader
NEW: Show loading indicator when attaching files to UploadField
181d8e5

@chillu chillu merged commit 181d8e5 into silverstripe:3.1 Mar 25, 2014

1 check passed

default Scrutinizer: No new issues — Travis: Passed
Details
Owner

chillu commented Mar 25, 2014

Thanks mate!

@kinglozzer kinglozzer deleted the kinglozzer:uploadfield-attach-loader branch Mar 25, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment