From 40c4687fa8258259f74bd2c60530ebfddf6c595c Mon Sep 17 00:00:00 2001 From: Argo-MacBookPro Date: Thu, 2 Aug 2018 17:21:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9BUG=EF=BC=9A=E4=BF=AE?= =?UTF-8?q?=E5=A4=8Dfileinput=E6=8E=A7=E4=BB=B6=E4=BD=BF=E7=94=A8fa?= =?UTF-8?q?=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/Views/Admin/Profiles.cshtml | 1 + Bootstrap.Admin/wwwroot/css/site.css | 2 +- Bootstrap.Admin/wwwroot/js/Profiles.js | 1 + Bootstrap.Admin/wwwroot/js/theme.js | 47 +++++++++++++++++++++ 4 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 Bootstrap.Admin/wwwroot/js/theme.js diff --git a/Bootstrap.Admin/Views/Admin/Profiles.cshtml b/Bootstrap.Admin/Views/Admin/Profiles.cshtml index f3d369c0..a49ec6c6 100644 --- a/Bootstrap.Admin/Views/Admin/Profiles.cshtml +++ b/Bootstrap.Admin/Views/Admin/Profiles.cshtml @@ -11,6 +11,7 @@ + } @section css { diff --git a/Bootstrap.Admin/wwwroot/css/site.css b/Bootstrap.Admin/wwwroot/css/site.css index 773e2696..7060b417 100644 --- a/Bootstrap.Admin/wwwroot/css/site.css +++ b/Bootstrap.Admin/wwwroot/css/site.css @@ -84,7 +84,7 @@ a, a:hover, a:focus { color: #777; } - .header > .dropdown > a:hover, .header > .dropdown.open > a, .notify-row > li > a:hover { + .header > .dropdown > a:hover, .header > .dropdown.show > a, .notify-row > li > a:hover { border: 1px solid #777; color: #333 } diff --git a/Bootstrap.Admin/wwwroot/js/Profiles.js b/Bootstrap.Admin/wwwroot/js/Profiles.js index dd03f267..54029bf9 100644 --- a/Bootstrap.Admin/wwwroot/js/Profiles.js +++ b/Bootstrap.Admin/wwwroot/js/Profiles.js @@ -4,6 +4,7 @@ $('#fileIcon').fileinput({ uploadUrl: $.formatUrl(Profiles.url), browseOnZoneClick: true, + theme: 'fa', language: 'zh', maxFileSize: 5000, allowedFileExtensions: ['jpg', 'png', 'bmp', 'gif', 'jpeg'], diff --git a/Bootstrap.Admin/wwwroot/js/theme.js b/Bootstrap.Admin/wwwroot/js/theme.js new file mode 100644 index 00000000..080dd817 --- /dev/null +++ b/Bootstrap.Admin/wwwroot/js/theme.js @@ -0,0 +1,47 @@ +/*! + * bootstrap-fileinput v4.4.9 + * http://plugins.krajee.com/file-input + * + * Font Awesome icon theme configuration for bootstrap-fileinput. Requires font awesome assets to be loaded. + * + * Author: Kartik Visweswaran + * Copyright: 2014 - 2018, Kartik Visweswaran, Krajee.com + * + * Licensed under the BSD 3-Clause + * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md + */ +(function ($) { + "use strict"; + + $.fn.fileinputThemes.fa = { + fileActionSettings: { + removeIcon: '', + uploadIcon: '', + uploadRetryIcon: '', + downloadIcon: '', + zoomIcon: '', + dragIcon: '', + indicatorNew: '', + indicatorSuccess: '', + indicatorError: '', + indicatorLoading: '' + }, + layoutTemplates: { + fileIcon: ' ' + }, + previewZoomButtonIcons: { + prev: '', + next: '', + toggleheader: '', + fullscreen: '', + borderless: '', + close: '' + }, + previewFileIcon: '', + browseIcon: '', + removeIcon: '', + cancelIcon: '', + uploadIcon: '', + msgValidationErrorIcon: ' ' + }; +})(window.jQuery);