Change recent files

This commit is contained in:
Julia Radzhabova 2020-06-11 19:36:37 +03:00
parent 663b38e1e1
commit 5303389420
30 changed files with 97 additions and 42 deletions

View file

@ -668,11 +668,11 @@ define([
store: new Common.UI.DataViewStore(this.recent),
itemTemplate: _.template([
'<div class="recent-wrap">',
'<div class="recent-icon"',
'<% if ((typeof image !== "undefined") && !_.isEmpty(image)) { %> ',
' style="background-image: url(<%= image %>);background-position: center;"',
'<% } %>',
'></div>',
'<div class="recent-icon">',
'<svg>',
'<use xlink:href="#svg-file-recent"></use>',
'</svg>',
'</div>',
'<div class="file-name"><% if (typeof title !== "undefined") {%><%= Common.Utils.String.htmlEncode(title || "") %><% } %></div>',
'<div class="file-info"><% if (typeof folder !== "undefined") {%><%= Common.Utils.String.htmlEncode(folder || "") %><% } %></div>',
'</div>'

View file

@ -270,6 +270,7 @@
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/rtf.svg">
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/html.svg">
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/blank.svg">
<img class="inline-svg" src="resources/img/recent-file.svg">
<script>
var svgpoints = document.querySelectorAll('img.inline-svg');
SVGInjector(svgpoints);

View file

@ -294,6 +294,7 @@
<inline src="resources/img/doc-formats/blank.svg" />
<inline src="resources/img/toolbar/shapetypes.svg" />
<inline src="resources/img/toolbar/charttypes.svg" />
<inline src="resources/img/recent-file.svg" />
<script data-main="app" src="../../../vendor/requirejs/require.js"></script>

View file

@ -271,6 +271,7 @@
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/rtf.svg">
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/html.svg">
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/blank.svg">
<img class="inline-svg" src="resources/img/recent-file.svg">
<script>
var svgpoints = document.querySelectorAll('img.inline-svg');
SVGInjector(svgpoints);

View file

@ -316,6 +316,7 @@
<inline src="resources/img/doc-formats/blank.svg" />
<inline src="resources/img/toolbar/shapetypes.svg" />
<inline src="resources/img/toolbar/charttypes.svg" />
<inline src="resources/img/recent-file.svg" />
<div id="viewport"></div>
<script data-main="app" src="../../../vendor/requirejs/require.js"></script>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 895 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

View file

@ -0,0 +1,10 @@
<svg fill="none" height="15" viewBox="0 0 15 15" width="15" xmlns="http://www.w3.org/2000/svg">
<symbol id="svg-file-recent">
<path d="m0 0h15v15h-15z" fill="#fff"/>
<rect fill="#446995" height="15" rx="1" width="15"/>
<g fill="#fff"><path d="m3 4h9v1h-9z"/>
<path d="m3 7h9v1h-9z"/>
<path d="m3 10h9v1h-9z"/>
</g>
</symbol>
</svg>

After

Width:  |  Height:  |  Size: 331 B

View file

@ -215,8 +215,7 @@
}
.recent-wrap {
height: 65px;
padding: 10px;
padding: 5px 10px;
cursor: pointer;
font-size: 12px;
@ -227,11 +226,13 @@
.recent-icon {
float: left;
width: 35px;
height: 45px;
margin-right: 10px;
.background-ximage-v2('file-recent.png', 72px, @commonimage: false);
background-position: 0 0;
width: 25px;
height: 25px;
margin-top: 2px;
svg {
width: 100%;
height: 100%;
}
}
> div:not(:first-child) {
@ -241,10 +242,6 @@
text-overflow: ellipsis;
}
.file-name {
margin: 5px 0;
}
.file-info {
color: #999;
}

View file

@ -575,11 +575,11 @@ define([
store: new Common.UI.DataViewStore(this.recent),
itemTemplate: _.template([
'<div class="recent-wrap">',
'<div class="recent-icon"',
'<% if ((typeof image !== "undefined") && !_.isEmpty(image)) { %> ',
' style="background-image: url(<%= image %>);background-position: center;"',
'<% } %>',
'></div>',
'<div class="recent-icon">',
'<svg>',
'<use xlink:href="#svg-file-recent"></use>',
'</svg>',
'</div>',
'<div class="file-name"><% if (typeof title !== "undefined") {%><%= Common.Utils.String.htmlEncode(title || "") %><% } %></div>',
'<div class="file-info"><% if (typeof folder !== "undefined") {%><%= Common.Utils.String.htmlEncode(folder || "") %><% } %></div>',
'</div>'

View file

@ -295,6 +295,7 @@
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/blank.svg">
<img class="inline-svg" src="../../common/main/resources/img/toolbar/shapetypes.svg">
<img class="inline-svg" src="../../common/main/resources/img/toolbar/charttypes.svg">
<img class="inline-svg" src="resources/img/recent-file.svg">
<script>
var svgpoints = document.querySelectorAll('img.inline-svg');
SVGInjector(svgpoints);

View file

@ -339,6 +339,7 @@
<inline src="resources/img/doc-formats/blank.svg" />
<inline src="resources/img/toolbar/shapetypes.svg" />
<inline src="resources/img/toolbar/charttypes.svg" />
<inline src="resources/img/recent-file.svg" />
<script data-main="app" src="../../../vendor/requirejs/require.js"></script>

View file

@ -259,6 +259,7 @@
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/blank.svg">
<img class="inline-svg" src="../../common/main/resources/img/toolbar/shapetypes.svg">
<img class="inline-svg" src="../../common/main/resources/img/toolbar/charttypes.svg">
<img class="inline-svg" src="resources/img/recent-file.svg">
<script>
var svgpoints = document.querySelectorAll('img.inline-svg');
SVGInjector(svgpoints);

View file

@ -313,6 +313,7 @@
<inline src="resources/img/doc-formats/blank.svg" />
<inline src="resources/img/toolbar/shapetypes.svg" />
<inline src="resources/img/toolbar/charttypes.svg" />
<inline src="resources/img/recent-file.svg" />
<div id="viewport"></div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

View file

@ -0,0 +1,7 @@
<svg fill="none" height="15" viewBox="0 0 15 15" width="15" xmlns="http://www.w3.org/2000/svg">
<symbol id="svg-file-recent">
<path d="m0 0h15v15h-15z" fill="#fff"/>
<rect fill="#a95153" height="15" rx="1" width="15"/>
<path d="m2.5 3.5h10v8h-10z" stroke="#fff"/>
</symbol>
</svg>

After

Width:  |  Height:  |  Size: 280 B

View file

@ -283,8 +283,7 @@
}
.recent-wrap {
height: 65px;
padding: 10px;
padding: 5px 10px;
cursor: pointer;
font-size: 12px;
@ -295,11 +294,13 @@
.recent-icon {
float: left;
width: 35px;
height: 45px;
margin-right: 10px;
.background-ximage-v2('file-recent.png', 38px, @commonimage: false);
background-position: 0 0;
width: 25px;
height: 25px;
margin-top: 2px;
svg {
width: 100%;
height: 100%;
}
}
.file-name {
@ -307,7 +308,6 @@
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin: 5px 0;
}
.file-info {

View file

@ -1392,11 +1392,11 @@ define([
store: new Common.UI.DataViewStore(this.recent),
itemTemplate: _.template([
'<div class="recent-wrap">',
'<div class="recent-icon"',
'<% if ((typeof image !== "undefined") && !_.isEmpty(image)) { %> ',
' style="background-image: url(<%= image %>);background-position: center;"',
'<% } %>',
'></div>',
'<div class="recent-icon">',
'<svg>',
'<use xlink:href="#svg-file-recent"></use>',
'</svg>',
'</div>',
'<div class="file-name"><% if (typeof title !== "undefined") {%><%= Common.Utils.String.htmlEncode(title || "") %><% } %></div>',
'<div class="file-info"><% if (typeof folder !== "undefined") {%><%= Common.Utils.String.htmlEncode(folder || "") %><% } %></div>',
'</div>'

View file

@ -309,6 +309,7 @@
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/blank.svg">
<img class="inline-svg" src="../../common/main/resources/img/toolbar/shapetypes.svg">
<img class="inline-svg" src="../../common/main/resources/img/toolbar/charttypes.svg">
<img class="inline-svg" src="resources/img/recent-file.svg">
<script>
var svgpoints = document.querySelectorAll('img.inline-svg');
SVGInjector(svgpoints);

View file

@ -352,6 +352,7 @@
<inline src="resources/img/doc-formats/blank.svg" />
<inline src="resources/img/toolbar/shapetypes.svg" />
<inline src="resources/img/toolbar/charttypes.svg" />
<inline src="resources/img/recent-file.svg" />
<script data-main="app" src="../../../vendor/requirejs/require.js"></script>
</body>

View file

@ -262,6 +262,7 @@
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/blank.svg">
<img class="inline-svg" src="../../common/main/resources/img/toolbar/shapetypes.svg">
<img class="inline-svg" src="../../common/main/resources/img/toolbar/charttypes.svg">
<img class="inline-svg" src="resources/img/recent-file.svg">
<script>
var svgpoints = document.querySelectorAll('img.inline-svg');
SVGInjector(svgpoints);

View file

@ -313,6 +313,7 @@
<inline src="resources/img/doc-formats/blank.svg" />
<inline src="resources/img/toolbar/shapetypes.svg" />
<inline src="resources/img/toolbar/charttypes.svg" />
<inline src="resources/img/recent-file.svg" />
<div id="viewport"></div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 521 B

View file

@ -0,0 +1,11 @@
<svg fill="none" height="15" viewBox="0 0 15 15" width="15" xmlns="http://www.w3.org/2000/svg">
<symbol id="svg-file-recent">
<path d="m0 0h15v15h-15z" fill="#fff"/>
<rect fill="#42865e" height="15" rx="1" width="15"/>
<path d="m2.5 3.5h10v8h-10z" stroke="#fff"/>
<g fill="#fff">
<path d="m2 7h10v1h-10z"/>
<path d="m7 4h1v7h-1z"/>
</g>
</symbol>
</svg>

After

Width:  |  Height:  |  Size: 389 B

View file

@ -336,8 +336,7 @@
}
.recent-wrap {
height: 65px;
padding: 10px;
padding: 5px 10px;
cursor: pointer;
font-size: 12px;
@ -348,11 +347,13 @@
.recent-icon {
float: left;
width: 35px;
height: 45px;
margin-right: 10px;
.background-ximage-v2('file-recent.png', 38px, @commonimage: false);
background-position: 0 0;
width: 25px;
height: 25px;
margin-top: 2px;
svg {
width: 100%;
height: 100%;
}
}
.file-name {
@ -360,7 +361,6 @@
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin: 5px 0;
}
.file-info {

View file

@ -190,6 +190,12 @@
"cwd": "../apps/common/main/resources/img",
"src": "**/*.svg",
"dest": "../deploy/web-apps/apps/documenteditor/main/resources/img"
},
{
"expand": true,
"cwd": "../apps/documenteditor/main/resources/img",
"src": "**/*.svg",
"dest": "../deploy/web-apps/apps/documenteditor/main/resources/img"
}
],
"clean": [

View file

@ -184,6 +184,12 @@
"cwd": "../apps/common/main/resources/img",
"src": "**/*.svg",
"dest": "../deploy/web-apps/apps/presentationeditor/main/resources/img"
},
{
"expand": true,
"cwd": "../apps/presentationeditor/main/resources/img",
"src": "**/*.svg",
"dest": "../deploy/web-apps/apps/presentationeditor/main/resources/img"
}
],
"clean": [

View file

@ -198,6 +198,12 @@
"cwd": "../apps/common/main/resources/img",
"src": "**/*.svg",
"dest": "../deploy/web-apps/apps/spreadsheeteditor/main/resources/img"
},
{
"expand": true,
"cwd": "../apps/spreadsheeteditor/main/resources/img",
"src": "**/*.svg",
"dest": "../deploy/web-apps/apps/spreadsheeteditor/main/resources/img"
}
],
"clean": [