Skip to content

Commit

Permalink
Fix #460: Update CSS selectors prefix to start with file
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Sep 28, 2015
1 parent 951ab71 commit c85a832
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Change Log: `bootstrap-fileinput`
2. Implement package.json.
3. (enh #449): Add Arabic Translations.
4. (enh #454): Update Turkish Translations.
5. (enh #460): Update CSS selectors prefix to start with `file`.

## version 4.2.7

Expand Down
4 changes: 2 additions & 2 deletions css/fileinput.css
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
display: none;
}

.loading {
.file-thumb-loading {
background: transparent url('../img/loading.gif') no-repeat scroll center center content-box !important;
}

Expand Down Expand Up @@ -211,7 +211,7 @@
padding: 85px 10px;
}

.highlighted {
.file-highlighted {
border: 2px dashed #999 !important;
background-color: #f0f0f0;
}
Expand Down
2 changes: 1 addition & 1 deletion css/fileinput.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions js/fileinput.js
Original file line number Diff line number Diff line change
Expand Up @@ -878,15 +878,15 @@
e.originalEvent.dataTransfer.dropEffect = 'none';
return;
}
addCss($(this), 'highlighted');
addCss($(this), 'file-highlighted');
}, true);
handler($zone, 'dragleave', function (e) {
e.stopPropagation();
e.preventDefault();
if (self.isDisabled) {
return;
}
$(this).removeClass('highlighted');
$(this).removeClass('file-highlighted');
});
handler($zone, 'drop', function (e) {
e.preventDefault();
Expand All @@ -895,7 +895,7 @@
return;
}
self.change(e, 'dragdrop');
$(this).removeClass('highlighted');
$(this).removeClass('file-highlighted');
});
handler($(document), allEvents, function (e) {
e.stopPropagation();
Expand Down Expand Up @@ -2034,7 +2034,7 @@
} else {
self.raise('filebatchselected', [files]);
}
$container.removeClass('loading');
$container.removeClass('file-thumb-loading');
$status.html('');
return;
}
Expand Down Expand Up @@ -2085,7 +2085,7 @@
}
if ($preview.length > 0 && FileReader !== undefined) {
$status.html(msgLoading.replace('{index}', i + 1).replace('{files}', numFiles));
$container.addClass('loading');
$container.addClass('file-thumb-loading');
reader.onerror = function (evt) {
self.errorHandler(evt, caption);
};
Expand Down Expand Up @@ -2141,7 +2141,7 @@
nFiles = previewCache.count(self.id) + n,
log = n > 1 ? self.getMsgSelected(nFiles) : label;
if (self.isError) {
self.$previewContainer.removeClass('loading');
self.$previewContainer.removeClass('file-thumb-loading');
self.$previewStatus.html('');
self.$captionContainer.find('.kv-caption-icon').hide();
} else {
Expand Down
4 changes: 2 additions & 2 deletions js/fileinput.min.js

Large diffs are not rendered by default.

0 comments on commit c85a832

Please sign in to comment.