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
42932dc5
Commit
42932dc5
authored
May 17, 2016
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DE] Добавлена поддержка плагинов
parent
4ee5489e
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
474 additions
and
5 deletions
+474
-5
apps/api/documents/api.js
apps/api/documents/api.js
+32
-1
apps/api/documents/index.html
apps/api/documents/index.html
+32
-1
apps/common/main/lib/collection/Plugins.js
apps/common/main/lib/collection/Plugins.js
+54
-0
apps/common/main/lib/controller/Plugins.js
apps/common/main/lib/controller/Plugins.js
+105
-0
apps/common/main/lib/model/Plugin.js
apps/common/main/lib/model/Plugin.js
+69
-0
apps/common/main/lib/view/Plugins.js
apps/common/main/lib/view/Plugins.js
+88
-0
apps/common/main/resources/less/plugins.less
apps/common/main/resources/less/plugins.less
+19
-0
apps/documenteditor/main/app.js
apps/documenteditor/main/app.js
+2
-0
apps/documenteditor/main/app/controller/LeftMenu.js
apps/documenteditor/main/app/controller/LeftMenu.js
+5
-0
apps/documenteditor/main/app/controller/Main.js
apps/documenteditor/main/app/controller/Main.js
+31
-1
apps/documenteditor/main/app/template/LeftMenu.template
apps/documenteditor/main/app/template/LeftMenu.template
+2
-0
apps/documenteditor/main/app/view/LeftMenu.js
apps/documenteditor/main/app/view/LeftMenu.js
+27
-1
apps/documenteditor/main/app_dev.js
apps/documenteditor/main/app_dev.js
+2
-0
apps/documenteditor/main/resources/img/toolbar-menu.png
apps/documenteditor/main/resources/img/toolbar-menu.png
+0
-0
apps/documenteditor/main/resources/img/toolbar-menu@2x.png
apps/documenteditor/main/resources/img/toolbar-menu@2x.png
+0
-0
apps/documenteditor/main/resources/less/app.less
apps/documenteditor/main/resources/less/app.less
+1
-0
apps/documenteditor/main/resources/less/leftmenu.less
apps/documenteditor/main/resources/less/leftmenu.less
+1
-0
apps/documenteditor/sdk_dev_scripts.js
apps/documenteditor/sdk_dev_scripts.js
+4
-1
No files found.
apps/api/documents/api.js
View file @
42932dc5
...
...
@@ -106,7 +106,38 @@
},
chat: false,
comments: false
},
plugins: [{
name: "chess (fen)",
guid: "{FFE1F462-1EA2-4391-990D-4CC84940B754}",
url: "chess/index.html",
icons: ["chess/icon.png", "chess/icon2x.png"],
isVisual: true,
initDataType: 2,
isUpdateOleOnResize: true,
buttons: [{text:"Ok",primary:true},{text:"Cancel",primary:false}]
},
{
name: "glavred",
guid: "{B631E142-E40B-4B4C-90B9-2D00222A286E}",
url: "glavred/index.html",
icons: ["glavred/icon.png", "glavred/icon2x.png"],
isVisual: true,
initDataType: 1,
isUpdateOleOnResize: false,
buttons: [{text:"Ok",primary:true}]
},
{
name: "bold",
guid: "{14E46CC2-5E56-429C-9D55-1032B596D928}",
url: "bold/index.html",
icons: ["bold/icon.png", "bold/icon2x.png"],
isVisual: false,
initDataType: 0,
isUpdateOleOnResize: false,
buttons: []
}
]
},
events: {
'onReady': <document ready callback>,
...
...
apps/api/documents/index.html
View file @
42932dc5
...
...
@@ -291,7 +291,38 @@
// goback: {text: 'Go To London', url: 'http://...'},
about
:
true
,
feedback
:
true
},
plugins
:
[{
name
:
"
chess (fen)
"
,
guid
:
"
{FFE1F462-1EA2-4391-990D-4CC84940B754}
"
,
url
:
"
chess/index.html
"
,
icons
:
[
"
chess/icon.png
"
,
"
chess/icon2x.png
"
],
isVisual
:
true
,
initDataType
:
2
,
isUpdateOleOnResize
:
true
,
buttons
:
[{
text
:
"
Ok
"
,
primary
:
true
},{
text
:
"
Cancel
"
,
primary
:
false
}]
},
{
name
:
"
glavred
"
,
guid
:
"
{B631E142-E40B-4B4C-90B9-2D00222A286E}
"
,
url
:
"
glavred/index.html
"
,
icons
:
[
"
glavred/icon.png
"
,
"
glavred/icon2x.png
"
],
isVisual
:
true
,
initDataType
:
1
,
isUpdateOleOnResize
:
false
,
buttons
:
[{
text
:
"
Ok
"
,
primary
:
true
}]
},
{
name
:
"
bold
"
,
guid
:
"
{14E46CC2-5E56-429C-9D55-1032B596D928}
"
,
url
:
"
bold/index.html
"
,
icons
:
[
"
bold/icon.png
"
,
"
bold/icon2x.png
"
],
isVisual
:
false
,
initDataType
:
0
,
isUpdateOleOnResize
:
false
,
buttons
:
[]
}
]
};
}
...
...
apps/common/main/lib/collection/Plugins.js
0 → 100644
View file @
42932dc5
/*
*
* (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
*
*/
/**
* User: Julia.Radzhabova
* Date: 17.05.16
* Time: 15:54
*/
if
(
Common
===
undefined
)
var
Common
=
{};
Common
.
Collections
=
Common
.
Collections
||
{};
define
([
'
underscore
'
,
'
backbone
'
,
'
common/main/lib/model/Plugin
'
],
function
(
_
,
Backbone
){
'
use strict
'
;
Common
.
Collections
.
Plugins
=
Backbone
.
Collection
.
extend
({
model
:
Common
.
Models
.
Plugin
});
});
apps/common/main/lib/controller/Plugins.js
0 → 100644
View file @
42932dc5
/*
*
* (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
*
*/
/**
* User: Julia.Radzhabova
* Date: 17.05.16
* Time: 15:38
*/
define
([
'
core
'
,
'
common/main/lib/collection/Plugins
'
,
'
common/main/lib/view/Plugins
'
],
function
()
{
'
use strict
'
;
Common
.
Controllers
.
Plugins
=
Backbone
.
Controller
.
extend
(
_
.
extend
({
models
:
[],
collections
:
[
'
Common.Collections.Plugins
'
],
views
:
[
'
Common.Views.Plugins
'
],
initialize
:
function
()
{
},
events
:
{
},
onLaunch
:
function
()
{
this
.
panelPlugins
=
this
.
createView
(
'
Common.Views.Plugins
'
,
{
storePlugins
:
this
.
getApplication
().
getCollection
(
'
Common.Collections.Plugins
'
)
});
this
.
panelPlugins
.
on
(
'
render:after
'
,
_
.
bind
(
this
.
onAfterRender
,
this
));
},
setApi
:
function
(
api
)
{
this
.
api
=
api
;
var
me
=
this
;
var
storePlugins
=
this
.
getApplication
().
getCollection
(
'
Common.Collections.Plugins
'
),
arr
=
[];
storePlugins
.
each
(
function
(
item
){
var
plugin
=
new
Asc
.
CPlugin
();
plugin
.
set_Name
(
item
.
get
(
'
name
'
));
plugin
.
set_Guid
(
item
.
get
(
'
guid
'
));
plugin
.
set_Url
(
item
.
get
(
'
url
'
));
plugin
.
set_Icons
(
item
.
get
(
'
icons
'
));
plugin
.
set_Visual
(
item
.
get
(
'
isVisual
'
));
plugin
.
set_InitDataType
(
item
.
get
(
'
initDataType
'
));
plugin
.
set_UpdateOleOnResize
(
item
.
get
(
'
isUpdateOleOnResize
'
));
plugin
.
set_Buttons
(
item
.
get
(
'
buttons
'
));
item
.
set
(
'
pluginObj
'
,
plugin
);
arr
.
push
(
plugin
);
});
this
.
api
.
asc_pluginsRegister
(
this
.
panelPlugins
.
pluginsPath
,
arr
);
return
this
;
},
setMode
:
function
(
mode
)
{
},
onAfterRender
:
function
(
historyView
)
{
historyView
.
viewPluginsList
.
on
(
'
item:click
'
,
_
.
bind
(
this
.
onSelectPlugin
,
this
));
},
onSelectPlugin
:
function
(
picker
,
item
,
record
){
this
.
api
.
asc_pluginRun
(
record
.
get
(
'
guid
'
),
''
);
},
notcriticalErrorTitle
:
'
Warning
'
},
Common
.
Controllers
.
Plugins
||
{}));
});
apps/common/main/lib/model/Plugin.js
0 → 100644
View file @
42932dc5
/*
*
* (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
*
*/
/**
* User: Julia.Radzhabova
* Date: 17.05.16
* Time: 15:56
*/
if
(
Common
===
undefined
)
var
Common
=
{};
Common
.
Models
=
Common
.
Models
||
{};
define
([
'
underscore
'
,
'
backbone
'
,
'
common/main/lib/component/BaseView
'
],
function
(
_
,
Backbone
){
'
use strict
'
;
Common
.
Models
.
Plugin
=
Backbone
.
Model
.
extend
({
defaults
:
function
()
{
return
{
id
:
Common
.
UI
.
getId
(),
name
:
''
,
guid
:
Common
.
UI
.
getId
(),
url
:
undefined
,
icons
:
undefined
,
isVisual
:
false
,
initDataType
:
undefined
,
isUpdateOleOnResize
:
false
,
buttons
:
[{
text
:
"
Ok
"
,
primary
:
true
},{
text
:
"
Cancel
"
,
primary
:
false
}],
pluginObj
:
undefined
,
allowSelected
:
false
,
selected
:
false
}
}
});
});
apps/common/main/lib/view/Plugins.js
0 → 100644
View file @
42932dc5
/*
*
* (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
*
*/
/**
* User: Julia.Radzhabova
* Date: 17.05.16
* Time: 15:38
*/
if
(
Common
===
undefined
)
var
Common
=
{};
Common
.
Views
=
Common
.
Views
||
{};
define
([
'
common/main/lib/util/utils
'
,
'
common/main/lib/component/BaseView
'
,
'
common/main/lib/component/Layout
'
],
function
(
template
)
{
'
use strict
'
;
Common
.
Views
.
Plugins
=
Common
.
UI
.
BaseView
.
extend
(
_
.
extend
({
el
:
'
#left-panel-plugins
'
,
storePlugins
:
undefined
,
template
:
_
.
template
([
'
<div id="plugins-box" class="layout-ct vbox">
'
,
'
<label style="font-weight: bold;"><%= scope.strPlugins %></label>
'
,
'
<div id="plugins-list" class="">
'
,
'
</div>
'
,
'
</div>
'
].
join
(
''
)),
initialize
:
function
(
options
)
{
_
.
extend
(
this
,
options
);
this
.
pluginsPath
=
'
../../../../sdkjs-plugins/
'
;
Common
.
UI
.
BaseView
.
prototype
.
initialize
.
call
(
this
,
arguments
);
},
render
:
function
(
el
)
{
el
=
el
||
this
.
el
;
$
(
el
).
html
(
this
.
template
({
scope
:
this
})).
width
(
(
parseInt
(
Common
.
localStorage
.
getItem
(
'
de-mainmenu-width
'
))
||
MENU_SCALE_PART
)
-
SCALE_MIN
);
this
.
viewPluginsList
=
new
Common
.
UI
.
DataView
({
el
:
$
(
'
#plugins-list
'
),
store
:
this
.
storePlugins
,
enableKeyEvents
:
false
,
itemTemplate
:
_
.
template
(
'
<div id="<%= id %>" class="item-plugins" style="background-image: url(
'
+
this
.
pluginsPath
+
'
<%= icons[(window.devicePixelRatio > 1) ? 1 : 0] %>); background-position: 0 0;"></div>
'
)
// itemTemplate: _.template('<div id="<%= id %>" class="item-plugins" style="background-image: url(' + this.pluginsPath + 'chess/icon.png' + '); background-position: 0 0;"></div>')
});
this
.
trigger
(
'
render:after
'
,
this
);
return
this
;
},
strPlugins
:
'
Plugins
'
},
Common
.
Views
.
Plugins
||
{}))
});
\ No newline at end of file
apps/common/main/resources/less/plugins.less
0 → 100644
View file @
42932dc5
#plugins-box {
display: table;
position: relative;
width: 100%;
height: 100%;
margin: 10px;
#plugins-list {
height: 100%;
overflow: hidden;
padding-top: 10px;
.item-plugins {
width: 40px;
height: 40px;
}
}
}
apps/documenteditor/main/app.js
View file @
42932dc5
...
...
@@ -161,6 +161,7 @@ require([
,
'
Common.Controllers.Chat
'
,
'
Common.Controllers.Comments
'
/** coauthoring end **/
,
'
Common.Controllers.Plugins
'
,
'
Common.Controllers.ExternalDiagramEditor
'
,
'
Common.Controllers.ExternalMergeEditor
'
,
'
Common.Controllers.ReviewChanges
'
...
...
@@ -191,6 +192,7 @@ require([
,
'
common/main/lib/controller/Comments
'
,
'
common/main/lib/controller/Chat
'
/** coauthoring end **/
,
'
common/main/lib/controller/Plugins
'
,
'
documenteditor/main/app/view/ChartSettings
'
,
'
common/main/lib/controller/ExternalDiagramEditor
'
,
'
common/main/lib/controller/ExternalMergeEditor
'
...
...
apps/documenteditor/main/app/controller/LeftMenu.js
View file @
42932dc5
...
...
@@ -174,6 +174,11 @@ define([
if
(
this
.
mode
.
canUseHistory
)
this
.
leftMenu
.
setOptionsPanel
(
'
history
'
,
this
.
getApplication
().
getController
(
'
Common.Controllers.History
'
).
getView
(
'
Common.Views.History
'
));
if
(
this
.
mode
.
canPlugins
)
this
.
leftMenu
.
setOptionsPanel
(
'
plugins
'
,
this
.
getApplication
().
getController
(
'
Common.Controllers.Plugins
'
).
getView
(
'
Common.Views.Plugins
'
));
else
this
.
leftMenu
.
btnPlugins
.
hide
();
Common
.
util
.
Shortcuts
.
resumeEvents
();
return
this
;
},
...
...
apps/documenteditor/main/app/controller/Main.js
View file @
42932dc5
...
...
@@ -138,6 +138,7 @@ define([
// Initialize api gateway
this
.
editorConfig
=
{};
this
.
appOptions
=
{};
this
.
plugins
=
[];
Common
.
Gateway
.
on
(
'
init
'
,
_
.
bind
(
this
.
loadConfig
,
this
));
Common
.
Gateway
.
on
(
'
showmessage
'
,
_
.
bind
(
this
.
onExternalMessage
,
this
));
Common
.
Gateway
.
on
(
'
opendocument
'
,
_
.
bind
(
this
.
loadDocument
,
this
));
...
...
@@ -253,6 +254,9 @@ define([
if
(
this
.
appOptions
.
location
==
'
us
'
||
this
.
appOptions
.
location
==
'
ca
'
)
Common
.
Utils
.
Metric
.
setDefaultMetric
(
Common
.
Utils
.
Metric
.
c_MetricUnits
.
inch
);
this
.
plugins
=
this
.
editorConfig
.
plugins
;
this
.
appOptions
.
canPlugins
=
(
this
.
plugins
&&
this
.
plugins
.
length
>
0
);
},
loadDocument
:
function
(
data
)
{
...
...
@@ -816,7 +820,8 @@ define([
fontsController
=
application
.
getController
(
'
Common.Controllers.Fonts
'
),
rightmenuController
=
application
.
getController
(
'
RightMenu
'
),
leftmenuController
=
application
.
getController
(
'
LeftMenu
'
),
chatController
=
application
.
getController
(
'
Common.Controllers.Chat
'
);
chatController
=
application
.
getController
(
'
Common.Controllers.Chat
'
),
pluginsController
=
application
.
getController
(
'
Common.Controllers.Plugins
'
);
leftmenuController
.
getView
(
'
LeftMenu
'
).
getMenu
(
'
file
'
).
loadDocument
({
doc
:
me
.
document
});
leftmenuController
.
setMode
(
me
.
appOptions
).
createDelayedElements
().
setApi
(
me
.
api
);
...
...
@@ -825,6 +830,8 @@ define([
application
.
getController
(
'
Common.Controllers.ExternalDiagramEditor
'
).
setApi
(
this
.
api
).
loadConfig
({
config
:
this
.
editorConfig
,
customization
:
this
.
editorConfig
.
customization
});
application
.
getController
(
'
Common.Controllers.ExternalMergeEditor
'
).
setApi
(
this
.
api
).
loadConfig
({
config
:
this
.
editorConfig
,
customization
:
this
.
editorConfig
.
customization
});
pluginsController
.
setApi
(
this
.
api
);
documentHolderController
.
setApi
(
me
.
api
);
documentHolderController
.
createDelayedElements
();
statusbarController
.
createDelayedElements
();
...
...
@@ -1081,6 +1088,8 @@ define([
// Message on window close
window
.
onbeforeunload
=
_
.
bind
(
me
.
onBeforeUnload
,
me
);
window
.
onunload
=
_
.
bind
(
me
.
onUnload
,
me
);
me
.
updatePluginsList
();
}
},
...
...
@@ -1686,6 +1695,27 @@ define([
if
(
url
)
this
.
iframePrint
.
src
=
url
;
},
updatePluginsList
:
function
()
{
var
pluginStore
=
this
.
getApplication
().
getCollection
(
'
Common.Collections.Plugins
'
);
if
(
pluginStore
&&
this
.
plugins
)
{
var
arr
=
[];
this
.
plugins
.
forEach
(
function
(
item
){
arr
.
push
(
new
Common
.
Models
.
Plugin
({
name
:
item
.
name
,
guid
:
item
.
guid
,
url
:
item
.
url
,
icons
:
item
.
icons
,
isVisual
:
item
.
isVisual
,
initDataType
:
item
.
initDataType
,
isUpdateOleOnResize
:
item
.
isUpdateOleOnResize
,
buttons
:
item
.
buttons
}));
});
pluginStore
.
reset
(
arr
);
}
},
leavePageText
:
'
You have unsaved changes in this document. Click
\'
Stay on this Page
\'
then
\'
Save
\'
to save them. Click
\'
Leave this Page
\'
to discard all the unsaved changes.
'
,
defaultTitleText
:
'
ONLYOFFICE Document Editor
'
,
criticalErrorTitle
:
'
Error
'
,
...
...
apps/documenteditor/main/app/template/LeftMenu.template
View file @
42932dc5
...
...
@@ -8,11 +8,13 @@
<!-- /** coauthoring end **/ -->
<button id="left-btn-support" class="btn btn-category" content-target=""><span class="btn-icon img-toolbarmenu btn-menu-support"> </span></button>
<button id="left-btn-about" class="btn btn-category" content-target=""><span class="btn-icon img-toolbarmenu btn-menu-about"> </span></button>
<button id="left-btn-plugins" class="btn btn-category" content-target="" style="position: absolute; bottom: 0;"><span class="btn-icon img-toolbarmenu btn-menu-plugin"> </span></button>
</div>
<div class="left-panel" style="">
<!-- /** coauthoring begin **/ -->
<div id="left-panel-comments" class="" style="display: none;" />
<div id="left-panel-chat" class="" style="display: none;" />
<!-- /** coauthoring end **/ -->
<div id="left-panel-plugins" class="" style="display: none;" />
</div>
</div>
\ No newline at end of file
apps/documenteditor/main/app/view/LeftMenu.js
View file @
42932dc5
...
...
@@ -50,6 +50,7 @@ define([
'
common/main/lib/view/Chat
'
,
/** coauthoring end **/
'
common/main/lib/view/History
'
,
'
common/main/lib/view/Plugins
'
,
'
common/main/lib/view/About
'
,
'
common/main/lib/view/SearchDialog
'
,
'
documenteditor/main/app/view/FileMenu
'
...
...
@@ -71,6 +72,7 @@ define([
'
click #left-btn-comments
'
:
_
.
bind
(
this
.
onCoauthOptions
,
this
),
'
click #left-btn-chat
'
:
_
.
bind
(
this
.
onCoauthOptions
,
this
),
/** coauthoring end **/
'
click #left-btn-plugins
'
:
_
.
bind
(
this
.
onCoauthOptions
,
this
),
'
click #left-btn-support
'
:
function
()
{
var
config
=
this
.
mode
.
customization
;
config
&&
!!
config
.
feedback
&&
!!
config
.
feedback
.
url
?
...
...
@@ -139,11 +141,20 @@ define([
toggleGroup
:
'
leftMenuGroup
'
});
this
.
btnPlugins
=
new
Common
.
UI
.
Button
({
el
:
$
(
'
#left-btn-plugins
'
),
hint
:
this
.
tipPlugins
,
enableToggle
:
true
,
disabled
:
true
,
toggleGroup
:
'
leftMenuGroup
'
});
this
.
btnComments
.
hide
();
this
.
btnChat
.
hide
();
this
.
btnComments
.
on
(
'
click
'
,
_
.
bind
(
this
.
onBtnMenuClick
,
this
));
this
.
btnChat
.
on
(
'
click
'
,
_
.
bind
(
this
.
onBtnMenuClick
,
this
));
this
.
btnPlugins
.
on
(
'
click
'
,
_
.
bind
(
this
.
onBtnMenuClick
,
this
));
/** coauthoring end **/
this
.
btnSearch
.
on
(
'
click
'
,
_
.
bind
(
this
.
onBtnMenuClick
,
this
));
...
...
@@ -215,6 +226,12 @@ define([
}
}
/** coauthoring end **/
if
(
this
.
mode
.
canPlugins
)
{
if
(
this
.
btnPlugins
.
pressed
)
{
this
.
panelPlugins
.
show
();
}
else
this
.
panelPlugins
[
'
hide
'
]();
}
},
setOptionsPanel
:
function
(
name
,
panel
)
{
...
...
@@ -226,6 +243,9 @@ define([
}
else
/** coauthoring end **/
if
(
name
==
'
history
'
)
{
this
.
panelHistory
=
panel
.
render
(
'
#left-panel-history
'
);
}
else
if
(
name
==
'
plugins
'
)
{
this
.
panelPlugins
=
panel
.
render
(
'
#left-panel-plugins
'
);
}
},
...
...
@@ -258,6 +278,10 @@ define([
this
.
panelChat
[
'
hide
'
]();
this
.
btnChat
.
toggle
(
false
,
true
);
}
if
(
this
.
mode
.
canPlugins
)
{
this
.
panelPlugins
[
'
hide
'
]();
this
.
btnPlugins
.
toggle
(
false
,
true
);
}
}
/** coauthoring end **/
},
...
...
@@ -279,6 +303,7 @@ define([
this
.
btnComments
.
setDisabled
(
false
);
this
.
btnChat
.
setDisabled
(
false
);
/** coauthoring end **/
this
.
btnPlugins
.
setDisabled
(
false
);
},
showMenu
:
function
(
menu
,
opts
)
{
...
...
@@ -338,6 +363,7 @@ define([
tipAbout
:
'
About
'
,
tipSupport
:
'
Feedback & Support
'
,
tipFile
:
'
File
'
,
tipSearch
:
'
Search
'
tipSearch
:
'
Search
'
,
tipPlugins
:
'
Plugins
'
},
DE
.
Views
.
LeftMenu
||
{}));
});
apps/documenteditor/main/app_dev.js
View file @
42932dc5
...
...
@@ -151,6 +151,7 @@ require([
,
'
Common.Controllers.Chat
'
,
'
Common.Controllers.Comments
'
/** coauthoring end **/
,
'
Common.Controllers.Plugins
'
,
'
Common.Controllers.ExternalDiagramEditor
'
,
'
Common.Controllers.ExternalMergeEditor
'
,
'
Common.Controllers.ReviewChanges
'
...
...
@@ -181,6 +182,7 @@ require([
,
'
common/main/lib/controller/Comments
'
,
'
common/main/lib/controller/Chat
'
/** coauthoring end **/
,
'
common/main/lib/controller/Plugins
'
,
'
documenteditor/main/app/view/ChartSettings
'
,
'
common/main/lib/controller/ExternalDiagramEditor
'
,
'
common/main/lib/controller/ExternalMergeEditor
'
...
...
apps/documenteditor/main/resources/img/toolbar-menu.png
View replaced file @
4ee5489e
View file @
42932dc5
16.5 KB
|
W:
|
H:
17.1 KB
|
W:
|
H:
2-up
Swipe
Onion skin
apps/documenteditor/main/resources/img/toolbar-menu@2x.png
View replaced file @
4ee5489e
View file @
42932dc5
41.7 KB
|
W:
|
H:
42.9 KB
|
W:
|
H:
2-up
Swipe
Onion skin
apps/documenteditor/main/resources/less/app.less
View file @
42932dc5
...
...
@@ -113,6 +113,7 @@
@import "../../../../common/main/resources/less/history.less";
@import "../../../../common/main/resources/less/opendialog.less";
@import "../../../../common/main/resources/less/review-changes.less";
@import "../../../../common/main/resources/less/plugins.less";
// App
// --------------------------------------------------
...
...
apps/documenteditor/main/resources/less/leftmenu.less
View file @
42932dc5
...
...
@@ -20,6 +20,7 @@ button.notify .btn-menu-comments {background-position: -0*@toolbar-icon-size -60
.button-normal-icon(btn-menu-chat, 62, @toolbar-icon-size);
.button-normal-icon(btn-menu-about, 68, @toolbar-icon-size);
.button-normal-icon(btn-menu-support, 70, @toolbar-icon-size);
.button-normal-icon(btn-menu-plugin, 84, @toolbar-icon-size);
.tool-menu-btns {
width: 40px;
...
...
apps/documenteditor/sdk_dev_scripts.js
View file @
42932dc5
...
...
@@ -141,5 +141,8 @@ var sdk_dev_scrpipts = [
"
../../../../sdkjs/word/Private/StyleManager.js
"
,
"
../../../../sdkjs/word/Private/MailMerge.js
"
,
"
../../../../sdkjs/word/Private/TrackRevisions.js
"
,
"
../../../../sdkjs/common/applyDocumentChanges.js
"
"
../../../../sdkjs/common/applyDocumentChanges.js
"
,
"
../../../../sdkjs/common/clipboard_base.js
"
,
"
../../../../sdkjs/common/plugins.js
"
,
"
../../../../sdkjs/word/apiBuilder.js
"
];
\ No newline at end of file
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