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
98c04632
Commit
98c04632
authored
Aug 12, 2016
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DE] Refactoring + disable "insert page number to current position" when paragraph is disabled.
parent
6ea59501
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
69 deletions
+73
-69
apps/common/main/lib/component/Button.js
apps/common/main/lib/component/Button.js
+3
-4
apps/common/main/lib/component/ComboBoxFonts.js
apps/common/main/lib/component/ComboBoxFonts.js
+2
-2
apps/documenteditor/main/app/view/Toolbar.js
apps/documenteditor/main/app/view/Toolbar.js
+68
-63
No files found.
apps/common/main/lib/component/Button.js
View file @
98c04632
...
...
@@ -414,8 +414,7 @@ define([
},
setDisabled
:
function
(
disabled
)
{
if
(
this
.
rendered
&&
this
.
disabled
!=
disabled
)
{
if
(
this
.
rendered
&&
this
.
disabled
!=
disabled
)
{
var
el
=
this
.
cmpEl
,
isGroup
=
el
.
hasClass
(
'
btn-group
'
);
...
...
@@ -490,9 +489,9 @@ define([
}
}
}
}
}
,
,
setMenu
:
function
(
m
)
{
setMenu
:
function
(
m
)
{
if
(
m
&&
_
.
isObject
(
m
)
&&
_
.
isFunction
(
m
.
render
)){
this
.
menu
=
m
;
this
.
menu
.
render
(
this
.
cmpEl
);
...
...
apps/common/main/lib/component/ComboBoxFonts.js
View file @
98c04632
...
...
@@ -85,8 +85,8 @@ define([
initialize
:
function
(
options
)
{
Common
.
UI
.
ComboBox
.
prototype
.
initialize
.
call
(
this
,
_
.
extend
(
options
,
{
displayField
:
'
name
'
,
scroller
:
{
displayField
:
'
name
'
,
scroller
:
{
alwaysVisibleY
:
true
,
onChange
:
this
.
updateVisibleFontsTiles
.
bind
(
this
)
}
...
...
apps/documenteditor/main/app/view/Toolbar.js
View file @
98c04632
...
...
@@ -761,9 +761,9 @@ define([
this
.
toolbarControls
.
push
(
this
.
btnHide
);
this
.
btnFitPage
=
{
conf
:
{
checked
:
false
}
,
setChecked
:
function
(
val
)
{
this
.
conf
.
checked
=
val
;}
,
isChecked
:
function
()
{
return
this
.
conf
.
checked
;
}
conf
:
{
checked
:
false
}
,
setChecked
:
function
(
val
)
{
this
.
conf
.
checked
=
val
;},
isChecked
:
function
()
{
return
this
.
conf
.
checked
;
}
};
this
.
btnFitWidth
=
_
.
clone
(
this
.
btnFitPage
);
...
...
@@ -1137,59 +1137,7 @@ define([
this
.
updateMetricUnit
();
}
var
me
=
this
;
this
.
mnuInsertChartPicker
=
new
Common
.
UI
.
DataView
({
el
:
$
(
'
#id-toolbar-menu-insertchart
'
),
parentMenu
:
this
.
btnInsertChart
.
menu
,
showLast
:
false
,
restoreHeight
:
411
,
groups
:
new
Common
.
UI
.
DataViewGroupStore
([
{
id
:
'
menu-chart-group-bar
'
,
caption
:
me
.
textColumn
},
{
id
:
'
menu-chart-group-line
'
,
caption
:
me
.
textLine
},
{
id
:
'
menu-chart-group-pie
'
,
caption
:
me
.
textPie
},
{
id
:
'
menu-chart-group-hbar
'
,
caption
:
me
.
textBar
},
{
id
:
'
menu-chart-group-area
'
,
caption
:
me
.
textArea
},
{
id
:
'
menu-chart-group-scatter
'
,
caption
:
me
.
textPoint
},
{
id
:
'
menu-chart-group-stock
'
,
caption
:
me
.
textStock
}
]),
store
:
new
Common
.
UI
.
DataViewStore
([
{
group
:
'
menu-chart-group-bar
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
barNormal
,
allowSelected
:
true
,
iconCls
:
'
column-normal
'
,
selected
:
true
},
{
group
:
'
menu-chart-group-bar
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
barStacked
,
allowSelected
:
true
,
iconCls
:
'
column-stack
'
},
{
group
:
'
menu-chart-group-bar
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
barStackedPer
,
allowSelected
:
true
,
iconCls
:
'
column-pstack
'
},
{
group
:
'
menu-chart-group-bar
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
barNormal3d
,
allowSelected
:
true
,
iconCls
:
'
column-3d-normal
'
},
{
group
:
'
menu-chart-group-bar
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
barStacked3d
,
allowSelected
:
true
,
iconCls
:
'
column-3d-stack
'
},
{
group
:
'
menu-chart-group-bar
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
barStackedPer3d
,
allowSelected
:
true
,
iconCls
:
'
column-3d-pstack
'
},
{
group
:
'
menu-chart-group-bar
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
barNormal3dPerspective
,
allowSelected
:
true
,
iconCls
:
'
column-3d-normal-per
'
},
{
group
:
'
menu-chart-group-line
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
lineNormal
,
allowSelected
:
true
,
iconCls
:
'
line-normal
'
},
{
group
:
'
menu-chart-group-line
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
lineStacked
,
allowSelected
:
true
,
iconCls
:
'
line-stack
'
},
{
group
:
'
menu-chart-group-line
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
lineStackedPer
,
allowSelected
:
true
,
iconCls
:
'
line-pstack
'
},
{
group
:
'
menu-chart-group-line
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
line3d
,
allowSelected
:
true
,
iconCls
:
'
line-3d
'
},
{
group
:
'
menu-chart-group-pie
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
pie
,
allowSelected
:
true
,
iconCls
:
'
pie-normal
'
},
{
group
:
'
menu-chart-group-pie
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
doughnut
,
allowSelected
:
true
,
iconCls
:
'
pie-doughnut
'
},
{
group
:
'
menu-chart-group-pie
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
pie3d
,
allowSelected
:
true
,
iconCls
:
'
pie-3d-normal
'
},
{
group
:
'
menu-chart-group-hbar
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
hBarNormal
,
allowSelected
:
true
,
iconCls
:
'
bar-normal
'
},
{
group
:
'
menu-chart-group-hbar
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
hBarStacked
,
allowSelected
:
true
,
iconCls
:
'
bar-stack
'
},
{
group
:
'
menu-chart-group-hbar
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
hBarStackedPer
,
allowSelected
:
true
,
iconCls
:
'
bar-pstack
'
},
{
group
:
'
menu-chart-group-hbar
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
hBarNormal3d
,
allowSelected
:
true
,
iconCls
:
'
bar-3d-normal
'
},
{
group
:
'
menu-chart-group-hbar
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
hBarStacked3d
,
allowSelected
:
true
,
iconCls
:
'
bar-3d-stack
'
},
{
group
:
'
menu-chart-group-hbar
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
hBarStackedPer3d
,
allowSelected
:
true
,
iconCls
:
'
bar-3d-pstack
'
},
{
group
:
'
menu-chart-group-area
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
areaNormal
,
allowSelected
:
true
,
iconCls
:
'
area-normal
'
},
{
group
:
'
menu-chart-group-area
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
areaStacked
,
allowSelected
:
true
,
iconCls
:
'
area-stack
'
},
{
group
:
'
menu-chart-group-area
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
areaStackedPer
,
allowSelected
:
true
,
iconCls
:
'
area-pstack
'
},
{
group
:
'
menu-chart-group-scatter
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
scatter
,
allowSelected
:
true
,
iconCls
:
'
point-normal
'
},
{
group
:
'
menu-chart-group-stock
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
stock
,
allowSelected
:
true
,
iconCls
:
'
stock-normal
'
}
]),
itemTemplate
:
_
.
template
(
'
<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>
'
)
});
this
.
mnuTablePicker
=
new
Common
.
UI
.
DimensionPicker
({
el
:
$
(
'
#id-toolbar-menu-tablepicker
'
),
minRows
:
8
,
minColumns
:
10
,
maxRows
:
8
,
maxColumns
:
10
});
// set hints
this
.
btnNewDocument
.
updateHint
(
this
.
tipNewDocument
);
this
.
btnOpenDocument
.
updateHint
(
this
.
tipOpenDocument
);
this
.
btnPrint
.
updateHint
(
this
.
tipPrint
+
Common
.
Utils
.
String
.
platformKey
(
'
Ctrl+P
'
));
...
...
@@ -1241,6 +1189,10 @@ define([
this
.
btnHide
.
updateHint
(
this
.
tipViewSettings
);
this
.
btnAdvSettings
.
updateHint
(
this
.
tipAdvSettings
);
// set menus
var
me
=
this
;
this
.
btnHide
.
setMenu
(
new
Common
.
UI
.
Menu
({
cls
:
'
pull-right
'
,
style
:
'
min-width: 180px;
'
,
...
...
@@ -1264,13 +1216,13 @@ define([
{
caption
:
'
--
'
},
this
.
btnFitPage
=
new
Common
.
UI
.
MenuItem
({
caption
:
this
.
textFitPage
,
checkable
:
true
,
checked
:
this
.
btnFitPage
.
isChecked
()
checkable
:
true
,
checked
:
this
.
btnFitPage
.
isChecked
()
}),
this
.
btnFitWidth
=
new
Common
.
UI
.
MenuItem
({
caption
:
this
.
textFitWidth
,
checkable
:
true
,
checked
:
this
.
btnFitWidth
.
isChecked
()
checkable
:
true
,
checked
:
this
.
btnFitWidth
.
isChecked
()
}),
(
new
Common
.
UI
.
MenuItem
({
template
:
_
.
template
([
...
...
@@ -1338,8 +1290,7 @@ define([
]
})
);
/**/
this
.
paragraphControls
.
push
(
this
.
mnuPageNumCurrentPos
);
this
.
mnuZoomOut
=
new
Common
.
UI
.
Button
({
el
:
$
(
'
#id-menu-zoom-out
'
),
...
...
@@ -1350,6 +1301,8 @@ define([
cls
:
'
btn-toolbar
'
});
// set dataviews
var
_conf
=
this
.
mnuMarkersPicker
.
conf
;
this
.
mnuMarkersPicker
=
new
Common
.
UI
.
DataView
({
el
:
$
(
'
#id-toolbar-menu-markers
'
),
...
...
@@ -1419,9 +1372,61 @@ define([
{
offsety
:
165
,
allowSelected
:
false
,
data
:{
type
:
c_pageNumPosition
.
PAGE_NUM_POSITION_BOTTOM
,
subtype
:
c_pageNumPosition
.
PAGE_NUM_POSITION_RIGHT
}
}
]),
itemTemplate
:
_
.
template
(
'
<div id="<%= id %>" class="item-pagenumber" style="background-position: 0 -<%= offsety %>px"></div>
'
)
})
})
;
_conf
&&
this
.
mnuPageNumberPosPicker
.
setDisabled
(
_conf
.
disabled
);
this
.
mnuInsertChartPicker
=
new
Common
.
UI
.
DataView
({
el
:
$
(
'
#id-toolbar-menu-insertchart
'
),
parentMenu
:
this
.
btnInsertChart
.
menu
,
showLast
:
false
,
restoreHeight
:
411
,
groups
:
new
Common
.
UI
.
DataViewGroupStore
([
{
id
:
'
menu-chart-group-bar
'
,
caption
:
me
.
textColumn
},
{
id
:
'
menu-chart-group-line
'
,
caption
:
me
.
textLine
},
{
id
:
'
menu-chart-group-pie
'
,
caption
:
me
.
textPie
},
{
id
:
'
menu-chart-group-hbar
'
,
caption
:
me
.
textBar
},
{
id
:
'
menu-chart-group-area
'
,
caption
:
me
.
textArea
},
{
id
:
'
menu-chart-group-scatter
'
,
caption
:
me
.
textPoint
},
{
id
:
'
menu-chart-group-stock
'
,
caption
:
me
.
textStock
}
]),
store
:
new
Common
.
UI
.
DataViewStore
([
{
group
:
'
menu-chart-group-bar
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
barNormal
,
allowSelected
:
true
,
iconCls
:
'
column-normal
'
,
selected
:
true
},
{
group
:
'
menu-chart-group-bar
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
barStacked
,
allowSelected
:
true
,
iconCls
:
'
column-stack
'
},
{
group
:
'
menu-chart-group-bar
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
barStackedPer
,
allowSelected
:
true
,
iconCls
:
'
column-pstack
'
},
{
group
:
'
menu-chart-group-bar
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
barNormal3d
,
allowSelected
:
true
,
iconCls
:
'
column-3d-normal
'
},
{
group
:
'
menu-chart-group-bar
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
barStacked3d
,
allowSelected
:
true
,
iconCls
:
'
column-3d-stack
'
},
{
group
:
'
menu-chart-group-bar
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
barStackedPer3d
,
allowSelected
:
true
,
iconCls
:
'
column-3d-pstack
'
},
{
group
:
'
menu-chart-group-bar
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
barNormal3dPerspective
,
allowSelected
:
true
,
iconCls
:
'
column-3d-normal-per
'
},
{
group
:
'
menu-chart-group-line
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
lineNormal
,
allowSelected
:
true
,
iconCls
:
'
line-normal
'
},
{
group
:
'
menu-chart-group-line
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
lineStacked
,
allowSelected
:
true
,
iconCls
:
'
line-stack
'
},
{
group
:
'
menu-chart-group-line
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
lineStackedPer
,
allowSelected
:
true
,
iconCls
:
'
line-pstack
'
},
{
group
:
'
menu-chart-group-line
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
line3d
,
allowSelected
:
true
,
iconCls
:
'
line-3d
'
},
{
group
:
'
menu-chart-group-pie
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
pie
,
allowSelected
:
true
,
iconCls
:
'
pie-normal
'
},
{
group
:
'
menu-chart-group-pie
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
doughnut
,
allowSelected
:
true
,
iconCls
:
'
pie-doughnut
'
},
{
group
:
'
menu-chart-group-pie
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
pie3d
,
allowSelected
:
true
,
iconCls
:
'
pie-3d-normal
'
},
{
group
:
'
menu-chart-group-hbar
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
hBarNormal
,
allowSelected
:
true
,
iconCls
:
'
bar-normal
'
},
{
group
:
'
menu-chart-group-hbar
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
hBarStacked
,
allowSelected
:
true
,
iconCls
:
'
bar-stack
'
},
{
group
:
'
menu-chart-group-hbar
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
hBarStackedPer
,
allowSelected
:
true
,
iconCls
:
'
bar-pstack
'
},
{
group
:
'
menu-chart-group-hbar
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
hBarNormal3d
,
allowSelected
:
true
,
iconCls
:
'
bar-3d-normal
'
},
{
group
:
'
menu-chart-group-hbar
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
hBarStacked3d
,
allowSelected
:
true
,
iconCls
:
'
bar-3d-stack
'
},
{
group
:
'
menu-chart-group-hbar
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
hBarStackedPer3d
,
allowSelected
:
true
,
iconCls
:
'
bar-3d-pstack
'
},
{
group
:
'
menu-chart-group-area
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
areaNormal
,
allowSelected
:
true
,
iconCls
:
'
area-normal
'
},
{
group
:
'
menu-chart-group-area
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
areaStacked
,
allowSelected
:
true
,
iconCls
:
'
area-stack
'
},
{
group
:
'
menu-chart-group-area
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
areaStackedPer
,
allowSelected
:
true
,
iconCls
:
'
area-pstack
'
},
{
group
:
'
menu-chart-group-scatter
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
scatter
,
allowSelected
:
true
,
iconCls
:
'
point-normal
'
},
{
group
:
'
menu-chart-group-stock
'
,
type
:
Asc
.
c_oAscChartTypeSettings
.
stock
,
allowSelected
:
true
,
iconCls
:
'
stock-normal
'
}
]),
itemTemplate
:
_
.
template
(
'
<div id="<%= id %>" class="item-chartlist <%= iconCls %>"></div>
'
)
});
this
.
mnuTablePicker
=
new
Common
.
UI
.
DimensionPicker
({
el
:
$
(
'
#id-toolbar-menu-tablepicker
'
),
minRows
:
8
,
minColumns
:
10
,
maxRows
:
8
,
maxColumns
:
10
});
/**/
var
mode
=
this
.
mode
;
var
value
=
Common
.
localStorage
.
getItem
(
"
de-compact-toolbar
"
);
...
...
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