diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 07c60e2dd8..42bb018b89 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -148,7 +148,6 @@ return array( 'rsrc/css/phui/phui-workpanel-view.css' => '198c7e6c', 'rsrc/css/sprite-apps-large.css' => '20ec0cc0', 'rsrc/css/sprite-apps.css' => 'd5baed0f', - 'rsrc/css/sprite-docs.css' => '5f65d0da', 'rsrc/css/sprite-gradient.css' => '4bdb98a7', 'rsrc/css/sprite-login.css' => 'a355d921', 'rsrc/css/sprite-main-header.css' => '92720ee2', @@ -320,8 +319,6 @@ return array( 'rsrc/image/sprite-apps-large-X2.png' => '79e15268', 'rsrc/image/sprite-apps-large.png' => '4d41b94a', 'rsrc/image/sprite-apps.png' => '5570df20', - 'rsrc/image/sprite-docs-X2.png' => '6dc1adad', - 'rsrc/image/sprite-docs.png' => '4636297f', 'rsrc/image/sprite-gradient.png' => 'ec15a417', 'rsrc/image/sprite-login-X2.png' => '5ae6de3a', 'rsrc/image/sprite-login.png' => '07f2c67c', @@ -811,7 +808,6 @@ return array( 'setup-issue-css' => '8f852bc0', 'sprite-apps-css' => 'd5baed0f', 'sprite-apps-large-css' => '20ec0cc0', - 'sprite-docs-css' => '5f65d0da', 'sprite-gradient-css' => '4bdb98a7', 'sprite-login-css' => 'a355d921', 'sprite-main-header-css' => '92720ee2', diff --git a/resources/sprite/docs_1x/audio.png b/resources/sprite/docs_1x/audio.png deleted file mode 100644 index 2f06fc8951..0000000000 Binary files a/resources/sprite/docs_1x/audio.png and /dev/null differ diff --git a/resources/sprite/docs_1x/doc.png b/resources/sprite/docs_1x/doc.png deleted file mode 100644 index 568b80ddcc..0000000000 Binary files a/resources/sprite/docs_1x/doc.png and /dev/null differ diff --git a/resources/sprite/docs_1x/file.png b/resources/sprite/docs_1x/file.png deleted file mode 100644 index 5118a9589d..0000000000 Binary files a/resources/sprite/docs_1x/file.png and /dev/null differ diff --git a/resources/sprite/docs_1x/image.png b/resources/sprite/docs_1x/image.png deleted file mode 100644 index 0d1f404919..0000000000 Binary files a/resources/sprite/docs_1x/image.png and /dev/null differ diff --git a/resources/sprite/docs_1x/movie.png b/resources/sprite/docs_1x/movie.png deleted file mode 100644 index 0eb10e2e7d..0000000000 Binary files a/resources/sprite/docs_1x/movie.png and /dev/null differ diff --git a/resources/sprite/docs_1x/pdf.png b/resources/sprite/docs_1x/pdf.png deleted file mode 100644 index 514fb9c52b..0000000000 Binary files a/resources/sprite/docs_1x/pdf.png and /dev/null differ diff --git a/resources/sprite/docs_1x/place.png b/resources/sprite/docs_1x/place.png deleted file mode 100644 index f9e817fcda..0000000000 Binary files a/resources/sprite/docs_1x/place.png and /dev/null differ diff --git a/resources/sprite/docs_1x/zip.png b/resources/sprite/docs_1x/zip.png deleted file mode 100644 index fc288bb6b0..0000000000 Binary files a/resources/sprite/docs_1x/zip.png and /dev/null differ diff --git a/resources/sprite/docs_2x/audio.png b/resources/sprite/docs_2x/audio.png deleted file mode 100644 index e5ad1e20fe..0000000000 Binary files a/resources/sprite/docs_2x/audio.png and /dev/null differ diff --git a/resources/sprite/docs_2x/doc.png b/resources/sprite/docs_2x/doc.png deleted file mode 100644 index 7f87a9a679..0000000000 Binary files a/resources/sprite/docs_2x/doc.png and /dev/null differ diff --git a/resources/sprite/docs_2x/file.png b/resources/sprite/docs_2x/file.png deleted file mode 100644 index 6323e9ff78..0000000000 Binary files a/resources/sprite/docs_2x/file.png and /dev/null differ diff --git a/resources/sprite/docs_2x/image.png b/resources/sprite/docs_2x/image.png deleted file mode 100644 index 9af85529fb..0000000000 Binary files a/resources/sprite/docs_2x/image.png and /dev/null differ diff --git a/resources/sprite/docs_2x/movie.png b/resources/sprite/docs_2x/movie.png deleted file mode 100644 index 216ea40fe6..0000000000 Binary files a/resources/sprite/docs_2x/movie.png and /dev/null differ diff --git a/resources/sprite/docs_2x/pdf.png b/resources/sprite/docs_2x/pdf.png deleted file mode 100644 index 10cb451831..0000000000 Binary files a/resources/sprite/docs_2x/pdf.png and /dev/null differ diff --git a/resources/sprite/docs_2x/place.png b/resources/sprite/docs_2x/place.png deleted file mode 100644 index d1791d5061..0000000000 Binary files a/resources/sprite/docs_2x/place.png and /dev/null differ diff --git a/resources/sprite/docs_2x/zip.png b/resources/sprite/docs_2x/zip.png deleted file mode 100644 index d969383650..0000000000 Binary files a/resources/sprite/docs_2x/zip.png and /dev/null differ diff --git a/resources/sprite/manifest/docs.json b/resources/sprite/manifest/docs.json deleted file mode 100644 index 2f9f6ecc58..0000000000 --- a/resources/sprite/manifest/docs.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "version" : 1, - "sprites" : { - "docs_audio" : { - "name" : "docs_audio", - "rule" : ".docs_audio", - "hash" : "673217354b0a2406be92be7d1d710422" - }, - "docs_doc" : { - "name" : "docs_doc", - "rule" : ".docs_doc", - "hash" : "5cc83abc67ba4b26bb898b35d75ebef7" - }, - "docs_file" : { - "name" : "docs_file", - "rule" : ".docs_file", - "hash" : "319218d4f65c766faac607a26ffa751e" - }, - "docs_image" : { - "name" : "docs_image", - "rule" : ".docs_image", - "hash" : "ee313b6b35435ef4c534614ea2a6182e" - }, - "docs_movie" : { - "name" : "docs_movie", - "rule" : ".docs_movie", - "hash" : "aa9f12307047adb1bda4f74d4376a57a" - }, - "docs_pdf" : { - "name" : "docs_pdf", - "rule" : ".docs_pdf", - "hash" : "a6e4a2cb8b8d0e6777e6010ab4d530b5" - }, - "docs_place" : { - "name" : "docs_place", - "rule" : ".docs_place", - "hash" : "7328b8d6c6d8440975f7f098a347a17e" - }, - "docs_zip" : { - "name" : "docs_zip", - "rule" : ".docs_zip", - "hash" : "d6b11a4d6217356fe7c488c729e6fc99" - } - }, - "scales" : [ - 1, - 2 - ], - "header" : "\/**\n * @provides sprite-docs-css\n * @generated\n *\/\n\n.sprite-docs {\n background-image: url(\/rsrc\/image\/sprite-docs.png);\n background-repeat: no-repeat;\n}\n\n@media\nonly screen and (min-device-pixel-ratio: 1.5),\nonly screen and (-webkit-min-device-pixel-ratio: 1.5) {\n .sprite-docs {\n background-image: url(\/rsrc\/image\/sprite-docs-X2.png);\n background-size: {X}px {Y}px;\n }\n}\n", - "type" : "standard" -} diff --git a/scripts/celerity/generate_sprites.php b/scripts/celerity/generate_sprites.php index 825130b6d6..d901e56000 100755 --- a/scripts/celerity/generate_sprites.php +++ b/scripts/celerity/generate_sprites.php @@ -31,7 +31,6 @@ $sheets = array( 'apps' => $generator->buildAppsSheet(), 'apps-large' => $generator->buildAppsLargeSheet(), 'tokens' => $generator->buildTokenSheet(), - 'docs' => $generator->buildDocsSheet(), 'gradient' => $generator->buildGradientSheet(), 'main-header' => $generator->buildMainHeaderSheet(), 'login' => $generator->buildLoginSheet(), diff --git a/src/applications/celerity/CeleritySpriteGenerator.php b/src/applications/celerity/CeleritySpriteGenerator.php index b2a2bc45b2..4592d6584c 100644 --- a/src/applications/celerity/CeleritySpriteGenerator.php +++ b/src/applications/celerity/CeleritySpriteGenerator.php @@ -117,38 +117,6 @@ final class CeleritySpriteGenerator { return $sheet; } - public function buildDocsSheet() { - $icons = $this->getDirectoryList('docs_1x'); - $scales = array( - '1x' => 1, - '2x' => 2, - ); - $template = id(new PhutilSprite()) - ->setSourceSize(32, 32); - - $sprites = array(); - $prefix = 'docs_'; - foreach ($icons as $icon) { - $sprite = id(clone $template) - ->setName($prefix.$icon) - ->setTargetCSS('.'.$prefix.$icon); - - foreach ($scales as $scale_key => $scale) { - $path = $this->getPath($prefix.$scale_key.'/'.$icon.'.png'); - $sprite->setSourceFile($path, $scale); - } - $sprites[] = $sprite; - } - - $sheet = $this->buildSheet('docs', true); - $sheet->setScales($scales); - foreach ($sprites as $sprite) { - $sheet->addSprite($sprite); - } - - return $sheet; - } - public function buildLoginSheet() { $icons = $this->getDirectoryList('login_1x'); $scales = array( diff --git a/src/applications/conpherence/view/ConpherenceFileWidgetView.php b/src/applications/conpherence/view/ConpherenceFileWidgetView.php index b3321c479a..3cfb8072e3 100644 --- a/src/applications/conpherence/view/ConpherenceFileWidgetView.php +++ b/src/applications/conpherence/view/ConpherenceFileWidgetView.php @@ -3,7 +3,6 @@ final class ConpherenceFileWidgetView extends ConpherenceWidgetView { public function render() { - require_celerity_resource('sprite-docs-css'); $conpherence = $this->getConpherence(); $widget_data = $conpherence->getWidgetData(); $files = $widget_data['files']; @@ -15,7 +14,7 @@ final class ConpherenceFileWidgetView extends ConpherenceWidgetView { $icon_view = phutil_tag( 'div', array( - 'class' => 'file-icon sprite-docs '.$icon_class, + 'class' => 'file-icon phui-font-fa phui-icon-view '.$icon_class, ), ''); $file_view = id(new PhabricatorFileLinkView()) diff --git a/src/applications/files/config/PhabricatorFilesConfigOptions.php b/src/applications/files/config/PhabricatorFilesConfigOptions.php index d605046cf9..dec0db998e 100644 --- a/src/applications/files/config/PhabricatorFilesConfigOptions.php +++ b/src/applications/files/config/PhabricatorFilesConfigOptions.php @@ -50,31 +50,36 @@ final class PhabricatorFilesConfigOptions // largely lifted from http://en.wikipedia.org/wiki/Internet_media_type $icon_default = array( // audio file icon - 'audio/basic' => 'docs_audio', - 'audio/L24' => 'docs_audio', - 'audio/mp4' => 'docs_audio', - 'audio/mpeg' => 'docs_audio', - 'audio/ogg' => 'docs_audio', - 'audio/vorbis' => 'docs_audio', - 'audio/vnd.rn-realaudio' => 'docs_audio', - 'audio/vnd.wave' => 'docs_audio', - 'audio/webm' => 'docs_audio', + 'audio/basic' => 'fa-file-audio-o', + 'audio/L24' => 'fa-file-audio-o', + 'audio/mp4' => 'fa-file-audio-o', + 'audio/mpeg' => 'fa-file-audio-o', + 'audio/ogg' => 'fa-file-audio-o', + 'audio/vorbis' => 'fa-file-audio-o', + 'audio/vnd.rn-realaudio' => 'fa-file-audio-o', + 'audio/vnd.wave' => 'fa-file-audio-o', + 'audio/webm' => 'fa-file-audio-o', // movie file icon - 'video/mpeg' => 'docs_movie', - 'video/mp4' => 'docs_movie', - 'video/ogg' => 'docs_movie', - 'video/quicktime' => 'docs_movie', - 'video/webm' => 'docs_movie', - 'video/x-matroska' => 'docs_movie', - 'video/x-ms-wmv' => 'docs_movie', - 'video/x-flv' => 'docs_movie', + 'video/mpeg' => 'fa-file-movie-o', + 'video/mp4' => 'fa-file-movie-o', + 'video/ogg' => 'fa-file-movie-o', + 'video/quicktime' => 'fa-file-movie-o', + 'video/webm' => 'fa-file-movie-o', + 'video/x-matroska' => 'fa-file-movie-o', + 'video/x-ms-wmv' => 'fa-file-movie-o', + 'video/x-flv' => 'fa-file-movie-o', // pdf file icon - 'application/pdf' => 'docs_pdf', + 'application/pdf' => 'fa-file-pdf-o', // zip file icon - 'application/zip' => 'docs_zip', + 'application/zip' => 'fa-file-zip-o', // msword icon - 'application/msword' => 'docs_doc', - ) + array_fill_keys(array_keys($image_default), 'docs_image'); + 'application/msword' => 'fa-file-word-o', + // msexcel + 'application/vnd.ms-excel' => 'fa-file-excel-o', + // mspowerpoint + 'application/vnd.ms-powerpoint' => 'fa-file-powerpoint-o', + + ) + array_fill_keys(array_keys($image_default), 'fa-file-image-o'); return array( $this->newOption('files.viewable-mime-types', 'wild', $viewable_default) diff --git a/src/applications/files/storage/PhabricatorFile.php b/src/applications/files/storage/PhabricatorFile.php index 1a4214a0c7..1ebcdb84e3 100644 --- a/src/applications/files/storage/PhabricatorFile.php +++ b/src/applications/files/storage/PhabricatorFile.php @@ -739,7 +739,7 @@ final class PhabricatorFile extends PhabricatorFileDAO public function getDisplayIconForMimeType() { $mime_map = PhabricatorEnv::getEnvConfig('files.icon-mime-types'); $mime_type = $this->getMimeType(); - return idx($mime_map, $mime_type, 'docs_file'); + return idx($mime_map, $mime_type, 'fa-file-o'); } public function validateSecretKey($key) { diff --git a/webroot/rsrc/css/application/conpherence/widget-pane.css b/webroot/rsrc/css/application/conpherence/widget-pane.css index 515281cc34..5223df4fe3 100644 --- a/webroot/rsrc/css/application/conpherence/widget-pane.css +++ b/webroot/rsrc/css/application/conpherence/widget-pane.css @@ -100,22 +100,24 @@ width: 32px; height: 32px; float: left; + font-size: 30px; } .conpherence-widget-pane #widgets-files .file-title { display: block; position: relative; top: -4px; - left: 10px; + left: 2px; overflow-x: hidden; - width: 165px; + width: 180px; font-weight: bold; text-overflow: ellipsis; + white-space: nowrap; } .conpherence-widget-pane #widgets-files .file-uploaded-by { color: #a1a5a9; position: relative; top: 0px; - left: 10px; + left: 2px; width: 170px; font-size: 11px; } diff --git a/webroot/rsrc/css/sprite-docs.css b/webroot/rsrc/css/sprite-docs.css deleted file mode 100644 index d6890ee9e9..0000000000 --- a/webroot/rsrc/css/sprite-docs.css +++ /dev/null @@ -1,51 +0,0 @@ -/** - * @provides sprite-docs-css - * @generated - */ - -.sprite-docs { - background-image: url(/rsrc/image/sprite-docs.png); - background-repeat: no-repeat; -} - -@media -only screen and (min-device-pixel-ratio: 1.5), -only screen and (-webkit-min-device-pixel-ratio: 1.5) { - .sprite-docs { - background-image: url(/rsrc/image/sprite-docs-X2.png); - background-size: 99px 99px; - } -} - - -.docs_audio { - background-position: 0px 0px; -} - -.docs_doc { - background-position: -33px 0px; -} - -.docs_file { - background-position: -66px 0px; -} - -.docs_image { - background-position: 0px -33px; -} - -.docs_movie { - background-position: -33px -33px; -} - -.docs_pdf { - background-position: -66px -33px; -} - -.docs_place { - background-position: 0px -66px; -} - -.docs_zip { - background-position: -33px -66px; -} diff --git a/webroot/rsrc/image/sprite-docs-X2.png b/webroot/rsrc/image/sprite-docs-X2.png deleted file mode 100644 index 812e69cb94..0000000000 Binary files a/webroot/rsrc/image/sprite-docs-X2.png and /dev/null differ diff --git a/webroot/rsrc/image/sprite-docs.png b/webroot/rsrc/image/sprite-docs.png deleted file mode 100644 index 55870440ff..0000000000 Binary files a/webroot/rsrc/image/sprite-docs.png and /dev/null differ