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
70694ac1
Commit
70694ac1
authored
May 26, 2017
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SSE] Apply bullets and numbering to text in shape.
[SSE] Apply list type to text in shape.
parent
70c2a58b
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
108 additions
and
9 deletions
+108
-9
apps/common/main/lib/extend/Bootstrap.js
apps/common/main/lib/extend/Bootstrap.js
+2
-1
apps/documenteditor/main/resources/less/toolbar.less
apps/documenteditor/main/resources/less/toolbar.less
+0
-5
apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
+55
-2
apps/spreadsheeteditor/main/app/view/DocumentHolder.js
apps/spreadsheeteditor/main/app/view/DocumentHolder.js
+43
-1
apps/spreadsheeteditor/main/locale/en.json
apps/spreadsheeteditor/main/locale/en.json
+2
-0
apps/spreadsheeteditor/main/resources/img/toolbar/bullets-and-numbering.png
...itor/main/resources/img/toolbar/bullets-and-numbering.png
+0
-0
apps/spreadsheeteditor/main/resources/img/toolbar/bullets-and-numbering@2x.png
...r/main/resources/img/toolbar/bullets-and-numbering@2x.png
+0
-0
apps/spreadsheeteditor/main/resources/less/toolbar.less
apps/spreadsheeteditor/main/resources/less/toolbar.less
+6
-0
No files found.
apps/common/main/lib/extend/Bootstrap.js
View file @
70694ac1
...
@@ -110,6 +110,7 @@ function patchDropDownKeyDown(e) {
...
@@ -110,6 +110,7 @@ function patchDropDownKeyDown(e) {
_
.
delay
(
function
()
{
_
.
delay
(
function
()
{
var
mnu
=
$
(
'
> [role=menu]
'
,
li
),
var
mnu
=
$
(
'
> [role=menu]
'
,
li
),
$subitems
=
mnu
.
find
(
'
> li:not(.divider):not(.disabled):visible > a
'
),
$subitems
=
mnu
.
find
(
'
> li:not(.divider):not(.disabled):visible > a
'
),
$dataviews
=
mnu
.
find
(
'
> li:not(.divider):not(.disabled):visible .dataview
'
),
focusIdx
=
0
;
focusIdx
=
0
;
if
(
mnu
.
find
(
'
> .menu-scroll
'
).
length
>
0
)
{
if
(
mnu
.
find
(
'
> .menu-scroll
'
).
length
>
0
)
{
var
offset
=
mnu
.
scrollTop
();
var
offset
=
mnu
.
scrollTop
();
...
@@ -119,7 +120,7 @@ function patchDropDownKeyDown(e) {
...
@@ -119,7 +120,7 @@ function patchDropDownKeyDown(e) {
}
}
}
}
}
}
if
(
$subitems
.
length
>
0
)
if
(
$subitems
.
length
>
0
&&
$dataviews
.
length
<
1
)
$subitems
.
eq
(
focusIdx
).
focus
();
$subitems
.
eq
(
focusIdx
).
focus
();
},
250
);
},
250
);
}
}
...
...
apps/documenteditor/main/resources/less/toolbar.less
View file @
70694ac1
...
@@ -78,11 +78,6 @@
...
@@ -78,11 +78,6 @@
z-index: @zindex-tooltip + 1;
z-index: @zindex-tooltip + 1;
}
}
.menu-markers,
.menu-numbers {
//
}
.item-markerlist {
.item-markerlist {
.background-ximage('@{app-image-path}/toolbar/bullets-and-numbering.png', '@{app-image-path}/toolbar/bullets-and-numbering@2x.png', 38px);
.background-ximage('@{app-image-path}/toolbar/bullets-and-numbering.png', '@{app-image-path}/toolbar/bullets-and-numbering@2x.png', 38px);
width: 38px;
width: 38px;
...
...
apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
View file @
70694ac1
...
@@ -179,6 +179,7 @@ define([
...
@@ -179,6 +179,7 @@ define([
view
.
imgMenu
.
on
(
'
item:click
'
,
_
.
bind
(
me
.
onImgMenu
,
me
));
view
.
imgMenu
.
on
(
'
item:click
'
,
_
.
bind
(
me
.
onImgMenu
,
me
));
view
.
menuParagraphVAlign
.
menu
.
on
(
'
item:click
'
,
_
.
bind
(
me
.
onParagraphVAlign
,
me
));
view
.
menuParagraphVAlign
.
menu
.
on
(
'
item:click
'
,
_
.
bind
(
me
.
onParagraphVAlign
,
me
));
view
.
menuParagraphDirection
.
menu
.
on
(
'
item:click
'
,
_
.
bind
(
me
.
onParagraphDirection
,
me
));
view
.
menuParagraphDirection
.
menu
.
on
(
'
item:click
'
,
_
.
bind
(
me
.
onParagraphDirection
,
me
));
view
.
menuParagraphBullets
.
menu
.
on
(
'
item:click
'
,
_
.
bind
(
me
.
onSelectNoneBullet
,
me
));
view
.
menuAddHyperlinkShape
.
on
(
'
click
'
,
_
.
bind
(
me
.
onInsHyperlink
,
me
));
view
.
menuAddHyperlinkShape
.
on
(
'
click
'
,
_
.
bind
(
me
.
onInsHyperlink
,
me
));
view
.
menuEditHyperlinkShape
.
on
(
'
click
'
,
_
.
bind
(
me
.
onInsHyperlink
,
me
));
view
.
menuEditHyperlinkShape
.
on
(
'
click
'
,
_
.
bind
(
me
.
onInsHyperlink
,
me
));
view
.
menuRemoveHyperlinkShape
.
on
(
'
click
'
,
_
.
bind
(
me
.
onRemoveHyperlinkShape
,
me
));
view
.
menuRemoveHyperlinkShape
.
on
(
'
click
'
,
_
.
bind
(
me
.
onRemoveHyperlinkShape
,
me
));
...
@@ -186,6 +187,7 @@ define([
...
@@ -186,6 +187,7 @@ define([
view
.
mnuShapeAdvanced
.
on
(
'
click
'
,
_
.
bind
(
me
.
onShapeAdvanced
,
me
));
view
.
mnuShapeAdvanced
.
on
(
'
click
'
,
_
.
bind
(
me
.
onShapeAdvanced
,
me
));
view
.
mnuChartEdit
.
on
(
'
click
'
,
_
.
bind
(
me
.
onChartEdit
,
me
));
view
.
mnuChartEdit
.
on
(
'
click
'
,
_
.
bind
(
me
.
onChartEdit
,
me
));
view
.
mnuImgAdvanced
.
on
(
'
click
'
,
_
.
bind
(
me
.
onImgAdvanced
,
me
));
view
.
mnuImgAdvanced
.
on
(
'
click
'
,
_
.
bind
(
me
.
onImgAdvanced
,
me
));
view
.
textInShapeMenu
.
on
(
'
render:after
'
,
_
.
bind
(
me
.
onTextInShapeAfterRender
,
me
));
var
documentHolderEl
=
view
.
cmpEl
;
var
documentHolderEl
=
view
.
cmpEl
;
...
@@ -643,6 +645,39 @@ define([
...
@@ -643,6 +645,39 @@ define([
}
}
},
},
onSelectNoneBullet
:
function
(
menu
,
item
)
{
if
(
this
.
api
&&
item
.
options
.
value
==
-
1
)
{
this
.
api
.
asc_setListType
(
item
.
options
.
value
);
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
this
.
documentHolder
);
Common
.
component
.
Analytics
.
trackEvent
(
'
DocumentHolder
'
,
'
List Type
'
);
}
},
onSelectBullets
:
function
(
picker
,
itemView
,
record
,
e
)
{
var
rawData
=
{},
isPickerSelect
=
_
.
isFunction
(
record
.
toJSON
);
if
(
isPickerSelect
){
if
(
record
.
get
(
'
selected
'
))
{
rawData
=
record
.
toJSON
();
}
else
{
// record deselected
return
;
}
}
else
{
rawData
=
record
;
}
if
(
this
.
api
)
this
.
api
.
asc_setListType
(
rawData
.
type
,
rawData
.
subtype
);
if
(
e
.
type
!==
'
click
'
)
this
.
documentHolder
.
textInShapeMenu
.
hide
();
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
this
.
documentHolder
);
Common
.
component
.
Analytics
.
trackEvent
(
'
DocumentHolder
'
,
'
List Type
'
);
},
onRemoveHyperlinkShape
:
function
(
item
)
{
onRemoveHyperlinkShape
:
function
(
item
)
{
if
(
this
.
api
)
{
if
(
this
.
api
)
{
this
.
api
.
asc_removeHyperlink
();
this
.
api
.
asc_removeHyperlink
();
...
@@ -1266,7 +1301,8 @@ define([
...
@@ -1266,7 +1301,8 @@ define([
if
(
elType
==
Asc
.
c_oAscTypeSelectElement
.
Image
)
{
if
(
elType
==
Asc
.
c_oAscTypeSelectElement
.
Image
)
{
var
value
=
selectedObjects
[
i
].
asc_getObjectValue
(),
var
value
=
selectedObjects
[
i
].
asc_getObjectValue
(),
align
=
value
.
asc_getVerticalTextAlign
(),
align
=
value
.
asc_getVerticalTextAlign
(),
direct
=
value
.
asc_getVert
();
direct
=
value
.
asc_getVert
(),
listtype
=
this
.
api
.
asc_getCurrentListType
();
isObjLocked
=
isObjLocked
||
value
.
asc_getLocked
();
isObjLocked
=
isObjLocked
||
value
.
asc_getLocked
();
documentHolder
.
menuParagraphTop
.
setChecked
(
align
==
Asc
.
c_oAscVAlign
.
Top
);
documentHolder
.
menuParagraphTop
.
setChecked
(
align
==
Asc
.
c_oAscVAlign
.
Top
);
documentHolder
.
menuParagraphCenter
.
setChecked
(
align
==
Asc
.
c_oAscVAlign
.
Center
);
documentHolder
.
menuParagraphCenter
.
setChecked
(
align
==
Asc
.
c_oAscVAlign
.
Center
);
...
@@ -1275,6 +1311,10 @@ define([
...
@@ -1275,6 +1311,10 @@ define([
documentHolder
.
menuParagraphDirectH
.
setChecked
(
direct
==
Asc
.
c_oAscVertDrawingText
.
normal
);
documentHolder
.
menuParagraphDirectH
.
setChecked
(
direct
==
Asc
.
c_oAscVertDrawingText
.
normal
);
documentHolder
.
menuParagraphDirect90
.
setChecked
(
direct
==
Asc
.
c_oAscVertDrawingText
.
vert
);
documentHolder
.
menuParagraphDirect90
.
setChecked
(
direct
==
Asc
.
c_oAscVertDrawingText
.
vert
);
documentHolder
.
menuParagraphDirect270
.
setChecked
(
direct
==
Asc
.
c_oAscVertDrawingText
.
vert270
);
documentHolder
.
menuParagraphDirect270
.
setChecked
(
direct
==
Asc
.
c_oAscVertDrawingText
.
vert270
);
documentHolder
.
menuParagraphBulletNone
.
setChecked
(
listtype
.
get_ListType
()
==
-
1
);
var
rec
=
documentHolder
.
paraBulletsPicker
.
store
.
findWhere
({
type
:
listtype
.
get_ListType
(),
subtype
:
listtype
.
get_ListSubType
()
});
documentHolder
.
paraBulletsPicker
.
selectRecord
(
rec
,
true
);
}
else
if
(
elType
==
Asc
.
c_oAscTypeSelectElement
.
Paragraph
)
{
}
else
if
(
elType
==
Asc
.
c_oAscTypeSelectElement
.
Paragraph
)
{
documentHolder
.
pmiTextAdvanced
.
textInfo
=
selectedObjects
[
i
].
asc_getObjectValue
();
documentHolder
.
pmiTextAdvanced
.
textInfo
=
selectedObjects
[
i
].
asc_getObjectValue
();
isObjLocked
=
isObjLocked
||
documentHolder
.
pmiTextAdvanced
.
textInfo
.
asc_getLocked
();
isObjLocked
=
isObjLocked
||
documentHolder
.
pmiTextAdvanced
.
textInfo
.
asc_getLocked
();
...
@@ -2338,7 +2378,20 @@ define([
...
@@ -2338,7 +2378,20 @@ define([
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
.
documentHolder
);
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
me
.
documentHolder
);
},
},
guestText
:
'
Guest
'
,
onTextInShapeAfterRender
:
function
(
cmp
)
{
var
view
=
this
.
documentHolder
,
_conf
=
view
.
paraBulletsPicker
.
conf
;
view
.
paraBulletsPicker
=
new
Common
.
UI
.
DataView
({
el
:
$
(
'
#id-docholder-menu-bullets
'
),
parentMenu
:
view
.
menuParagraphBullets
.
menu
,
store
:
view
.
paraBulletsPicker
.
store
,
itemTemplate
:
_
.
template
(
'
<div id="<%= id %>" class="item-markerlist" style="background-position: 0 -<%= offsety %>px;"></div>
'
)
});
view
.
paraBulletsPicker
.
on
(
'
item:click
'
,
_
.
bind
(
this
.
onSelectBullets
,
this
));
_conf
&&
view
.
paraBulletsPicker
.
selectRecord
(
_conf
.
rec
,
true
);
},
guestText
:
'
Guest
'
,
textCtrlClick
:
'
Press CTRL and click link
'
,
textCtrlClick
:
'
Press CTRL and click link
'
,
txtHeight
:
'
Height
'
,
txtHeight
:
'
Height
'
,
txtWidth
:
'
Width
'
,
txtWidth
:
'
Width
'
,
...
...
apps/spreadsheeteditor/main/app/view/DocumentHolder.js
View file @
70694ac1
...
@@ -538,6 +538,45 @@ define([
...
@@ -538,6 +538,45 @@ define([
})
})
});
});
me
.
menuParagraphBullets
=
new
Common
.
UI
.
MenuItem
({
caption
:
me
.
bulletsText
,
menu
:
new
Common
.
UI
.
Menu
({
menuAlign
:
'
tl-tr
'
,
items
:
[
{
template
:
_
.
template
(
'
<div id="id-docholder-menu-bullets" class="menu-layouts" style="width: 325px; margin: 0 4px;"></div>
'
)
},
{
caption
:
'
--
'
},
me
.
menuParagraphBulletNone
=
new
Common
.
UI
.
MenuItem
({
caption
:
me
.
textNone
,
checkable
:
true
,
checked
:
false
,
value
:
-
1
})
]
})
});
me
.
paraBulletsPicker
=
{
conf
:
{
rec
:
null
},
store
:
new
Common
.
UI
.
DataViewStore
([
{
offsety
:
38
,
type
:
0
,
subtype
:
1
},
{
offsety
:
76
,
type
:
0
,
subtype
:
2
},
{
offsety
:
114
,
type
:
0
,
subtype
:
3
},
{
offsety
:
152
,
type
:
0
,
subtype
:
4
},
{
offsety
:
190
,
type
:
0
,
subtype
:
5
},
{
offsety
:
228
,
type
:
0
,
subtype
:
6
},
{
offsety
:
266
,
type
:
0
,
subtype
:
7
},
{
offsety
:
570
,
type
:
1
,
subtype
:
4
},
{
offsety
:
532
,
type
:
1
,
subtype
:
5
},
{
offsety
:
608
,
type
:
1
,
subtype
:
6
},
{
offsety
:
418
,
type
:
1
,
subtype
:
1
},
{
offsety
:
456
,
type
:
1
,
subtype
:
2
},
{
offsety
:
494
,
type
:
1
,
subtype
:
3
},
{
offsety
:
646
,
type
:
1
,
subtype
:
7
}
]),
selectRecord
:
function
(
rec
)
{
this
.
conf
.
rec
=
rec
;
}
};
me
.
menuAddHyperlinkShape
=
new
Common
.
UI
.
MenuItem
({
me
.
menuAddHyperlinkShape
=
new
Common
.
UI
.
MenuItem
({
caption
:
me
.
txtInsHyperlink
caption
:
me
.
txtInsHyperlink
});
});
...
@@ -588,6 +627,7 @@ define([
...
@@ -588,6 +627,7 @@ define([
{
caption
:
'
--
'
},
{
caption
:
'
--
'
},
me
.
menuParagraphVAlign
,
me
.
menuParagraphVAlign
,
me
.
menuParagraphDirection
,
me
.
menuParagraphDirection
,
me
.
menuParagraphBullets
,
me
.
menuAddHyperlinkShape
,
me
.
menuAddHyperlinkShape
,
me
.
menuHyperlinkShape
,
me
.
menuHyperlinkShape
,
{
caption
:
'
--
'
},
{
caption
:
'
--
'
},
...
@@ -712,7 +752,9 @@ define([
...
@@ -712,7 +752,9 @@ define([
txtClearSparklines
:
'
Clear Selected Sparklines
'
,
txtClearSparklines
:
'
Clear Selected Sparklines
'
,
txtClearSparklineGroups
:
'
Clear Selected Sparkline Groups
'
,
txtClearSparklineGroups
:
'
Clear Selected Sparkline Groups
'
,
txtShowComment
:
'
Show Comment
'
,
txtShowComment
:
'
Show Comment
'
,
advancedImgText
:
'
Image Advanced Settings
'
advancedImgText
:
'
Image Advanced Settings
'
,
textNone
:
'
None
'
,
bulletsText
:
'
Bullets and Numbering
'
},
SSE
.
Views
.
DocumentHolder
||
{}));
},
SSE
.
Views
.
DocumentHolder
||
{}));
});
});
\ No newline at end of file
apps/spreadsheeteditor/main/locale/en.json
View file @
70694ac1
...
@@ -1020,6 +1020,8 @@
...
@@ -1020,6 +1020,8 @@
"SSE.Views.DocumentHolder.txtUngroup"
:
"Ungroup"
,
"SSE.Views.DocumentHolder.txtUngroup"
:
"Ungroup"
,
"SSE.Views.DocumentHolder.txtWidth"
:
"Width"
,
"SSE.Views.DocumentHolder.txtWidth"
:
"Width"
,
"SSE.Views.DocumentHolder.vertAlignText"
:
"Vertical Alignment"
,
"SSE.Views.DocumentHolder.vertAlignText"
:
"Vertical Alignment"
,
"SSE.Views.DocumentHolder.textNone"
:
"None"
,
"SSE.Views.DocumentHolder.bulletsText"
:
"Bullets and Numbering"
,
"SSE.Views.FileMenu.btnBackCaption"
:
"Go to Documents"
,
"SSE.Views.FileMenu.btnBackCaption"
:
"Go to Documents"
,
"SSE.Views.FileMenu.btnCloseMenuCaption"
:
"Close Menu"
,
"SSE.Views.FileMenu.btnCloseMenuCaption"
:
"Close Menu"
,
"SSE.Views.FileMenu.btnCreateNewCaption"
:
"Create New"
,
"SSE.Views.FileMenu.btnCreateNewCaption"
:
"Create New"
,
...
...
apps/spreadsheeteditor/main/resources/img/toolbar/bullets-and-numbering.png
0 → 100644
View file @
70694ac1
1.78 KB
apps/spreadsheeteditor/main/resources/img/toolbar/bullets-and-numbering@2x.png
0 → 100644
View file @
70694ac1
4.31 KB
apps/spreadsheeteditor/main/resources/less/toolbar.less
View file @
70694ac1
...
@@ -265,4 +265,10 @@
...
@@ -265,4 +265,10 @@
z-index: @zindex-dropdown - 20;
z-index: @zindex-dropdown - 20;
background-color: @gray-light;
background-color: @gray-light;
border: 1px solid @gray;
border: 1px solid @gray;
}
.item-markerlist {
.background-ximage('@{app-image-path}/toolbar/bullets-and-numbering.png', '@{app-image-path}/toolbar/bullets-and-numbering@2x.png', 38px);
width: 38px;
height: 38px;
}
}
\ 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