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
58534c42
Commit
58534c42
authored
Nov 30, 2016
by
Alexander Yuzhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DE ios] Fixed display table styles.
parent
f0562c55
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
18 deletions
+30
-18
apps/documenteditor/mobile/app/controller/add/AddTable.js
apps/documenteditor/mobile/app/controller/add/AddTable.js
+9
-9
apps/documenteditor/mobile/app/controller/edit/EditTable.js
apps/documenteditor/mobile/app/controller/edit/EditTable.js
+14
-0
apps/documenteditor/mobile/app/view/add/AddTable.js
apps/documenteditor/mobile/app/view/add/AddTable.js
+2
-3
apps/documenteditor/mobile/app/view/edit/EditTable.js
apps/documenteditor/mobile/app/view/edit/EditTable.js
+5
-6
No files found.
apps/documenteditor/mobile/app/controller/add/AddTable.js
View file @
58534c42
...
...
@@ -155,17 +155,17 @@ define([
// API handlers
onApiInitTemplates
:
function
(
templates
){
_styles
=
[];
_
.
each
(
templates
,
function
(
template
){
_styles
.
push
({
imageUrl
:
template
.
get_Image
(),
templateId
:
template
.
get_Id
()
onApiInitTemplates
:
function
(
templates
)
{
if
(
_styles
.
length
<
1
)
{
_
.
each
(
templates
,
function
(
template
){
_styles
.
push
({
imageUrl
:
template
.
get_Image
(),
templateId
:
template
.
get_Id
()
});
});
});
Common
.
SharedSettings
.
set
(
'
tablestyles
'
,
_styles
);
Common
.
NotificationCenter
.
trigger
(
'
tablestyles:load
'
,
_styles
);
this
.
getView
(
'
AddTable
'
).
render
(
);
}
},
textTableSize
:
'
Table Size
'
,
...
...
apps/documenteditor/mobile/app/controller/edit/EditTable.js
View file @
58534c42
...
...
@@ -111,6 +111,7 @@ define([
me
.
api
=
api
;
me
.
api
.
asc_registerCallback
(
'
asc_onFocusObject
'
,
_
.
bind
(
me
.
onApiFocusObject
,
me
));
me
.
api
.
asc_registerCallback
(
'
asc_onInitTableTemplates
'
,
_
.
bind
(
me
.
onApiInitTemplates
,
me
));
},
onLaunch
:
function
()
{
...
...
@@ -613,6 +614,19 @@ define([
}
},
onApiInitTemplates
:
function
(
templates
)
{
var
styles
=
[];
_
.
each
(
templates
,
function
(
template
){
styles
.
push
({
imageUrl
:
template
.
get_Image
(),
templateId
:
template
.
get_Id
()
});
});
this
.
getView
(
'
EditTable
'
).
updateStyles
(
styles
);
},
// Helpers
_closeIfNeed
:
function
()
{
...
...
apps/documenteditor/mobile/app/view/add/AddTable.js
View file @
58534c42
...
...
@@ -61,7 +61,6 @@ define([
initialize
:
function
()
{
Common
.
NotificationCenter
.
on
(
'
addcontainer:show
'
,
_
.
bind
(
this
.
initEvents
,
this
));
Common
.
NotificationCenter
.
on
(
'
tablestyles:load
'
,
_
.
bind
(
this
.
render
,
this
));
},
initEvents
:
function
()
{
...
...
@@ -75,10 +74,10 @@ define([
this
.
layout
=
$
(
'
<div/>
'
).
append
(
this
.
template
({
android
:
Common
.
SharedSettings
.
get
(
'
android
'
),
phone
:
Common
.
SharedSettings
.
get
(
'
phone
'
),
styles
:
Common
.
SharedSettings
.
get
(
'
tablestyles
'
)
styles
:
DE
.
getController
(
'
AddTable
'
).
getStyles
(
)
}));
var
$tableStyles
=
$
(
'
.table-styles
'
);
var
$tableStyles
=
$
(
'
.
container-add .
table-styles
'
);
if
(
$tableStyles
)
{
$tableStyles
.
replaceWith
(
this
.
layout
.
find
(
'
#add-table-root
'
).
html
());
}
...
...
apps/documenteditor/mobile/app/view/edit/EditTable.js
View file @
58534c42
...
...
@@ -64,7 +64,6 @@ define([
initialize
:
function
()
{
Common
.
NotificationCenter
.
on
(
'
editcontainer:show
'
,
_
.
bind
(
this
.
initEvents
,
this
));
Common
.
NotificationCenter
.
on
(
'
editcategory:show
'
,
_
.
bind
(
this
.
categoryShow
,
this
));
Common
.
NotificationCenter
.
on
(
'
tablestyles:load
'
,
_
.
bind
(
this
.
onStylesLoad
,
this
));
},
initEvents
:
function
()
{
...
...
@@ -108,15 +107,15 @@ define([
//
},
onStylesLoad
:
function
()
{
_styles
=
Common
.
SharedSettings
.
get
(
'
tablestyles
'
);
updateStyles
:
function
(
styles
)
{
_styles
=
styles
;
this
.
renderStyles
();
},
renderStyles
:
function
()
{
var
$editTableStyle
=
$
(
'
#edit-table-styles .item-inner .dataview.table-styles
'
),
$styleContainer
=
$
(
'
#edit-table-styles .item-inner
'
);
var
$styleContainer
=
$
(
'
#edit-table-styles .item-inner
'
);
if
(
$
editTableStyle
.
length
<
1
&&
$
styleContainer
.
length
>
0
)
{
if
(
$styleContainer
.
length
>
0
)
{
var
columns
=
parseInt
(
$styleContainer
.
width
()
/
70
),
// magic
row
=
-
1
,
styles
=
[];
...
...
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