Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
web-apps
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
web-apps
Commits
05431979
Commit
05431979
authored
Oct 25, 2016
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PE] Added equations.
parent
0a853a9c
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
1840 additions
and
14 deletions
+1840
-14
apps/presentationeditor/main/app/collection/EquationGroups.js
.../presentationeditor/main/app/collection/EquationGroups.js
+53
-0
apps/presentationeditor/main/app/controller/Main.js
apps/presentationeditor/main/app/controller/Main.js
+3
-1
apps/presentationeditor/main/app/controller/Toolbar.js
apps/presentationeditor/main/app/controller/Toolbar.js
+551
-3
apps/presentationeditor/main/app/model/EquationGroup.js
apps/presentationeditor/main/app/model/EquationGroup.js
+71
-0
apps/presentationeditor/main/app/template/Toolbar.template
apps/presentationeditor/main/app/template/Toolbar.template
+1
-0
apps/presentationeditor/main/app/view/DocumentHolder.js
apps/presentationeditor/main/app/view/DocumentHolder.js
+731
-4
apps/presentationeditor/main/app/view/Toolbar.js
apps/presentationeditor/main/app/view/Toolbar.js
+23
-5
apps/presentationeditor/main/locale/en.json
apps/presentationeditor/main/locale/en.json
+399
-0
apps/presentationeditor/main/resources/img/toolbar/math.png
apps/presentationeditor/main/resources/img/toolbar/math.png
+0
-0
apps/presentationeditor/main/resources/img/toolbar/math@2x.png
...presentationeditor/main/resources/img/toolbar/math@2x.png
+0
-0
apps/presentationeditor/main/resources/less/toolbar.less
apps/presentationeditor/main/resources/less/toolbar.less
+6
-0
apps/spreadsheeteditor/main/app/controller/Toolbar.js
apps/spreadsheeteditor/main/app/controller/Toolbar.js
+1
-1
apps/spreadsheeteditor/main/locale/en.json
apps/spreadsheeteditor/main/locale/en.json
+1
-0
No files found.
apps/presentationeditor/main/app/collection/EquationGroups.js
0 → 100644
View file @
05431979
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* 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 Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* 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
*
*/
/**
* EquationGroups.js
*
* Created by Alexey Musinov on 29/10/14
* Copyright (c) 2014 Ascensio System SIA. All rights reserved.
*
*/
define
([
'
backbone
'
,
'
presentationeditor/main/app/model/EquationGroup
'
],
function
(
Backbone
){
'
use strict
'
;
if
(
Common
===
undefined
)
var
Common
=
{};
Common
.
Collections
=
Common
.
Collections
||
{};
PE
.
Collections
.
EquationGroups
=
Backbone
.
Collection
.
extend
({
model
:
PE
.
Models
.
EquationGroup
});
});
apps/presentationeditor/main/app/controller/Main.js
View file @
05431979
...
...
@@ -50,7 +50,8 @@ define([
'
common/main/lib/collection/TextArt
'
,
'
common/main/lib/view/OpenDialog
'
,
'
presentationeditor/main/app/collection/ShapeGroups
'
,
'
presentationeditor/main/app/collection/SlideLayouts
'
'
presentationeditor/main/app/collection/SlideLayouts
'
,
'
presentationeditor/main/app/collection/EquationGroups
'
],
function
()
{
'
use strict
'
;
PE
.
Controllers
.
Main
=
Backbone
.
Controller
.
extend
(
_
.
extend
((
function
()
{
...
...
@@ -72,6 +73,7 @@ define([
collections
:
[
'
ShapeGroups
'
,
'
SlideLayouts
'
,
'
EquationGroups
'
,
'
Common.Collections.TextArt
'
],
views
:
[],
...
...
apps/presentationeditor/main/app/controller/Toolbar.js
View file @
05431979
This diff is collapsed.
Click to expand it.
apps/presentationeditor/main/app/model/EquationGroup.js
0 → 100644
View file @
05431979
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* 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 Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* 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
*
*/
/**
* EquationGroup.js
*
* Created by Alexey Musinov on 29/10/14
* Copyright (c) 2014 Ascensio System SIA. All rights reserved.
*
*/
define
([
'
backbone
'
],
function
(
Backbone
){
'
use strict
'
;
PE
.
Models
=
PE
.
Models
||
{};
PE
.
Models
.
EquationModel
=
Backbone
.
Model
.
extend
({
defaults
:
function
()
{
return
{
id
:
Common
.
UI
.
getId
(),
data
:
null
,
width
:
0
,
height
:
0
,
posX
:
0
,
posY
:
0
}
}
});
PE
.
Models
.
EquationGroup
=
Backbone
.
Model
.
extend
({
defaults
:
function
()
{
return
{
id
:
Common
.
UI
.
getId
(),
groupName
:
null
,
groupId
:
null
,
groupStore
:
null
}
}
});
});
apps/presentationeditor/main/app/template/Toolbar.template
View file @
05431979
...
...
@@ -163,6 +163,7 @@
<span class="btn-placeholder split" id="id-toolbar-full-placeholder-btn-insertimage"></span>
<span class="btn-placeholder split" id="id-toolbar-full-placeholder-btn-insertchart"></span>
<span class="btn-placeholder split" id="id-toolbar-full-placeholder-btn-inserttext"></span>
<span class="btn-placeholder split" id="id-toolbar-full-placeholder-btn-insertequation"></span>
</div>
<div class="toolbar-row">
<span class="btn-placeholder split" id="id-toolbar-full-placeholder-btn-inserttable"></span>
...
...
apps/presentationeditor/main/app/view/DocumentHolder.js
View file @
05431979
This diff is collapsed.
Click to expand it.
apps/presentationeditor/main/app/view/Toolbar.js
View file @
05431979
...
...
@@ -80,7 +80,8 @@ define([
noObjectSelected
:
'
no-object
'
,
disableOnStart
:
'
on-start
'
,
cantPrint
:
'
cant-print
'
,
noTextSelected
:
'
no-text
'
noTextSelected
:
'
no-text
'
,
inEquation
:
'
in-equation
'
};
PE
.
Views
.
Toolbar
=
Backbone
.
View
.
extend
(
_
.
extend
({
...
...
@@ -297,7 +298,7 @@ define([
id
:
'
id-toolbar-btn-superscript
'
,
cls
:
'
btn-toolbar
'
,
iconCls
:
'
btn-superscript
'
,
lock
:
[
_set
.
slideDeleted
,
_set
.
paragraphLock
,
_set
.
lostConnect
,
_set
.
noSlides
,
_set
.
noTextSelected
,
_set
.
shapeLock
],
lock
:
[
_set
.
slideDeleted
,
_set
.
paragraphLock
,
_set
.
lostConnect
,
_set
.
noSlides
,
_set
.
noTextSelected
,
_set
.
shapeLock
,
_set
.
inEquation
],
enableToggle
:
true
,
toggleGroup
:
'
superscriptGroup
'
});
...
...
@@ -307,7 +308,7 @@ define([
id
:
'
id-toolbar-btn-subscript
'
,
cls
:
'
btn-toolbar
'
,
iconCls
:
'
btn-subscript
'
,
lock
:
[
_set
.
slideDeleted
,
_set
.
paragraphLock
,
_set
.
lostConnect
,
_set
.
noSlides
,
_set
.
noTextSelected
,
_set
.
shapeLock
],
lock
:
[
_set
.
slideDeleted
,
_set
.
paragraphLock
,
_set
.
lostConnect
,
_set
.
noSlides
,
_set
.
noTextSelected
,
_set
.
shapeLock
,
_set
.
inEquation
],
enableToggle
:
true
,
toggleGroup
:
'
superscriptGroup
'
});
...
...
@@ -632,6 +633,16 @@ define([
});
me
.
slideOnlyControls
.
push
(
me
.
btnInsertText
);
this
.
btnInsertEquation
=
new
Common
.
UI
.
Button
({
id
:
'
id-toolbar-btn-insertequation
'
,
cls
:
'
btn-toolbar
'
,
iconCls
:
'
btn-insertequation
'
,
lock
:
[
_set
.
slideDeleted
,
_set
.
lostConnect
,
_set
.
noSlides
,
_set
.
disableOnStart
],
split
:
true
,
menu
:
new
Common
.
UI
.
Menu
({
cls
:
'
menu-shapes
'
})
});
this
.
slideOnlyControls
.
push
(
this
.
btnInsertEquation
);
me
.
btnInsertHyperlink
=
new
Common
.
UI
.
Button
({
id
:
'
id-toolbar-btn-inserthyperlink
'
,
cls
:
'
btn-toolbar
'
,
...
...
@@ -899,7 +910,7 @@ define([
this
.
btnSubscript
,
this
.
btnFontColor
,
this
.
btnClearStyle
,
this
.
btnCopyStyle
,
this
.
btnMarkers
,
this
.
btnNumbers
,
this
.
btnDecLeftOffset
,
this
.
btnIncLeftOffset
,
this
.
btnLineSpace
,
this
.
btnHorizontalAlign
,
this
.
btnVerticalAlign
,
this
.
btnShapeArrange
,
this
.
btnShapeAlign
,
this
.
btnInsertTable
,
this
.
btnInsertImage
,
this
.
btnInsertChart
,
this
.
btnInsertText
,
this
.
btnInsertChart
,
this
.
btnInsertText
,
this
.
btnInsertEquation
,
this
.
btnInsertHyperlink
,
this
.
btnInsertShape
,
this
.
btnColorSchemas
,
this
.
btnSlideSize
,
this
.
listTheme
,
this
.
mnuShowSettings
];
...
...
@@ -1034,6 +1045,7 @@ define([
replacePlacholder
(
'
#id-toolbar-
'
+
prefix
+
'
-placeholder-btn-align-shape
'
,
this
.
btnShapeAlign
);
replacePlacholder
(
'
#id-toolbar-
'
+
prefix
+
'
-placeholder-btn-insertshape
'
,
this
.
btnInsertShape
);
replacePlacholder
(
'
#id-toolbar-
'
+
prefix
+
'
-placeholder-btn-inserttext
'
,
this
.
btnInsertText
);
replacePlacholder
(
'
#id-toolbar-
'
+
prefix
+
'
-placeholder-btn-insertequation
'
,
this
.
btnInsertEquation
);
replacePlacholder
(
'
#id-toolbar-
'
+
prefix
+
'
-placeholder-btn-inserthyperlink
'
,
this
.
btnInsertHyperlink
);
replacePlacholder
(
'
#id-toolbar-
'
+
prefix
+
'
-placeholder-btn-inserttable
'
,
this
.
btnInsertTable
);
replacePlacholder
(
'
#id-toolbar-
'
+
prefix
+
'
-placeholder-btn-insertimage
'
,
this
.
btnInsertImage
);
...
...
@@ -1080,6 +1092,7 @@ define([
this
.
btnInsertImage
.
updateHint
(
this
.
tipInsertImage
);
this
.
btnInsertChart
.
updateHint
(
this
.
tipInsertChart
);
this
.
btnInsertText
.
updateHint
(
this
.
tipInsertText
);
this
.
btnInsertEquation
.
updateHint
(
this
.
tipInsertEquation
);
this
.
btnInsertHyperlink
.
updateHint
(
this
.
tipInsertHyperlink
+
Common
.
Utils
.
String
.
platformKey
(
'
Ctrl+K
'
));
this
.
btnInsertShape
.
updateHint
(
this
.
tipInsertShape
);
this
.
btnColorSchemas
.
updateHint
(
this
.
tipColorSchemas
);
...
...
@@ -1397,6 +1410,10 @@ define([
if
(
me
.
listTheme
.
menuPicker
.
store
.
length
>
0
&&
listStylesVisible
){
me
.
listTheme
.
fillComboView
(
me
.
listTheme
.
menuPicker
.
getSelectedRec
(),
true
);
}
if
(
me
.
btnInsertEquation
.
rendered
)
PE
.
getController
(
'
Toolbar
'
).
fillEquations
();
},
100
);
}
...
...
@@ -1694,6 +1711,7 @@ define([
textInsTextArt
:
'
Insert Text Art
'
,
textShowBegin
:
'
Show from Beginning
'
,
textShowCurrent
:
'
Show from Current slide
'
,
textShowSettings
:
'
Show Settings
'
textShowSettings
:
'
Show Settings
'
,
tipInsertEquation
:
'
Insert Equation
'
},
PE
.
Views
.
Toolbar
||
{}));
});
\ No newline at end of file
apps/presentationeditor/main/locale/en.json
View file @
05431979
This diff is collapsed.
Click to expand it.
apps/presentationeditor/main/resources/img/toolbar/math.png
0 → 100644
View file @
05431979
38.1 KB
apps/presentationeditor/main/resources/img/toolbar/math@2x.png
0 → 100644
View file @
05431979
95.3 KB
apps/presentationeditor/main/resources/less/toolbar.less
View file @
05431979
...
...
@@ -344,6 +344,7 @@
.toolbar-btn-icon(btn-zoomin, 61, @toolbar-icon-size);
.toolbar-btn-icon(btn-zoomout, 60, @toolbar-icon-size);
.toolbar-btn-icon(btn-save-coauth, 69, @toolbar-icon-size);
.toolbar-btn-icon(btn-insertequation, 74, @toolbar-icon-size);
// add slide
.btn-toolbar .btn-addslide {background-position: 0 -120px;}
...
...
@@ -393,4 +394,9 @@
color: #ffffff;
font: 11px arial;
white-space: nowrap;
}
.item-equation {
border: 1px solid @gray;
.background-ximage('@{app-image-path}/toolbar/math.png', '@{app-image-path}/toolbar/math@2x.png', 1500px);
}
\ No newline at end of file
apps/spreadsheeteditor/main/app/controller/Toolbar.js
View file @
05431979
...
...
@@ -2128,7 +2128,7 @@ define([
},
onInsertEquationClick
:
function
()
{
if
(
this
.
api
&&
!
this
.
_state
.
in_equation
)
{
if
(
this
.
api
)
{
this
.
api
.
asc_AddMath
();
Common
.
component
.
Analytics
.
trackEvent
(
'
ToolBar
'
,
'
Add Equation
'
);
}
...
...
apps/spreadsheeteditor/main/locale/en.json
View file @
05431979
...
...
@@ -1464,6 +1464,7 @@
"SSE.Views.Toolbar.tipIncDecimal"
:
"Increase Decimal"
,
"SSE.Views.Toolbar.tipIncFont"
:
"Increment font size"
,
"SSE.Views.Toolbar.tipInsertChart"
:
"Insert Chart"
,
"SSE.Views.Toolbar.tipInsertEquation"
:
"Insert Equation"
,
"SSE.Views.Toolbar.tipInsertHyperlink"
:
"Add Hyperlink"
,
"SSE.Views.Toolbar.tipInsertImage"
:
"Insert Picture"
,
"SSE.Views.Toolbar.tipInsertOpt"
:
"Insert Cells"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment