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
52e9b6a6
Commit
52e9b6a6
authored
Mar 14, 2017
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PE] bug 34035, 33978, 33945.
parent
ef65270e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
56 deletions
+63
-56
apps/presentationeditor/mobile/app/controller/add/AddTable.js
.../presentationeditor/mobile/app/controller/add/AddTable.js
+54
-52
apps/presentationeditor/mobile/app/controller/edit/EditTable.js
...resentationeditor/mobile/app/controller/edit/EditTable.js
+9
-4
No files found.
apps/presentationeditor/mobile/app/controller/add/AddTable.js
View file @
52e9b6a6
...
...
@@ -91,64 +91,66 @@ define([
$target
=
$
(
e
.
currentTarget
),
type
=
$target
.
data
(
'
type
'
);
if
(
$
(
'
.modal.modal-in
'
).
length
>
0
)
{
return
;
}
PE
.
getController
(
'
AddContainer
'
).
hideModal
();
_
.
delay
(
function
()
{
if
(
$target
)
{
var
picker
;
var
modal
=
uiApp
.
modal
({
title
:
me
.
textTableSize
,
text
:
''
,
afterText
:
'
<div class="content-block">
'
+
'
<div class="row">
'
+
'
<div class="col-50">
'
+
me
.
textColumns
+
'
</div>
'
+
'
<div class="col-50">
'
+
me
.
textRows
+
'
</div>
'
+
'
</div>
'
+
'
<div id="picker-table-size"></div>
'
+
'
</div>
'
,
buttons
:
[
{
text
:
me
.
textCancel
},
{
text
:
'
OK
'
,
bold
:
true
,
onClick
:
function
()
{
var
size
=
picker
.
value
;
if
(
me
.
api
)
{
me
.
api
.
put_Table
(
parseInt
(
size
[
0
]),
parseInt
(
size
[
1
]));
var
properties
=
new
Asc
.
CTableProp
();
properties
.
put_TableStyle
(
type
);
me
.
api
.
tblApply
(
properties
);
}
if
(
$target
)
{
var
picker
;
var
modal
=
uiApp
.
modal
({
title
:
me
.
textTableSize
,
text
:
''
,
afterText
:
'
<div class="content-block">
'
+
'
<div class="row">
'
+
'
<div class="col-50">
'
+
me
.
textColumns
+
'
</div>
'
+
'
<div class="col-50">
'
+
me
.
textRows
+
'
</div>
'
+
'
</div>
'
+
'
<div id="picker-table-size"></div>
'
+
'
</div>
'
,
buttons
:
[
{
text
:
me
.
textCancel
},
{
text
:
'
OK
'
,
bold
:
true
,
onClick
:
function
()
{
var
size
=
picker
.
value
;
if
(
me
.
api
)
{
me
.
api
.
put_Table
(
parseInt
(
size
[
0
]),
parseInt
(
size
[
1
]));
var
properties
=
new
Asc
.
CTableProp
();
properties
.
put_TableStyle
(
type
);
me
.
api
.
tblApply
(
properties
);
}
}
]
});
}
]
});
picker
=
uiApp
.
picker
({
container
:
'
#picker-table-size
'
,
toolbar
:
false
,
rotateEffect
:
true
,
value
:
[
3
,
3
],
cols
:
[{
textAlign
:
'
left
'
,
values
:
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
]
},
{
values
:
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
]
}]
});
picker
=
uiApp
.
picker
({
container
:
'
#picker-table-size
'
,
toolbar
:
false
,
rotateEffect
:
true
,
value
:
[
3
,
3
],
cols
:
[{
textAlign
:
'
left
'
,
values
:
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
]
},
{
values
:
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
]
}]
});
// Vertical align
$$
(
modal
).
css
({
marginTop
:
-
Math
.
round
(
$$
(
modal
).
outerHeight
()
/
2
)
+
'
px
'
});
}
},
300
);
// Vertical align
$$
(
modal
).
css
({
marginTop
:
-
Math
.
round
(
$$
(
modal
).
outerHeight
()
/
2
)
+
'
px
'
});
}
},
// Public
...
...
apps/presentationeditor/mobile/app/controller/edit/EditTable.js
View file @
52e9b6a6
...
...
@@ -69,14 +69,19 @@ define([
return
_sizes
[
index
];
},
s
izeByValue
:
function
(
value
)
{
indexS
izeByValue
:
function
(
value
)
{
var
index
=
0
;
_
.
each
(
_sizes
,
function
(
size
,
idx
)
{
if
(
Math
.
abs
(
size
-
value
)
<
0.25
)
{
index
=
idx
;
}
});
return
_sizes
[
index
];
return
index
;
},
sizeByValue
:
function
(
value
)
{
return
_sizes
[
this
.
indexSizeByValue
(
value
)];
}
}
})();
...
...
@@ -182,7 +187,7 @@ define([
},
_initTableOptionsView
:
function
()
{
var
margins
=
_tableObject
.
get_
Default
Margins
();
var
margins
=
_tableObject
.
get_
Cell
Margins
();
if
(
margins
)
{
var
distance
=
Common
.
Utils
.
Metric
.
fnRecalcFromMM
(
margins
.
get_Left
());
$
(
'
#table-options-margins input
'
).
val
(
distance
);
...
...
@@ -262,7 +267,7 @@ define([
// });
// }
$
(
'
#edit-table-bordersize input
'
).
val
([
borderSizeTransform
.
sizeByIndex
(
_cellBorderWidth
)]);
$
(
'
#edit-table-bordersize input
'
).
val
([
borderSizeTransform
.
indexSizeByValue
(
_cellBorderWidth
)]);
$
(
'
#edit-table-bordersize .item-after
'
).
text
(
borderSizeTransform
.
sizeByValue
(
_cellBorderWidth
)
+
'
'
+
_metricText
);
var
borderPalette
=
me
.
getView
(
'
EditTable
'
).
paletteBorderColor
;
...
...
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