Merge branch 'release/v7.2.0' into feature/de-forms
|
@ -115,6 +115,7 @@
|
|||
address: 'New-York, 125f-25',
|
||||
mail: 'support@gmail.com',
|
||||
www: 'www.superpuper.com',
|
||||
phone: '1234567890',
|
||||
info: 'Some info',
|
||||
logo: '',
|
||||
logoDark: '', // logo for dark theme
|
||||
|
@ -1005,7 +1006,7 @@
|
|||
iframe.allowFullscreen = true;
|
||||
iframe.setAttribute("allowfullscreen",""); // for IE11
|
||||
iframe.setAttribute("onmousewheel",""); // for Safari on Mac
|
||||
iframe.setAttribute("allow", "autoplay; camera; microphone; display-capture");
|
||||
iframe.setAttribute("allow", "autoplay; camera; microphone; display-capture; clipboard-write;");
|
||||
|
||||
if (config.type == "mobile")
|
||||
{
|
||||
|
|
|
@ -262,7 +262,7 @@ div {
|
|||
var config = {
|
||||
"width": "100%",
|
||||
"height": "100%",
|
||||
"type": "desktop",
|
||||
"type": queryParams.embed==="1" ? "embedded" : "desktop",
|
||||
"documentType": documentType,
|
||||
"token": token,
|
||||
"document": {
|
||||
|
|
|
@ -57,6 +57,16 @@
|
|||
|
||||
$dlgShare.find('#btn-copyshort').on('click', copytext.bind(this, $dlgShare.find('#id-short-url')));
|
||||
$dlgShare.find('.share-buttons > span').on('click', function(e){
|
||||
if ( window.config ) {
|
||||
const key = $(e.target).attr('data-name');
|
||||
const btn = config.btnsShare[key];
|
||||
if ( btn && btn.getUrl ) {
|
||||
window.open(btn.getUrl(appConfig.shareUrl, appConfig.docTitle), btn.target || '',
|
||||
btn.features || 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var _url;
|
||||
switch ($(e.target).attr('data-name')) {
|
||||
case 'facebook':
|
||||
|
|
77
apps/common/embed/lib/view/SearchBar.js
Normal file
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2010-2020
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
|
||||
* street, Riga, Latvia, EU, LV-1050.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* SearchBar.js
|
||||
*
|
||||
* Created by Julia Svinareva on 27.04.2022
|
||||
* Copyright (c) 2022 Ascensio System SIA. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
!window.common && (window.common = {});
|
||||
!common.view && (common.view = {});
|
||||
common.view.SearchBar = new(function() {
|
||||
var tpl = '<div class="asc-window search-window" style="display: none;">' +
|
||||
'<div class="body">{body}</div>' +
|
||||
'</div>';
|
||||
var tplBody = '<input type="text" id="search-bar-text" placeholder="{textFind}" autocomplete="off">' +
|
||||
'<div class="tools">' +
|
||||
'<button id="search-bar-back" class="svg-icon search-arrow-up"></button>' +
|
||||
'<button id="search-bar-next" class="svg-icon search-arrow-down"></button>' +
|
||||
'<button id="search-bar-close" class="svg-icon search-close"></button>' +
|
||||
'</div>';
|
||||
|
||||
return {
|
||||
create: function(parent) {
|
||||
!parent && (parent = 'body');
|
||||
|
||||
var _$dlg = $(tpl
|
||||
.replace(/\{body}/, tplBody)
|
||||
.replace(/\{textFind}/, this.textFind))
|
||||
.appendTo(parent)
|
||||
.attr('id', 'dlg-search');
|
||||
|
||||
return _$dlg;
|
||||
},
|
||||
|
||||
disableNavButtons: function (resultNumber, allResults) {
|
||||
var disable = $('#search-bar-text').val() === '';
|
||||
$('#search-bar-back').attr({disabled: disable || !allResults || resultNumber === 0});
|
||||
$('#search-bar-next').attr({disabled: disable || resultNumber + 1 === allResults});
|
||||
},
|
||||
|
||||
textFind: 'Find'
|
||||
|
||||
};
|
||||
})();
|
|
@ -73,6 +73,20 @@ common.view.modals = new(function() {
|
|||
|
||||
var _$dlg;
|
||||
if (name == 'share') {
|
||||
if ( window.config && window.config.btnsShare ) {
|
||||
let _btns = [];
|
||||
for (const key of Object.keys(config.btnsShare))
|
||||
_btns.push(`<span class="svg big-${key}" data-name="${key}"></span>`);
|
||||
|
||||
if ( _btns ) {
|
||||
let $sharebox = $(_tplbody_share);
|
||||
$sharebox.find('.autotest').prevAll().remove();
|
||||
$sharebox.eq(1).prepend(_btns.join(''));
|
||||
|
||||
_tplbody_share = $("<div>").append($sharebox).html();
|
||||
}
|
||||
}
|
||||
|
||||
_$dlg = $(tplDialog
|
||||
.replace(/\{title}/, this.txtShare)
|
||||
.replace(/\{body}/, _tplbody_share)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<svg width="380" height="40" viewBox="0 0 380 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<svg width="580" height="40" viewBox="0 0 580 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g id="icon-menu-sprite Embedded Viewer">
|
||||
<g id="view-settings">
|
||||
<path id="Vector" d="M17 26H3V27H17V26Z" fill="white"/>
|
||||
|
@ -148,5 +148,73 @@
|
|||
<g id="close_2">
|
||||
<path id="Vector 73_2" d="M366 5L375 14M375 5L366 14" stroke="black" stroke-width="1.5"/>
|
||||
</g>
|
||||
<g id="сut">
|
||||
<circle id="Ellipse 103" cx="385.5" cy="13.5" r="2" stroke="black"/>
|
||||
<circle id="Ellipse 104" cx="385.5" cy="6.5" r="2" stroke="black"/>
|
||||
<path id="Rectangle 1552" d="M387.188 7.56689L398.446 14.0669V14.0669C398.17 14.5452 397.559 14.7091 397.08 14.4329L386.688 8.43292L387.188 7.56689Z" fill="black"/>
|
||||
<path id="Rectangle 1553" d="M386.688 11.5669L397.08 5.56689C397.558 5.29075 398.17 5.45463 398.446 5.93292V5.93292L387.188 12.4329L386.688 11.5669Z" fill="black"/>
|
||||
</g>
|
||||
<g id="сut_2">
|
||||
<circle id="Ellipse 103_2" cx="385.5" cy="33.5" r="2" stroke="white"/>
|
||||
<circle id="Ellipse 104_2" cx="385.5" cy="26.5" r="2" stroke="white"/>
|
||||
<path id="Rectangle 1552_2" d="M387.188 27.5669L398.446 34.0669V34.0669C398.17 34.5452 397.559 34.7091 397.08 34.4329L386.688 28.4329L387.188 27.5669Z" fill="white"/>
|
||||
<path id="Rectangle 1553_2" d="M386.688 31.5669L397.08 25.5669C397.558 25.2908 398.17 25.4546 398.446 25.9329V25.9329L387.188 32.4329L386.688 31.5669Z" fill="white"/>
|
||||
</g>
|
||||
<g id="copy">
|
||||
<path id="Union_27" fill-rule="evenodd" clip-rule="evenodd" d="M404 5H412V7H413V5C413 4.44772 412.552 4 412 4H404C403.448 4 403 4.44772 403 5V12C403 12.5523 403.448 13 404 13H406V12H404V5ZM411 6H405V7H411V6ZM408 9V16H416V9H408ZM408 8C407.448 8 407 8.44772 407 9V16C407 16.5523 407.448 17 408 17H416C416.552 17 417 16.5523 417 16V9C417 8.44772 416.552 8 416 8H408ZM406 8H405V9H406V8ZM405 10H406V11H405V10ZM415 11V10H409V11H415ZM415 12V13H409V12H415ZM415 15V14H409V15H415Z" fill="black"/>
|
||||
</g>
|
||||
<g id="copy_2">
|
||||
<path id="Union_28" fill-rule="evenodd" clip-rule="evenodd" d="M404 25H412V27H413V25C413 24.4477 412.552 24 412 24H404C403.448 24 403 24.4477 403 25V32C403 32.5523 403.448 33 404 33H406V32H404V25ZM411 26H405V27H411V26ZM408 29V36H416V29H408ZM408 28C407.448 28 407 28.4477 407 29V36C407 36.5523 407.448 37 408 37H416C416.552 37 417 36.5523 417 36V29C417 28.4477 416.552 28 416 28H408ZM406 28H405V29H406V28ZM405 30H406V31H405V30ZM415 31V30H409V31H415ZM415 32V33H409V32H415ZM415 35V34H409V35H415Z" fill="white"/>
|
||||
</g>
|
||||
<g id="paste">
|
||||
<path id="Union_29" fill-rule="evenodd" clip-rule="evenodd" d="M426 3H432V4H434C434.552 4 435 4.44772 435 5V7H434V5H432V6H426V5H424V12H426V13H424C423.448 13 423 12.5523 423 12V5C423 4.44772 423.448 4 424 4H426V3ZM436 16V9H428V16H436ZM428 8C427.448 8 427 8.44772 427 9V16C427 16.5523 427.448 17 428 17H436C436.552 17 437 16.5523 437 16V9C437 8.44772 436.552 8 436 8H428ZM429 11V10H435V11H429ZM435 12H429V13H435V12ZM429 15V14H435V15H429Z" fill="black"/>
|
||||
</g>
|
||||
<g id="paste_2">
|
||||
<path id="Union_30" fill-rule="evenodd" clip-rule="evenodd" d="M426 23H432V24H434C434.552 24 435 24.4477 435 25V27H434V25H432V26H426V25H424V32H426V33H424C423.448 33 423 32.5523 423 32V25C423 24.4477 423.448 24 424 24H426V23ZM436 36V29H428V36H436ZM428 28C427.448 28 427 28.4477 427 29V36C427 36.5523 427.448 37 428 37H436C436.552 37 437 36.5523 437 36V29C437 28.4477 436.552 28 436 28H428ZM429 31V30H435V31H429ZM435 32H429V33H435V32ZM429 35V34H435V35H429Z" fill="white"/>
|
||||
</g>
|
||||
<g id="redo">
|
||||
<path id="Vector" d="M469.1 7C471.1 7 473.2 8.3 474.5 9.5L477 7V14H470L472.5 11.5C471.7 10.2 469.9 9.1 468.2 9.1C465.7 9.1 462.8 10.8 462.5 13.2C462.9 9.7 465.5 7 469.1 7Z" fill="black"/>
|
||||
</g>
|
||||
<g id="redo_2">
|
||||
<path id="Vector_2" d="M469.1 27C471.1 27 473.2 28.3 474.5 29.5L477 27V34H470L472.5 31.5C471.7 30.2 469.9 29.1 468.2 29.1C465.7 29.1 462.8 30.8 462.5 33.2C462.9 29.7 465.5 27 469.1 27Z" fill="white"/>
|
||||
</g>
|
||||
<g id="undo">
|
||||
<path id="Vector_3" d="M450.9 7C448.9 7 446.8 8.3 445.5 9.5L443 7V14H450L447.5 11.5C448.3 10.2 450.1 9.1 451.8 9.1C454.3 9.1 457.2 10.8 457.5 13.2C457.1 9.7 454.5 7 450.9 7Z" fill="black"/>
|
||||
</g>
|
||||
<g id="undo_2">
|
||||
<path id="Vector_4" d="M450.9 27C448.9 27 446.8 28.3 445.5 29.5L443 27V34H450L447.5 31.5C448.3 30.2 450.1 29.1 451.8 29.1C454.3 29.1 457.2 30.8 457.5 33.2C457.1 29.7 454.5 27 450.9 27Z" fill="white"/>
|
||||
</g>
|
||||
<g id="search">
|
||||
<path id="Union_31" fill-rule="evenodd" clip-rule="evenodd" d="M493 8.5C493 10.9853 490.985 13 488.5 13C486.015 13 484 10.9853 484 8.5C484 6.01472 486.015 4 488.5 4C490.985 4 493 6.01472 493 8.5ZM492.02 12.7266C491.066 13.5217 489.839 14 488.5 14C485.462 14 483 11.5376 483 8.5C483 5.46243 485.462 3 488.5 3C491.538 3 494 5.46243 494 8.5C494 9.83875 493.522 11.0658 492.727 12.0195L496.854 16.1465L496.146 16.8536L492.02 12.7266Z" fill="black"/>
|
||||
</g>
|
||||
<g id="search_2">
|
||||
<path id="Union_32" fill-rule="evenodd" clip-rule="evenodd" d="M493 28.5C493 30.9853 490.985 33 488.5 33C486.015 33 484 30.9853 484 28.5C484 26.0147 486.015 24 488.5 24C490.985 24 493 26.0147 493 28.5ZM492.02 32.7266C491.066 33.5217 489.839 34 488.5 34C485.462 34 483 31.5376 483 28.5C483 25.4624 485.462 23 488.5 23C491.538 23 494 25.4624 494 28.5C494 29.8387 493.522 31.0658 492.727 32.0195L496.854 36.1465L496.146 36.8536L492.02 32.7266Z" fill="white"/>
|
||||
</g>
|
||||
<g id="btn-sheet-view">
|
||||
<path id="Union_33" fill-rule="evenodd" clip-rule="evenodd" d="M509.93 13C507.552 13 505.45 11.8151 504.184 10C505.45 8.18485 507.552 7 509.93 7C512.307 7 514.409 8.18486 515.675 10C514.409 11.8151 512.307 13 509.93 13ZM509.93 6C512.891 6 515.476 7.6088 516.859 10C515.476 12.3912 512.891 14 509.93 14C506.969 14 504.383 12.3912 503 10C504.383 7.60879 506.969 6 509.93 6ZM509.93 12C511.034 12 511.93 11.1046 511.93 10C511.93 8.89543 511.034 8 509.93 8C508.825 8 507.93 8.89543 507.93 10C507.93 11.1046 508.825 12 509.93 12Z" fill="black"/>
|
||||
</g>
|
||||
<g id="btn-sheet-view_2">
|
||||
<path id="Union_34" fill-rule="evenodd" clip-rule="evenodd" d="M509.93 33C507.552 33 505.45 31.8151 504.184 30C505.45 28.1849 507.552 27 509.93 27C512.307 27 514.409 28.1849 515.675 30C514.409 31.8151 512.307 33 509.93 33ZM509.93 26C512.891 26 515.476 27.6088 516.859 30C515.476 32.3912 512.891 34 509.93 34C506.969 34 504.383 32.3912 503 30C504.383 27.6088 506.969 26 509.93 26ZM509.93 32C511.034 32 511.93 31.1046 511.93 30C511.93 28.8954 511.034 28 509.93 28C508.825 28 507.93 28.8954 507.93 30C507.93 31.1046 508.825 32 509.93 32Z" fill="white"/>
|
||||
</g>
|
||||
<g id="hide-password">
|
||||
<path id="Subtract" fill-rule="evenodd" clip-rule="evenodd" d="M530.948 6.05196C530.638 6.01766 530.321 6 530 6C526.91 6 524.243 7.63505 523 10C523.439 10.8356 524.056 11.5801 524.807 12.1935L525.518 11.4821C524.979 11.055 524.519 10.5539 524.158 10C525.311 8.23092 527.473 7 530 7C530 7 530 7 530 7L530.948 6.05196ZM530 13C532.527 12.9999 534.689 11.769 535.842 10C535.481 9.44626 535.021 8.94525 534.482 8.51821L535.194 7.80682C535.944 8.42019 536.561 9.16455 537 10C535.757 12.3649 533.09 14 530 14C529.679 14 529.363 13.9824 529.052 13.9481L530 13Z" fill="black"/>
|
||||
<path id="Vector 169" d="M525 15L535 5" stroke="black"/>
|
||||
</g>
|
||||
<g id="hide-password_2">
|
||||
<path id="Subtract_2" fill-rule="evenodd" clip-rule="evenodd" d="M530.948 26.052C530.638 26.0177 530.321 26 530 26C526.91 26 524.243 27.6351 523 30C523.439 30.8356 524.056 31.5801 524.807 32.1935L525.518 31.4821C524.979 31.055 524.519 30.5539 524.158 30C525.311 28.2309 527.473 27 530 27C530 27 530 27 530 27L530.948 26.052ZM530 33C532.527 32.9999 534.689 31.769 535.842 30C535.481 29.4463 535.021 28.9453 534.482 28.5182L535.194 27.8068C535.944 28.4202 536.561 29.1646 537 30C535.757 32.3649 533.09 34 530 34C529.679 34 529.363 33.9824 529.052 33.9481L530 33Z" fill="white"/>
|
||||
<path id="Vector 169_2" d="M525 35L535 25" stroke="white"/>
|
||||
</g>
|
||||
<g id="arrow-up">
|
||||
<path id="Union_4" fill-rule="evenodd" clip-rule="evenodd" d="M550 6.29297L550.354 6.64652L555.854 12.1465L555.146 12.8536L550 7.70718L544.854 12.8536L544.146 12.1465L549.646 6.64652L550 6.29297Z" fill="black"/>
|
||||
</g>
|
||||
<g id="arrow-up_2">
|
||||
<path id="Union_3" fill-rule="evenodd" clip-rule="evenodd" d="M550 26.293L550.354 26.6465L555.854 32.1465L555.146 32.8536L550 27.7072L544.854 32.8536L544.146 32.1465L549.646 26.6465L550 26.293Z" fill="white"/>
|
||||
</g>
|
||||
<g id="arrow-down">
|
||||
<path id="Union_2" fill-rule="evenodd" clip-rule="evenodd" d="M570 13.7071L570.354 13.3536L575.854 7.85359L575.146 7.14648L570 12.2929L564.854 7.14648L564.146 7.85359L569.646 13.3536L570 13.7071Z" fill="black"/>
|
||||
</g>
|
||||
<g id="arrow-down_2">
|
||||
<path id="Union" fill-rule="evenodd" clip-rule="evenodd" d="M570 33.7071L570.354 33.3536L575.854 27.8536L575.146 27.1465L570 32.2929L564.854 27.1465L564.146 27.8536L569.646 33.3536L570 33.7071Z" fill="white"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 22 KiB |
|
@ -503,7 +503,7 @@
|
|||
@icon-height: 20px;
|
||||
.svg-icon {
|
||||
background: data-uri('../../../../common/embed/resources/img/icon-menu-sprite.svg') no-repeat;
|
||||
background-size: @icon-width*19 @icon-height*2;
|
||||
background-size: @icon-width*29 @icon-height*2;
|
||||
|
||||
&.download {
|
||||
background-position: -@icon-width 0;
|
||||
|
@ -557,6 +557,18 @@
|
|||
&.more-vertical {
|
||||
background-position: -@icon-width*14 0;
|
||||
}
|
||||
&.search-close {
|
||||
background-position: -@icon-width*18 0;
|
||||
}
|
||||
&.search {
|
||||
background-position: -@icon-width*24 0;
|
||||
}
|
||||
&.search-arrow-up {
|
||||
background-position: -@icon-width*27 0;
|
||||
}
|
||||
&.search-arrow-down {
|
||||
background-position: -@icon-width*28 0;
|
||||
}
|
||||
}
|
||||
|
||||
.mi-icon {
|
||||
|
@ -786,3 +798,72 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#id-search {
|
||||
button.active {
|
||||
background-color: @btnActiveColor !important;
|
||||
background-position: -@icon-width*19 -@icon-height;
|
||||
}
|
||||
}
|
||||
|
||||
.search-window {
|
||||
width: 301px;
|
||||
height: 54px;
|
||||
z-index: 50;
|
||||
position: fixed;
|
||||
|
||||
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
|
||||
border-radius: 5px;
|
||||
border: solid 1px #CBCBCB;
|
||||
|
||||
.body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 5px;
|
||||
background-color: #FFFFFF;
|
||||
display: flex;
|
||||
padding: 16px;
|
||||
|
||||
input {
|
||||
width: 192px;
|
||||
height: 22px;
|
||||
border-radius: 2px;
|
||||
box-shadow: none;
|
||||
border: solid 1px #CFCFCF;
|
||||
padding: 1px 3px;
|
||||
color: #444444;
|
||||
font-size: 11px;
|
||||
|
||||
&::placeholder {
|
||||
color: #CFCFCF;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
border-color: #848484;
|
||||
outline: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.tools {
|
||||
display: flex;
|
||||
|
||||
button {
|
||||
border: none;
|
||||
margin-left: 7px;
|
||||
cursor: pointer;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
opacity: 0.8;
|
||||
|
||||
&:hover:not(:disabled) {
|
||||
background-color: #d8dadc;
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
opacity: 0.4;
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
<svg width="480" height="40" viewBox="0 0 480 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<svg width="580" height="40" viewBox="0 0 580 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g id="icon-menu-sprite Embedded Viewer">
|
||||
<g id="view-settings">
|
||||
<path id="Vector" d="M17 26H3V27H17V26Z" fill="white"/>
|
||||
|
@ -184,5 +184,37 @@
|
|||
<g id="undo_2">
|
||||
<path id="Vector_4" d="M450.9 27C448.9 27 446.8 28.3 445.5 29.5L443 27V34H450L447.5 31.5C448.3 30.2 450.1 29.1 451.8 29.1C454.3 29.1 457.2 30.8 457.5 33.2C457.1 29.7 454.5 27 450.9 27Z" fill="white"/>
|
||||
</g>
|
||||
<g id="search">
|
||||
<path id="Union_31" fill-rule="evenodd" clip-rule="evenodd" d="M493 8.5C493 10.9853 490.985 13 488.5 13C486.015 13 484 10.9853 484 8.5C484 6.01472 486.015 4 488.5 4C490.985 4 493 6.01472 493 8.5ZM492.02 12.7266C491.066 13.5217 489.839 14 488.5 14C485.462 14 483 11.5376 483 8.5C483 5.46243 485.462 3 488.5 3C491.538 3 494 5.46243 494 8.5C494 9.83875 493.522 11.0658 492.727 12.0195L496.854 16.1465L496.146 16.8536L492.02 12.7266Z" fill="black"/>
|
||||
</g>
|
||||
<g id="search_2">
|
||||
<path id="Union_32" fill-rule="evenodd" clip-rule="evenodd" d="M493 28.5C493 30.9853 490.985 33 488.5 33C486.015 33 484 30.9853 484 28.5C484 26.0147 486.015 24 488.5 24C490.985 24 493 26.0147 493 28.5ZM492.02 32.7266C491.066 33.5217 489.839 34 488.5 34C485.462 34 483 31.5376 483 28.5C483 25.4624 485.462 23 488.5 23C491.538 23 494 25.4624 494 28.5C494 29.8387 493.522 31.0658 492.727 32.0195L496.854 36.1465L496.146 36.8536L492.02 32.7266Z" fill="white"/>
|
||||
</g>
|
||||
<g id="btn-sheet-view">
|
||||
<path id="Union_33" fill-rule="evenodd" clip-rule="evenodd" d="M509.93 13C507.552 13 505.45 11.8151 504.184 10C505.45 8.18485 507.552 7 509.93 7C512.307 7 514.409 8.18486 515.675 10C514.409 11.8151 512.307 13 509.93 13ZM509.93 6C512.891 6 515.476 7.6088 516.859 10C515.476 12.3912 512.891 14 509.93 14C506.969 14 504.383 12.3912 503 10C504.383 7.60879 506.969 6 509.93 6ZM509.93 12C511.034 12 511.93 11.1046 511.93 10C511.93 8.89543 511.034 8 509.93 8C508.825 8 507.93 8.89543 507.93 10C507.93 11.1046 508.825 12 509.93 12Z" fill="black"/>
|
||||
</g>
|
||||
<g id="btn-sheet-view_2">
|
||||
<path id="Union_34" fill-rule="evenodd" clip-rule="evenodd" d="M509.93 33C507.552 33 505.45 31.8151 504.184 30C505.45 28.1849 507.552 27 509.93 27C512.307 27 514.409 28.1849 515.675 30C514.409 31.8151 512.307 33 509.93 33ZM509.93 26C512.891 26 515.476 27.6088 516.859 30C515.476 32.3912 512.891 34 509.93 34C506.969 34 504.383 32.3912 503 30C504.383 27.6088 506.969 26 509.93 26ZM509.93 32C511.034 32 511.93 31.1046 511.93 30C511.93 28.8954 511.034 28 509.93 28C508.825 28 507.93 28.8954 507.93 30C507.93 31.1046 508.825 32 509.93 32Z" fill="white"/>
|
||||
</g>
|
||||
<g id="hide-password">
|
||||
<path id="Subtract" fill-rule="evenodd" clip-rule="evenodd" d="M530.948 6.05196C530.638 6.01766 530.321 6 530 6C526.91 6 524.243 7.63505 523 10C523.439 10.8356 524.056 11.5801 524.807 12.1935L525.518 11.4821C524.979 11.055 524.519 10.5539 524.158 10C525.311 8.23092 527.473 7 530 7C530 7 530 7 530 7L530.948 6.05196ZM530 13C532.527 12.9999 534.689 11.769 535.842 10C535.481 9.44626 535.021 8.94525 534.482 8.51821L535.194 7.80682C535.944 8.42019 536.561 9.16455 537 10C535.757 12.3649 533.09 14 530 14C529.679 14 529.363 13.9824 529.052 13.9481L530 13Z" fill="black"/>
|
||||
<path id="Vector 169" d="M525 15L535 5" stroke="black"/>
|
||||
</g>
|
||||
<g id="hide-password_2">
|
||||
<path id="Subtract_2" fill-rule="evenodd" clip-rule="evenodd" d="M530.948 26.052C530.638 26.0177 530.321 26 530 26C526.91 26 524.243 27.6351 523 30C523.439 30.8356 524.056 31.5801 524.807 32.1935L525.518 31.4821C524.979 31.055 524.519 30.5539 524.158 30C525.311 28.2309 527.473 27 530 27C530 27 530 27 530 27L530.948 26.052ZM530 33C532.527 32.9999 534.689 31.769 535.842 30C535.481 29.4463 535.021 28.9453 534.482 28.5182L535.194 27.8068C535.944 28.4202 536.561 29.1646 537 30C535.757 32.3649 533.09 34 530 34C529.679 34 529.363 33.9824 529.052 33.9481L530 33Z" fill="white"/>
|
||||
<path id="Vector 169_2" d="M525 35L535 25" stroke="white"/>
|
||||
</g>
|
||||
<g id="arrow-up">
|
||||
<path id="Union_4" fill-rule="evenodd" clip-rule="evenodd" d="M550 6.29297L550.354 6.64652L555.854 12.1465L555.146 12.8536L550 7.70718L544.854 12.8536L544.146 12.1465L549.646 6.64652L550 6.29297Z" fill="black"/>
|
||||
</g>
|
||||
<g id="arrow-up_2">
|
||||
<path id="Union_3" fill-rule="evenodd" clip-rule="evenodd" d="M550 26.293L550.354 26.6465L555.854 32.1465L555.146 32.8536L550 27.7072L544.854 32.8536L544.146 32.1465L549.646 26.6465L550 26.293Z" fill="white"/>
|
||||
</g>
|
||||
<g id="arrow-down">
|
||||
<path id="Union_2" fill-rule="evenodd" clip-rule="evenodd" d="M570 13.7071L570.354 13.3536L575.854 7.85359L575.146 7.14648L570 12.2929L564.854 7.14648L564.146 7.85359L569.646 13.3536L570 13.7071Z" fill="black"/>
|
||||
</g>
|
||||
<g id="arrow-down_2">
|
||||
<path id="Union" fill-rule="evenodd" clip-rule="evenodd" d="M570 33.7071L570.354 33.3536L575.854 27.8536L575.146 27.1465L570 32.2929L564.854 27.1465L564.146 27.8536L569.646 33.3536L570 33.7071Z" fill="white"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 20 KiB |
|
@ -81,6 +81,7 @@
|
|||
@import "../../../../common/main/resources/less/checkbox.less";
|
||||
@import "../../../../common/main/resources/less/opendialog.less";
|
||||
@import "../../../../common/main/resources/less/advanced-settings-window.less";
|
||||
@import "../../../../common/main/resources/less/searchdialog.less";
|
||||
|
||||
@toolbarBorderColor: @border-toolbar-ie;
|
||||
@toolbarBorderColor: @border-toolbar;
|
||||
|
@ -439,7 +440,7 @@
|
|||
|
||||
.svg-icon {
|
||||
background: data-uri('../../../../common/forms/resources/img/icon-menu-sprite.svg') no-repeat;
|
||||
background-size: @icon-width*24 @icon-height*2;
|
||||
background-size: @icon-width*29 @icon-height*2;
|
||||
|
||||
&.download {
|
||||
background-position: -@icon-width 0;
|
||||
|
@ -531,6 +532,30 @@
|
|||
background-position: -@icon-width*23 0;
|
||||
background-position: -@icon-width*23 @icon-normal-top;
|
||||
}
|
||||
&.search {
|
||||
background-position: -@icon-width*24 0;
|
||||
background-position: -@icon-width*24 @icon-normal-top;
|
||||
}
|
||||
&.btn-sheet-view {
|
||||
background-position: -@icon-width*25 0;
|
||||
background-position: -@icon-width*25 @icon-normal-top;
|
||||
}
|
||||
&.hide-password {
|
||||
background-position: -@icon-width*26 0;
|
||||
background-position: -@icon-width*26 @icon-normal-top;
|
||||
}
|
||||
&.search-close {
|
||||
background-position: -@icon-width*18 0;
|
||||
}
|
||||
&.search {
|
||||
background-position: -@icon-width*24 0;
|
||||
}
|
||||
&.search-arrow-up {
|
||||
background-position: -@icon-width*27 0;
|
||||
}
|
||||
&.search-arrow-down {
|
||||
background-position: -@icon-width*28 0;
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
|
@ -670,3 +695,7 @@
|
|||
.font-size-large {
|
||||
.fontsize(@font-size-large);
|
||||
}
|
||||
|
||||
.search-bar {
|
||||
z-index: 50;
|
||||
}
|
|
@ -55,12 +55,15 @@ define([
|
|||
|
||||
getPicker: function(color, colors) {
|
||||
if (!this.colorPicker) {
|
||||
this.colorPicker = new Common.UI.ThemeColorPalette({
|
||||
var config = {
|
||||
el: this.cmpEl.find('#' + this.menu.id + '-color-menu'),
|
||||
transparent: this.options.transparent,
|
||||
value: color,
|
||||
colors: colors
|
||||
});
|
||||
};
|
||||
(this.options.transparent!==undefined) && (config['transparent'] = this.options.transparent);
|
||||
(this.options.hideEmptyColors!==undefined) && (config['hideEmptyColors'] = this.options.hideEmptyColors);
|
||||
|
||||
this.colorPicker = new Common.UI.ThemeColorPalette(config);
|
||||
this.colorPicker.on('select', _.bind(this.onColorSelect, this));
|
||||
this.cmpEl.find('#' + this.menu.id + '-color-new').on('click', _.bind(this.addNewColor, this));
|
||||
if (this.options.auto) {
|
||||
|
@ -80,7 +83,7 @@ define([
|
|||
getMenu: function(options) {
|
||||
if (typeof this.menu !== 'object') {
|
||||
options = options || this.options;
|
||||
var height = options.paletteHeight || 240,
|
||||
var height = options.paletteHeight ? options.paletteHeight + 'px' : 'auto',
|
||||
id = Common.UI.getId(),
|
||||
auto = [];
|
||||
if (options.auto) {
|
||||
|
@ -98,7 +101,8 @@ define([
|
|||
cls: 'shifted-left',
|
||||
additionalAlign: options.additionalAlign,
|
||||
items: (options.additionalItems ? options.additionalItems : []).concat(auto).concat([
|
||||
{ template: _.template('<div id="' + id + '-color-menu" style="width: 169px; height:' + height + 'px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<div id="' + id + '-color-menu" style="width: 164px; height:' + height + '; display: inline-block;"></div>') },
|
||||
{caption: '--'},
|
||||
{
|
||||
id: id + '-color-new',
|
||||
template: _.template('<a tabindex="-1" type="menuitem" style="">' + this.textNewColor + '</a>')
|
||||
|
|
|
@ -66,12 +66,12 @@ define([
|
|||
spriteCols = 1,
|
||||
applicationPixelRatio = Common.Utils.applicationPixelRatio();
|
||||
|
||||
if (typeof window['AscDesktopEditor'] === 'object') {
|
||||
thumbs[0].path = window['AscDesktopEditor'].getFontsSprite('');
|
||||
thumbs[1].path = window['AscDesktopEditor'].getFontsSprite('@1.25x');
|
||||
thumbs[2].path = window['AscDesktopEditor'].getFontsSprite('@1.5x');
|
||||
thumbs[3].path = window['AscDesktopEditor'].getFontsSprite('@1.75x');
|
||||
thumbs[4].path = window['AscDesktopEditor'].getFontsSprite('@2x');
|
||||
if ( Common.Controllers.Desktop.isActive() ) {
|
||||
thumbs[0].path = Common.Controllers.Desktop.call('getFontsSprite');
|
||||
thumbs[1].path = Common.Controllers.Desktop.call('getFontsSprite', '@1.25x');
|
||||
thumbs[2].path = Common.Controllers.Desktop.call('getFontsSprite', '@1.5x');
|
||||
thumbs[3].path = Common.Controllers.Desktop.call('getFontsSprite', '@1.75x');
|
||||
thumbs[4].path = Common.Controllers.Desktop.call('getFontsSprite', '@2x');
|
||||
}
|
||||
|
||||
var bestDistance = Math.abs(applicationPixelRatio-thumbs[0].ratio);
|
||||
|
@ -88,6 +88,124 @@ define([
|
|||
thumbCanvas.height = thumbs[thumbIdx].height;
|
||||
thumbCanvas.width = thumbs[thumbIdx].width;
|
||||
|
||||
function CThumbnailLoader() {
|
||||
this.supportBinaryFormat = !(Common.Controllers.Desktop.isActive() && !Common.Controllers.isFeatureAvailable('isSupportBinaryFontsSprite'));
|
||||
|
||||
this.image = null;
|
||||
this.binaryFormat = null;
|
||||
this.data = null;
|
||||
this.width = 0;
|
||||
this.height = 0;
|
||||
this.heightOne = 0;
|
||||
this.count = 0;
|
||||
|
||||
this.load = function(url, callback) {
|
||||
if (!callback)
|
||||
return;
|
||||
|
||||
if (!this.supportBinaryFormat) {
|
||||
this.width = thumbs[thumbIdx].width;
|
||||
this.heightOne = thumbs[thumbIdx].height;
|
||||
|
||||
this.image = new Image();
|
||||
this.image.onload = callback;
|
||||
this.image.src = thumbs[thumbIdx].path;
|
||||
} else {
|
||||
var me = this;
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', url + ".bin", true);
|
||||
xhr.responseType = 'arraybuffer';
|
||||
|
||||
if (xhr.overrideMimeType)
|
||||
xhr.overrideMimeType('text/plain; charset=x-user-defined');
|
||||
else
|
||||
xhr.setRequestHeader('Accept-Charset', 'x-user-defined');
|
||||
|
||||
xhr.onload = function() {
|
||||
// TODO: check errors
|
||||
me.binaryFormat = this.response;
|
||||
callback();
|
||||
};
|
||||
|
||||
xhr.send(null);
|
||||
}
|
||||
};
|
||||
|
||||
this.openBinary = function(arrayBuffer) {
|
||||
//var t1 = performance.now();
|
||||
|
||||
var binaryAlpha = new Uint8Array(arrayBuffer);
|
||||
this.width = (binaryAlpha[0] << 24) | (binaryAlpha[1] << 16) | (binaryAlpha[2] << 8) | (binaryAlpha[3] << 0);
|
||||
this.heightOne = (binaryAlpha[4] << 24) | (binaryAlpha[5] << 16) | (binaryAlpha[6] << 8) | (binaryAlpha[7] << 0);
|
||||
this.count = (binaryAlpha[8] << 24) | (binaryAlpha[9] << 16) | (binaryAlpha[10] << 8) | (binaryAlpha[11] << 0);
|
||||
this.height = this.count * this.heightOne;
|
||||
|
||||
this.data = new Uint8ClampedArray(4 * this.width * this.height);
|
||||
|
||||
var binaryIndex = 12;
|
||||
var binaryLen = binaryAlpha.length;
|
||||
var imagePixels = this.data;
|
||||
var index = 0;
|
||||
|
||||
var len0 = 0;
|
||||
var tmpValue = 0;
|
||||
while (binaryIndex < binaryLen) {
|
||||
tmpValue = binaryAlpha[binaryIndex++];
|
||||
if (0 == tmpValue) {
|
||||
len0 = binaryAlpha[binaryIndex++];
|
||||
while (len0 > 0) {
|
||||
len0--;
|
||||
imagePixels[index] = imagePixels[index + 1] = imagePixels[index + 2] = 255;
|
||||
imagePixels[index + 3] = 0; // this value is already 0.
|
||||
index += 4;
|
||||
}
|
||||
} else {
|
||||
imagePixels[index] = imagePixels[index + 1] = imagePixels[index + 2] = 255 - tmpValue;
|
||||
imagePixels[index + 3] = tmpValue;
|
||||
index += 4;
|
||||
}
|
||||
}
|
||||
|
||||
//var t2 = performance.now();
|
||||
//console.log(t2 - t1);
|
||||
};
|
||||
|
||||
this.getImage = function(index, canvas, ctx) {
|
||||
|
||||
//var t1 = performance.now();
|
||||
if (!canvas)
|
||||
{
|
||||
canvas = document.createElement("canvas");
|
||||
canvas.width = this.width;
|
||||
canvas.height = this.heightOne;
|
||||
canvas.style.width = iconWidth + "px";
|
||||
canvas.style.height = iconHeight + "px";
|
||||
|
||||
ctx = canvas.getContext("2d");
|
||||
}
|
||||
|
||||
if (this.supportBinaryFormat) {
|
||||
if (!this.data) {
|
||||
this.openBinary(this.binaryFormat);
|
||||
delete this.binaryFormat;
|
||||
}
|
||||
|
||||
var dataTmp = ctx.createImageData(this.width, this.heightOne);
|
||||
var sizeImage = 4 * this.width * this.heightOne;
|
||||
dataTmp.data.set(new Uint8ClampedArray(this.data.buffer, index * sizeImage, sizeImage));
|
||||
ctx.putImageData(dataTmp, 0, 0);
|
||||
} else {
|
||||
ctx.clearRect(0, 0, this.width, this.heightOne);
|
||||
ctx.drawImage(this.image, 0, -this.heightOne * index);
|
||||
}
|
||||
|
||||
//var t2 = performance.now();
|
||||
//console.log(t2 - t1);
|
||||
|
||||
return canvas;
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
template: _.template([
|
||||
'<div class="input-group combobox fonts <%= cls %>" id="<%= id %>" style="<%= style %>">',
|
||||
|
@ -305,10 +423,8 @@ define([
|
|||
return img != null ? img[0].src : undefined;
|
||||
}
|
||||
|
||||
thumbContext.clearRect(0, 0, thumbs[thumbIdx].width, thumbs[thumbIdx].height);
|
||||
thumbContext.drawImage(this.spriteThumbs, 0, -thumbs[thumbIdx].height * Math.floor(opts.imgidx/spriteCols));
|
||||
|
||||
return thumbCanvas.toDataURL();
|
||||
var index = Math.floor(opts.imgidx/spriteCols);
|
||||
return this.spriteThumbs.getImage(index, thumbCanvas, thumbContext).toDataURL();
|
||||
},
|
||||
|
||||
getImageWidth: function() {
|
||||
|
@ -324,11 +440,8 @@ define([
|
|||
},
|
||||
|
||||
loadSprite: function(callback) {
|
||||
if (callback) {
|
||||
this.spriteThumbs = new Image();
|
||||
this.spriteThumbs.onload = callback;
|
||||
this.spriteThumbs.src = thumbs[thumbIdx].path;
|
||||
}
|
||||
this.spriteThumbs = new CThumbnailLoader();
|
||||
this.spriteThumbs.load(thumbs[thumbIdx].path, callback);
|
||||
},
|
||||
|
||||
fillFonts: function(store, select) {
|
||||
|
@ -554,19 +667,8 @@ define([
|
|||
for (j = 0; j < storeCount; ++j) {
|
||||
if (from <= j && j < to) {
|
||||
if (null === me.tiles[j]) {
|
||||
var fontImage = document.createElement('canvas');
|
||||
var context = fontImage.getContext('2d');
|
||||
|
||||
fontImage.height = thumbs[thumbIdx].height;
|
||||
fontImage.width = thumbs[thumbIdx].width;
|
||||
|
||||
fontImage.style.width = iconWidth + 'px';
|
||||
fontImage.style.height = iconHeight + 'px';
|
||||
|
||||
index = Math.floor(me.store.at(j).get('imgidx')/spriteCols);
|
||||
|
||||
context.clearRect(0, 0, thumbs[thumbIdx].width, thumbs[thumbIdx].height);
|
||||
context.drawImage(me.spriteThumbs, 0, -thumbs[thumbIdx].height * index);
|
||||
var fontImage = me.spriteThumbs.getImage(index);
|
||||
|
||||
me.tiles[j] = fontImage;
|
||||
$(listItems[j]).get(0).appendChild(fontImage);
|
||||
|
|
|
@ -476,12 +476,12 @@ define([
|
|||
var me = this,
|
||||
view_el = $(view.el),
|
||||
tip = record.get('tip');
|
||||
if (tip) {
|
||||
if (tip!==undefined && tip!==null) {
|
||||
if (this.delayRenderTips)
|
||||
view_el.one('mouseenter', function(){ // hide tooltip when mouse is over menu
|
||||
view_el.attr('data-toggle', 'tooltip');
|
||||
view_el.tooltip({
|
||||
title : tip,
|
||||
title : record.get('tip'), // use actual tip, because it can be changed
|
||||
placement : 'cursor',
|
||||
zIndex : me.tipZIndex
|
||||
});
|
||||
|
@ -490,7 +490,7 @@ define([
|
|||
else {
|
||||
view_el.attr('data-toggle', 'tooltip');
|
||||
view_el.tooltip({
|
||||
title : tip,
|
||||
title : record.get('tip'), // use actual tip, because it can be changed
|
||||
placement : 'cursor',
|
||||
zIndex : me.tipZIndex
|
||||
});
|
||||
|
@ -1652,7 +1652,18 @@ define([
|
|||
|
||||
if (recents.length > 0 && diff) {
|
||||
me.recentShapes = recents;
|
||||
me.groups[0].groupStore.reset(me.recentShapes);
|
||||
var resentsStore = new Common.UI.DataViewStore();
|
||||
_.each(me.recentShapes, function (recent) {
|
||||
var model = {
|
||||
data: {shapeType: recent.data.shapeType},
|
||||
tip: recent.tip,
|
||||
allowSelected: recent.allowSelected,
|
||||
selected: recent.selected,
|
||||
groupName: recent.groupName
|
||||
};
|
||||
resentsStore.push(model);
|
||||
});
|
||||
me.groups[0].groupStore = resentsStore;
|
||||
|
||||
var store = new Common.UI.DataViewStore();
|
||||
_.each(me.groups, function (group) {
|
||||
|
|
|
@ -81,7 +81,7 @@ define([
|
|||
template: _.template([
|
||||
'<div class="input-field" style="<%= style %>">',
|
||||
'<input ',
|
||||
'type="text" ',
|
||||
'type="<%= type %>" ',
|
||||
'name="<%= name %>" ',
|
||||
'spellcheck="<%= spellcheck %>" ',
|
||||
'class="form-control <%= cls %>" ',
|
||||
|
@ -164,8 +164,6 @@ define([
|
|||
this._input.on('keydown', _.bind(this.onKeyDown, this));
|
||||
this._input.on('keyup', _.bind(this.onKeyUp, this));
|
||||
if (this.validateOnChange) this._input.on('input', _.bind(this.onInputChanging, this));
|
||||
if (this.type=='password') this._input.on('input', _.bind(this.checkPasswordType, this));
|
||||
|
||||
if (this.maxLength) this._input.attr('maxlength', this.maxLength);
|
||||
}
|
||||
|
||||
|
@ -190,15 +188,6 @@ define([
|
|||
return this;
|
||||
},
|
||||
|
||||
checkPasswordType: function(){
|
||||
if(this.type == 'text') return;
|
||||
if (this._input.val() !== '') {
|
||||
(this._input.attr('type') !== 'password') && this._input.attr('type', 'password');
|
||||
} else {
|
||||
this._input.attr('type', 'text');
|
||||
}
|
||||
},
|
||||
|
||||
_doChange: function(e, extra) {
|
||||
// skip processing for internally-generated synthetic event
|
||||
// to avoid double processing
|
||||
|
@ -317,8 +306,6 @@ define([
|
|||
if (this.rendered){
|
||||
this._input.val(value);
|
||||
}
|
||||
|
||||
(this.type=='password') && this.checkPasswordType();
|
||||
},
|
||||
|
||||
getValue: function() {
|
||||
|
@ -438,12 +425,15 @@ define([
|
|||
template: _.template([
|
||||
'<div class="input-field input-field-btn" style="<%= style %>">',
|
||||
'<input ',
|
||||
'type="text" ',
|
||||
'type=<%= type %> ',
|
||||
'name="<%= name %>" ',
|
||||
'spellcheck="<%= spellcheck %>" ',
|
||||
'class="form-control <%= cls %>" ',
|
||||
'placeholder="<%= placeHolder %>" ',
|
||||
'value="<%= value %>"',
|
||||
'data-hint="<%= dataHint %>"',
|
||||
'data-hint-offset="<%= dataHintOffset %>"',
|
||||
'data-hint-direction="<%= dataHintDirection %>"',
|
||||
'>',
|
||||
'<span class="input-error"></span>',
|
||||
'<div class="select-button">' +
|
||||
|
@ -464,7 +454,10 @@ define([
|
|||
name : this.name,
|
||||
placeHolder : this.placeHolder,
|
||||
spellcheck : this.spellcheck,
|
||||
scope : me
|
||||
scope : me,
|
||||
dataHint : this.options.dataHint,
|
||||
dataHintOffset: this.options.dataHintOffset,
|
||||
dataHintDirection: this.options.dataHintDirection
|
||||
}));
|
||||
|
||||
if (parentEl) {
|
||||
|
@ -556,6 +549,7 @@ define([
|
|||
style: '',
|
||||
value: '',
|
||||
name: '',
|
||||
type: 'password',
|
||||
validation: null,
|
||||
allowBlank: true,
|
||||
placeHolder: '',
|
||||
|
@ -566,7 +560,8 @@ define([
|
|||
validateOnBlur: true,
|
||||
disabled: false,
|
||||
editable: true,
|
||||
iconCls: 'toolbar__icon btn-sheet-view',
|
||||
showCls: 'toolbar__icon btn-sheet-view',
|
||||
hideCls: 'toolbar__icon hide-password',
|
||||
btnHint: '',
|
||||
repeatInput: null,
|
||||
showPwdOnClick: true
|
||||
|
@ -575,6 +570,7 @@ define([
|
|||
initialize : function(options) {
|
||||
options = options || {};
|
||||
options.btnHint = options.btnHint || this.textHintShowPwd;
|
||||
options.iconCls = options.showCls || this.options.showCls;
|
||||
|
||||
Common.UI.InputFieldBtn.prototype.initialize.call(this, options);
|
||||
|
||||
|
@ -586,7 +582,6 @@ define([
|
|||
Common.UI.InputFieldBtn.prototype.render.call(this, parentEl);
|
||||
|
||||
this._btnElm = this._button.$el;
|
||||
this._input.on('input', _.bind(this.checkPasswordType, this));
|
||||
if(this.options.showPwdOnClick)
|
||||
this._button.on('click', _.bind(this.passwordClick, this));
|
||||
else
|
||||
|
@ -617,7 +612,7 @@ define([
|
|||
|
||||
passwordShow: function (e) {
|
||||
if (this.disabled) return;
|
||||
this._button.setIconCls('toolbar__icon hide-password');
|
||||
this._button.setIconCls(this.options.hideCls);
|
||||
this.type = 'text';
|
||||
|
||||
this._input.attr('type', this.type);
|
||||
|
@ -636,13 +631,13 @@ define([
|
|||
},
|
||||
|
||||
passwordHide: function (e) {
|
||||
this._button.setIconCls('toolbar__icon btn-sheet-view');
|
||||
this._button.setIconCls(this.options.showCls);
|
||||
this.type = 'password';
|
||||
|
||||
(this._input.val() !== '') && this._input.attr('type', this.type);
|
||||
this._input.attr('type', this.type);
|
||||
if(this.repeatInput) {
|
||||
this.repeatInput.type = this.type;
|
||||
(this.repeatInput._input.val() !== '') && this.repeatInput._input.attr('type', this.type);
|
||||
this.repeatInput._input.attr('type', this.type);
|
||||
}
|
||||
|
||||
if(this.options.showPwdOnClick) {
|
||||
|
|
|
@ -377,12 +377,12 @@ define([
|
|||
onBeforeShowMenu: function(e) {
|
||||
Common.NotificationCenter.trigger('menu:show');
|
||||
this.trigger('show:before', this, e);
|
||||
this.alignPosition();
|
||||
(e && e.target===e.currentTarget) && this.alignPosition();
|
||||
},
|
||||
|
||||
onAfterShowMenu: function(e) {
|
||||
this.trigger('show:after', this, e);
|
||||
if (this.scroller) {
|
||||
if (this.scroller && e && e.target===e.currentTarget) {
|
||||
var menuRoot = this.menuRoot;
|
||||
if (this.wheelSpeed===undefined) {
|
||||
var item = menuRoot.find('> li:first'),
|
||||
|
@ -664,7 +664,7 @@ define([
|
|||
if (top + menuH > docH + cg.top) {
|
||||
menuRoot.css('max-height', (docH - top) + 'px');
|
||||
(!this.scroller) && (this.scroller = new Common.UI.Scroller({
|
||||
el: this.$el.find('.dropdown-menu '),
|
||||
el: this.$el.find('> .dropdown-menu '),
|
||||
minScrollbarLength: 30,
|
||||
suppressScrollX: true,
|
||||
alwaysVisibleY: this.scrollAlwaysVisible
|
||||
|
@ -983,12 +983,12 @@ define([
|
|||
onBeforeShowMenu: function(e) {
|
||||
Common.NotificationCenter.trigger('menu:show');
|
||||
this.trigger('show:before', this, e);
|
||||
this.alignPosition();
|
||||
(e && e.target===e.currentTarget) && this.alignPosition();
|
||||
},
|
||||
|
||||
onAfterShowMenu: function(e) {
|
||||
this.trigger('show:after', this, e);
|
||||
if (this.scroller) {
|
||||
if (this.scroller && e && e.target===e.currentTarget) {
|
||||
this.scroller.update({alwaysVisibleY: this.scrollAlwaysVisible});
|
||||
var menuRoot = this.menuRoot,
|
||||
$selected = menuRoot.find('> li .checked');
|
||||
|
|
|
@ -147,8 +147,13 @@ define([
|
|||
el.on('input', '.form-control', _.bind(this.onInput, this));
|
||||
if (!this.options.allowDecimal)
|
||||
el.on('keypress', '.form-control', _.bind(this.onKeyPress, this));
|
||||
el.on('focus', 'input.form-control', function() {
|
||||
setTimeout(function(){me.$input && me.$input.select();}, 1);
|
||||
el.on('focus', 'input.form-control', function(e) {
|
||||
setTimeout(function(){
|
||||
if (me.$input) {
|
||||
me.$input[0].selectionStart = 0;
|
||||
me.$input[0].selectionEnd = me.$input.val().length;
|
||||
}
|
||||
}, 1);
|
||||
});
|
||||
Common.Utils.isGecko && el.on('blur', 'input.form-control', function() {
|
||||
setTimeout(function(){
|
||||
|
|
|
@ -120,6 +120,7 @@ define([
|
|||
Common.NotificationCenter.on('tab:visible', _.bind(function(action, visible){
|
||||
this.setVisible(action, visible);
|
||||
}, this));
|
||||
Common.NotificationCenter.on('tab:resize', _.bind(this.onResizeTabs, this));
|
||||
},
|
||||
|
||||
afterRender: function() {
|
||||
|
@ -229,7 +230,7 @@ define([
|
|||
// optsFold.timer = setTimeout(this.collapse, optsFold.timeout);
|
||||
},
|
||||
|
||||
onResize: function(e) {
|
||||
onResizeTabs: function(e) {
|
||||
if ( this.hasTabInvisible() ) {
|
||||
if ( !$boxTabs.parent().hasClass('short') )
|
||||
$boxTabs.parent().addClass('short');
|
||||
|
@ -237,6 +238,10 @@ define([
|
|||
if ( $boxTabs.parent().hasClass('short') ) {
|
||||
$boxTabs.parent().removeClass('short');
|
||||
}
|
||||
},
|
||||
|
||||
onResize: function(e) {
|
||||
this.onResizeTabs();
|
||||
this.hideMoreBtns();
|
||||
this.processPanelVisible();
|
||||
},
|
||||
|
|
|
@ -157,7 +157,7 @@ define([
|
|||
|
||||
setRawValue: function(value) {
|
||||
var value = (value === true || value === 'true' || value === '1' || value === 1 );
|
||||
$('input[type=radio][name=' + this.name + ']').removeClass('checked');
|
||||
value && $('input[type=radio][name=' + this.name + ']').removeClass('checked');
|
||||
this.$radio.toggleClass('checked', value);
|
||||
this.$radio.prop('checked', value);
|
||||
},
|
||||
|
|
|
@ -513,10 +513,10 @@ define([
|
|||
},
|
||||
|
||||
setTabVisible: function(index, suppress) {
|
||||
if (index <= 0 || index == 'first') {
|
||||
if (index <= 0) {
|
||||
this.$bar.scrollLeft(0);
|
||||
this.checkInvisible(suppress);
|
||||
} else if ( index >= (this.tabs.length - 1) || index == 'last') {
|
||||
} else if ( index >= (this.tabs.length - 1)) {
|
||||
var tab = this.tabs[this.tabs.length-1].$el;
|
||||
if (this.$bar.find('.separator-item').length === 0) {
|
||||
this.$bar.append('<li class="separator-item"><span></span></li>');
|
||||
|
|
|
@ -52,7 +52,9 @@ define([
|
|||
dynamiccolors: 10,
|
||||
standardcolors: 10,
|
||||
themecolors: 10,
|
||||
columns: 10,
|
||||
effects: 5,
|
||||
hideEmptyColors: true,
|
||||
allowReselect: true,
|
||||
transparent: false,
|
||||
value: '000000',
|
||||
|
@ -62,7 +64,7 @@ define([
|
|||
|
||||
template :
|
||||
_.template(
|
||||
'<div style="padding: 8px 12px 12px;">' +
|
||||
'<div style="padding: 4px 0 0 12px;">' +
|
||||
'<% var me = this; var idx = 0; %>' +
|
||||
'<% $(colors).each(function(num, item) { %>' +
|
||||
'<% if (me.isBlankSeparator(item)) { %> <div class="palette-color-spacer" style="width:100%;height:8px;float:left;"></div>' +
|
||||
|
@ -76,6 +78,9 @@ define([
|
|||
'<em><span unselectable="on"> </span></em>' +
|
||||
'</a>' +
|
||||
'<% } else if (me.isEffect(item)) { %>' +
|
||||
'<% if (idx>0 && me.columns>0 && idx%me.columns===0) { %> ' +
|
||||
'<div style="width:100%;height:0;float:left;"></div>' +
|
||||
'<% } %>' +
|
||||
'<a effectid="<%=item.effectId%>" effectvalue="<%=item.effectValue%>" class="palette-color-effect color-<%=item.color%>" style="background:#<%=item.color%>" idx="<%=idx++%>">' +
|
||||
'<em><span style="background:#<%=item.color%>;" unselectable="on"> </span></em>' +
|
||||
'</a>' +
|
||||
|
@ -85,9 +90,11 @@ define([
|
|||
'<% }); %>' +
|
||||
'</div>' +
|
||||
'<% if (me.options.dynamiccolors!==undefined) { %>' +
|
||||
'<div class="palette-color-spacer" style="width:100%;height:8px;float:left;"></div><div style="padding: 12px;">' +
|
||||
'<div class="palette-color-dynamiccolors" style="padding: 4px 0 0 12px">' +
|
||||
'<div class="palette-color-spacer" style="width:100%;height:8px;float:left;"></div>' +
|
||||
'<div class="palette-color-caption" style="width:100%;float:left;font-size: 11px;"><%=me.textRecentColors%></div>' +
|
||||
'<% for (var i=0; i<me.options.dynamiccolors; i++) { %>' +
|
||||
'<a class="color-dynamic-<%=i%> dynamic-empty-color" color="" idx="<%=idx++%>">' +
|
||||
'<a class="color-dynamic-<%=i%> dynamic-empty-color <%= me.emptyColorsClass %>" color="" idx="<%=idx++%>">' +
|
||||
'<em><span unselectable="on"> </span></em></a>' +
|
||||
'<% } %>' +
|
||||
'<% } %>' +
|
||||
|
@ -103,10 +110,12 @@ define([
|
|||
el = me.$el || $(this.el);
|
||||
|
||||
this.colors = me.options.colors || this.generateColorData(me.options.themecolors, me.options.effects, me.options.standardcolors, me.options.transparent);
|
||||
this.columns = me.options.columns || 0;
|
||||
this.enableKeyEvents= me.options.enableKeyEvents;
|
||||
this.tabindex = me.options.tabindex || 0;
|
||||
this.outerMenu = me.options.outerMenu;
|
||||
this.lastSelectedIdx = -1;
|
||||
this.emptyColorsClass = me.options.hideEmptyColors ? 'hidden' : '';
|
||||
|
||||
me.colorItems = [];
|
||||
if (me.options.keyMoveDirection=='vertical')
|
||||
|
@ -123,6 +132,15 @@ define([
|
|||
this.updateColors(this.options.updateColorsArr[0], this.options.updateColorsArr[1]);
|
||||
if (this.options.value)
|
||||
this.select(this.options.value, true);
|
||||
if (this.options.outerMenu && this.options.outerMenu.focusOnShow && this.options.outerMenu.menu) {
|
||||
el.addClass('focused');
|
||||
this.options.outerMenu.menu.on('show:after', function(menu) {
|
||||
_.delay(function() {
|
||||
me.showLastSelected();
|
||||
me.focus();
|
||||
}, 10);
|
||||
});
|
||||
}
|
||||
this.updateCustomColors();
|
||||
el.closest('.btn-group').on('show.bs.dropdown', _.bind(this.updateCustomColors, this));
|
||||
el.closest('.dropdown-submenu').on('show.bs.dropdown', _.bind(this.updateCustomColors, this));
|
||||
|
@ -171,15 +189,19 @@ define([
|
|||
if (color) { // custom color was selected
|
||||
color = color.toUpperCase();
|
||||
selected.removeClass(this.selectedCls);
|
||||
this.lastSelectedIdx = -1;
|
||||
}
|
||||
|
||||
var colors = Common.localStorage.getItem('asc.'+Common.localStorage.getId()+'.colors.custom');
|
||||
colors = colors ? colors.split(',') : [];
|
||||
|
||||
var i = -1, colorEl, c = colors.length < this.options.dynamiccolors ? colors.length : this.options.dynamiccolors;
|
||||
if (this.options.hideEmptyColors && this._layoutParams && el.find('.dynamic-empty-color').length !== (this.options.dynamiccolors - c)) {// recalc indexed if change custom colors
|
||||
this._layoutParams = undefined;
|
||||
}
|
||||
while (++i < c) {
|
||||
colorEl = el.find('.color-dynamic-'+ i);
|
||||
colorEl.removeClass('dynamic-empty-color').attr('color', colors[i]);
|
||||
colorEl.removeClass('dynamic-empty-color').removeClass(this.emptyColorsClass).attr('color', colors[i]);
|
||||
colorEl.find('span').css({
|
||||
'background-color': '#'+colors[i]
|
||||
});
|
||||
|
@ -189,6 +211,16 @@ define([
|
|||
color = undefined; //select only first found color
|
||||
}
|
||||
}
|
||||
while (i < this.options.dynamiccolors) {
|
||||
colorEl = el.find('.color-dynamic-'+ i);
|
||||
colorEl.removeAttr('color');
|
||||
colorEl.addClass('dynamic-empty-color').addClass(this.emptyColorsClass);
|
||||
colorEl.find('span').css({
|
||||
'background-color': 'transparent'
|
||||
});
|
||||
i++;
|
||||
}
|
||||
el.find('.palette-color-dynamiccolors').toggleClass(this.emptyColorsClass, c===0);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -197,7 +229,7 @@ define([
|
|||
var target = $(e.target).closest('a');
|
||||
var color, cmp;
|
||||
|
||||
if (target.length==0) return;
|
||||
if (target.length==0) return false;
|
||||
|
||||
if (target.hasClass('color-transparent') ) {
|
||||
me.clearSelection(true);
|
||||
|
@ -265,12 +297,16 @@ define([
|
|||
if (child.length==0) {
|
||||
this.updateCustomColors();
|
||||
child = el.find('.color-dynamic-' + (this.options.dynamiccolors - 1));
|
||||
} else {
|
||||
if (this.options.hideEmptyColors && this._layoutParams) // recalc indexed
|
||||
this._layoutParams = undefined;
|
||||
}
|
||||
|
||||
child.first().removeClass('dynamic-empty-color').addClass(this.selectedCls).attr('color', color[1]);
|
||||
child.first().removeClass('dynamic-empty-color').removeClass(this.emptyColorsClass).addClass(this.selectedCls).attr('color', color[1]);
|
||||
child.first().find('span').css({
|
||||
'background-color': '#'+color[1]
|
||||
});
|
||||
el.find('.palette-color-dynamiccolors').removeClass(this.emptyColorsClass);
|
||||
this.select(color[1], true);
|
||||
}
|
||||
},
|
||||
|
@ -483,7 +519,7 @@ define([
|
|||
var arr = [],
|
||||
len = (themecolors>0 && effects>0) ? themecolors * effects : 0;
|
||||
if (themecolors>0) {
|
||||
arr = [this.textThemeColors, '-'];
|
||||
arr = [this.textThemeColors];
|
||||
for (var i=0; i<themecolors; i++)
|
||||
arr.push({color: 'FFFFFF', effectId: 1});
|
||||
|
||||
|
@ -492,10 +528,10 @@ define([
|
|||
arr.push({color: 'FFFFFF', effectId: 1});
|
||||
|
||||
if (standardcolors)
|
||||
arr.push('-', '--', '-');
|
||||
arr.push('-');
|
||||
}
|
||||
if (standardcolors) {
|
||||
arr.push(this.textStandartColors, '-');
|
||||
arr.push(this.textStandartColors);
|
||||
if (transparent) {
|
||||
arr.push('transparent');
|
||||
standardcolors--;
|
||||
|
@ -503,8 +539,6 @@ define([
|
|||
for (var i=0; i<standardcolors; i++)
|
||||
arr.push('FFFFFF');
|
||||
}
|
||||
if (this.options.dynamiccolors && (themecolors || standardcolors))
|
||||
arr.push('-', '--');
|
||||
return arr;
|
||||
},
|
||||
|
||||
|
@ -640,6 +674,7 @@ define([
|
|||
},
|
||||
|
||||
textThemeColors : 'Theme Colors',
|
||||
textStandartColors : 'Standart Colors'
|
||||
textStandartColors : 'Standard Colors',
|
||||
textRecentColors : 'Recent Colors'
|
||||
}, Common.UI.ThemeColorPalette || {}));
|
||||
});
|
|
@ -104,12 +104,17 @@
|
|||
offset : opts.offset,
|
||||
cls : opts.cls,
|
||||
html : opts.html,
|
||||
hideonclick : opts.hideonclick
|
||||
hideonclick : opts.hideonclick,
|
||||
keepvisible: opts.keepvisible
|
||||
});
|
||||
|
||||
if (opts.hideonclick) {
|
||||
var me = this;
|
||||
var tip = this.$element.data('bs.tooltip');
|
||||
if (tip) tip.tip().on('click', function() {tip.hide();});
|
||||
if (tip) tip.tip().on('click', function() {
|
||||
tip.hide();
|
||||
me.trigger('tooltip:hideonclick', this);
|
||||
});
|
||||
}
|
||||
|
||||
this.$element.on('shown.bs.tooltip', _.bind(this.onTipShown, this));
|
||||
|
|
|
@ -60,10 +60,12 @@ define([
|
|||
'btn-save-coauth': 'coauth',
|
||||
'btn-synch': 'synch' };
|
||||
|
||||
var is_win_xp = window.RendererProcessVariable && window.RendererProcessVariable.os === 'winxp';
|
||||
var nativevars;
|
||||
|
||||
if ( !!native ) {
|
||||
native.features = native.features || {};
|
||||
nativevars = window.RendererProcessVariable;
|
||||
|
||||
window.on_native_message = function (cmd, param) {
|
||||
if (/^style:change/.test(cmd)) {
|
||||
var obj = JSON.parse(param);
|
||||
|
@ -137,6 +139,10 @@ define([
|
|||
if (!!_mr[1]) $('#app-title').show();
|
||||
else if (!!_mr[2]) $('#app-title').hide();
|
||||
}
|
||||
} else
|
||||
if (/althints:show/.test(cmd)) {
|
||||
if ( /false|hide/.test(param) )
|
||||
Common.NotificationCenter.trigger('hints:clear');
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -187,11 +193,24 @@ define([
|
|||
}
|
||||
};
|
||||
|
||||
var _onHintsShow = function (visible, level) {
|
||||
native.execCommand('althints:show', JSON.stringify(visible && !(level > 0)));
|
||||
}
|
||||
|
||||
var _onKeyDown = function (e) {
|
||||
if ( Common.UI.HintManager.isHintVisible() ) {
|
||||
native.execCommand('althints:keydown', JSON.stringify({code:e.keyCode}));
|
||||
console.log('hint keydown', e.keyCode);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
init: function (opts) {
|
||||
_.extend(config, opts);
|
||||
|
||||
if ( config.isDesktopApp ) {
|
||||
let is_win_xp = nativevars && nativevars.os === 'winxp';
|
||||
|
||||
Common.UI.Themes.setAvailable(!is_win_xp);
|
||||
Common.NotificationCenter.on('app:ready', function (opts) {
|
||||
_.extend(config, opts);
|
||||
|
@ -256,12 +275,13 @@ define([
|
|||
|
||||
Common.NotificationCenter.on({
|
||||
'modal:show': _onModalDialog.bind(this, 'open'),
|
||||
'modal:close': _onModalDialog.bind(this, 'close')
|
||||
, 'uitheme:changed' : function (name) {
|
||||
'modal:close': _onModalDialog.bind(this, 'close'),
|
||||
'uitheme:changed' : function (name) {
|
||||
var theme = Common.UI.Themes.get(name);
|
||||
if ( theme )
|
||||
native.execCommand("uitheme:changed", JSON.stringify({name:name, type:theme.type}));
|
||||
}
|
||||
},
|
||||
'hints:show': _onHintsShow.bind(this),
|
||||
});
|
||||
|
||||
webapp.addListeners({
|
||||
|
@ -278,6 +298,8 @@ define([
|
|||
},
|
||||
},
|
||||
}, {id: 'desktop'});
|
||||
|
||||
$(document).on('keydown', _onKeyDown.bind(this));
|
||||
}
|
||||
},
|
||||
process: function (opts) {
|
||||
|
@ -313,6 +335,25 @@ define([
|
|||
// return webapp.getController('Main').api.asc_isOffline();
|
||||
return webapp.getController('Main').appOptions.isOffline;
|
||||
},
|
||||
isFeatureAvailable: function (feature) {
|
||||
return !!native && !!native[feature];
|
||||
},
|
||||
call: function (name) {
|
||||
if ( native[name] ) {
|
||||
let args = [].slice.call(arguments, 1);
|
||||
// return native[name](...args);
|
||||
return native[name].apply(this, args);
|
||||
}
|
||||
},
|
||||
helpUrl: function () {
|
||||
if ( !!nativevars && nativevars.helpUrl ) {
|
||||
var webapp = window.SSE ? 'spreadsheeteditor' :
|
||||
window.PE ? 'presentationeditor' : 'documenteditor';
|
||||
return nativevars.helpUrl + webapp + '/main/resources/help';
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -117,7 +117,8 @@ Common.UI.HintManager = new(function() {
|
|||
_inputTimer,
|
||||
_isDocReady = false,
|
||||
_isEditDiagram = false,
|
||||
_usedTitles = [];
|
||||
_usedTitles = [],
|
||||
_appPrefix;
|
||||
|
||||
var _api;
|
||||
|
||||
|
@ -133,7 +134,7 @@ Common.UI.HintManager = new(function() {
|
|||
return;
|
||||
}
|
||||
if (_isEditDiagram) {
|
||||
_currentSection = [$(window.parent.document).find('.advanced-settings-dlg')[0], window.document];
|
||||
_currentSection = [$(window.parent.document).find('.advanced-settings-dlg:visible')[0], window.document];
|
||||
} else if ($('#file-menu-panel').is(':visible')) {
|
||||
_currentSection = $('#file-menu-panel');
|
||||
} else {
|
||||
|
@ -170,6 +171,8 @@ Common.UI.HintManager = new(function() {
|
|||
} else {
|
||||
_hintVisible = false;
|
||||
}
|
||||
|
||||
Common.NotificationCenter.trigger('hints:show', _hintVisible, _currentLevel);
|
||||
};
|
||||
|
||||
var _hideHints = function() {
|
||||
|
@ -178,6 +181,8 @@ Common.UI.HintManager = new(function() {
|
|||
item.remove()
|
||||
});
|
||||
clearInterval(_inputTimer);
|
||||
|
||||
Common.NotificationCenter.trigger('hints:show', false);
|
||||
};
|
||||
|
||||
var _nextLevel = function(level) {
|
||||
|
@ -436,6 +441,10 @@ Common.UI.HintManager = new(function() {
|
|||
|
||||
var _init = function(api) {
|
||||
_api = api;
|
||||
|
||||
var filter = Common.localStorage.getKeysFilter();
|
||||
_appPrefix = (filter && filter.length) ? filter.split(',')[0] : '';
|
||||
|
||||
Common.NotificationCenter.on({
|
||||
'app:ready': function (mode) {
|
||||
var lang = mode.lang ? mode.lang.toLowerCase() : 'en';
|
||||
|
@ -559,7 +568,7 @@ Common.UI.HintManager = new(function() {
|
|||
if (curr.prop('id') === 'btn-goback' || curr.closest('.btn-slot').prop('id') === 'slot-btn-options' ||
|
||||
curr.closest('.btn-slot').prop('id') === 'slot-btn-mode' || curr.prop('id') === 'btn-favorite' || curr.parent().prop('id') === 'tlb-box-users' ||
|
||||
curr.prop('id') === 'left-btn-thumbs' || curr.hasClass('scroll') || curr.prop('id') === 'left-btn-about' ||
|
||||
curr.prop('id') === 'left-btn-support') {
|
||||
curr.prop('id') === 'left-btn-support' || curr.closest('.btn-slot').prop('id') === 'slot-btn-search') {
|
||||
_resetToDefault();
|
||||
return;
|
||||
}
|
||||
|
@ -594,7 +603,7 @@ Common.UI.HintManager = new(function() {
|
|||
}
|
||||
}
|
||||
|
||||
_needShow = (!e.shiftKey && e.keyCode == Common.UI.Keys.ALT && !Common.Utils.ModalWindow.isVisible() && _isDocReady && _arrAlphabet.length > 0);
|
||||
_needShow = (Common.Utils.InternalSettings.get(_appPrefix + "settings-use-alt-key") && !e.shiftKey && e.keyCode == Common.UI.Keys.ALT && !Common.Utils.ModalWindow.isVisible() && _isDocReady && _arrAlphabet.length > 0);
|
||||
if (e.altKey && e.keyCode !== 115) {
|
||||
e.preventDefault();
|
||||
}
|
||||
|
|
|
@ -287,6 +287,9 @@ define([
|
|||
this.popover = Common.Views.ReviewPopover.prototype.getPopover({
|
||||
reviewStore : this.popoverChanges,
|
||||
renderTo : this.sdkViewName,
|
||||
canRequestUsers: (this.appConfig) ? this.appConfig.canRequestUsers : undefined,
|
||||
canRequestSendNotify: (this.appConfig) ? this.appConfig.canRequestSendNotify : undefined,
|
||||
mentionShare: (this.appConfig) ? this.appConfig.mentionShare : true,
|
||||
api: this.api
|
||||
});
|
||||
this.popover.setReviewStore(this.popoverChanges);
|
||||
|
@ -610,7 +613,8 @@ define([
|
|||
this.view.turnChanges(state, global);
|
||||
if (userId && this.userCollection) {
|
||||
var rec = this.userCollection.findOriginalUser(userId);
|
||||
rec && this.showTips(Common.Utils.String.format(globalFlag ? this.textOnGlobal : this.textOffGlobal, AscCommon.UserInfoParser.getParsedName(rec.get('username'))));
|
||||
rec && Common.NotificationCenter.trigger('showmessage', {msg: Common.Utils.String.format(globalFlag ? this.textOnGlobal : this.textOffGlobal, AscCommon.UserInfoParser.getParsedName(rec.get('username')))},
|
||||
{timeout: 5000, hideCloseTip: true});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -900,41 +904,6 @@ define([
|
|||
me.appConfig.reviewHoverMode = val;
|
||||
},
|
||||
|
||||
showTips: function(strings) {
|
||||
var me = this;
|
||||
if (!strings.length) return;
|
||||
if (typeof(strings)!='object') strings = [strings];
|
||||
|
||||
function showNextTip() {
|
||||
var str_tip = strings.shift();
|
||||
if (str_tip) {
|
||||
me.tooltip.setTitle(str_tip);
|
||||
me.tooltip.show();
|
||||
me.tipTimeout = setTimeout(function () {
|
||||
me.tooltip.hide();
|
||||
}, 5000);
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.tooltip) {
|
||||
this.tooltip = new Common.UI.Tooltip({
|
||||
owner: this.getApplication().getController('Toolbar').getView(),
|
||||
hideonclick: true,
|
||||
placement: 'bottom',
|
||||
cls: 'main-info',
|
||||
offset: 30
|
||||
});
|
||||
this.tooltip.on('tooltip:hide', function(cmp){
|
||||
if (cmp==me.tooltip) {
|
||||
clearTimeout(me.tipTimeout);
|
||||
setTimeout(showNextTip, 300);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
showNextTip();
|
||||
},
|
||||
|
||||
applySettings: function(menu) {
|
||||
this.view && this.view.turnSpelling( Common.localStorage.getBool(this.view.appPrefix + "settings-spellcheck", true) );
|
||||
this.view && this.view.turnCoAuthMode( Common.localStorage.getBool(this.view.appPrefix + "settings-coauthmode", true) );
|
||||
|
|
|
@ -17,7 +17,7 @@ define([
|
|||
const THEME_TYPE_SYSTEM = 'system';
|
||||
var themes_map = {
|
||||
'theme-system': {
|
||||
text: locale.txtThemeSystem || 'Auto',
|
||||
text: locale.txtThemeSystem || 'Same as system',
|
||||
type: THEME_TYPE_SYSTEM,
|
||||
source: 'static',
|
||||
},
|
||||
|
@ -39,7 +39,8 @@ define([
|
|||
}
|
||||
|
||||
if ( !!window.currentLoaderTheme ) {
|
||||
themes_map[currentLoaderTheme.id] = {};
|
||||
if ( !themes_map[currentLoaderTheme.id] )
|
||||
themes_map[currentLoaderTheme.id] = currentLoaderTheme;
|
||||
window.currentLoaderTheme = undefined;
|
||||
}
|
||||
|
||||
|
@ -208,6 +209,8 @@ define([
|
|||
themes_map[obj.id] = {text: theme_label, type: obj.type};
|
||||
write_theme_css( create_colors_css(obj.id, obj.colors) );
|
||||
}
|
||||
|
||||
Common.NotificationCenter.trigger('uitheme:countchanged');
|
||||
}
|
||||
|
||||
var get_themes_config = function (url) {
|
||||
|
@ -270,9 +273,9 @@ define([
|
|||
}
|
||||
};
|
||||
|
||||
const is_theme_type_system = id => themes_map[id].type == THEME_TYPE_SYSTEM;
|
||||
const get_system_theme_type = () => window.matchMedia('(prefers-color-scheme: dark)').matches ? THEME_TYPE_DARK : THEME_TYPE_LIGHT;
|
||||
const get_system_default_theme = () => {
|
||||
const is_theme_type_system = function (id) { return themes_map[id].type == THEME_TYPE_SYSTEM; }
|
||||
const get_system_theme_type = function () { return window.matchMedia('(prefers-color-scheme: dark)').matches ? THEME_TYPE_DARK : THEME_TYPE_LIGHT; }
|
||||
const get_system_default_theme = function () {
|
||||
const id = get_system_theme_type() == THEME_TYPE_DARK ?
|
||||
id_default_dark_theme : id_default_light_theme;
|
||||
|
||||
|
@ -337,6 +340,7 @@ define([
|
|||
obj.name = theme_name;
|
||||
api.asc_setSkin(obj);
|
||||
|
||||
if ( !(Common.Utils.isIE10 || Common.Utils.isIE11) )
|
||||
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', on_system_theme_dark.bind(this));
|
||||
Common.NotificationCenter.on('document:ready', on_document_ready.bind(this));
|
||||
},
|
||||
|
@ -445,6 +449,7 @@ define([
|
|||
var theme_obj = {
|
||||
id: id,
|
||||
type: obj.type,
|
||||
text: themes_map[id].text,
|
||||
};
|
||||
|
||||
if ( themes_map[id].source != 'static' ) {
|
||||
|
|
|
@ -36,7 +36,8 @@
|
|||
return _MAP[x] || x.toUpperCase().charCodeAt(0);
|
||||
},
|
||||
_downKeys = [];
|
||||
var locked;
|
||||
var locked,
|
||||
propagate;
|
||||
|
||||
for(k=1;k<20;k++) _MAP['f'+k] = 111+k;
|
||||
|
||||
|
@ -116,6 +117,8 @@
|
|||
// call the handler and stop the event if neccessary
|
||||
if((handler.mods.length == 0 && !_mods[16] && !_mods[18] && !_mods[17] && !_mods[91]) || modifiersMatch){
|
||||
if(locked===true || handler.locked || handler.method(event, handler)===false){
|
||||
if (locked===true && propagate || handler.locked && handler.propagate)
|
||||
continue;
|
||||
if(event.preventDefault) event.preventDefault();
|
||||
else event.returnValue = false;
|
||||
if(event.stopPropagation) event.stopPropagation();
|
||||
|
@ -188,8 +191,8 @@
|
|||
|
||||
if (keys.length > 1) {
|
||||
mods = getMods(keys);
|
||||
key = keys[keys.length - 1];
|
||||
}
|
||||
(keys.length > 0) && (key = keys[keys.length - 1]);
|
||||
|
||||
key = code(key);
|
||||
|
||||
|
@ -301,8 +304,8 @@
|
|||
|
||||
if (keys.length > 1) {
|
||||
mods = getMods(keys);
|
||||
key = keys[keys.length - 1];
|
||||
}
|
||||
(keys.length > 0) && (key = keys[keys.length - 1]);
|
||||
|
||||
key = code(key);
|
||||
|
||||
|
@ -320,12 +323,23 @@
|
|||
}
|
||||
}
|
||||
|
||||
function suspend(key, scope) {
|
||||
key ? setKeyOptions(key, scope, 'locked', true) : (locked = true);
|
||||
function suspend(key, scope, pass) {
|
||||
if (key) {
|
||||
setKeyOptions(key, scope, 'locked', true)
|
||||
pass && setKeyOptions(key, scope, 'propagate', true)
|
||||
} else {
|
||||
locked = true;
|
||||
pass && (propagate = true);
|
||||
}
|
||||
}
|
||||
|
||||
function resume(key, scope) {
|
||||
key ? setKeyOptions(key, scope, 'locked', false) : (locked = false);
|
||||
if (key) {
|
||||
setKeyOptions(key, scope, 'locked', false)
|
||||
setKeyOptions(key, scope, 'propagate', false)
|
||||
} else {
|
||||
locked = propagate = false;
|
||||
}
|
||||
}
|
||||
|
||||
// set window.key and window.key.set/get/deleteScope, and the default filter
|
||||
|
|
|
@ -128,8 +128,9 @@ function patchDropDownKeyDown(e) {
|
|||
var mnu = $('> [role=menu]', li),
|
||||
$subitems = mnu.find('> li:not(.divider):not(.disabled):visible > a'),
|
||||
$dataviews = mnu.find('> li:not(.divider):not(.disabled):visible .dataview'),
|
||||
$palette = mnu.find('> li:not(.divider):not(.disabled):visible .theme-colorpalette.focused'),
|
||||
$internal_menu = mnu.find('> li:not(.divider):not(.disabled):visible ul.internal-menu');
|
||||
if ($subitems.length>0 && $dataviews.length<1 && $internal_menu.length<1)
|
||||
if ($subitems.length>0 && $dataviews.length<1 && $internal_menu.length<1 && $palette.length<1)
|
||||
($subitems.index($subitems.filter(':focus'))<0) && $subitems.eq(0).focus();
|
||||
}, 250);
|
||||
}
|
||||
|
|
63
apps/common/main/lib/template/SearchPanel.template
Normal file
|
@ -0,0 +1,63 @@
|
|||
<div id="search-box" class="layout-ct vbox search-panel">
|
||||
<div id="search-header">
|
||||
<label id="search-adv-title"></label>
|
||||
<div id="search-btn-close"></div>
|
||||
</div>
|
||||
<div id="search-adv-settings">
|
||||
<table cols="1">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="padding-small"><div id="search-adv-text"></div></td>
|
||||
</tr>
|
||||
<tr class="edit-setting">
|
||||
<td class="padding-large"><div id="search-adv-replace-text"></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="padding-large">
|
||||
<label id="search-adv-results-number" style="display: inline-block;">
|
||||
<%= scope.textSearchResults %>
|
||||
</label>
|
||||
<div class="search-nav-btns" style="display: inline-block; float: right;">
|
||||
<div id="search-adv-back" style="display: inline-block; margin-right: 4px;"></div>
|
||||
<div id="search-adv-next" style="display: inline-block;"></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="edit-setting">
|
||||
<td class="padding-large">
|
||||
<button type="button" class="btn btn-text-default" id="search-adv-replace" style="display: inline-block; min-width: 62px;" data-hint="1" data-hint-direction="bottom" data-hint-offset="big"><%= scope.textReplace %></button>
|
||||
<button type="button" class="btn btn-text-default" id="search-adv-replace-all" style="display: inline-block; min-width: 78px;" data-hint="1" data-hint-direction="bottom" data-hint-offset="big"><%= scope.textReplaceAll %></button>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="search-options-block">
|
||||
<td class="padding-large">
|
||||
<div id="open-search-options" data-hint="1" data-hint-direction="left" data-hint-offset="0, -15">
|
||||
<div class="search-options-caret img-commonctrl"></div>
|
||||
<div class="search-options-txt"><%= scope.textSearchOptions %></div>
|
||||
</div>
|
||||
<div id="search-options">
|
||||
<label class="input-label"><%= scope.textWithin %></label>
|
||||
<div id="search-adv-cmb-within"></div>
|
||||
<div id="search-adv-select-range"></div>
|
||||
<label class="input-label"><%= scope.textSearch %></label>
|
||||
<div id="search-adv-cmb-search"></div>
|
||||
<label class="input-label"><%= scope.textLookIn %></label>
|
||||
<div id="search-adv-cmb-look-in"></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="padding-small"><div id="search-adv-case-sensitive"></div></td>
|
||||
</tr>
|
||||
<!---<tr>
|
||||
<td class="padding-small"><div id="search-adv-use-regexp"></div></td>
|
||||
</tr>-->
|
||||
<tr>
|
||||
<td class="padding-large"><div id="search-adv-match-word"></div></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="search-results" class="ps-container oo">
|
||||
</div>
|
||||
</div>
|
|
@ -148,8 +148,8 @@ Common.util = Common.util||{};
|
|||
}
|
||||
},
|
||||
|
||||
suspendEvents: function(key,scope) {
|
||||
window.key.suspend(key,scope);
|
||||
suspendEvents: function(key,scope,propagate) {
|
||||
window.key.suspend(key,scope,propagate);
|
||||
},
|
||||
|
||||
resumeEvents: function(key,scope) {
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
|
||||
var me = this;
|
||||
Common.NotificationCenter.on({'layout:changed': function(e){
|
||||
if (!me.options.hideonclick && me.tip().is(':visible'))
|
||||
if (!me.options.keepvisible && !me.options.hideonclick && me.tip().is(':visible'))
|
||||
me.hide();
|
||||
}});
|
||||
},
|
||||
|
|
|
@ -126,6 +126,12 @@ define([
|
|||
'<a href="mailto:" id="id-about-company-mail"></a>',
|
||||
'</td>',
|
||||
'</tr>',
|
||||
'<tr>',
|
||||
'<td align="center" class="padding-small">',
|
||||
'<label class="asc-about-desc-name">' + this.txtTel + '</label>',
|
||||
'<label class="asc-about-desc" id="id-about-company-tel"></label>',
|
||||
'</td>',
|
||||
'</tr>',
|
||||
'<tr>',
|
||||
'<td align="center" class="padding-small">',
|
||||
'<a href="" target="_blank" id="id-about-company-url"></a>',
|
||||
|
@ -177,6 +183,7 @@ define([
|
|||
this.lblCompanyMail = _$l.findById('#id-about-company-mail');
|
||||
this.lblCompanyUrl = _$l.findById('#id-about-company-url');
|
||||
this.lblCompanyLic = _$l.findById('#id-about-company-lic');
|
||||
this.lblCompanyTel = _$l.findById('#id-about-company-tel');
|
||||
|
||||
this.$el.html(_$l);
|
||||
this.$el.addClass('about-dlg');
|
||||
|
@ -224,6 +231,11 @@ define([
|
|||
this.lblCompanyMail.attr('href', "mailto:"+value).text(value) :
|
||||
this.lblCompanyMail.parents('tr').addClass('hidden');
|
||||
|
||||
value = customer.phone;
|
||||
value && value.length ?
|
||||
this.lblCompanyTel.text(value) :
|
||||
this.lblCompanyTel.parents('tr').addClass('hidden');
|
||||
|
||||
if ((value = customer.www) && value.length) {
|
||||
var http = !/^https?:\/{2}/i.test(value) ? "http:\/\/" : '';
|
||||
this.lblCompanyUrl.attr('href', http+value).text(value);
|
||||
|
|
|
@ -52,7 +52,7 @@ define([
|
|||
|
||||
Common.Views.Header = Backbone.View.extend(_.extend(function(){
|
||||
var storeUsers, appConfig;
|
||||
var $userList, $panelUsers, $btnUsers, $btnUserName;
|
||||
var $userList, $panelUsers, $btnUsers, $btnUserName, $labelDocName;
|
||||
var _readonlyRights = false;
|
||||
|
||||
var templateUserItem =
|
||||
|
@ -105,6 +105,7 @@ define([
|
|||
'<div class="btn-slot" id="slot-btn-mode"></div>' +
|
||||
'<div class="btn-slot" id="slot-btn-back"></div>' +
|
||||
'<div class="btn-slot" id="slot-btn-favorite"></div>' +
|
||||
'<div class="btn-slot" id="slot-btn-search"></div>' +
|
||||
'</div>' +
|
||||
'<div class="hedset">' +
|
||||
// '<div class="btn-slot slot-btn-user-name"></div>' +
|
||||
|
@ -186,11 +187,13 @@ define([
|
|||
} else {
|
||||
$panelUsers['hide']();
|
||||
}
|
||||
updateDocNamePosition(appConfig);
|
||||
}
|
||||
|
||||
function onLostEditRights() {
|
||||
_readonlyRights = true;
|
||||
this.btnShare && this.btnShare.setVisible(false);
|
||||
updateDocNamePosition(appConfig);
|
||||
}
|
||||
|
||||
function onUsersClick(e) {
|
||||
|
@ -203,28 +206,59 @@ define([
|
|||
}
|
||||
}
|
||||
|
||||
function onAppShowed(config) {
|
||||
//config.isCrypted =true; //delete fore merge!
|
||||
if ( this.labelDocName ) {
|
||||
if ( config.isCrypted ) {
|
||||
this.labelDocName.attr({'style':'text-align: left;'});
|
||||
this.labelDocName.before(
|
||||
'<div class="inner-box-icon crypted">' +
|
||||
'<svg class="icon"><use xlink:href="#svg-icon-crypted"></use></svg>' +
|
||||
'</div>');
|
||||
this.imgCrypted = this.labelDocName.parent().find('.crypted');
|
||||
}
|
||||
|
||||
if (!config.isEdit || !config.customization || !config.customization.compactHeader) {
|
||||
var $parent = this.labelDocName.parent();
|
||||
function updateDocNamePosition(config) {
|
||||
if ( $labelDocName && config) {
|
||||
var $parent = $labelDocName.parent();
|
||||
if (!config.isEdit) {
|
||||
var _left_width = $parent.position().left,
|
||||
_right_width = $parent.next().outerWidth();
|
||||
|
||||
if ( _left_width < _right_width )
|
||||
this.labelDocName.parent().css('padding-left', _right_width - _left_width);
|
||||
else this.labelDocName.parent().css('padding-right', _left_width - _right_width);
|
||||
$parent.css('padding-left', _left_width < _right_width ? Math.max(2, _right_width - _left_width) : 2);
|
||||
$parent.css('padding-right', _left_width < _right_width ? 2 : Math.max(2, _left_width - _right_width));
|
||||
} else if (!(config.customization && config.customization.compactHeader)) {
|
||||
var _left_width = $parent.position().left,
|
||||
_right_width = $parent.next().outerWidth(),
|
||||
outerWidth = $labelDocName.outerWidth(),
|
||||
cssWidth = $labelDocName[0].style.width;
|
||||
cssWidth = cssWidth ? parseFloat(cssWidth) : outerWidth;
|
||||
if (cssWidth - outerWidth > 0.1) {
|
||||
$parent.css('padding-left', _left_width < _right_width ? Math.max(2, $parent.outerWidth() - 2 - cssWidth) : 2);
|
||||
$parent.css('padding-right', _left_width < _right_width ? 2 : Math.max(2, $parent.outerWidth() - 2 - cssWidth));
|
||||
} else {
|
||||
$parent.css('padding-left', _left_width < _right_width ? Math.max(2, Math.min(_right_width - _left_width + 2, $parent.outerWidth() - 2 - cssWidth)) : 2);
|
||||
$parent.css('padding-right', _left_width < _right_width ? 2 : Math.max(2, Math.min(_left_width - _right_width + 2, $parent.outerWidth() - 2 - cssWidth)));
|
||||
}
|
||||
}
|
||||
|
||||
if (!(config.customization && config.customization.toolbarHideFileName) && (!config.isEdit || config.customization && config.customization.compactHeader)) {
|
||||
var basis = parseFloat($parent.css('padding-left') || 0) + parseFloat($parent.css('padding-right') || 0) + parseInt($labelDocName.css('min-width') || 50); // 2px - box-shadow
|
||||
config.isCrypted && (basis += 20);
|
||||
$parent.css('flex-basis', Math.ceil(basis) + 'px');
|
||||
$parent.closest('.extra.right').css('flex-basis', Math.ceil(basis) + $parent.next().outerWidth() + 'px');
|
||||
Common.NotificationCenter.trigger('tab:resize');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onResize() {
|
||||
if (appConfig && appConfig.isEdit && !(appConfig.customization && appConfig.customization.compactHeader)) {
|
||||
updateDocNamePosition(appConfig);
|
||||
}
|
||||
}
|
||||
|
||||
function onAppShowed(config) {
|
||||
// config.isCrypted =true; //delete fore merge!
|
||||
if ( $labelDocName ) {
|
||||
if ( config.isCrypted ) {
|
||||
$labelDocName.before(
|
||||
'<div class="inner-box-icon crypted hidden">' +
|
||||
'<svg class="icon"><use xlink:href="#svg-icon-crypted"></use></svg>' +
|
||||
'</div>');
|
||||
this.imgCrypted = $labelDocName.parent().find('.crypted');
|
||||
this._showImgCrypted = true;
|
||||
}
|
||||
|
||||
updateDocNamePosition(config);
|
||||
}
|
||||
}
|
||||
|
||||
function onAppReady(mode) {
|
||||
|
@ -249,6 +283,7 @@ define([
|
|||
});
|
||||
me.btnShare.updateHint(me.tipAccessRights);
|
||||
me.btnShare.setVisible(!_readonlyRights && appConfig && (appConfig.sharingSettingsUrl && appConfig.sharingSettingsUrl.length || appConfig.canRequestSharingSettings));
|
||||
updateDocNamePosition(appConfig);
|
||||
}
|
||||
|
||||
if ( me.logo )
|
||||
|
@ -279,6 +314,7 @@ define([
|
|||
});
|
||||
$btnUsers.on('click', onUsersClick.bind(me));
|
||||
$panelUsers[(editingUsers > 1 && appConfig && (appConfig.isEdit || appConfig.isRestrictedEdit)) ? 'show' : 'hide']();
|
||||
updateDocNamePosition(appConfig);
|
||||
}
|
||||
|
||||
if (appConfig.user.guest && appConfig.canRenameAnonymous) {
|
||||
|
@ -332,60 +368,67 @@ define([
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (me.btnSearch)
|
||||
me.btnSearch.updateHint(me.tipSearch + Common.Utils.String.platformKey('Ctrl+F'));
|
||||
|
||||
if (appConfig.isEdit && !(appConfig.customization && appConfig.customization.compactHeader))
|
||||
Common.NotificationCenter.on('window:resize', onResize);
|
||||
}
|
||||
|
||||
function onFocusDocName(e){
|
||||
var me = this;
|
||||
me.imgCrypted && me.imgCrypted.attr('hidden', true);
|
||||
me.imgCrypted && me.imgCrypted.toggleClass('hidden', true);
|
||||
me.isSaveDocName =false;
|
||||
if(me.withoutExt) return;
|
||||
var name = me.cutDocName(me.labelDocName.val());
|
||||
_.delay(function(){
|
||||
me.labelDocName.val(name);
|
||||
},100);
|
||||
var name = me.cutDocName($labelDocName.val());
|
||||
me.withoutExt = true;
|
||||
_.delay(function(){
|
||||
me.setDocTitle(name);
|
||||
$labelDocName.select();
|
||||
},100);
|
||||
}
|
||||
|
||||
function onDocNameKeyDown(e) {
|
||||
var me = this;
|
||||
|
||||
var name = me.labelDocName.val();
|
||||
var name = $labelDocName.val();
|
||||
if ( e.keyCode == Common.UI.Keys.RETURN ) {
|
||||
name = name.trim();
|
||||
me.isSaveDocName =true;
|
||||
if ( !_.isEmpty(name) && me.cutDocName(me.documentCaption) !== name ) {
|
||||
me.isSaveDocName =true;
|
||||
if ( /[\t*\+:\"<>?|\\\\/]/gim.test(name) ) {
|
||||
_.defer(function() {
|
||||
Common.UI.error({
|
||||
msg: (new Common.Views.RenameDialog).txtInvalidName + "*+:\"<>?|\/"
|
||||
, callback: function() {
|
||||
_.delay(function() {
|
||||
me.labelDocName.focus();
|
||||
$labelDocName.focus();
|
||||
me.isSaveDocName =true;
|
||||
}, 50);
|
||||
}
|
||||
});
|
||||
//me.labelDocName.blur();
|
||||
})
|
||||
} else
|
||||
if(me.withoutExt) {
|
||||
name = me.cutDocName(name);
|
||||
me.options.wopi ? me.api.asc_wopi_renameFile(name) : Common.Gateway.requestRename(name);
|
||||
name += me.fileExtention;
|
||||
me.labelDocName.val(name);
|
||||
me.withoutExt = false;
|
||||
me.setDocTitle(name);
|
||||
Common.NotificationCenter.trigger('edit:complete', me);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
Common.NotificationCenter.trigger('edit:complete', me);
|
||||
}
|
||||
} else
|
||||
if ( e.keyCode == Common.UI.Keys.ESC ) {
|
||||
Common.NotificationCenter.trigger('edit:complete', this);
|
||||
} else {
|
||||
me.labelDocName.attr('size', name.length + me.fileExtention.length > 10 ? name.length + me.fileExtention.length : 10);
|
||||
_.delay(function(){
|
||||
me.setDocTitle();
|
||||
},10);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -430,6 +473,15 @@ define([
|
|||
reset : onResetUsers
|
||||
});
|
||||
|
||||
me.btnSearch = new Common.UI.Button({
|
||||
cls: 'btn-header no-caret',
|
||||
iconCls: 'toolbar__icon icon--inverse btn-menu-search',
|
||||
enableToggle: true,
|
||||
dataHint: '0',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'big'
|
||||
});
|
||||
|
||||
me.btnFavorite = new Common.UI.Button({
|
||||
id: 'btn-favorite',
|
||||
cls: 'btn-header',
|
||||
|
@ -442,6 +494,7 @@ define([
|
|||
Common.NotificationCenter.on({
|
||||
'app:ready': function(mode) {Common.Utils.asyncCall(onAppReady, me, mode);},
|
||||
'app:face': function(mode) {Common.Utils.asyncCall(onAppShowed, me, mode);},
|
||||
'tab:visible': function() {Common.Utils.asyncCall(updateDocNamePosition, me, appConfig);},
|
||||
'collaboration:sharingdeny': function(mode) {Common.Utils.asyncCall(onLostEditRights, me, mode);}
|
||||
});
|
||||
Common.NotificationCenter.on('uitheme:changed', this.changeLogo.bind(this));
|
||||
|
@ -487,18 +540,16 @@ define([
|
|||
textShare: this.textShare
|
||||
}));
|
||||
|
||||
if ( !me.labelDocName ) {
|
||||
me.labelDocName = $html.find('#rib-doc-name');
|
||||
if ( !$labelDocName ) {
|
||||
$labelDocName = $html.find('#rib-doc-name');
|
||||
if ( me.documentCaption ) {
|
||||
me.labelDocName.val(me.documentCaption);
|
||||
me.setDocTitle(me.documentCaption);
|
||||
}
|
||||
} else {
|
||||
$html.find('#rib-doc-name').hide();
|
||||
}
|
||||
|
||||
if ( !_.isUndefined(this.options.canRename) ) {
|
||||
this.setCanRename(this.options.canRename);
|
||||
}
|
||||
this.setCanRename(!!this.options.canRename);
|
||||
|
||||
if ( this.options.canBack === true ) {
|
||||
me.btnGoBack.render($html.find('#slot-btn-back'));
|
||||
|
@ -524,6 +575,7 @@ define([
|
|||
if ( config.canEdit && config.canRequestEditRights )
|
||||
this.btnEdit = createTitleButton('toolbar__icon icon--inverse btn-edit', $html.findById('#slot-hbtn-edit'), undefined, 'bottom', 'big');
|
||||
}
|
||||
me.btnSearch.render($html.find('#slot-btn-search'));
|
||||
|
||||
if (!config.isEdit || config.customization && !!config.customization.compactHeader) {
|
||||
if (config.user.guest && config.canRenameAnonymous) {
|
||||
|
@ -567,10 +619,11 @@ define([
|
|||
if ( role == 'title' ) {
|
||||
var $html = $(_.template(templateTitleBox)());
|
||||
|
||||
!!me.labelDocName && me.labelDocName.hide().off(); // hide document title if it was created in right box
|
||||
me.labelDocName = $html.find('#title-doc-name');
|
||||
me.labelDocName.val( me.documentCaption );
|
||||
me.options.wopi && me.labelDocName.attr('maxlength', me.options.wopi.FileNameMaxLength);
|
||||
!!$labelDocName && $labelDocName.hide().off(); // hide document title if it was created in right box
|
||||
$labelDocName = $html.find('#title-doc-name');
|
||||
me.setDocTitle( me.documentCaption );
|
||||
|
||||
me.options.wopi && $labelDocName.attr('maxlength', me.options.wopi.FileNameMaxLength);
|
||||
|
||||
if (config.user.guest && config.canRenameAnonymous) {
|
||||
me.btnUserName = new Common.UI.Button({
|
||||
|
@ -598,19 +651,6 @@ define([
|
|||
me.btnUndo = createTitleButton('toolbar__icon icon--inverse btn-undo', $html.findById('#slot-btn-dt-undo'), true, undefined, undefined, 'Z');
|
||||
me.btnRedo = createTitleButton('toolbar__icon icon--inverse btn-redo', $html.findById('#slot-btn-dt-redo'), true, undefined, undefined, 'Y');
|
||||
|
||||
if ( me.btnSave.$icon.is('svg') ) {
|
||||
me.btnSave.$icon.addClass('icon-save btn-save');
|
||||
var _create_use = function (extid, intid) {
|
||||
var _use = document.createElementNS('http://www.w3.org/2000/svg', 'use');
|
||||
_use.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', extid);
|
||||
_use.setAttribute('id', intid);
|
||||
|
||||
return $(_use);
|
||||
};
|
||||
|
||||
_create_use('#svg-btn-save-coauth', 'coauth').appendTo(me.btnSave.$icon);
|
||||
_create_use('#svg-btn-save-sync', 'sync').appendTo(me.btnSave.$icon);
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
},
|
||||
|
@ -655,12 +695,8 @@ define([
|
|||
if (idx>0)
|
||||
this.fileExtention = this.documentCaption.substring(idx);
|
||||
this.isModified && (value += '*');
|
||||
if ( this.labelDocName ) {
|
||||
this.labelDocName.val( value );
|
||||
// this.labelDocName.attr('size', value.length);
|
||||
this.setCanRename(this.options.canRename);
|
||||
|
||||
//this.setCanRename(true);
|
||||
if ( $labelDocName ) {
|
||||
this.setDocTitle( value );
|
||||
}
|
||||
return value;
|
||||
},
|
||||
|
@ -675,7 +711,7 @@ define([
|
|||
var _name = this.documentCaption;
|
||||
changed && (_name += '*');
|
||||
|
||||
this.labelDocName.val(_name);
|
||||
this.setDocTitle(_name);
|
||||
},
|
||||
|
||||
setCanBack: function (value, text) {
|
||||
|
@ -683,7 +719,7 @@ define([
|
|||
this.btnGoBack[value ? 'show' : 'hide']();
|
||||
if (value)
|
||||
this.btnGoBack.updateHint((text && typeof text == 'string') ? text : this.textBack);
|
||||
|
||||
updateDocNamePosition(appConfig);
|
||||
return this;
|
||||
},
|
||||
|
||||
|
@ -696,7 +732,7 @@ define([
|
|||
this.btnFavorite[value!==undefined && value!==null ? 'show' : 'hide']();
|
||||
this.btnFavorite.changeIcon(!!value ? {next: 'btn-in-favorite'} : {curr: 'btn-in-favorite'});
|
||||
this.btnFavorite.updateHint(!value ? this.textAddFavorite : this.textRemoveFavorite);
|
||||
|
||||
updateDocNamePosition(appConfig);
|
||||
return this;
|
||||
},
|
||||
|
||||
|
@ -705,12 +741,10 @@ define([
|
|||
},
|
||||
|
||||
setCanRename: function (rename) {
|
||||
//rename = true; //comment out for merge
|
||||
|
||||
var me = this;
|
||||
me.options.canRename = rename;
|
||||
if ( me.labelDocName ) {
|
||||
var label = me.labelDocName;
|
||||
if ( $labelDocName ) {
|
||||
var label = $labelDocName;
|
||||
if ( rename ) {
|
||||
label.removeAttr('disabled').tooltip({
|
||||
title: me.txtRename,
|
||||
|
@ -721,17 +755,17 @@ define([
|
|||
'keydown': onDocNameKeyDown.bind(this),
|
||||
'focus': onFocusDocName.bind(this),
|
||||
'blur': function (e) {
|
||||
me.imgCrypted && me.imgCrypted.attr('hidden', false);
|
||||
me.imgCrypted && me.imgCrypted.toggleClass('hidden', false);
|
||||
label[0].selectionStart = label[0].selectionEnd = 0;
|
||||
if(!me.isSaveDocName) {
|
||||
me.labelDocName.val(me.documentCaption);
|
||||
me.withoutExt = false;
|
||||
me.setDocTitle(me.documentCaption);
|
||||
}
|
||||
},
|
||||
'paste': function (e) {
|
||||
setTimeout(function() {
|
||||
var name = me.cutDocName(me.labelDocName.val());
|
||||
me.labelDocName.val(name);
|
||||
me.labelDocName.attr('size', name.length + me.fileExtention.length > 10 ? name.length + me.fileExtention.length : 10);
|
||||
var name = me.cutDocName($labelDocName.val());
|
||||
me.setDocTitle(name);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -750,12 +784,38 @@ define([
|
|||
},
|
||||
|
||||
cutDocName: function(name) {
|
||||
if(name.length <= this.fileExtention.length) return;
|
||||
if(name.length <= this.fileExtention.length) return name;
|
||||
var idx =name.length - this.fileExtention.length;
|
||||
|
||||
return (name.substring(idx) == this.fileExtention) ? name.substring(0, idx) : name ;
|
||||
},
|
||||
|
||||
setDocTitle: function(name){
|
||||
if(name)
|
||||
$labelDocName.val(name);
|
||||
else
|
||||
name = $labelDocName.val();
|
||||
var width = this.getTextWidth(name);
|
||||
(width>=0) && $labelDocName.width(width);
|
||||
if (this._showImgCrypted && width>=0) {
|
||||
this.imgCrypted.toggleClass('hidden', false);
|
||||
this._showImgCrypted = false;
|
||||
}
|
||||
(width>=0) && onResize();
|
||||
},
|
||||
|
||||
getTextWidth: function(text) {
|
||||
if (!this._testCanvas ) {
|
||||
var font = ($labelDocName.css('font-size') + ' ' + $labelDocName.css('font-family')).trim();
|
||||
if (font) {
|
||||
var canvas = document.createElement("canvas");
|
||||
this._testCanvas = canvas.getContext('2d');
|
||||
this._testCanvas.font = font;
|
||||
}
|
||||
}
|
||||
return this._testCanvas ? this._testCanvas.measureText(text).width : -1;
|
||||
},
|
||||
|
||||
setUserName: function(name) {
|
||||
this.options.userName = name;
|
||||
if ( this.btnUserName ) {
|
||||
|
@ -852,6 +912,7 @@ define([
|
|||
textRemoveFavorite: 'Remove from Favorites',
|
||||
textAddFavorite: 'Mark as favorite',
|
||||
textHideNotes: 'Hide Notes',
|
||||
tipSearch: 'Search',
|
||||
textShare: 'Share'
|
||||
}
|
||||
}(), Common.Views.Header || {}))
|
||||
|
|
|
@ -68,11 +68,14 @@ define([
|
|||
initialize: function(options) {
|
||||
_.extend(this, options);
|
||||
Common.UI.BaseView.prototype.initialize.call(this, arguments);
|
||||
|
||||
var filter = Common.localStorage.getKeysFilter();
|
||||
this.appPrefix = (filter && filter.length) ? filter.split(',')[0] : '';
|
||||
},
|
||||
|
||||
render: function(el) {
|
||||
el = el || this.el;
|
||||
$(el).html(this.template({scope: this})).width( (parseInt(Common.localStorage.getItem('de-mainmenu-width')) || MENU_SCALE_PART) - SCALE_MIN);
|
||||
$(el).html(this.template({scope: this})).width( (parseInt(Common.localStorage.getItem(this.appPrefix + 'mainmenu-width')) || MENU_SCALE_PART) - SCALE_MIN);
|
||||
|
||||
this.viewHistoryList = new Common.UI.DataView({
|
||||
el: $('#history-list'),
|
||||
|
|
|
@ -50,6 +50,13 @@ define([
|
|||
'common/main/lib/view/SymbolTableDialog'
|
||||
], function () { 'use strict';
|
||||
|
||||
var _BulletTypes = {};
|
||||
_BulletTypes.none = -1;
|
||||
_BulletTypes.symbol = 0;
|
||||
_BulletTypes.image = 2;
|
||||
_BulletTypes.newSymbol = 1;
|
||||
_BulletTypes.newImage = -2;
|
||||
|
||||
Common.Views.ListSettingsDialog = Common.UI.Window.extend(_.extend({
|
||||
options: {
|
||||
type: 0, // 0 - markers, 1 - numbers
|
||||
|
@ -86,6 +93,15 @@ define([
|
|||
'</td>',
|
||||
'<td style="padding-bottom: 8px;"></td>',
|
||||
'</tr>',
|
||||
'<tr class="image">',
|
||||
'<td style="padding-right: 5px;padding-bottom: 8px;min-width: 50px;">',
|
||||
'<label class="text">' + this.txtImport + '</label>',
|
||||
'</td>',
|
||||
'<td style="padding-right: 5px;padding-bottom: 8px;width: 100px;">',
|
||||
'<div id="id-dlg-list-image" style="width: 100px;"></div>',
|
||||
'</td>',
|
||||
'<td style="padding-bottom: 8px;"></td>',
|
||||
'</tr>',
|
||||
'<tr>',
|
||||
'<td style="padding-right: 5px;padding-bottom: 8px;min-width: 50px;">',
|
||||
'<label class="text">' + this.txtSize + '</label>',
|
||||
|
@ -106,7 +122,7 @@ define([
|
|||
'</td>',
|
||||
'<td style="padding-bottom: 8px;"></td>',
|
||||
'</tr>',
|
||||
'<tr>',
|
||||
'<tr class="color">',
|
||||
'<td style="padding-right: 5px;padding-bottom: 8px;min-width: 50px;">',
|
||||
'<label class="text">' + this.txtColor + '</label>',
|
||||
'</td>',
|
||||
|
@ -123,6 +139,8 @@ define([
|
|||
this.props = options.props;
|
||||
this.options.tpl = _.template(this.template)(this.options);
|
||||
this.color = '000000';
|
||||
this.storage = !!options.storage;
|
||||
this.api = options.api;
|
||||
|
||||
Common.UI.Window.prototype.initialize.call(this, this.options);
|
||||
},
|
||||
|
@ -179,7 +197,9 @@ define([
|
|||
[
|
||||
'<% _.each(items, function(item) { %>',
|
||||
'<li id="<%= item.id %>" data-value="<%= item.value %>"><a tabindex="-1" type="menuitem">',
|
||||
'<%= item.displayValue %><% if (item.value === 0) { %><span style="font-family:<%=item.font%>;"><%=item.symbol%></span><% } %>',
|
||||
'<%= item.displayValue %>',
|
||||
'<% if (item.value === 0) { %><span style="font-family:<%=item.font%>;"><%=item.symbol%></span>',
|
||||
'<% } else if (item.value === 2) { %><span id="id-dlg-list-bullet-image-preview" style="width:12px; height: 12px; margin-left: 4px; margin-bottom: 1px;display: inline-block; vertical-align: middle;"></span><% } %>',
|
||||
'</a></li>',
|
||||
'<% }); %>'
|
||||
];
|
||||
|
@ -201,22 +221,30 @@ define([
|
|||
template : _.template(template.join('')),
|
||||
itemsTemplate: _.template(itemsTemplate.join('')),
|
||||
data : [
|
||||
{ displayValue: this.txtNone, value: -1 },
|
||||
{ displayValue: this.txtSymbol + ': ', value: 0, symbol: "•", font: 'Arial' },
|
||||
{ displayValue: this.txtSymbol + ': ', value: 0, symbol: "o", font: 'Courier New' },
|
||||
{ displayValue: this.txtSymbol + ': ', value: 0, symbol: "§", font: 'Wingdings' },
|
||||
{ displayValue: this.txtSymbol + ': ', value: 0, symbol: "v", font: 'Wingdings' },
|
||||
{ displayValue: this.txtSymbol + ': ', value: 0, symbol: "Ø", font: 'Wingdings' },
|
||||
{ displayValue: this.txtSymbol + ': ', value: 0, symbol: "ü", font: 'Wingdings' },
|
||||
{ displayValue: this.txtSymbol + ': ', value: 0, symbol: "w", font: 'Wingdings' },
|
||||
{ displayValue: this.txtSymbol + ': ', value: 0, symbol: "–", font: 'Arial' },
|
||||
{ displayValue: this.txtNewBullet, value: 1 }
|
||||
{ displayValue: this.txtNone, value: _BulletTypes.none },
|
||||
{ displayValue: this.txtSymbol + ': ', value: _BulletTypes.symbol, symbol: "•", font: 'Arial' },
|
||||
{ displayValue: this.txtSymbol + ': ', value: _BulletTypes.symbol, symbol: "o", font: 'Courier New' },
|
||||
{ displayValue: this.txtSymbol + ': ', value: _BulletTypes.symbol, symbol: "§", font: 'Wingdings' },
|
||||
{ displayValue: this.txtSymbol + ': ', value: _BulletTypes.symbol, symbol: "v", font: 'Wingdings' },
|
||||
{ displayValue: this.txtSymbol + ': ', value: _BulletTypes.symbol, symbol: "Ø", font: 'Wingdings' },
|
||||
{ displayValue: this.txtSymbol + ': ', value: _BulletTypes.symbol, symbol: "ü", font: 'Wingdings' },
|
||||
{ displayValue: this.txtSymbol + ': ', value: _BulletTypes.symbol, symbol: "w", font: 'Wingdings' },
|
||||
{ displayValue: this.txtSymbol + ': ', value: _BulletTypes.symbol, symbol: "–", font: 'Arial' },
|
||||
{ displayValue: this.txtNewBullet, value: _BulletTypes.newSymbol },
|
||||
{ displayValue: this.txtNewImage, value: _BulletTypes.newImage }
|
||||
],
|
||||
updateFormControl: function(record) {
|
||||
var formcontrol = $(this.el).find('.form-control');
|
||||
if (record) {
|
||||
if (record.get('value')==0)
|
||||
if (record.get('value')===_BulletTypes.symbol)
|
||||
formcontrol[0].innerHTML = record.get('displayValue') + '<span style="font-family:' + (record.get('font') || 'Arial') + '">' + record.get('symbol') + '</span>';
|
||||
else if (record.get('value')===_BulletTypes.image) {
|
||||
formcontrol[0].innerHTML = record.get('displayValue') + '<span id="id-dlg-list-bullet-combo-preview" style="width:12px; height: 12px; margin-left: 4px; margin-bottom: 1px;display: inline-block; vertical-align: middle;"></span>';
|
||||
var bullet = new Asc.asc_CBullet();
|
||||
bullet.asc_fillBulletImage(me.imageProps.id);
|
||||
bullet.drawSquareImage('id-dlg-list-bullet-combo-preview');
|
||||
} else if (record.get('value')===_BulletTypes.newImage)
|
||||
formcontrol[0].innerHTML = me.txtImage;
|
||||
else
|
||||
formcontrol[0].innerHTML = record.get('displayValue');
|
||||
} else
|
||||
|
@ -227,7 +255,9 @@ define([
|
|||
this.cmbBulletFormat.selectRecord(rec);
|
||||
this.bulletProps = {symbol: rec.get('symbol'), font: rec.get('font')};
|
||||
this.cmbBulletFormat.on('selected', _.bind(function (combo, record) {
|
||||
if (record.value === 1) {
|
||||
this.imageControls.toggleClass('hidden', !(record.value === _BulletTypes.image || record.value === _BulletTypes.newImage));
|
||||
this.colorControls.toggleClass('hidden', record.value === _BulletTypes.image || record.value === _BulletTypes.newImage);
|
||||
if (record.value === _BulletTypes.newSymbol) {
|
||||
var me = this,
|
||||
props = me.bulletProps,
|
||||
handler = function(dlg, result, settings) {
|
||||
|
@ -242,10 +272,14 @@ define([
|
|||
}
|
||||
}
|
||||
var store = combo.store;
|
||||
if (!store.findWhere({value: 0, symbol: props.symbol, font: props.font}))
|
||||
store.add({ displayValue: me.txtSymbol + ': ', value: 0, symbol: props.symbol, font: props.font }, {at: store.length-1});
|
||||
if (!store.findWhere({value: _BulletTypes.symbol, symbol: props.symbol, font: props.font})) {
|
||||
var idx = store.indexOf(store.findWhere({value: _BulletTypes.image}));
|
||||
if (idx<0)
|
||||
idx = store.indexOf(store.findWhere({value: _BulletTypes.newSymbol}));
|
||||
store.add({ displayValue: me.txtSymbol + ': ', value: _BulletTypes.symbol, symbol: props.symbol, font: props.font }, {at: idx});
|
||||
}
|
||||
combo.setData(store.models);
|
||||
combo.selectRecord(combo.store.findWhere({value: 0, symbol: props.symbol, font: props.font}));
|
||||
combo.selectRecord(combo.store.findWhere({value: _BulletTypes.symbol, symbol: props.symbol, font: props.font}));
|
||||
},
|
||||
win = new Common.Views.SymbolTableDialog({
|
||||
api: me.options.api,
|
||||
|
@ -258,7 +292,11 @@ define([
|
|||
});
|
||||
win.show();
|
||||
win.on('symbol:dblclick', handler);
|
||||
} else if (record.value == -1) {
|
||||
} else if (record.value == _BulletTypes.newImage) { // new image
|
||||
} else if (record.value == _BulletTypes.image) { // image
|
||||
if (this._changedProps)
|
||||
this._changedProps.asc_fillBulletImage(this.imageProps.id);
|
||||
} else if (record.value == _BulletTypes.none) {
|
||||
if (this._changedProps)
|
||||
this._changedProps.asc_putListType(0, record.value);
|
||||
} else {
|
||||
|
@ -271,7 +309,9 @@ define([
|
|||
this._changedProps.asc_putSymbol(this.bulletProps.symbol);
|
||||
}
|
||||
}
|
||||
this.btnOk.setDisabled(record.value === _BulletTypes.newImage);
|
||||
}, this));
|
||||
this.cmbBulletFormat.on('show:after', _.bind(this.onBulletFormatOpen, this));
|
||||
|
||||
this.spnSize = new Common.UI.MetricSpinner({
|
||||
el : $window.find('#id-dlg-list-size'),
|
||||
|
@ -314,7 +354,32 @@ define([
|
|||
}
|
||||
});
|
||||
|
||||
me.numberingControls = $window.find('.numbering');
|
||||
this.btnSelectImage = new Common.UI.Button({
|
||||
parentEl: $('#id-dlg-list-image'),
|
||||
cls: 'btn-text-menu-default',
|
||||
caption: this.textSelect,
|
||||
style: 'width: 100%;',
|
||||
menu: new Common.UI.Menu({
|
||||
style: 'min-width: 100px;',
|
||||
maxHeight: 200,
|
||||
additionalAlign: this.menuAddAlign,
|
||||
items: [
|
||||
{caption: this.textFromFile, value: 0},
|
||||
{caption: this.textFromUrl, value: 1},
|
||||
{caption: this.textFromStorage, value: 2}
|
||||
]
|
||||
})
|
||||
});
|
||||
this.btnSelectImage.menu.on('item:click', _.bind(this.onImageSelect, this));
|
||||
this.btnSelectImage.menu.items[2].setVisible(this.storage);
|
||||
|
||||
this.btnOk = new Common.UI.Button({
|
||||
el: $window.find('.primary')
|
||||
});
|
||||
|
||||
me.numberingControls = $window.find('tr.numbering');
|
||||
me.imageControls = $window.find('tr.image');
|
||||
me.colorControls = $window.find('tr.color');
|
||||
|
||||
var el = $window.find('table tr:first() td:first()');
|
||||
el.width(Math.max($window.find('.numbering .text').width(), el.width()));
|
||||
|
@ -323,12 +388,52 @@ define([
|
|||
},
|
||||
|
||||
getFocusedComponents: function() {
|
||||
return [this.cmbNumFormat, this.cmbBulletFormat, this.spnSize, this.spnStart, this.btnColor];
|
||||
return [this.cmbNumFormat, this.cmbBulletFormat, this.btnSelectImage, this.spnSize, this.spnStart, this.btnColor];
|
||||
},
|
||||
|
||||
afterRender: function() {
|
||||
this.updateThemeColors();
|
||||
this._setDefaults(this.props);
|
||||
|
||||
var me = this;
|
||||
var onApiImageLoaded = function(bullet) {
|
||||
me.imageProps = {id: bullet.asc_getImageId(), redraw: true};
|
||||
if (me._changedProps)
|
||||
me._changedProps.asc_fillBulletImage(me.imageProps.id);
|
||||
// add or update record for image to btnBulletFormat and select it
|
||||
var store = me.cmbBulletFormat.store;
|
||||
if (!store.findWhere({value: _BulletTypes.image})) {
|
||||
var idx = store.indexOf(store.findWhere({value: _BulletTypes.newSymbol}));
|
||||
store.add({ displayValue: me.txtImage + ':', value: _BulletTypes.image }, {at: idx});
|
||||
}
|
||||
me.cmbBulletFormat.setData(store.models);
|
||||
me.cmbBulletFormat.selectRecord(me.cmbBulletFormat.store.findWhere({value: _BulletTypes.image}));
|
||||
me.btnOk.setDisabled(false);
|
||||
};
|
||||
this.api.asc_registerCallback('asc_onBulletImageLoaded', onApiImageLoaded);
|
||||
|
||||
var insertImageFromStorage = function(data) {
|
||||
if (data && data._urls && data.c=='bullet') {
|
||||
(new Asc.asc_CBullet()).asc_putImageUrl(data._urls[0], data.token);
|
||||
}
|
||||
};
|
||||
Common.NotificationCenter.on('storage:image-insert', insertImageFromStorage);
|
||||
|
||||
this.on('close', function(obj){
|
||||
me.api.asc_unregisterCallback('asc_onBulletImageLoaded', onApiImageLoaded);
|
||||
Common.NotificationCenter.off('storage:image-insert', insertImageFromStorage);
|
||||
});
|
||||
},
|
||||
|
||||
onBulletFormatOpen: function(combo) {
|
||||
var store = combo.store,
|
||||
rec = store.findWhere({value: _BulletTypes.image});
|
||||
if (rec && this.imageProps.redraw) {
|
||||
var bullet = new Asc.asc_CBullet();
|
||||
bullet.asc_fillBulletImage(this.imageProps.id);
|
||||
bullet.drawSquareImage('id-dlg-list-bullet-image-preview');
|
||||
this.imageProps.redraw = false;
|
||||
}
|
||||
},
|
||||
|
||||
updateThemeColors: function() {
|
||||
|
@ -347,9 +452,14 @@ define([
|
|||
},
|
||||
|
||||
ShowHideElem: function(value) {
|
||||
var isImage = value==0 && (this.cmbBulletFormat.getValue()===_BulletTypes.image || this.cmbBulletFormat.getValue()===_BulletTypes.newImage ||
|
||||
(this.cmbBulletFormat.getValue()===undefined || this.cmbBulletFormat.getValue()==='') && this.originalType === AscFormat.BULLET_TYPE_BULLET_BLIP);
|
||||
this.numberingControls.toggleClass('hidden', value==0);
|
||||
this.imageControls.toggleClass('hidden', !isImage);
|
||||
this.colorControls.toggleClass('hidden', isImage);
|
||||
this.cmbNumFormat.setVisible(value==1);
|
||||
this.cmbBulletFormat.setVisible(value==0);
|
||||
this.btnOk.setDisabled(isImage && (this.cmbBulletFormat.getValue()===_BulletTypes.newImage));
|
||||
var me = this;
|
||||
_.delay(function(){
|
||||
if (value)
|
||||
|
@ -362,18 +472,28 @@ define([
|
|||
_handleInput: function(state) {
|
||||
if (this.options.handler)
|
||||
{
|
||||
if (state == 'ok' && this.btnOk.isDisabled()) {
|
||||
return;
|
||||
}
|
||||
var type = this.btnBullet.pressed ? 0 : 1;
|
||||
if (this.originalType == AscFormat.BULLET_TYPE_BULLET_NONE) {
|
||||
this._changedProps = new Asc.asc_CBullet();
|
||||
this._changedProps.asc_putColor(Common.Utils.ThemeColor.getRgbColor(this.color));
|
||||
this._changedProps.asc_putSize(this.spnSize.getNumberValue());
|
||||
if (type==0 && this.cmbBulletFormat.getValue()===_BulletTypes.image && this.imageProps) {//image
|
||||
this._changedProps.asc_fillBulletImage(this.imageProps.id);
|
||||
} else {
|
||||
this._changedProps.asc_putColor(Common.Utils.ThemeColor.getRgbColor(this.color));
|
||||
}
|
||||
}
|
||||
|
||||
if (this.originalType == AscFormat.BULLET_TYPE_BULLET_NONE ||
|
||||
this.originalType == AscFormat.BULLET_TYPE_BULLET_CHAR && type==1 || this.originalType == AscFormat.BULLET_TYPE_BULLET_AUTONUM && type==0) { // changed list type
|
||||
(this.originalType == AscFormat.BULLET_TYPE_BULLET_CHAR || this.originalType == AscFormat.BULLET_TYPE_BULLET_BLIP) && type==1 ||
|
||||
this.originalType == AscFormat.BULLET_TYPE_BULLET_AUTONUM && type==0) { // changed list type
|
||||
if (type==0) {//markers
|
||||
if (this.cmbBulletFormat.getValue()==-1) {
|
||||
if (this.cmbBulletFormat.getValue()==_BulletTypes.none) {
|
||||
this._changedProps.asc_putListType(0, -1);
|
||||
} else if (this.cmbBulletFormat.getValue()==_BulletTypes.image) {
|
||||
|
||||
} else {
|
||||
this._changedProps.asc_putFont(this.bulletProps.font);
|
||||
this._changedProps.asc_putSymbol(this.bulletProps.symbol);
|
||||
|
@ -432,16 +552,28 @@ define([
|
|||
|
||||
if (this.originalType == AscFormat.BULLET_TYPE_BULLET_NONE) {
|
||||
this.cmbNumFormat.setValue(-1);
|
||||
this.cmbBulletFormat.setValue(-1);
|
||||
this.cmbBulletFormat.setValue(_BulletTypes.none);
|
||||
type = this.type;
|
||||
} else if (this.originalType == AscFormat.BULLET_TYPE_BULLET_CHAR) {
|
||||
var symbol = bullet.asc_getSymbol();
|
||||
if (symbol) {
|
||||
this.bulletProps = {symbol: symbol, font: bullet.asc_getFont()};
|
||||
if (!this.cmbBulletFormat.store.findWhere({value: 0, symbol: this.bulletProps.symbol, font: this.bulletProps.font}))
|
||||
this.cmbBulletFormat.store.add({ displayValue: this.txtSymbol + ': ', value: 0, symbol: this.bulletProps.symbol, font: this.bulletProps.font }, {at: this.cmbBulletFormat.store.length-1});
|
||||
if (!this.cmbBulletFormat.store.findWhere({value: _BulletTypes.symbol, symbol: this.bulletProps.symbol, font: this.bulletProps.font}))
|
||||
this.cmbBulletFormat.store.add({ displayValue: this.txtSymbol + ': ', value: _BulletTypes.symbol, symbol: this.bulletProps.symbol, font: this.bulletProps.font }, {at: this.cmbBulletFormat.store.length-2});
|
||||
this.cmbBulletFormat.setData(this.cmbBulletFormat.store.models);
|
||||
this.cmbBulletFormat.selectRecord(this.cmbBulletFormat.store.findWhere({value: 0, symbol: this.bulletProps.symbol, font: this.bulletProps.font}));
|
||||
this.cmbBulletFormat.selectRecord(this.cmbBulletFormat.store.findWhere({value: _BulletTypes.symbol, symbol: this.bulletProps.symbol, font: this.bulletProps.font}));
|
||||
} else
|
||||
this.cmbBulletFormat.setValue('');
|
||||
this._changedProps = bullet;
|
||||
type = 0;
|
||||
} else if (this.originalType == AscFormat.BULLET_TYPE_BULLET_BLIP) {
|
||||
var id = bullet.asc_getImageId();
|
||||
if (id) {
|
||||
this.imageProps = {id: id, redraw: true};
|
||||
if (!this.cmbBulletFormat.store.findWhere({value: _BulletTypes.image}))
|
||||
this.cmbBulletFormat.store.add({ displayValue: this.txtImage + ':', value: _BulletTypes.image}, {at: this.cmbBulletFormat.store.length-2});
|
||||
this.cmbBulletFormat.setData(this.cmbBulletFormat.store.models);
|
||||
this.cmbBulletFormat.selectRecord(this.cmbBulletFormat.store.findWhere({value: _BulletTypes.image}));
|
||||
} else
|
||||
this.cmbBulletFormat.setValue('');
|
||||
this._changedProps = bullet;
|
||||
|
@ -458,7 +590,7 @@ define([
|
|||
}
|
||||
} else {// different bullet types
|
||||
this.cmbNumFormat.setValue(-1);
|
||||
this.cmbBulletFormat.setValue(-1);
|
||||
this.cmbBulletFormat.setValue(_BulletTypes.none);
|
||||
this._changedProps = new Asc.asc_CBullet();
|
||||
type = this.type;
|
||||
}
|
||||
|
@ -468,6 +600,26 @@ define([
|
|||
this.ShowHideElem(type);
|
||||
},
|
||||
|
||||
onImageSelect: function(menu, item) {
|
||||
if (item.value==1) {
|
||||
var me = this;
|
||||
(new Common.Views.ImageFromUrlDialog({
|
||||
handler: function(result, value) {
|
||||
if (result == 'ok') {
|
||||
var checkUrl = value.replace(/ /g, '');
|
||||
if (!_.isEmpty(checkUrl)) {
|
||||
(new Asc.asc_CBullet()).asc_putImageUrl(checkUrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
})).show();
|
||||
} else if (item.value==2) {
|
||||
Common.NotificationCenter.trigger('storage:image-load', 'bullet');
|
||||
} else {
|
||||
(new Asc.asc_CBullet()).asc_showFileDialog();
|
||||
}
|
||||
},
|
||||
|
||||
txtTitle: 'List Settings',
|
||||
txtSize: 'Size',
|
||||
txtColor: 'Color',
|
||||
|
@ -478,6 +630,13 @@ define([
|
|||
txtType: 'Type',
|
||||
txtNone: 'None',
|
||||
txtNewBullet: 'New bullet',
|
||||
txtSymbol: 'Symbol'
|
||||
txtSymbol: 'Symbol',
|
||||
txtNewImage: 'New image',
|
||||
txtImage: 'Image',
|
||||
txtImport: 'Import',
|
||||
textSelect: 'Select From',
|
||||
textFromUrl: 'From URL',
|
||||
textFromFile: 'From File',
|
||||
textFromStorage: 'From Storage'
|
||||
}, Common.Views.ListSettingsDialog || {}))
|
||||
});
|
|
@ -205,6 +205,8 @@ define([
|
|||
this.inputPwd = new Common.UI.InputFieldBtnPassword({
|
||||
el: $('#id-password-txt'),
|
||||
type: 'password',
|
||||
showCls: (this.options.iconType==='svg' ? 'svg-icon' : 'toolbar__icon') + ' btn-sheet-view',
|
||||
hideCls: (this.options.iconType==='svg' ? 'svg-icon' : 'toolbar__icon') + ' hide-password',
|
||||
validateOnBlur: false,
|
||||
showPwdOnClick: true,
|
||||
validation : function(value) {
|
||||
|
|
|
@ -60,11 +60,11 @@ define([
|
|||
'</div>',
|
||||
'</div>',
|
||||
'<div id="current-plugin-box" class="layout-ct vbox hidden">',
|
||||
'<div id="current-plugin-frame" class="">',
|
||||
'</div>',
|
||||
'<div id="current-plugin-header">',
|
||||
'<label></label>',
|
||||
'<div id="id-plugin-close" class="tool close"></div>',
|
||||
'</div>',
|
||||
'<div id="current-plugin-frame" class="">',
|
||||
'<div id="id-plugin-close" class="close"></div>',
|
||||
'</div>',
|
||||
'</div>',
|
||||
'<div id="plugins-mask" style="display: none;">'
|
||||
|
@ -111,6 +111,13 @@ define([
|
|||
this.currentPluginPanel = $('#current-plugin-box');
|
||||
this.currentPluginFrame = $('#current-plugin-frame');
|
||||
|
||||
this.pluginClose = new Common.UI.Button({
|
||||
parentEl: $('#id-plugin-close'),
|
||||
cls: 'btn-toolbar',
|
||||
iconCls: 'toolbar__icon btn-close',
|
||||
hint: this.textClosePanel
|
||||
});
|
||||
|
||||
this.pluginMenu = new Common.UI.Menu({
|
||||
menuAlign : 'tr-br',
|
||||
items: []
|
||||
|
@ -426,7 +433,8 @@ define([
|
|||
textLoading: 'Loading',
|
||||
textStart: 'Start',
|
||||
textStop: 'Stop',
|
||||
groupCaption: 'Plugins'
|
||||
groupCaption: 'Plugins',
|
||||
textClosePanel: 'Close plugin'
|
||||
|
||||
}, Common.Views.Plugins || {}));
|
||||
});
|
200
apps/common/main/lib/view/SearchBar.js
Normal file
|
@ -0,0 +1,200 @@
|
|||
/*
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2010-2019
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
|
||||
* street, Riga, Latvia, EU, LV-1050.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* SearchBar.js
|
||||
*
|
||||
* Created by Julia Svinareva on 03.02.2022
|
||||
* Copyright (c) 2022 Ascensio System SIA. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
define([
|
||||
'common/main/lib/component/Window',
|
||||
'common/main/lib/component/Button'
|
||||
], function () {
|
||||
'use strict';
|
||||
|
||||
Common.UI.SearchBar = Common.UI.Window.extend(_.extend({
|
||||
options: {
|
||||
modal: false,
|
||||
width: 328,
|
||||
height: 54,
|
||||
header: false,
|
||||
cls: 'search-bar',
|
||||
alias: 'SearchBar',
|
||||
showOpenPanel: true,
|
||||
toolclose: 'hide'
|
||||
},
|
||||
|
||||
initialize : function(options) {
|
||||
_.extend(this.options, options || {});
|
||||
|
||||
this.template = [
|
||||
'<div class="box">',
|
||||
'<input type="text" id="search-bar-text" class="input-field form-control" maxlength="255" placeholder="'+this.textFind+'" autocomplete="off">',
|
||||
'<div class="tools">',
|
||||
'<div id="search-bar-back"></div>',
|
||||
'<div id="search-bar-next"></div>',
|
||||
this.options.showOpenPanel ? '<div id="search-bar-open-panel"></div>' : '',
|
||||
'<div id="search-bar-close"></div>',
|
||||
'</div>',
|
||||
'</div>'
|
||||
].join('');
|
||||
|
||||
this.options.tpl = _.template(this.template)(this.options);
|
||||
this.iconType = this.options.iconType;
|
||||
|
||||
Common.UI.Window.prototype.initialize.call(this, this.options);
|
||||
|
||||
Common.NotificationCenter.on('layout:changed', _.bind(this.onLayoutChanged, this));
|
||||
$(window).on('resize', _.bind(this.onLayoutChanged, this));
|
||||
},
|
||||
|
||||
render: function() {
|
||||
Common.UI.Window.prototype.render.call(this);
|
||||
|
||||
this.inputSearch = this.$window.find('#search-bar-text');
|
||||
this.inputSearch.on('input', _.bind(function () {
|
||||
this.disableNavButtons();
|
||||
this.fireEvent('search:input', [this.inputSearch.val()]);
|
||||
}, this)).on('keydown', _.bind(function (e) {
|
||||
this.fireEvent('search:keydown', [this.inputSearch.val(), e]);
|
||||
}, this));
|
||||
|
||||
this.btnBack = new Common.UI.Button({
|
||||
parentEl: $('#search-bar-back'),
|
||||
cls: 'btn-toolbar',
|
||||
iconCls: this.iconType === 'svg' ? 'svg-icon search-arrow-up' : 'toolbar__icon btn-arrow-up',
|
||||
hint: this.tipPreviousResult
|
||||
});
|
||||
this.btnBack.on('click', _.bind(this.onBtnNextClick, this, 'back'));
|
||||
|
||||
this.btnNext = new Common.UI.Button({
|
||||
parentEl: $('#search-bar-next'),
|
||||
cls: 'btn-toolbar',
|
||||
iconCls: this.iconType === 'svg' ? 'svg-icon search-arrow-down' : 'toolbar__icon btn-arrow-down',
|
||||
hint: this.tipNextResult
|
||||
});
|
||||
this.btnNext.on('click', _.bind(this.onBtnNextClick, this, 'next'));
|
||||
|
||||
if (this.options.showOpenPanel) {
|
||||
this.btnOpenPanel = new Common.UI.Button({
|
||||
parentEl: $('#search-bar-open-panel'),
|
||||
cls: 'btn-toolbar',
|
||||
iconCls: 'toolbar__icon more-vertical',
|
||||
hint: this.tipOpenAdvancedSettings
|
||||
});
|
||||
this.btnOpenPanel.on('click', _.bind(this.onOpenPanel, this));
|
||||
}
|
||||
|
||||
this.btnClose = new Common.UI.Button({
|
||||
parentEl: $('#search-bar-close'),
|
||||
cls: 'btn-toolbar',
|
||||
iconCls: this.iconType === 'svg' ? 'svg-icon search-close' : 'toolbar__icon btn-close',
|
||||
hint: this.tipCloseSearch
|
||||
});
|
||||
this.btnClose.on('click', _.bind(function () {
|
||||
this.hide();
|
||||
}, this))
|
||||
|
||||
this.on('animate:before', _.bind(this.focus, this));
|
||||
|
||||
Common.NotificationCenter.on('search:updateresults', _.bind(this.disableNavButtons, this));
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
show: function(text) {
|
||||
var top = ($('#app-title').length > 0 ? $('#app-title').height() : 0) + $('#toolbar').height() + 2,
|
||||
left = Common.Utils.innerWidth() - ($('#right-menu').is(':visible') ? $('#right-menu').width() : 0) - this.options.width - 32;
|
||||
Common.UI.Window.prototype.show.call(this, left, top);
|
||||
|
||||
if (text) {
|
||||
this.inputSearch.val(text);
|
||||
this.fireEvent('search:input', [text]);
|
||||
} else {
|
||||
this.inputSearch.val('');
|
||||
}
|
||||
|
||||
this.disableNavButtons();
|
||||
this.focus();
|
||||
},
|
||||
|
||||
focus: function() {
|
||||
var me = this;
|
||||
setTimeout(function(){
|
||||
me.inputSearch.focus();
|
||||
me.inputSearch.select();
|
||||
}, 10);
|
||||
},
|
||||
|
||||
setText: function (text) {
|
||||
this.inputSearch.val(text);
|
||||
this.fireEvent('search:input', [text]);
|
||||
},
|
||||
|
||||
getSettings: function() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
|
||||
onLayoutChanged: function () {
|
||||
var top = $('#app-title').height() + $('#toolbar').height() + 2,
|
||||
left = Common.Utils.innerWidth() - ($('#right-menu').is(':visible') ? $('#right-menu').width() : 0) - this.options.width - 32;
|
||||
this.$window.css({left: left, top: top});
|
||||
},
|
||||
|
||||
onBtnNextClick: function(action) {
|
||||
this.fireEvent('search:'+action, [this.inputSearch.val(), false]);
|
||||
},
|
||||
|
||||
onOpenPanel: function () {
|
||||
this.hide();
|
||||
this.fireEvent('search:show', [true, this.inputSearch.val()]);
|
||||
},
|
||||
|
||||
disableNavButtons: function (resultNumber, allResults) {
|
||||
var disable = this.inputSearch.val() === '';
|
||||
this.btnBack.setDisabled(disable || !allResults || resultNumber === 0);
|
||||
this.btnNext.setDisabled(disable || resultNumber + 1 === allResults);
|
||||
},
|
||||
|
||||
textFind: 'Find',
|
||||
tipPreviousResult: 'Previous result',
|
||||
tipNextResult: 'Next result',
|
||||
tipOpenAdvancedSettings: 'Open advanced settings',
|
||||
tipCloseSearch: 'Close search'
|
||||
|
||||
}, Common.UI.SearchBar || {}));
|
||||
});
|
418
apps/common/main/lib/view/SearchPanel.js
Normal file
|
@ -0,0 +1,418 @@
|
|||
/*
|
||||
*
|
||||
* (c) Copyright Ascensio System SIA 2010-2019
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
|
||||
* street, Riga, Latvia, EU, LV-1050.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* User: Julia.Svinareva
|
||||
* Date: 11.02.2022
|
||||
*/
|
||||
|
||||
define([
|
||||
'text!common/main/lib/template/SearchPanel.template',
|
||||
'common/main/lib/util/utils',
|
||||
'common/main/lib/component/BaseView',
|
||||
'common/main/lib/component/Layout'
|
||||
], function (template) {
|
||||
'use strict';
|
||||
|
||||
Common.Views.SearchPanel = Common.UI.BaseView.extend(_.extend({
|
||||
el: '#left-panel-search',
|
||||
template: _.template(template),
|
||||
|
||||
initialize: function(options) {
|
||||
_.extend(this, options);
|
||||
Common.UI.BaseView.prototype.initialize.call(this, arguments);
|
||||
|
||||
this.mode = false;
|
||||
|
||||
window.SSE && (this.extendedOptions = Common.localStorage.getBool('sse-search-options-extended', true));
|
||||
},
|
||||
|
||||
render: function(el) {
|
||||
var me = this;
|
||||
if (!this.rendered) {
|
||||
el = el || this.el;
|
||||
$(el).html(this.template({
|
||||
scope: this
|
||||
}));
|
||||
this.$el = $(el);
|
||||
|
||||
this.inputText = new Common.UI.InputField({
|
||||
el: $('#search-adv-text'),
|
||||
placeHolder: this.textFind,
|
||||
allowBlank: true,
|
||||
validateOnBlur: false,
|
||||
style: 'width: 100%;',
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'left',
|
||||
dataHintOffset: 'small'
|
||||
});
|
||||
this.inputText._input.on('input', _.bind(function () {
|
||||
this.fireEvent('search:input', [this.inputText._input.val()]);
|
||||
}, this)).on('keydown', _.bind(function (e) {
|
||||
this.fireEvent('search:keydown', [this.inputText._input.val(), e]);
|
||||
}, this));
|
||||
|
||||
this.inputReplace = new Common.UI.InputField({
|
||||
el: $('#search-adv-replace-text'),
|
||||
placeHolder: this.textReplaceWith,
|
||||
allowBlank: true,
|
||||
validateOnBlur: false,
|
||||
style: 'width: 100%;',
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'left',
|
||||
dataHintOffset: 'small'
|
||||
});
|
||||
|
||||
this.btnBack = new Common.UI.Button({
|
||||
parentEl: $('#search-adv-back'),
|
||||
cls: 'btn-toolbar',
|
||||
iconCls: 'toolbar__icon btn-arrow-up',
|
||||
hint: this.tipPreviousResult,
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'bottom'
|
||||
});
|
||||
this.btnBack.on('click', _.bind(this.onBtnNextClick, this, 'back'));
|
||||
|
||||
this.btnNext = new Common.UI.Button({
|
||||
parentEl: $('#search-adv-next'),
|
||||
cls: 'btn-toolbar',
|
||||
iconCls: 'toolbar__icon btn-arrow-down',
|
||||
hint: this.tipNextResult,
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'bottom'
|
||||
});
|
||||
this.btnNext.on('click', _.bind(this.onBtnNextClick, this, 'next'));
|
||||
|
||||
this.btnReplace = new Common.UI.Button({
|
||||
el: $('#search-adv-replace')
|
||||
});
|
||||
this.btnReplace.on('click', _.bind(this.onReplaceClick, this, 'replace'));
|
||||
|
||||
this.btnReplaceAll = new Common.UI.Button({
|
||||
el: $('#search-adv-replace-all')
|
||||
});
|
||||
this.btnReplaceAll.on('click', _.bind(this.onReplaceClick, this, 'replaceall'));
|
||||
|
||||
this.$reaultsNumber = $('#search-adv-results-number');
|
||||
this.updateResultsNumber('no-results');
|
||||
|
||||
this.chCaseSensitive = new Common.UI.CheckBox({
|
||||
el: $('#search-adv-case-sensitive'),
|
||||
labelText: this.textCaseSensitive,
|
||||
value: false,
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'left',
|
||||
dataHintOffset: 'small'
|
||||
}).on('change', function(field) {
|
||||
me.fireEvent('search:options', ['case-sensitive', field.getValue() === 'checked']);
|
||||
});
|
||||
|
||||
/*this.chUseRegExp = new Common.UI.CheckBox({
|
||||
el: $('#search-adv-use-regexp'),
|
||||
labelText: this.textMatchUsingRegExp,
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'left',
|
||||
dataHintOffset: 'small'
|
||||
}).on('change', function(field) {
|
||||
me.fireEvent('search:options', ['regexp', field.getValue() === 'checked']);
|
||||
});*/
|
||||
|
||||
this.chMatchWord = new Common.UI.CheckBox({
|
||||
el: $('#search-adv-match-word'),
|
||||
labelText: window.SSE ? this.textItemEntireCell : this.textWholeWords,
|
||||
value: false,
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'left',
|
||||
dataHintOffset: 'small'
|
||||
}).on('change', function(field) {
|
||||
me.fireEvent('search:options', ['match-word', field.getValue() === 'checked']);
|
||||
});
|
||||
|
||||
this.buttonClose = new Common.UI.Button({
|
||||
parentEl: $('#search-btn-close', this.$el),
|
||||
cls: 'btn-toolbar',
|
||||
iconCls: 'toolbar__icon btn-close',
|
||||
hint: this.textCloseSearch,
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'medium'
|
||||
});
|
||||
this.buttonClose.on('click', _.bind(this.onClickClosePanel, this));
|
||||
|
||||
this.$resultsContainer = $('#search-results');
|
||||
this.$resultsContainer.hide();
|
||||
|
||||
Common.NotificationCenter.on('search:updateresults', _.bind(this.disableNavButtons, this));
|
||||
if (window.SSE) {
|
||||
this.cmbWithin = new Common.UI.ComboBox({
|
||||
el: $('#search-adv-cmb-within'),
|
||||
menuStyle: 'min-width: 100%;',
|
||||
style: "width: 219px;",
|
||||
editable: false,
|
||||
cls: 'input-group-nr',
|
||||
data: [
|
||||
{ value: 0, displayValue: this.textSheet },
|
||||
{ value: 1, displayValue: this.textWorkbook },
|
||||
{ value: 2, displayValue: this.textSpecificRange}
|
||||
],
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'big'
|
||||
}).on('selected', function(combo, record) {
|
||||
me.fireEvent('search:options', ['within', record.value]);
|
||||
});
|
||||
|
||||
this.inputSelectRange = new Common.UI.InputFieldBtn({
|
||||
el: $('#search-adv-select-range'),
|
||||
placeHolder: this.textSelectDataRange,
|
||||
allowBlank: true,
|
||||
validateOnChange: true,
|
||||
validateOnBlur: true,
|
||||
style: "width: 219px; margin-top: 8px",
|
||||
disabled: true,
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'left',
|
||||
dataHintOffset: 'small'
|
||||
}).on('keyup:after', function(input, e) {
|
||||
me.fireEvent('search:options', ['range', input.getValue(), e.keyCode !== Common.UI.Keys.RETURN]);
|
||||
});
|
||||
|
||||
this.cmbSearch = new Common.UI.ComboBox({
|
||||
el: $('#search-adv-cmb-search'),
|
||||
menuStyle: 'min-width: 100%;',
|
||||
style: "width: 219px;",
|
||||
editable: false,
|
||||
cls: 'input-group-nr',
|
||||
data: [
|
||||
{ value: 0, displayValue: this.textByRows },
|
||||
{ value: 1, displayValue: this.textByColumns }
|
||||
],
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'big'
|
||||
}).on('selected', function(combo, record) {
|
||||
me.fireEvent('search:options', ['search', !record.value]);
|
||||
});
|
||||
|
||||
this.cmbLookIn = new Common.UI.ComboBox({
|
||||
el: $('#search-adv-cmb-look-in'),
|
||||
menuStyle: 'min-width: 100%;',
|
||||
style: "width: 219px;",
|
||||
editable: false,
|
||||
cls: 'input-group-nr',
|
||||
data: [
|
||||
{ value: 0, displayValue: this.textFormulas },
|
||||
{ value: 1, displayValue: this.textValues }
|
||||
],
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'big'
|
||||
}).on('selected', function(combo, record) {
|
||||
me.fireEvent('search:options', ['lookIn', !record.value]);
|
||||
});
|
||||
|
||||
this.$searchOptionsBlock = $('.search-options-block');
|
||||
this.$searchOptionsBlock.show();
|
||||
$('#open-search-options').on('click', _.bind(this.expandSearchOptions, this));
|
||||
|
||||
if (!this.extendedOptions) {
|
||||
this.$searchOptionsBlock.addClass('no-expand');
|
||||
}
|
||||
|
||||
this.cmbWithin.setValue(0);
|
||||
this.cmbSearch.setValue(0);
|
||||
this.cmbLookIn.setValue(0);
|
||||
|
||||
var tableTemplate = '<div class="search-table">' +
|
||||
'<div class="header-item">' + this.textSheet + '</div>' +
|
||||
'<div class="header-item">' + this.textName + '</div>' +
|
||||
'<div class="header-item">' + this.textCell + '</div>' +
|
||||
'<div class="header-item">' + this.textValue + '</div>' +
|
||||
'<div class="header-item">' + this.textFormula + '</div>' +
|
||||
'<div class="ps-container oo search-items"></div>' +
|
||||
'</div>',
|
||||
$resultTable = $(tableTemplate).appendTo(this.$resultsContainer);
|
||||
this.$resultsContainer.scroller = new Common.UI.Scroller({
|
||||
el: $resultTable.find('.search-items'),
|
||||
includePadding: true,
|
||||
useKeyboard: true,
|
||||
minScrollbarLength: 40,
|
||||
alwaysVisibleY: true
|
||||
});
|
||||
} else {
|
||||
this.$resultsContainer.scroller = new Common.UI.Scroller({
|
||||
el: this.$resultsContainer,
|
||||
includePadding: true,
|
||||
useKeyboard: true,
|
||||
minScrollbarLength: 40,
|
||||
alwaysVisibleY: true
|
||||
});
|
||||
}
|
||||
Common.NotificationCenter.on('window:resize', function() {
|
||||
me.$resultsContainer.outerHeight($('#search-box').outerHeight() - $('#search-header').outerHeight() - $('#search-adv-settings').outerHeight());
|
||||
me.$resultsContainer.scroller.update({alwaysVisibleY: true});
|
||||
});
|
||||
}
|
||||
|
||||
this.rendered = true;
|
||||
this.trigger('render:after', this);
|
||||
return this;
|
||||
},
|
||||
|
||||
show: function () {
|
||||
Common.UI.BaseView.prototype.show.call(this,arguments);
|
||||
this.fireEvent('show', this );
|
||||
|
||||
this.$resultsContainer.outerHeight($('#search-box').outerHeight() - $('#search-header').outerHeight() - $('#search-adv-settings').outerHeight());
|
||||
this.$resultsContainer.scroller.update({alwaysVisibleY: true});
|
||||
},
|
||||
|
||||
hide: function () {
|
||||
Common.UI.BaseView.prototype.hide.call(this,arguments);
|
||||
this.fireEvent('hide', this );
|
||||
},
|
||||
|
||||
focus: function(type) {
|
||||
var me = this,
|
||||
el = type === 'replace' ? me.inputReplace.$el : (type === 'range' ? me.inputSelectRange.$el : me.inputText.$el);
|
||||
setTimeout(function(){
|
||||
el.find('input').focus();
|
||||
el.find('input').select();
|
||||
}, 10);
|
||||
},
|
||||
|
||||
setSearchMode: function (mode) {
|
||||
if (this.mode !== mode) {
|
||||
this.$el.find('.edit-setting')[mode !== 'no-replace' ? 'show' : 'hide']();
|
||||
this.$el.find('#search-adv-title').text(mode !== 'no-replace' ? this.textFindAndReplace : this.textFind);
|
||||
this.mode = mode;
|
||||
}
|
||||
},
|
||||
|
||||
ChangeSettings: function(props) {
|
||||
},
|
||||
|
||||
updateResultsNumber: function (current, count) {
|
||||
var text;
|
||||
if (count > 300) {
|
||||
text = this.textTooManyResults;
|
||||
} else {
|
||||
text = current === 'no-results' ? this.textNoSearchResults : (!count ? this.textNoMatches : Common.Utils.String.format(this.textSearchResults, current + 1, count));
|
||||
}
|
||||
this.$reaultsNumber.text(text);
|
||||
this.disableReplaceButtons(!count);
|
||||
},
|
||||
|
||||
onClickClosePanel: function() {
|
||||
Common.NotificationCenter.trigger('leftmenu:change', 'hide');
|
||||
this.fireEvent('hide', this );
|
||||
},
|
||||
|
||||
onBtnNextClick: function (action) {
|
||||
this.fireEvent('search:'+action, [this.inputText.getValue(), true]);
|
||||
},
|
||||
|
||||
onReplaceClick: function (action) {
|
||||
this.fireEvent('search:'+action, [this.inputText.getValue(), this.inputReplace.getValue()]);
|
||||
},
|
||||
|
||||
getSettings: function() {
|
||||
return {
|
||||
textsearch: this.inputText.getValue(),
|
||||
matchcase: this.chCaseSensitive.checked,
|
||||
matchword: this.chMatchWord.checked
|
||||
};
|
||||
},
|
||||
|
||||
expandSearchOptions: function () {
|
||||
this.extendedOptions = !this.extendedOptions;
|
||||
this.$searchOptionsBlock[this.extendedOptions ? 'removeClass' : 'addClass']('no-expand');
|
||||
Common.localStorage.setBool('sse-search-options-extended', this.extendedOptions);
|
||||
|
||||
this.$resultsContainer.outerHeight($('#search-box').outerHeight() - $('#search-header').outerHeight() - $('#search-adv-settings').outerHeight());
|
||||
this.$resultsContainer.scroller.update({alwaysVisibleY: true});
|
||||
},
|
||||
|
||||
setFindText: function (val) {
|
||||
this.inputText.setValue(val);
|
||||
},
|
||||
|
||||
clearResultsNumber: function () {
|
||||
this.updateResultsNumber('no-results');
|
||||
},
|
||||
|
||||
disableNavButtons: function (resultNumber, allResults) {
|
||||
var disable = this.inputText._input.val() === '';
|
||||
this.btnBack.setDisabled(disable || !allResults || resultNumber === 0);
|
||||
this.btnNext.setDisabled(disable || !allResults || resultNumber + 1 === allResults);
|
||||
},
|
||||
|
||||
disableReplaceButtons: function (disable) {
|
||||
this.btnReplace.setDisabled(disable);
|
||||
this.btnReplaceAll.setDisabled(disable);
|
||||
},
|
||||
|
||||
textFind: 'Find',
|
||||
textFindAndReplace: 'Find and replace',
|
||||
textCloseSearch: 'Close search',
|
||||
textReplace: 'Replace',
|
||||
textReplaceAll: 'Replace All',
|
||||
textSearchResults: 'Search results: {0}/{1}',
|
||||
textReplaceWith: 'Replace with',
|
||||
textCaseSensitive: 'Case sensitive',
|
||||
textMatchUsingRegExp: 'Match using regular expressions',
|
||||
textWholeWords: 'Whole words only',
|
||||
textWithin: 'Within',
|
||||
textSelectDataRange: 'Select Data range',
|
||||
textSearch: 'Search',
|
||||
textLookIn: 'Look in',
|
||||
textSheet: 'Sheet',
|
||||
textWorkbook: 'Workbook',
|
||||
textSpecificRange: 'Specific range',
|
||||
textByRows: 'By rows',
|
||||
textByColumns: 'By columns',
|
||||
textFormulas: 'Formulas',
|
||||
textValues: 'Values',
|
||||
textSearchOptions: 'Search options',
|
||||
textNoMatches: 'No matches',
|
||||
textNoSearchResults: 'No search results',
|
||||
textItemEntireCell: 'Entire cell contents',
|
||||
textTooManyResults: 'There are too many results to show here',
|
||||
tipPreviousResult: 'Previous result',
|
||||
tipNextResult: 'Next result',
|
||||
textName: 'Name',
|
||||
textCell: 'Cell',
|
||||
textValue: 'Value',
|
||||
textFormula: 'Formula'
|
||||
|
||||
}, Common.Views.SearchPanel || {}));
|
||||
});
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 305 B After Width: | Height: | Size: 305 B |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
BIN
apps/common/main/resources/help/de/images/setpassword.png
Normal file
After Width: | Height: | Size: 26 KiB |
19
apps/common/main/resources/help/download.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<html>
|
||||
<head>
|
||||
<style>
|
||||
.centered {
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="centered">
|
||||
<h1>There is no help installed</h1>
|
||||
<h2>please, download it from <a href='#'>www.onlyoffice.com</a></h1>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 627 B After Width: | Height: | Size: 627 B |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 279 B After Width: | Height: | Size: 279 B |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
BIN
apps/common/main/resources/help/en/images/setpassword.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 279 B After Width: | Height: | Size: 279 B |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |