Merge branch release/v7.1.0 into master
|
@ -56,6 +56,7 @@
|
||||||
edit: ["Group1", ""] // current user can edit comments made by users from Group1 and users without a group.
|
edit: ["Group1", ""] // current user can edit comments made by users from Group1 and users without a group.
|
||||||
remove: ["Group1", ""] // current user can remove comments made by users from Group1 and users without a group.
|
remove: ["Group1", ""] // current user can remove comments made by users from Group1 and users without a group.
|
||||||
},
|
},
|
||||||
|
userInfoGroups: ["Group1", ""], // show tooltips/cursors/info in header only for users in userInfoGroups groups. [""] - means users without group, [] - don't show any users, null/undefined/"" - show all users
|
||||||
protect: <can protect document> // default = true. show/hide protect tab or protect buttons
|
protect: <can protect document> // default = true. show/hide protect tab or protect buttons
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -84,7 +85,7 @@
|
||||||
user: {
|
user: {
|
||||||
id: 'user id',
|
id: 'user id',
|
||||||
name: 'user name',
|
name: 'user name',
|
||||||
group: 'group name' // for customization.reviewPermissions parameter
|
group: 'group name' // for customization.reviewPermissions or permissions.reviewGroups or permissions.commentGroups. Can be multiple groups separated by commas (,) : 'Group1' or 'Group1,Group2'
|
||||||
},
|
},
|
||||||
recent: [
|
recent: [
|
||||||
{
|
{
|
||||||
|
@ -145,15 +146,57 @@
|
||||||
reviewDisplay: 'original', // original for viewer, markup for editor
|
reviewDisplay: 'original', // original for viewer, markup for editor
|
||||||
trackChanges: undefined // true/false - open editor with track changes mode on/off,
|
trackChanges: undefined // true/false - open editor with track changes mode on/off,
|
||||||
},
|
},
|
||||||
|
layout: { // hide elements, but don't disable feature
|
||||||
|
toolbar: {
|
||||||
|
file: { // menu file
|
||||||
|
close: false / true, // close menu button
|
||||||
|
settings: false / true, // advanced settings
|
||||||
|
info: false / true // document info
|
||||||
|
save: false/true // save button
|
||||||
|
} / false / true,
|
||||||
|
home: {
|
||||||
|
mailmerge: false/true // mail merge button
|
||||||
|
},
|
||||||
|
layout: false / true, // layout tab
|
||||||
|
references: false / true, // de references tab
|
||||||
|
collaboration: false / true // collaboration tab
|
||||||
|
protect: false / true, // protect tab
|
||||||
|
plugins: false / true // plugins tab
|
||||||
|
view: {
|
||||||
|
navigation: false/true // navigation button in de
|
||||||
|
} / false / true, // view tab
|
||||||
|
save: false/true // save button on toolbar in
|
||||||
|
} / false / true, // use instead of customization.toolbar,
|
||||||
|
header: {
|
||||||
|
users: false/true // users list button
|
||||||
|
save: false/true // save button
|
||||||
|
},
|
||||||
|
leftMenu: {
|
||||||
|
navigation: false/true,
|
||||||
|
spellcheck: false/true // spellcheck button in sse
|
||||||
|
} / false / true, // use instead of customization.leftMenu
|
||||||
|
rightMenu: false/true, // use instead of customization.rightMenu
|
||||||
|
statusBar: {
|
||||||
|
textLang: false/true // text language button in de/pe
|
||||||
|
docLang: false/true // document language button in de/pe
|
||||||
|
actionStatus: false/true // status of operation
|
||||||
|
} / false / true, // use instead of customization.statusBar
|
||||||
|
},
|
||||||
|
features: { // disable feature
|
||||||
|
spellcheck: {
|
||||||
|
mode: false/true // init value in de/pe
|
||||||
|
change: false/true // hide/show feature in de/pe/sse
|
||||||
|
} / false / true // if false/true - use as init value in de/pe. use instead of customization.spellcheck parameter
|
||||||
|
},
|
||||||
chat: true,
|
chat: true,
|
||||||
comments: true,
|
comments: true,
|
||||||
zoom: 100,
|
zoom: 100,
|
||||||
compactToolbar: false,
|
compactToolbar: false,
|
||||||
leftMenu: true,
|
leftMenu: true, // must be deprecated. use layout.leftMenu instead
|
||||||
rightMenu: true,
|
rightMenu: true, // must be deprecated. use layout.rightMenu instead
|
||||||
hideRightMenu: false, // hide or show right panel on first loading
|
hideRightMenu: false, // hide or show right panel on first loading
|
||||||
toolbar: true,
|
toolbar: true, // must be deprecated. use layout.toolbar instead
|
||||||
statusBar: true,
|
statusBar: true, // must be deprecated. use layout.statusBar instead
|
||||||
autosave: true,
|
autosave: true,
|
||||||
forcesave: false,
|
forcesave: false,
|
||||||
commentAuthorOnly: false, // must be deprecated. use permissions.editCommentAuthorOnly and permissions.deleteCommentAuthorOnly instead
|
commentAuthorOnly: false, // must be deprecated. use permissions.editCommentAuthorOnly and permissions.deleteCommentAuthorOnly instead
|
||||||
|
@ -163,7 +206,7 @@
|
||||||
toolbarNoTabs: false,
|
toolbarNoTabs: false,
|
||||||
toolbarHideFileName: false,
|
toolbarHideFileName: false,
|
||||||
reviewDisplay: 'original', // must be deprecated. use customization.review.reviewDisplay instead
|
reviewDisplay: 'original', // must be deprecated. use customization.review.reviewDisplay instead
|
||||||
spellcheck: true,
|
spellcheck: true, // must be deprecated. use customization.features.spellcheck instead
|
||||||
compatibleFeatures: false,
|
compatibleFeatures: false,
|
||||||
unit: 'cm' // cm, pt, inch,
|
unit: 'cm' // cm, pt, inch,
|
||||||
mentionShare : true // customize tooltip for mention,
|
mentionShare : true // customize tooltip for mention,
|
||||||
|
@ -329,36 +372,6 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var _callLocalStorage = function(data) {
|
|
||||||
if (data.cmd == 'get') {
|
|
||||||
if (data.keys && data.keys.length) {
|
|
||||||
var af = data.keys.split(','), re = af[0];
|
|
||||||
for (i = 0; ++i < af.length;)
|
|
||||||
re += '|' + af[i];
|
|
||||||
|
|
||||||
re = new RegExp(re); k = {};
|
|
||||||
for (i in localStorage)
|
|
||||||
if (re.test(i)) k[i] = localStorage[i];
|
|
||||||
} else {
|
|
||||||
k = localStorage;
|
|
||||||
}
|
|
||||||
|
|
||||||
_sendCommand({
|
|
||||||
command: 'internalCommand',
|
|
||||||
data: {
|
|
||||||
type: 'localstorage',
|
|
||||||
keys: k
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else
|
|
||||||
if (data.cmd == 'set') {
|
|
||||||
var k = data.keys, i;
|
|
||||||
for (i in k) {
|
|
||||||
localStorage.setItem(i, k[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var _onMessage = function(msg) {
|
var _onMessage = function(msg) {
|
||||||
if ( msg ) {
|
if ( msg ) {
|
||||||
if ( msg.type === "onExternalPluginMessage" ) {
|
if ( msg.type === "onExternalPluginMessage" ) {
|
||||||
|
@ -373,8 +386,6 @@
|
||||||
|
|
||||||
if (msg.event === 'onRequestEditRights' && !handler) {
|
if (msg.event === 'onRequestEditRights' && !handler) {
|
||||||
_applyEditRights(false, 'handler isn\'t defined');
|
_applyEditRights(false, 'handler isn\'t defined');
|
||||||
} else if (msg.event === 'onInternalMessage' && msg.data && msg.data.type == 'localstorage') {
|
|
||||||
_callLocalStorage(msg.data.data);
|
|
||||||
} else {
|
} else {
|
||||||
if (msg.event === 'onAppReady') {
|
if (msg.event === 'onAppReady') {
|
||||||
_onAppReady();
|
_onAppReady();
|
||||||
|
@ -421,7 +432,7 @@
|
||||||
|
|
||||||
if (typeof _config.document.fileType === 'string' && _config.document.fileType != '') {
|
if (typeof _config.document.fileType === 'string' && _config.document.fileType != '') {
|
||||||
_config.document.fileType = _config.document.fileType.toLowerCase();
|
_config.document.fileType = _config.document.fileType.toLowerCase();
|
||||||
var type = /^(?:(xls|xlsx|ods|csv|xlst|xlsy|gsheet|xlsm|xlt|xltm|xltx|fods|ots)|(pps|ppsx|ppt|pptx|odp|pptt|ppty|gslides|pot|potm|potx|ppsm|pptm|fodp|otp)|(doc|docx|doct|odt|gdoc|txt|rtf|pdf|mht|htm|html|epub|djvu|xps|oxps|docm|dot|dotm|dotx|fodt|ott|fb2|xml|oform|docxf))$/
|
var type = /^(?:(xls|xlsx|ods|csv|xlst|xlsy|gsheet|xlsm|xlt|xltm|xltx|fods|ots|xlsb)|(pps|ppsx|ppt|pptx|odp|pptt|ppty|gslides|pot|potm|potx|ppsm|pptm|fodp|otp)|(doc|docx|doct|odt|gdoc|txt|rtf|pdf|mht|htm|html|epub|djvu|xps|oxps|docm|dot|dotm|dotx|fodt|ott|fb2|xml|oform|docxf))$/
|
||||||
.exec(_config.document.fileType);
|
.exec(_config.document.fileType);
|
||||||
if (!type) {
|
if (!type) {
|
||||||
window.alert("The \"document.fileType\" parameter for the config object is invalid. Please correct it.");
|
window.alert("The \"document.fileType\" parameter for the config object is invalid. Please correct it.");
|
||||||
|
@ -841,9 +852,24 @@
|
||||||
return extensionParams["url"] + "apps/";
|
return extensionParams["url"] + "apps/";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getTestPath() {
|
||||||
|
var scripts = document.getElementsByTagName('script'),
|
||||||
|
match;
|
||||||
|
|
||||||
|
for (var i = scripts.length - 1; i >= 0; i--) {
|
||||||
|
match = scripts[i].src.match(/(.*)apps\/api\/documents\/api.js/i);
|
||||||
|
if (match) {
|
||||||
|
return match[1] + "test/";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
function getAppPath(config) {
|
function getAppPath(config) {
|
||||||
var extensionPath = getExtensionPath(),
|
var extensionPath = getExtensionPath(),
|
||||||
path = extensionPath ? extensionPath : getBasePath(),
|
path = extensionPath ? extensionPath : (config.type=="test" ? getTestPath() : getBasePath()),
|
||||||
appMap = {
|
appMap = {
|
||||||
'text': 'documenteditor',
|
'text': 'documenteditor',
|
||||||
'text-pdf': 'documenteditor',
|
'text-pdf': 'documenteditor',
|
||||||
|
@ -859,7 +885,7 @@
|
||||||
app = appMap[config.documentType.toLowerCase()];
|
app = appMap[config.documentType.toLowerCase()];
|
||||||
} else
|
} else
|
||||||
if (!!config.document && typeof config.document.fileType === 'string') {
|
if (!!config.document && typeof config.document.fileType === 'string') {
|
||||||
var type = /^(?:(xls|xlsx|ods|csv|xlst|xlsy|gsheet|xlsm|xlt|xltm|xltx|fods|ots)|(pps|ppsx|ppt|pptx|odp|pptt|ppty|gslides|pot|potm|potx|ppsm|pptm|fodp|otp))$/
|
var type = /^(?:(xls|xlsx|ods|csv|xlst|xlsy|gsheet|xlsm|xlt|xltm|xltx|fods|ots|xlsb)|(pps|ppsx|ppt|pptx|odp|pptt|ppty|gslides|pot|potm|potx|ppsm|pptm|fodp|otp))$/
|
||||||
.exec(config.document.fileType);
|
.exec(config.document.fileType);
|
||||||
if (type) {
|
if (type) {
|
||||||
if (typeof type[1] === 'string') app = appMap['cell']; else
|
if (typeof type[1] === 'string') app = appMap['cell']; else
|
||||||
|
@ -906,14 +932,17 @@
|
||||||
if (config.editorConfig.customization.loaderName !== 'none') params += "&customer=" + encodeURIComponent(config.editorConfig.customization.loaderName);
|
if (config.editorConfig.customization.loaderName !== 'none') params += "&customer=" + encodeURIComponent(config.editorConfig.customization.loaderName);
|
||||||
} else
|
} else
|
||||||
params += "&customer={{APP_CUSTOMER_NAME}}";
|
params += "&customer={{APP_CUSTOMER_NAME}}";
|
||||||
if ( (typeof(config.editorConfig.customization) == 'object') && config.editorConfig.customization.loaderLogo) {
|
if (typeof(config.editorConfig.customization) == 'object') {
|
||||||
if (config.editorConfig.customization.loaderLogo !== '') params += "&logo=" + encodeURIComponent(config.editorConfig.customization.loaderLogo);
|
if ( config.editorConfig.customization.loaderLogo && config.editorConfig.customization.loaderLogo !== '') {
|
||||||
} else if ( (typeof(config.editorConfig.customization) == 'object') && config.editorConfig.customization.logo) {
|
params += "&logo=" + encodeURIComponent(config.editorConfig.customization.loaderLogo);
|
||||||
if (config.type=='embedded' && (config.editorConfig.customization.logo.image || config.editorConfig.customization.logo.imageEmbedded))
|
}
|
||||||
params += "&headerlogo=" + encodeURIComponent(config.editorConfig.customization.logo.image || config.editorConfig.customization.logo.imageEmbedded);
|
if ( config.editorConfig.customization.logo ) {
|
||||||
else if (config.type!='embedded' && (config.editorConfig.customization.logo.image || config.editorConfig.customization.logo.imageDark)) {
|
if (config.type=='embedded' && (config.editorConfig.customization.logo.image || config.editorConfig.customization.logo.imageEmbedded))
|
||||||
config.editorConfig.customization.logo.image && (params += "&headerlogo=" + encodeURIComponent(config.editorConfig.customization.logo.image));
|
params += "&headerlogo=" + encodeURIComponent(config.editorConfig.customization.logo.image || config.editorConfig.customization.logo.imageEmbedded);
|
||||||
config.editorConfig.customization.logo.imageDark && (params += "&headerlogodark=" + encodeURIComponent(config.editorConfig.customization.logo.imageDark));
|
else if (config.type!='embedded' && (config.editorConfig.customization.logo.image || config.editorConfig.customization.logo.imageDark)) {
|
||||||
|
config.editorConfig.customization.logo.image && (params += "&headerlogo=" + encodeURIComponent(config.editorConfig.customization.logo.image));
|
||||||
|
config.editorConfig.customization.logo.imageDark && (params += "&headerlogodark=" + encodeURIComponent(config.editorConfig.customization.logo.imageDark));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -933,8 +962,6 @@
|
||||||
|
|
||||||
if (config.editorConfig && config.editorConfig.customization && (config.editorConfig.customization.toolbar===false))
|
if (config.editorConfig && config.editorConfig.customization && (config.editorConfig.customization.toolbar===false))
|
||||||
params += "&toolbar=false";
|
params += "&toolbar=false";
|
||||||
else if (config.document && config.document.permissions && (config.document.permissions.edit === false && config.document.permissions.fillForms ))
|
|
||||||
params += "&toolbar=true";
|
|
||||||
|
|
||||||
if (config.parentOrigin)
|
if (config.parentOrigin)
|
||||||
params += "&parentOrigin=" + config.parentOrigin;
|
params += "&parentOrigin=" + config.parentOrigin;
|
||||||
|
@ -945,6 +972,25 @@
|
||||||
return params;
|
return params;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getFrameTitle(config) {
|
||||||
|
var title = 'Powerful online editor for text documents, spreadsheets, and presentations';
|
||||||
|
var appMap = {
|
||||||
|
'text': 'text documents',
|
||||||
|
'spreadsheet': 'spreadsheets',
|
||||||
|
'presentation': 'presentations',
|
||||||
|
'word': 'text documents',
|
||||||
|
'cell': 'spreadsheets',
|
||||||
|
'slide': 'presentations'
|
||||||
|
};
|
||||||
|
|
||||||
|
if (typeof config.documentType === 'string') {
|
||||||
|
var app = appMap[config.documentType.toLowerCase()];
|
||||||
|
if (app)
|
||||||
|
title = 'Powerful online editor for ' + app;
|
||||||
|
}
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
function createIframe(config) {
|
function createIframe(config) {
|
||||||
var iframe = document.createElement("iframe");
|
var iframe = document.createElement("iframe");
|
||||||
|
|
||||||
|
@ -954,6 +1000,7 @@
|
||||||
iframe.align = "top";
|
iframe.align = "top";
|
||||||
iframe.frameBorder = 0;
|
iframe.frameBorder = 0;
|
||||||
iframe.name = "frameEditor";
|
iframe.name = "frameEditor";
|
||||||
|
iframe.title = getFrameTitle(config);
|
||||||
iframe.allowFullscreen = true;
|
iframe.allowFullscreen = true;
|
||||||
iframe.setAttribute("allowfullscreen",""); // for IE11
|
iframe.setAttribute("allowfullscreen",""); // for IE11
|
||||||
iframe.setAttribute("onmousewheel",""); // for Safari on Mac
|
iframe.setAttribute("onmousewheel",""); // for Safari on Mac
|
||||||
|
|
|
@ -99,13 +99,13 @@
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|
||||||
&.top {
|
&.top {
|
||||||
top: 40px;
|
top: 28px;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.bottom {
|
&.bottom {
|
||||||
top: 0;
|
top: 0;
|
||||||
bottom: 38px;
|
bottom: 28px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 40px;
|
height: 28px;
|
||||||
|
|
||||||
-webkit-box-shadow: inset 0 -1px 0 @toolbarBorderColor, inset 0 1px 0 @toolbarBorderShadowColor;
|
-webkit-box-shadow: inset 0 -1px 0 @toolbarBorderColor, inset 0 1px 0 @toolbarBorderShadowColor;
|
||||||
//-moz-box-shadow: inset 0 -1px 0 @toolbarBorderColor, inset 0 1px 0 @toolbarBorderShadowColor;
|
//-moz-box-shadow: inset 0 -1px 0 @toolbarBorderColor, inset 0 1px 0 @toolbarBorderShadowColor;
|
||||||
|
@ -137,7 +137,7 @@
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 38px;
|
height: 28px;
|
||||||
|
|
||||||
-webkit-box-shadow: inset 0 1px 0 @toolbarBorderColor, inset 0 2px 0 @toolbarBorderShadowColor;
|
-webkit-box-shadow: inset 0 1px 0 @toolbarBorderColor, inset 0 2px 0 @toolbarBorderShadowColor;
|
||||||
//-moz-box-shadow: inset 0 1px 0 @toolbarBorderColor, inset 0 2px 0 @toolbarBorderShadowColor;
|
//-moz-box-shadow: inset 0 1px 0 @toolbarBorderColor, inset 0 2px 0 @toolbarBorderShadowColor;
|
||||||
|
|
|
@ -80,6 +80,7 @@
|
||||||
@import "../../../../common/main/resources/less/spinner.less";
|
@import "../../../../common/main/resources/less/spinner.less";
|
||||||
@import "../../../../common/main/resources/less/checkbox.less";
|
@import "../../../../common/main/resources/less/checkbox.less";
|
||||||
@import "../../../../common/main/resources/less/opendialog.less";
|
@import "../../../../common/main/resources/less/opendialog.less";
|
||||||
|
@import "../../../../common/main/resources/less/advanced-settings-window.less";
|
||||||
|
|
||||||
@toolbarBorderColor: @border-toolbar-ie;
|
@toolbarBorderColor: @border-toolbar-ie;
|
||||||
@toolbarBorderColor: @border-toolbar;
|
@toolbarBorderColor: @border-toolbar;
|
||||||
|
@ -456,6 +457,14 @@
|
||||||
background-position: -@icon-width*4 0;
|
background-position: -@icon-width*4 0;
|
||||||
background-position: -@icon-width*4 @icon-normal-top;
|
background-position: -@icon-width*4 @icon-normal-top;
|
||||||
}
|
}
|
||||||
|
&.zoom-in {
|
||||||
|
background-position: -@icon-width*5 0;
|
||||||
|
background-position: -@icon-width*5 @icon-normal-top;
|
||||||
|
}
|
||||||
|
&.zoom-out {
|
||||||
|
background-position: -@icon-width*6 0;
|
||||||
|
background-position: -@icon-width*6 @icon-normal-top;
|
||||||
|
}
|
||||||
&.zoom-up {
|
&.zoom-up {
|
||||||
background-position: -@icon-width*5 -@icon-height;
|
background-position: -@icon-width*5 -@icon-height;
|
||||||
}
|
}
|
||||||
|
@ -624,6 +633,32 @@
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.menu-zoom {
|
||||||
|
line-height: @line-height-base;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
padding: 5px 5px 5px 28px;
|
||||||
|
float: left;
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: 11px;
|
||||||
|
margin: 0px;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.zoom {
|
||||||
|
padding: 5px 3px;
|
||||||
|
float: right;
|
||||||
|
min-width: 40px;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: 11px;
|
||||||
|
padding-bottom: 0px;
|
||||||
|
}
|
||||||
|
.mi-icon {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.font-size-small {
|
.font-size-small {
|
||||||
.fontsize(@font-size-small);
|
.fontsize(@font-size-small);
|
||||||
}
|
}
|
||||||
|
@ -634,4 +669,19 @@
|
||||||
|
|
||||||
.font-size-large {
|
.font-size-large {
|
||||||
.fontsize(@font-size-large);
|
.fontsize(@font-size-large);
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-field-btn {
|
||||||
|
.select-button {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-error {
|
||||||
|
&:before {
|
||||||
|
right: 3px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
input {
|
||||||
|
padding-right: 0;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -64,10 +64,18 @@ define([
|
||||||
return this.filter(function(item){return item.get('online') && !item.get('view')}).length;
|
return this.filter(function(item){return item.get('online') && !item.get('view')}).length;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getVisibleEditingCount: function() {
|
||||||
|
return this.filter(function(item){return item.get('online') && !item.get('view') && !item.get('hidden')}).length;
|
||||||
|
},
|
||||||
|
|
||||||
getEditingOriginalCount: function() {
|
getEditingOriginalCount: function() {
|
||||||
return this.chain().filter(function(item){return item.get('online') && !item.get('view')}).groupBy(function(item) {return item.get('idOriginal');}).size().value();
|
return this.chain().filter(function(item){return item.get('online') && !item.get('view')}).groupBy(function(item) {return item.get('idOriginal');}).size().value();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getVisibleEditingOriginalCount: function() {
|
||||||
|
return this.chain().filter(function(item){return item.get('online') && !item.get('view') && !item.get('hidden')}).groupBy(function(item) {return item.get('idOriginal');}).size().value();
|
||||||
|
},
|
||||||
|
|
||||||
findUser: function(id) {
|
findUser: function(id) {
|
||||||
return this.find(
|
return this.find(
|
||||||
function(model){
|
function(model){
|
||||||
|
|
|
@ -277,8 +277,24 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
updateFormControl: function(record) {
|
updateFormControl: function(record) {
|
||||||
$(this.el).find('.form-control > .image')
|
if (record)
|
||||||
.css('background-position', '10px -' + record.get('offsety') + 'px');
|
$(this.el).find('.form-control > .image')
|
||||||
|
.css('background-position', '10px -' + record.get('offsety') + 'px').show();
|
||||||
|
else
|
||||||
|
$(this.el).find('.form-control > .image').hide();
|
||||||
|
},
|
||||||
|
|
||||||
|
setValue: function(value) {
|
||||||
|
this._selectedItem = (value===null || value===undefined) ? undefined : _.find(this.store.models, function(item) {
|
||||||
|
if ( value<item.attributes.value+0.01 && value>item.attributes.value-0.01) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.selected', $(this.el)).removeClass('selected');
|
||||||
|
|
||||||
|
this.updateFormControl(this._selectedItem);
|
||||||
|
this._selectedItem && $('#' + this._selectedItem.get('id'), $(this.el)).addClass('selected');
|
||||||
}
|
}
|
||||||
}, Common.UI.ComboBorderType || {}));
|
}, Common.UI.ComboBorderType || {}));
|
||||||
|
|
||||||
|
|
|
@ -190,6 +190,7 @@ define([
|
||||||
el.on('click', '.form-control', _.bind(this.onInputClick, this));
|
el.on('click', '.form-control', _.bind(this.onInputClick, this));
|
||||||
this._input.attr('readonly', 'readonly');
|
this._input.attr('readonly', 'readonly');
|
||||||
this._input.attr('data-can-copy', false);
|
this._input.attr('data-can-copy', false);
|
||||||
|
this._input.on('mousedown',function (e){e.preventDefault();})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (me.options.hint) {
|
if (me.options.hint) {
|
||||||
|
@ -544,6 +545,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
setDisabled: function(disabled) {
|
setDisabled: function(disabled) {
|
||||||
|
disabled = !!disabled;
|
||||||
this.disabled = disabled;
|
this.disabled = disabled;
|
||||||
|
|
||||||
if (!this.rendered)
|
if (!this.rendered)
|
||||||
|
|
|
@ -457,6 +457,7 @@ define([
|
||||||
this.trigger('show:after', this, e);
|
this.trigger('show:after', this, e);
|
||||||
this.flushVisibleFontsTiles();
|
this.flushVisibleFontsTiles();
|
||||||
this.updateVisibleFontsTiles(null, 0);
|
this.updateVisibleFontsTiles(null, 0);
|
||||||
|
Common.Utils.isGecko && this.scroller && this.scroller.update();
|
||||||
} else {
|
} else {
|
||||||
Common.UI.ComboBox.prototype.onAfterShowMenu.apply(this, arguments);
|
Common.UI.ComboBox.prototype.onAfterShowMenu.apply(this, arguments);
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,6 +81,7 @@ define([
|
||||||
this.style = this.options.style;
|
this.style = this.options.style;
|
||||||
this.hint = this.options.hint;
|
this.hint = this.options.hint;
|
||||||
this.store = this.options.store || new Common.UI.DataViewStore();
|
this.store = this.options.store || new Common.UI.DataViewStore();
|
||||||
|
this.groups = this.options.groups;
|
||||||
this.itemWidth = this.options.itemWidth;
|
this.itemWidth = this.options.itemWidth;
|
||||||
this.itemHeight = this.options.itemHeight;
|
this.itemHeight = this.options.itemHeight;
|
||||||
this.menuMaxHeight = this.options.menuMaxHeight;
|
this.menuMaxHeight = this.options.menuMaxHeight;
|
||||||
|
@ -92,18 +93,19 @@ define([
|
||||||
this.needFillComboView = false;
|
this.needFillComboView = false;
|
||||||
this.minWidth = this.options.minWidth;
|
this.minWidth = this.options.minWidth;
|
||||||
this.delayRenderTips = this.options.delayRenderTips || false;
|
this.delayRenderTips = this.options.delayRenderTips || false;
|
||||||
|
this.itemTemplate = this.options.itemTemplate || _.template([
|
||||||
|
'<div class="style" id="<%= id %>">',
|
||||||
|
'<img src="<%= imageUrl %>" width="' + this.itemWidth + '" height="' + this.itemHeight + '" + <% if(typeof imageUrl === "undefined" || imageUrl===null || imageUrl==="") { %> style="visibility: hidden;" <% } %>/>',
|
||||||
|
'<% if (typeof title !== "undefined") {%>',
|
||||||
|
'<span class="title"><%= title %></span>',
|
||||||
|
'<% } %>',
|
||||||
|
'</div>'
|
||||||
|
].join(''));
|
||||||
|
|
||||||
this.fieldPicker = new Common.UI.DataView({
|
this.fieldPicker = new Common.UI.DataView({
|
||||||
cls: 'field-picker',
|
cls: 'field-picker',
|
||||||
allowScrollbar: false,
|
allowScrollbar: false,
|
||||||
itemTemplate : _.template([
|
itemTemplate : this.itemTemplate,
|
||||||
'<div class="style" id="<%= id %>">',
|
|
||||||
'<img src="<%= imageUrl %>" width="' + this.itemWidth + '" height="' + this.itemHeight + '"/>',
|
|
||||||
'<% if (typeof title !== "undefined") {%>',
|
|
||||||
'<span class="title"><%= title %></span>',
|
|
||||||
'<% } %>',
|
|
||||||
'</div>'
|
|
||||||
].join('')),
|
|
||||||
delayRenderTips: this.delayRenderTips
|
delayRenderTips: this.delayRenderTips
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -128,15 +130,9 @@ define([
|
||||||
restoreHeight: this.menuMaxHeight,
|
restoreHeight: this.menuMaxHeight,
|
||||||
style: 'max-height: '+this.menuMaxHeight+'px;',
|
style: 'max-height: '+this.menuMaxHeight+'px;',
|
||||||
enableKeyEvents: this.options.enableKeyEvents,
|
enableKeyEvents: this.options.enableKeyEvents,
|
||||||
|
groups: this.groups,
|
||||||
store: this.store,
|
store: this.store,
|
||||||
itemTemplate : _.template([
|
itemTemplate : this.itemTemplate,
|
||||||
'<div class="style" id="<%= id %>">',
|
|
||||||
'<img src="<%= imageUrl %>" width="' + this.itemWidth + '" height="' + this.itemHeight + '"/>',
|
|
||||||
'<% if (typeof title !== "undefined") {%>',
|
|
||||||
'<span class="title"><%= title %></span>',
|
|
||||||
'<% } %>',
|
|
||||||
'</div>'
|
|
||||||
].join('')),
|
|
||||||
delayRenderTips: this.delayRenderTips
|
delayRenderTips: this.delayRenderTips
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -259,6 +255,7 @@ define([
|
||||||
var picker = this.menuPicker;
|
var picker = this.menuPicker;
|
||||||
if (picker) {
|
if (picker) {
|
||||||
var record = picker.getSelectedRec();
|
var record = picker.getSelectedRec();
|
||||||
|
this.itemMarginLeft = undefined;
|
||||||
this.fillComboView(record || picker.store.at(0), !!record, true);
|
this.fillComboView(record || picker.store.at(0), !!record, true);
|
||||||
|
|
||||||
picker.onResize();
|
picker.onResize();
|
||||||
|
@ -384,6 +381,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
setDisabled: function(disabled) {
|
setDisabled: function(disabled) {
|
||||||
|
disabled = !!disabled;
|
||||||
this.disabled = disabled;
|
this.disabled = disabled;
|
||||||
|
|
||||||
if (!this.rendered)
|
if (!this.rendered)
|
||||||
|
@ -418,6 +416,9 @@ define([
|
||||||
if (forceFill || !me.fieldPicker.store.findWhere({'id': record.get('id')})){
|
if (forceFill || !me.fieldPicker.store.findWhere({'id': record.get('id')})){
|
||||||
if (me.itemMarginLeft===undefined) {
|
if (me.itemMarginLeft===undefined) {
|
||||||
var div = $($(this.menuPicker.el).find('.inner > div:not(.grouped-data):not(.ps-scrollbar-x-rail):not(.ps-scrollbar-y-rail)')[0]);
|
var div = $($(this.menuPicker.el).find('.inner > div:not(.grouped-data):not(.ps-scrollbar-x-rail):not(.ps-scrollbar-y-rail)')[0]);
|
||||||
|
if (!div || div.length<1) { // try to find items in groups
|
||||||
|
div = $($(this.menuPicker.el).find('.inner .group-items-container > div:not(.grouped-data):not(.ps-scrollbar-x-rail):not(.ps-scrollbar-y-rail)')[0]);
|
||||||
|
}
|
||||||
if (div.length > 0) {
|
if (div.length > 0) {
|
||||||
me.itemMarginLeft = parseInt(div.css('margin-left'));
|
me.itemMarginLeft = parseInt(div.css('margin-left'));
|
||||||
me.itemMarginRight = parseInt(div.css('margin-right'));
|
me.itemMarginRight = parseInt(div.css('margin-right'));
|
||||||
|
@ -458,6 +459,7 @@ define([
|
||||||
me.resumeEvents();
|
me.resumeEvents();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return me.fieldPicker.store.models; // return list of visible items
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
490
apps/common/main/lib/component/ComboDataViewShape.js
Normal file
|
@ -0,0 +1,490 @@
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* (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
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* ComboDataView.js
|
||||||
|
*
|
||||||
|
* Created by Julia Svinareva on 6/10/21
|
||||||
|
* Copyright (c) 2021 Ascensio System SIA. All rights reserved.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (Common === undefined)
|
||||||
|
var Common = {};
|
||||||
|
|
||||||
|
define([
|
||||||
|
'common/main/lib/component/BaseView',
|
||||||
|
'common/main/lib/component/DataView'
|
||||||
|
], function () {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
Common.UI.ComboDataViewShape = Common.UI.BaseView.extend({
|
||||||
|
options : {
|
||||||
|
id : null,
|
||||||
|
cls : '',
|
||||||
|
style : '',
|
||||||
|
hint : false,
|
||||||
|
itemWidth : 80,
|
||||||
|
itemHeight : 40,
|
||||||
|
menuMaxHeight : 300,
|
||||||
|
enableKeyEvents : false,
|
||||||
|
additionalMenuItems : null,
|
||||||
|
minWidth: -1,
|
||||||
|
dataHint: '',
|
||||||
|
dataHintDirection: '',
|
||||||
|
dataHintOffset: ''
|
||||||
|
},
|
||||||
|
|
||||||
|
template: _.template([
|
||||||
|
'<div id="<%= id %>" class="combo-dataview <%= cls %>" style="<%= style %>">',
|
||||||
|
'<div class="view"></div> ',
|
||||||
|
'<div class="button"></div> ',
|
||||||
|
'</div>'
|
||||||
|
].join('')),
|
||||||
|
|
||||||
|
initialize : function(options) {
|
||||||
|
Common.UI.BaseView.prototype.initialize.call(this, options);
|
||||||
|
|
||||||
|
var filter = Common.localStorage.getKeysFilter();
|
||||||
|
this.appPrefix = (filter && filter.length) ? filter.split(',')[0] : '';
|
||||||
|
|
||||||
|
this.id = this.options.id || Common.UI.getId();
|
||||||
|
this.cls = this.options.cls;
|
||||||
|
this.style = this.options.style;
|
||||||
|
this.hint = this.options.hint;
|
||||||
|
this.store = this.options.store || new Common.UI.DataViewStore();
|
||||||
|
this.itemWidth = this.options.itemWidth;
|
||||||
|
this.itemHeight = this.options.itemHeight;
|
||||||
|
this.menuMaxHeight = this.options.menuMaxHeight;
|
||||||
|
this.menuWidth = this.options.menuWidth;
|
||||||
|
this.rootWidth = 0;
|
||||||
|
this.rootHeight = 0;
|
||||||
|
this.rendered = false;
|
||||||
|
this.needFillComboView = false;
|
||||||
|
this.minWidth = this.options.minWidth;
|
||||||
|
this.delayRenderTips = this.options.delayRenderTips || false;
|
||||||
|
|
||||||
|
this.fieldPicker = new Common.UI.DataView({
|
||||||
|
cls: 'field-picker',
|
||||||
|
allowScrollbar: false,
|
||||||
|
itemTemplate: _.template('<div class="item-shape" id="<%= id %>" data-shape="<%= data.shapeType %>"><svg width="20" height="20" class=\"icon\"><use xlink:href=\"#svg-icon-<%= data.shapeType %>\"></use></svg></div>'),
|
||||||
|
delayRenderTips: this.delayRenderTips
|
||||||
|
});
|
||||||
|
|
||||||
|
this.openButton = new Common.UI.Button({
|
||||||
|
cls: 'open-menu',
|
||||||
|
menu: new Common.UI.Menu({
|
||||||
|
cls: 'menu-insert-shape',
|
||||||
|
menuAlign: 'tl-tl',
|
||||||
|
offset: [0, 3],
|
||||||
|
items: [
|
||||||
|
{template: _.template('<div class="menu-picker-container"></div>')}
|
||||||
|
]
|
||||||
|
}),
|
||||||
|
dataHint: this.options.dataHint,
|
||||||
|
dataHintDirection: this.options.dataHintDirection,
|
||||||
|
dataHintOffset: this.options.dataHintOffset
|
||||||
|
});
|
||||||
|
|
||||||
|
// Handle resize
|
||||||
|
setInterval(_.bind(this.checkSize, this), 500);
|
||||||
|
|
||||||
|
if (this.options.el) {
|
||||||
|
this.render();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
fillComboView: function (collection) {
|
||||||
|
var groups = collection.toJSON(),
|
||||||
|
recents = Common.localStorage.getItem(this.appPrefix + 'recent-shapes');
|
||||||
|
recents = recents ? JSON.parse(recents) : [];
|
||||||
|
|
||||||
|
// check lang
|
||||||
|
if (recents.length > 0) {
|
||||||
|
var isTranslated = _.findWhere(groups, {groupName: recents[0].groupName});
|
||||||
|
if (!isTranslated) {
|
||||||
|
for (var r = 0; r < recents.length; r++) {
|
||||||
|
var type = recents[r].data.shapeType,
|
||||||
|
record;
|
||||||
|
for (var g = 0; g < groups.length; g++) {
|
||||||
|
var store = groups[g].groupStore,
|
||||||
|
groupName = groups[g].groupName;
|
||||||
|
for (var i = 0; i < store.length; i++) {
|
||||||
|
if (store.at(i).get('data').shapeType === type) {
|
||||||
|
record = store.at(i).toJSON();
|
||||||
|
recents[r] = {
|
||||||
|
data: record.data,
|
||||||
|
tip: record.tip,
|
||||||
|
allowSelected: record.allowSelected,
|
||||||
|
selected: false,
|
||||||
|
groupName: groupName
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (record) {
|
||||||
|
record = undefined;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Common.localStorage.setItem(this.appPrefix + 'recent-shapes', JSON.stringify(recents));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (recents.length < 12) {
|
||||||
|
var count = 12 - recents.length;
|
||||||
|
|
||||||
|
var addItem = function (rec) {
|
||||||
|
var item = rec.toJSON(),
|
||||||
|
model = {
|
||||||
|
data: item.data,
|
||||||
|
tip: item.tip,
|
||||||
|
allowSelected: item.allowSelected,
|
||||||
|
selected: false
|
||||||
|
};
|
||||||
|
recents.push(model);
|
||||||
|
};
|
||||||
|
|
||||||
|
for (var j = 0; j < groups.length && count > 0; j++) {
|
||||||
|
var groupStore = groups[j].groupStore;
|
||||||
|
if (j === 0) {
|
||||||
|
addItem(groupStore.at(1));
|
||||||
|
count--;
|
||||||
|
if (count > 0) {
|
||||||
|
addItem(groupStore.at(2));
|
||||||
|
count--;
|
||||||
|
}
|
||||||
|
} else if (j !== 3 && j !== 6 && j !== 7) {
|
||||||
|
addItem(groupStore.at(0));
|
||||||
|
count--;
|
||||||
|
if (count > 0) {
|
||||||
|
addItem(groupStore.at(1));
|
||||||
|
count--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.fieldPicker.store.reset(recents);
|
||||||
|
|
||||||
|
this.fieldPicker.on('item:select', _.bind(this.onFieldPickerSelect, this));
|
||||||
|
this.fieldPicker.on('item:click', _.bind(this.onFieldPickerClick, this));
|
||||||
|
this.fieldPicker.on('item:contextmenu', _.bind(this.onPickerItemContextMenu, this));
|
||||||
|
this.fieldPicker.el.addEventListener('contextmenu', _.bind(this.onPickerComboContextMenu, this), false);
|
||||||
|
},
|
||||||
|
|
||||||
|
setMenuPicker: function (collection, recent, text) {
|
||||||
|
this.menuPicker = new Common.UI.DataViewShape({
|
||||||
|
el: this.cmpEl.find('.menu-picker-container'),
|
||||||
|
cls: 'menu-picker',
|
||||||
|
parentMenu: this.openButton.menu,
|
||||||
|
restoreHeight: this.menuMaxHeight,
|
||||||
|
style: 'max-height: '+this.menuMaxHeight+'px;',
|
||||||
|
itemTemplate : _.template('<div class="item-shape" id="<%= id %>"><svg width="20" height="20" class=\"icon\"><use xlink:href=\"#svg-icon-<%= data.shapeType %>\"></use></svg></div>'),
|
||||||
|
groups: collection,
|
||||||
|
textRecentlyUsed: text,
|
||||||
|
recentShapes: recent
|
||||||
|
});
|
||||||
|
|
||||||
|
this.menuPicker.on('item:select', _.bind(this.onMenuPickerSelect, this));
|
||||||
|
this.menuPicker.on('item:click', _.bind(this.onMenuPickerClick, this));
|
||||||
|
this.menuPicker.on('item:contextmenu', _.bind(this.onPickerItemContextMenu, this));
|
||||||
|
this.menuPicker.el.addEventListener('contextmenu', _.bind(this.onPickerComboContextMenu, this), false);
|
||||||
|
|
||||||
|
this.onResize();
|
||||||
|
},
|
||||||
|
|
||||||
|
render: function(parentEl) {
|
||||||
|
if (!this.rendered) {
|
||||||
|
var me = this;
|
||||||
|
|
||||||
|
me.trigger('render:before', me);
|
||||||
|
|
||||||
|
me.cmpEl = me.$el || $(me.el);
|
||||||
|
|
||||||
|
var templateEl = me.template({
|
||||||
|
id : me.id,
|
||||||
|
cls : me.cls,
|
||||||
|
style : me.style
|
||||||
|
});
|
||||||
|
|
||||||
|
if (parentEl) {
|
||||||
|
me.setElement(parentEl, false);
|
||||||
|
|
||||||
|
me.cmpEl = $(templateEl);
|
||||||
|
|
||||||
|
parentEl.html(me.cmpEl);
|
||||||
|
} else {
|
||||||
|
me.cmpEl.html(templateEl);
|
||||||
|
}
|
||||||
|
|
||||||
|
me.rootWidth = me.cmpEl.width();
|
||||||
|
me.rootHeight = me.cmpEl.height();
|
||||||
|
|
||||||
|
me.fieldPicker.render($('.view', me.cmpEl));
|
||||||
|
me.openButton.render($('.button', me.cmpEl));
|
||||||
|
//me.menuPicker.render($('.menu-picker-container', me.cmpEl));
|
||||||
|
|
||||||
|
if (me.openButton.menu.cmpEl) {
|
||||||
|
if (me.openButton.menu.cmpEl) {
|
||||||
|
me.openButton.menu.menuAlignEl = me.cmpEl;
|
||||||
|
me.openButton.menu.cmpEl.css('min-width', me.itemWidth);
|
||||||
|
me.openButton.menu.on('show:before', _.bind(me.onBeforeShowMenu, me));
|
||||||
|
me.openButton.menu.on('show:after', _.bind(me.onAfterShowMenu, me));
|
||||||
|
me.openButton.cmpEl.on('hide.bs.dropdown', _.bind(me.onBeforeHideMenu, me));
|
||||||
|
me.openButton.cmpEl.on('hidden.bs.dropdown', _.bind(me.onAfterHideMenu, me));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (me.options.hint) {
|
||||||
|
me.cmpEl.attr('data-toggle', 'tooltip');
|
||||||
|
me.cmpEl.tooltip({
|
||||||
|
title : me.options.hint,
|
||||||
|
placement : me.options.hintAnchor || 'cursor'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//me.onResize();
|
||||||
|
|
||||||
|
me.rendered = true;
|
||||||
|
|
||||||
|
me.trigger('render:after', me);
|
||||||
|
}
|
||||||
|
if (this.disabled) {
|
||||||
|
this.setDisabled(!!this.disabled);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
|
||||||
|
updateComboView: function (record) {
|
||||||
|
var store = this.fieldPicker.store,
|
||||||
|
type = record.get('data').shapeType,
|
||||||
|
model = null;
|
||||||
|
for (var i = 0; i < store.length; i++) {
|
||||||
|
if (store.at(i).get('data').shapeType === type) {
|
||||||
|
model = store.at(i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!model) {
|
||||||
|
store.pop();
|
||||||
|
store.unshift([record]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
activateRecord: function (record) {
|
||||||
|
var type = record.get('data').shapeType;
|
||||||
|
if (this.isRecordActive)
|
||||||
|
this.deactivateRecords();
|
||||||
|
$(this.cmpEl.find("[data-shape='" + type + "']")).parent().addClass('active');
|
||||||
|
this.isRecordActive = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
deactivateRecords: function () {
|
||||||
|
$(this.cmpEl.find('.field-picker .item')).removeClass('active');
|
||||||
|
},
|
||||||
|
|
||||||
|
isComboViewRecActive: function () {
|
||||||
|
return this.isRecordActive;
|
||||||
|
},
|
||||||
|
|
||||||
|
checkSize: function() {
|
||||||
|
if (this.cmpEl && this.cmpEl.is(':visible')) {
|
||||||
|
var me = this,
|
||||||
|
width = this.cmpEl.width(),
|
||||||
|
height = this.cmpEl.height();
|
||||||
|
|
||||||
|
if (width < this.minWidth) return;
|
||||||
|
|
||||||
|
if (this.rootWidth != width || this.rootHeight != height) {
|
||||||
|
this.rootWidth = width;
|
||||||
|
this.rootHeight = height;
|
||||||
|
setTimeout(function() {
|
||||||
|
me.openButton.menu.cmpEl.outerWidth();
|
||||||
|
me.rootWidth = me.cmpEl.width();
|
||||||
|
}, 10);
|
||||||
|
this.onResize();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onResize: function() {
|
||||||
|
if (this.openButton) {
|
||||||
|
var button = $('button', this.openButton.cmpEl);
|
||||||
|
var cntButton = $('.button', this.cmpEl);
|
||||||
|
button && cntButton.width() > 0 && button.css({
|
||||||
|
width : cntButton.width(),
|
||||||
|
height: cntButton.height()
|
||||||
|
});
|
||||||
|
|
||||||
|
this.openButton.menu.hide();
|
||||||
|
|
||||||
|
/*var picker = this.menuPicker;
|
||||||
|
if (picker) {
|
||||||
|
var record = picker.getSelectedRec();
|
||||||
|
this.fillComboView(record || picker.store.at(0), !!record, true);
|
||||||
|
|
||||||
|
picker.onResize();
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this.isSuspendEvents)
|
||||||
|
this.trigger('resize', this);
|
||||||
|
},
|
||||||
|
|
||||||
|
onBeforeShowMenu: function(e) {
|
||||||
|
var menu = this.openButton.menu;
|
||||||
|
if (menu.cmpEl) {
|
||||||
|
menu.menuAlignEl = this.cmpEl;
|
||||||
|
var offset = this.cmpEl.width() - this.openButton.$el.width() - this.menuWidth + 1;
|
||||||
|
menu.setOffset(Math.min(offset, 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.options.hint) {
|
||||||
|
var tip = this.cmpEl.data('bs.tooltip');
|
||||||
|
if (tip) {
|
||||||
|
if (tip.dontShow===undefined)
|
||||||
|
tip.dontShow = true;
|
||||||
|
tip.hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onBeforeHideMenu: function(e) {
|
||||||
|
this.trigger('hide:before', this, e);
|
||||||
|
|
||||||
|
if (Common.UI.Scroller.isMouseCapture())
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
if (this.isStylesNotClosable)
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
|
onAfterShowMenu: function(e) {
|
||||||
|
var me = this;
|
||||||
|
if (me.menuPicker.scroller) {
|
||||||
|
me.menuPicker.scroller.update({
|
||||||
|
includePadding: true,
|
||||||
|
suppressScrollX: true,
|
||||||
|
alwaysVisibleY: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onAfterHideMenu: function(e, isFromInputControl) {
|
||||||
|
this.menuPicker.selectedBeforeHideRec = this.menuPicker.getSelectedRec(); // for DataView - onKeyDown - Return key
|
||||||
|
this.menuPicker.deselectAll();
|
||||||
|
this.trigger('hide:after', this, e, isFromInputControl);
|
||||||
|
},
|
||||||
|
|
||||||
|
onFieldPickerSelect: function(picker, item, record) {
|
||||||
|
//
|
||||||
|
},
|
||||||
|
|
||||||
|
onMenuPickerSelect: function(picker, item, record, fromKeyDown) {
|
||||||
|
this.needFillComboView = this.disabled;
|
||||||
|
if (this.disabled || fromKeyDown===true) return;
|
||||||
|
|
||||||
|
/*this.fillComboView(record, false);
|
||||||
|
if (record && !this.isSuspendEvents)
|
||||||
|
this.trigger('select', this, record);*/
|
||||||
|
},
|
||||||
|
|
||||||
|
onFieldPickerClick: function(dataView, item, record) {
|
||||||
|
if (this.disabled) return;
|
||||||
|
|
||||||
|
var isActive = item.$el.hasClass('active');
|
||||||
|
|
||||||
|
if (!this.isSuspendEvents)
|
||||||
|
this.trigger('click', this, record, isActive);
|
||||||
|
|
||||||
|
if (this.options.hint) {
|
||||||
|
var tip = this.cmpEl.data('bs.tooltip');
|
||||||
|
if (tip) {
|
||||||
|
if (tip.dontShow===undefined)
|
||||||
|
tip.dontShow = true;
|
||||||
|
tip.hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isActive) {
|
||||||
|
this.activateRecord(record);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onMenuPickerClick: function(dataView, itemView, record) {
|
||||||
|
if (this.disabled) return;
|
||||||
|
|
||||||
|
if (!this.isSuspendEvents)
|
||||||
|
this.trigger('click', this, record);
|
||||||
|
|
||||||
|
this.activateRecord(record);
|
||||||
|
},
|
||||||
|
|
||||||
|
onPickerItemContextMenu: function(dataView, itemView, record, e) {
|
||||||
|
if (this.disabled) return;
|
||||||
|
|
||||||
|
if (!this.isSuspendEvents) {
|
||||||
|
this.trigger('contextmenu', this, record, e);
|
||||||
|
}
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
|
onPickerComboContextMenu: function(mouseEvent) {
|
||||||
|
if (this.disabled) return;
|
||||||
|
|
||||||
|
if (!this.isSuspendEvents) {
|
||||||
|
this.trigger('contextmenu', this, undefined, mouseEvent);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
setDisabled: function(disabled) {
|
||||||
|
disabled = !!disabled;
|
||||||
|
this.disabled = disabled;
|
||||||
|
|
||||||
|
if (!this.rendered)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this.cmpEl.toggleClass('disabled', disabled);
|
||||||
|
$('button', this.openButton.cmpEl).toggleClass('disabled', disabled);
|
||||||
|
this.fieldPicker.setDisabled(disabled);
|
||||||
|
},
|
||||||
|
|
||||||
|
isDisabled: function() {
|
||||||
|
return this.disabled;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
|
@ -276,6 +276,7 @@ define([
|
||||||
me.delayRenderTips = me.options.delayRenderTips || false;
|
me.delayRenderTips = me.options.delayRenderTips || false;
|
||||||
if (me.parentMenu)
|
if (me.parentMenu)
|
||||||
me.parentMenu.options.restoreHeight = (me.options.restoreHeight>0);
|
me.parentMenu.options.restoreHeight = (me.options.restoreHeight>0);
|
||||||
|
me.delaySelect = me.options.delaySelect || false;
|
||||||
me.rendered = false;
|
me.rendered = false;
|
||||||
me.dataViewItems = [];
|
me.dataViewItems = [];
|
||||||
if (me.options.keyMoveDirection=='vertical')
|
if (me.options.keyMoveDirection=='vertical')
|
||||||
|
@ -395,8 +396,9 @@ define([
|
||||||
rec.set({selected: false});
|
rec.set({selected: false});
|
||||||
});
|
});
|
||||||
|
|
||||||
if (record)
|
if (record) {
|
||||||
record.set({selected: true});
|
record.set({selected: true});
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (record)
|
if (record)
|
||||||
record.set({selected: !record.get('selected')});
|
record.set({selected: !record.get('selected')});
|
||||||
|
@ -449,13 +451,24 @@ define([
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var idx = _.indexOf(this.store.models, record);
|
||||||
if (innerEl) {
|
if (innerEl) {
|
||||||
if (opts && opts.at == 0)
|
if (opts && (typeof opts.at==='number') && opts.at >= 0) {
|
||||||
innerEl.prepend(view.render().el); else
|
if (opts.at == 0) {
|
||||||
|
innerEl.prepend(view.render().el);
|
||||||
|
} else if (!(this.groups && this.groups.length > 0)) { // for dataview without groups
|
||||||
|
var innerDivs = innerEl.find('> div');
|
||||||
|
if (idx > 0)
|
||||||
|
$(innerDivs.get(idx - 1)).after(view.render().el);
|
||||||
|
else {
|
||||||
|
(innerDivs.length > 0) ? $(innerDivs[idx]).before(view.render().el) : innerEl.append(view.render().el);
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
innerEl.append(view.render().el);
|
||||||
|
} else
|
||||||
innerEl.append(view.render().el);
|
innerEl.append(view.render().el);
|
||||||
|
|
||||||
(this.dataViewItems.length<1) && innerEl.find('.empty-text').remove();
|
(this.dataViewItems.length<1) && innerEl.find('.empty-text').remove();
|
||||||
var idx = _.indexOf(this.store.models, record);
|
|
||||||
this.dataViewItems = this.dataViewItems.slice(0, idx).concat(view).concat(this.dataViewItems.slice(idx));
|
this.dataViewItems = this.dataViewItems.slice(0, idx).concat(view).concat(this.dataViewItems.slice(idx));
|
||||||
|
|
||||||
var me = this,
|
var me = this,
|
||||||
|
@ -588,14 +601,30 @@ define([
|
||||||
|
|
||||||
window._event = e; // for FireFox only
|
window._event = e; // for FireFox only
|
||||||
|
|
||||||
if (this.showLast) this.selectRecord(record);
|
if (this.showLast) {
|
||||||
|
if (!this.delaySelect) {
|
||||||
|
this.selectRecord(record);
|
||||||
|
} else {
|
||||||
|
_.each(this.store.where({selected: true}), function(rec){
|
||||||
|
rec.set({selected: false});
|
||||||
|
});
|
||||||
|
if (record) {
|
||||||
|
setTimeout(_.bind(function () {
|
||||||
|
record.set({selected: true});
|
||||||
|
this.trigger('item:click', this, view, record, e);
|
||||||
|
}, this), 300);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
this.lastSelectedRec = null;
|
this.lastSelectedRec = null;
|
||||||
|
|
||||||
var tip = view.$el.data('bs.tooltip');
|
var tip = view.$el.data('bs.tooltip');
|
||||||
if (tip) (tip.tip()).remove();
|
if (tip) (tip.tip()).remove();
|
||||||
|
|
||||||
if (!this.isSuspendEvents) {
|
if (!this.isSuspendEvents) {
|
||||||
this.trigger('item:click', this, view, record, e);
|
if (!this.delaySelect) {
|
||||||
|
this.trigger('item:click', this, view, record, e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -763,6 +792,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
setDisabled: function(disabled) {
|
setDisabled: function(disabled) {
|
||||||
|
disabled = !!disabled;
|
||||||
this.disabled = disabled;
|
this.disabled = disabled;
|
||||||
$(this.el).find('.inner').addBack().filter('.inner').toggleClass('disabled', disabled);
|
$(this.el).find('.inner').addBack().filter('.inner').toggleClass('disabled', disabled);
|
||||||
},
|
},
|
||||||
|
@ -773,6 +803,12 @@ define([
|
||||||
|
|
||||||
setEmptyText: function(emptyText) {
|
setEmptyText: function(emptyText) {
|
||||||
this.emptyText = emptyText;
|
this.emptyText = emptyText;
|
||||||
|
|
||||||
|
if (this.store.length < 1) {
|
||||||
|
var el = $(this.el).find('.inner').addBack().filter('.inner').find('.empty-text td');
|
||||||
|
if ( el.length>0 )
|
||||||
|
el.text(this.emptyText);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
alignPosition: function() {
|
alignPosition: function() {
|
||||||
|
@ -836,16 +872,18 @@ define([
|
||||||
|
|
||||||
focus: function(index) {
|
focus: function(index) {
|
||||||
$(this.el).find('.inner').addBack().filter('.inner').focus();
|
$(this.el).find('.inner').addBack().filter('.inner').focus();
|
||||||
|
var rec;
|
||||||
if (typeof index == 'string') {
|
if (typeof index == 'string') {
|
||||||
if (index == 'first') {
|
if (index == 'first') {
|
||||||
this.selectByIndex(0, true);
|
rec = this.selectByIndex(0, true);
|
||||||
} else if (index == 'last') {
|
} else if (index == 'last') {
|
||||||
if (this._layoutParams === undefined)
|
if (this._layoutParams === undefined)
|
||||||
this.fillIndexesArray();
|
this.fillIndexesArray();
|
||||||
this.selectByIndex(this._layoutParams.itemsIndexes[this._layoutParams.rows-1][0], true);
|
rec = this.selectByIndex(this._layoutParams.itemsIndexes[this._layoutParams.rows-1][0], true);
|
||||||
}
|
}
|
||||||
} else if (index !== undefined)
|
} else if (index !== undefined)
|
||||||
this.selectByIndex(index, true);
|
rec = this.selectByIndex(index, true);
|
||||||
|
this.scrollToRecord(rec);
|
||||||
},
|
},
|
||||||
|
|
||||||
focusInner: function(e) {
|
focusInner: function(e) {
|
||||||
|
@ -917,7 +955,8 @@ define([
|
||||||
this.cmpEl.html(this.template({
|
this.cmpEl.html(this.template({
|
||||||
items: me.store.toJSON(),
|
items: me.store.toJSON(),
|
||||||
itemTemplate: me.itemTemplate,
|
itemTemplate: me.itemTemplate,
|
||||||
style: me.style
|
style: me.style,
|
||||||
|
options: me.options
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
var modalParents = this.cmpEl.closest('.asc-window');
|
var modalParents = this.cmpEl.closest('.asc-window');
|
||||||
|
@ -1131,21 +1170,30 @@ define([
|
||||||
if (data.keyCode==Common.UI.Keys.RETURN) {
|
if (data.keyCode==Common.UI.Keys.RETURN) {
|
||||||
if (this.selectedBeforeHideRec) // only for ComboDataView menuPicker
|
if (this.selectedBeforeHideRec) // only for ComboDataView menuPicker
|
||||||
rec = this.selectedBeforeHideRec;
|
rec = this.selectedBeforeHideRec;
|
||||||
|
if (this.canAddRecents) // only for DaraViewShape
|
||||||
|
this.addRecentItem(rec);
|
||||||
this.trigger('item:click', this, this, rec, e);
|
this.trigger('item:click', this, this, rec, e);
|
||||||
if (this.parentMenu)
|
if (this.parentMenu)
|
||||||
this.parentMenu.hide();
|
this.parentMenu.hide();
|
||||||
} else {
|
} else {
|
||||||
var idx = _.indexOf(this.store.models, rec);
|
var idx = _.indexOf(this.store.models, rec);
|
||||||
if (idx<0) {
|
if (idx<0) {
|
||||||
|
function getFirstItemIndex() {
|
||||||
|
var first = 0;
|
||||||
|
while(!this.dataViewItems[first].el.is(':visible')) {
|
||||||
|
first++;
|
||||||
|
}
|
||||||
|
return first;
|
||||||
|
}
|
||||||
if (data.keyCode==Common.UI.Keys.LEFT) {
|
if (data.keyCode==Common.UI.Keys.LEFT) {
|
||||||
var target = $(e.target).closest('.dropdown-submenu.over');
|
var target = $(e.target).closest('.dropdown-submenu.over');
|
||||||
if (target.length>0) {
|
if (target.length>0) {
|
||||||
target.removeClass('over');
|
target.removeClass('over');
|
||||||
target.find('> a').focus();
|
target.find('> a').focus();
|
||||||
} else
|
} else
|
||||||
idx = 0;
|
idx = getFirstItemIndex.call(this);
|
||||||
} else
|
} else
|
||||||
idx = 0;
|
idx = getFirstItemIndex.call(this);
|
||||||
} else if (this.options.keyMoveDirection == 'both') {
|
} else if (this.options.keyMoveDirection == 'both') {
|
||||||
if (this._layoutParams === undefined)
|
if (this._layoutParams === undefined)
|
||||||
this.fillIndexesArray();
|
this.fillIndexesArray();
|
||||||
|
@ -1225,6 +1273,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
setDisabled: function(disabled) {
|
setDisabled: function(disabled) {
|
||||||
|
disabled = !!disabled;
|
||||||
this.disabled = disabled;
|
this.disabled = disabled;
|
||||||
$(this.el).find('.inner').addBack().filter('.inner').toggleClass('disabled', disabled);
|
$(this.el).find('.inner').addBack().filter('.inner').toggleClass('disabled', disabled);
|
||||||
},
|
},
|
||||||
|
@ -1310,4 +1359,397 @@ define([
|
||||||
}
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Common.UI.DataViewShape = Common.UI.DataViewSimple.extend(_.extend({
|
||||||
|
template: _.template([
|
||||||
|
'<div class="dataview inner" style="<%= style %>">',
|
||||||
|
'<% _.each(options.groupsWithRecent, function(group, index) { %>',
|
||||||
|
'<div class="grouped-data <% if (index === 0) { %> recent-group <% } %> " id="<%= group.id %>" >',
|
||||||
|
'<% if (!_.isEmpty(group.groupName)) { %>',
|
||||||
|
'<div class="group-description">',
|
||||||
|
'<span><%= group.groupName %></span>',
|
||||||
|
'</div>',
|
||||||
|
'<% } %>',
|
||||||
|
'<div class="group-items-container <% if (index === 0) { %> recent-items <% } %>">',
|
||||||
|
'<% _.each(group.groupStore.toJSON(), function(item, index) { %>',
|
||||||
|
'<% if (!item.id) item.id = Common.UI.getId(); %>',
|
||||||
|
'<div class="item" data-index="<%= index %>"<% if(!!item.tip) { %> data-toggle="tooltip" <% } %> ><%= itemTemplate(item) %></div>',
|
||||||
|
'<% }); %>',
|
||||||
|
'</div>',
|
||||||
|
'</div>',
|
||||||
|
'<% }); %>',
|
||||||
|
'</div>'
|
||||||
|
].join('')),
|
||||||
|
initialize : function(options) {
|
||||||
|
var me = this;
|
||||||
|
this.canAddRecents = true;
|
||||||
|
|
||||||
|
this._state = {
|
||||||
|
hideTextRect: options.hideTextRect,
|
||||||
|
hideLines: options.hideLines
|
||||||
|
}
|
||||||
|
|
||||||
|
var filter = Common.localStorage.getKeysFilter();
|
||||||
|
this.appPrefix = (filter && filter.length) ? filter.split(',')[0] : '';
|
||||||
|
|
||||||
|
me.groups = options.groups.toJSON();
|
||||||
|
|
||||||
|
// add recent shapes to store
|
||||||
|
var recentStore = new Common.UI.DataViewGroupStore,
|
||||||
|
recentArr = options.recentShapes || [],
|
||||||
|
cols = (recentArr.length) > 18 ? 7 : 6,
|
||||||
|
height = Math.ceil(recentArr.length/cols) * 35 + 3,
|
||||||
|
width = 30 * cols;
|
||||||
|
|
||||||
|
me.recentShapes = recentArr;
|
||||||
|
|
||||||
|
// check lang
|
||||||
|
if (me.recentShapes.length > 0) {
|
||||||
|
var isTranslated = _.findWhere(me.groups, {groupName: me.recentShapes[0].groupName});
|
||||||
|
if (!isTranslated) {
|
||||||
|
for (var r = 0; r < me.recentShapes.length; r++) {
|
||||||
|
var type = me.recentShapes[r].data.shapeType,
|
||||||
|
record;
|
||||||
|
for (var g = 0; g < me.groups.length; g++) {
|
||||||
|
var store = me.groups[g].groupStore,
|
||||||
|
groupName = me.groups[g].groupName;
|
||||||
|
for (var i = 0; i < store.length; i++) {
|
||||||
|
if (store.at(i).get('data').shapeType === type) {
|
||||||
|
record = store.at(i).toJSON();
|
||||||
|
me.recentShapes[r] = {
|
||||||
|
data: record.data,
|
||||||
|
tip: record.tip,
|
||||||
|
allowSelected: record.allowSelected,
|
||||||
|
selected: false,
|
||||||
|
groupName: groupName
|
||||||
|
};
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (record) {
|
||||||
|
record = undefined;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Common.localStorage.setItem(this.appPrefix + 'recent-shapes', JSON.stringify(me.recentShapes));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add default recent
|
||||||
|
|
||||||
|
if (me.recentShapes.length < 12) {
|
||||||
|
var count = 12 - me.recentShapes.length,
|
||||||
|
defaultArr = [];
|
||||||
|
|
||||||
|
var addItem = function (rec, groupName) {
|
||||||
|
var item = rec.toJSON(),
|
||||||
|
model = {
|
||||||
|
data: item.data,
|
||||||
|
tip: item.tip,
|
||||||
|
allowSelected: item.allowSelected,
|
||||||
|
selected: false,
|
||||||
|
groupName: groupName
|
||||||
|
};
|
||||||
|
defaultArr.push(model);
|
||||||
|
};
|
||||||
|
|
||||||
|
for (var i = 0; i < me.groups.length && count > 0; i++) {
|
||||||
|
var groupStore = me.groups[i].groupStore,
|
||||||
|
groupName = me.groups[i].groupName;
|
||||||
|
if (i === 0) {
|
||||||
|
addItem(groupStore.at(1), groupName);
|
||||||
|
count--;
|
||||||
|
if (count > 0) {
|
||||||
|
addItem(groupStore.at(2), groupName);
|
||||||
|
count--;
|
||||||
|
}
|
||||||
|
} else if (i !== 3 && i !== 6 && i !== 7) {
|
||||||
|
addItem(groupStore.at(0), groupName);
|
||||||
|
count--;
|
||||||
|
if (count > 0) {
|
||||||
|
addItem(groupStore.at(1), groupName);
|
||||||
|
count--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
me.recentShapes = me.recentShapes.concat(defaultArr);
|
||||||
|
}
|
||||||
|
|
||||||
|
recentStore.add(me.recentShapes);
|
||||||
|
me.groups.unshift({
|
||||||
|
groupName : options.textRecentlyUsed,
|
||||||
|
groupStore : recentStore,
|
||||||
|
groupWidth : width,
|
||||||
|
groupHeight : height
|
||||||
|
});
|
||||||
|
|
||||||
|
me.options.groupsWithRecent = me.groups;
|
||||||
|
|
||||||
|
var store = new Common.UI.DataViewStore();
|
||||||
|
|
||||||
|
_.each(me.groups, function (group, index) {
|
||||||
|
var models = group.groupStore.models;
|
||||||
|
if (index > 0) {
|
||||||
|
for (var i = 0; i < models.length; i++) {
|
||||||
|
models[i].set({groupName: group.groupName});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
store.add(models);
|
||||||
|
});
|
||||||
|
|
||||||
|
options.store = store;
|
||||||
|
|
||||||
|
Common.UI.DataViewSimple.prototype.initialize.call(this, options);
|
||||||
|
|
||||||
|
me.parentMenu.on('show:before', function() { me.updateRecents(); });
|
||||||
|
|
||||||
|
if (me._state.hideLines) {
|
||||||
|
me.hideLinesGroup();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onAfterShowMenu: function(e) {
|
||||||
|
var me = this,
|
||||||
|
updateHideRect = false;
|
||||||
|
if (!me.dataViewItems) {
|
||||||
|
me.dataViewItems = [];
|
||||||
|
_.each(me.cmpEl.find('div.grouped-data'), function (group, indexGroup) {
|
||||||
|
_.each($(group).find('div.item'), function (item, index) {
|
||||||
|
var $item = $(item),
|
||||||
|
rec = me.groups[indexGroup].groupStore.at(index);
|
||||||
|
me.dataViewItems.push({el: $item, groupIndex: indexGroup, index: index});
|
||||||
|
var tip = rec.get('tip');
|
||||||
|
if (tip) {
|
||||||
|
$item.one('mouseenter', function(){ // hide tooltip when mouse is over menu
|
||||||
|
$item.attr('data-toggle', 'tooltip');
|
||||||
|
$item.tooltip({
|
||||||
|
title : tip,
|
||||||
|
placement : 'cursor',
|
||||||
|
zIndex : me.tipZIndex
|
||||||
|
});
|
||||||
|
$item.mouseenter();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
updateHideRect = true;
|
||||||
|
}
|
||||||
|
if (me.updateDataViewItems && me.cmpEl.is(':visible')) {
|
||||||
|
// add recent item in dataViewItems
|
||||||
|
var recent = _.where(me.dataViewItems, {groupIndex: 0});
|
||||||
|
var len = recent ? recent.length : 0;
|
||||||
|
for (var i = 0; i < len; i++) {
|
||||||
|
var tip = me.dataViewItems[i].el.data('bs.tooltip');
|
||||||
|
if (tip) {
|
||||||
|
if (tip.dontShow===undefined)
|
||||||
|
tip.dontShow = true;
|
||||||
|
(tip.tip()).remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
me.dataViewItems = me.dataViewItems.slice(len);
|
||||||
|
var recentViewItems = [];
|
||||||
|
_.each(me.cmpEl.find('.recent-group div.item'), function (item, index) {
|
||||||
|
var $item = $(item),
|
||||||
|
rec = me.recentShapes[index];
|
||||||
|
recentViewItems.push({el: $item, groupIndex: 0, index: index});
|
||||||
|
var tip = rec.tip;
|
||||||
|
if (tip) {
|
||||||
|
$item.one('mouseenter', function(){ // hide tooltip when mouse is over menu
|
||||||
|
$item.attr('data-toggle', 'tooltip');
|
||||||
|
$item.tooltip({
|
||||||
|
title: tip,
|
||||||
|
placement: 'cursor',
|
||||||
|
zIndex : me.tipZIndex
|
||||||
|
});
|
||||||
|
$item.mouseenter();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
me.dataViewItems = recentViewItems.concat(me.dataViewItems);
|
||||||
|
|
||||||
|
if (me.recentShapes.length === 1) {
|
||||||
|
$('.recent-group').show();
|
||||||
|
}
|
||||||
|
me.updateDataViewItems = false;
|
||||||
|
|
||||||
|
updateHideRect = true;
|
||||||
|
}
|
||||||
|
if (this._state.hideLines) {
|
||||||
|
me.hideLines();
|
||||||
|
}
|
||||||
|
if (updateHideRect) {
|
||||||
|
me.hideTextRect(me._state.hideTextRect);
|
||||||
|
}
|
||||||
|
me.fillIndexesArray();
|
||||||
|
},
|
||||||
|
|
||||||
|
onClickItem: function(e) {
|
||||||
|
if ( this.disabled ) return;
|
||||||
|
|
||||||
|
window._event = e; // for FireFox only
|
||||||
|
|
||||||
|
var groupIndex = $(e.currentTarget).closest('div.grouped-data').index(),
|
||||||
|
itemIndex = $(e.currentTarget).closest('div.item').data('index');
|
||||||
|
var index = _.findIndex(this.dataViewItems, function (item) {
|
||||||
|
return (item.groupIndex === groupIndex && item.index === itemIndex);
|
||||||
|
});
|
||||||
|
var record = (index>=0) ? this.store.at(index) : null,
|
||||||
|
view = (index>=0) ? this.dataViewItems[index] : null;
|
||||||
|
if (!record || !view) return;
|
||||||
|
|
||||||
|
record.set({selected: true});
|
||||||
|
var tip = view.el.data('bs.tooltip');
|
||||||
|
if (tip) (tip.tip()).remove();
|
||||||
|
|
||||||
|
if (!this.isSuspendEvents) {
|
||||||
|
this.trigger('item:click', this, view.el, record, e);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.addRecentItem(record);
|
||||||
|
},
|
||||||
|
addRecentItem: function (rec) {
|
||||||
|
var me = this,
|
||||||
|
exist = false,
|
||||||
|
type = rec.get('data').shapeType,
|
||||||
|
groupName = rec.get('groupName');
|
||||||
|
for (var i = 0; i < me.recentShapes.length; i++) {
|
||||||
|
if (me.recentShapes[i].data.shapeType === type) {
|
||||||
|
exist = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (exist) return;
|
||||||
|
|
||||||
|
var item = rec.toJSON(),
|
||||||
|
model = {
|
||||||
|
data: item.data,
|
||||||
|
tip: item.tip,
|
||||||
|
allowSelected: item.allowSelected,
|
||||||
|
selected: false,
|
||||||
|
groupName: groupName
|
||||||
|
};
|
||||||
|
var arr = [model].concat(me.recentShapes.slice(0, 11));
|
||||||
|
Common.localStorage.setItem(this.appPrefix + 'recent-shapes', JSON.stringify(arr));
|
||||||
|
me.recentShapes = undefined;
|
||||||
|
},
|
||||||
|
updateRecents: function () {
|
||||||
|
var me = this,
|
||||||
|
recents = Common.localStorage.getItem(this.appPrefix + 'recent-shapes');
|
||||||
|
recents = recents ? JSON.parse(recents) : [];
|
||||||
|
|
||||||
|
var diff = false;
|
||||||
|
if (me.recentShapes) {
|
||||||
|
for (var i = 0; i < recents.length; i++) {
|
||||||
|
if (!me.recentShapes[i] || (me.recentShapes[i] && recents[i].tip !== me.recentShapes[i].tip)) {
|
||||||
|
diff = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
diff = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (recents.length > 0 && diff) {
|
||||||
|
me.recentShapes = recents;
|
||||||
|
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) {
|
||||||
|
store.add(group.groupStore.models);
|
||||||
|
});
|
||||||
|
me.store = store;
|
||||||
|
|
||||||
|
var template = _.template([
|
||||||
|
'<% _.each(items, function(item, index) { %>',
|
||||||
|
'<% if (!item.id) item.id = Common.UI.getId(); %>',
|
||||||
|
'<div class="item" data-index="<%= index %>"<% if(!!item.tip) { %> data-toggle="tooltip" <% } %> ><%= itemTemplate(item) %></div>',
|
||||||
|
'<% }) %>'
|
||||||
|
].join(''));
|
||||||
|
me.cmpEl && me.cmpEl.find('.recent-items').html(template({
|
||||||
|
items: me.recentShapes,
|
||||||
|
itemTemplate: this.itemTemplate,
|
||||||
|
style : this.style
|
||||||
|
}));
|
||||||
|
|
||||||
|
me.updateDataViewItems = true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fillIndexesArray: function() {
|
||||||
|
if (this.dataViewItems.length<=0) return;
|
||||||
|
|
||||||
|
this._layoutParams = {
|
||||||
|
itemsIndexes: [],
|
||||||
|
columns: 0,
|
||||||
|
rows: 0
|
||||||
|
};
|
||||||
|
|
||||||
|
var el = this.dataViewItems[0].el,
|
||||||
|
first = 0;
|
||||||
|
while (!this.dataViewItems[first].el.is(":visible")) { // if first elem is hidden
|
||||||
|
first++;
|
||||||
|
el = this.dataViewItems[first].el;
|
||||||
|
}
|
||||||
|
|
||||||
|
var itemW = el.outerWidth() + parseInt(el.css('margin-left')) + parseInt(el.css('margin-right')),
|
||||||
|
offsetLeft = this.$el.offset().left,
|
||||||
|
offsetTop = el.offset().top,
|
||||||
|
prevtop = -1, topIdx = 0, leftIdx = first;
|
||||||
|
|
||||||
|
for (var i=0; i<this.dataViewItems.length; i++) {
|
||||||
|
var item = this.dataViewItems[i];
|
||||||
|
if (item.el.is(":visible")) {
|
||||||
|
var top = item.el.offset().top - offsetTop;
|
||||||
|
leftIdx = Math.floor((item.el.offset().left - offsetLeft) / itemW);
|
||||||
|
if (top > prevtop) {
|
||||||
|
prevtop = top;
|
||||||
|
this._layoutParams.itemsIndexes.push([]);
|
||||||
|
topIdx = this._layoutParams.itemsIndexes.length - 1;
|
||||||
|
}
|
||||||
|
this._layoutParams.itemsIndexes[topIdx][leftIdx] = i;
|
||||||
|
item.topIdx = topIdx;
|
||||||
|
item.leftIdx = leftIdx;
|
||||||
|
if (this._layoutParams.columns < leftIdx) this._layoutParams.columns = leftIdx;
|
||||||
|
} else {
|
||||||
|
item.topIdx = -1;
|
||||||
|
item.leftIdx = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this._layoutParams.rows = this._layoutParams.itemsIndexes.length;
|
||||||
|
this._layoutParams.columns++;
|
||||||
|
},
|
||||||
|
hideTextRect: function (hide) {
|
||||||
|
var me = this;
|
||||||
|
this.store.each(function(item, index){
|
||||||
|
if (item.get('data').shapeType === 'textRect') {
|
||||||
|
me.dataViewItems[index].el[hide ? 'addClass' : 'removeClass']('hidden');
|
||||||
|
}
|
||||||
|
}, this);
|
||||||
|
this._state.hideTextRect = hide;
|
||||||
|
},
|
||||||
|
hideLinesGroup: function () {
|
||||||
|
$(this.cmpEl.find('div.grouped-data')[9]).hide();
|
||||||
|
},
|
||||||
|
hideLines: function () {
|
||||||
|
var me = this;
|
||||||
|
this.store.each(function(item, index){
|
||||||
|
if (item.get('groupName') === 'Lines') {
|
||||||
|
var el = me.dataViewItems[index].el;
|
||||||
|
if (el.is(':visible')) {
|
||||||
|
el.addClass('hidden');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, this);
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
});
|
});
|
|
@ -191,6 +191,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
checkPasswordType: function(){
|
checkPasswordType: function(){
|
||||||
|
if(this.type == 'text') return;
|
||||||
if (this._input.val() !== '') {
|
if (this._input.val() !== '') {
|
||||||
(this._input.attr('type') !== 'password') && this._input.attr('type', 'password');
|
(this._input.attr('type') !== 'password') && this._input.attr('type', 'password');
|
||||||
} else {
|
} else {
|
||||||
|
@ -298,6 +299,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
setDisabled: function(disabled) {
|
setDisabled: function(disabled) {
|
||||||
|
disabled = !!disabled;
|
||||||
this.disabled = disabled;
|
this.disabled = disabled;
|
||||||
$(this.el).toggleClass('disabled', disabled);
|
$(this.el).toggleClass('disabled', disabled);
|
||||||
disabled
|
disabled
|
||||||
|
@ -436,7 +438,7 @@ define([
|
||||||
template: _.template([
|
template: _.template([
|
||||||
'<div class="input-field input-field-btn" style="<%= style %>">',
|
'<div class="input-field input-field-btn" style="<%= style %>">',
|
||||||
'<input ',
|
'<input ',
|
||||||
'type="<%= type %>" ',
|
'type="text" ',
|
||||||
'name="<%= name %>" ',
|
'name="<%= name %>" ',
|
||||||
'spellcheck="<%= spellcheck %>" ',
|
'spellcheck="<%= spellcheck %>" ',
|
||||||
'class="form-control <%= cls %>" ',
|
'class="form-control <%= cls %>" ',
|
||||||
|
@ -482,6 +484,7 @@ define([
|
||||||
|
|
||||||
this._button = new Common.UI.Button({
|
this._button = new Common.UI.Button({
|
||||||
el: this.cmpEl.find('button'),
|
el: this.cmpEl.find('button'),
|
||||||
|
iconCls: this.options.iconCls,
|
||||||
hint: this.options.btnHint || ''
|
hint: this.options.btnHint || ''
|
||||||
});
|
});
|
||||||
this._button.on('click', _.bind(this.onButtonClick, this));
|
this._button.on('click', _.bind(this.onButtonClick, this));
|
||||||
|
@ -512,6 +515,8 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
me.rendered = true;
|
me.rendered = true;
|
||||||
|
if (me.value)
|
||||||
|
me.setValue(me.value);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
@ -521,6 +526,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
setDisabled: function(disabled) {
|
setDisabled: function(disabled) {
|
||||||
|
disabled = !!disabled;
|
||||||
this.disabled = disabled;
|
this.disabled = disabled;
|
||||||
$(this.el).toggleClass('disabled', disabled);
|
$(this.el).toggleClass('disabled', disabled);
|
||||||
disabled
|
disabled
|
||||||
|
@ -541,4 +547,122 @@ define([
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})());
|
})());
|
||||||
|
|
||||||
|
Common.UI.InputFieldBtnPassword = Common.UI.InputFieldBtn.extend(_.extend((function() {
|
||||||
|
return {
|
||||||
|
options: {
|
||||||
|
id: null,
|
||||||
|
cls: '',
|
||||||
|
style: '',
|
||||||
|
value: '',
|
||||||
|
name: '',
|
||||||
|
validation: null,
|
||||||
|
allowBlank: true,
|
||||||
|
placeHolder: '',
|
||||||
|
blankError: null,
|
||||||
|
spellcheck: false,
|
||||||
|
maskExp: '',
|
||||||
|
validateOnChange: false,
|
||||||
|
validateOnBlur: true,
|
||||||
|
disabled: false,
|
||||||
|
editable: true,
|
||||||
|
iconCls: 'btn-sheet-view',
|
||||||
|
btnHint: '',
|
||||||
|
repeatInput: null,
|
||||||
|
showPwdOnClick: true
|
||||||
|
},
|
||||||
|
|
||||||
|
initialize : function(options) {
|
||||||
|
options = options || {};
|
||||||
|
options.btnHint = options.btnHint || this.textHintShowPwd;
|
||||||
|
|
||||||
|
Common.UI.InputFieldBtn.prototype.initialize.call(this, options);
|
||||||
|
|
||||||
|
this.hidePwd = true;
|
||||||
|
this.repeatInput= this.options.repeatInput;
|
||||||
|
},
|
||||||
|
|
||||||
|
render: function (parentEl) {
|
||||||
|
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
|
||||||
|
this._btnElm.on('mousedown', _.bind(this.passwordShow, this));
|
||||||
|
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
|
||||||
|
passwordClick: function (e)
|
||||||
|
{
|
||||||
|
if(this.hidePwd) {
|
||||||
|
this.passwordShow(e);
|
||||||
|
this.hidePwd = false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.passwordHide(e);
|
||||||
|
this.hidePwd = true;
|
||||||
|
}
|
||||||
|
var me = this;
|
||||||
|
var prevstart = me._input[0].selectionStart,
|
||||||
|
prevend = me._input[0].selectionEnd;
|
||||||
|
setTimeout(function () {
|
||||||
|
me.focus();
|
||||||
|
me._input[0].selectionStart = prevstart;
|
||||||
|
me._input[0].selectionEnd = prevend;
|
||||||
|
}, 1);
|
||||||
|
},
|
||||||
|
|
||||||
|
passwordShow: function (e) {
|
||||||
|
if (this.disabled) return;
|
||||||
|
this._button.setIconCls('hide-password');
|
||||||
|
this.type = 'text';
|
||||||
|
|
||||||
|
this._input.attr('type', this.type);
|
||||||
|
if(this.repeatInput) {
|
||||||
|
this.repeatInput.type = this.type;
|
||||||
|
this.repeatInput._input.attr('type', this.type);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this.options.showPwdOnClick) {
|
||||||
|
this._button.updateHint(this.textHintHidePwd);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this._btnElm.on('mouseup', _.bind(this.passwordHide, this));
|
||||||
|
this._btnElm.on('mouseout', _.bind(this.passwordHide, this));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
passwordHide: function (e) {
|
||||||
|
this._button.setIconCls('btn-sheet-view');
|
||||||
|
this.type = 'password';
|
||||||
|
|
||||||
|
(this._input.val() !== '') && 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(this.options.showPwdOnClick) {
|
||||||
|
this._button.updateHint(this.textHintShowPwd);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this._btnElm.off('mouseup', this.passwordHide);
|
||||||
|
this._btnElm.off('mouseout', this.passwordHide);
|
||||||
|
var me = this;
|
||||||
|
var prevstart = me._input[0].selectionStart,
|
||||||
|
prevend = me._input[0].selectionEnd;
|
||||||
|
setTimeout(function () {
|
||||||
|
me.focus();
|
||||||
|
me._input[0].selectionStart = prevstart;
|
||||||
|
me._input[0].selectionEnd = prevend;
|
||||||
|
}, 1);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
textHintShowPwd: 'Show password',
|
||||||
|
textHintHidePwd: 'Hide password'
|
||||||
|
}
|
||||||
|
})(), Common.UI.InputFieldBtnPassword || {}));
|
||||||
});
|
});
|
127
apps/common/main/lib/component/Label.js
Normal file
|
@ -0,0 +1,127 @@
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* (c) Copyright Ascensio System SIA 2010-2022
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Label.js
|
||||||
|
*
|
||||||
|
* Created by Julia Radzhabova on 1/20/22
|
||||||
|
* Copyright (c) 2022 Ascensio System SIA. All rights reserved.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (Common === undefined)
|
||||||
|
var Common = {};
|
||||||
|
|
||||||
|
define([
|
||||||
|
'common/main/lib/component/BaseView',
|
||||||
|
'underscore'
|
||||||
|
], function (base, _) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
Common.UI.Label = Common.UI.BaseView.extend({
|
||||||
|
|
||||||
|
options : {
|
||||||
|
id : null,
|
||||||
|
disabled : false,
|
||||||
|
cls : '',
|
||||||
|
iconCls : '',
|
||||||
|
style : '',
|
||||||
|
caption : ''
|
||||||
|
},
|
||||||
|
|
||||||
|
template : _.template('<label class="label-cmp <%= cls %>" style="<%= style %>">' +
|
||||||
|
'<% if ( iconCls ) { %>' +
|
||||||
|
'<i class="icon <%= iconCls %>"></i>' +
|
||||||
|
'<% } %>' +
|
||||||
|
'<span class="caption"><%= caption %></span>' +
|
||||||
|
'</label>'),
|
||||||
|
|
||||||
|
initialize : function(options) {
|
||||||
|
Common.UI.BaseView.prototype.initialize.call(this, options);
|
||||||
|
|
||||||
|
this.id = this.options.id || Common.UI.getId();
|
||||||
|
this.cls = this.options.cls;
|
||||||
|
this.iconCls = this.options.iconCls;
|
||||||
|
this.style = this.options.style;
|
||||||
|
this.disabled = this.options.disabled;
|
||||||
|
this.caption = this.options.caption;
|
||||||
|
this.template = this.options.template || this.template;
|
||||||
|
this.rendered = false;
|
||||||
|
|
||||||
|
if (this.options.el)
|
||||||
|
this.render();
|
||||||
|
},
|
||||||
|
|
||||||
|
render: function (parentEl) {
|
||||||
|
var me = this;
|
||||||
|
if (!me.rendered) {
|
||||||
|
var elem = this.template({
|
||||||
|
id : me.id,
|
||||||
|
cls : me.cls,
|
||||||
|
iconCls : me.iconCls,
|
||||||
|
style : me.style,
|
||||||
|
caption : me.caption
|
||||||
|
});
|
||||||
|
if (parentEl) {
|
||||||
|
this.setElement(parentEl, false);
|
||||||
|
parentEl.html(elem);
|
||||||
|
} else {
|
||||||
|
me.$el.html(elem);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$label = me.$el.find('.label-cmp');
|
||||||
|
this.rendered = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.disabled)
|
||||||
|
this.setDisabled(this.disabled);
|
||||||
|
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
|
||||||
|
setDisabled: function(disabled) {
|
||||||
|
if (!this.rendered)
|
||||||
|
return;
|
||||||
|
|
||||||
|
disabled = (disabled===true);
|
||||||
|
if (disabled !== this.disabled) {
|
||||||
|
this.$label.toggleClass('disabled', disabled);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.disabled = disabled;
|
||||||
|
},
|
||||||
|
|
||||||
|
isDisabled: function() {
|
||||||
|
return this.disabled;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
|
@ -377,12 +377,12 @@ define([
|
||||||
onBeforeShowMenu: function(e) {
|
onBeforeShowMenu: function(e) {
|
||||||
Common.NotificationCenter.trigger('menu:show');
|
Common.NotificationCenter.trigger('menu:show');
|
||||||
this.trigger('show:before', this, e);
|
this.trigger('show:before', this, e);
|
||||||
this.alignPosition();
|
(e && e.target===e.currentTarget) && this.alignPosition();
|
||||||
},
|
},
|
||||||
|
|
||||||
onAfterShowMenu: function(e) {
|
onAfterShowMenu: function(e) {
|
||||||
this.trigger('show:after', this, e);
|
this.trigger('show:after', this, e);
|
||||||
if (this.scroller) {
|
if (this.scroller && e && e.target===e.currentTarget) {
|
||||||
var menuRoot = this.menuRoot;
|
var menuRoot = this.menuRoot;
|
||||||
if (this.wheelSpeed===undefined) {
|
if (this.wheelSpeed===undefined) {
|
||||||
var item = menuRoot.find('> li:first'),
|
var item = menuRoot.find('> li:first'),
|
||||||
|
@ -651,7 +651,28 @@ define([
|
||||||
if (left < 0)
|
if (left < 0)
|
||||||
left = 0;
|
left = 0;
|
||||||
|
|
||||||
if (this.options.restoreHeight) {
|
if (this.options.restoreHeightAndTop) { // can change top position, if top<0 - then change menu height
|
||||||
|
var cg = Common.Utils.croppedGeometry();
|
||||||
|
docH = cg.height - 10;
|
||||||
|
menuRoot.css('max-height', 'none');
|
||||||
|
menuH = menuRoot.outerHeight();
|
||||||
|
if (top + menuH > docH + cg.top) {
|
||||||
|
top = docH - menuH;
|
||||||
|
}
|
||||||
|
if (top < cg.top)
|
||||||
|
top = cg.top;
|
||||||
|
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 '),
|
||||||
|
minScrollbarLength: 30,
|
||||||
|
suppressScrollX: true,
|
||||||
|
alwaysVisibleY: this.scrollAlwaysVisible
|
||||||
|
}));
|
||||||
|
this.wheelSpeed = undefined;
|
||||||
|
}
|
||||||
|
this.scroller && this.scroller.update({alwaysVisibleY: this.scrollAlwaysVisible});
|
||||||
|
} else if (this.options.restoreHeight) {
|
||||||
if (typeof (this.options.restoreHeight) == "number") {
|
if (typeof (this.options.restoreHeight) == "number") {
|
||||||
if (top + menuH > docH) {
|
if (top + menuH > docH) {
|
||||||
menuRoot.css('max-height', (docH - top) + 'px');
|
menuRoot.css('max-height', (docH - top) + 'px');
|
||||||
|
@ -954,12 +975,12 @@ define([
|
||||||
onBeforeShowMenu: function(e) {
|
onBeforeShowMenu: function(e) {
|
||||||
Common.NotificationCenter.trigger('menu:show');
|
Common.NotificationCenter.trigger('menu:show');
|
||||||
this.trigger('show:before', this, e);
|
this.trigger('show:before', this, e);
|
||||||
this.alignPosition();
|
(e && e.target===e.currentTarget) && this.alignPosition();
|
||||||
},
|
},
|
||||||
|
|
||||||
onAfterShowMenu: function(e) {
|
onAfterShowMenu: function(e) {
|
||||||
this.trigger('show:after', this, e);
|
this.trigger('show:after', this, e);
|
||||||
if (this.scroller) {
|
if (this.scroller && e && e.target===e.currentTarget) {
|
||||||
this.scroller.update({alwaysVisibleY: this.scrollAlwaysVisible});
|
this.scroller.update({alwaysVisibleY: this.scrollAlwaysVisible});
|
||||||
var menuRoot = this.menuRoot,
|
var menuRoot = this.menuRoot,
|
||||||
$selected = menuRoot.find('> li .checked');
|
$selected = menuRoot.find('> li .checked');
|
||||||
|
|
|
@ -206,6 +206,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
setDisabled: function(disabled) {
|
setDisabled: function(disabled) {
|
||||||
|
disabled = !!disabled;
|
||||||
var el = this.$el || $(this.el);
|
var el = this.$el || $(this.el);
|
||||||
if (disabled !== this.disabled) {
|
if (disabled !== this.disabled) {
|
||||||
el.find('button').toggleClass('disabled', disabled);
|
el.find('button').toggleClass('disabled', disabled);
|
||||||
|
@ -242,6 +243,14 @@ define([
|
||||||
this.options.step = step;
|
this.options.step = step;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getMinValue: function(){
|
||||||
|
return this.options.minValue;
|
||||||
|
},
|
||||||
|
|
||||||
|
getMaxValue: function(){
|
||||||
|
return this.options.maxValue;
|
||||||
|
},
|
||||||
|
|
||||||
getNumberValue: function(){
|
getNumberValue: function(){
|
||||||
return this.checkAutoText(this.value) ? -1 : parseFloat(this.value);
|
return this.checkAutoText(this.value) ? -1 : parseFloat(this.value);
|
||||||
},
|
},
|
||||||
|
|
|
@ -99,7 +99,8 @@ define([
|
||||||
'<% if (typeof items[i] == "object") { %>' +
|
'<% if (typeof items[i] == "object") { %>' +
|
||||||
'<li class="ribtab' +
|
'<li class="ribtab' +
|
||||||
'<% if (items[i].haspanel===false) print(" x-lone") %>' +
|
'<% if (items[i].haspanel===false) print(" x-lone") %>' +
|
||||||
'<% if (items[i].extcls) print(\' \' + items[i].extcls) %>">' +
|
'<% if (items[i].extcls) print(\' \' + items[i].extcls) %>"' +
|
||||||
|
'<% if (typeof items[i].layoutname == "string") print(" data-layout-name=" + \' \' + items[i].layoutname) + \' \' %>>' +
|
||||||
'<a data-tab="<%= items[i].action %>" data-title="<%= items[i].caption %>" data-hint="0" data-hint-direction="bottom" data-hint-offset="small" <% if (typeof items[i].dataHintTitle !== "undefined") { %> data-hint-title="<%= items[i].dataHintTitle %>" <% } %>><%= items[i].caption %></a>' +
|
'<a data-tab="<%= items[i].action %>" data-title="<%= items[i].caption %>" data-hint="0" data-hint-direction="bottom" data-hint-offset="small" <% if (typeof items[i].dataHintTitle !== "undefined") { %> data-hint-title="<%= items[i].dataHintTitle %>" <% } %>><%= items[i].caption %></a>' +
|
||||||
'</li>' +
|
'</li>' +
|
||||||
'<% } %>' +
|
'<% } %>' +
|
||||||
|
@ -316,7 +317,7 @@ define([
|
||||||
return config.tabs[index].action;
|
return config.tabs[index].action;
|
||||||
}
|
}
|
||||||
|
|
||||||
var _tabTemplate = _.template('<li class="ribtab" style="display: none;"><a data-tab="<%= action %>" data-title="<%= caption %>" data-hint="0" data-hint-direction="bottom" data-hint-offset="small" <% if (typeof dataHintTitle !== "undefined") { %> data-hint-title="<%= dataHintTitle %>" <% } %> ><%= caption %></a></li>');
|
var _tabTemplate = _.template('<li class="ribtab" style="display: none;" <% if (typeof layoutname == "string") print(" data-layout-name=" + \' \' + layoutname) + \' \' %>><a data-tab="<%= action %>" data-title="<%= caption %>" data-hint="0" data-hint-direction="bottom" data-hint-offset="small" <% if (typeof dataHintTitle !== "undefined") { %> data-hint-title="<%= dataHintTitle %>" <% } %> ><%= caption %></a></li>');
|
||||||
|
|
||||||
config.tabs[after + 1] = tab;
|
config.tabs[after + 1] = tab;
|
||||||
var _after_action = _get_tab_action(after);
|
var _after_action = _get_tab_action(after);
|
||||||
|
|
|
@ -133,6 +133,7 @@ define([
|
||||||
if (!this.rendered)
|
if (!this.rendered)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
disabled = !!disabled;
|
||||||
if (disabled !== this.disabled) {
|
if (disabled !== this.disabled) {
|
||||||
this.$label.toggleClass('disabled', disabled);
|
this.$label.toggleClass('disabled', disabled);
|
||||||
this.$radio.toggleClass('disabled', disabled);
|
this.$radio.toggleClass('disabled', disabled);
|
||||||
|
|
|
@ -272,6 +272,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
setDisabled: function(disabled) {
|
setDisabled: function(disabled) {
|
||||||
|
disabled = !!disabled;
|
||||||
if (disabled !== this.disabled)
|
if (disabled !== this.disabled)
|
||||||
this.cmpEl.toggleClass('disabled', disabled);
|
this.cmpEl.toggleClass('disabled', disabled);
|
||||||
this.disabled = disabled;
|
this.disabled = disabled;
|
||||||
|
@ -386,17 +387,11 @@ define([
|
||||||
need_sort = position < minValue || position > maxValue,
|
need_sort = position < minValue || position > maxValue,
|
||||||
pos = Math.max(0, Math.min(100, position)),
|
pos = Math.max(0, Math.min(100, position)),
|
||||||
value = pos/me.delta + me.minValue;
|
value = pos/me.delta + me.minValue;
|
||||||
|
|
||||||
if (me.thumbs.length < 3)
|
if (me.thumbs.length < 3)
|
||||||
me.isRemoveThumb = false;
|
me.isRemoveThumb = false;
|
||||||
|
|
||||||
if (me.isRemoveThumb) {
|
if (me.isRemoveThumb) {
|
||||||
if (me.thumbs.length < 3) {
|
|
||||||
$(document).off('mouseup', me.binding.onMouseUp);
|
|
||||||
$(document).off('mousemove', me.binding.onMouseMove);
|
|
||||||
me._dragstart = undefined;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
me.trigger('removethumb', me, _.findIndex(me.thumbs, {index: index}));
|
me.trigger('removethumb', me, _.findIndex(me.thumbs, {index: index}));
|
||||||
me.trigger('change', me, value, lastValue);
|
me.trigger('change', me, value, lastValue);
|
||||||
me.trigger('changecomplete', me, value, lastValue);
|
me.trigger('changecomplete', me, value, lastValue);
|
||||||
|
@ -410,7 +405,6 @@ define([
|
||||||
|
|
||||||
$(document).off('mouseup', me.binding.onMouseUp);
|
$(document).off('mouseup', me.binding.onMouseUp);
|
||||||
$(document).off('mousemove', me.binding.onMouseMove);
|
$(document).off('mousemove', me.binding.onMouseMove);
|
||||||
|
|
||||||
me._dragstart = undefined;
|
me._dragstart = undefined;
|
||||||
!me.isRemoveThumb && me.trigger('changecomplete', me, value, lastValue);
|
!me.isRemoveThumb && me.trigger('changecomplete', me, value, lastValue);
|
||||||
me.isRemoveThumb = undefined;
|
me.isRemoveThumb = undefined;
|
||||||
|
@ -595,6 +589,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
setDisabled: function(disabled) {
|
setDisabled: function(disabled) {
|
||||||
|
disabled = !!disabled;
|
||||||
if (disabled !== this.disabled)
|
if (disabled !== this.disabled)
|
||||||
this.cmpEl.toggleClass('disabled', disabled);
|
this.cmpEl.toggleClass('disabled', disabled);
|
||||||
this.disabled = disabled;
|
this.disabled = disabled;
|
||||||
|
|
|
@ -50,7 +50,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
template: _.template([
|
template: _.template([
|
||||||
'<div class="synch-tip-root <% if (!!scope.options.extCls) {print(scope.options.extCls + \" \");} %><%= scope.placement %>">',
|
'<div class="synch-tip-root <% if (!!scope.options.extCls) {print(scope.options.extCls + \" \");} %><%= scope.placement %>" style="<%= scope.style %>">',
|
||||||
'<div class="asc-synchronizetip">',
|
'<div class="asc-synchronizetip">',
|
||||||
'<div class="tip-arrow <%= scope.placement %>"></div>',
|
'<div class="tip-arrow <%= scope.placement %>"></div>',
|
||||||
'<div>',
|
'<div>',
|
||||||
|
@ -76,11 +76,13 @@ define([
|
||||||
this.target = this.options.target;
|
this.target = this.options.target;
|
||||||
this.text = !_.isEmpty(this.options.text) ? this.options.text : this.textSynchronize;
|
this.text = !_.isEmpty(this.options.text) ? this.options.text : this.textSynchronize;
|
||||||
this.textLink = !_.isEmpty(this.options.textLink) ? this.options.textLink : this.textDontShow;
|
this.textLink = !_.isEmpty(this.options.textLink) ? this.options.textLink : this.textDontShow;
|
||||||
this.placement = this.options.placement;
|
this.placement = this.options.placement; // if placement='target' and position is undefined show in top,left position of target, also use for arrow position
|
||||||
this.showLink = this.options.showLink;
|
this.showLink = this.options.showLink;
|
||||||
this.showButton = this.options.showButton;
|
this.showButton = this.options.showButton;
|
||||||
this.closable = this.options.closable;
|
this.closable = this.options.closable;
|
||||||
this.textButton = this.options.textButton || '';
|
this.textButton = this.options.textButton || '';
|
||||||
|
this.position = this.options.position; // show in the position relative to target
|
||||||
|
this.style = this.options.style || '';
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
|
@ -90,6 +92,8 @@ define([
|
||||||
this.cmpEl.find('.close').on('click', _.bind(function() { this.trigger('closeclick');}, this));
|
this.cmpEl.find('.close').on('click', _.bind(function() { this.trigger('closeclick');}, this));
|
||||||
this.cmpEl.find('.show-link label').on('click', _.bind(function() { this.trigger('dontshowclick');}, this));
|
this.cmpEl.find('.show-link label').on('click', _.bind(function() { this.trigger('dontshowclick');}, this));
|
||||||
this.cmpEl.find('.btn-div').on('click', _.bind(function() { this.trigger('buttonclick');}, this));
|
this.cmpEl.find('.btn-div').on('click', _.bind(function() { this.trigger('buttonclick');}, this));
|
||||||
|
|
||||||
|
this.closable && this.cmpEl.addClass('closable');
|
||||||
}
|
}
|
||||||
|
|
||||||
this.applyPlacement();
|
this.applyPlacement();
|
||||||
|
@ -115,12 +119,28 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
applyPlacement: function () {
|
applyPlacement: function () {
|
||||||
var showxy = this.target.offset();
|
var target = this.target && this.target.length>0 ? this.target : $(document.body);
|
||||||
if (this.placement=='target') {
|
var showxy = target.offset();
|
||||||
|
if (this.placement=='target' && !this.position) {
|
||||||
this.cmpEl.css({top : showxy.top + 5 + 'px', left: showxy.left + 5 + 'px'});
|
this.cmpEl.css({top : showxy.top + 5 + 'px', left: showxy.left + 5 + 'px'});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.position && typeof this.position == 'object') {
|
||||||
|
var top = this.position.top, left = this.position.left, bottom = this.position.bottom, right = this.position.right;
|
||||||
|
if (bottom!==undefined || top!==undefined)
|
||||||
|
left = showxy.left + (target.width() - this.cmpEl.width())/2;
|
||||||
|
else
|
||||||
|
top = showxy.top + (target.height() - this.cmpEl.height())/2;
|
||||||
|
top = (top!==undefined) ? (top + 'px') : 'auto';
|
||||||
|
bottom = (bottom!==undefined) ? (bottom + 'px') : 'auto';
|
||||||
|
right = (right!==undefined) ? (right + 'px') : 'auto';
|
||||||
|
left = (left!==undefined) ? (left + 'px') : 'auto';
|
||||||
|
|
||||||
|
this.cmpEl.css({top : top, left: left, right: right, bottom: bottom});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var placement = this.placement.split('-');
|
var placement = this.placement.split('-');
|
||||||
if (placement.length>0) {
|
if (placement.length>0) {
|
||||||
var top, left, bottom, right;
|
var top, left, bottom, right;
|
||||||
|
@ -128,29 +148,29 @@ define([
|
||||||
if (pos=='top') {
|
if (pos=='top') {
|
||||||
bottom = Common.Utils.innerHeight() - showxy.top;
|
bottom = Common.Utils.innerHeight() - showxy.top;
|
||||||
} else if (pos == 'bottom') {
|
} else if (pos == 'bottom') {
|
||||||
top = showxy.top + this.target.height();
|
top = showxy.top + target.height();
|
||||||
} else if (pos == 'left') {
|
} else if (pos == 'left') {
|
||||||
right = Common.Utils.innerWidth() - showxy.left;
|
right = Common.Utils.innerWidth() - showxy.left;
|
||||||
} else if (pos == 'right') {
|
} else if (pos == 'right') {
|
||||||
left = showxy.left + this.target.width();
|
left = showxy.left + target.width();
|
||||||
}
|
}
|
||||||
pos = placement[1];
|
pos = placement[1];
|
||||||
if (pos=='top') {
|
if (pos=='top') {
|
||||||
bottom = Common.Utils.innerHeight() - showxy.top - this.target.height()/2;
|
bottom = Common.Utils.innerHeight() - showxy.top - target.height()/2;
|
||||||
} else if (pos == 'bottom') {
|
} else if (pos == 'bottom') {
|
||||||
top = showxy.top + this.target.height()/2;
|
top = showxy.top + target.height()/2;
|
||||||
var height = this.cmpEl.height();
|
var height = this.cmpEl.height();
|
||||||
if (top+height>Common.Utils.innerHeight())
|
if (top+height>Common.Utils.innerHeight())
|
||||||
top = Common.Utils.innerHeight() - height - 10;
|
top = Common.Utils.innerHeight() - height - 10;
|
||||||
} else if (pos == 'left') {
|
} else if (pos == 'left') {
|
||||||
right = Common.Utils.innerWidth() - showxy.left - this.target.width()/2;
|
right = Common.Utils.innerWidth() - showxy.left - target.width()/2;
|
||||||
} else if (pos == 'right') {
|
} else if (pos == 'right') {
|
||||||
left = showxy.left + this.target.width()/2;
|
left = showxy.left + target.width()/2;
|
||||||
} else {
|
} else {
|
||||||
if (bottom!==undefined || top!==undefined)
|
if (bottom!==undefined || top!==undefined)
|
||||||
left = showxy.left + (this.target.width() - this.cmpEl.width())/2;
|
left = showxy.left + (target.width() - this.cmpEl.width())/2;
|
||||||
else
|
else
|
||||||
top = showxy.top + (this.target.height() - this.cmpEl.height())/2;
|
top = showxy.top + (target.height() - this.cmpEl.height())/2;
|
||||||
}
|
}
|
||||||
top = (top!==undefined) ? (top + 'px') : 'auto';
|
top = (top!==undefined) ? (top + 'px') : 'auto';
|
||||||
bottom = (bottom!==undefined) ? (bottom + 'px') : 'auto';
|
bottom = (bottom!==undefined) ? (bottom + 'px') : 'auto';
|
||||||
|
|
|
@ -183,6 +183,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
setDisabled: function(disabled) {
|
setDisabled: function(disabled) {
|
||||||
|
disabled = !!disabled;
|
||||||
this.disabled = disabled;
|
this.disabled = disabled;
|
||||||
$(this.el).toggleClass('disabled', disabled);
|
$(this.el).toggleClass('disabled', disabled);
|
||||||
disabled
|
disabled
|
||||||
|
|
|
@ -212,19 +212,7 @@ define([
|
||||||
this.dataViewItems.push(view);
|
this.dataViewItems.push(view);
|
||||||
}
|
}
|
||||||
|
|
||||||
var name = record.get('name');
|
this.updateTip(view);
|
||||||
if (name.length > 37 - record.get('level')*2)
|
|
||||||
record.set('tip', name);
|
|
||||||
if (record.get('tip')) {
|
|
||||||
var view_el = $(view.el);
|
|
||||||
view_el.attr('data-toggle', 'tooltip');
|
|
||||||
view_el.tooltip({
|
|
||||||
title : record.get('tip'),
|
|
||||||
placement : 'cursor',
|
|
||||||
zIndex : this.tipZIndex
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
this.listenTo(view, 'change', this.onChangeItem);
|
this.listenTo(view, 'change', this.onChangeItem);
|
||||||
this.listenTo(view, 'remove', this.onRemoveItem);
|
this.listenTo(view, 'remove', this.onRemoveItem);
|
||||||
this.listenTo(view, 'click', this.onClickItem);
|
this.listenTo(view, 'click', this.onClickItem);
|
||||||
|
@ -361,6 +349,51 @@ define([
|
||||||
|
|
||||||
focus: function() {
|
focus: function() {
|
||||||
this.cmpEl && this.cmpEl.find('.treeview').focus();
|
this.cmpEl && this.cmpEl.find('.treeview').focus();
|
||||||
|
},
|
||||||
|
|
||||||
|
updateTip: function(item) {
|
||||||
|
var record = item.model,
|
||||||
|
name = record.get('name'),
|
||||||
|
me = this;
|
||||||
|
|
||||||
|
if (name.length > 37 - record.get('level')*2)
|
||||||
|
record.set('tip', name);
|
||||||
|
else
|
||||||
|
record.set('tip', '');
|
||||||
|
|
||||||
|
var el = item.$el || $(item.el);
|
||||||
|
var tip = el.data('bs.tooltip');
|
||||||
|
if (tip) {
|
||||||
|
if (tip.dontShow===undefined)
|
||||||
|
tip.dontShow = true;
|
||||||
|
el.removeData('bs.tooltip');
|
||||||
|
}
|
||||||
|
if (record.get('tip')) {
|
||||||
|
el.attr('data-toggle', 'tooltip');
|
||||||
|
el.tooltip({
|
||||||
|
title : record.get('tip'),
|
||||||
|
placement : 'cursor',
|
||||||
|
zIndex : this.tipZIndex
|
||||||
|
});
|
||||||
|
if (this.delayRenderTips)
|
||||||
|
el.one('mouseenter', function(){
|
||||||
|
el.attr('data-toggle', 'tooltip');
|
||||||
|
el.tooltip({
|
||||||
|
title : record.get('tip'),
|
||||||
|
placement : 'cursor',
|
||||||
|
zIndex : me.tipZIndex
|
||||||
|
});
|
||||||
|
el.mouseenter();
|
||||||
|
});
|
||||||
|
else {
|
||||||
|
el.attr('data-toggle', 'tooltip');
|
||||||
|
el.tooltip({
|
||||||
|
title : record.get('tip'),
|
||||||
|
placement : 'cursor',
|
||||||
|
zIndex : me.tipZIndex
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})());
|
})());
|
||||||
|
|
|
@ -138,7 +138,7 @@
|
||||||
define([
|
define([
|
||||||
'common/main/lib/component/BaseView',
|
'common/main/lib/component/BaseView',
|
||||||
'common/main/lib/component/CheckBox',
|
'common/main/lib/component/CheckBox',
|
||||||
'common/main/lib/component/FocusManager'
|
'common/main/lib/controller/FocusManager'
|
||||||
], function () {
|
], function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
|
@ -89,6 +89,7 @@ define([
|
||||||
|
|
||||||
setMode: function(mode) {
|
setMode: function(mode) {
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
|
this.currentUserId = mode.user.id;
|
||||||
|
|
||||||
if (this.api) {
|
if (this.api) {
|
||||||
if (this.mode.canCoAuthoring && this.mode.canChat)
|
if (this.mode.canCoAuthoring && this.mode.canChat)
|
||||||
|
@ -142,7 +143,8 @@ define([
|
||||||
username : user.asc_getUserName(),
|
username : user.asc_getUserName(),
|
||||||
online : true,
|
online : true,
|
||||||
color : user.asc_getColor(),
|
color : user.asc_getColor(),
|
||||||
view : user.asc_getView()
|
view : user.asc_getView(),
|
||||||
|
hidden : !(user.asc_getIdOriginal()===this.currentUserId || AscCommon.UserInfoParser.isUserVisible(user.asc_getUserName()))
|
||||||
});
|
});
|
||||||
arrUsers[(user.asc_getId() == currentUserId ) ? 'unshift' : 'push'](usermodel);
|
arrUsers[(user.asc_getId() == currentUserId ) ? 'unshift' : 'push'](usermodel);
|
||||||
}
|
}
|
||||||
|
@ -165,7 +167,8 @@ define([
|
||||||
username : change.asc_getUserName(),
|
username : change.asc_getUserName(),
|
||||||
online : change.asc_getState(),
|
online : change.asc_getState(),
|
||||||
color : change.asc_getColor(),
|
color : change.asc_getColor(),
|
||||||
view : change.asc_getView()
|
view : change.asc_getView(),
|
||||||
|
hidden : !(change.asc_getIdOriginal()===this.currentUserId || AscCommon.UserInfoParser.isUserVisible(change.asc_getUserName()))
|
||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
user.set({online: change.asc_getState()});
|
user.set({online: change.asc_getState()});
|
||||||
|
|
|
@ -103,7 +103,8 @@ define([
|
||||||
// work handlers
|
// work handlers
|
||||||
|
|
||||||
'comment:closeEditing': _.bind(this.closeEditing, this),
|
'comment:closeEditing': _.bind(this.closeEditing, this),
|
||||||
'comment:sort': _.bind(this.setComparator, this)
|
'comment:sort': _.bind(this.setComparator, this),
|
||||||
|
'comment:filtergroups': _.bind(this.setFilterGroups, this)
|
||||||
},
|
},
|
||||||
|
|
||||||
'Common.Views.ReviewPopover': {
|
'Common.Views.ReviewPopover': {
|
||||||
|
@ -157,6 +158,7 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
this.groupCollection = [];
|
this.groupCollection = [];
|
||||||
|
this.userGroups = []; // for filtering comments
|
||||||
|
|
||||||
this.view = this.createView('Common.Views.Comments', { store: this.collection });
|
this.view = this.createView('Common.Views.Comments', { store: this.collection });
|
||||||
this.view.render();
|
this.view.render();
|
||||||
|
@ -695,14 +697,15 @@ define([
|
||||||
|
|
||||||
var end = true;
|
var end = true;
|
||||||
for (var i = this.collection.length - 1; i >= 0; --i) {
|
for (var i = this.collection.length - 1; i >= 0; --i) {
|
||||||
if (end) {
|
var item = this.collection.at(i);
|
||||||
this.collection.at(i).set('last', true, {silent: true});
|
if (end && !item.get('hide') && !item.get('filtered')) {
|
||||||
|
item.set('last', true, {silent: true});
|
||||||
|
end = false;
|
||||||
} else {
|
} else {
|
||||||
if (this.collection.at(i).get('last')) {
|
if (item.get('last')) {
|
||||||
this.collection.at(i).set('last', false, {silent: true});
|
item.set('last', false, {silent: true});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end = false;
|
|
||||||
}
|
}
|
||||||
this.view.render();
|
this.view.render();
|
||||||
this.view.update();
|
this.view.update();
|
||||||
|
@ -820,6 +823,7 @@ define([
|
||||||
comment.set('userid', data.asc_getUserId());
|
comment.set('userid', data.asc_getUserId());
|
||||||
comment.set('username', data.asc_getUserName());
|
comment.set('username', data.asc_getUserName());
|
||||||
comment.set('parsedName', AscCommon.UserInfoParser.getParsedName(data.asc_getUserName()));
|
comment.set('parsedName', AscCommon.UserInfoParser.getParsedName(data.asc_getUserName()));
|
||||||
|
comment.set('parsedGroups', AscCommon.UserInfoParser.getParsedGroups(data.asc_getUserName()));
|
||||||
comment.set('usercolor', (user) ? user.get('color') : null);
|
comment.set('usercolor', (user) ? user.get('color') : null);
|
||||||
comment.set('resolved', data.asc_getSolved());
|
comment.set('resolved', data.asc_getSolved());
|
||||||
comment.set('quote', data.asc_getQuoteText());
|
comment.set('quote', data.asc_getQuoteText());
|
||||||
|
@ -830,6 +834,14 @@ define([
|
||||||
comment.set('removable', (t.mode.canDeleteComments || (data.asc_getUserId() == t.currentUserId)) && AscCommon.UserInfoParser.canDeleteComment(data.asc_getUserName()));
|
comment.set('removable', (t.mode.canDeleteComments || (data.asc_getUserId() == t.currentUserId)) && AscCommon.UserInfoParser.canDeleteComment(data.asc_getUserName()));
|
||||||
comment.set('hide', !AscCommon.UserInfoParser.canViewComment(data.asc_getUserName()));
|
comment.set('hide', !AscCommon.UserInfoParser.canViewComment(data.asc_getUserName()));
|
||||||
|
|
||||||
|
if (!comment.get('hide')) {
|
||||||
|
var usergroups = comment.get('parsedGroups');
|
||||||
|
t.fillUserGroups(usergroups);
|
||||||
|
var group = Common.Utils.InternalSettings.get(t.appPrefix + "comments-filtergroups");
|
||||||
|
var filter = !!group && (group!==-1) && (!usergroups || usergroups.length<1 || usergroups.indexOf(group)<0);
|
||||||
|
comment.set('filtered', filter);
|
||||||
|
}
|
||||||
|
|
||||||
replies = _.clone(comment.get('replys'));
|
replies = _.clone(comment.get('replys'));
|
||||||
|
|
||||||
replies.length = 0;
|
replies.length = 0;
|
||||||
|
@ -908,8 +920,6 @@ define([
|
||||||
// хотим показать тот же коментарий что был и выбран
|
// хотим показать тот же коментарий что был и выбран
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.mode && !this.mode.canComments)
|
|
||||||
hint = true;
|
|
||||||
|
|
||||||
var popover = this.getPopover();
|
var popover = this.getPopover();
|
||||||
if (popover) {
|
if (popover) {
|
||||||
|
@ -1150,14 +1160,15 @@ define([
|
||||||
this.onUpdateFilter(this.filter, true);
|
this.onUpdateFilter(this.filter, true);
|
||||||
|
|
||||||
for (i = this.collection.length - 1; i >= 0; --i) {
|
for (i = this.collection.length - 1; i >= 0; --i) {
|
||||||
if (end) {
|
var item = this.collection.at(i);
|
||||||
this.collection.at(i).set('last', true, {silent: true});
|
if (end && !item.get('hide') && !item.get('filtered')) {
|
||||||
|
item.set('last', true, {silent: true});
|
||||||
|
end = false;
|
||||||
} else {
|
} else {
|
||||||
if (this.collection.at(i).get('last')) {
|
if (item.get('last')) {
|
||||||
this.collection.at(i).set('last', false, {silent: true});
|
item.set('last', false, {silent: true});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.view.render();
|
this.view.render();
|
||||||
|
@ -1308,6 +1319,7 @@ define([
|
||||||
userid : data.asc_getUserId(),
|
userid : data.asc_getUserId(),
|
||||||
username : data.asc_getUserName(),
|
username : data.asc_getUserName(),
|
||||||
parsedName : AscCommon.UserInfoParser.getParsedName(data.asc_getUserName()),
|
parsedName : AscCommon.UserInfoParser.getParsedName(data.asc_getUserName()),
|
||||||
|
parsedGroups : AscCommon.UserInfoParser.getParsedGroups(data.asc_getUserName()),
|
||||||
usercolor : (user) ? user.get('color') : null,
|
usercolor : (user) ? user.get('color') : null,
|
||||||
date : this.dateToLocaleTimeString(date),
|
date : this.dateToLocaleTimeString(date),
|
||||||
quote : data.asc_getQuoteText(),
|
quote : data.asc_getQuoteText(),
|
||||||
|
@ -1331,6 +1343,13 @@ define([
|
||||||
groupName : (groupname && groupname.length>1) ? groupname[1] : null
|
groupName : (groupname && groupname.length>1) ? groupname[1] : null
|
||||||
});
|
});
|
||||||
if (comment) {
|
if (comment) {
|
||||||
|
if (!comment.get('hide')) {
|
||||||
|
var usergroups = comment.get('parsedGroups');
|
||||||
|
this.fillUserGroups(usergroups);
|
||||||
|
var group = Common.Utils.InternalSettings.get(this.appPrefix + "comments-filtergroups");
|
||||||
|
var filter = !!group && (group!==-1) && (!usergroups || usergroups.length<1 || usergroups.indexOf(group)<0);
|
||||||
|
comment.set('filtered', filter);
|
||||||
|
}
|
||||||
var replies = this.readSDKReplies(data);
|
var replies = this.readSDKReplies(data);
|
||||||
if (replies.length) {
|
if (replies.length) {
|
||||||
comment.set('replys', replies);
|
comment.set('replys', replies);
|
||||||
|
@ -1641,6 +1660,64 @@ define([
|
||||||
clearCollections: function() {
|
clearCollections: function() {
|
||||||
this.collection.reset();
|
this.collection.reset();
|
||||||
this.groupCollection = [];
|
this.groupCollection = [];
|
||||||
|
},
|
||||||
|
|
||||||
|
fillUserGroups: function(usergroups) {
|
||||||
|
if (!this.mode.canUseCommentPermissions) return;
|
||||||
|
|
||||||
|
var viewgroups = AscCommon.UserInfoParser.getCommentPermissions('view');
|
||||||
|
if (usergroups && usergroups.length>0) {
|
||||||
|
if (viewgroups)
|
||||||
|
usergroups = _.intersection(usergroups, viewgroups);
|
||||||
|
usergroups = _.uniq(this.userGroups.concat(usergroups));
|
||||||
|
}
|
||||||
|
if (this.view && this.view.buttonSort && _.difference(usergroups, this.userGroups).length>0) {
|
||||||
|
this.userGroups = usergroups;
|
||||||
|
var menu = this.view.buttonSort.menu;
|
||||||
|
menu.items[menu.items.length-1].setVisible(this.userGroups.length>0);
|
||||||
|
menu.items[menu.items.length-2].setVisible(this.userGroups.length>0);
|
||||||
|
menu = menu.items[menu.items.length-1].menu;
|
||||||
|
menu.removeAll();
|
||||||
|
|
||||||
|
var last = Common.Utils.InternalSettings.get(this.appPrefix + "comments-filtergroups");
|
||||||
|
menu.addItem(new Common.UI.MenuItem({
|
||||||
|
checkable: true,
|
||||||
|
checked: last===-1 || last===undefined,
|
||||||
|
toggleGroup: 'filtercomments',
|
||||||
|
caption: this.view.textAll,
|
||||||
|
value: -1
|
||||||
|
}));
|
||||||
|
this.userGroups.forEach(function(item){
|
||||||
|
menu.addItem(new Common.UI.MenuItem({
|
||||||
|
checkable: true,
|
||||||
|
checked: last === item,
|
||||||
|
toggleGroup: 'filtercomments',
|
||||||
|
caption: Common.Utils.String.htmlEncode(item),
|
||||||
|
value: item
|
||||||
|
}));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
setFilterGroups: function (group) {
|
||||||
|
Common.Utils.InternalSettings.set(this.appPrefix + "comments-filtergroups", group);
|
||||||
|
var i, end = true;
|
||||||
|
for (i = this.collection.length - 1; i >= 0; --i) {
|
||||||
|
var item = this.collection.at(i);
|
||||||
|
if (!item.get('hide')) {
|
||||||
|
var usergroups = item.get('parsedGroups');
|
||||||
|
item.set('filtered', !!group && (group!==-1) && (!usergroups || usergroups.length<1 || usergroups.indexOf(group)<0), {silent: true});
|
||||||
|
}
|
||||||
|
if (end && !item.get('hide') && !item.get('filtered')) {
|
||||||
|
item.set('last', true, {silent: true});
|
||||||
|
end = false;
|
||||||
|
} else {
|
||||||
|
if (item.get('last')) {
|
||||||
|
item.set('last', false, {silent: true});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.updateComments(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}, Common.Controllers.Comments || {}));
|
}, Common.Controllers.Comments || {}));
|
||||||
|
|
|
@ -116,7 +116,8 @@ Common.UI.HintManager = new(function() {
|
||||||
_isLockedKeyEvents = false,
|
_isLockedKeyEvents = false,
|
||||||
_inputTimer,
|
_inputTimer,
|
||||||
_isDocReady = false,
|
_isDocReady = false,
|
||||||
_isEditDiagram = false;
|
_isEditDiagram = false,
|
||||||
|
_usedTitles = [];
|
||||||
|
|
||||||
var _api;
|
var _api;
|
||||||
|
|
||||||
|
@ -198,10 +199,21 @@ Common.UI.HintManager = new(function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
var _getLetters = function(countButtons) {
|
var _getLetters = function(countButtons) {
|
||||||
var arr = _arrAlphabet.slice();
|
var arr = _arrAlphabet.slice(),
|
||||||
arr[0] = _arrAlphabet[0] + _arrAlphabet[0];
|
firstFreeLetter,
|
||||||
for (var i = 1; arr.length < countButtons; i++) {
|
ind;
|
||||||
arr.push(_arrAlphabet[0] + _arrAlphabet[i]);
|
for (var i = 0; i < _arrAlphabet.length, !firstFreeLetter; i++) {
|
||||||
|
if (_usedTitles.indexOf(_arrAlphabet[i]) === -1) {
|
||||||
|
firstFreeLetter = _arrAlphabet[i];
|
||||||
|
ind = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
arr[ind] = firstFreeLetter + _arrAlphabet[0];
|
||||||
|
for (var i = 0; arr.length < countButtons; i++) {
|
||||||
|
var addTip = firstFreeLetter + _arrAlphabet[i];
|
||||||
|
if (addTip !== arr[ind]) {
|
||||||
|
arr.push(firstFreeLetter + _arrAlphabet[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return arr;
|
return arr;
|
||||||
};
|
};
|
||||||
|
@ -212,6 +224,7 @@ Common.UI.HintManager = new(function() {
|
||||||
|
|
||||||
var _getControls = function() {
|
var _getControls = function() {
|
||||||
_currentControls = [];
|
_currentControls = [];
|
||||||
|
_usedTitles = [];
|
||||||
var arr = [],
|
var arr = [],
|
||||||
arrItemsWithTitle = [];
|
arrItemsWithTitle = [];
|
||||||
if (_.isArray(_currentSection)) {
|
if (_.isArray(_currentSection)) {
|
||||||
|
@ -252,6 +265,14 @@ Common.UI.HintManager = new(function() {
|
||||||
}
|
}
|
||||||
var _arrLetters = [];
|
var _arrLetters = [];
|
||||||
if (visibleItems.length > _arrAlphabet.length) {
|
if (visibleItems.length > _arrAlphabet.length) {
|
||||||
|
visibleItemsWithTitle.forEach(function (item) {
|
||||||
|
var t = $(item).data('hint-title').toLowerCase();
|
||||||
|
if (_arrAlphabet.indexOf(t) === -1) {
|
||||||
|
var ind = _arrEnAlphabet.indexOf(t);
|
||||||
|
t = _arrAlphabet[ind];
|
||||||
|
}
|
||||||
|
_usedTitles.push(t);
|
||||||
|
});
|
||||||
_arrLetters = _getLetters(visibleItems.length);
|
_arrLetters = _getLetters(visibleItems.length);
|
||||||
} else {
|
} else {
|
||||||
_arrLetters = _arrAlphabet.slice();
|
_arrLetters = _arrAlphabet.slice();
|
||||||
|
@ -573,9 +594,8 @@ Common.UI.HintManager = new(function() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var isAlt = e.keyCode == Common.UI.Keys.ALT;
|
_needShow = (!e.shiftKey && e.keyCode == Common.UI.Keys.ALT && !Common.Utils.ModalWindow.isVisible() && _isDocReady && _arrAlphabet.length > 0);
|
||||||
_needShow = (isAlt && !Common.Utils.ModalWindow.isVisible() && _isDocReady && _arrAlphabet.length > 0);
|
if (e.altKey && e.keyCode !== 115) {
|
||||||
if (isAlt) {
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
});
|
});
|
146
apps/common/main/lib/controller/LayoutManager.js
Normal file
|
@ -0,0 +1,146 @@
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* (c) Copyright Ascensio System SIA 2010-2021
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* LayoutManager.js
|
||||||
|
*
|
||||||
|
* Created by Julia Radzhabova on 06.10.2021
|
||||||
|
* Copyright (c) 2021 Ascensio System SIA. All rights reserved.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
if (Common === undefined)
|
||||||
|
var Common = {};
|
||||||
|
|
||||||
|
if (Common.UI === undefined) {
|
||||||
|
Common.UI = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
Common.UI.LayoutManager = new(function() {
|
||||||
|
var _config;
|
||||||
|
var _init = function(config) {
|
||||||
|
_config = config;
|
||||||
|
};
|
||||||
|
|
||||||
|
var _applyCustomization = function(config, el, prefix) {
|
||||||
|
!config && (config = _config);
|
||||||
|
if (!config) return;
|
||||||
|
|
||||||
|
for (var name in config) {
|
||||||
|
if(config.hasOwnProperty(name)) {
|
||||||
|
if(typeof config[name] === 'object')
|
||||||
|
_applyCustomization(config[name], el, (prefix || '') + name + '-');
|
||||||
|
else if (config[name] === false) {
|
||||||
|
var selector = '[data-layout-name=' + (prefix || '') + name + ']',
|
||||||
|
cmp = el ? el.find(selector) : $(selector);
|
||||||
|
cmp && cmp.hide && cmp.hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var _isElementVisible = function(value, config, prefix) {
|
||||||
|
!config && (config = _config);
|
||||||
|
if (!config) return true;
|
||||||
|
|
||||||
|
var res = true;
|
||||||
|
for (var name in config) {
|
||||||
|
if(config.hasOwnProperty(name)) {
|
||||||
|
if(typeof config[name] === 'object')
|
||||||
|
res = _isElementVisible(value, config[name], (prefix || '') + name + '-');
|
||||||
|
else {
|
||||||
|
if (value === (prefix || '') + name) { // checked value is in config
|
||||||
|
res = config[name];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (res===false) return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
};
|
||||||
|
|
||||||
|
return {
|
||||||
|
init: _init,
|
||||||
|
applyCustomization: _applyCustomization,
|
||||||
|
isElementVisible: _isElementVisible
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* features: {
|
||||||
|
* feature: { //can be object or init value
|
||||||
|
* mode: <init value> // value1 / value2 ...
|
||||||
|
* change: false/true // hide/show feature
|
||||||
|
* } / value1 / value2 ...
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
Common.UI.FeaturesManager = new(function() {
|
||||||
|
var _config,
|
||||||
|
_licensed;
|
||||||
|
var _init = function(config, licensed) {
|
||||||
|
_config = config;
|
||||||
|
_licensed = licensed;
|
||||||
|
};
|
||||||
|
|
||||||
|
var _canChange = function(name, force) {
|
||||||
|
return !((_licensed || force) && _config && typeof _config[name] === 'object' && _config[name] && _config[name].change===false);
|
||||||
|
};
|
||||||
|
|
||||||
|
var _getInitValue2 = function(name, defValue, force) {
|
||||||
|
if ((_licensed || force) && _config && _config[name] !== undefined ) {
|
||||||
|
if (typeof _config[name] === 'object' && _config[name]) { // object and not null
|
||||||
|
if (_config[name].mode!==undefined)
|
||||||
|
return _config[name].mode;
|
||||||
|
} else
|
||||||
|
return _config[name];
|
||||||
|
}
|
||||||
|
|
||||||
|
return defValue;
|
||||||
|
};
|
||||||
|
|
||||||
|
var _getInitValue = function(name, force) {
|
||||||
|
if ((_licensed || force) && _config && _config[name] !== undefined ) {
|
||||||
|
if (typeof _config[name] === 'object' && _config[name]) { // object and not null
|
||||||
|
if (_config[name].mode!==undefined)
|
||||||
|
return _config[name].mode;
|
||||||
|
} else
|
||||||
|
return _config[name];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return {
|
||||||
|
init: _init,
|
||||||
|
canChange: _canChange,
|
||||||
|
getInitValue: _getInitValue
|
||||||
|
}
|
||||||
|
})();
|
|
@ -39,7 +39,8 @@
|
||||||
define([
|
define([
|
||||||
'core',
|
'core',
|
||||||
'common/main/lib/collection/Plugins',
|
'common/main/lib/collection/Plugins',
|
||||||
'common/main/lib/view/Plugins'
|
'common/main/lib/view/Plugins',
|
||||||
|
'common/main/lib/view/PluginDlg'
|
||||||
], function () {
|
], function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -63,7 +64,7 @@ define([
|
||||||
var appOptions = me.getApplication().getController('Main').appOptions;
|
var appOptions = me.getApplication().getController('Main').appOptions;
|
||||||
|
|
||||||
if ( !appOptions.isEditMailMerge && !appOptions.isEditDiagram ) {
|
if ( !appOptions.isEditMailMerge && !appOptions.isEditDiagram ) {
|
||||||
var tab = {action: 'plugins', caption: me.panelPlugins.groupCaption, dataHintTitle: 'E'};
|
var tab = {action: 'plugins', caption: me.panelPlugins.groupCaption, dataHintTitle: 'E', layoutname: 'toolbar-plugins'};
|
||||||
me.$toolbarPanelPlugins = me.panelPlugins.getPanel();
|
me.$toolbarPanelPlugins = me.panelPlugins.getPanel();
|
||||||
|
|
||||||
toolbar.addTab(tab, me.$toolbarPanelPlugins, 10); // TODO: clear plugins list in left panel
|
toolbar.addTab(tab, me.$toolbarPanelPlugins, 10); // TODO: clear plugins list in left panel
|
||||||
|
@ -219,7 +220,7 @@ define([
|
||||||
});
|
});
|
||||||
this.api.asc_pluginsRegister('', arr);
|
this.api.asc_pluginsRegister('', arr);
|
||||||
if (storePlugins.hasVisible())
|
if (storePlugins.hasVisible())
|
||||||
Common.NotificationCenter.trigger('tab:visible', 'plugins', true);
|
Common.NotificationCenter.trigger('tab:visible', 'plugins', Common.UI.LayoutManager.isElementVisible('toolbar-plugins'));
|
||||||
Common.Gateway.pluginsReady();
|
Common.Gateway.pluginsReady();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -179,20 +179,51 @@ define([
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
onApiShowChange: function (sdkchange) {
|
isSelectedChangesLocked: function(changes, isShow) {
|
||||||
|
if (!changes || changes.length<1) return true;
|
||||||
|
|
||||||
|
if (isShow)
|
||||||
|
return changes[0].get('lock') || !changes[0].get('editable');
|
||||||
|
|
||||||
|
for (var i=0; i<changes.length; i++) {
|
||||||
|
var change = changes[i];
|
||||||
|
if (change.get('lock') || !change.get('editable'))
|
||||||
|
return true; // lock button if at least one change is locked
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
|
onApiShowChange: function (sdkchange, isShow) {
|
||||||
|
var btnlock = true,
|
||||||
|
changes;
|
||||||
|
if (this.appConfig.canReview && !this.appConfig.isReviewOnly) {
|
||||||
|
if (sdkchange && sdkchange.length>0) {
|
||||||
|
changes = this.readSDKChange(sdkchange);
|
||||||
|
btnlock = this.isSelectedChangesLocked(changes, isShow);
|
||||||
|
}
|
||||||
|
if (this._state.lock !== btnlock) {
|
||||||
|
this.view.btnAccept.setDisabled(btnlock);
|
||||||
|
this.view.btnReject.setDisabled(btnlock);
|
||||||
|
if (this.dlgChanges) {
|
||||||
|
this.dlgChanges.btnAccept.setDisabled(btnlock);
|
||||||
|
this.dlgChanges.btnReject.setDisabled(btnlock);
|
||||||
|
}
|
||||||
|
this._state.lock = btnlock;
|
||||||
|
Common.Utils.InternalSettings.set(this.view.appPrefix + "accept-reject-lock", btnlock);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (this.getPopover()) {
|
if (this.getPopover()) {
|
||||||
if (!this.appConfig.reviewHoverMode && sdkchange && sdkchange.length>0) {
|
if (!this.appConfig.reviewHoverMode && sdkchange && sdkchange.length>0 && isShow) { // show changes balloon only for current position, not selection
|
||||||
var i = 0,
|
var i = 0,
|
||||||
changes = this.readSDKChange(sdkchange),
|
|
||||||
posX = sdkchange[0].get_X(),
|
posX = sdkchange[0].get_X(),
|
||||||
posY = sdkchange[0].get_Y(),
|
posY = sdkchange[0].get_Y(),
|
||||||
animate = ( Math.abs(this._state.posx-posX)>0.001 || Math.abs(this._state.posy-posY)>0.001) || (sdkchange.length !== this._state.changes_length),
|
animate = ( Math.abs(this._state.posx-posX)>0.001 || Math.abs(this._state.posy-posY)>0.001) || (sdkchange.length !== this._state.changes_length),
|
||||||
lock = (sdkchange[0].get_LockUserId()!==null),
|
lock = (sdkchange[0].get_LockUserId()!==null),
|
||||||
lockUser = this.getUserName(sdkchange[0].get_LockUserId()),
|
lockUser = this.getUserName(sdkchange[0].get_LockUserId());
|
||||||
editable = changes[0].get('editable');
|
|
||||||
|
|
||||||
this.getPopover().hideTips();
|
this.getPopover().hideTips();
|
||||||
this.popoverChanges.reset(changes);
|
this.popoverChanges.reset(changes || this.readSDKChange(sdkchange));
|
||||||
|
|
||||||
if (animate) {
|
if (animate) {
|
||||||
if ( this.getPopover().isVisible() ) this.getPopover().hide();
|
if ( this.getPopover().isVisible() ) this.getPopover().hide();
|
||||||
|
@ -200,18 +231,6 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getPopover().showReview(animate, lock, lockUser);
|
this.getPopover().showReview(animate, lock, lockUser);
|
||||||
|
|
||||||
var btnlock = lock || !editable;
|
|
||||||
if (this.appConfig.canReview && !this.appConfig.isReviewOnly && this._state.lock !== btnlock) {
|
|
||||||
this.view.btnAccept.setDisabled(btnlock);
|
|
||||||
this.view.btnReject.setDisabled(btnlock);
|
|
||||||
if (this.dlgChanges) {
|
|
||||||
this.dlgChanges.btnAccept.setDisabled(btnlock);
|
|
||||||
this.dlgChanges.btnReject.setDisabled(btnlock);
|
|
||||||
}
|
|
||||||
this._state.lock = btnlock;
|
|
||||||
Common.Utils.InternalSettings.set(this.view.appPrefix + "accept-reject-lock", btnlock);
|
|
||||||
}
|
|
||||||
this._state.posx = posX;
|
this._state.posx = posX;
|
||||||
this._state.posy = posY;
|
this._state.posy = posY;
|
||||||
this._state.changes_length = sdkchange.length;
|
this._state.changes_length = sdkchange.length;
|
||||||
|
@ -258,6 +277,9 @@ define([
|
||||||
this.popover = Common.Views.ReviewPopover.prototype.getPopover({
|
this.popover = Common.Views.ReviewPopover.prototype.getPopover({
|
||||||
reviewStore : this.popoverChanges,
|
reviewStore : this.popoverChanges,
|
||||||
renderTo : this.sdkViewName,
|
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
|
api: this.api
|
||||||
});
|
});
|
||||||
this.popover.setReviewStore(this.popoverChanges);
|
this.popover.setReviewStore(this.popoverChanges);
|
||||||
|
@ -586,13 +608,15 @@ define([
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onTurnSpelling: function (state) {
|
onTurnSpelling: function (state, suspend) {
|
||||||
state = (state == 'on');
|
state = (state == 'on');
|
||||||
this.view.turnSpelling(state);
|
this.view && this.view.turnSpelling(state);
|
||||||
|
|
||||||
Common.localStorage.setItem(this.view.appPrefix + "settings-spellcheck", state ? 1 : 0);
|
if (Common.UI.FeaturesManager.canChange('spellcheck') && !suspend) {
|
||||||
this.api.asc_setSpellCheck(state);
|
Common.localStorage.setItem(this.view.appPrefix + "settings-spellcheck", state ? 1 : 0);
|
||||||
Common.Utils.InternalSettings.set(this.view.appPrefix + "settings-spellcheck", state);
|
this.api.asc_setSpellCheck(state);
|
||||||
|
Common.Utils.InternalSettings.set(this.view.appPrefix + "settings-spellcheck", state);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onReviewViewClick: function(menu, item, e) {
|
onReviewViewClick: function(menu, item, e) {
|
||||||
|
@ -767,7 +791,7 @@ define([
|
||||||
allowMerge: false,
|
allowMerge: false,
|
||||||
allowSignature: false,
|
allowSignature: false,
|
||||||
allowProtect: false,
|
allowProtect: false,
|
||||||
rightMenu: {clear: true, disable: true},
|
rightMenu: {clear: disable, disable: true},
|
||||||
statusBar: true,
|
statusBar: true,
|
||||||
leftMenu: {disable: false, previewMode: true},
|
leftMenu: {disable: false, previewMode: true},
|
||||||
fileMenu: {protect: true},
|
fileMenu: {protect: true},
|
||||||
|
@ -803,9 +827,6 @@ define([
|
||||||
|
|
||||||
onAppReady: function (config) {
|
onAppReady: function (config) {
|
||||||
var me = this;
|
var me = this;
|
||||||
if ( me.view && Common.localStorage.getBool(me.view.appPrefix + "settings-spellcheck", !(config.customization && config.customization.spellcheck===false)))
|
|
||||||
me.view.turnSpelling(true);
|
|
||||||
|
|
||||||
if ( config.canReview ) {
|
if ( config.canReview ) {
|
||||||
(new Promise(function (resolve) {
|
(new Promise(function (resolve) {
|
||||||
resolve();
|
resolve();
|
||||||
|
|
|
@ -234,7 +234,8 @@ define([
|
||||||
|
|
||||||
var on_document_ready = function (el) {
|
var on_document_ready = function (el) {
|
||||||
// get_themes_config('../../common/main/resources/themes/themes.json');
|
// get_themes_config('../../common/main/resources/themes/themes.json');
|
||||||
get_themes_config('../../../../themes.json');
|
if ( !Common.Controllers.Desktop.isActive() || !Common.Controllers.Desktop.isOffline() )
|
||||||
|
get_themes_config('../../../../themes.json');
|
||||||
}
|
}
|
||||||
|
|
||||||
var get_ui_theme_name = function (objtheme) {
|
var get_ui_theme_name = function (objtheme) {
|
||||||
|
@ -279,10 +280,9 @@ define([
|
||||||
if ( !(Common.Utils.isIE10 || Common.Utils.isIE11) )
|
if ( !(Common.Utils.isIE10 || Common.Utils.isIE11) )
|
||||||
document.body.classList.forEach(function (classname, i, o) {
|
document.body.classList.forEach(function (classname, i, o) {
|
||||||
if ( !theme_name && classname.startsWith('theme-') &&
|
if ( !theme_name && classname.startsWith('theme-') &&
|
||||||
!classname.startsWith('theme-type-') && themes_map[classname] )
|
!classname.startsWith('theme-type-') && themes_map[classname] )
|
||||||
{
|
{
|
||||||
theme_name = classname;
|
theme_name = classname;
|
||||||
// Common.localStorage.setItem('ui-theme-id', theme_name);
|
|
||||||
var theme_obj = {
|
var theme_obj = {
|
||||||
id: theme_name,
|
id: theme_name,
|
||||||
type: themes_map[theme_name].type
|
type: themes_map[theme_name].type
|
||||||
|
|
|
@ -57,6 +57,7 @@ define([
|
||||||
userid : 0,
|
userid : 0,
|
||||||
username : 'Guest',
|
username : 'Guest',
|
||||||
parsedName : 'Guest',
|
parsedName : 'Guest',
|
||||||
|
parsedGroups : undefined,
|
||||||
usercolor : null,
|
usercolor : null,
|
||||||
date : undefined,
|
date : undefined,
|
||||||
quote : '',
|
quote : '',
|
||||||
|
@ -79,6 +80,7 @@ define([
|
||||||
hideAddReply : false,
|
hideAddReply : false,
|
||||||
scope : null,
|
scope : null,
|
||||||
hide : false,
|
hide : false,
|
||||||
|
filtered : false,
|
||||||
hint : false,
|
hint : false,
|
||||||
dummy : undefined,
|
dummy : undefined,
|
||||||
editable : true,
|
editable : true,
|
||||||
|
|
|
@ -62,7 +62,8 @@ define([
|
||||||
color : '#fff',
|
color : '#fff',
|
||||||
colorval : null,
|
colorval : null,
|
||||||
online : false,
|
online : false,
|
||||||
view : false
|
view : false,
|
||||||
|
hidden : false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -66,17 +66,18 @@
|
||||||
<div class="padding-small">
|
<div class="padding-small">
|
||||||
<label class="header"><%= scope.textReplaceText %></label>
|
<label class="header"><%= scope.textReplaceText %></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="padding-large">
|
<div class="padding-small">
|
||||||
<div class="padding-small" id="id-autocorrect-dialog-chk-quotes"></div>
|
<div class="padding-small" id="id-autocorrect-dialog-chk-quotes"></div>
|
||||||
<div class="padding-small" id="id-autocorrect-dialog-chk-hyphens"></div>
|
<div class="padding-small" id="id-autocorrect-dialog-chk-hyphens"></div>
|
||||||
<div id="id-autocorrect-dialog-chk-hyperlink"></div>
|
<div class="padding-small" id="id-autocorrect-dialog-chk-hyperlink"></div>
|
||||||
|
<div class="padding-small" id="id-autocorrect-dialog-chk-double-space"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="padding-small">
|
<div class="padding-small">
|
||||||
<label class="header"><%= scope.textApplyText %></label>
|
<label class="header"><%= scope.textApplyText %></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="padding-large">
|
<div class="padding-small">
|
||||||
<div class="padding-small" id="id-autocorrect-dialog-chk-bulleted"></div>
|
<div class="padding-small" id="id-autocorrect-dialog-chk-bulleted"></div>
|
||||||
<div id="id-autocorrect-dialog-chk-numbered"></div>
|
<div class="padding-small" id="id-autocorrect-dialog-chk-numbered"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -85,21 +86,24 @@
|
||||||
<div class="padding-small">
|
<div class="padding-small">
|
||||||
<label class="header"><%= scope.textReplaceText %></label>
|
<label class="header"><%= scope.textReplaceText %></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="padding-large">
|
<div class="padding-small">
|
||||||
<div id="id-autocorrect-dialog-chk-hyperlink"></div>
|
<div class="padding-small" id="id-autocorrect-dialog-chk-hyperlink"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="padding-small">
|
<div class="padding-small">
|
||||||
<label class="header"><%= scope.textApplyAsWork %></label>
|
<label class="header"><%= scope.textApplyAsWork %></label>
|
||||||
</div>
|
</div>
|
||||||
<div class="padding-large">
|
<div class="padding-small">
|
||||||
<div id="id-autocorrect-dialog-chk-new-rows"></div>
|
<div class="padding-small" id="id-autocorrect-dialog-chk-new-rows"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="id-autocorrect-dialog-settings-autocorrect" class="settings-panel">
|
<div id="id-autocorrect-dialog-settings-autocorrect" class="settings-panel">
|
||||||
<div class="inner-content" style="width: 100%;">
|
<div class="inner-content" style="width: 100%;">
|
||||||
<div class="padding-large">
|
<div class="padding-small">
|
||||||
<div id="id-autocorrect-dialog-chk-fl-sentence"></div>
|
<div id="id-autocorrect-dialog-chk-fl-sentence"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="padding-small">
|
||||||
|
<div id="id-autocorrect-dialog-chk-fl-cells"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<% if (!hide) { %>
|
<% if (!hide && !filtered) { %>
|
||||||
<div id="<%= id %>" class="user-comment-item">
|
<div id="<%= id %>" class="user-comment-item">
|
||||||
|
|
||||||
<!-- comment block -->
|
<!-- comment block -->
|
||||||
|
@ -70,16 +70,20 @@
|
||||||
|
|
||||||
<!-- edit buttons -->
|
<!-- edit buttons -->
|
||||||
|
|
||||||
<% if (!editText && !lock && !scope.viewmode) { %>
|
<% if (!editText && !lock) { %>
|
||||||
<div class="edit-ct">
|
<div class="edit-ct">
|
||||||
<% if (editable) { %>
|
<% if (!scope.viewmode) { %>
|
||||||
<div class="btn-edit img-commonctrl"></div>
|
<% if (editable) { %>
|
||||||
|
<div class="btn-edit img-commonctrl"></div>
|
||||||
|
<% } %>
|
||||||
|
<% if (removable) { %>
|
||||||
|
<div class="btn-delete img-commonctrl"></div>
|
||||||
|
<% } %>
|
||||||
<% } %>
|
<% } %>
|
||||||
<% if (removable) { %>
|
<% if (editable && !scope.viewmode) { %>
|
||||||
<div class="btn-delete img-commonctrl"></div>
|
<div class="btn-resolve <% if (resolved) print('comment-resolved') %>" data-toggle="tooltip"></div>
|
||||||
<% } %>
|
<% } else if ((!editable || scope.viewmode) && resolved) { %>
|
||||||
<% if (editable) { %>
|
<div class="icon-resolve i-comment-resolved" data-toggle="tooltip"></div>
|
||||||
<div class="btn-resolve <% if (resolved) print('comment-resolved') %>" data-toggle="tooltip"></div>
|
|
||||||
<% } %>
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<div class="color" style="display: inline-block; background-color: <% if (usercolor!==null) { %><%=usercolor%><% } else { %> #cfcfcf <% } %>; " ></div><%= scope.getEncodedName(parsedName) %>
|
<div class="color" style="display: inline-block; background-color: <% if (usercolor!==null) { %><%=usercolor%><% } else { %> #cfcfcf <% } %>; " ></div><%= scope.getEncodedName(parsedName) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="user-date"><%=date%></div>
|
<div class="user-date"><%=date%></div>
|
||||||
<% if (!editTextInPopover || hint) { %>
|
<% if (!editTextInPopover || hint || scope.viewmode) { %>
|
||||||
<div oo_editor_input="true" tabindex="-1" class="user-message user-select"><%=scope.pickLink(comment)%></div>
|
<div oo_editor_input="true" tabindex="-1" class="user-message user-select"><%=scope.pickLink(comment)%></div>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<div class="inner-edit-ct">
|
<div class="inner-edit-ct">
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
<div class="user-date"><%=item.get("date")%></div>
|
<div class="user-date"><%=item.get("date")%></div>
|
||||||
<% if (!item.get("editTextInPopover")) { %>
|
<% if (!item.get("editTextInPopover")) { %>
|
||||||
<div oo_editor_input="true" tabindex="-1" class="user-message user-select"><%=scope.pickLink(item.get("reply"))%></div>
|
<div oo_editor_input="true" tabindex="-1" class="user-message user-select"><%=scope.pickLink(item.get("reply"))%></div>
|
||||||
<% if (!hint) { %>
|
<% if (!hint && !scope.viewmode) { %>
|
||||||
<div class="btns-reply-ct">
|
<div class="btns-reply-ct">
|
||||||
<% if (item.get("editable")) { %>
|
<% if (item.get("editable")) { %>
|
||||||
<div class="btn-edit img-commonctrl" data-value="<%=item.get("id")%>"></div>
|
<div class="btn-edit img-commonctrl" data-value="<%=item.get("id")%>"></div>
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
|
|
||||||
<!-- add reply button -->
|
<!-- add reply button -->
|
||||||
|
|
||||||
<% if (!showReplyInPopover && !hideAddReply && !hint) { %>
|
<% if (!showReplyInPopover && !hideAddReply && !hint && !scope.viewmode) { %>
|
||||||
<% if (replys.length && !add_arrow) { %>
|
<% if (replys.length && !add_arrow) { %>
|
||||||
<label class="user-reply" style="margin-left: 20px; margin-top: 5px;" role="presentation" tabindex="-1">textAddReply</label>
|
<label class="user-reply" style="margin-left: 20px; margin-top: 5px;" role="presentation" tabindex="-1">textAddReply</label>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
|
@ -71,16 +71,20 @@
|
||||||
|
|
||||||
<!-- edit buttons -->
|
<!-- edit buttons -->
|
||||||
|
|
||||||
<% if (!editTextInPopover && !lock && !hint) { %>
|
<% if (!editTextInPopover && !lock) { %>
|
||||||
<div class="edit-ct">
|
<div class="edit-ct">
|
||||||
<% if (editable) { %>
|
<% if (!hint && !scope.viewmode) { %>
|
||||||
<div class="btn-edit img-commonctrl"></div>
|
<% if (editable) { %>
|
||||||
|
<div class="btn-edit img-commonctrl"></div>
|
||||||
|
<% } %>
|
||||||
|
<% if (removable) { %>
|
||||||
|
<div class="btn-delete img-commonctrl"></div>
|
||||||
|
<% } %>
|
||||||
<% } %>
|
<% } %>
|
||||||
<% if (removable) { %>
|
<% if (editable && !hint && !scope.viewmode) { %>
|
||||||
<div class="btn-delete img-commonctrl"></div>
|
<div class="btn-resolve <% if (resolved) print('comment-resolved') %>" data-toggle="tooltip"></div>
|
||||||
<% } %>
|
<% } else if (!hint && (!editable || scope.viewmode) && resolved) { %>
|
||||||
<% if (editable) { %>
|
<div class="icon-resolve i-comment-resolved" data-toggle="tooltip"></div>
|
||||||
<div class="btn-resolve <% if (resolved) print('comment-resolved') %>" data-toggle="tooltip"></div>
|
|
||||||
<% } %>
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
|
@ -52,13 +52,13 @@ define(['gateway'], function () {
|
||||||
Common.Gateway.on('internalcommand', ongetstore);
|
Common.Gateway.on('internalcommand', ongetstore);
|
||||||
|
|
||||||
var _refresh = function() {
|
var _refresh = function() {
|
||||||
if (!_lsAllowed)
|
// if (!_lsAllowed)
|
||||||
Common.Gateway.internalMessage('localstorage', {cmd:'get', keys:_filter});
|
// Common.Gateway.internalMessage('localstorage', {cmd:'get', keys:_filter});
|
||||||
};
|
};
|
||||||
|
|
||||||
var _save = function() {
|
var _save = function() {
|
||||||
if (!_lsAllowed)
|
// if (!_lsAllowed)
|
||||||
Common.Gateway.internalMessage('localstorage', {cmd:'set', keys:_store});
|
// Common.Gateway.internalMessage('localstorage', {cmd:'set', keys:_store});
|
||||||
};
|
};
|
||||||
|
|
||||||
var _setItem = function(name, value, just) {
|
var _setItem = function(name, value, just) {
|
||||||
|
@ -72,14 +72,15 @@ define(['gateway'], function () {
|
||||||
} else {
|
} else {
|
||||||
_store[name] = value;
|
_store[name] = value;
|
||||||
|
|
||||||
if (just===true) {
|
// if (just===true) {
|
||||||
Common.Gateway.internalMessage('localstorage', {
|
// TDDO: remove after ver 7.2. using external local storage is depricated
|
||||||
cmd:'set',
|
// Common.Gateway.internalMessage('localstorage', {
|
||||||
keys: {
|
// cmd:'set',
|
||||||
name: value
|
// keys: {
|
||||||
}
|
// name: value
|
||||||
});
|
// }
|
||||||
}
|
// });
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -597,4 +597,762 @@ define(function(){ 'use strict';
|
||||||
textValue: 'Value is'
|
textValue: 'Value is'
|
||||||
}
|
}
|
||||||
})(), Common.define.conditionalData || {});
|
})(), Common.define.conditionalData || {});
|
||||||
});
|
|
||||||
|
Common.define.effectData = _.extend(new (function () {
|
||||||
|
return {
|
||||||
|
textEntrance: 'Entrance Effect',
|
||||||
|
textEmphasis: 'Emphasis Effect',
|
||||||
|
textExit: 'Exit Effect',
|
||||||
|
textPath: 'Motion Path',
|
||||||
|
textAppear: 'Appear',
|
||||||
|
textFade: 'Fade',
|
||||||
|
textFlyIn: 'Fly in',
|
||||||
|
textFloatIn: 'Float In',
|
||||||
|
textSplit: 'Split',
|
||||||
|
textWipe: 'Wipe',
|
||||||
|
textShape: 'Shape',
|
||||||
|
textWheel: 'Wheel',
|
||||||
|
textRandomBars: 'Random Bars ',
|
||||||
|
textGrowTurn: 'Grow & Turn',
|
||||||
|
textZoom: 'Zoom',
|
||||||
|
textSwivel: 'Swivel',
|
||||||
|
textBounce: 'Bounce',
|
||||||
|
textPulse: 'Pulse',
|
||||||
|
textColorPulse: 'Color Pulse',
|
||||||
|
textTeeter: 'Teeter',
|
||||||
|
textSpin: 'Spin',
|
||||||
|
textGrowShrink: 'Grow/Shrink',
|
||||||
|
textShrinkTurn: 'Shrink & Turn',
|
||||||
|
textDesaturate: 'Desaturate',
|
||||||
|
textDarken: 'Darken',
|
||||||
|
textLighten: 'Lighten',
|
||||||
|
textTransparency: 'Transparency',
|
||||||
|
textObjectColor: 'Object Color',
|
||||||
|
textComplementaryColor: 'Complementary Color',
|
||||||
|
textComplementaryColor2: 'Complementary Color 2',
|
||||||
|
textLineColor: 'Line Color',
|
||||||
|
textFillColor: 'Fill Color',
|
||||||
|
textBrushColor: 'Brush Color',
|
||||||
|
textFontColor: 'Font Color',
|
||||||
|
textUnderline: 'Underline',
|
||||||
|
textBoldFlash: 'Bold Flash',
|
||||||
|
textBoldReveal: 'Bold Reveal',
|
||||||
|
textWave: 'Wave',
|
||||||
|
textDisappear: 'Disappear',
|
||||||
|
textFlyOut: 'Fly Out',
|
||||||
|
textFloatOut: 'Float Out',
|
||||||
|
textBasic: 'Basic',
|
||||||
|
textSubtle: 'Subtle',
|
||||||
|
textModerate: 'Moderate',
|
||||||
|
textExciting: 'Exciting',
|
||||||
|
textLinesCurves: 'Lines Curves',
|
||||||
|
textSpecial: 'Special',
|
||||||
|
textBox: 'Box',
|
||||||
|
textCircle: 'Circle',
|
||||||
|
textPlus: 'Plus',
|
||||||
|
textDiamond: 'Diamond',
|
||||||
|
textDissolveIn: 'Dissolve In',
|
||||||
|
textBlinds: 'Blinds',
|
||||||
|
textCheckerboard: 'Checkerboard',
|
||||||
|
textPeekIn: 'Peek In',
|
||||||
|
textStrips: 'Strips',
|
||||||
|
textExpand: 'Expand',
|
||||||
|
textBasicZoom: 'Basic Zoom',
|
||||||
|
textCompress: 'Compress',
|
||||||
|
textFloatUp: 'Float Up',
|
||||||
|
textRiseUp: 'Rise Up',
|
||||||
|
textStretch: 'Stretch',
|
||||||
|
textCenterRevolve: 'Center Revolve',
|
||||||
|
textFloatDown: 'Float Down',
|
||||||
|
textSpinner: 'Spinner',
|
||||||
|
textBasicSwivel: 'Basic Swivel',
|
||||||
|
textBoomerang: 'Boomerang',
|
||||||
|
textCredits: 'Credits',
|
||||||
|
textCuverUp: 'Cuver Up',
|
||||||
|
textDrop: 'Drop',
|
||||||
|
textFloat: 'Float',
|
||||||
|
textPinwheel: 'Pinwheel',
|
||||||
|
textSpiralIn: 'Spiral In',
|
||||||
|
textWhip: 'Whip',
|
||||||
|
textGrowWithColor: 'Grow With Color',
|
||||||
|
textShimmer: 'Shimmer',
|
||||||
|
textBlink: 'Blink',
|
||||||
|
textDissolveOut: 'Dissolve Out',
|
||||||
|
textPeekOut: 'Peek Out',
|
||||||
|
textContrast: 'Contrast',
|
||||||
|
textCollapse: 'Collapse',
|
||||||
|
textSinkDown: 'Sink Down',
|
||||||
|
textCurveDown: 'CurveDown',
|
||||||
|
textSpiralOut: 'Spiral Out',
|
||||||
|
textContrastingColor: 'Contrasting Color',
|
||||||
|
textPointStar4: '4 Point Star',
|
||||||
|
textPointStar5: '5 Point Star',
|
||||||
|
textPointStar6: '6 Point Star',
|
||||||
|
textPointStar8: '8 Point Star',
|
||||||
|
textCrescentMoon: 'Crescent Moon',
|
||||||
|
textEqualTriangle: 'Equal Triangle',
|
||||||
|
textFootball: 'Football',
|
||||||
|
textHeart: 'Heart',
|
||||||
|
textHexagon: 'Hexagon',
|
||||||
|
textOctagon: 'Octagon',
|
||||||
|
textParallelogram: 'Parallelogram',
|
||||||
|
textPentagon: 'Pentagon',
|
||||||
|
textSquare: 'Square',
|
||||||
|
textTeardrop: 'Teardrop',
|
||||||
|
textTrapezoid: 'Trapezoid',
|
||||||
|
textArcDown: 'Arc Down',
|
||||||
|
textArcLeft: 'Arc Left',
|
||||||
|
textArcRight: 'Arc Right',
|
||||||
|
textArcUp: 'Arc Up',
|
||||||
|
textBounceLeft: 'Bounce Left',
|
||||||
|
textBounceRight: 'Bounce Right',
|
||||||
|
textCurvyLeft: 'Curvy Left',
|
||||||
|
textCurvyRight: 'Curvy Right',
|
||||||
|
textDecayingWave: 'Decaying Wave',
|
||||||
|
textDiagonalDownRight: 'Diagonal Down Right',
|
||||||
|
textDiagonalUpRight: 'Diagonal Up Right',
|
||||||
|
textDown: 'Down',
|
||||||
|
textFunnel: 'Funnel',
|
||||||
|
textHeartbeat: 'Heartbeat',
|
||||||
|
textLeft: 'Left',
|
||||||
|
textRight: 'Right',
|
||||||
|
textSCurve1: 'S Curve 1',
|
||||||
|
textSCurve2: 'S Curve 2',
|
||||||
|
textSineWave: 'Sine Wave',
|
||||||
|
textSpiralLeft: 'Spiral Left',
|
||||||
|
textSpiralRight: 'Spiral Right',
|
||||||
|
textSpring: 'Spring:',
|
||||||
|
textStairsDown: 'Stairs Down',
|
||||||
|
textTurnDown: 'Turn Down',
|
||||||
|
textTurnDownRight: 'Turn Down Right',
|
||||||
|
textTurnUp: 'Turn Up',
|
||||||
|
textTurnUpRight: 'Turn Up Right',
|
||||||
|
textUp: 'Up',
|
||||||
|
textZigzag: 'Zigzag',
|
||||||
|
textBean: 'Bean',
|
||||||
|
textCurvedSquare: 'CurvedSquare',
|
||||||
|
textCurvedX: 'Curved X',
|
||||||
|
textCurvyStar: 'Curvy Star',
|
||||||
|
textFigureFour: 'Figure 8 Four',
|
||||||
|
textHorizontalFigure: 'Horizontal Figure 8',
|
||||||
|
textInvertedSquare: 'Inverted Square',
|
||||||
|
textInvertedTriangle: 'Inverted Triangle',
|
||||||
|
textLoopDeLoop: 'Loop de Loop',
|
||||||
|
textNeutron: 'Neutron',
|
||||||
|
textPeanut: 'Peanut',
|
||||||
|
textPointStar: 'Point Star',
|
||||||
|
textSwoosh: 'Swoosh',
|
||||||
|
textVerticalFigure: 'Vertical Figure 8',
|
||||||
|
textRightTriangle: 'Right Triangle',
|
||||||
|
textAcross: 'Across',
|
||||||
|
textFromBottom: 'From Bottom',
|
||||||
|
textFromBottomLeft: 'From Bottom-Left',
|
||||||
|
textFromLeft: 'From Left',
|
||||||
|
textFromTopLeft: 'From Top-Left',
|
||||||
|
textFromTop: 'From Top',
|
||||||
|
textFromTopRight: 'From Top-Right',
|
||||||
|
textFromRight: 'From Right',
|
||||||
|
textFromBottomRight: 'From Bottom-Right',
|
||||||
|
textLeftDown: ' Left Down',
|
||||||
|
textLeftUp: ' Left Up',
|
||||||
|
textRightDown: ' Right Down',
|
||||||
|
textRightUp: ' Right Up',
|
||||||
|
textObjectCenter: 'Object Center',
|
||||||
|
textSlideCenter: 'Slide Center',
|
||||||
|
textInFromScreenCenter: 'In From Screen Center',
|
||||||
|
textOutFromScreenBottom: 'Out From Screen Bottom',
|
||||||
|
textInSlightly: 'In Slightly',
|
||||||
|
textInToScreenBottom: 'In To Screen Bottom',
|
||||||
|
textOutToScreenCenter: 'Out To Screen Center',
|
||||||
|
textOutSlightly: 'Out Slightly',
|
||||||
|
textToBottom: 'To Bottom',
|
||||||
|
textToBottomLeft: 'To Bottom-Left',
|
||||||
|
textToLeft: 'To Left',
|
||||||
|
textToTopLeft: 'To Top-Left',
|
||||||
|
textToTop: 'To Top',
|
||||||
|
textToTopRight: 'To Top-Right',
|
||||||
|
textToRight: 'To Right',
|
||||||
|
textToBottomRight: 'To Bottom-Right',
|
||||||
|
textSpoke1: '1 Spoke',
|
||||||
|
textSpoke2: '2 Spokes',
|
||||||
|
textSpoke3: '3 Spokes',
|
||||||
|
textSpoke4: '4 Spokes',
|
||||||
|
textSpoke8: '8 Spokes',
|
||||||
|
textCustomPath: 'Custom Path',
|
||||||
|
textHorizontalIn: 'Horizontal In',
|
||||||
|
textHorizontalOut: 'Horizontal Out',
|
||||||
|
textVerticalIn: 'Vertical In',
|
||||||
|
textVerticalOut: 'Vertical Out',
|
||||||
|
textVertical: 'Vertical',
|
||||||
|
textHorizontal: 'Horizontal',
|
||||||
|
textIn: 'In',
|
||||||
|
textOut: 'Out',
|
||||||
|
textWedge: 'Wedge',
|
||||||
|
textFlip: 'Flip',
|
||||||
|
textLines: 'Lines',
|
||||||
|
textArcs: 'Arcs',
|
||||||
|
textTurns: 'Turns',
|
||||||
|
textShapes: 'Shapes',
|
||||||
|
textLoops: 'Loops',
|
||||||
|
|
||||||
|
getEffectGroupData: function () {
|
||||||
|
return [
|
||||||
|
{id: 'menu-effect-group-entrance', value: AscFormat.PRESET_CLASS_ENTR, caption: this.textEntrance, iconClsCustom: 'animation-entrance-custom'},
|
||||||
|
{id: 'menu-effect-group-emphasis', value: AscFormat.PRESET_CLASS_EMPH, caption: this.textEmphasis, iconClsCustom: 'animation-emphasis-custom'},
|
||||||
|
{id: 'menu-effect-group-exit', value: AscFormat.PRESET_CLASS_EXIT, caption: this.textExit, iconClsCustom: 'animation-exit-custom'},
|
||||||
|
{id: 'menu-effect-group-path', value: AscFormat.PRESET_CLASS_PATH, caption: this.textPath, iconClsCustom: 'animation-motion-paths-custom'}
|
||||||
|
];
|
||||||
|
},
|
||||||
|
|
||||||
|
getEffectData: function () {
|
||||||
|
return [
|
||||||
|
{group: 'menu-effect-group-entrance', value: AscFormat.ENTRANCE_APPEAR, iconCls: 'animation-entrance-appear', displayValue: this.textAppear},
|
||||||
|
{group: 'menu-effect-group-entrance', value: AscFormat.ENTRANCE_FADE, iconCls: 'animation-entrance-fade', displayValue: this.textFade},
|
||||||
|
{group: 'menu-effect-group-entrance', value: AscFormat.ENTRANCE_FLY_IN_FROM, iconCls: 'animation-entrance-fly-in', displayValue: this.textFlyIn},
|
||||||
|
{group: 'menu-effect-group-entrance', value: AscFormat.ENTRANCE_FLOAT_UP, iconCls: 'animation-entrance-float-in', displayValue: this.textFloatIn, familyEffect: 'entrfloat'},
|
||||||
|
{group: 'menu-effect-group-entrance', value: AscFormat.ENTRANCE_SPLIT, iconCls: 'animation-entrance-split', displayValue: this.textSplit},
|
||||||
|
{group: 'menu-effect-group-entrance', value: AscFormat.ENTRANCE_WIPE_FROM, iconCls: 'animation-entrance-wipe', displayValue: this.textWipe},
|
||||||
|
{group: 'menu-effect-group-entrance', value: AscFormat.ENTRANCE_CIRCLE, iconCls: 'animation-entrance-shape', displayValue: this.textShape, familyEffect: 'entrshape'},
|
||||||
|
{group: 'menu-effect-group-entrance', value: AscFormat.ENTRANCE_WHEEL, iconCls: 'animation-entrance-wheel', displayValue: this.textWheel},
|
||||||
|
{group: 'menu-effect-group-entrance', value: AscFormat.ENTRANCE_RANDOM_BARS, iconCls: 'animation-entrance-random-bars', displayValue: this.textRandomBars},
|
||||||
|
{group: 'menu-effect-group-entrance', value: AscFormat.ENTRANCE_GROW_AND_TURN, iconCls: 'animation-entrance-grow-turn', displayValue: this.textGrowTurn},
|
||||||
|
{group: 'menu-effect-group-entrance', value: AscFormat.ENTRANCE_ZOOM, iconCls: 'animation-entrance-zoom', displayValue: this.textZoom},
|
||||||
|
{group: 'menu-effect-group-entrance', value: AscFormat.ENTRANCE_SWIVEL, iconCls: 'animation-entrance-swivel', displayValue: this.textSwivel},
|
||||||
|
{group: 'menu-effect-group-entrance', value: AscFormat.ENTRANCE_BOUNCE, iconCls: 'animation-entrance-bounce', displayValue: this.textBounce},
|
||||||
|
{group: 'menu-effect-group-emphasis', value: AscFormat.EMPHASIS_PULSE, iconCls: 'animation-emphasis-pulse', displayValue: this.textPulse},
|
||||||
|
{group: 'menu-effect-group-emphasis', value: AscFormat.EMPHASIS_COLOR_PULSE, iconCls: 'animation-emphasis-color-pulse', displayValue: this.textColorPulse},
|
||||||
|
{group: 'menu-effect-group-emphasis', value: AscFormat.EMPHASIS_TEETER, iconCls: 'animation-emphasis-teeter', displayValue: this.textTeeter},
|
||||||
|
{group: 'menu-effect-group-emphasis', value: AscFormat.EMPHASIS_SPIN, iconCls: 'animation-emphasis-spin', displayValue: this.textSpin},
|
||||||
|
{group: 'menu-effect-group-emphasis', value: AscFormat.EMPHASIS_GROW_SHRINK, iconCls: 'animation-emphasis-grow-or-shrink', displayValue: this.textGrowShrink},
|
||||||
|
{group: 'menu-effect-group-emphasis', value: AscFormat.EMPHASIS_DESATURATE, iconCls: 'animation-emphasis-desaturate', displayValue: this.textDesaturate},
|
||||||
|
{group: 'menu-effect-group-emphasis', value: AscFormat.EMPHASIS_CONTRASTING_DARKEN, iconCls: 'animation-emphasis-darken', displayValue: this.textDarken},
|
||||||
|
{group: 'menu-effect-group-emphasis', value: AscFormat.EMPHASIS_LIGHTEN, iconCls: 'animation-emphasis-lighten', displayValue: this.textLighten},
|
||||||
|
{group: 'menu-effect-group-emphasis', value: AscFormat.EMPHASIS_TRANSPARENCY, iconCls: 'animation-emphasis-transparency', displayValue: this.textTransparency},
|
||||||
|
{group: 'menu-effect-group-emphasis', value: AscFormat.EMPHASIS_OBJECT_COLOR, iconCls: 'animation-emphasis-object-color', displayValue: this.textObjectColor},
|
||||||
|
{group: 'menu-effect-group-emphasis', value: AscFormat.EMPHASIS_COMPLEMENTARY_COLOR, iconCls: 'animation-emphasis-complementary-color', displayValue: this.textComplementaryColor},
|
||||||
|
{group: 'menu-effect-group-emphasis', value: AscFormat.EMPHASIS_LINE_COLOR, iconCls: 'animation-emphasis-line-color', displayValue: this.textLineColor},
|
||||||
|
{group: 'menu-effect-group-emphasis', value: AscFormat.EMPHASIS_FILL_COLOR, iconCls: 'animation-emphasis-fill-color', displayValue: this.textFillColor},
|
||||||
|
{group: 'menu-effect-group-exit', value: AscFormat.EXIT_DISAPPEAR, iconCls: 'animation-exit-disappear', displayValue: this.textDisappear},
|
||||||
|
{group: 'menu-effect-group-exit', value: AscFormat.EXIT_FADE, iconCls: 'animation-exit-fade', displayValue: this.textFade},
|
||||||
|
{group: 'menu-effect-group-exit', value: AscFormat.EXIT_FLY_OUT_TO, iconCls: 'animation-exit-fly-out', displayValue: this.textFlyOut},
|
||||||
|
{group: 'menu-effect-group-exit', value: AscFormat.EXIT_FLOAT_DOWN, iconCls: 'animation-exit-float-out', displayValue: this.textFloatOut, familyEffect: 'exitfloat'},
|
||||||
|
{group: 'menu-effect-group-exit', value: AscFormat.EXIT_SPLIT, iconCls: 'animation-exit-split', displayValue: this.textSplit},
|
||||||
|
{group: 'menu-effect-group-exit', value: AscFormat.EXIT_WIPE_FROM, iconCls: 'animation-exit-wipe', displayValue: this.textWipe},
|
||||||
|
{group: 'menu-effect-group-exit', value: AscFormat.EXIT_CIRCLE, iconCls: 'animation-exit-shape', displayValue: this.textShape, familyEffect: 'shape'},
|
||||||
|
{group: 'menu-effect-group-exit', value: AscFormat.EXIT_WHEEL, iconCls: 'animation-exit-wheel', displayValue: this.textWheel},
|
||||||
|
{group: 'menu-effect-group-exit', value: AscFormat.EXIT_RANDOM_BARS, iconCls: 'animation-exit-random-bars', displayValue: this.textRandomBars},
|
||||||
|
{group: 'menu-effect-group-exit', value: AscFormat.EXIT_SHRINK_AND_TURN, iconCls: 'animation-exit-shrink-turn', displayValue: this.textShrinkTurn},
|
||||||
|
{group: 'menu-effect-group-exit', value: AscFormat.EXIT_ZOOM, iconCls: 'animation-exit-zoom', displayValue: this.textZoom},
|
||||||
|
{group: 'menu-effect-group-exit', value: AscFormat.EXIT_SWIVEL, iconCls: 'animation-exit-swivel', displayValue: this.textSwivel},
|
||||||
|
{group: 'menu-effect-group-exit', value: AscFormat.EXIT_BOUNCE, iconCls: 'animation-exit-bounce', displayValue: this.textBounce},
|
||||||
|
{group: 'menu-effect-group-path', value: AscFormat.MOTION_DOWN, iconCls: 'animation-motion-paths-lines', displayValue: this.textLines, familyEffect: 'pathlines'},
|
||||||
|
{group: 'menu-effect-group-path', value: AscFormat.MOTION_ARC_DOWN, iconCls: 'animation-motion-paths-arcs', displayValue: this.textArcs, familyEffect: 'patharcs'},
|
||||||
|
{group: 'menu-effect-group-path', value: AscFormat.MOTION_TURN_DOWN, iconCls: 'animation-motion-paths-turns', displayValue: this.textTurns, familyEffect: 'pathturns'},
|
||||||
|
{group: 'menu-effect-group-path', value: AscFormat.MOTION_CIRCLE, iconCls: 'animation-motion-paths-shapes', displayValue: this.textShapes, familyEffect: 'pathshapes'},
|
||||||
|
{group: 'menu-effect-group-path', value: AscFormat.MOTION_HORIZONTAL_FIGURE_8_FOUR, iconCls: 'animation-motion-paths-loops', displayValue: this.textLoops, familyEffect: 'pathloops'}//,
|
||||||
|
//{group: 'menu-effect-group-path', value: AscFormat.MOTION_CUSTOM_PATH, iconCls: 'animation-motion-paths-custom-path', displayValue: this.textCustomPath}
|
||||||
|
];
|
||||||
|
},
|
||||||
|
|
||||||
|
getLevelEffect: function (isPath) {
|
||||||
|
|
||||||
|
if (!isPath)
|
||||||
|
return [
|
||||||
|
{id: 'menu-effect-level-basic', displayValue: this.textBasic},
|
||||||
|
{id: 'menu-effect-level-subtle', displayValue: this.textSubtle},
|
||||||
|
{id: 'menu-effect-level-moderate', displayValue: this.textModerate},
|
||||||
|
{id: 'menu-effect-level-exciting', displayValue: this.textExciting}
|
||||||
|
];
|
||||||
|
else
|
||||||
|
return [
|
||||||
|
{id: 'menu-effect-level-basic', displayValue: this.textBasic},
|
||||||
|
{id: 'menu-effect-level-lines_curves', displayValue: this.textSubtle},
|
||||||
|
{id: 'menu-effect-level-special', displayValue: this.textModerate}
|
||||||
|
];
|
||||||
|
},
|
||||||
|
|
||||||
|
getEffectFullData: function () {
|
||||||
|
return [
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_APPEAR, displayValue: this.textAppear},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_BLINDS, displayValue: this.textBlinds},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_BOX, displayValue: this.textBox, familyEffect: 'entrshape'},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_CHECKERBOARD, displayValue: this.textCheckerboard},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_CIRCLE, displayValue: this.textCircle, familyEffect: 'entrshape'},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_DIAMOND, displayValue: this.textDiamond, familyEffect: 'entrshape'},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_DISSOLVE_IN, displayValue: this.textDissolveIn},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_FLY_IN_FROM, displayValue: this.textFlyIn},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_PEEK_IN_FROM, displayValue: this.textPeekIn},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_PLUS, displayValue: this.textPlus, familyEffect: 'entrshape'},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_RANDOM_BARS, displayValue: this.textRandomBars},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_SPLIT, displayValue: this.textSplit},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_STRIPS, displayValue: this.textStrips},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_WEDGE, displayValue: this.textWedge},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_WHEEL, displayValue: this.textWheel},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-basic', value: AscFormat.ENTRANCE_WIPE_FROM, displayValue: this.textWipe},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-subtle', value: AscFormat.ENTRANCE_EXPAND, displayValue: this.textExpand},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-subtle', value: AscFormat.ENTRANCE_FADE, displayValue: this.textFade},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-subtle', value: AscFormat.ENTRANCE_SWIVEL, displayValue: this.textSwivel},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-subtle', value: AscFormat.ENTRANCE_ZOOM, displayValue: this.textZoom},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-moderate', value: AscFormat.ENTRANCE_BASIC_ZOOM, displayValue: this.textBasicZoom},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-moderate', value: AscFormat.ENTRANCE_CENTER_REVOLVE, displayValue: this.textCenterRevolve},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-moderate', value: AscFormat.ENTRANCE_CENTER_COMPRESS, displayValue: this.textCompress},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-moderate', value: AscFormat.ENTRANCE_FLOAT_DOWN, displayValue: this.textFloatDown, familyEffect: 'entrfloat'},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-moderate', value: AscFormat.ENTRANCE_FLOAT_UP, displayValue: this.textFloatUp, familyEffect: 'entrfloat'},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-moderate', value: AscFormat.ENTRANCE_GROW_AND_TURN, displayValue: this.textGrowTurn},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-moderate', value: AscFormat.ENTRANCE_RISE_UP, displayValue: this.textRiseUp},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-moderate', value: AscFormat.ENTRANCE_SPINNER, displayValue: this.textSpinner},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-moderate', value: AscFormat.ENTRANCE_STRETCH, displayValue: this.textStretch},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-exciting', value: AscFormat.ENTRANCE_BASIC_SWIVEL, displayValue: this.textBasicSwivel},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-exciting', value: AscFormat.ENTRANCE_BOOMERANG, displayValue: this.textBoomerang},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-exciting', value: AscFormat.ENTRANCE_BOUNCE, displayValue: this.textBounce},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-exciting', value: AscFormat.ENTRANCE_CREDITS, displayValue: this.textCredits},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-exciting', value: AscFormat.ENTRANCE_CURVE_UP, displayValue: this.textCuverUp},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-exciting', value: AscFormat.ENTRANCE_DROP, displayValue: this.textDrop},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-exciting', value: AscFormat.ENTRANCE_FLIP, displayValue: this.textFlip},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-exciting', value: AscFormat.ENTRANCE_FLOAT, displayValue: this.textFloat},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-exciting', value: AscFormat.ENTRANCE_PINWHEEL, displayValue: this.textPinwheel},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-exciting', value: AscFormat.ENTRANCE_SPIRAL_IN, displayValue: this.textSpiralIn},
|
||||||
|
{group: 'menu-effect-group-entrance', level: 'menu-effect-level-exciting', value: AscFormat.ENTRANCE_WHIP, displayValue: this.textWhip},
|
||||||
|
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-basic', value: AscFormat.EMPHASIS_FILL_COLOR, displayValue: this.textFillColor},
|
||||||
|
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-basic', value: AscFormat.EMPHASIS_GROW_SHRINK, displayValue: this.textGrowShrink},
|
||||||
|
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-basic', value: AscFormat.EMPHASIS_FONT_COLOR, displayValue: this.textFontColor, notsupported: true},
|
||||||
|
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-basic', value: AscFormat.EMPHASIS_LINE_COLOR, displayValue: this.textLineColor},
|
||||||
|
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-basic', value: AscFormat.EMPHASIS_SPIN, displayValue: this.textSpin},
|
||||||
|
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-basic', value: AscFormat.EMPHASIS_TRANSPARENCY, displayValue: this.textTransparency},
|
||||||
|
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_BOLD_FLASH, displayValue: this.textBoldFlash, notsupported: true},
|
||||||
|
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_COMPLEMENTARY_COLOR, displayValue: this.textComplementaryColor},
|
||||||
|
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_COMPLEMENTARY_COLOR_2, displayValue: this.textComplementaryColor2},
|
||||||
|
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_CONTRASTING_COLOR, displayValue: this.textContrastingColor},
|
||||||
|
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_CONTRASTING_DARKEN, displayValue: this.textDarken},
|
||||||
|
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_DESATURATE, displayValue: this.textDesaturate},
|
||||||
|
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_LIGHTEN, displayValue: this.textLighten},
|
||||||
|
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_OBJECT_COLOR, displayValue: this.textObjectColor},
|
||||||
|
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_PULSE, displayValue: this.textPulse},
|
||||||
|
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_UNDERLINE, displayValue: this.textUnderline, notsupported: true},
|
||||||
|
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-subtle', value: AscFormat.EMPHASIS_BRUSH_COLOR, displayValue: this.textBrushColor, notsupported: true},
|
||||||
|
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-moderate', value: AscFormat.EMPHASIS_COLOR_PULSE, displayValue: this.textColorPulse},
|
||||||
|
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-moderate', value: AscFormat.EMPHASIS_GROW_WITH_COLOR, displayValue: this.textGrowWithColor},
|
||||||
|
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-moderate', value: AscFormat.EMPHASIS_SHIMMER, displayValue: this.textShimmer},
|
||||||
|
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-moderate', value: AscFormat.EMPHASIS_TEETER, displayValue: this.textTeeter},
|
||||||
|
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-exciting', value: AscFormat.EMPHASIS_BLINK, displayValue: this.textBlink},
|
||||||
|
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-exciting', value: AscFormat.EMPHASIS_BOLD_REVEAL, displayValue: this.textBoldReveal, notsupported: true},
|
||||||
|
{group: 'menu-effect-group-emphasis', level: 'menu-effect-level-exciting', value: AscFormat.EMPHASIS_WAVE, displayValue: this.textWave, notsupported: true},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_BLINDS, displayValue: this.textBlinds},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_BOX, displayValue: this.textBox, familyEffect: 'shape'},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_CHECKERBOARD, displayValue: this.textCheckerboard},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_CIRCLE, displayValue: this.textCircle, familyEffect: 'shape'},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_DIAMOND, displayValue: this.textDiamond, familyEffect: 'shape'},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_DISAPPEAR, displayValue: this.textDisappear},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_DISSOLVE_OUT, displayValue: this.textDissolveOut},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_FLY_OUT_TO, displayValue: this.textFlyOut},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_PEEK_OUT_TO, displayValue: this.textPeekOut},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_PLUS, displayValue: this.textPlus, familyEffect: 'shape'},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_RANDOM_BARS, displayValue: this.textRandomBars},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_SPLIT, displayValue: this.textSplit},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_STRIPS, displayValue: this.textStrips},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_WEDGE, displayValue: this.textWedge},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_WHEEL, displayValue: this.textWheel},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-basic', value: AscFormat.EXIT_WIPE_FROM, displayValue: this.textWipe},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-subtle', value: AscFormat.EXIT_CONTRACT, displayValue: this.textContrast},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-subtle', value: AscFormat.EXIT_FADE, displayValue: this.textFade},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-subtle', value: AscFormat.EXIT_SWIVEL, displayValue: this.textSwivel},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-subtle', value: AscFormat.EXIT_ZOOM, displayValue: this.textZoom},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-moderate', value: AscFormat.EXIT_BASIC_ZOOM, displayValue: this.textBasicZoom},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-moderate', value: AscFormat.EXIT_CENTER_REVOLVE, displayValue: this.textCenterRevolve},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-moderate', value: AscFormat.EXIT_COLLAPSE, displayValue: this.textCollapse},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-moderate', value: AscFormat.EXIT_FLOAT_DOWN, displayValue: this.textFloatDown, familyEffect: 'exitfloat'},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-moderate', value: AscFormat.EXIT_FLOAT_UP, displayValue: this.textFloatUp, familyEffect: 'exitfloat'},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-moderate', value: AscFormat.EXIT_SHRINK_AND_TURN, displayValue: this.textShrinkTurn},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-moderate', value: AscFormat.EXIT_SINK_DOWN, displayValue: this.textSinkDown},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-moderate', value: AscFormat.EXIT_SPINNER, displayValue: this.textSpinner},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-moderate', value: AscFormat.EXIT_STRETCHY, displayValue: this.textStretch},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-exciting', value: AscFormat.EXIT_BASIC_SWIVEL, displayValue: this.textBasicSwivel},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-exciting', value: AscFormat.EXIT_BOOMERANG, displayValue: this.textBoomerang},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-exciting', value: AscFormat.EXIT_BOUNCE, displayValue: this.textBounce},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-exciting', value: AscFormat.EXIT_CREDITS, displayValue: this.textCredits},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-exciting', value: AscFormat.EXIT_CURVE_DOWN, displayValue: this.textCurveDown},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-exciting', value: AscFormat.EXIT_DROP, displayValue: this.textDrop},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-exciting', value: AscFormat.EXIT_FLIP, displayValue: this.textFlip},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-exciting', value: AscFormat.EXIT_FLOAT, displayValue: this.textFloat},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-exciting', value: AscFormat.EXIT_PINWHEEL, displayValue: this.textPinwheel},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-exciting', value: AscFormat.EXIT_SPIRAL_OUT, displayValue: this.textSpiralOut},
|
||||||
|
{group: 'menu-effect-group-exit', level: 'menu-effect-level-exciting', value: AscFormat.EXIT_WHIP, displayValue: this.textWhip},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_PATH_4_POINT_STAR, displayValue: this.textPointStar4},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_PATH_5_POINT_STAR, displayValue: this.textPointStar5},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_PATH_6_POINT_STAR, displayValue: this.textPointStar6},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_PATH_8_POINT_STAR, displayValue: this.textPointStar8},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_CIRCLE, displayValue: this.textCircle, familyEffect: 'pathshapes'},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_CRESCENT_MOON, displayValue: this.textCrescentMoon},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_DIAMOND, displayValue: this.textDiamond, familyEffect: 'pathshapes'},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_EQUAL_TRIANGLE, displayValue: this.textEqualTriangle, familyEffect: 'pathshapes'},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_FOOTBALL, displayValue: this.textFootball},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_HEART, displayValue: this.textHeart},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_HEXAGON, displayValue: this.textHexagon, familyEffect: 'pathshapes'},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_OCTAGON, displayValue: this.textOctagon, familyEffect: 'pathshapes'},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_PARALLELOGRAM, displayValue: this.textParallelogram, familyEffect: 'pathshapes'},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_PENTAGON, displayValue: this.textPentagon, familyEffect: 'pathshapes'},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_RIGHT_TRIANGLE, displayValue: this.textRightTriangle, familyEffect: 'pathshapes'},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_SQUARE, displayValue: this.textSquare, familyEffect: 'pathshapes'},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_TEARDROP, displayValue: this.textTeardrop},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-basic', value: AscFormat.MOTION_TRAPEZOID, displayValue: this.textTrapezoid, familyEffect: 'pathshapes'},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_ARC_DOWN, displayValue: this.textArcDown, familyEffect: 'patharcs'},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_ARC_LEFT, displayValue: this.textArcLeft, familyEffect: 'patharcs'},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_ARC_RIGHT, displayValue: this.textArcRight, familyEffect: 'patharcs'},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_ARC_UP, displayValue: this.textArcUp, familyEffect: 'patharcs'},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_BOUNCE_LEFT, displayValue: this.textBounceLeft},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_BOUNCE_RIGHT, displayValue: this.textBounceRight},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_CURVY_LEFT, displayValue: this.textCurvyLeft},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_CURVY_RIGHT, displayValue: this.textCurvyRight},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_DECAYING_WAVE, displayValue: this.textDecayingWave},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_DIAGONAL_DOWN_RIGHT, displayValue: this.textDiagonalDownRight},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_DIAGONAL_UP_RIGHT, displayValue: this.textDiagonalUpRight},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_DOWN, displayValue: this.textDown, familyEffect: 'pathlines'},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_FUNNEL, displayValue: this.textFunnel},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_HEARTBEAT, displayValue: this.textHeartbeat},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_LEFT, displayValue: this.textLeft, familyEffect: 'pathlines'},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_RIGHT, displayValue: this.textRight, familyEffect: 'pathlines'},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_S_CURVE_1, displayValue: this.textSCurve1},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_S_CURVE_2, displayValue: this.textSCurve2},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_SINE_WAVE, displayValue: this.textSineWave},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_SINE_SPIRAL_LEFT, displayValue: this.textSpiralLeft},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_SINE_SPIRAL_RIGHT, displayValue: this.textSpiralRight},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_SPRING, displayValue: this.textSpring},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_STAIRS_DOWN, displayValue: this.textStairsDown},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_TURN_DOWN, displayValue: this.textTurnDown, familyEffect: 'pathturns'},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_TURN_DOWN_RIGHT, displayValue: this.textTurnDownRight, familyEffect: 'pathturns'},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_TURN_UP, displayValue: this.textTurnUp, familyEffect: 'pathturns'},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_TURN_UP_RIGHT, displayValue: this.textTurnUpRight, familyEffect: 'pathturns'},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_UP, displayValue: this.textUp, familyEffect: 'pathlines'},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_WAVE, displayValue: this.textWave},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-lines_curves', value: AscFormat.MOTION_ZIGZAG, displayValue: this.textZigzag},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_BEAN, displayValue: this.textBean},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_CURVED_SQUARE, displayValue: this.textCurvedSquare},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_CURVED_X, displayValue: this.textCurvedX},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_CURVY_STAR, displayValue: this.textCurvyStar},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_FIGURE_8_FOUR, displayValue: this.textFigureFour},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_HORIZONTAL_FIGURE_8_FOUR, displayValue: this.textHorizontalFigure, familyEffect: 'pathloops'},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_INVERTED_SQUARE, displayValue: this.textInvertedSquare},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_INVERTED_TRIANGLE, displayValue: this.textInvertedTriangle},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_LOOP_DE_LOOP, displayValue: this.textLoopDeLoop, familyEffect: 'pathloops'},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_NEUTRON, displayValue: this.textNeutron},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_PEANUT, displayValue: this.textPeanut},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_POINTY_STAR, displayValue: this.textPointStar},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_SWOOSH, displayValue: this.textSwoosh},
|
||||||
|
{group: 'menu-effect-group-path', level: 'menu-effect-level-special', value: AscFormat.MOTION_VERTICAL_FIGURE_8, displayValue: this.textVerticalFigure, familyEffect: 'pathloops'}
|
||||||
|
|
||||||
|
];
|
||||||
|
},
|
||||||
|
|
||||||
|
getEffectOptionsData: function (group, type) {
|
||||||
|
switch (group) {
|
||||||
|
case 'menu-effect-group-entrance':
|
||||||
|
switch (type) {
|
||||||
|
case AscFormat.ENTRANCE_BLINDS:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.ENTRANCE_BLINDS_HORIZONTAL, caption: this.textHorizontal, defvalue: true},
|
||||||
|
{value: AscFormat.ENTRANCE_BLINDS_VERTICAL, caption: this.textVertical}
|
||||||
|
];
|
||||||
|
case AscFormat.ENTRANCE_BOX:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.ENTRANCE_BOX_IN, caption: this.textIn, defvalue: true},
|
||||||
|
{value: AscFormat.ENTRANCE_BOX_OUT, caption: this.textOut}
|
||||||
|
];
|
||||||
|
case AscFormat.ENTRANCE_CHECKERBOARD:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.ENTRANCE_CHECKERBOARD_ACROSS, caption: this.textAcross, defvalue: true},
|
||||||
|
{value: AscFormat.ENTRANCE_CHECKERBOARD_DOWN, caption: this.textDown}
|
||||||
|
];
|
||||||
|
case AscFormat.ENTRANCE_CIRCLE:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.ENTRANCE_CIRCLE_IN, caption: this.textIn, defvalue: true},
|
||||||
|
{value: AscFormat.ENTRANCE_CIRCLE_OUT, caption: this.textOut}
|
||||||
|
];
|
||||||
|
case AscFormat.ENTRANCE_DIAMOND:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.ENTRANCE_DIAMOND_IN, caption: this.textIn, defvalue: true},
|
||||||
|
{value: AscFormat.ENTRANCE_DIAMOND_OUT, caption: this.textOut}
|
||||||
|
];
|
||||||
|
|
||||||
|
case AscFormat.ENTRANCE_FLY_IN_FROM:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.ENTRANCE_FLY_IN_FROM_BOTTOM, caption: this.textFromBottom, defvalue: true},
|
||||||
|
{value: AscFormat.ENTRANCE_FLY_IN_FROM_BOTTOM_LEFT, caption: this.textFromBottomLeft},
|
||||||
|
{value: AscFormat.ENTRANCE_FLY_IN_FROM_LEFT, caption: this.textFromLeft},
|
||||||
|
{value: AscFormat.ENTRANCE_FLY_IN_FROM_TOP_LEFT, caption: this.textFromTopLeft},
|
||||||
|
{value: AscFormat.ENTRANCE_FLY_IN_FROM_TOP, caption: this.textFromTop},
|
||||||
|
{value: AscFormat.ENTRANCE_FLY_IN_FROM_TOP_RIGHT, caption: this.textFromTopRight},
|
||||||
|
{value: AscFormat.ENTRANCE_FLY_IN_FROM_RIGHT, caption: this.textFromRight},
|
||||||
|
{value: AscFormat.ENTRANCE_FLY_IN_FROM_BOTTOM_RIGHT, caption: this.textFromBottomRight}
|
||||||
|
];
|
||||||
|
case AscFormat.ENTRANCE_PEEK_IN_FROM:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.ENTRANCE_PEEK_IN_FROM_BOTTOM, caption: this.textFromBottom, defvalue: true},
|
||||||
|
{value: AscFormat.ENTRANCE_PEEK_IN_FROM_LEFT, caption: this.textFromLeft},
|
||||||
|
{value: AscFormat.ENTRANCE_PEEK_IN_FROM_RIGHT, caption: this.textFromRight},
|
||||||
|
{value: AscFormat.ENTRANCE_PEEK_IN_FROM_TOP, caption: this.textFromTop}
|
||||||
|
];
|
||||||
|
case AscFormat.ENTRANCE_PLUS:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.ENTRANCE_PLUS_IN, caption: this.textIn, defvalue: true},
|
||||||
|
{value: AscFormat.ENTRANCE_PLUS_OUT, caption: this.textOut}
|
||||||
|
];
|
||||||
|
case AscFormat.ENTRANCE_RANDOM_BARS:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.ENTRANCE_RANDOM_BARS_HORIZONTAL, caption: this.textHorizontal, defvalue: true},
|
||||||
|
{value: AscFormat.ENTRANCE_RANDOM_BARS_VERTICAL, caption: this.textVertical}
|
||||||
|
];
|
||||||
|
case AscFormat.ENTRANCE_SPLIT:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.ENTRANCE_SPLIT_HORIZONTAL_IN, caption: this.textHorizontalIn},
|
||||||
|
{value: AscFormat.ENTRANCE_SPLIT_HORIZONTAL_OUT, caption: this.textHorizontalOut},
|
||||||
|
{value: AscFormat.ENTRANCE_SPLIT_VERTICAL_IN, caption: this.textVerticalIn, defvalue: true},
|
||||||
|
{value: AscFormat.ENTRANCE_SPLIT_VERTICAL_OUT, caption: this.textVerticalOut}
|
||||||
|
];
|
||||||
|
case AscFormat.ENTRANCE_STRIPS:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.ENTRANCE_STRIPS_LEFT_DOWN, caption: this.textLeftDown, defvalue: true},
|
||||||
|
{value: AscFormat.ENTRANCE_STRIPS_LEFT_UP, caption: this.textLeftUp},
|
||||||
|
{value: AscFormat.ENTRANCE_STRIPS_RIGHT_DOWN, caption: this.textRightDown},
|
||||||
|
{value: AscFormat.ENTRANCE_STRIPS_RIGHT_UP, caption: this.textRightUp}
|
||||||
|
];
|
||||||
|
case AscFormat.ENTRANCE_WHEEL:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.ENTRANCE_WHEEL_1_SPOKE, caption: this.textSpoke1, defvalue: true},
|
||||||
|
{value: AscFormat.ENTRANCE_WHEEL_2_SPOKES, caption: this.textSpoke2},
|
||||||
|
{value: AscFormat.ENTRANCE_WHEEL_3_SPOKES, caption: this.textSpoke3},
|
||||||
|
{value: AscFormat.ENTRANCE_WHEEL_4_SPOKES, caption: this.textSpoke4},
|
||||||
|
{value: AscFormat.ENTRANCE_WHEEL_8_SPOKES, caption: this.textSpoke8}
|
||||||
|
];
|
||||||
|
case AscFormat.ENTRANCE_WIPE_FROM:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.ENTRANCE_WIPE_FROM_BOTTOM, caption: this.textFromBottom, defvalue: true},
|
||||||
|
{value: AscFormat.ENTRANCE_WIPE_FROM_LEFT, caption: this.textFromLeft},
|
||||||
|
{value: AscFormat.ENTRANCE_WIPE_FROM_RIGHT, caption: this.textFromRight},
|
||||||
|
{value: AscFormat.ENTRANCE_WIPE_FROM_TOP, caption: this.textFromTop}
|
||||||
|
];
|
||||||
|
case AscFormat.ENTRANCE_ZOOM:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.ENTRANCE_ZOOM_OBJECT_CENTER, caption: this.textObjectCenter, defvalue: true},
|
||||||
|
{value: AscFormat.ENTRANCE_ZOOM_SLIDE_CENTER, caption: this.textSlideCenter}
|
||||||
|
];
|
||||||
|
case AscFormat.ENTRANCE_BASIC_ZOOM:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.ENTRANCE_BASIC_ZOOM_IN, caption: this.textIn, defvalue: true},
|
||||||
|
{value: AscFormat.ENTRANCE_BASIC_ZOOM_IN_FROM_SCREEN_CENTER, caption: this.textInFromScreenCenter},
|
||||||
|
{value: AscFormat.ENTRANCE_BASIC_ZOOM_IN_SLIGHTLY, caption: this.textInSlightly},
|
||||||
|
{value: AscFormat.ENTRANCE_BASIC_ZOOM_OUT, caption: this.textOut},
|
||||||
|
{value: AscFormat.ENTRANCE_BASIC_ZOOM_OUT_FROM_SCREEN_BOTTOM, caption: this.textOutFromScreenBottom},
|
||||||
|
{value: AscFormat.ENTRANCE_BASIC_ZOOM_OUT_SLIGHTLY, caption: this.textOutSlightly}
|
||||||
|
];
|
||||||
|
case AscFormat.ENTRANCE_STRETCH:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.ENTRANCE_STRETCH_ACROSS, caption: this.textAcross, defvalue: true},
|
||||||
|
{value: AscFormat.ENTRANCE_STRETCH_FROM_BOTTOM, caption: this.textFromBottom},
|
||||||
|
{value: AscFormat.ENTRANCE_STRETCH_FROM_LEFT, caption: this.textFromLeft},
|
||||||
|
{value: AscFormat.ENTRANCE_STRETCH_FROM_RIGHT, caption: this.textFromRight},
|
||||||
|
{value: AscFormat.ENTRANCE_STRETCH_FROM_TOP, caption: this.textFromTop}
|
||||||
|
];
|
||||||
|
case AscFormat.ENTRANCE_BASIC_SWIVEL:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.ENTRANCE_BASIC_SWIVEL_HORIZONTAL, caption: this.textHorizontal, defvalue: true},
|
||||||
|
{value: AscFormat.ENTRANCE_BASIC_SWIVEL_VERTICAL, caption: this.textVertical}
|
||||||
|
];
|
||||||
|
default:
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'menu-effect-group-exit':
|
||||||
|
switch (type){
|
||||||
|
case AscFormat.EXIT_BLINDS:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.EXIT_BLINDS_HORIZONTAL, caption: this.textHorizontal, defvalue: true},
|
||||||
|
{value: AscFormat.EXIT_BLINDS_VERTICAL, caption: this.textVertical}
|
||||||
|
];
|
||||||
|
case AscFormat.EXIT_BOX:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.EXIT_BOX_IN, caption: this.textIn},
|
||||||
|
{value: AscFormat.EXIT_BOX_OUT, caption: this.textOut, defvalue: true}
|
||||||
|
];
|
||||||
|
case AscFormat.EXIT_CHECKERBOARD:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.EXIT_CHECKERBOARD_ACROSS, caption: this.textAcross, defvalue: true},
|
||||||
|
{value: AscFormat.EXIT_CIRCLE_OUT, caption: this.textUp}
|
||||||
|
];
|
||||||
|
case AscFormat.EXIT_CIRCLE:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.EXIT_CIRCLE_IN, caption: this.textIn},
|
||||||
|
{value: AscFormat.EXIT_CIRCLE_OUT, caption: this.textOut, defvalue: true}
|
||||||
|
];
|
||||||
|
case AscFormat.EXIT_DIAMOND:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.EXIT_DIAMOND_IN, caption: this.textIn},
|
||||||
|
{value: AscFormat.EXIT_DIAMOND_OUT, caption: this.textOut, defvalue: true}
|
||||||
|
];
|
||||||
|
case AscFormat.EXIT_FLY_OUT_TO:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.EXIT_FLY_OUT_TO_BOTTOM, caption: this.textToBottom, defvalue: true},
|
||||||
|
{value: AscFormat.EXIT_FLY_OUT_TO_BOTTOM_LEFT, caption: this.textToBottomLeft},
|
||||||
|
{value: AscFormat.EXIT_FLY_OUT_TO_LEFT, caption: this.textToLeft},
|
||||||
|
{value: AscFormat.EXIT_FLY_OUT_TO_TOP_LEFT, caption: this.textToTopLeft},
|
||||||
|
{value: AscFormat.EXIT_FLY_OUT_TO_TOP, caption: this.textToTop},
|
||||||
|
{value: AscFormat.EXIT_FLY_OUT_TO_TOP_RIGHT, caption: this.textToTopRight},
|
||||||
|
{value: AscFormat.EXIT_FLY_OUT_TO_RIGHT, caption: this.textToRight},
|
||||||
|
{value: AscFormat.EXIT_FLY_OUT_TO_BOTTOM_RIGHT, caption: this.textToBottomRight}
|
||||||
|
];
|
||||||
|
case AscFormat.EXIT_PEEK_OUT_TO:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.EXIT_PEEK_OUT_TO_BOTTOM, caption: this.textToBottom, defvalue: true},
|
||||||
|
{value: AscFormat.EXIT_PEEK_OUT_TO_LEFT, caption: this.textToLeft},
|
||||||
|
{value: AscFormat.EXIT_PEEK_OUT_TO_RIGHT, caption: this.textToRight},
|
||||||
|
{value: AscFormat.EXIT_PEEK_OUT_TO_TOP, caption: this.textToTop}
|
||||||
|
];
|
||||||
|
case AscFormat.EXIT_PLUS:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.EXIT_PLUS_IN, caption: this.textIn},
|
||||||
|
{value: AscFormat.EXIT_PLUS_OUT, caption: this.textOut, defvalue: true}
|
||||||
|
];
|
||||||
|
case AscFormat.EXIT_RANDOM_BARS:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.EXIT_RANDOM_BARS_HORIZONTAL, caption: this.textHorizontal, defvalue: true},
|
||||||
|
{value: AscFormat.EXIT_RANDOM_BARS_VERTICAL, caption: this.textVertical}
|
||||||
|
];
|
||||||
|
case AscFormat.EXIT_SPLIT:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.EXIT_SPLIT_HORIZONTAL_IN, caption: this.textHorizontalIn},
|
||||||
|
{value: AscFormat.EXIT_SPLIT_HORIZONTAL_OUT, caption: this.textHorizontalOut},
|
||||||
|
{value: AscFormat.EXIT_SPLIT_VERTICAL_IN, caption: this.textVerticalIn, defvalue: true},
|
||||||
|
{value: AscFormat.EXIT_SPLIT_VERTICAL_OUT, caption: this.textVerticalOut}
|
||||||
|
];
|
||||||
|
case AscFormat.EXIT_STRIPS:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.EXIT_STRIPS_LEFT_DOWN, caption: this.textLeftDown, defvalue: true},
|
||||||
|
{value: AscFormat.EXIT_STRIPS_LEFT_UP, caption: this.textLeftUp},
|
||||||
|
{value: AscFormat.EXIT_STRIPS_RIGHT_DOWN, caption: this.textRightDown},
|
||||||
|
{value: AscFormat.EXIT_STRIPS_RIGHT_UP, caption: this.textRightUp}
|
||||||
|
];
|
||||||
|
case AscFormat.EXIT_WHEEL:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.EXIT_WHEEL_1_SPOKE, caption: this.textSpoke1, defvalue: true},
|
||||||
|
{value: AscFormat.EXIT_WHEEL_2_SPOKES, caption: this.textSpoke2},
|
||||||
|
{value: AscFormat.EXIT_WHEEL_3_SPOKES, caption: this.textSpoke3},
|
||||||
|
{value: AscFormat.EXIT_WHEEL_4_SPOKES, caption: this.textSpoke4},
|
||||||
|
{value: AscFormat.EXIT_WHEEL_8_SPOKES, caption: this.textSpoke8}
|
||||||
|
];
|
||||||
|
case AscFormat.EXIT_WIPE_FROM:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.EXIT_WIPE_FROM_BOTTOM, caption: this.textFromBottom, defvalue: true},
|
||||||
|
{value: AscFormat.EXIT_WIPE_FROM_LEFT, caption: this.textFromLeft},
|
||||||
|
{value: AscFormat.EXIT_WIPE_FROM_RIGHT, caption: this.textFromRight},
|
||||||
|
{value: AscFormat.EXIT_WIPE_FROM_TOP, caption: this.textFromTop}
|
||||||
|
];
|
||||||
|
case AscFormat.EXIT_ZOOM:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.EXIT_ZOOM_OBJECT_CENTER, caption: this.textObjectCenter, defvalue: true},
|
||||||
|
{value: AscFormat.EXIT_ZOOM_SLIDE_CENTER, caption: this.textSlideCenter}
|
||||||
|
];
|
||||||
|
case AscFormat.EXIT_BASIC_ZOOM:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.EXIT_BASIC_ZOOM_OUT, caption: this.textOut, defvalue: true},
|
||||||
|
{value: AscFormat.EXIT_BASIC_ZOOM_OUT_TO_SCREEN_CENTER, caption: this.textOutToScreenCenter},
|
||||||
|
{value: AscFormat.EXIT_BASIC_ZOOM_OUT_SLIGHTLY, caption: this.textOutSlightly},
|
||||||
|
{value: AscFormat.EXIT_BASIC_ZOOM_IN, caption: this.textIn},
|
||||||
|
{value: AscFormat.EXIT_BASIC_ZOOM_IN_TO_SCREEN_BOTTOM, caption: this.textInToScreenBottom},
|
||||||
|
{value: AscFormat.EXIT_BASIC_ZOOM_IN_SLIGHTLY, caption: this.textInSlightly}
|
||||||
|
];
|
||||||
|
case AscFormat.EXIT_COLLAPSE:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.EXIT_COLLAPSE_ACROSS, caption: this.textAcross, defvalue: true},
|
||||||
|
{value: AscFormat.EXIT_COLLAPSE_TO_BOTTOM, caption: this.textToBottom},
|
||||||
|
{value: AscFormat.EXIT_COLLAPSE_TO_LEFT, caption: this.textToLeft},
|
||||||
|
{value: AscFormat.EXIT_COLLAPSE_TO_RIGHT, caption: this.textToRight},
|
||||||
|
{value: AscFormat.EXIT_COLLAPSE_TO_TOP, caption: this.textToTop}
|
||||||
|
];
|
||||||
|
case AscFormat.EXIT_BASIC_SWIVEL:
|
||||||
|
return [
|
||||||
|
{value: AscFormat.EXIT_BASIC_SWIVEL_HORIZONTAL, caption: this.textHorizontal, defvalue: true},
|
||||||
|
{value: AscFormat.EXIT_BASIC_SWIVEL_VERTICAL, caption: this.textVertical}
|
||||||
|
];
|
||||||
|
default:
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getSimilarEffectsArray: function (group, familyEffect) {
|
||||||
|
switch (familyEffect){
|
||||||
|
case 'shape':
|
||||||
|
return [
|
||||||
|
{value: AscFormat.EXIT_CIRCLE, caption: this.textCircle},
|
||||||
|
{value: AscFormat.EXIT_BOX, caption: this.textBox},
|
||||||
|
{value: AscFormat.EXIT_DIAMOND, caption: this.textDiamond},
|
||||||
|
{value: AscFormat.EXIT_PLUS, caption: this.textPlus}
|
||||||
|
];
|
||||||
|
case 'entrshape':
|
||||||
|
return [
|
||||||
|
{value: AscFormat.ENTRANCE_CIRCLE, caption: this.textCircle},
|
||||||
|
{value: AscFormat.ENTRANCE_BOX, caption: this.textBox},
|
||||||
|
{value: AscFormat.ENTRANCE_DIAMOND, caption: this.textDiamond},
|
||||||
|
{value: AscFormat.ENTRANCE_PLUS, caption: this.textPlus}
|
||||||
|
];
|
||||||
|
case 'pathlines':
|
||||||
|
return[
|
||||||
|
{value: AscFormat.MOTION_DOWN, caption: this.textDown},
|
||||||
|
{value: AscFormat.MOTION_LEFT, caption: this.textLeft},
|
||||||
|
{value: AscFormat.MOTION_RIGHT, caption: this.textRight},
|
||||||
|
{value: AscFormat.MOTION_UP, caption: this.textUp}
|
||||||
|
];
|
||||||
|
case 'patharcs':
|
||||||
|
return [
|
||||||
|
{value: AscFormat.MOTION_ARC_DOWN, caption: this.textArcDown},
|
||||||
|
{value: AscFormat.MOTION_ARC_LEFT, caption: this.textArcLeft},
|
||||||
|
{value: AscFormat.MOTION_ARC_RIGHT, caption: this.textArcRight},
|
||||||
|
{value: AscFormat.MOTION_ARC_UP, caption: this.textArcUp}
|
||||||
|
];
|
||||||
|
case 'pathturns':
|
||||||
|
return [
|
||||||
|
{value: AscFormat.MOTION_TURN_DOWN, caption: this.textTurnDown},
|
||||||
|
{value: AscFormat.MOTION_TURN_DOWN_RIGHT, caption: this.textTurnDownRight},
|
||||||
|
{value: AscFormat.MOTION_TURN_UP, caption: this.textTurnUp},
|
||||||
|
{value: AscFormat.MOTION_TURN_UP_RIGHT, caption: this.textTurnUpRight}
|
||||||
|
];
|
||||||
|
case 'pathshapes':
|
||||||
|
return [
|
||||||
|
{value: AscFormat.MOTION_CIRCLE, caption: this.textCircle},
|
||||||
|
{value: AscFormat.MOTION_DIAMOND, caption: this.textDiamond},
|
||||||
|
{value: AscFormat.MOTION_EQUAL_TRIANGLE, caption: this.textEqualTriangle},
|
||||||
|
{value: AscFormat.MOTION_HEXAGON, caption: this.textHexagon},
|
||||||
|
{value: AscFormat.MOTION_OCTAGON, caption: this.textOctagon},
|
||||||
|
{value: AscFormat.MOTION_PARALLELOGRAM, caption: this.textParallelogram},
|
||||||
|
{value: AscFormat.MOTION_PENTAGON, caption: this.textPentagon},
|
||||||
|
{value: AscFormat.MOTION_RIGHT_TRIANGLE, caption: this.textRightTriangle},
|
||||||
|
{value: AscFormat.MOTION_SQUARE, caption: this.textSquare},
|
||||||
|
{value: AscFormat.MOTION_TRAPEZOID, caption: this.textTrapezoid}
|
||||||
|
|
||||||
|
];
|
||||||
|
case 'pathloops':
|
||||||
|
return [
|
||||||
|
{value: AscFormat.MOTION_HORIZONTAL_FIGURE_8_FOUR, caption: this.textHorizontalFigure},
|
||||||
|
{value: AscFormat.MOTION_VERTICAL_FIGURE_8, caption: this.textVerticalFigure},
|
||||||
|
{value: AscFormat.MOTION_LOOP_DE_LOOP, caption: this.textLoopDeLoop}
|
||||||
|
];
|
||||||
|
case 'entrfloat':
|
||||||
|
return [
|
||||||
|
{value: AscFormat.ENTRANCE_FLOAT_UP, caption: this.textFloatUp},
|
||||||
|
{value: AscFormat.ENTRANCE_FLOAT_DOWN, caption: this.textFloatDown}
|
||||||
|
];
|
||||||
|
case 'exitfloat':
|
||||||
|
return [
|
||||||
|
{value: AscFormat.EXIT_FLOAT_UP, caption: this.textFloatUp},
|
||||||
|
{value: AscFormat.EXIT_FLOAT_DOWN, caption: this.textFloatDown}
|
||||||
|
];
|
||||||
|
default:
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})(), Common.define.effectData || {});
|
||||||
|
|
||||||
|
});
|
|
@ -325,6 +325,16 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
|
||||||
Common.Utils.InternalSettings.set(me.appPrefix + "settings-autoformat-numbered", checked);
|
Common.Utils.InternalSettings.set(me.appPrefix + "settings-autoformat-numbered", checked);
|
||||||
me.api.asc_SetAutomaticNumberedLists(checked);
|
me.api.asc_SetAutomaticNumberedLists(checked);
|
||||||
});
|
});
|
||||||
|
this.chDoubleSpaces = new Common.UI.CheckBox({
|
||||||
|
el: panelAutoFormat.find('#id-autocorrect-dialog-chk-double-space'),
|
||||||
|
labelText: this.textDoubleSpaces,
|
||||||
|
value: Common.Utils.InternalSettings.get(this.appPrefix + "settings-autoformat-double-space")
|
||||||
|
}).on('change', function(field, newValue, oldValue, eOpts){
|
||||||
|
var checked = (field.getValue()==='checked');
|
||||||
|
Common.localStorage.setBool(me.appPrefix + "settings-autoformat-double-space", checked);
|
||||||
|
Common.Utils.InternalSettings.set(me.appPrefix + "settings-autoformat-double-space", checked);
|
||||||
|
me.api.asc_SetAutoCorrectDoubleSpaceWithPeriod(checked);
|
||||||
|
});
|
||||||
// AutoCorrect
|
// AutoCorrect
|
||||||
this.chFLSentence = new Common.UI.CheckBox({
|
this.chFLSentence = new Common.UI.CheckBox({
|
||||||
el: $window.find('#id-autocorrect-dialog-chk-fl-sentence'),
|
el: $window.find('#id-autocorrect-dialog-chk-fl-sentence'),
|
||||||
|
@ -337,6 +347,17 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
|
||||||
me.api.asc_SetAutoCorrectFirstLetterOfSentences && me.api.asc_SetAutoCorrectFirstLetterOfSentences(checked);
|
me.api.asc_SetAutoCorrectFirstLetterOfSentences && me.api.asc_SetAutoCorrectFirstLetterOfSentences(checked);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.chFLCells = new Common.UI.CheckBox({
|
||||||
|
el: $window.find('#id-autocorrect-dialog-chk-fl-cells'),
|
||||||
|
labelText: this.textFLCells,
|
||||||
|
value: Common.Utils.InternalSettings.get(this.appPrefix + "settings-autoformat-fl-cells")
|
||||||
|
}).on('change', function(field, newValue, oldValue, eOpts){
|
||||||
|
var checked = (field.getValue()==='checked');
|
||||||
|
Common.localStorage.setBool(me.appPrefix + "settings-autoformat-fl-cells", checked);
|
||||||
|
Common.Utils.InternalSettings.set(me.appPrefix + "settings-autoformat-fl-cells", checked);
|
||||||
|
me.api.asc_SetAutoCorrectFirstLetterOfCells && me.api.asc_SetAutoCorrectFirstLetterOfCells(checked);
|
||||||
|
});
|
||||||
|
|
||||||
this.btnsCategory[3].on('click', _.bind(this.onAutocorrectCategoryClick, this, false));
|
this.btnsCategory[3].on('click', _.bind(this.onAutocorrectCategoryClick, this, false));
|
||||||
} else if (this.appPrefix=='sse-') {
|
} else if (this.appPrefix=='sse-') {
|
||||||
this.chNewRows = new Common.UI.CheckBox({
|
this.chNewRows = new Common.UI.CheckBox({
|
||||||
|
@ -384,7 +405,7 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
|
||||||
this.chHyperlink // 2 tab
|
this.chHyperlink // 2 tab
|
||||||
];
|
];
|
||||||
arr = arr.concat(this.chNewRows ? [this.chNewRows] : [this.chQuotes, this.chHyphens, this.chBulleted, this.chNumbered]);
|
arr = arr.concat(this.chNewRows ? [this.chNewRows] : [this.chQuotes, this.chHyphens, this.chBulleted, this.chNumbered]);
|
||||||
arr = arr.concat(this.chFLSentence ? [this.chFLSentence] : []);
|
arr = arr.concat(this.chFLSentence ? [this.chFLSentence, this.chFLCells] : []);
|
||||||
return arr;
|
return arr;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -829,7 +850,9 @@ define([ 'text!common/main/lib/template/AutoCorrectDialog.template',
|
||||||
textNewRowCol: 'Include new rows and columns in table',
|
textNewRowCol: 'Include new rows and columns in table',
|
||||||
textAutoCorrect: 'AutoCorrect',
|
textAutoCorrect: 'AutoCorrect',
|
||||||
textFLSentence: 'Capitalize first letter of sentences',
|
textFLSentence: 'Capitalize first letter of sentences',
|
||||||
textHyperlink: 'Internet and network paths with hyperlinks'
|
textHyperlink: 'Internet and network paths with hyperlinks',
|
||||||
|
textFLCells: 'Capitalize first letter of table cells',
|
||||||
|
textDoubleSpaces: 'Add period with double-space'
|
||||||
|
|
||||||
}, Common.Views.AutoCorrectDialog || {}))
|
}, Common.Views.AutoCorrectDialog || {}))
|
||||||
});
|
});
|
||||||
|
|
|
@ -377,7 +377,21 @@ define([
|
||||||
visible: this.appPrefix==='de-',
|
visible: this.appPrefix==='de-',
|
||||||
checked: Common.localStorage.getItem(this.appPrefix + "comments-sort") === 'position-desc',
|
checked: Common.localStorage.getItem(this.appPrefix + "comments-sort") === 'position-desc',
|
||||||
toggleGroup: 'sortcomments'
|
toggleGroup: 'sortcomments'
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
caption: '--',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
this.menuFilterGroups = new Common.UI.MenuItem({
|
||||||
|
caption: this.mniFilterGroups,
|
||||||
|
checkable: false,
|
||||||
|
visible: false,
|
||||||
|
menu: new Common.UI.Menu({
|
||||||
|
menuAlign: 'tl-tr',
|
||||||
|
style: 'min-width: auto;',
|
||||||
|
items: []
|
||||||
|
})
|
||||||
|
})
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
@ -394,6 +408,7 @@ define([
|
||||||
this.buttonCancel.on('click', _.bind(this.onClickCancelDocumentComment, this));
|
this.buttonCancel.on('click', _.bind(this.onClickCancelDocumentComment, this));
|
||||||
this.buttonClose.on('click', _.bind(this.onClickClosePanel, this));
|
this.buttonClose.on('click', _.bind(this.onClickClosePanel, this));
|
||||||
this.buttonSort.menu.on('item:toggle', _.bind(this.onSortClick, this));
|
this.buttonSort.menu.on('item:toggle', _.bind(this.onSortClick, this));
|
||||||
|
this.menuFilterGroups.menu.on('item:toggle', _.bind(this.onFilterGroupsClick, this));
|
||||||
|
|
||||||
this.txtComment = $('#comment-msg-new', this.el);
|
this.txtComment = $('#comment-msg-new', this.el);
|
||||||
this.txtComment.keydown(function (event) {
|
this.txtComment.keydown(function (event) {
|
||||||
|
@ -428,7 +443,8 @@ define([
|
||||||
textReply: me.textReply,
|
textReply: me.textReply,
|
||||||
textClose: me.textClose,
|
textClose: me.textClose,
|
||||||
maxCommLength: Asc.c_oAscMaxCellOrCommentLength
|
maxCommLength: Asc.c_oAscMaxCellOrCommentLength
|
||||||
}))
|
})),
|
||||||
|
emptyText: me.txtEmpty
|
||||||
});
|
});
|
||||||
|
|
||||||
var addtooltip = function (dataview, view, record) {
|
var addtooltip = function (dataview, view, record) {
|
||||||
|
@ -449,6 +465,11 @@ define([
|
||||||
btns.each(function(idx, item){
|
btns.each(function(idx, item){
|
||||||
arr.push($(item).data('bs.tooltip').tip());
|
arr.push($(item).data('bs.tooltip').tip());
|
||||||
});
|
});
|
||||||
|
btns = $(view.el).find('.i-comment-resolved');
|
||||||
|
btns.tooltip({title: me.textViewResolved, placement: 'cursor'});
|
||||||
|
btns.each(function(idx, item){
|
||||||
|
arr.push($(item).data('bs.tooltip').tip());
|
||||||
|
});
|
||||||
view.tipsArray = arr;
|
view.tipsArray = arr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -786,7 +807,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
pickEMail: function (commentId, message) {
|
pickEMail: function (commentId, message) {
|
||||||
var arr = Common.Utils.String.htmlEncode(message).match(/\B[@+][A-Z0-9._%+-]+@[A-Z0-9._]+\.[A-Z]+\b/gi);
|
var arr = Common.Utils.String.htmlEncode(message).match(/\B[@+][A-Z0-9._%+-]+@[A-Z0-9._-]+\.[A-Z]+\b/gi);
|
||||||
arr = _.map(arr, function(str){
|
arr = _.map(arr, function(str){
|
||||||
return str.slice(1, str.length);
|
return str.slice(1, str.length);
|
||||||
});
|
});
|
||||||
|
@ -807,6 +828,10 @@ define([
|
||||||
state && this.fireEvent('comment:sort', [item.value]);
|
state && this.fireEvent('comment:sort', [item.value]);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onFilterGroupsClick: function(menu, item, state) {
|
||||||
|
state && this.fireEvent('comment:filtergroups', [item.value]);
|
||||||
|
},
|
||||||
|
|
||||||
onClickClosePanel: function() {
|
onClickClosePanel: function() {
|
||||||
Common.NotificationCenter.trigger('leftmenu:change', 'hide');
|
Common.NotificationCenter.trigger('leftmenu:change', 'hide');
|
||||||
},
|
},
|
||||||
|
@ -833,6 +858,10 @@ define([
|
||||||
mniAuthorDesc: 'Author Z to A',
|
mniAuthorDesc: 'Author Z to A',
|
||||||
mniDateDesc: 'Newest',
|
mniDateDesc: 'Newest',
|
||||||
mniDateAsc: 'Oldest',
|
mniDateAsc: 'Oldest',
|
||||||
textClosePanel: 'Close comments'
|
textClosePanel: 'Close comments',
|
||||||
|
textViewResolved: 'You have not permission for reopen comment',
|
||||||
|
mniFilterGroups: 'Filter by Group',
|
||||||
|
textAll: 'All',
|
||||||
|
txtEmpty: 'There are no comments in the document.'
|
||||||
}, Common.Views.Comments || {}))
|
}, Common.Views.Comments || {}))
|
||||||
});
|
});
|
|
@ -95,7 +95,7 @@ define([
|
||||||
labelText: this.textDontShow
|
labelText: this.textDontShow
|
||||||
});
|
});
|
||||||
|
|
||||||
this.getChild().find('.btn').on('click', _.bind(this.onBtnClick, this));
|
this.getChild().find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
|
||||||
this.autoSize();
|
this.autoSize();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ define([
|
||||||
me.inputLabel.setValue(this.options.value || '' );
|
me.inputLabel.setValue(this.options.value || '' );
|
||||||
|
|
||||||
var $window = this.getChild();
|
var $window = this.getChild();
|
||||||
$window.find('.btn').on('click', _.bind(this.onBtnClick, this));
|
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
|
||||||
},
|
},
|
||||||
|
|
||||||
show: function() {
|
show: function() {
|
||||||
|
|
|
@ -82,7 +82,7 @@ define([
|
||||||
'<div class="btn-slot" id="slot-hbtn-print"></div>' +
|
'<div class="btn-slot" id="slot-hbtn-print"></div>' +
|
||||||
'<div class="btn-slot" id="slot-hbtn-download"></div>' +
|
'<div class="btn-slot" id="slot-hbtn-download"></div>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'<div class="hedset">' +
|
'<div class="hedset" data-layout-name="header-users">' +
|
||||||
// '<span class="btn-slot text" id="slot-btn-users"></span>' +
|
// '<span class="btn-slot text" id="slot-btn-users"></span>' +
|
||||||
'<section id="tlb-box-users" class="box-cousers dropdown"">' +
|
'<section id="tlb-box-users" class="box-cousers dropdown"">' +
|
||||||
'<div class="btn-users" data-hint="0" data-hint-direction="bottom" data-hint-offset="big">' +
|
'<div class="btn-users" data-hint="0" data-hint-direction="bottom" data-hint-offset="big">' +
|
||||||
|
@ -104,9 +104,11 @@ define([
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'<div class="hedset">' +
|
'<div class="hedset">' +
|
||||||
'<div class="btn-slot" id="slot-btn-user-name"></div>' +
|
'<div class="btn-slot" id="slot-btn-user-name"></div>' +
|
||||||
'<div class="btn-current-user btn-header hidden">' +
|
'<div class="btn-slot">' +
|
||||||
'<i class="icon toolbar__icon icon--inverse btn-user"></i>' +
|
'<div class="btn-current-user btn-header hidden">' +
|
||||||
'</div>' +
|
'<i class="icon toolbar__icon icon--inverse btn-user"></i>' +
|
||||||
|
'</div>' +
|
||||||
|
'</div>'
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'</section>' +
|
'</section>' +
|
||||||
'</section>';
|
'</section>';
|
||||||
|
@ -118,7 +120,7 @@ define([
|
||||||
var templateTitleBox = '<section id="box-document-title">' +
|
var templateTitleBox = '<section id="box-document-title">' +
|
||||||
'<div class="extra"></div>' +
|
'<div class="extra"></div>' +
|
||||||
'<div class="hedset">' +
|
'<div class="hedset">' +
|
||||||
'<div class="btn-slot" id="slot-btn-dt-save"></div>' +
|
'<div class="btn-slot" id="slot-btn-dt-save" data-layout-name="header-save"></div>' +
|
||||||
'<div class="btn-slot" id="slot-btn-dt-print"></div>' +
|
'<div class="btn-slot" id="slot-btn-dt-print"></div>' +
|
||||||
'<div class="btn-slot" id="slot-btn-dt-undo"></div>' +
|
'<div class="btn-slot" id="slot-btn-dt-undo"></div>' +
|
||||||
'<div class="btn-slot" id="slot-btn-dt-redo"></div>' +
|
'<div class="btn-slot" id="slot-btn-dt-redo"></div>' +
|
||||||
|
@ -130,11 +132,11 @@ define([
|
||||||
'</section>';
|
'</section>';
|
||||||
|
|
||||||
function onResetUsers(collection, opts) {
|
function onResetUsers(collection, opts) {
|
||||||
var usercount = collection.getEditingCount();
|
var usercount = collection.getVisibleEditingCount();
|
||||||
if ( $userList ) {
|
if ( $userList ) {
|
||||||
if ( usercount > 1 || usercount > 0 && appConfig && !appConfig.isEdit && !appConfig.isRestrictedEdit) {
|
if ( usercount > 1 || usercount > 0 && appConfig && !appConfig.isEdit && !appConfig.isRestrictedEdit) {
|
||||||
$userList.html(templateUserList({
|
$userList.html(templateUserList({
|
||||||
users: collection.chain().filter(function(item){return item.get('online') && !item.get('view')}).groupBy(function(item) {return item.get('idOriginal');}).value(),
|
users: collection.chain().filter(function(item){return item.get('online') && !item.get('view') && !item.get('hidden')}).groupBy(function(item) {return item.get('idOriginal');}).value(),
|
||||||
usertpl: _.template(templateUserItem),
|
usertpl: _.template(templateUserItem),
|
||||||
fnEncode: function(username) {
|
fnEncode: function(username) {
|
||||||
return Common.Utils.String.htmlEncode(AscCommon.UserInfoParser.getParsedName(username));
|
return Common.Utils.String.htmlEncode(AscCommon.UserInfoParser.getParsedName(username));
|
||||||
|
@ -153,7 +155,7 @@ define([
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
applyUsers( usercount, collection.getEditingOriginalCount() );
|
applyUsers( usercount, collection.getVisibleEditingOriginalCount() );
|
||||||
};
|
};
|
||||||
|
|
||||||
function onUsersChanged(model) {
|
function onUsersChanged(model) {
|
||||||
|
@ -270,7 +272,7 @@ define([
|
||||||
$panelUsers.find('.cousers-menu')
|
$panelUsers.find('.cousers-menu')
|
||||||
.on('click', function(e) { return false; });
|
.on('click', function(e) { return false; });
|
||||||
|
|
||||||
var editingUsers = storeUsers.getEditingCount();
|
var editingUsers = storeUsers.getVisibleEditingCount();
|
||||||
$btnUsers.tooltip({
|
$btnUsers.tooltip({
|
||||||
title: (editingUsers > 1 || editingUsers>0 && !appConfig.isEdit && !appConfig.isRestrictedEdit) ? me.tipViewUsers : me.tipAccessRights,
|
title: (editingUsers > 1 || editingUsers>0 && !appConfig.isEdit && !appConfig.isRestrictedEdit) ? me.tipViewUsers : me.tipAccessRights,
|
||||||
titleNorm: me.tipAccessRights,
|
titleNorm: me.tipAccessRights,
|
||||||
|
|
|
@ -83,7 +83,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
var $window = this.getChild();
|
var $window = this.getChild();
|
||||||
$window.find('.btn').on('click', _.bind(this.onBtnClick, this));
|
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
|
||||||
},
|
},
|
||||||
|
|
||||||
show: function() {
|
show: function() {
|
||||||
|
|
|
@ -183,6 +183,8 @@ define([
|
||||||
|
|
||||||
_options.tpl = _.template(this.template)(_options);
|
_options.tpl = _.template(this.template)(_options);
|
||||||
|
|
||||||
|
this._previewTdWidth = [];
|
||||||
|
this._previewTdMaxLength = 0;
|
||||||
Common.UI.Window.prototype.initialize.call(this, _options);
|
Common.UI.Window.prototype.initialize.call(this, _options);
|
||||||
},
|
},
|
||||||
render: function () {
|
render: function () {
|
||||||
|
@ -200,10 +202,11 @@ define([
|
||||||
this.previewInner = this.previewScrolled.find('div:first-child');
|
this.previewInner = this.previewScrolled.find('div:first-child');
|
||||||
|
|
||||||
if (this.type == Common.Utils.importTextType.DRM) {
|
if (this.type == Common.Utils.importTextType.DRM) {
|
||||||
this.inputPwd = new Common.UI.InputField({
|
this.inputPwd = new Common.UI.InputFieldBtnPassword({
|
||||||
el: $('#id-password-txt'),
|
el: $('#id-password-txt'),
|
||||||
type: 'password',
|
type: 'password',
|
||||||
validateOnBlur: false,
|
validateOnBlur: false,
|
||||||
|
showPwdOnClick: true,
|
||||||
validation : function(value) {
|
validation : function(value) {
|
||||||
return me.txtIncorrectPwd;
|
return me.txtIncorrectPwd;
|
||||||
}
|
}
|
||||||
|
@ -291,10 +294,12 @@ define([
|
||||||
}
|
}
|
||||||
|
|
||||||
var decimal = this.separatorOptions ? this.separatorOptions.decimal : undefined,
|
var decimal = this.separatorOptions ? this.separatorOptions.decimal : undefined,
|
||||||
thousands = this.separatorOptions ? this.separatorOptions.thousands : undefined;
|
thousands = this.separatorOptions ? this.separatorOptions.thousands : undefined,
|
||||||
|
qualifier = this.separatorOptions ? this.separatorOptions.qualifier : '"';
|
||||||
var options = new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar);
|
var options = new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar);
|
||||||
decimal && options.asc_setNumberDecimalSeparator(decimal);
|
decimal && options.asc_setNumberDecimalSeparator(decimal);
|
||||||
thousands && options.asc_setNumberGroupSeparator(thousands);
|
thousands && options.asc_setNumberGroupSeparator(thousands);
|
||||||
|
qualifier && options.asc_setTextQualifier(qualifier);
|
||||||
this.handler.call(this, state, {
|
this.handler.call(this, state, {
|
||||||
textOptions: options,
|
textOptions: options,
|
||||||
range: this.txtDestRange ? this.txtDestRange.getValue() : '',
|
range: this.txtDestRange ? this.txtDestRange.getValue() : '',
|
||||||
|
@ -414,36 +419,32 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
updatePreview: function() {
|
updatePreview: function() {
|
||||||
|
this._previewTdWidth = [];
|
||||||
|
this._previewTdMaxLength = 0;
|
||||||
|
|
||||||
var encoding = (this.cmbEncoding && !this.cmbEncoding.isDisabled()) ? this.cmbEncoding.getValue() :
|
var encoding = (this.cmbEncoding && !this.cmbEncoding.isDisabled()) ? this.cmbEncoding.getValue() :
|
||||||
((this.settings && this.settings.asc_getCodePage()) ? this.settings.asc_getCodePage() : 0);
|
((this.settings && this.settings.asc_getCodePage()) ? this.settings.asc_getCodePage() : 0);
|
||||||
var delimiter = this.cmbDelimiter ? this.cmbDelimiter.getValue() : null,
|
var delimiter = this.cmbDelimiter ? this.cmbDelimiter.getValue() : null,
|
||||||
delimiterChar = (delimiter == -1) ? this.inputDelimiter.getValue() : null;
|
delimiterChar = (delimiter == -1) ? this.inputDelimiter.getValue() : null;
|
||||||
(delimiter == -1) && (delimiter = null);
|
(delimiter == -1) && (delimiter = null);
|
||||||
|
|
||||||
|
var options = new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar);
|
||||||
|
if (this.separatorOptions) {
|
||||||
|
options.asc_setNumberDecimalSeparator(this.separatorOptions.decimal);
|
||||||
|
options.asc_setNumberGroupSeparator(this.separatorOptions.thousands);
|
||||||
|
options.asc_setTextQualifier(this.separatorOptions.qualifier);
|
||||||
|
}
|
||||||
|
|
||||||
switch (this.type) {
|
switch (this.type) {
|
||||||
case Common.Utils.importTextType.CSV:
|
case Common.Utils.importTextType.CSV:
|
||||||
this.api.asc_decodeBuffer(this.preview, new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar), _.bind(this.previewCallback, this));
|
|
||||||
break;
|
|
||||||
case Common.Utils.importTextType.TXT:
|
case Common.Utils.importTextType.TXT:
|
||||||
this.api.asc_decodeBuffer(this.preview, new Asc.asc_CTextOptions(encoding), _.bind(this.previewCallback, this));
|
case Common.Utils.importTextType.Data:
|
||||||
|
this.api.asc_decodeBuffer(this.preview, options, _.bind(this.previewCallback, this));
|
||||||
break;
|
break;
|
||||||
case Common.Utils.importTextType.Paste:
|
case Common.Utils.importTextType.Paste:
|
||||||
case Common.Utils.importTextType.Columns:
|
case Common.Utils.importTextType.Columns:
|
||||||
var options = new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar);
|
|
||||||
if (this.separatorOptions) {
|
|
||||||
options.asc_setNumberDecimalSeparator(this.separatorOptions.decimal);
|
|
||||||
options.asc_setNumberGroupSeparator(this.separatorOptions.thousands);
|
|
||||||
}
|
|
||||||
this.api.asc_TextImport(options, _.bind(this.previewCallback, this), this.type == Common.Utils.importTextType.Paste);
|
this.api.asc_TextImport(options, _.bind(this.previewCallback, this), this.type == Common.Utils.importTextType.Paste);
|
||||||
break;
|
break;
|
||||||
case Common.Utils.importTextType.Data:
|
|
||||||
var options = new Asc.asc_CTextOptions(encoding, delimiter, delimiterChar);
|
|
||||||
if (this.separatorOptions) {
|
|
||||||
options.asc_setNumberDecimalSeparator(this.separatorOptions.decimal);
|
|
||||||
options.asc_setNumberGroupSeparator(this.separatorOptions.thousands);
|
|
||||||
}
|
|
||||||
this.api.asc_decodeBuffer(this.preview, options, _.bind(this.previewCallback, this));
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -488,17 +489,28 @@ define([
|
||||||
if (this.type == Common.Utils.importTextType.CSV || this.type == Common.Utils.importTextType.Paste || this.type == Common.Utils.importTextType.Columns || this.type == Common.Utils.importTextType.Data) {
|
if (this.type == Common.Utils.importTextType.CSV || this.type == Common.Utils.importTextType.Paste || this.type == Common.Utils.importTextType.Columns || this.type == Common.Utils.importTextType.Data) {
|
||||||
var maxlength = 0;
|
var maxlength = 0;
|
||||||
for (var i=0; i<data.length; i++) {
|
for (var i=0; i<data.length; i++) {
|
||||||
if (data[i].length>maxlength)
|
var str = data[i] || '';
|
||||||
maxlength = data[i].length;
|
if (str.length>maxlength)
|
||||||
|
maxlength = str.length;
|
||||||
}
|
}
|
||||||
|
this._previewTdMaxLength = Math.max(this._previewTdMaxLength, maxlength);
|
||||||
var tpl = '<table>';
|
var tpl = '<table>';
|
||||||
for (var i=0; i<data.length; i++) {
|
for (var i=0; i<data.length; i++) {
|
||||||
|
var str = data[i] || '';
|
||||||
tpl += '<tr style="vertical-align: top;">';
|
tpl += '<tr style="vertical-align: top;">';
|
||||||
for (var j=0; j<data[i].length; j++) {
|
for (var j=0; j<str.length; j++) {
|
||||||
tpl += '<td>' + Common.Utils.String.htmlEncode(data[i][j]) + '</td>';
|
var style = '';
|
||||||
|
if (i==0 && this._previewTdWidth[j]) { // set td style only for first tr
|
||||||
|
style = 'style="min-width:' + this._previewTdWidth[j] + 'px;"';
|
||||||
|
}
|
||||||
|
tpl += '<td '+ style +'>' + Common.Utils.String.htmlEncode(str[j]) + '</td>';
|
||||||
}
|
}
|
||||||
for (j=data[i].length; j<maxlength; j++) {
|
for (j=str.length; j<this._previewTdMaxLength; j++) {
|
||||||
tpl += '<td></td>';
|
var style = '';
|
||||||
|
if (i==0 && this._previewTdWidth[j]) { // set td style only for first tr
|
||||||
|
style = 'style="min-width:' + this._previewTdWidth[j] + 'px;"';
|
||||||
|
}
|
||||||
|
tpl += '<td '+ style +'></td>';
|
||||||
}
|
}
|
||||||
tpl += '</tr>';
|
tpl += '</tr>';
|
||||||
}
|
}
|
||||||
|
@ -506,12 +518,21 @@ define([
|
||||||
} else {
|
} else {
|
||||||
var tpl = '<table>';
|
var tpl = '<table>';
|
||||||
for (var i=0; i<data.length; i++) {
|
for (var i=0; i<data.length; i++) {
|
||||||
tpl += '<tr style="vertical-align: top;"><td>' + Common.Utils.String.htmlEncode(data[i]) + '</td></tr>';
|
var str = data[i] || '';
|
||||||
|
tpl += '<tr style="vertical-align: top;"><td>' + Common.Utils.String.htmlEncode(str) + '</td></tr>';
|
||||||
}
|
}
|
||||||
tpl += '</table>';
|
tpl += '</table>';
|
||||||
}
|
}
|
||||||
this.previewPanel.html(tpl);
|
this.previewPanel.html(tpl);
|
||||||
|
|
||||||
|
if (data.length>0) {
|
||||||
|
var me = this;
|
||||||
|
(this._previewTdWidth.length===0) && this.previewScrolled.scrollLeft(0);
|
||||||
|
this.previewPanel.find('tr:first td').each(function(index, el){
|
||||||
|
me._previewTdWidth[index] = Math.max(Math.max(Math.ceil($(el).outerWidth()), 30), me._previewTdWidth[index] || 0);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
this.scrollerX = new Common.UI.Scroller({
|
this.scrollerX = new Common.UI.Scroller({
|
||||||
el: this.previewPanel,
|
el: this.previewPanel,
|
||||||
suppressScrollY: true,
|
suppressScrollY: true,
|
||||||
|
@ -522,7 +543,9 @@ define([
|
||||||
|
|
||||||
onCmbDelimiterSelect: function(combo, record){
|
onCmbDelimiterSelect: function(combo, record){
|
||||||
this.inputDelimiter.setVisible(record.value == -1);
|
this.inputDelimiter.setVisible(record.value == -1);
|
||||||
(record.value == -1) && this.inputDelimiter.cmpEl.find('input').focus();
|
var me = this;
|
||||||
|
if (record.value == -1)
|
||||||
|
setTimeout(function(){me.inputDelimiter.focus();}, 10);
|
||||||
if (this.preview)
|
if (this.preview)
|
||||||
this.updatePreview();
|
this.updatePreview();
|
||||||
},
|
},
|
||||||
|
@ -535,19 +558,23 @@ define([
|
||||||
if (!SSE) return;
|
if (!SSE) return;
|
||||||
|
|
||||||
var me = this,
|
var me = this,
|
||||||
decimal = this.api.asc_getDecimalSeparator(),
|
decimal = this.separatorOptions ? this.separatorOptions.decimal : this.api.asc_getDecimalSeparator(),
|
||||||
thousands = this.api.asc_getGroupSeparator();
|
thousands = this.separatorOptions ? this.separatorOptions.thousands : this.api.asc_getGroupSeparator(),
|
||||||
|
qualifier = this.separatorOptions ? this.separatorOptions.qualifier : (this.settings || (new Asc.asc_CTextOptions())).asc_getTextQualifier();
|
||||||
(new SSE.Views.AdvancedSeparatorDialog({
|
(new SSE.Views.AdvancedSeparatorDialog({
|
||||||
props: {
|
props: {
|
||||||
decimal: decimal,
|
decimal: decimal,
|
||||||
thousands: thousands
|
thousands: thousands,
|
||||||
|
qualifier: qualifier
|
||||||
},
|
},
|
||||||
handler: function(result, value) {
|
handler: function(result, value) {
|
||||||
if (result == 'ok') {
|
if (result == 'ok') {
|
||||||
me.separatorOptions = {
|
me.separatorOptions = {
|
||||||
decimal: (value.decimal.length > 0) ? value.decimal : decimal,
|
decimal: (value.decimal.length > 0) ? value.decimal : decimal,
|
||||||
thousands: (value.thousands.length > 0) ? value.thousands : thousands
|
thousands: (value.thousands.length > 0) ? value.thousands : thousands,
|
||||||
|
qualifier: value.qualifier
|
||||||
};
|
};
|
||||||
|
me.preview && me.updatePreview();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})).show();
|
})).show();
|
||||||
|
|
|
@ -93,14 +93,7 @@ define([
|
||||||
if (this.$window) {
|
if (this.$window) {
|
||||||
var me = this;
|
var me = this;
|
||||||
this.$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
|
this.$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
|
||||||
this.inputPwd = new Common.UI.InputField({
|
|
||||||
el: $('#id-password-txt'),
|
|
||||||
type: 'password',
|
|
||||||
allowBlank : false,
|
|
||||||
style : 'width: 100%;',
|
|
||||||
maxLength: 255,
|
|
||||||
validateOnBlur: false
|
|
||||||
});
|
|
||||||
this.repeatPwd = new Common.UI.InputField({
|
this.repeatPwd = new Common.UI.InputField({
|
||||||
el: $('#id-repeat-txt'),
|
el: $('#id-repeat-txt'),
|
||||||
type: 'password',
|
type: 'password',
|
||||||
|
@ -112,6 +105,15 @@ define([
|
||||||
return me.txtIncorrectPwd;
|
return me.txtIncorrectPwd;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
this.inputPwd = new Common.UI.InputFieldBtnPassword({
|
||||||
|
el: $('#id-password-txt'),
|
||||||
|
type: 'password',
|
||||||
|
allowBlank : false,
|
||||||
|
style : 'width: 100%;',
|
||||||
|
maxLength: 255,
|
||||||
|
validateOnBlur: false,
|
||||||
|
repeatInput: this.repeatPwd
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
185
apps/common/main/lib/view/PluginDlg.js
Normal file
|
@ -0,0 +1,185 @@
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* (c) Copyright Ascensio System SIA 2010-2022
|
||||||
|
*
|
||||||
|
* 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.Radzhabova
|
||||||
|
* Date: 17.05.16
|
||||||
|
* Time: 15:38
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (Common === undefined)
|
||||||
|
var Common = {};
|
||||||
|
|
||||||
|
Common.Views = Common.Views || {};
|
||||||
|
|
||||||
|
define([
|
||||||
|
'common/main/lib/util/utils',
|
||||||
|
'common/main/lib/component/BaseView',
|
||||||
|
'common/main/lib/component/Layout',
|
||||||
|
'common/main/lib/component/Window'
|
||||||
|
], function (template) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
Common.Views.PluginDlg = Common.UI.Window.extend(_.extend({
|
||||||
|
initialize : function(options) {
|
||||||
|
var _options = {};
|
||||||
|
_.extend(_options, {
|
||||||
|
header: true,
|
||||||
|
enableKeyEvents: false
|
||||||
|
}, options);
|
||||||
|
|
||||||
|
var header_footer = (_options.buttons && _.size(_options.buttons)>0) ? 85 : 34;
|
||||||
|
if (!_options.header) header_footer -= 34;
|
||||||
|
this.bordersOffset = 40;
|
||||||
|
_options.width = (Common.Utils.innerWidth()-this.bordersOffset*2-_options.width)<0 ? Common.Utils.innerWidth()-this.bordersOffset*2: _options.width;
|
||||||
|
_options.height += header_footer;
|
||||||
|
_options.height = (Common.Utils.innerHeight()-this.bordersOffset*2-_options.height)<0 ? Common.Utils.innerHeight()-this.bordersOffset*2: _options.height;
|
||||||
|
_options.cls += ' advanced-settings-dlg';
|
||||||
|
|
||||||
|
this.template = [
|
||||||
|
'<div id="id-plugin-container" class="box" style="height:' + (_options.height-header_footer) + 'px;">',
|
||||||
|
'<div id="id-plugin-placeholder" style="width: 100%;height: 100%;"></div>',
|
||||||
|
'</div>',
|
||||||
|
'<% if ((typeof buttons !== "undefined") && _.size(buttons) > 0) { %>',
|
||||||
|
'<div class="separator horizontal"></div>',
|
||||||
|
'<% } %>'
|
||||||
|
].join('');
|
||||||
|
|
||||||
|
_options.tpl = _.template(this.template)(_options);
|
||||||
|
|
||||||
|
this.url = options.url || '';
|
||||||
|
this.frameId = options.frameId || 'plugin_iframe';
|
||||||
|
Common.UI.Window.prototype.initialize.call(this, _options);
|
||||||
|
},
|
||||||
|
|
||||||
|
render: function() {
|
||||||
|
Common.UI.Window.prototype.render.call(this);
|
||||||
|
this.$window.find('> .body').css({height: 'auto', overflow: 'hidden'});
|
||||||
|
|
||||||
|
this.boxEl = this.$window.find('.body > .box');
|
||||||
|
this._headerFooterHeight = (this.options.buttons && _.size(this.options.buttons)>0) ? 85 : 34;
|
||||||
|
if (!this.options.header) this._headerFooterHeight -= 34;
|
||||||
|
this._headerFooterHeight += ((parseInt(this.$window.css('border-top-width')) + parseInt(this.$window.css('border-bottom-width'))));
|
||||||
|
|
||||||
|
var iframe = document.createElement("iframe");
|
||||||
|
iframe.id = this.frameId;
|
||||||
|
iframe.name = 'pluginFrameEditor';
|
||||||
|
iframe.width = '100%';
|
||||||
|
iframe.height = '100%';
|
||||||
|
iframe.align = "top";
|
||||||
|
iframe.frameBorder = 0;
|
||||||
|
iframe.scrolling = "no";
|
||||||
|
iframe.allow = "camera; microphone; display-capture";
|
||||||
|
iframe.onload = _.bind(this._onLoad,this);
|
||||||
|
|
||||||
|
var me = this;
|
||||||
|
setTimeout(function(){
|
||||||
|
if (me.isLoaded) return;
|
||||||
|
me.loadMask = new Common.UI.LoadMask({owner: $('#id-plugin-placeholder')});
|
||||||
|
me.loadMask.setTitle(me.textLoading);
|
||||||
|
me.loadMask.show();
|
||||||
|
if (me.isLoaded) me.loadMask.hide();
|
||||||
|
}, 500);
|
||||||
|
|
||||||
|
iframe.src = this.url;
|
||||||
|
$('#id-plugin-placeholder').append(iframe);
|
||||||
|
|
||||||
|
this.on('resizing', function(args){
|
||||||
|
me.boxEl.css('height', parseInt(me.$window.css('height')) - me._headerFooterHeight);
|
||||||
|
});
|
||||||
|
|
||||||
|
var onMainWindowResize = function(){
|
||||||
|
me.onWindowResize();
|
||||||
|
};
|
||||||
|
$(window).on('resize', onMainWindowResize);
|
||||||
|
this.on('close', function() {
|
||||||
|
$(window).off('resize', onMainWindowResize);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
_onLoad: function() {
|
||||||
|
this.isLoaded = true;
|
||||||
|
if (this.loadMask)
|
||||||
|
this.loadMask.hide();
|
||||||
|
},
|
||||||
|
|
||||||
|
setInnerSize: function(width, height) {
|
||||||
|
var maxHeight = Common.Utils.innerHeight(),
|
||||||
|
maxWidth = Common.Utils.innerWidth(),
|
||||||
|
borders_width = (parseInt(this.$window.css('border-left-width')) + parseInt(this.$window.css('border-right-width'))),
|
||||||
|
bordersOffset = this.bordersOffset*2;
|
||||||
|
if (maxHeight - bordersOffset<height + this._headerFooterHeight)
|
||||||
|
height = maxHeight - bordersOffset - this._headerFooterHeight;
|
||||||
|
if (maxWidth - bordersOffset<width + borders_width)
|
||||||
|
width = maxWidth - bordersOffset - borders_width;
|
||||||
|
|
||||||
|
this.boxEl.css('height', height);
|
||||||
|
|
||||||
|
Common.UI.Window.prototype.setHeight.call(this, height + this._headerFooterHeight);
|
||||||
|
Common.UI.Window.prototype.setWidth.call(this, width + borders_width);
|
||||||
|
|
||||||
|
this.$window.css('left',(maxWidth - width - borders_width) / 2);
|
||||||
|
this.$window.css('top',(maxHeight - height - this._headerFooterHeight) / 2);
|
||||||
|
},
|
||||||
|
|
||||||
|
onWindowResize: function() {
|
||||||
|
var main_width = Common.Utils.innerWidth(),
|
||||||
|
main_height = Common.Utils.innerHeight(),
|
||||||
|
win_width = this.getWidth(),
|
||||||
|
win_height = this.getHeight(),
|
||||||
|
bordersOffset = (this.resizable) ? 0 : this.bordersOffset;
|
||||||
|
if (win_height<main_height-bordersOffset*2+0.1 && win_width<main_width-bordersOffset*2+0.1) {
|
||||||
|
var left = this.getLeft(),
|
||||||
|
top = this.getTop();
|
||||||
|
|
||||||
|
if (top<bordersOffset) this.$window.css('top', bordersOffset);
|
||||||
|
else if (top+win_height>main_height-bordersOffset)
|
||||||
|
this.$window.css('top', main_height-bordersOffset - win_height);
|
||||||
|
if (left<bordersOffset) this.$window.css('left', bordersOffset);
|
||||||
|
else if (left+win_width>main_width-bordersOffset)
|
||||||
|
this.$window.css('left', main_width-bordersOffset-win_width);
|
||||||
|
} else {
|
||||||
|
if (win_height>main_height-bordersOffset*2) {
|
||||||
|
this.setHeight(Math.max(main_height-bordersOffset*2, this.initConfig.minheight));
|
||||||
|
this.boxEl.css('height', Math.max(main_height-bordersOffset*2, this.initConfig.minheight) - this._headerFooterHeight);
|
||||||
|
this.$window.css('top', bordersOffset);
|
||||||
|
}
|
||||||
|
if (win_width>main_width-bordersOffset*2) {
|
||||||
|
this.setWidth(Math.max(main_width-bordersOffset*2, this.initConfig.minwidth));
|
||||||
|
this.$window.css('left', bordersOffset);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
textLoading : 'Loading'
|
||||||
|
}, Common.Views.PluginDlg || {}));
|
||||||
|
});
|
|
@ -429,138 +429,4 @@ define([
|
||||||
groupCaption: 'Plugins'
|
groupCaption: 'Plugins'
|
||||||
|
|
||||||
}, Common.Views.Plugins || {}));
|
}, Common.Views.Plugins || {}));
|
||||||
|
|
||||||
Common.Views.PluginDlg = Common.UI.Window.extend(_.extend({
|
|
||||||
initialize : function(options) {
|
|
||||||
var _options = {};
|
|
||||||
_.extend(_options, {
|
|
||||||
header: true,
|
|
||||||
enableKeyEvents: false
|
|
||||||
}, options);
|
|
||||||
|
|
||||||
var header_footer = (_options.buttons && _.size(_options.buttons)>0) ? 85 : 34;
|
|
||||||
if (!_options.header) header_footer -= 34;
|
|
||||||
this.bordersOffset = 40;
|
|
||||||
_options.width = (Common.Utils.innerWidth()-this.bordersOffset*2-_options.width)<0 ? Common.Utils.innerWidth()-this.bordersOffset*2: _options.width;
|
|
||||||
_options.height += header_footer;
|
|
||||||
_options.height = (Common.Utils.innerHeight()-this.bordersOffset*2-_options.height)<0 ? Common.Utils.innerHeight()-this.bordersOffset*2: _options.height;
|
|
||||||
_options.cls += ' advanced-settings-dlg';
|
|
||||||
|
|
||||||
this.template = [
|
|
||||||
'<div id="id-plugin-container" class="box" style="height:' + (_options.height-header_footer) + 'px;">',
|
|
||||||
'<div id="id-plugin-placeholder" style="width: 100%;height: 100%;"></div>',
|
|
||||||
'</div>',
|
|
||||||
'<% if ((typeof buttons !== "undefined") && _.size(buttons) > 0) { %>',
|
|
||||||
'<div class="separator horizontal"></div>',
|
|
||||||
'<% } %>'
|
|
||||||
].join('');
|
|
||||||
|
|
||||||
_options.tpl = _.template(this.template)(_options);
|
|
||||||
|
|
||||||
this.url = options.url || '';
|
|
||||||
this.frameId = options.frameId || 'plugin_iframe';
|
|
||||||
Common.UI.Window.prototype.initialize.call(this, _options);
|
|
||||||
},
|
|
||||||
|
|
||||||
render: function() {
|
|
||||||
Common.UI.Window.prototype.render.call(this);
|
|
||||||
this.$window.find('> .body').css({height: 'auto', overflow: 'hidden'});
|
|
||||||
|
|
||||||
this.boxEl = this.$window.find('.body > .box');
|
|
||||||
this._headerFooterHeight = (this.options.buttons && _.size(this.options.buttons)>0) ? 85 : 34;
|
|
||||||
if (!this.options.header) this._headerFooterHeight -= 34;
|
|
||||||
this._headerFooterHeight += ((parseInt(this.$window.css('border-top-width')) + parseInt(this.$window.css('border-bottom-width'))));
|
|
||||||
|
|
||||||
var iframe = document.createElement("iframe");
|
|
||||||
iframe.id = this.frameId;
|
|
||||||
iframe.name = 'pluginFrameEditor';
|
|
||||||
iframe.width = '100%';
|
|
||||||
iframe.height = '100%';
|
|
||||||
iframe.align = "top";
|
|
||||||
iframe.frameBorder = 0;
|
|
||||||
iframe.scrolling = "no";
|
|
||||||
iframe.allow = "camera; microphone; display-capture";
|
|
||||||
iframe.onload = _.bind(this._onLoad,this);
|
|
||||||
|
|
||||||
var me = this;
|
|
||||||
setTimeout(function(){
|
|
||||||
if (me.isLoaded) return;
|
|
||||||
me.loadMask = new Common.UI.LoadMask({owner: $('#id-plugin-placeholder')});
|
|
||||||
me.loadMask.setTitle(me.textLoading);
|
|
||||||
me.loadMask.show();
|
|
||||||
if (me.isLoaded) me.loadMask.hide();
|
|
||||||
}, 500);
|
|
||||||
|
|
||||||
iframe.src = this.url;
|
|
||||||
$('#id-plugin-placeholder').append(iframe);
|
|
||||||
|
|
||||||
this.on('resizing', function(args){
|
|
||||||
me.boxEl.css('height', parseInt(me.$window.css('height')) - me._headerFooterHeight);
|
|
||||||
});
|
|
||||||
|
|
||||||
var onMainWindowResize = function(){
|
|
||||||
me.onWindowResize();
|
|
||||||
};
|
|
||||||
$(window).on('resize', onMainWindowResize);
|
|
||||||
this.on('close', function() {
|
|
||||||
$(window).off('resize', onMainWindowResize);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
_onLoad: function() {
|
|
||||||
this.isLoaded = true;
|
|
||||||
if (this.loadMask)
|
|
||||||
this.loadMask.hide();
|
|
||||||
},
|
|
||||||
|
|
||||||
setInnerSize: function(width, height) {
|
|
||||||
var maxHeight = Common.Utils.innerHeight(),
|
|
||||||
maxWidth = Common.Utils.innerWidth(),
|
|
||||||
borders_width = (parseInt(this.$window.css('border-left-width')) + parseInt(this.$window.css('border-right-width'))),
|
|
||||||
bordersOffset = this.bordersOffset*2;
|
|
||||||
if (maxHeight - bordersOffset<height + this._headerFooterHeight)
|
|
||||||
height = maxHeight - bordersOffset - this._headerFooterHeight;
|
|
||||||
if (maxWidth - bordersOffset<width + borders_width)
|
|
||||||
width = maxWidth - bordersOffset - borders_width;
|
|
||||||
|
|
||||||
this.boxEl.css('height', height);
|
|
||||||
|
|
||||||
Common.UI.Window.prototype.setHeight.call(this, height + this._headerFooterHeight);
|
|
||||||
Common.UI.Window.prototype.setWidth.call(this, width + borders_width);
|
|
||||||
|
|
||||||
this.$window.css('left',(maxWidth - width - borders_width) / 2);
|
|
||||||
this.$window.css('top',(maxHeight - height - this._headerFooterHeight) / 2);
|
|
||||||
},
|
|
||||||
|
|
||||||
onWindowResize: function() {
|
|
||||||
var main_width = Common.Utils.innerWidth(),
|
|
||||||
main_height = Common.Utils.innerHeight(),
|
|
||||||
win_width = this.getWidth(),
|
|
||||||
win_height = this.getHeight(),
|
|
||||||
bordersOffset = (this.resizable) ? 0 : this.bordersOffset;
|
|
||||||
if (win_height<main_height-bordersOffset*2+0.1 && win_width<main_width-bordersOffset*2+0.1) {
|
|
||||||
var left = this.getLeft(),
|
|
||||||
top = this.getTop();
|
|
||||||
|
|
||||||
if (top<bordersOffset) this.$window.css('top', bordersOffset);
|
|
||||||
else if (top+win_height>main_height-bordersOffset)
|
|
||||||
this.$window.css('top', main_height-bordersOffset - win_height);
|
|
||||||
if (left<bordersOffset) this.$window.css('left', bordersOffset);
|
|
||||||
else if (left+win_width>main_width-bordersOffset)
|
|
||||||
this.$window.css('left', main_width-bordersOffset-win_width);
|
|
||||||
} else {
|
|
||||||
if (win_height>main_height-bordersOffset*2) {
|
|
||||||
this.setHeight(Math.max(main_height-bordersOffset*2, this.initConfig.minheight));
|
|
||||||
this.boxEl.css('height', Math.max(main_height-bordersOffset*2, this.initConfig.minheight) - this._headerFooterHeight);
|
|
||||||
this.$window.css('top', bordersOffset);
|
|
||||||
}
|
|
||||||
if (win_width>main_width-bordersOffset*2) {
|
|
||||||
this.setWidth(Math.max(main_width-bordersOffset*2, this.initConfig.minwidth));
|
|
||||||
this.$window.css('left', bordersOffset);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
textLoading : 'Loading'
|
|
||||||
}, Common.Views.PluginDlg || {}));
|
|
||||||
});
|
});
|
|
@ -207,7 +207,7 @@ define([
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Common.NotificationCenter.trigger('tab:visible', 'protect', true);
|
Common.NotificationCenter.trigger('tab:visible', 'protect', Common.UI.LayoutManager.isElementVisible('toolbar-protect'));
|
||||||
}
|
}
|
||||||
|
|
||||||
setEvents.call(me);
|
setEvents.call(me);
|
||||||
|
|
|
@ -646,7 +646,7 @@ define([
|
||||||
if (!me.btnHistory && separator_last)
|
if (!me.btnHistory && separator_last)
|
||||||
me.$el.find(separator_last).hide();
|
me.$el.find(separator_last).hide();
|
||||||
|
|
||||||
Common.NotificationCenter.trigger('tab:visible', 'review', config.isEdit || config.canViewReview || config.canCoAuthoring && config.canComments);
|
Common.NotificationCenter.trigger('tab:visible', 'review', (config.isEdit || config.canViewReview || config.canCoAuthoring && config.canComments) && Common.UI.LayoutManager.isElementVisible('toolbar-collaboration'));
|
||||||
|
|
||||||
setEvents.call(me);
|
setEvents.call(me);
|
||||||
});
|
});
|
||||||
|
@ -736,7 +736,8 @@ define([
|
||||||
enableToggle: true,
|
enableToggle: true,
|
||||||
dataHint: '0',
|
dataHint: '0',
|
||||||
dataHintDirection: 'top',
|
dataHintDirection: 'top',
|
||||||
dataHintOffset: 'small'
|
dataHintOffset: 'small',
|
||||||
|
visible: Common.UI.FeaturesManager.canChange('spellcheck')
|
||||||
});
|
});
|
||||||
this.btnsSpelling.push(button);
|
this.btnsSpelling.push(button);
|
||||||
|
|
||||||
|
@ -786,7 +787,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
turnSpelling: function (state) {
|
turnSpelling: function (state) {
|
||||||
this.btnsSpelling.forEach(function(button) {
|
this.btnsSpelling && this.btnsSpelling.forEach(function(button) {
|
||||||
if ( button && button.pressed != state ) {
|
if ( button && button.pressed != state ) {
|
||||||
button.toggle(state, true);
|
button.toggle(state, true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -185,11 +185,12 @@ define([
|
||||||
|
|
||||||
function updateTextBoxHeight() {
|
function updateTextBoxHeight() {
|
||||||
scrollPos = parentView.scroller.getScrollTop();
|
scrollPos = parentView.scroller.getScrollTop();
|
||||||
|
|
||||||
if (domTextBox.scrollHeight > domTextBox.clientHeight) {
|
if (domTextBox.scrollHeight > domTextBox.clientHeight) {
|
||||||
textBox.css({height: (domTextBox.scrollHeight + lineHeight) + 'px'});
|
if (domTextBox.clientHeight + 2 < parseInt($(domTextBox).css('max-height'))) { // 2 = border of textarea
|
||||||
|
textBox.css({height: (domTextBox.scrollHeight + lineHeight) + 'px'});
|
||||||
|
|
||||||
parentView.calculateSizeOfContent();
|
parentView.calculateSizeOfContent();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
oldHeight = domTextBox.clientHeight;
|
oldHeight = domTextBox.clientHeight;
|
||||||
if (oldHeight >= minHeight) {
|
if (oldHeight >= minHeight) {
|
||||||
|
@ -268,6 +269,11 @@ define([
|
||||||
btns.each(function (idx, item) {
|
btns.each(function (idx, item) {
|
||||||
arr.push($(item).data('bs.tooltip').tip());
|
arr.push($(item).data('bs.tooltip').tip());
|
||||||
});
|
});
|
||||||
|
btns = $(view.el).find('.i-comment-resolved');
|
||||||
|
btns.tooltip({title: me.textViewResolved, placement: 'cursor'});
|
||||||
|
btns.each(function (idx, item) {
|
||||||
|
arr.push($(item).data('bs.tooltip').tip());
|
||||||
|
});
|
||||||
btns = $(view.el).find('.btn-edit');
|
btns = $(view.el).find('.btn-edit');
|
||||||
btns.tooltip({title: me.txtEditTip, placement: 'cursor'});
|
btns.tooltip({title: me.txtEditTip, placement: 'cursor'});
|
||||||
btns.each(function (idx, item) {
|
btns.each(function (idx, item) {
|
||||||
|
@ -1286,6 +1292,7 @@ define([
|
||||||
textFollowMove : 'Follow Move',
|
textFollowMove : 'Follow Move',
|
||||||
textMention : '+mention will provide access to the document and send an email',
|
textMention : '+mention will provide access to the document and send an email',
|
||||||
textMentionNotify : '+mention will notify the user via email',
|
textMentionNotify : '+mention will notify the user via email',
|
||||||
|
textViewResolved : 'You have not permission for reopen comment',
|
||||||
txtAccept: 'Accept',
|
txtAccept: 'Accept',
|
||||||
txtReject: 'Reject',
|
txtReject: 'Reject',
|
||||||
txtEditTip: 'Edit',
|
txtEditTip: 'Edit',
|
||||||
|
|
|
@ -87,10 +87,10 @@
|
||||||
'<div class="box">',
|
'<div class="box">',
|
||||||
'<div class="input-row">',
|
'<div class="input-row">',
|
||||||
'<span class="btn-placeholder" id="search-placeholder-btn-options"></span>',
|
'<span class="btn-placeholder" id="search-placeholder-btn-options"></span>',
|
||||||
'<input type="text" id="sd-text-search" class="input-field form-control" maxlength="255" placeholder="'+this.textSearchStart+'">',
|
'<input type="text" id="sd-text-search" class="input-field form-control" maxlength="255" placeholder="'+this.textSearchStart+'" autocomplete="off">',
|
||||||
'</div>',
|
'</div>',
|
||||||
'<div class="input-row">',
|
'<div class="input-row">',
|
||||||
'<input type="text" id="sd-text-replace" class="input-field form-control" maxlength="255" placeholder="'+this.textReplaceDef+'">',
|
'<input type="text" id="sd-text-replace" class="input-field form-control" maxlength="255" placeholder="'+this.textReplaceDef+'" autocomplete="off">',
|
||||||
'</div>',
|
'</div>',
|
||||||
'<div class="input-row">',
|
'<div class="input-row">',
|
||||||
'<label class="link" id="search-label-replace" result="replaceshow">'+this.txtBtnReplace+'</label>',
|
'<label class="link" id="search-label-replace" result="replaceshow">'+this.txtBtnReplace+'</label>',
|
||||||
|
@ -171,7 +171,7 @@
|
||||||
this.txtSearch.on('keydown', null, 'search', _.bind(this.onKeyPress, this));
|
this.txtSearch.on('keydown', null, 'search', _.bind(this.onKeyPress, this));
|
||||||
this.txtReplace.on('keydown', null, 'replace', _.bind(this.onKeyPress, this));
|
this.txtReplace.on('keydown', null, 'replace', _.bind(this.onKeyPress, this));
|
||||||
|
|
||||||
this.on('animate:before', _.bind(this.focus, this));
|
this.on('animate:before', _.bind(this.onAnimateBefore, this));
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
@ -191,14 +191,18 @@
|
||||||
this.focus();
|
this.focus();
|
||||||
},
|
},
|
||||||
|
|
||||||
focus: function() {
|
focus: function(type) {
|
||||||
var me = this;
|
var field = (type==='replace') ? this.txtReplace : this.txtSearch;
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
me.txtSearch.focus();
|
field.focus();
|
||||||
me.txtSearch.select();
|
field.select();
|
||||||
}, 10);
|
}, 10);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onAnimateBefore: function() {
|
||||||
|
this.focus();
|
||||||
|
},
|
||||||
|
|
||||||
onKeyPress: function(event) {
|
onKeyPress: function(event) {
|
||||||
if (!this.isLocked()) {
|
if (!this.isLocked()) {
|
||||||
if (event.keyCode == Common.UI.Keys.RETURN) {
|
if (event.keyCode == Common.UI.Keys.RETURN) {
|
||||||
|
|
|
@ -91,7 +91,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
var $window = this.getChild();
|
var $window = this.getChild();
|
||||||
$window.find('.btn').on('click', _.bind(this.onBtnClick, this));
|
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
|
||||||
},
|
},
|
||||||
|
|
||||||
show: function() {
|
show: function() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
||||||
<symbol id="svg-format-csv">
|
<symbol id="svg-format-csv">
|
||||||
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#646464"/>
|
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#646464"/>
|
||||||
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||||
|
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 4 KiB |
18
apps/common/main/resources/img/doc-formats/djvu.svg
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
||||||
|
<symbol id="svg-format-djvu">
|
||||||
|
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#BC8C18"/>
|
||||||
|
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||||
|
<path d="M44.5845 109.635C44.5845 111.045 44.1821 112.125 43.3774 112.875C42.5767 113.625 41.4185 114 39.9028 114H37.4771V105.434H40.1665C41.5649 105.434 42.6509 105.803 43.4243 106.541C44.1978 107.279 44.5845 108.311 44.5845 109.635ZM42.6978 109.682C42.6978 107.842 41.8853 106.922 40.2603 106.922H39.2935V112.5H40.0728C41.8228 112.5 42.6978 111.561 42.6978 109.682ZM45.6919 116.883C45.2349 116.883 44.8423 116.834 44.5142 116.736V115.33C44.7876 115.404 45.0669 115.441 45.3521 115.441C45.6528 115.441 45.8716 115.357 46.0083 115.189C46.1489 115.021 46.2192 114.773 46.2192 114.445V107.449H48.0063V114.709C48.0063 115.404 47.8052 115.939 47.4028 116.314C47.0005 116.693 46.4302 116.883 45.6919 116.883ZM46.1431 105.756C46.1431 105.174 46.4673 104.883 47.1157 104.883C47.7642 104.883 48.0884 105.174 48.0884 105.756C48.0884 106.033 48.0063 106.25 47.8423 106.406C47.6821 106.559 47.4399 106.635 47.1157 106.635C46.4673 106.635 46.1431 106.342 46.1431 105.756ZM54.9146 105.434H56.7485L53.8364 114H51.856L48.9497 105.434H50.7837L52.395 110.531C52.4849 110.832 52.5767 111.184 52.6704 111.586C52.7681 111.984 52.8286 112.262 52.8521 112.418C52.895 112.059 53.0415 111.43 53.2915 110.531L54.9146 105.434ZM62.3325 114L62.0923 113.162H61.9985C61.8071 113.467 61.5356 113.703 61.1841 113.871C60.8325 114.035 60.4321 114.117 59.9829 114.117C59.2134 114.117 58.6333 113.912 58.2427 113.502C57.8521 113.088 57.6567 112.494 57.6567 111.721V107.449H59.4438V111.275C59.4438 111.748 59.5278 112.104 59.6958 112.342C59.8638 112.576 60.1313 112.693 60.4985 112.693C60.9985 112.693 61.3599 112.527 61.5825 112.195C61.8052 111.859 61.9165 111.305 61.9165 110.531V107.449H63.7036V114H62.3325Z" fill="white"/>
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M27 58V52V50H29H35H44H50H52V52V58H50V52H44V74H49V76H44H35H30V74H35V52H29V58H27Z" fill="white"/>
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M27 58V52V50H29H35H44H50H52V52V58H50V52H44V74H49V76H44H35H30V74H35V52H29V58H27Z" fill="white"/>
|
||||||
|
<rect x="55" y="50" width="19" height="2" fill="white"/>
|
||||||
|
<rect x="55" y="50" width="19" height="2" fill="white"/>
|
||||||
|
<rect x="55" y="58" width="19" height="2" fill="white"/>
|
||||||
|
<rect x="55" y="58" width="19" height="2" fill="white"/>
|
||||||
|
<rect x="55" y="66" width="19" height="2" fill="white"/>
|
||||||
|
<rect x="55" y="66" width="19" height="2" fill="white"/>
|
||||||
|
<rect x="55" y="74" width="19" height="2" fill="white"/>
|
||||||
|
<rect x="55" y="74" width="19" height="2" fill="white"/>
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M80 43.4348H21V82.5653H80V43.4348ZM19 41.4348V84.5653H82V41.4348H19Z" fill="white"/>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 3.2 KiB |
|
@ -1,4 +1,4 @@
|
||||||
<svg width="100" height="127" viewBox="0 0 100 127" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" width="100" height="127" viewBox="0 0 100 127" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<symbol id="svg-format-docm">
|
<symbol id="svg-format-docm">
|
||||||
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#214479"/>
|
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#214479"/>
|
||||||
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||||
|
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.2 KiB |
|
@ -1,4 +1,4 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
||||||
<symbol id="svg-format-docx">
|
<symbol id="svg-format-docx">
|
||||||
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#214479"/>
|
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#214479"/>
|
||||||
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||||
|
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.6 KiB |
|
@ -1,4 +1,4 @@
|
||||||
<svg width="100" height="127" viewBox="0 0 100 127" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" width="100" height="127" viewBox="0 0 100 127" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<symbol id="svg-format-docxf">
|
<symbol id="svg-format-docxf">
|
||||||
<g>
|
<g>
|
||||||
<path id="Vector" d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#27ABA3"/>
|
<path id="Vector" d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#27ABA3"/>
|
||||||
|
|
Before Width: | Height: | Size: 3 KiB After Width: | Height: | Size: 3 KiB |
|
@ -1,4 +1,4 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
||||||
<symbol id="svg-format-dotx">
|
<symbol id="svg-format-dotx">
|
||||||
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#214479"/>
|
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#214479"/>
|
||||||
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||||
|
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.2 KiB |
|
@ -1,4 +1,4 @@
|
||||||
<svg width="100" height="127" viewBox="0 0 100 127" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" width="100" height="127" viewBox="0 0 100 127" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<symbol id="svg-format-epub">
|
<symbol id="svg-format-epub">
|
||||||
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#5892B6"/>
|
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#5892B6"/>
|
||||||
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||||
|
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.8 KiB |
|
@ -1,4 +1,4 @@
|
||||||
<svg width="100" height="127" viewBox="0 0 100 127" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" width="100" height="127" viewBox="0 0 100 127" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<symbol id="svg-format-fb2">
|
<symbol id="svg-format-fb2">
|
||||||
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#B07408"/>
|
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#B07408"/>
|
||||||
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||||
|
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
@ -1,4 +1,4 @@
|
||||||
<svg width="100" height="127" viewBox="0 0 100 127" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" width="100" height="127" viewBox="0 0 100 127" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<symbol id="svg-format-html">
|
<symbol id="svg-format-html">
|
||||||
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#7C9A34"/>
|
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#7C9A34"/>
|
||||||
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||||
|
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.4 KiB |
|
@ -1,4 +1,4 @@
|
||||||
<svg width="100" height="127" viewBox="0 0 100 127" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" width="100" height="127" viewBox="0 0 100 127" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<symbol id="svg-format-jpg">
|
<symbol id="svg-format-jpg">
|
||||||
<g>
|
<g>
|
||||||
<path d="M95 22V118C95 118.796 94.6839 119.559 94.1213 120.121C93.5587 120.684 92.7956 121 92 121H8C7.20435 121 6.44129 120.684 5.87868 120.121C5.31607 119.559 5 118.796 5 118V7C5 6.20435 5.31607 5.44129 5.87868 4.87868C6.44129 4.31607 7.20435 4 8 4H77L95 22Z" fill="#7371D8"/>
|
<path d="M95 22V118C95 118.796 94.6839 119.559 94.1213 120.121C93.5587 120.684 92.7956 121 92 121H8C7.20435 121 6.44129 120.684 5.87868 120.121C5.31607 119.559 5 118.796 5 118V7C5 6.20435 5.31607 5.44129 5.87868 4.87868C6.44129 4.31607 7.20435 4 8 4H77L95 22Z" fill="#7371D8"/>
|
||||||
|
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
@ -1,4 +1,4 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
||||||
<symbol id="svg-format-odp">
|
<symbol id="svg-format-odp">
|
||||||
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#DD9426"/>
|
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#DD9426"/>
|
||||||
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||||
|
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.9 KiB |
|
@ -1,4 +1,4 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
||||||
<symbol id="svg-format-ods">
|
<symbol id="svg-format-ods">
|
||||||
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#237453"/>
|
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#237453"/>
|
||||||
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||||
|
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
|
@ -1,4 +1,4 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
||||||
<symbol id="svg-format-odt">
|
<symbol id="svg-format-odt">
|
||||||
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#3C6D88"/>
|
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#3C6D88"/>
|
||||||
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||||
|
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
@ -1,4 +1,4 @@
|
||||||
<svg width="100" height="127" viewBox="0 0 100 127" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" width="100" height="127" viewBox="0 0 100 127" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<symbol id="svg-format-oform">
|
<symbol id="svg-format-oform">
|
||||||
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#2CA498"/>
|
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#2CA498"/>
|
||||||
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||||
|
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.5 KiB |
|
@ -1,4 +1,4 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
||||||
<symbol id="svg-format-otp">
|
<symbol id="svg-format-otp">
|
||||||
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#DD9426"/>
|
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#DD9426"/>
|
||||||
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||||
|
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.8 KiB |
|
@ -1,4 +1,4 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
||||||
<symbol id="svg-format-ots">
|
<symbol id="svg-format-ots">
|
||||||
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#237453"/>
|
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#237453"/>
|
||||||
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||||
|
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
@ -1,4 +1,4 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
||||||
<symbol id="svg-format-ott">
|
<symbol id="svg-format-ott">
|
||||||
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#3C6D88"/>
|
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#3C6D88"/>
|
||||||
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||||
|
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.4 KiB |
11
apps/common/main/resources/img/doc-formats/oxps.svg
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
||||||
|
<symbol id="svg-format-oxps">
|
||||||
|
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#51968F"/>
|
||||||
|
<circle cx="44.5" cy="62.5" r="2.5" fill="white"/>
|
||||||
|
<circle cx="54.5" cy="62.5" r="2.5" fill="white"/>
|
||||||
|
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||||
|
<path d="M42.894 109.705C42.894 111.123 42.5425 112.213 41.8394 112.975C41.1362 113.736 40.1284 114.117 38.8159 114.117C37.5034 114.117 36.4956 113.736 35.7925 112.975C35.0894 112.213 34.7378 111.119 34.7378 109.693C34.7378 108.268 35.0894 107.18 35.7925 106.43C36.4995 105.676 37.5112 105.299 38.8276 105.299C40.144 105.299 41.1499 105.678 41.8452 106.436C42.5444 107.193 42.894 108.283 42.894 109.705ZM36.6421 109.705C36.6421 110.662 36.8237 111.383 37.187 111.867C37.5503 112.352 38.0933 112.594 38.8159 112.594C40.2651 112.594 40.9897 111.631 40.9897 109.705C40.9897 107.775 40.269 106.811 38.8276 106.811C38.105 106.811 37.5601 107.055 37.1929 107.543C36.8257 108.027 36.6421 108.748 36.6421 109.705ZM51.5952 114H49.521L47.5288 110.76L45.5366 114H43.5913L46.4331 109.582L43.7729 105.434H45.7769L47.6226 108.516L49.4331 105.434H51.3901L48.7007 109.682L51.5952 114ZM54.4897 109.465H55.0874C55.646 109.465 56.064 109.355 56.3413 109.137C56.6187 108.914 56.7573 108.592 56.7573 108.17C56.7573 107.744 56.6401 107.43 56.4058 107.227C56.1753 107.023 55.812 106.922 55.3159 106.922H54.4897V109.465ZM58.5913 108.105C58.5913 109.027 58.3022 109.732 57.7241 110.221C57.1499 110.709 56.3315 110.953 55.269 110.953H54.4897V114H52.6733V105.434H55.4097C56.4487 105.434 57.2378 105.658 57.7769 106.107C58.3198 106.553 58.5913 107.219 58.5913 108.105ZM65.2651 111.621C65.2651 112.395 64.9858 113.004 64.4272 113.449C63.8726 113.895 63.0991 114.117 62.1069 114.117C61.1929 114.117 60.3843 113.945 59.6812 113.602V111.914C60.2593 112.172 60.7476 112.354 61.146 112.459C61.5483 112.564 61.9155 112.617 62.2476 112.617C62.646 112.617 62.9507 112.541 63.1616 112.389C63.3765 112.236 63.4839 112.01 63.4839 111.709C63.4839 111.541 63.437 111.393 63.3433 111.264C63.2495 111.131 63.1108 111.004 62.9272 110.883C62.7476 110.762 62.3784 110.568 61.8198 110.303C61.2964 110.057 60.9038 109.82 60.6421 109.594C60.3804 109.367 60.1714 109.104 60.0151 108.803C59.8589 108.502 59.7808 108.15 59.7808 107.748C59.7808 106.99 60.0366 106.395 60.5483 105.961C61.064 105.527 61.7749 105.311 62.6812 105.311C63.1265 105.311 63.5503 105.363 63.9526 105.469C64.3589 105.574 64.7827 105.723 65.2241 105.914L64.6382 107.326C64.1812 107.139 63.8022 107.008 63.5015 106.934C63.2046 106.859 62.9116 106.822 62.6226 106.822C62.2788 106.822 62.0151 106.902 61.8315 107.062C61.6479 107.223 61.5562 107.432 61.5562 107.689C61.5562 107.85 61.5933 107.99 61.6675 108.111C61.7417 108.229 61.8589 108.344 62.019 108.457C62.1831 108.566 62.5679 108.766 63.1733 109.055C63.9741 109.438 64.5229 109.822 64.8198 110.209C65.1167 110.592 65.2651 111.062 65.2651 111.621Z" fill="white"/>
|
||||||
|
<path d="M62 53V57.8L75.5 62.5L62 67.2V72L80 64.2V60.8L62 53Z" fill="white"/>
|
||||||
|
<path d="M19 64.2L37 72V67.2L23.5 62.5L37 57.8V53L19 60.8V64.2Z" fill="white"/>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 3.4 KiB |
|
@ -1,4 +1,4 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
||||||
<symbol id="svg-format-pdf">
|
<symbol id="svg-format-pdf">
|
||||||
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#BA4C3F"/>
|
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#BA4C3F"/>
|
||||||
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||||
|
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.3 KiB |
|
@ -1,4 +1,4 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
||||||
<symbol id="svg-format-pdfa">
|
<symbol id="svg-format-pdfa">
|
||||||
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#BA4C3F"/>
|
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#BA4C3F"/>
|
||||||
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||||
|
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 4 KiB |
|
@ -1,4 +1,4 @@
|
||||||
<svg width="100" height="127" viewBox="0 0 100 127" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" width="100" height="127" viewBox="0 0 100 127" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<symbol id="svg-format-png">
|
<symbol id="svg-format-png">
|
||||||
<g>
|
<g>
|
||||||
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#D871D6"/>
|
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#D871D6"/>
|
||||||
|
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.3 KiB |
|
@ -1,4 +1,4 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
||||||
<symbol id="svg-format-potx">
|
<symbol id="svg-format-potx">
|
||||||
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#DD682B"/>
|
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#DD682B"/>
|
||||||
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||||
|
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.7 KiB |
19
apps/common/main/resources/img/doc-formats/ppsx.svg
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" width="100" height="127" viewBox="0 0 100 127" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<symbol id="svg-format-ppsx">
|
||||||
|
<g>
|
||||||
|
<path id="Vector" d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#E87616"/>
|
||||||
|
<path id="Vector_2" opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||||
|
<g>
|
||||||
|
<path d="M38.0527 109.465H38.6504C39.209 109.465 39.627 109.355 39.9043 109.137C40.1816 108.914 40.3203 108.592 40.3203 108.17C40.3203 107.744 40.2031 107.43 39.9688 107.227C39.7383 107.023 39.375 106.922 38.8789 106.922H38.0527V109.465ZM42.1543 108.105C42.1543 109.027 41.8652 109.732 41.2871 110.221C40.7129 110.709 39.8945 110.953 38.832 110.953H38.0527V114H36.2363V105.434H38.9727C40.0117 105.434 40.8008 105.658 41.3398 106.107C41.8828 106.553 42.1543 107.219 42.1543 108.105Z" fill="white"/>
|
||||||
|
<path d="M45.5879 109.465H46.1855C46.7441 109.465 47.1621 109.355 47.4395 109.137C47.7168 108.914 47.8555 108.592 47.8555 108.17C47.8555 107.744 47.7383 107.43 47.5039 107.227C47.2734 107.023 46.9102 106.922 46.4141 106.922H45.5879V109.465ZM49.6895 108.105C49.6895 109.027 49.4004 109.732 48.8223 110.221C48.248 110.709 47.4297 110.953 46.3672 110.953H45.5879V114H43.7715V105.434H46.5078C47.5469 105.434 48.3359 105.658 48.875 106.107C49.418 106.553 49.6895 107.219 49.6895 108.105Z" fill="white"/>
|
||||||
|
<path d="M56.3633 111.621C56.3633 112.395 56.084 113.004 55.5254 113.449C54.9707 113.895 54.1973 114.117 53.2051 114.117C52.291 114.117 51.4824 113.945 50.7793 113.602V111.914C51.3574 112.172 51.8457 112.354 52.2441 112.459C52.6465 112.564 53.0137 112.617 53.3457 112.617C53.7441 112.617 54.0488 112.541 54.2598 112.389C54.4746 112.236 54.582 112.01 54.582 111.709C54.582 111.541 54.5352 111.393 54.4414 111.264C54.3477 111.131 54.209 111.004 54.0254 110.883C53.8457 110.762 53.4766 110.568 52.918 110.303C52.3945 110.057 52.002 109.82 51.7402 109.594C51.4785 109.367 51.2695 109.104 51.1133 108.803C50.957 108.502 50.8789 108.15 50.8789 107.748C50.8789 106.99 51.1348 106.395 51.6465 105.961C52.1621 105.527 52.873 105.311 53.7793 105.311C54.2246 105.311 54.6484 105.363 55.0508 105.469C55.457 105.574 55.8809 105.723 56.3223 105.914L55.7363 107.326C55.2793 107.139 54.9004 107.008 54.5996 106.934C54.3027 106.859 54.0098 106.822 53.7207 106.822C53.377 106.822 53.1133 106.902 52.9297 107.062C52.7461 107.223 52.6543 107.432 52.6543 107.689C52.6543 107.85 52.6914 107.99 52.7656 108.111C52.8398 108.229 52.957 108.344 53.1172 108.457C53.2812 108.566 53.666 108.766 54.2715 109.055C55.0723 109.438 55.6211 109.822 55.918 110.209C56.2148 110.592 56.3633 111.062 56.3633 111.621Z" fill="white"/>
|
||||||
|
<path d="M64.8418 114H62.7676L60.7754 110.76L58.7832 114H56.8379L59.6797 109.582L57.0195 105.434H59.0234L60.8691 108.516L62.6797 105.434H64.6367L61.9473 109.682L64.8418 114Z" fill="white"/>
|
||||||
|
</g>
|
||||||
|
<path id="Vector_3" d="M50 69C54.2435 69 58.3131 67.3143 61.3137 64.3137C64.3143 61.3131 66 57.2435 66 53H50V37C45.7565 37 41.6869 38.6857 38.6863 41.6863C35.6857 44.6869 34 48.7565 34 53C34 57.2435 35.6857 61.3131 38.6863 64.3137C41.6869 67.3143 45.7565 69 50 69Z" fill="white"/>
|
||||||
|
<path id="Vector_4" d="M53 34V50H69C69 45.7565 67.3143 41.6869 64.3137 38.6863C61.3131 35.6857 57.2435 34 53 34Z" fill="white"/>
|
||||||
|
<path id="Vector_5" d="M75 89H25V91H75V89Z" fill="white"/>
|
||||||
|
<path id="Vector_6" d="M75 83H25V85H75V83Z" fill="white"/>
|
||||||
|
<path id="Vector_7" d="M75 77H25V79H75V77Z" fill="white"/>
|
||||||
|
</g>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 3.7 KiB |
|
@ -1,4 +1,4 @@
|
||||||
<svg width="100" height="127" viewBox="0 0 100 127" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" width="100" height="127" viewBox="0 0 100 127" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<symbol id="svg-format-pptm">
|
<symbol id="svg-format-pptm">
|
||||||
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#DD682B"/>
|
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#DD682B"/>
|
||||||
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||||
|
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.9 KiB |
|
@ -1,4 +1,4 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
||||||
<symbol id="svg-format-pptx">
|
<symbol id="svg-format-pptx">
|
||||||
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#DD682B"/>
|
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#DD682B"/>
|
||||||
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||||
|
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.3 KiB |
|
@ -1,4 +1,4 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
||||||
<symbol id="svg-format-rtf">
|
<symbol id="svg-format-rtf">
|
||||||
<path d="M95 23V119C95 120.7 93.7 122 92 122H8C6.3 122 5 120.7 5 119V8C5 6.3 6.3 5 8 5H77L95 23Z" fill="#635E9B"/>
|
<path d="M95 23V119C95 120.7 93.7 122 92 122H8C6.3 122 5 120.7 5 119V8C5 6.3 6.3 5 8 5H77L95 23Z" fill="#635E9B"/>
|
||||||
<path opacity="0.2" d="M95 23H80C78.3 23 77 21.7 77 20V5L95 23Z" fill="black"/>
|
<path opacity="0.2" d="M95 23H80C78.3 23 77 21.7 77 20V5L95 23Z" fill="black"/>
|
||||||
|
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.6 KiB |
|
@ -1,4 +1,4 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
||||||
<symbol id="svg-format-txt">
|
<symbol id="svg-format-txt">
|
||||||
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#7C7C7D"/>
|
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#7C7C7D"/>
|
||||||
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||||
|
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
@ -1,4 +1,4 @@
|
||||||
<svg width="100" height="127" viewBox="0 0 100 127" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" width="100" height="127" viewBox="0 0 100 127" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<symbol id="svg-format-xlsm">
|
<symbol id="svg-format-xlsm">
|
||||||
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#1F7244"/>
|
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#1F7244"/>
|
||||||
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||||
|
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 3 KiB |
|
@ -1,4 +1,4 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
||||||
<symbol id="svg-format-xlsx">
|
<symbol id="svg-format-xlsx">
|
||||||
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#1F7244"/>
|
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#1F7244"/>
|
||||||
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||||
|
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.4 KiB |
|
@ -1,4 +1,4 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
||||||
<symbol id="svg-format-xltx">
|
<symbol id="svg-format-xltx">
|
||||||
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#1F7244"/>
|
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#1F7244"/>
|
||||||
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||||
|
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.4 KiB |
11
apps/common/main/resources/img/doc-formats/xps.svg
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 127" version="1.1" width="100" height="127">
|
||||||
|
<symbol id="svg-format-xps">
|
||||||
|
<path d="M95 23V119C95 119.796 94.6839 120.559 94.1213 121.121C93.5587 121.684 92.7956 122 92 122H8C7.20435 122 6.44129 121.684 5.87868 121.121C5.31607 120.559 5 119.796 5 119V8C5 7.20435 5.31607 6.44129 5.87868 5.87868C6.44129 5.31607 7.20435 5 8 5H77L95 23Z" fill="#51968F"/>
|
||||||
|
<circle cx="44.5" cy="62.5" r="2.5" fill="white"/>
|
||||||
|
<circle cx="54.5" cy="62.5" r="2.5" fill="white"/>
|
||||||
|
<path opacity="0.2" d="M95 23H80C79.2044 23 78.4413 22.6839 77.8787 22.1213C77.3161 21.5587 77 20.7956 77 20V5L95 23Z" fill="black"/>
|
||||||
|
<path d="M47.3198 114H45.2456L43.2534 110.76L41.2612 114H39.3159L42.1577 109.582L39.4976 105.434H41.5015L43.3472 108.516L45.1577 105.434H47.1147L44.4253 109.682L47.3198 114ZM50.2144 109.465H50.812C51.3706 109.465 51.7886 109.355 52.0659 109.137C52.3433 108.914 52.4819 108.592 52.4819 108.17C52.4819 107.744 52.3647 107.43 52.1304 107.227C51.8999 107.023 51.5366 106.922 51.0405 106.922H50.2144V109.465ZM54.3159 108.105C54.3159 109.027 54.0269 109.732 53.4487 110.221C52.8745 110.709 52.0562 110.953 50.9937 110.953H50.2144V114H48.3979V105.434H51.1343C52.1733 105.434 52.9624 105.658 53.5015 106.107C54.0444 106.553 54.3159 107.219 54.3159 108.105ZM60.9897 111.621C60.9897 112.395 60.7104 113.004 60.1519 113.449C59.5972 113.895 58.8237 114.117 57.8315 114.117C56.9175 114.117 56.1089 113.945 55.4058 113.602V111.914C55.9839 112.172 56.4722 112.354 56.8706 112.459C57.2729 112.564 57.6401 112.617 57.9722 112.617C58.3706 112.617 58.6753 112.541 58.8862 112.389C59.1011 112.236 59.2085 112.01 59.2085 111.709C59.2085 111.541 59.1616 111.393 59.0679 111.264C58.9741 111.131 58.8354 111.004 58.6519 110.883C58.4722 110.762 58.103 110.568 57.5444 110.303C57.021 110.057 56.6284 109.82 56.3667 109.594C56.105 109.367 55.896 109.104 55.7397 108.803C55.5835 108.502 55.5054 108.15 55.5054 107.748C55.5054 106.99 55.7612 106.395 56.2729 105.961C56.7886 105.527 57.4995 105.311 58.4058 105.311C58.8511 105.311 59.2749 105.363 59.6772 105.469C60.0835 105.574 60.5073 105.723 60.9487 105.914L60.3628 107.326C59.9058 107.139 59.5269 107.008 59.2261 106.934C58.9292 106.859 58.6362 106.822 58.3472 106.822C58.0034 106.822 57.7397 106.902 57.5562 107.062C57.3726 107.223 57.2808 107.432 57.2808 107.689C57.2808 107.85 57.3179 107.99 57.3921 108.111C57.4663 108.229 57.5835 108.344 57.7437 108.457C57.9077 108.566 58.2925 108.766 58.8979 109.055C59.6987 109.438 60.2476 109.822 60.5444 110.209C60.8413 110.592 60.9897 111.062 60.9897 111.621Z" fill="white"/>
|
||||||
|
<path d="M62 53V57.8L75.5 62.5L62 67.2V72L80 64.2V60.8L62 53Z" fill="white"/>
|
||||||
|
<path d="M19 64.2L37 72V67.2L23.5 62.5L37 57.8V53L19 60.8V64.2Z" fill="white"/>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 108 B |
BIN
apps/common/main/resources/img/toolbar/1.25x/big/day.png
Normal file
After Width: | Height: | Size: 457 B |
BIN
apps/common/main/resources/img/toolbar/1.25x/big/night.png
Normal file
After Width: | Height: | Size: 481 B |
Before Width: | Height: | Size: 428 B After Width: | Height: | Size: 428 B |
BIN
apps/common/main/resources/img/toolbar/1.25x/hide-password.png
Normal file
After Width: | Height: | Size: 349 B |
After Width: | Height: | Size: 119 B |
BIN
apps/common/main/resources/img/toolbar/1.5x/big/day.png
Normal file
After Width: | Height: | Size: 533 B |
BIN
apps/common/main/resources/img/toolbar/1.5x/big/night.png
Normal file
After Width: | Height: | Size: 548 B |
Before Width: | Height: | Size: 498 B After Width: | Height: | Size: 498 B |
BIN
apps/common/main/resources/img/toolbar/1.5x/hide-password.png
Normal file
After Width: | Height: | Size: 400 B |
After Width: | Height: | Size: 147 B |
BIN
apps/common/main/resources/img/toolbar/1.75x/big/day.png
Normal file
After Width: | Height: | Size: 612 B |
BIN
apps/common/main/resources/img/toolbar/1.75x/big/night.png
Normal file
After Width: | Height: | Size: 626 B |
Before Width: | Height: | Size: 576 B After Width: | Height: | Size: 576 B |
BIN
apps/common/main/resources/img/toolbar/1.75x/hide-password.png
Normal file
After Width: | Height: | Size: 478 B |
After Width: | Height: | Size: 105 B |
BIN
apps/common/main/resources/img/toolbar/1x/big/day.png
Normal file
After Width: | Height: | Size: 331 B |
BIN
apps/common/main/resources/img/toolbar/1x/big/night.png
Normal file
After Width: | Height: | Size: 387 B |