use SVG icons from icons.css for New file menu

This commit is contained in:
Jan-Christoph Borchardt 2014-02-21 14:07:25 +01:00
parent 29c43ddb91
commit 877cfb963a
3 changed files with 34 additions and 13 deletions

View File

@ -20,7 +20,7 @@
padding: 10px; padding: 10px;
font-weight: normal; font-weight: normal;
} }
#new>a { #new > a {
padding: 14px 10px; padding: 14px 10px;
position: relative; position: relative;
top: 7px; top: 7px;
@ -30,7 +30,7 @@
border-bottom-right-radius: 0; border-bottom-right-radius: 0;
border-bottom: none; border-bottom: none;
} }
#new>ul { #new > ul {
display: none; display: none;
position: fixed; position: fixed;
min-width: 112px; min-width: 112px;
@ -39,16 +39,26 @@
padding-bottom: 0; padding-bottom: 0;
margin-top: 14px; margin-top: 14px;
margin-left: -1px; margin-left: -1px;
text-align:left; text-align: left;
background: #f8f8f8; background: #f8f8f8;
border: 1px solid #ddd; border: 1px solid #ddd;
border-radius: 5px; border-radius: 5px;
border-top-left-radius: 0; border-top-left-radius: 0;
box-shadow:0 2px 7px rgba(170,170,170,.4); box-shadow: 0 2px 7px rgba(170,170,170,.4);
}
#new > ul > li {
height: 36px;
margin: 5px;
padding-left: 48px;
padding-bottom: 2px;
background-position: initial;
cursor: pointer;
}
#new > ul > li > p {
cursor: pointer;
padding-top: 7px;
padding-bottom: 7px;
} }
#new>ul>li { height:36px; margin:5px; padding-left:48px; padding-bottom:2px;
background-repeat:no-repeat; cursor:pointer; }
#new>ul>li>p { cursor:pointer; padding-top: 7px; padding-bottom: 7px;}
#new .error, #fileList .error { #new .error, #fileList .error {
color: #e9322d; color: #e9322d;

View File

@ -5,12 +5,17 @@
<div id="new" class="button"> <div id="new" class="button">
<a><?php p($l->t('New'));?></a> <a><?php p($l->t('New'));?></a>
<ul> <ul>
<li style="background-image:url('<?php p(OCP\mimetype_icon('text/plain')) ?>')" <li class="icon icon-filetype-text"
data-type='file' data-newname='<?php p($l->t('New text file')) ?>.txt'><p><?php p($l->t('Text file'));?></p></li> data-type="file" data-newname="<?php p($l->t('New text file')) ?>.txt">
<li style="background-image:url('<?php p(OCP\mimetype_icon('dir')) ?>')" <p><?php p($l->t('Text file'));?></p>
data-type='folder' data-newname='<?php p($l->t('New folder')) ?>'><p><?php p($l->t('Folder'));?></p></li> </li>
<li style="background-image:url('<?php p(OCP\image_path('core', 'places/link.svg')) ?>')" <li class="icon icon-filetype-folder"
data-type='web'><p><?php p($l->t('From link'));?></p></li> data-type="folder" data-newname="<?php p($l->t('New folder')) ?>">
<p><?php p($l->t('Folder'));?></p>
</li>
<li class="icon icon-link" data-type="web">
<p><?php p($l->t('From link'));?></p>
</li>
</ul> </ul>
</div> </div>
<?php endif;?> <?php endif;?>

View File

@ -226,6 +226,12 @@
.icon-folder { .icon-folder {
background-image: url('../img/places/folder.svg'); background-image: url('../img/places/folder.svg');
} }
.icon-filetype-text {
background-image: url('../img/filetypes/text.svg');
}
.icon-filetype-folder {
background-image: url('../img/filetypes/folder.svg');
}
.icon-home { .icon-home {
background-image: url('../img/places/home.svg'); background-image: url('../img/places/home.svg');