Merge pull request #2034 from ONLYOFFICE/feature/equation-toolbar
Feature/equation toolbar
This commit is contained in:
commit
19e54b2dde
41
apps/common/main/resources/img/toolbar/equationicons.svg
Normal file
41
apps/common/main/resources/img/toolbar/equationicons.svg
Normal file
|
@ -0,0 +1,41 @@
|
|||
<svg aria-hidden="true" style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<symbol id="svg-icon-accent" viewBox="0 0 20 20">
|
||||
<path d="M8.459 15.146c-.435 0-.816-.105-1.143-.315-.327-.21-.58-.52-.761-.93-.181-.41-.271-.91-.271-1.501 0-.59.06-1.16.183-1.707A7.107 7.107 0 0 1 7 9.17c.23-.469.506-.879.828-1.23a3.676 3.676 0 0 1 1.099-.82 2.98 2.98 0 0 1 1.31-.294c.362 0 .674.069.938.205.269.137.49.318.667.542.18.22.322.454.424.703h.074l.468-1.303h.93L12.04 15h-.974l.22-1.553h-.059c-.22.293-.47.57-.754.828a3.81 3.81 0 0 1-.93.63 2.48 2.48 0 0 1-1.084.242zm.395-1.01c.376 0 .747-.137 1.114-.41a4.08 4.08 0 0 0 .996-1.121 5.731 5.731 0 0 0 .68-1.597 5.74 5.74 0 0 0 .198-1.472c0-.503-.134-.908-.402-1.216-.264-.312-.625-.468-1.084-.468-.327 0-.635.083-.923.249a2.69 2.69 0 0 0-.784.68 4.41 4.41 0 0 0-.593 1.011c-.166.381-.295.796-.388 1.246-.088.449-.132.91-.132 1.384 0 .561.115.989.344 1.282.23.288.554.432.974.432zm3.472-8.628a.606.606 0 0 1-.425-.154c-.112-.103-.168-.249-.168-.44 0-.214.063-.405.19-.57.132-.172.322-.257.572-.257.19 0 .332.051.424.154.093.102.14.239.14.41 0 .264-.076.474-.228.63a.7.7 0 0 1-.505.227zm-2.68 0a.626.626 0 0 1-.44-.154c-.108-.103-.161-.249-.161-.44 0-.214.063-.405.19-.57.127-.172.313-.257.557-.257a.63.63 0 0 1 .322.073c.083.044.144.11.183.198.044.083.066.18.066.293 0 .264-.073.474-.22.63a.677.677 0 0 1-.498.227z"></path>
|
||||
</symbol>
|
||||
<symbol id="svg-icon-bracket" viewBox="0 0 20 20">
|
||||
<path d="m5.847 14 3.494-4.13-1.743-3.897h1.23l1.29 3.032 2.445-3.032h1.414L10.623 9.92l1.86 4.08h-1.245l-1.406-3.193L7.26 14H5.847zM14 18v-1.159c.382-.011.708-.076.977-.193.268-.112.473-.288.612-.53.145-.234.217-.542.217-.923V12.65c0-.588.137-1.058.411-1.41.28-.354.7-.583 1.264-.69v-.1c-.574-.112-.998-.345-1.272-.697-.268-.353-.403-.82-.403-1.403V5.797c0-.387-.07-.7-.21-.94a1.234 1.234 0 0 0-.611-.53c-.27-.118-.597-.18-.985-.185V3c.64.006 1.191.106 1.651.302.46.196.811.493 1.054.89.248.393.373.89.373 1.496V8.24c0 .403.072.728.217.974.144.24.359.417.643.53.29.111.643.167 1.062.167v1.16c-.419 0-.773.055-1.062.167a1.264 1.264 0 0 0-.643.53c-.145.24-.218.556-.218.948v2.604c0 .593-.129 1.089-.387 1.486a2.347 2.347 0 0 1-1.078.89c-.46.202-.997.303-1.612.303z"></path>
|
||||
<path d="M6 18c-.64-.006-1.194-.11-1.659-.31a2.256 2.256 0 0 1-1.062-.891c-.243-.398-.364-.896-.364-1.495v-2.57c0-.398-.073-.717-.217-.957a1.252 1.252 0 0 0-.644-.538c-.284-.112-.635-.168-1.054-.168V9.912c.419-.006.77-.062 1.054-.168.284-.112.499-.288.644-.529.144-.24.217-.56.217-.957V5.67c0-.6.129-1.095.387-1.487a2.348 2.348 0 0 1 1.078-.89C4.845 3.098 5.385 3 6 3v1.142a2.69 2.69 0 0 0-.984.193 1.32 1.32 0 0 0-.62.538c-.14.24-.21.551-.21.932v2.528c0 .582-.137 1.05-.41 1.403-.275.352-.696.585-1.264.697v.1c.578.107 1.002.337 1.271.69.269.352.403.822.403 1.41v2.579c0 .38.07.688.21.924.139.24.343.417.612.529.274.112.604.17.992.176V18z"></path>
|
||||
</symbol>
|
||||
<symbol id="svg-icon-fraction" viewBox="0 0 20 20">
|
||||
<path d="M3 17 17.142 2.858l-.707-.707L2.293 16.293 3 17zM2.566 9l2.795-3.316-1.37-3.141h1.206l.944 2.309 1.822-2.309h1.365L6.633 5.736 8.109 9H6.885L5.854 6.58 3.926 9h-1.36zM10.9 18.889c-.195 0-.353-.012-.474-.035a2.876 2.876 0 0 1-.352-.088v-.944c.106.024.22.045.346.065.121.023.254.035.398.035.332 0 .614-.104.844-.31.234-.208.457-.5.668-.88l.375-.673-.978-6.516h1.171l.417 3.234c.035.239.062.495.082.768.019.273.033.533.04.78.012.245.018.45.018.615h.035a49.4 49.4 0 0 1 .229-.528c.097-.227.2-.463.31-.709.114-.25.221-.469.323-.656l1.828-3.504h1.26l-4.085 7.523a5.194 5.194 0 0 1-.68 1.014 2.39 2.39 0 0 1-.79.604 2.251 2.251 0 0 1-.985.205z"></path>
|
||||
</symbol>
|
||||
<symbol id="svg-icon-function" viewBox="0 0 20 20">
|
||||
<path d="M3.48 15.146c-.487 0-.917-.048-1.288-.146a4.472 4.472 0 0 1-.96-.366v-1.128c.26.156.586.303.982.44.4.136.81.204 1.23.204.415 0 .76-.056 1.033-.168.278-.112.486-.266.623-.461.141-.2.212-.433.212-.696 0-.21-.046-.39-.14-.542a1.47 1.47 0 0 0-.439-.454 8.426 8.426 0 0 0-.805-.506 6.3 6.3 0 0 1-.953-.637 2.4 2.4 0 0 1-.593-.703 1.959 1.959 0 0 1-.198-.901c0-.459.113-.857.337-1.194.225-.337.54-.598.945-.784.41-.185.889-.278 1.436-.278.483 0 .93.056 1.34.169.41.107.764.232 1.062.373l-.395.974a6.514 6.514 0 0 0-.872-.337 3.801 3.801 0 0 0-1.135-.153c-.46 0-.825.105-1.099.314-.268.21-.403.494-.403.85 0 .186.04.352.117.498.083.147.225.293.425.44.2.141.474.307.82.498.338.195.64.395.909.6.273.2.488.432.644.696.161.259.242.579.242.96 0 .522-.124.966-.373 1.332-.25.362-.606.638-1.07.828-.459.186-1.003.278-1.633.278zM7.444 15 9.15 6.973h1.223L8.668 15H7.444zm2.732-9.434a.73.73 0 0 1-.49-.168c-.128-.117-.191-.28-.191-.49 0-.162.031-.313.095-.455a.79.79 0 0 1 .747-.469c.215 0 .376.057.483.169.108.112.162.268.162.469 0 .288-.084.517-.25.688-.166.171-.351.256-.556.256zM10.586 15l1.722-8.064h1.076l-.19 1.545h.015c.185-.253.407-.51.666-.769.264-.263.569-.483.916-.659.351-.18.75-.27 1.194-.27.43 0 .798.08 1.105.24.308.157.545.387.71.69.167.297.25.659.25 1.083 0 .225-.017.452-.051.682a9.69 9.69 0 0 1-.11.615L16.819 15h-1.296l1.084-5.068c.044-.22.078-.408.103-.564a2.39 2.39 0 0 0 .043-.44c0-.342-.092-.6-.278-.776-.185-.176-.459-.264-.82-.264-.357 0-.732.122-1.128.366-.395.245-.762.63-1.099 1.158-.337.522-.598 1.206-.783 2.05L11.89 15h-1.304z"></path>
|
||||
</symbol>
|
||||
<symbol id="svg-icon-integral" viewBox="0 0 20 20">
|
||||
<path d="M5.86 17a3.094 3.094 0 0 1-.86-.125v-1.018c.089.035.2.069.333.103.134.039.278.059.434.059.449 0 .769-.166.96-.498.19-.328.286-.743.286-1.246V4.717c0-.971.194-1.667.58-2.087.391-.42.911-.63 1.56-.63.151 0 .305.012.46.037.16.02.29.048.387.088v1.003c-.089-.04-.2-.073-.333-.103a1.742 1.742 0 0 0-.434-.05c-.297 0-.533.077-.706.233a1.295 1.295 0 0 0-.36.638 3.436 3.436 0 0 0-.107.893v9.514c0 .992-.204 1.697-.613 2.117-.41.42-.938.63-1.587.63zM9.4 14l3.029-3.58-1.511-3.377h1.066l1.118 2.628 2.12-2.628h1.225l-2.907 3.421L15.152 14h-1.08l-1.218-2.768L10.626 14H9.401z"></path>
|
||||
</symbol>
|
||||
<symbol id="svg-icon-largeOperator" viewBox="0 0 20 20">
|
||||
<path d="M3 16v-1l3.457-4.888L3 6V5h7v1H4.5l3.349 4.098L4.5 15H10v1H3zM10.4 14l3.029-3.58-1.511-3.377h1.066l1.118 2.628 2.12-2.628h1.225l-2.907 3.421L16.152 14h-1.08l-1.218-2.768L11.626 14h-1.225z"></path>
|
||||
</symbol>
|
||||
<symbol id="svg-icon-limAndLog" viewBox="0 0 20 20">
|
||||
<path d="m1.437 15 2.27-10.637h1.135L2.579 15H1.437zM4.292 15l1.593-7.492h1.141L5.434 15H4.292zm2.55-8.805a.682.682 0 0 1-.458-.157c-.119-.11-.178-.262-.178-.458 0-.15.03-.292.089-.424a.738.738 0 0 1 .697-.438c.2 0 .351.053.451.158.1.105.15.25.15.437 0 .27-.077.484-.232.643a.71.71 0 0 1-.52.24zM7.133 15l1.593-7.492h.93l-.178 1.449h.068c.164-.237.362-.476.595-.718.232-.246.501-.45.806-.615.31-.169.661-.253 1.053-.253.529 0 .93.153 1.203.458.274.305.433.722.479 1.251h.048c.182-.278.4-.547.656-.807.255-.264.545-.48.868-.649a2.328 2.328 0 0 1 1.08-.253c.579 0 1.026.157 1.34.472.314.314.472.77.472 1.367 0 .214-.014.417-.041.608-.023.192-.06.388-.11.588L17.025 15h-1.149l1.012-4.717c.04-.205.07-.383.089-.533.023-.15.034-.294.034-.43 0-.306-.082-.548-.246-.725-.164-.178-.417-.267-.759-.267-.242 0-.492.066-.752.198-.26.133-.513.333-.759.602-.241.264-.46.6-.656 1.005a6.403 6.403 0 0 0-.472 1.429L12.636 15H11.5l.998-4.696c.041-.21.07-.39.09-.54a2.79 2.79 0 0 0 .033-.397c0-.323-.075-.576-.225-.759-.15-.186-.397-.28-.739-.28-.241 0-.494.064-.758.192a2.56 2.56 0 0 0-.76.601 4.46 4.46 0 0 0-.676 1.046c-.205.424-.37.934-.492 1.531L8.275 15H7.133z"></path>
|
||||
</symbol>
|
||||
<symbol id="svg-icon-matrix" viewBox="0 0 20 20">
|
||||
<path d="M2 1v18h4v-1H3V2h3V1H2zM18 1h-4v1h3v16h-3v1h4V1z"></path>
|
||||
<path d="M14.053 10.713v5.567h-.857v-3.593c0-.152.002-.294.007-.425l.012-.393.026-.381c-.09.08-.189.165-.299.254-.11.089-.226.173-.349.254l-.692.488-.419-.596 1.695-1.175h.876zM8.053 3.713V9.28h-.857V5.688c0-.153.002-.295.007-.426l.012-.393.026-.381c-.09.08-.189.165-.299.254-.11.089-.226.173-.349.254l-.692.488-.419-.596 1.695-1.175h.876zM7.247 16.382c-.664 0-1.162-.246-1.492-.737-.33-.495-.495-1.214-.495-2.158 0-.927.159-1.637.476-2.133.318-.499.821-.748 1.511-.748.664 0 1.164.245 1.498.736.339.49.508 1.206.508 2.145 0 .923-.159 1.636-.476 2.14-.318.503-.827.755-1.53.755zm0-.762c.39 0 .675-.173.857-.52.182-.352.273-.89.273-1.613 0-.72-.091-1.252-.273-1.6-.182-.35-.468-.526-.857-.526-.38 0-.662.175-.844.527-.178.347-.267.884-.267 1.612 0 .715.09 1.248.267 1.6.178.347.459.52.844.52zM13.247 9.382c-.664 0-1.162-.246-1.492-.736-.33-.496-.495-1.215-.495-2.159 0-.926.159-1.637.476-2.133.318-.499.821-.749 1.511-.749.665 0 1.164.246 1.498.737.339.49.508 1.206.508 2.145 0 .923-.159 1.636-.476 2.14-.317.503-.827.755-1.53.755zm0-.762c.39 0 .675-.173.857-.52.182-.352.273-.89.273-1.613 0-.72-.091-1.252-.273-1.6-.182-.35-.468-.526-.857-.526-.38 0-.662.175-.844.527-.178.347-.267.884-.267 1.612 0 .715.09 1.248.267 1.6.178.347.459.52.844.52z"></path>
|
||||
</symbol>
|
||||
<symbol id="svg-icon-operator" viewBox="0 0 20 20">
|
||||
<path d="M3 14h14v1H3v-1zM3 16h14v1H3v-1zM5.575 13l.154-.762 5.31-9.939h1.267l1.15 9.954-.154.747H5.575zm1.604-1.106h5.04l-.601-5.61c-.03-.25-.056-.493-.08-.733a47.61 47.61 0 0 1-.089-1.333c-.01-.21-.014-.407-.014-.593-.113.278-.232.557-.36.835-.126.278-.263.566-.41.864-.146.293-.307.606-.483.938L7.18 11.894z"></path>
|
||||
</symbol>
|
||||
<symbol id="svg-icon-radical" viewBox="0 0 20 20">
|
||||
<path d="m9.4 14 3.029-3.58-1.511-3.377h1.066l1.118 2.628 2.12-2.628h1.225l-2.907 3.421L15.152 14h-1.08l-1.218-2.768L10.626 14H9.401z"></path>
|
||||
<path d="M5.544 16.102 3.5 10.375H2.167v-.96h2.11l1.75 4.981L10.05 3H17v1h-6.34l-4.2 12.102h-.916z"></path>
|
||||
</symbol>
|
||||
<symbol id="svg-icon-script" viewBox="0 0 20 20">
|
||||
<path d="M6.905 15.146c-.6 0-1.118-.12-1.553-.358a2.484 2.484 0 0 1-1.003-1.04c-.23-.454-.345-.996-.345-1.626 0-.65.093-1.287.279-1.912.19-.63.461-1.199.813-1.707A4.19 4.19 0 0 1 6.363 7.28a3.152 3.152 0 0 1 1.67-.454c.737 0 1.296.166 1.677.498.38.327.571.779.571 1.355 0 .405-.095.779-.285 1.12-.186.343-.474.64-.865.894-.385.25-.876.445-1.472.586-.59.137-1.291.205-2.102.205H5.28l-.03.293a6.65 6.65 0 0 0-.007.3c0 .645.156 1.15.469 1.517.312.361.781.542 1.406.542.386 0 .75-.054 1.092-.161a8.72 8.72 0 0 0 1.083-.44v1.047a8.019 8.019 0 0 1-1.09.41 4.842 4.842 0 0 1-1.297.154zm-1.45-4.658h.175c.625 0 1.2-.053 1.722-.16.522-.113.942-.294 1.26-.543a1.23 1.23 0 0 0 .475-1.01.887.887 0 0 0-.278-.674c-.185-.176-.469-.264-.85-.264-.336 0-.668.105-.996.315-.327.205-.625.505-.893.9-.264.396-.469.875-.615 1.436zM11.644 9l2.096-2.487-1.028-2.356h.905l.708 1.732 1.366-1.732h1.024l-2.021 2.395L15.8 9h-.918l-.774-1.815L12.664 9h-1.02z"></path>
|
||||
</symbol>
|
||||
<symbol id="svg-icon-symbols" viewBox="0 0 20 20">
|
||||
<path d="M9.993 5.222c-.806 0-1.475.154-2.007.462a2.81 2.81 0 0 0-1.18 1.303c-.258.567-.388 1.243-.388 2.03 0 .692.086 1.335.257 1.925.176.586.454 1.133.835 1.641.38.503.881.977 1.501 1.42V15H4.72v-1.099h2.747a6.264 6.264 0 0 1-1.201-1.208 5.796 5.796 0 0 1-.85-1.64 6.503 6.503 0 0 1-.315-2.08c0-.987.193-1.842.579-2.564a4.025 4.025 0 0 1 1.67-1.685c.732-.4 1.613-.6 2.644-.6 1.05 0 1.94.197 2.673.593.732.39 1.29.947 1.67 1.67.38.722.571 1.58.571 2.57 0 .767-.105 1.463-.315 2.088a5.747 5.747 0 0 1-.842 1.655 5.833 5.833 0 0 1-1.201 1.201h2.74V15h-4.293v-.996c.63-.44 1.135-.913 1.516-1.421s.657-1.057.828-1.648a6.75 6.75 0 0 0 .264-1.919c0-.79-.132-1.47-.396-2.036a2.83 2.83 0 0 0-1.201-1.304c-.532-.302-1.204-.454-2.014-.454z"></path>
|
||||
</symbol>
|
||||
</svg>
|
After Width: | Height: | Size: 11 KiB |
|
@ -1016,6 +1016,7 @@
|
|||
width: 52px;
|
||||
padding: 5px;
|
||||
|
||||
fill: @icon-normal-ie;
|
||||
fill: @icon-normal;
|
||||
|
||||
.btn& {
|
||||
|
|
|
@ -641,10 +641,13 @@
|
|||
}
|
||||
|
||||
.btn-toolbar {
|
||||
&:active {
|
||||
svg.icon {
|
||||
fill: @icon-toolbar-header-ie;
|
||||
fill: @icon-toolbar-header;
|
||||
&:active,
|
||||
&.active {
|
||||
&:not(.disabled) {
|
||||
svg.icon {
|
||||
fill: @icon-normal-pressed-ie;
|
||||
fill: @icon-normal-pressed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -212,6 +212,8 @@ define([
|
|||
this.api.asc_registerCallback('asc_ChangeCropState', _.bind(this.onChangeCropState, this));
|
||||
this.api.asc_registerCallback('asc_onLockDocumentProps', _.bind(this.onApiLockDocumentProps, this));
|
||||
this.api.asc_registerCallback('asc_onUnLockDocumentProps', _.bind(this.onApiUnLockDocumentProps, this));
|
||||
this.api.asc_registerCallback('asc_onShowMathTrack', _.bind(this.onShowMathTrack, this));
|
||||
this.api.asc_registerCallback('asc_onHideMathTrack', _.bind(this.onHideMathTrack, this));
|
||||
}
|
||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
||||
|
@ -626,6 +628,25 @@ define([
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.mode && this.mode.isEdit) {
|
||||
var i = -1,
|
||||
in_equation = false,
|
||||
locked = false;
|
||||
while (++i < selectedElements.length) {
|
||||
var type = selectedElements[i].get_ObjectType();
|
||||
if (type === Asc.c_oAscTypeSelectElement.Math) {
|
||||
in_equation = true;
|
||||
} else if (type === Asc.c_oAscTypeSelectElement.Paragraph || type === Asc.c_oAscTypeSelectElement.Table || type === Asc.c_oAscTypeSelectElement.Header) {
|
||||
var value = selectedElements[i].get_ObjectValue();
|
||||
value && (locked = locked || value.get_Locked());
|
||||
}
|
||||
}
|
||||
if (in_equation) {
|
||||
this._state.equationLocked = locked;
|
||||
this.disableEquationBar();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
handleDocumentWheel: function(event) {
|
||||
|
@ -697,6 +718,7 @@ define([
|
|||
me.documentHolder.cmpEl.offset().top - $(window).scrollTop()
|
||||
];
|
||||
me._Height = me.documentHolder.cmpEl.height();
|
||||
me._Width = me.documentHolder.cmpEl.width();
|
||||
me._BodyWidth = $('body').width();
|
||||
},
|
||||
|
||||
|
@ -960,6 +982,7 @@ define([
|
|||
cmpEl.offset().top - $(window).scrollTop()
|
||||
];
|
||||
me._Height = cmpEl.height();
|
||||
me._Width = cmpEl.width();
|
||||
me._BodyWidth = $('body').width();
|
||||
}
|
||||
|
||||
|
@ -1498,6 +1521,7 @@ define([
|
|||
SetDisabled: function(state, canProtect, fillFormMode) {
|
||||
this._isDisabled = state;
|
||||
this.documentHolder.SetDisabled(state, canProtect, fillFormMode);
|
||||
this.disableEquationBar();
|
||||
},
|
||||
|
||||
onTextLanguage: function(langid) {
|
||||
|
@ -1588,6 +1612,7 @@ define([
|
|||
cmpEl.offset().top - $(window).scrollTop()
|
||||
];
|
||||
me._Height = cmpEl.height();
|
||||
me._Width = cmpEl.width();
|
||||
me._BodyWidth = $('body').width();
|
||||
me.onMouseMoveStart();
|
||||
},
|
||||
|
@ -2307,6 +2332,137 @@ define([
|
|||
return false;
|
||||
},
|
||||
|
||||
onShowMathTrack: function(bounds) {
|
||||
if (bounds[3] < 0) {
|
||||
this.onHideMathTrack();
|
||||
return;
|
||||
}
|
||||
var me = this,
|
||||
documentHolder = me.documentHolder,
|
||||
eqContainer = documentHolder.cmpEl.find('#equation-container');
|
||||
|
||||
// Prepare menu container
|
||||
if (eqContainer.length < 1) {
|
||||
var equationsStore = me.getApplication().getCollection('EquationGroups'),
|
||||
eqStr = '<div id="equation-container" style="position: absolute;">';
|
||||
|
||||
me.getApplication().getController('Toolbar').onMathTypes();
|
||||
|
||||
me.equationBtns = [];
|
||||
for (var i = 0; i < equationsStore.length; ++i) {
|
||||
var style = 'margin-right: 8px;' + (i==0 ? 'margin-left: 5px;' : '');
|
||||
eqStr += '<span id="id-document-holder-btn-equation-' + i + '" style="' + style +'"></span>';
|
||||
}
|
||||
eqStr += '<div class="separator"></div>';
|
||||
eqStr += '<span id="id-document-holder-btn-equation-settings" style="margin-right: 5px; margin-left: 8px;"></span>';
|
||||
eqStr += '</div>';
|
||||
eqContainer = $(eqStr);
|
||||
documentHolder.cmpEl.find('#id_main_view').append(eqContainer);
|
||||
var onShowBefore = function (menu) {
|
||||
var index = menu.options.value,
|
||||
group = equationsStore.at(index);
|
||||
var equationPicker = new Common.UI.DataViewSimple({
|
||||
el: $('#id-document-holder-btn-equation-menu-' + index, menu.cmpEl),
|
||||
parentMenu: menu,
|
||||
store: group.get('groupStore'),
|
||||
scrollAlwaysVisible: true,
|
||||
showLast: false,
|
||||
restoreHeight: 10000,
|
||||
itemTemplate: _.template(
|
||||
'<div class="item-equation" style="" >' +
|
||||
'<div class="equation-icon" style="background-position:<%= posX %>px <%= posY %>px;width:<%= width %>px;height:<%= height %>px;" id="<%= id %>"></div>' +
|
||||
'</div>')
|
||||
});
|
||||
equationPicker.on('item:click', function(picker, item, record, e) {
|
||||
if (me.api) {
|
||||
if (record)
|
||||
me.api.asc_AddMath(record.get('data').equationType);
|
||||
}
|
||||
});
|
||||
menu.off('show:before', onShowBefore);
|
||||
};
|
||||
for (var i = 0; i < equationsStore.length; ++i) {
|
||||
var equationGroup = equationsStore.at(i);
|
||||
var btn = new Common.UI.Button({
|
||||
parentEl: $('#id-document-holder-btn-equation-' + i, documentHolder.cmpEl),
|
||||
cls : 'btn-toolbar no-caret',
|
||||
iconCls : 'svgicon ' + equationGroup.get('groupIcon'),
|
||||
hint : equationGroup.get('groupName'),
|
||||
menu : new Common.UI.Menu({
|
||||
cls: 'menu-shapes',
|
||||
value: i,
|
||||
items: [
|
||||
{ template: _.template('<div id="id-document-holder-btn-equation-menu-' + i +
|
||||
'" class="menu-shape" style="width:' + (equationGroup.get('groupWidth') + 8) + 'px; ' +
|
||||
equationGroup.get('groupHeightStr') + 'margin-left:5px;"></div>') }
|
||||
]
|
||||
})
|
||||
});
|
||||
btn.menu.on('show:before', onShowBefore);
|
||||
me.equationBtns.push(btn);
|
||||
}
|
||||
|
||||
me.equationSettingsBtn = new Common.UI.Button({
|
||||
parentEl: $('#id-document-holder-btn-equation-settings', documentHolder.cmpEl),
|
||||
cls : 'btn-toolbar no-caret',
|
||||
iconCls : 'toolbar__icon more-vertical',
|
||||
hint : me.documentHolder.advancedEquationText,
|
||||
menu : me.documentHolder.createEquationMenu('popuptbeqinput', 'tl-bl')
|
||||
});
|
||||
me.equationSettingsBtn.menu.options.initMenu = function() {
|
||||
var eq = me.api.asc_GetMathInputType();
|
||||
var menu = me.equationSettingsBtn.menu;
|
||||
menu.items[0].setChecked(eq===Asc.c_oAscMathInputType.Unicode);
|
||||
menu.items[1].setChecked(eq===Asc.c_oAscMathInputType.LaTeX);
|
||||
menu.items[8].setChecked(me.api.asc_IsInlineMath());
|
||||
};
|
||||
me.equationSettingsBtn.menu.on('item:click', _.bind(me.convertEquation, me));
|
||||
me.equationSettingsBtn.menu.on('show:before', function(menu) {
|
||||
menu.options.initMenu();
|
||||
});
|
||||
}
|
||||
|
||||
var showPoint = [(bounds[0] + bounds[2])/2 - eqContainer.outerWidth()/2, bounds[1] - eqContainer.outerHeight() - 10];
|
||||
if (!Common.Utils.InternalSettings.get("de-hidden-rulers")) {
|
||||
showPoint = [showPoint[0] - 19, showPoint[1] - 26];
|
||||
}
|
||||
if (showPoint[1]<0) {
|
||||
showPoint[1] = bounds[3] + 10;
|
||||
!Common.Utils.InternalSettings.get("de-hidden-rulers") && (showPoint[1] -= 26);
|
||||
}
|
||||
eqContainer.css({left: showPoint[0], top : Math.min(this._Height - eqContainer.outerHeight(), Math.max(0, showPoint[1]))});
|
||||
// menu.menuAlign = validation ? 'tr-br' : 'tl-bl';
|
||||
if (eqContainer.is(':visible')) {
|
||||
if (me.equationSettingsBtn.menu.isVisible()) {
|
||||
me.equationSettingsBtn.menu.options.initMenu();
|
||||
me.equationSettingsBtn.menu.alignPosition();
|
||||
}
|
||||
} else {
|
||||
eqContainer.show();
|
||||
}
|
||||
me.disableEquationBar();
|
||||
},
|
||||
|
||||
onHideMathTrack: function() {
|
||||
var eqContainer = this.documentHolder.cmpEl.find('#equation-container');
|
||||
if (eqContainer.is(':visible')) {
|
||||
eqContainer.hide();
|
||||
}
|
||||
},
|
||||
|
||||
disableEquationBar: function() {
|
||||
var eqContainer = this.documentHolder.cmpEl.find('#equation-container'),
|
||||
docProtection = this.documentHolder._docProtection,
|
||||
disabled = this._isDisabled || this._state.equationLocked || docProtection.isReadOnly || docProtection.isFormsOnly || docProtection.isCommentsOnly;
|
||||
|
||||
if (eqContainer.length>0 && eqContainer.is(':visible')) {
|
||||
this.equationBtns.forEach(function(item){
|
||||
item && item.setDisabled(!!disabled);
|
||||
});
|
||||
this.equationSettingsBtn.setDisabled(!!disabled);
|
||||
}
|
||||
},
|
||||
|
||||
convertEquation: function(menu, item, e) {
|
||||
if (this.api) {
|
||||
if (item.options.type=='input')
|
||||
|
@ -2325,6 +2481,7 @@ define([
|
|||
}
|
||||
if (props && this.documentHolder) {
|
||||
this.documentHolder._docProtection = props;
|
||||
this.disableEquationBar();
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -2776,7 +2776,7 @@ define([
|
|||
items: [
|
||||
{ template: _.template('<div id="id-toolbar-menu-equationgroup' + i +
|
||||
'" class="menu-shape" style="width:' + (equationGroup.get('groupWidth') + 8) + 'px; ' +
|
||||
equationGroup.get('groupHeight') + 'margin-left:5px;"></div>') }
|
||||
equationGroup.get('groupHeightStr') + 'margin-left:5px;"></div>') }
|
||||
]
|
||||
})
|
||||
});
|
||||
|
@ -2827,16 +2827,21 @@ define([
|
|||
var me = this;
|
||||
var onShowBefore = function(menu) {
|
||||
me.onMathTypes(me._equationTemp);
|
||||
if (me._equationTemp && me._equationTemp.get_Data().length>0)
|
||||
me.fillEquations();
|
||||
me.toolbar.btnInsertEquation.menu.off('show:before', onShowBefore);
|
||||
};
|
||||
me.toolbar.btnInsertEquation.menu.on('show:before', onShowBefore);
|
||||
},
|
||||
|
||||
onMathTypes: function(equation) {
|
||||
equation = equation || this._equationTemp;
|
||||
|
||||
var equationgrouparray = [],
|
||||
equationsStore = this.getCollection('EquationGroups');
|
||||
|
||||
equationsStore.reset();
|
||||
if (equationsStore.length>0)
|
||||
return;
|
||||
|
||||
// equations groups
|
||||
|
||||
|
@ -2844,18 +2849,18 @@ define([
|
|||
|
||||
// [translate, count cells, scroll]
|
||||
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Symbol ] = [this.textSymbols, 11];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Fraction ] = [this.textFraction, 4];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Script ] = [this.textScript, 4];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Radical ] = [this.textRadical, 4];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Integral ] = [this.textIntegral, 3, true];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.LargeOperator] = [this.textLargeOperator, 5, true];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Bracket ] = [this.textBracket, 4, true];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Function ] = [this.textFunction, 3, true];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Accent ] = [this.textAccent, 4];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.LimitLog ] = [this.textLimitAndLog, 3];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Operator ] = [this.textOperator, 4];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Matrix ] = [this.textMatrix, 4, true];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Symbol ] = [this.textSymbols, 11, false, 'svg-icon-symbols'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Fraction ] = [this.textFraction, 4, false, 'svg-icon-fraction'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Script ] = [this.textScript, 4, false, 'svg-icon-script'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Radical ] = [this.textRadical, 4, false, 'svg-icon-radical'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Integral ] = [this.textIntegral, 3, true, 'svg-icon-integral'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.LargeOperator] = [this.textLargeOperator, 5, true, 'svg-icon-largeOperator'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Bracket ] = [this.textBracket, 4, true, 'svg-icon-bracket'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Function ] = [this.textFunction, 3, true, 'svg-icon-function'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Accent ] = [this.textAccent, 4, false, 'svg-icon-accent'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.LimitLog ] = [this.textLimitAndLog, 3, false, 'svg-icon-limAndLog'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Operator ] = [this.textOperator, 4, false, 'svg-icon-operator'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Matrix ] = [this.textMatrix, 4, true, 'svg-icon-matrix'];
|
||||
|
||||
// equations sub groups
|
||||
|
||||
|
@ -2925,12 +2930,14 @@ define([
|
|||
groupName : c_oAscMathMainTypeStrings[id][0],
|
||||
groupStore : store,
|
||||
groupWidth : width,
|
||||
groupHeight : c_oAscMathMainTypeStrings[id][2] ? ' height:'+ normHeight +'px!important; ' : ''
|
||||
groupHeight : normHeight,
|
||||
groupHeightStr : c_oAscMathMainTypeStrings[id][2] ? ' height:'+ normHeight +'px!important; ' : '',
|
||||
groupIcon: c_oAscMathMainTypeStrings[id][3]
|
||||
});
|
||||
}
|
||||
}
|
||||
equationsStore.add(equationgrouparray);
|
||||
this.fillEquations();
|
||||
// this.fillEquations();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1151,64 +1151,7 @@ define([
|
|||
|
||||
me.menuTableEquation = new Common.UI.MenuItem({
|
||||
caption : me.advancedEquationText,
|
||||
menu : new Common.UI.Menu({
|
||||
cls: 'ppm-toolbar shifted-right',
|
||||
menuAlign: 'tl-tr',
|
||||
items : [
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.unicodeText,
|
||||
iconCls : 'menu__icon unicode',
|
||||
checkable : true,
|
||||
checkmark : false,
|
||||
checked : false,
|
||||
toggleGroup : 'popupparaeqinput',
|
||||
type : 'input',
|
||||
value : Asc.c_oAscMathInputType.Unicode
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.latexText,
|
||||
iconCls : 'menu__icon latex',
|
||||
checkable : true,
|
||||
checkmark : false,
|
||||
checked : false,
|
||||
toggleGroup : 'popupparaeqinput',
|
||||
type : 'input',
|
||||
value : Asc.c_oAscMathInputType.LaTeX
|
||||
}),
|
||||
{ caption : '--' },
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.currProfText,
|
||||
iconCls : 'menu__icon professional-equation',
|
||||
type : 'view',
|
||||
value : {all: false, linear: false}
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.currLinearText,
|
||||
iconCls : 'menu__icon linear-equation',
|
||||
type : 'view',
|
||||
value : {all: false, linear: true}
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.allProfText,
|
||||
iconCls : 'menu__icon professional-equation',
|
||||
type : 'view',
|
||||
value : {all: true, linear: false}
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.allLinearText,
|
||||
iconCls : 'menu__icon linear-equation',
|
||||
type : 'view',
|
||||
value : {all: true, linear: true}
|
||||
}),
|
||||
{ caption : '--' },
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.eqToInlineText,
|
||||
checkable : true,
|
||||
checked : false,
|
||||
type : 'mode'
|
||||
})
|
||||
]
|
||||
})
|
||||
menu : me.createEquationMenu('popuptableeqinput', 'tl-tr')
|
||||
});
|
||||
|
||||
me.menuTableSelectText = new Common.UI.MenuItem({
|
||||
|
@ -1661,66 +1604,8 @@ define([
|
|||
|
||||
me.menuParagraphEquation = new Common.UI.MenuItem({
|
||||
caption : me.advancedEquationText,
|
||||
menu : new Common.UI.Menu({
|
||||
cls: 'ppm-toolbar shifted-right',
|
||||
menuAlign: 'tl-tr',
|
||||
items : [
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.unicodeText,
|
||||
iconCls : 'menu__icon unicode',
|
||||
checkable : true,
|
||||
checkmark : false,
|
||||
checked : false,
|
||||
toggleGroup : 'popupparaeqinput',
|
||||
type : 'input',
|
||||
value : Asc.c_oAscMathInputType.Unicode
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.latexText,
|
||||
iconCls : 'menu__icon latex',
|
||||
checkable : true,
|
||||
checkmark : false,
|
||||
checked : false,
|
||||
toggleGroup : 'popupparaeqinput',
|
||||
type : 'input',
|
||||
value : Asc.c_oAscMathInputType.LaTeX
|
||||
}),
|
||||
{ caption : '--' },
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.currProfText,
|
||||
iconCls : 'menu__icon professional-equation',
|
||||
type : 'view',
|
||||
value : {all: false, linear: false}
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.currLinearText,
|
||||
iconCls : 'menu__icon linear-equation',
|
||||
type : 'view',
|
||||
value : {all: false, linear: true}
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.allProfText,
|
||||
iconCls : 'menu__icon professional-equation',
|
||||
type : 'view',
|
||||
value : {all: true, linear: false}
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.allLinearText,
|
||||
iconCls : 'menu__icon linear-equation',
|
||||
type : 'view',
|
||||
value : {all: true, linear: true}
|
||||
}),
|
||||
{ caption : '--' },
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.eqToInlineText,
|
||||
checkable : true,
|
||||
checked : false,
|
||||
type : 'mode'
|
||||
})
|
||||
]
|
||||
})
|
||||
menu : me.createEquationMenu('popupparaeqinput', 'tl-tr')
|
||||
});
|
||||
|
||||
/** coauthoring begin **/
|
||||
var menuCommentSeparatorPara = new Common.UI.MenuItem({
|
||||
caption : '--'
|
||||
|
@ -2978,6 +2863,67 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
createEquationMenu: function(toggleGroup, menuAlign) {
|
||||
return new Common.UI.Menu({
|
||||
cls: 'ppm-toolbar shifted-right',
|
||||
menuAlign: menuAlign,
|
||||
items : [
|
||||
new Common.UI.MenuItem({
|
||||
caption : this.unicodeText,
|
||||
iconCls : 'menu__icon unicode',
|
||||
checkable : true,
|
||||
checkmark : false,
|
||||
checked : false,
|
||||
toggleGroup : toggleGroup,
|
||||
type : 'input',
|
||||
value : Asc.c_oAscMathInputType.Unicode
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : this.latexText,
|
||||
iconCls : 'menu__icon latex',
|
||||
checkable : true,
|
||||
checkmark : false,
|
||||
checked : false,
|
||||
toggleGroup : toggleGroup,
|
||||
type : 'input',
|
||||
value : Asc.c_oAscMathInputType.LaTeX
|
||||
}),
|
||||
{ caption : '--' },
|
||||
new Common.UI.MenuItem({
|
||||
caption : this.currProfText,
|
||||
iconCls : 'menu__icon professional-equation',
|
||||
type : 'view',
|
||||
value : {all: false, linear: false}
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : this.currLinearText,
|
||||
iconCls : 'menu__icon linear-equation',
|
||||
type : 'view',
|
||||
value : {all: false, linear: true}
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : this.allProfText,
|
||||
iconCls : 'menu__icon professional-equation',
|
||||
type : 'view',
|
||||
value : {all: true, linear: false}
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : this.allLinearText,
|
||||
iconCls : 'menu__icon linear-equation',
|
||||
type : 'view',
|
||||
value : {all: true, linear: true}
|
||||
}),
|
||||
{ caption : '--' },
|
||||
new Common.UI.MenuItem({
|
||||
caption : this.eqToInlineText,
|
||||
checkable : true,
|
||||
checked : false,
|
||||
type : 'mode'
|
||||
})
|
||||
]
|
||||
});
|
||||
},
|
||||
|
||||
focus: function() {
|
||||
var me = this;
|
||||
_.defer(function(){ me.cmpEl.focus(); }, 50);
|
||||
|
|
|
@ -331,6 +331,7 @@
|
|||
<img class="inline-svg" src="../../common/main/resources/img/header/icons.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/toolbar/shapetypes.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/toolbar/charttypes.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/toolbar/equationicons.svg">
|
||||
<script>
|
||||
var svgpoints = document.querySelectorAll('img.inline-svg');
|
||||
SVGInjector(svgpoints);
|
||||
|
|
|
@ -321,6 +321,7 @@
|
|||
<inline src="../../common/main/resources/img/header/icons.svg" />
|
||||
<inline src="../../common/main/resources/img/toolbar/shapetypes.svg" />
|
||||
<inline src="../../common/main/resources/img/toolbar/charttypes.svg" />
|
||||
<inline src="../../common/main/resources/img/toolbar/equationicons.svg" />
|
||||
<script src="../../../../../../sdkjs/common/device_scale.js?__inline=true"></script>
|
||||
<script data-main="app" src="../../../vendor/requirejs/require.js"></script>
|
||||
|
||||
|
|
|
@ -271,6 +271,7 @@
|
|||
<img class="inline-svg" src="../../common/main/resources/img/header/icons.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/toolbar/shapetypes.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/toolbar/charttypes.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/toolbar/equationicons.svg">
|
||||
<script>
|
||||
var svgpoints = document.querySelectorAll('img.inline-svg');
|
||||
SVGInjector(svgpoints);
|
||||
|
|
|
@ -320,6 +320,7 @@
|
|||
<inline src="../../common/main/resources/img/header/icons.svg" />
|
||||
<inline src="../../common/main/resources/img/toolbar/shapetypes.svg" />
|
||||
<inline src="../../common/main/resources/img/toolbar/charttypes.svg" />
|
||||
<inline src="../../common/main/resources/img/toolbar/equationicons.svg" />
|
||||
|
||||
<div id="viewport"></div>
|
||||
<script data-main="app" src="../../../vendor/requirejs/require.js"></script>
|
||||
|
|
|
@ -163,7 +163,8 @@
|
|||
margin-left: 2px;
|
||||
}
|
||||
|
||||
#special-paste-container {
|
||||
#special-paste-container,
|
||||
#equation-container {
|
||||
position: absolute;
|
||||
z-index: @zindex-dropdown - 20;
|
||||
|
||||
|
@ -173,6 +174,14 @@
|
|||
border: @scaled-one-px-value solid @border-regular-control;
|
||||
}
|
||||
|
||||
#equation-container {
|
||||
padding: 4px;
|
||||
.separator {
|
||||
height: 20px;
|
||||
}
|
||||
z-index: @zindex-dropdown - 19;
|
||||
}
|
||||
|
||||
.dropdown-menu.list-settings-level {
|
||||
.menu-list-preview {
|
||||
.box-shadow(0 0 0 @scaled-one-px-value-ie @border-regular-control-ie);
|
||||
|
|
|
@ -221,6 +221,8 @@ define([
|
|||
me.api.asc_registerPlaceholderCallback(AscCommon.PlaceholderButtonType.Video, _.bind(me.onClickPlaceholder, me, AscCommon.PlaceholderButtonType.Video));
|
||||
me.api.asc_registerPlaceholderCallback(AscCommon.PlaceholderButtonType.Audio, _.bind(me.onClickPlaceholder, me, AscCommon.PlaceholderButtonType.Audio));
|
||||
me.api.asc_registerCallback('asc_onTrackGuide', _.bind(me.onTrackGuide, me));
|
||||
me.api.asc_registerCallback('asc_onShowMathTrack', _.bind(me.onShowMathTrack, me));
|
||||
me.api.asc_registerCallback('asc_onHideMathTrack', _.bind(me.onHideMathTrack, me));
|
||||
}
|
||||
me.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(me.onCoAuthoringDisconnect, me));
|
||||
Common.NotificationCenter.on('api:disconnect', _.bind(me.onCoAuthoringDisconnect, me));
|
||||
|
@ -428,6 +430,8 @@ define([
|
|||
view.mnuGuides.menu.on('item:click', _.bind(me.onGuidesClick, me));
|
||||
view.mnuGridlines.menu.on('item:click', _.bind(me.onGridlinesClick, me));
|
||||
view.mnuRulers.on('click', _.bind(me.onRulersClick, me));
|
||||
view.menuTableEquation.menu.on('item:click', _.bind(me.convertEquation, me));
|
||||
view.menuParagraphEquation.menu.on('item:click', _.bind(me.convertEquation, me));
|
||||
},
|
||||
|
||||
getView: function (name) {
|
||||
|
@ -626,6 +630,28 @@ define([
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.mode && this.mode.isEdit) {
|
||||
var i = -1,
|
||||
in_equation = false,
|
||||
locked = false;
|
||||
while (++i < selectedElements.length) {
|
||||
var type = selectedElements[i].get_ObjectType();
|
||||
if (type === Asc.c_oAscTypeSelectElement.Math) {
|
||||
in_equation = true;
|
||||
} else if (type === Asc.c_oAscTypeSelectElement.Slide) {
|
||||
var value = selectedElements[i].get_ObjectValue();
|
||||
value && (locked = locked || value.get_LockDelete());
|
||||
} else if (type === Asc.c_oAscTypeSelectElement.Paragraph) {
|
||||
var value = selectedElements[i].get_ObjectValue();
|
||||
value && (locked = locked || value.get_Locked());
|
||||
}
|
||||
}
|
||||
if (in_equation) {
|
||||
this._state.equationLocked = locked;
|
||||
this.disableEquationBar();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
handleDocumentWheel: function(event){
|
||||
|
@ -2221,9 +2247,145 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
onShowMathTrack: function(bounds) {
|
||||
if (bounds[3] < 0) {
|
||||
this.onHideMathTrack();
|
||||
return;
|
||||
}
|
||||
var me = this,
|
||||
documentHolder = me.documentHolder,
|
||||
eqContainer = documentHolder.cmpEl.find('#equation-container');
|
||||
|
||||
// Prepare menu container
|
||||
if (eqContainer.length < 1) {
|
||||
var equationsStore = me.getApplication().getCollection('EquationGroups'),
|
||||
eqStr = '<div id="equation-container" style="position: absolute;">';
|
||||
|
||||
me.getApplication().getController('Toolbar').onMathTypes();
|
||||
|
||||
me.equationBtns = [];
|
||||
for (var i = 0; i < equationsStore.length; ++i) {
|
||||
var style = 'margin-right: 8px;' + (i==0 ? 'margin-left: 5px;' : '');
|
||||
eqStr += '<span id="id-document-holder-btn-equation-' + i + '" style="' + style +'"></span>';
|
||||
}
|
||||
eqStr += '<div class="separator"></div>';
|
||||
eqStr += '<span id="id-document-holder-btn-equation-settings" style="margin-right: 5px; margin-left: 8px;"></span>';
|
||||
eqStr += '</div>';
|
||||
eqContainer = $(eqStr);
|
||||
documentHolder.cmpEl.append(eqContainer);
|
||||
var onShowBefore = function (menu) {
|
||||
var index = menu.options.value,
|
||||
group = equationsStore.at(index);
|
||||
var equationPicker = new Common.UI.DataViewSimple({
|
||||
el: $('#id-document-holder-btn-equation-menu-' + index, menu.cmpEl),
|
||||
parentMenu: menu,
|
||||
store: group.get('groupStore'),
|
||||
scrollAlwaysVisible: true,
|
||||
showLast: false,
|
||||
restoreHeight: group.get('groupHeight') ? parseInt(group.get('groupHeight')) : true,
|
||||
itemTemplate: _.template(
|
||||
'<div class="item-equation" style="" >' +
|
||||
'<div class="equation-icon" style="background-position:<%= posX %>px <%= posY %>px;width:<%= width %>px;height:<%= height %>px;" id="<%= id %>"></div>' +
|
||||
'</div>')
|
||||
});
|
||||
equationPicker.on('item:click', function(picker, item, record, e) {
|
||||
if (me.api) {
|
||||
if (record)
|
||||
me.api.asc_AddMath(record.get('data').equationType);
|
||||
}
|
||||
});
|
||||
menu.off('show:before', onShowBefore);
|
||||
};
|
||||
for (var i = 0; i < equationsStore.length; ++i) {
|
||||
var equationGroup = equationsStore.at(i);
|
||||
var btn = new Common.UI.Button({
|
||||
parentEl: $('#id-document-holder-btn-equation-' + i, documentHolder.cmpEl),
|
||||
cls : 'btn-toolbar no-caret',
|
||||
iconCls : 'svgicon ' + equationGroup.get('groupIcon'),
|
||||
hint : equationGroup.get('groupName'),
|
||||
menu : new Common.UI.Menu({
|
||||
cls: 'menu-shapes',
|
||||
value: i,
|
||||
restoreHeight: equationGroup.get('groupHeight') ? parseInt(equationGroup.get('groupHeight')) : true,
|
||||
items: [
|
||||
{ template: _.template('<div id="id-document-holder-btn-equation-menu-' + i +
|
||||
'" class="menu-shape" style="width:' + (equationGroup.get('groupWidth') + 8) + 'px; ' +
|
||||
equationGroup.get('groupHeightStr') + 'margin-left:5px;"></div>') }
|
||||
]
|
||||
})
|
||||
});
|
||||
btn.menu.on('show:before', onShowBefore);
|
||||
me.equationBtns.push(btn);
|
||||
}
|
||||
|
||||
me.equationSettingsBtn = new Common.UI.Button({
|
||||
parentEl: $('#id-document-holder-btn-equation-settings', documentHolder.cmpEl),
|
||||
cls : 'btn-toolbar no-caret',
|
||||
iconCls : 'toolbar__icon more-vertical',
|
||||
hint : me.documentHolder.advancedEquationText,
|
||||
menu : me.documentHolder.createEquationMenu('popuptbeqinput', 'tl-bl')
|
||||
});
|
||||
me.equationSettingsBtn.menu.options.initMenu = function() {
|
||||
var eq = me.api.asc_GetMathInputType();
|
||||
var menu = me.equationSettingsBtn.menu;
|
||||
menu.items[0].setChecked(eq===Asc.c_oAscMathInputType.Unicode);
|
||||
menu.items[1].setChecked(eq===Asc.c_oAscMathInputType.LaTeX);
|
||||
};
|
||||
me.equationSettingsBtn.menu.on('item:click', _.bind(me.convertEquation, me));
|
||||
me.equationSettingsBtn.menu.on('show:before', function(menu) {
|
||||
menu.options.initMenu();
|
||||
});
|
||||
}
|
||||
|
||||
var showPoint = [(bounds[0] + bounds[2])/2 - eqContainer.outerWidth()/2, bounds[1] - eqContainer.outerHeight() - 10];
|
||||
if (showPoint[1]<0) {
|
||||
showPoint[1] = bounds[3] + 10;
|
||||
}
|
||||
eqContainer.css({left: showPoint[0], top : Math.min(me._Height - eqContainer.outerHeight(), Math.max(0, showPoint[1]))});
|
||||
// menu.menuAlign = validation ? 'tr-br' : 'tl-bl';
|
||||
if (eqContainer.is(':visible')) {
|
||||
if (me.equationSettingsBtn.menu.isVisible()) {
|
||||
me.equationSettingsBtn.menu.options.initMenu();
|
||||
me.equationSettingsBtn.menu.alignPosition();
|
||||
}
|
||||
} else {
|
||||
eqContainer.show();
|
||||
}
|
||||
me.disableEquationBar();
|
||||
},
|
||||
|
||||
onHideMathTrack: function() {
|
||||
var eqContainer = this.documentHolder.cmpEl.find('#equation-container');
|
||||
if (eqContainer.is(':visible')) {
|
||||
eqContainer.hide();
|
||||
}
|
||||
},
|
||||
|
||||
disableEquationBar: function() {
|
||||
var eqContainer = this.documentHolder.cmpEl.find('#equation-container'),
|
||||
disabled = this._isDisabled || this._state.equationLocked;
|
||||
|
||||
if (eqContainer.length>0 && eqContainer.is(':visible')) {
|
||||
this.equationBtns.forEach(function(item){
|
||||
item && item.setDisabled(!!disabled);
|
||||
});
|
||||
this.equationSettingsBtn.setDisabled(!!disabled);
|
||||
}
|
||||
},
|
||||
|
||||
convertEquation: function(menu, item, e) {
|
||||
if (this.api) {
|
||||
if (item.options.type=='input')
|
||||
this.api.asc_SetMathInputType(item.value);
|
||||
else if (item.options.type=='view')
|
||||
this.api.asc_ConvertMathView(item.value.linear, item.value.all);
|
||||
}
|
||||
},
|
||||
|
||||
SetDisabled: function(state) {
|
||||
this._isDisabled = state;
|
||||
this.documentHolder.SetDisabled(state);
|
||||
this.disableEquationBar();
|
||||
},
|
||||
|
||||
editComplete: function() {
|
||||
|
|
|
@ -832,7 +832,7 @@ define([
|
|||
if (this._state.activated) this._state.prcontrolsdisable = paragraph_locked;
|
||||
if (paragraph_locked!==undefined)
|
||||
this.toolbar.lockToolbar(Common.enumLock.paragraphLock, paragraph_locked, {array: me.toolbar.paragraphControls});
|
||||
this.toolbar.lockToolbar(Common.enumLock.paragraphLock, paragraph_locked===true, {array: [me.toolbar.btnInsDateTime, me.toolbar.btnInsSlideNum]});
|
||||
this.toolbar.lockToolbar(Common.enumLock.paragraphLock, paragraph_locked===true, {array: [me.toolbar.btnInsDateTime, me.toolbar.btnInsSlideNum, me.toolbar.btnInsertEquation]});
|
||||
}
|
||||
|
||||
if (this._state.no_paragraph !== no_paragraph) {
|
||||
|
@ -2250,6 +2250,7 @@ define([
|
|||
parentMenu: menu.items[i].menu,
|
||||
store: equationsStore.at(i).get('groupStore'),
|
||||
scrollAlwaysVisible: true,
|
||||
restoreHeight: 10000,
|
||||
itemTemplate: _.template(
|
||||
'<div class="item-equation">' +
|
||||
'<div class="equation-icon" style="background-position:<%= posX %>px <%= posY %>px;width:<%= width %>px;height:<%= height %>px;" id="<%= id %>"></div>' +
|
||||
|
@ -2287,7 +2288,7 @@ define([
|
|||
items: [
|
||||
{ template: _.template('<div id="id-toolbar-menu-equationgroup' + i +
|
||||
'" class="menu-shape" style="width:' + (equationGroup.get('groupWidth') + 8) + 'px; ' +
|
||||
equationGroup.get('groupHeight') + 'margin-left:5px;"></div>') }
|
||||
equationGroup.get('groupHeightStr') + 'margin-left:5px;"></div>') }
|
||||
]
|
||||
})
|
||||
});
|
||||
|
@ -2334,16 +2335,21 @@ define([
|
|||
var me = this;
|
||||
var onShowBefore = function(menu) {
|
||||
me.onMathTypes(me._equationTemp);
|
||||
if (me._equationTemp && me._equationTemp.get_Data().length>0)
|
||||
me.fillEquations();
|
||||
me.toolbar.btnInsertEquation.menu.off('show:before', onShowBefore);
|
||||
};
|
||||
me.toolbar.btnInsertEquation.menu.on('show:before', onShowBefore);
|
||||
},
|
||||
|
||||
onMathTypes: function(equation) {
|
||||
equation = equation || this._equationTemp;
|
||||
|
||||
var equationgrouparray = [],
|
||||
equationsStore = this.getCollection('EquationGroups');
|
||||
|
||||
equationsStore.reset();
|
||||
if (equationsStore.length>0)
|
||||
return;
|
||||
|
||||
// equations groups
|
||||
|
||||
|
@ -2351,18 +2357,18 @@ define([
|
|||
|
||||
// [translate, count cells, scroll]
|
||||
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Symbol ] = [this.textSymbols, 11];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Fraction ] = [this.textFraction, 4];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Script ] = [this.textScript, 4];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Radical ] = [this.textRadical, 4];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Integral ] = [this.textIntegral, 3, true];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.LargeOperator] = [this.textLargeOperator, 5, true];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Bracket ] = [this.textBracket, 4, true];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Function ] = [this.textFunction, 3, true];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Accent ] = [this.textAccent, 4];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.LimitLog ] = [this.textLimitAndLog, 3];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Operator ] = [this.textOperator, 4];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Matrix ] = [this.textMatrix, 4, true];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Symbol ] = [this.textSymbols, 11, false, 'svg-icon-symbols'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Fraction ] = [this.textFraction, 4, false, 'svg-icon-fraction'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Script ] = [this.textScript, 4, false, 'svg-icon-script'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Radical ] = [this.textRadical, 4, false, 'svg-icon-radical'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Integral ] = [this.textIntegral, 3, true, 'svg-icon-integral'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.LargeOperator] = [this.textLargeOperator, 5, true, 'svg-icon-largeOperator'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Bracket ] = [this.textBracket, 4, true, 'svg-icon-bracket'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Function ] = [this.textFunction, 3, true, 'svg-icon-function'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Accent ] = [this.textAccent, 4, false, 'svg-icon-accent'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.LimitLog ] = [this.textLimitAndLog, 3, false, 'svg-icon-limAndLog'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Operator ] = [this.textOperator, 4, false, 'svg-icon-operator'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Matrix ] = [this.textMatrix, 4, true, 'svg-icon-matrix'];
|
||||
|
||||
// equations sub groups
|
||||
|
||||
|
@ -2432,12 +2438,14 @@ define([
|
|||
groupName : c_oAscMathMainTypeStrings[id][0],
|
||||
groupStore : store,
|
||||
groupWidth : width,
|
||||
groupHeight : c_oAscMathMainTypeStrings[id][2] ? ' height:'+ normHeight +'px!important; ' : ''
|
||||
groupHeight : normHeight,
|
||||
groupHeightStr : c_oAscMathMainTypeStrings[id][2] ? ' height:'+ normHeight +'px!important; ' : '',
|
||||
groupIcon: c_oAscMathMainTypeStrings[id][3]
|
||||
});
|
||||
}
|
||||
}
|
||||
equationsStore.add(equationgrouparray);
|
||||
this.fillEquations();
|
||||
// this.fillEquations();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1894,6 +1894,16 @@ define([
|
|||
caption : '--'
|
||||
});
|
||||
|
||||
me.menuParagraphEquation = new Common.UI.MenuItem({
|
||||
caption : me.advancedEquationText,
|
||||
menu : me.createEquationMenu('popupparaeqinput', 'tl-tr')
|
||||
});
|
||||
|
||||
me.menuTableEquation = new Common.UI.MenuItem({
|
||||
caption : me.advancedEquationText,
|
||||
menu : me.createEquationMenu('popuptableeqinput', 'tl-tr')
|
||||
});
|
||||
|
||||
me.menuAddToLayoutTable = new Common.UI.MenuItem({
|
||||
caption : me.addToLayoutText
|
||||
});
|
||||
|
@ -2028,6 +2038,14 @@ define([
|
|||
} else
|
||||
me.clearEquationMenu(true, 12);
|
||||
menuEquationSeparator.setVisible(isEquation && eqlen>0);
|
||||
|
||||
me.menuParagraphEquation.setVisible(isEquation);
|
||||
me.menuParagraphEquation.setDisabled(disabled);
|
||||
if (isEquation) {
|
||||
var eq = me.api.asc_GetMathInputType();
|
||||
me.menuParagraphEquation.menu.items[0].setChecked(eq===Asc.c_oAscMathInputType.Unicode);
|
||||
me.menuParagraphEquation.menu.items[1].setChecked(eq===Asc.c_oAscMathInputType.LaTeX);
|
||||
}
|
||||
},
|
||||
items: [
|
||||
me.menuSpellPara,
|
||||
|
@ -2046,6 +2064,7 @@ define([
|
|||
me.menuParagraphVAlign,
|
||||
me.menuParagraphDirection,
|
||||
me.menuParagraphAdvanced,
|
||||
me.menuParagraphEquation,
|
||||
menuCommentParaSeparator,
|
||||
/** coauthoring begin **/
|
||||
me.menuAddCommentPara,
|
||||
|
@ -2168,6 +2187,14 @@ define([
|
|||
menuHyperlinkSeparator.setVisible(menuHyperlinkSeparator.isVisible() && eqlen>0);
|
||||
} else
|
||||
me.clearEquationMenu(false, 6);
|
||||
|
||||
me.menuTableEquation.setVisible(isEquation);
|
||||
me.menuTableEquation.setDisabled(disabled);
|
||||
if (isEquation) {
|
||||
var eq = me.api.asc_GetMathInputType();
|
||||
me.menuTableEquation.menu.items[0].setChecked(eq===Asc.c_oAscMathInputType.Unicode);
|
||||
me.menuTableEquation.menu.items[1].setChecked(eq===Asc.c_oAscMathInputType.LaTeX);
|
||||
}
|
||||
},
|
||||
items: [
|
||||
me.menuSpellCheckTable,
|
||||
|
@ -2192,6 +2219,7 @@ define([
|
|||
menuHyperlinkSeparator,
|
||||
/** coauthoring begin **/
|
||||
me.menuAddCommentTable,
|
||||
me.menuTableEquation,
|
||||
/** coauthoring end **/
|
||||
me.menuAddHyperlinkTable,
|
||||
menuHyperlinkTable,
|
||||
|
@ -2362,6 +2390,60 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
createEquationMenu: function(toggleGroup, menuAlign) {
|
||||
return new Common.UI.Menu({
|
||||
cls: 'ppm-toolbar shifted-right',
|
||||
menuAlign: menuAlign,
|
||||
items : [
|
||||
new Common.UI.MenuItem({
|
||||
caption : this.unicodeText,
|
||||
iconCls : 'menu__icon unicode',
|
||||
checkable : true,
|
||||
checkmark : false,
|
||||
checked : false,
|
||||
toggleGroup : toggleGroup,
|
||||
type : 'input',
|
||||
value : Asc.c_oAscMathInputType.Unicode
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : this.latexText,
|
||||
iconCls : 'menu__icon latex',
|
||||
checkable : true,
|
||||
checkmark : false,
|
||||
checked : false,
|
||||
toggleGroup : toggleGroup,
|
||||
type : 'input',
|
||||
value : Asc.c_oAscMathInputType.LaTeX
|
||||
}),
|
||||
{ caption : '--' },
|
||||
new Common.UI.MenuItem({
|
||||
caption : this.currProfText,
|
||||
iconCls : 'menu__icon professional-equation',
|
||||
type : 'view',
|
||||
value : {all: false, linear: false}
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : this.currLinearText,
|
||||
iconCls : 'menu__icon linear-equation',
|
||||
type : 'view',
|
||||
value : {all: false, linear: true}
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : this.allProfText,
|
||||
iconCls : 'menu__icon professional-equation',
|
||||
type : 'view',
|
||||
value : {all: true, linear: false}
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : this.allLinearText,
|
||||
iconCls : 'menu__icon linear-equation',
|
||||
type : 'view',
|
||||
value : {all: true, linear: true}
|
||||
})
|
||||
]
|
||||
});
|
||||
},
|
||||
|
||||
unitsChanged: function(m) {
|
||||
this._state.unitsChanged = true;
|
||||
},
|
||||
|
@ -2567,7 +2649,14 @@ define([
|
|||
textCm: 'cm',
|
||||
textCustom: 'Custom',
|
||||
textRulers: 'Rulers',
|
||||
textDeleteGuide: 'Delete Guide'
|
||||
textDeleteGuide: 'Delete Guide',
|
||||
advancedEquationText: 'Equation Settings',
|
||||
unicodeText: 'Unicode',
|
||||
latexText: 'LaTeX',
|
||||
currProfText: 'Current - Professional',
|
||||
currLinearText: 'Current - Linear',
|
||||
allProfText: 'All - Professional',
|
||||
allLinearText: 'All - Linear'
|
||||
|
||||
}, PE.Views.DocumentHolder || {}));
|
||||
});
|
|
@ -782,7 +782,7 @@ define([
|
|||
cls: 'btn-toolbar x-huge icon-top',
|
||||
iconCls: 'toolbar__icon btn-insertequation',
|
||||
caption: me.capInsertEquation,
|
||||
lock: [_set.slideDeleted, _set.lostConnect, _set.noSlides, _set.disableOnStart],
|
||||
lock: [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.disableOnStart],
|
||||
split: true,
|
||||
menu: new Common.UI.Menu({cls: 'menu-shapes'}),
|
||||
dataHint: '1',
|
||||
|
|
|
@ -345,6 +345,7 @@
|
|||
<img class="inline-svg" src="../../common/main/resources/img/header/icons.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/toolbar/shapetypes.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/toolbar/charttypes.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/toolbar/equationicons.svg">
|
||||
<script>
|
||||
var svgpoints = document.querySelectorAll('img.inline-svg');
|
||||
SVGInjector(svgpoints);
|
||||
|
|
|
@ -365,6 +365,7 @@
|
|||
<inline src="../../common/main/resources/img/header/icons.svg" />
|
||||
<inline src="../../common/main/resources/img/toolbar/shapetypes.svg" />
|
||||
<inline src="../../common/main/resources/img/toolbar/charttypes.svg" />
|
||||
<inline src="../../common/main/resources/img/toolbar/equationicons.svg" />
|
||||
|
||||
<script src="../../../../../../sdkjs/common/device_scale.js?__inline=true"></script>
|
||||
<script data-main="app" src="../../../vendor/requirejs/require.js"></script>
|
||||
|
|
|
@ -261,6 +261,7 @@
|
|||
<img class="inline-svg" src="../../common/main/resources/img/header/icons.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/toolbar/shapetypes.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/toolbar/charttypes.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/toolbar/equationicons.svg">
|
||||
<script>
|
||||
var svgpoints = document.querySelectorAll('img.inline-svg');
|
||||
SVGInjector(svgpoints);
|
||||
|
|
|
@ -321,6 +321,7 @@
|
|||
<inline src="../../common/main/resources/img/header/icons.svg" />
|
||||
<inline src="../../common/main/resources/img/toolbar/shapetypes.svg" />
|
||||
<inline src="../../common/main/resources/img/toolbar/charttypes.svg" />
|
||||
<inline src="../../common/main/resources/img/toolbar/equationicons.svg" />
|
||||
|
||||
<div id="viewport"></div>
|
||||
|
||||
|
|
|
@ -1787,6 +1787,13 @@
|
|||
"PE.Views.DocumentHolder.txtUngroup": "Ungroup",
|
||||
"PE.Views.DocumentHolder.txtWarnUrl": "Clicking this link can be harmful to your device and data.<br>Are you sure you want to continue?",
|
||||
"PE.Views.DocumentHolder.vertAlignText": "Vertical Alignment",
|
||||
"PE.Views.DocumentHolder.advancedEquationText": "Equation Settings",
|
||||
"PE.Views.DocumentHolder.unicodeText": "Unicode",
|
||||
"PE.Views.DocumentHolder.latexText": "LaTeX",
|
||||
"PE.Views.DocumentHolder.currProfText": "Current - Professional",
|
||||
"PE.Views.DocumentHolder.currLinearText": "Current - Linear",
|
||||
"PE.Views.DocumentHolder.allProfText": "All - Professional",
|
||||
"PE.Views.DocumentHolder.allLinearText": "All - Linear",
|
||||
"PE.Views.DocumentPreview.goToSlideText": "Go to Slide",
|
||||
"PE.Views.DocumentPreview.slideIndexText": "Slide {0} of {1}",
|
||||
"PE.Views.DocumentPreview.txtClose": "Close slideshow",
|
||||
|
|
|
@ -96,7 +96,8 @@
|
|||
}
|
||||
}
|
||||
|
||||
#special-paste-container {
|
||||
#special-paste-container,
|
||||
#equation-container {
|
||||
position: absolute;
|
||||
z-index: @zindex-dropdown - 20;
|
||||
background-color: @background-toolbar-ie;
|
||||
|
@ -105,6 +106,13 @@
|
|||
border: @scaled-one-px-value solid @border-regular-control;
|
||||
}
|
||||
|
||||
#equation-container {
|
||||
padding: 4px;
|
||||
.separator {
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.item-theme {
|
||||
width: 88px;
|
||||
height: 40px;
|
||||
|
|
|
@ -268,6 +268,7 @@ define([
|
|||
view.menuImgMacro.on('click', _.bind(me.onImgMacro, me));
|
||||
view.menuImgEditPoints.on('click', _.bind(me.onImgEditPoints, me));
|
||||
view.pmiGetRangeList.on('click', _.bind(me.onGetLink, me));
|
||||
view.menuParagraphEquation.menu.on('item:click', _.bind(me.convertEquation, me));
|
||||
|
||||
if (!me.permissions.isEditMailMerge && !me.permissions.isEditDiagram && !me.permissions.isEditOle) {
|
||||
var oleEditor = me.getApplication().getController('Common.Controllers.ExternalOleEditor').getView('Common.Views.ExternalOleEditor');
|
||||
|
@ -383,6 +384,8 @@ define([
|
|||
this.api.asc_registerCallback('asc_onUpdateExternalReference', _.bind(this.onUpdateExternalReference, this));
|
||||
Common.Gateway.on('setreferencedata', _.bind(this.setReferenceData, this));
|
||||
}
|
||||
this.api.asc_registerCallback('asc_onShowMathTrack', _.bind(this.onShowMathTrack, this));
|
||||
this.api.asc_registerCallback('asc_onHideMathTrack', _.bind(this.onHideMathTrack, this));
|
||||
}
|
||||
this.api.asc_registerCallback('asc_onShowForeignCursorLabel', _.bind(this.onShowForeignCursorLabel, this));
|
||||
this.api.asc_registerCallback('asc_onHideForeignCursorLabel', _.bind(this.onHideForeignCursorLabel, this));
|
||||
|
@ -1855,6 +1858,7 @@ define([
|
|||
me.documentHolder.cmpEl.offset().top - $(window).scrollTop()
|
||||
];
|
||||
me.tooltips.coauth.apiHeight = me.documentHolder.cmpEl.height();
|
||||
me.tooltips.coauth.apiWidth = me.documentHolder.cmpEl.width();
|
||||
var rightMenu = $('#right-menu');
|
||||
me.tooltips.coauth.rightMenuWidth = rightMenu.is(':visible') ? rightMenu.width() : 0;
|
||||
me.tooltips.coauth.bodyWidth = $(window).width();
|
||||
|
@ -1984,6 +1988,28 @@ define([
|
|||
this.currentMenu && this.currentMenu.isVisible()){
|
||||
(this.permissions.isEdit && !this._isDisabled) ? this.fillMenuProps(info, true) : this.fillViewMenuProps(info, true);
|
||||
}
|
||||
|
||||
if (!this.mouse.isLeftButtonDown) return;
|
||||
|
||||
if (this.permissions && this.permissions.isEdit) {
|
||||
var selectedObjects = this.api.asc_getGraphicObjectProps(),
|
||||
i = -1,
|
||||
in_equation = false,
|
||||
locked = false;
|
||||
while (++i < selectedObjects.length) {
|
||||
var type = selectedObjects[i].asc_getObjectType();
|
||||
if (type === Asc.c_oAscTypeSelectElement.Math) {
|
||||
in_equation = true;
|
||||
} else if (type === Asc.c_oAscTypeSelectElement.Paragraph) {
|
||||
var value = selectedObjects[i].asc_getObjectValue();
|
||||
value && (locked = locked || value.asc_getLocked());
|
||||
}
|
||||
}
|
||||
if (in_equation) {
|
||||
this._state.equationLocked = locked;
|
||||
this.disableEquationBar();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
fillMenuProps: function(cellinfo, showMenu, event){
|
||||
|
@ -2267,6 +2293,14 @@ define([
|
|||
} else
|
||||
this.clearEquationMenu(4);
|
||||
|
||||
documentHolder.menuParagraphEquation.setVisible(isEquation);
|
||||
documentHolder.menuParagraphEquation.setDisabled(isObjLocked);
|
||||
if (isEquation) {
|
||||
var eq = this.api.asc_GetMathInputType();
|
||||
documentHolder.menuParagraphEquation.menu.items[0].setChecked(eq===Asc.c_oAscMathInputType.Unicode);
|
||||
documentHolder.menuParagraphEquation.menu.items[1].setChecked(eq===Asc.c_oAscMathInputType.LaTeX);
|
||||
}
|
||||
|
||||
if (showMenu) this.showPopupMenu(documentHolder.textInShapeMenu, {}, event);
|
||||
|
||||
documentHolder.menuParagraphBullets.setDisabled(isSmartArt || isSmartArtInternal);
|
||||
|
@ -2422,6 +2456,7 @@ define([
|
|||
documentHolder.menuParagraphVAlign.setVisible(false); // убрать после того, как заголовок можно будет растягивать по вертикали!!
|
||||
documentHolder.menuParagraphDirection.setVisible(false); // убрать после того, как заголовок можно будет растягивать по вертикали!!
|
||||
documentHolder.pmiTextAdvanced.setVisible(false);
|
||||
documentHolder.menuParagraphEquation.setVisible(false);
|
||||
documentHolder.textInShapeMenu.items[9].setVisible(false);
|
||||
documentHolder.menuParagraphBullets.setVisible(false);
|
||||
documentHolder.textInShapeMenu.items[3].setVisible(false);
|
||||
|
@ -4278,6 +4313,144 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
onShowMathTrack: function(bounds) {
|
||||
if (bounds[3] < 0) {
|
||||
this.onHideMathTrack();
|
||||
return;
|
||||
}
|
||||
var me = this,
|
||||
documentHolder = me.documentHolder,
|
||||
eqContainer = documentHolder.cmpEl.find('#equation-container');
|
||||
|
||||
// Prepare menu container
|
||||
if (eqContainer.length < 1) {
|
||||
var equationsStore = me.getApplication().getCollection('EquationGroups'),
|
||||
eqStr = '<div id="equation-container" style="position: absolute;">';
|
||||
|
||||
me.getApplication().getController('Toolbar').onMathTypes();
|
||||
|
||||
me.equationBtns = [];
|
||||
for (var i = 0; i < equationsStore.length; ++i) {
|
||||
var style = 'margin-right: 8px;' + (i==0 ? 'margin-left: 5px;' : '');
|
||||
eqStr += '<span id="id-document-holder-btn-equation-' + i + '" style="' + style +'"></span>';
|
||||
}
|
||||
eqStr += '<div class="separator"></div>';
|
||||
eqStr += '<span id="id-document-holder-btn-equation-settings" style="margin-right: 5px; margin-left: 8px;"></span>';
|
||||
eqStr += '</div>';
|
||||
eqContainer = $(eqStr);
|
||||
documentHolder.cmpEl.append(eqContainer);
|
||||
var onShowBefore = function (menu) {
|
||||
var index = menu.options.value,
|
||||
group = equationsStore.at(index);
|
||||
var equationPicker = new Common.UI.DataViewSimple({
|
||||
el: $('#id-document-holder-btn-equation-menu-' + index, menu.cmpEl),
|
||||
parentMenu: menu,
|
||||
store: group.get('groupStore'),
|
||||
scrollAlwaysVisible: true,
|
||||
showLast: false,
|
||||
restoreHeight: group.get('groupHeight') ? parseInt(group.get('groupHeight')) : true,
|
||||
itemTemplate: _.template(
|
||||
'<div class="item-equation" style="" >' +
|
||||
'<div class="equation-icon" style="background-position:<%= posX %>px <%= posY %>px;width:<%= width %>px;height:<%= height %>px;" id="<%= id %>"></div>' +
|
||||
'</div>')
|
||||
});
|
||||
equationPicker.on('item:click', function(picker, item, record, e) {
|
||||
if (me.api) {
|
||||
if (record)
|
||||
me.api.asc_AddMath(record.get('data').equationType);
|
||||
}
|
||||
});
|
||||
menu.off('show:before', onShowBefore);
|
||||
};
|
||||
for (var i = 0; i < equationsStore.length; ++i) {
|
||||
var equationGroup = equationsStore.at(i);
|
||||
var btn = new Common.UI.Button({
|
||||
parentEl: $('#id-document-holder-btn-equation-' + i, documentHolder.cmpEl),
|
||||
cls : 'btn-toolbar no-caret',
|
||||
iconCls : 'svgicon ' + equationGroup.get('groupIcon'),
|
||||
hint : equationGroup.get('groupName'),
|
||||
menu : new Common.UI.Menu({
|
||||
cls: 'menu-shapes',
|
||||
value: i,
|
||||
restoreHeight: equationGroup.get('groupHeight') ? parseInt(equationGroup.get('groupHeight')) : true,
|
||||
items: [
|
||||
{ template: _.template('<div id="id-document-holder-btn-equation-menu-' + i +
|
||||
'" class="menu-shape" style="width:' + (equationGroup.get('groupWidth') + 8) + 'px; ' +
|
||||
equationGroup.get('groupHeightStr') + 'margin-left:5px;"></div>') }
|
||||
]
|
||||
})
|
||||
});
|
||||
btn.menu.on('show:before', onShowBefore);
|
||||
me.equationBtns.push(btn);
|
||||
}
|
||||
|
||||
me.equationSettingsBtn = new Common.UI.Button({
|
||||
parentEl: $('#id-document-holder-btn-equation-settings', documentHolder.cmpEl),
|
||||
cls : 'btn-toolbar no-caret',
|
||||
iconCls : 'toolbar__icon more-vertical',
|
||||
hint : me.documentHolder.advancedEquationText,
|
||||
menu : me.documentHolder.createEquationMenu('popuptbeqinput', 'tl-bl')
|
||||
});
|
||||
me.equationSettingsBtn.menu.options.initMenu = function() {
|
||||
var eq = me.api.asc_GetMathInputType();
|
||||
var menu = me.equationSettingsBtn.menu;
|
||||
menu.items[0].setChecked(eq===Asc.c_oAscMathInputType.Unicode);
|
||||
menu.items[1].setChecked(eq===Asc.c_oAscMathInputType.LaTeX);
|
||||
};
|
||||
me.equationSettingsBtn.menu.on('item:click', _.bind(me.convertEquation, me));
|
||||
me.equationSettingsBtn.menu.on('show:before', function(menu) {
|
||||
menu.options.initMenu();
|
||||
});
|
||||
}
|
||||
|
||||
if (!me.tooltips.coauth.XY)
|
||||
me.onDocumentResize();
|
||||
|
||||
var showPoint = [(bounds[0] + bounds[2])/2 - eqContainer.outerWidth()/2, bounds[1] - eqContainer.outerHeight() - 10];
|
||||
if (showPoint[1]<0) {
|
||||
showPoint[1] = bounds[3] + 10;
|
||||
}
|
||||
eqContainer.css({left: showPoint[0], top : Math.min(me.tooltips.coauth.apiHeight - eqContainer.outerHeight(), Math.max(0, showPoint[1]))});
|
||||
// menu.menuAlign = validation ? 'tr-br' : 'tl-bl';
|
||||
if (eqContainer.is(':visible')) {
|
||||
if (me.equationSettingsBtn.menu.isVisible()) {
|
||||
me.equationSettingsBtn.menu.options.initMenu();
|
||||
me.equationSettingsBtn.menu.alignPosition();
|
||||
}
|
||||
} else {
|
||||
eqContainer.show();
|
||||
}
|
||||
me.disableEquationBar();
|
||||
},
|
||||
|
||||
onHideMathTrack: function() {
|
||||
var eqContainer = this.documentHolder.cmpEl.find('#equation-container');
|
||||
if (eqContainer.is(':visible')) {
|
||||
eqContainer.hide();
|
||||
}
|
||||
},
|
||||
|
||||
disableEquationBar: function() {
|
||||
var eqContainer = this.documentHolder.cmpEl.find('#equation-container'),
|
||||
disabled = this._isDisabled || this._state.equationLocked;
|
||||
|
||||
if (eqContainer.length>0 && eqContainer.is(':visible')) {
|
||||
this.equationBtns.forEach(function(item){
|
||||
item && item.setDisabled(!!disabled);
|
||||
});
|
||||
this.equationSettingsBtn.setDisabled(!!disabled);
|
||||
}
|
||||
},
|
||||
|
||||
convertEquation: function(menu, item, e) {
|
||||
if (this.api) {
|
||||
if (item.options.type=='input')
|
||||
this.api.asc_SetMathInputType(item.value);
|
||||
else if (item.options.type=='view')
|
||||
this.api.asc_ConvertMathView(item.value.linear, item.value.all);
|
||||
}
|
||||
},
|
||||
|
||||
getUserName: function(id){
|
||||
var usersStore = SSE.getCollection('Common.Collections.Users');
|
||||
if (usersStore){
|
||||
|
@ -4301,6 +4474,7 @@ define([
|
|||
SetDisabled: function(state, canProtect) {
|
||||
this._isDisabled = state;
|
||||
this._canProtect = canProtect;
|
||||
this.disableEquationBar();
|
||||
},
|
||||
|
||||
guestText : 'Guest',
|
||||
|
|
|
@ -3947,6 +3947,7 @@ define([
|
|||
parentMenu: menu.items[i].menu,
|
||||
store: equationsStore.at(i).get('groupStore'),
|
||||
scrollAlwaysVisible: true,
|
||||
restoreHeight: 10000,
|
||||
itemTemplate: _.template(
|
||||
'<div class="item-equation">' +
|
||||
'<div class="equation-icon" style="background-position:<%= posX %>px <%= posY %>px;width:<%= width %>px;height:<%= height %>px;" id="<%= id %>"></div>' +
|
||||
|
@ -3984,7 +3985,7 @@ define([
|
|||
items: [
|
||||
{ template: _.template('<div id="id-toolbar-menu-equationgroup' + i +
|
||||
'" class="menu-shape" style="width:' + (equationGroup.get('groupWidth') + 8) + 'px; ' +
|
||||
equationGroup.get('groupHeight') + 'margin-left:5px;"></div>') }
|
||||
equationGroup.get('groupHeightStr') + 'margin-left:5px;"></div>') }
|
||||
]
|
||||
})
|
||||
});
|
||||
|
@ -4051,16 +4052,21 @@ define([
|
|||
var me = this;
|
||||
var onShowBefore = function(menu) {
|
||||
me.onMathTypes(me._equationTemp);
|
||||
if (me._equationTemp && me._equationTemp.get_Data().length>0)
|
||||
me.fillEquations();
|
||||
me.toolbar.btnInsertEquation.menu.off('show:before', onShowBefore);
|
||||
};
|
||||
me.toolbar.btnInsertEquation.menu.on('show:before', onShowBefore);
|
||||
},
|
||||
|
||||
onMathTypes: function(equation) {
|
||||
equation = equation || this._equationTemp;
|
||||
|
||||
var equationgrouparray = [],
|
||||
equationsStore = this.getCollection('EquationGroups');
|
||||
|
||||
equationsStore.reset();
|
||||
if (equationsStore.length>0)
|
||||
return;
|
||||
|
||||
// equations groups
|
||||
|
||||
|
@ -4068,18 +4074,18 @@ define([
|
|||
|
||||
// [translate, count cells, scroll]
|
||||
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Symbol ] = [this.textSymbols, 11];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Fraction ] = [this.textFraction, 4];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Script ] = [this.textScript, 4];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Radical ] = [this.textRadical, 4];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Integral ] = [this.textIntegral, 3, true];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.LargeOperator] = [this.textLargeOperator, 5, true];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Bracket ] = [this.textBracket, 4, true];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Function ] = [this.textFunction, 3, true];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Accent ] = [this.textAccent, 4];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.LimitLog ] = [this.textLimitAndLog, 3];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Operator ] = [this.textOperator, 4];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Matrix ] = [this.textMatrix, 4, true];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Symbol ] = [this.textSymbols, 11, false, 'svg-icon-symbols'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Fraction ] = [this.textFraction, 4, false, 'svg-icon-fraction'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Script ] = [this.textScript, 4, false, 'svg-icon-script'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Radical ] = [this.textRadical, 4, false, 'svg-icon-radical'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Integral ] = [this.textIntegral, 3, true, 'svg-icon-integral'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.LargeOperator] = [this.textLargeOperator, 5, true, 'svg-icon-largeOperator'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Bracket ] = [this.textBracket, 4, true, 'svg-icon-bracket'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Function ] = [this.textFunction, 3, true, 'svg-icon-function'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Accent ] = [this.textAccent, 4, false, 'svg-icon-accent'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.LimitLog ] = [this.textLimitAndLog, 3, false, 'svg-icon-limAndLog'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Operator ] = [this.textOperator, 4, false, 'svg-icon-operator'];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Matrix ] = [this.textMatrix, 4, true, 'svg-icon-matrix'];
|
||||
|
||||
// equations sub groups
|
||||
|
||||
|
@ -4149,12 +4155,14 @@ define([
|
|||
groupName : c_oAscMathMainTypeStrings[id][0],
|
||||
groupStore : store,
|
||||
groupWidth : width,
|
||||
groupHeight : c_oAscMathMainTypeStrings[id][2] ? ' height:'+ normHeight +'px!important; ' : ''
|
||||
groupHeight : normHeight,
|
||||
groupHeightStr : c_oAscMathMainTypeStrings[id][2] ? ' height:'+ normHeight +'px!important; ' : '',
|
||||
groupIcon: c_oAscMathMainTypeStrings[id][3]
|
||||
});
|
||||
}
|
||||
}
|
||||
equationsStore.add(equationgrouparray);
|
||||
this.fillEquations();
|
||||
// this.fillEquations();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1074,6 +1074,11 @@ define([
|
|||
value : 'paste'
|
||||
});
|
||||
|
||||
me.menuParagraphEquation = new Common.UI.MenuItem({
|
||||
caption : me.advancedEquationText,
|
||||
menu : me.createEquationMenu('popupparaeqinput', 'tl-tr')
|
||||
});
|
||||
|
||||
this.textInShapeMenu = new Common.UI.Menu({
|
||||
cls: 'shifted-right',
|
||||
items: [
|
||||
|
@ -1087,7 +1092,8 @@ define([
|
|||
me.menuAddHyperlinkShape,
|
||||
me.menuHyperlinkShape,
|
||||
{caption: '--'},
|
||||
me.pmiTextAdvanced
|
||||
me.pmiTextAdvanced,
|
||||
me.menuParagraphEquation
|
||||
]
|
||||
});
|
||||
|
||||
|
@ -1167,6 +1173,60 @@ define([
|
|||
item.setCaption(add ? this.txtAddComment : (editable ? this.txtEditComment : this.txtShowComment), true);
|
||||
},
|
||||
|
||||
createEquationMenu: function(toggleGroup, menuAlign) {
|
||||
return new Common.UI.Menu({
|
||||
cls: 'ppm-toolbar shifted-right',
|
||||
menuAlign: menuAlign,
|
||||
items : [
|
||||
new Common.UI.MenuItem({
|
||||
caption : this.unicodeText,
|
||||
iconCls : 'menu__icon unicode',
|
||||
checkable : true,
|
||||
checkmark : false,
|
||||
checked : false,
|
||||
toggleGroup : toggleGroup,
|
||||
type : 'input',
|
||||
value : Asc.c_oAscMathInputType.Unicode
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : this.latexText,
|
||||
iconCls : 'menu__icon latex',
|
||||
checkable : true,
|
||||
checkmark : false,
|
||||
checked : false,
|
||||
toggleGroup : toggleGroup,
|
||||
type : 'input',
|
||||
value : Asc.c_oAscMathInputType.LaTeX
|
||||
}),
|
||||
{ caption : '--' },
|
||||
new Common.UI.MenuItem({
|
||||
caption : this.currProfText,
|
||||
iconCls : 'menu__icon professional-equation',
|
||||
type : 'view',
|
||||
value : {all: false, linear: false}
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : this.currLinearText,
|
||||
iconCls : 'menu__icon linear-equation',
|
||||
type : 'view',
|
||||
value : {all: false, linear: true}
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : this.allProfText,
|
||||
iconCls : 'menu__icon professional-equation',
|
||||
type : 'view',
|
||||
value : {all: true, linear: false}
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : this.allLinearText,
|
||||
iconCls : 'menu__icon linear-equation',
|
||||
type : 'view',
|
||||
value : {all: true, linear: true}
|
||||
})
|
||||
]
|
||||
});
|
||||
},
|
||||
|
||||
txtSort: 'Sort',
|
||||
txtAscending: 'Ascending',
|
||||
txtDescending: 'Descending',
|
||||
|
@ -1325,7 +1385,14 @@ define([
|
|||
chartDataText: 'Select Chart Data',
|
||||
chartTypeText: 'Change Chart Type',
|
||||
txtGetLink: 'Get link to this range',
|
||||
txtRefresh: 'Refresh'
|
||||
txtRefresh: 'Refresh',
|
||||
advancedEquationText: 'Equation Settings',
|
||||
unicodeText: 'Unicode',
|
||||
latexText: 'LaTeX',
|
||||
currProfText: 'Current - Professional',
|
||||
currLinearText: 'Current - Linear',
|
||||
allProfText: 'All - Professional',
|
||||
allLinearText: 'All - Linear'
|
||||
|
||||
}, SSE.Views.DocumentHolder || {}));
|
||||
});
|
|
@ -368,6 +368,7 @@
|
|||
<img class="inline-svg" src="../../common/main/resources/img/toolbar/shapetypes.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/toolbar/charttypes.svg">
|
||||
<img class="inline-svg" src="resources/img/cf-icons.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/toolbar/equationicons.svg">
|
||||
<script>
|
||||
var svgpoints = document.querySelectorAll('img.inline-svg');
|
||||
SVGInjector(svgpoints);
|
||||
|
|
|
@ -379,6 +379,7 @@
|
|||
<inline src="../../common/main/resources/img/header/icons.svg" />
|
||||
<inline src="../../common/main/resources/img/toolbar/shapetypes.svg" />
|
||||
<inline src="../../common/main/resources/img/toolbar/charttypes.svg" />
|
||||
<inline src="../../common/main/resources/img/toolbar/equationicons.svg" />
|
||||
<inline src="resources/img/cf-icons.svg" />
|
||||
|
||||
<script src="../../../../../../sdkjs/common/device_scale.js?__inline=true"></script>
|
||||
|
|
|
@ -262,6 +262,7 @@
|
|||
<img class="inline-svg" src="../../common/main/resources/img/header/icons.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/toolbar/shapetypes.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/toolbar/charttypes.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/toolbar/equationicons.svg">
|
||||
<img class="inline-svg" src="resources/img/cf-icons.svg">
|
||||
<script>
|
||||
var svgpoints = document.querySelectorAll('img.inline-svg');
|
||||
|
|
|
@ -320,6 +320,7 @@
|
|||
<inline src="../../common/main/resources/img/header/icons.svg" />
|
||||
<inline src="../../common/main/resources/img/toolbar/shapetypes.svg" />
|
||||
<inline src="../../common/main/resources/img/toolbar/charttypes.svg" />
|
||||
<inline src="../../common/main/resources/img/toolbar/equationicons.svg" />
|
||||
<inline src="resources/img/cf-icons.svg" />
|
||||
|
||||
<div id="viewport"></div>
|
||||
|
|
|
@ -2263,6 +2263,13 @@
|
|||
"SSE.Views.DocumentHolder.txtUngroup": "Ungroup",
|
||||
"SSE.Views.DocumentHolder.txtWidth": "Width",
|
||||
"SSE.Views.DocumentHolder.vertAlignText": "Vertical Alignment",
|
||||
"SSE.Views.DocumentHolder.advancedEquationText": "Equation Settings",
|
||||
"SSE.Views.DocumentHolder.unicodeText": "Unicode",
|
||||
"SSE.Views.DocumentHolder.latexText": "LaTeX",
|
||||
"SSE.Views.DocumentHolder.currProfText": "Current - Professional",
|
||||
"SSE.Views.DocumentHolder.currLinearText": "Current - Linear",
|
||||
"SSE.Views.DocumentHolder.allProfText": "All - Professional",
|
||||
"SSE.Views.DocumentHolder.allLinearText": "All - Linear",
|
||||
"SSE.Views.ExternalLinksDlg.closeButtonText": "Close",
|
||||
"SSE.Views.ExternalLinksDlg.textDelete": "Break Links",
|
||||
"SSE.Views.ExternalLinksDlg.textDeleteAll": "Break All Links",
|
||||
|
|
|
@ -108,7 +108,8 @@
|
|||
}
|
||||
|
||||
#special-paste-container,
|
||||
#autocorrect-paste-container {
|
||||
#autocorrect-paste-container,
|
||||
#equation-container {
|
||||
position: absolute;
|
||||
z-index: @zindex-dropdown - 20;
|
||||
background-color: @background-toolbar-ie;
|
||||
|
@ -117,6 +118,13 @@
|
|||
border: @scaled-one-px-value solid @border-regular-control;
|
||||
}
|
||||
|
||||
#equation-container {
|
||||
padding: 4px;
|
||||
.separator {
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
#slot-field-fontsize {
|
||||
width: 45px;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue