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
b7c6ebc0
Commit
b7c6ebc0
authored
Nov 24, 2016
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PE mobile] [SSE mobile] Fixed fill user info.
parent
d911b61d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
34 deletions
+2
-34
apps/presentationeditor/mobile/app/controller/Main.js
apps/presentationeditor/mobile/app/controller/Main.js
+1
-17
apps/spreadsheeteditor/mobile/app/controller/Main.js
apps/spreadsheeteditor/mobile/app/controller/Main.js
+1
-17
No files found.
apps/presentationeditor/mobile/app/controller/Main.js
View file @
b7c6ebc0
...
...
@@ -55,20 +55,6 @@ define([
Common
.
localStorage
.
setKeysFilter
(
'
pe-,asc.presentation
'
);
Common
.
localStorage
.
sync
();
var
fillUserInfo
=
function
(
info
,
lang
,
defname
)
{
var
user
=
info
||
{};
!
user
.
id
&&
(
user
.
id
=
(
'
uid-
'
+
Date
.
now
()));
_
.
isEmpty
(
user
.
firstname
)
&&
_
.
isEmpty
(
user
.
lastname
)
&&
(
user
.
firstname
=
defname
);
if
(
_
.
isEmpty
(
user
.
firstname
))
user
.
fullname
=
user
.
lastname
;
else
if
(
_
.
isEmpty
(
user
.
lastname
))
user
.
fullname
=
user
.
firstname
;
else
user
.
fullname
=
/^ru/
.
test
(
lang
)
?
user
.
lastname
+
'
'
+
user
.
firstname
:
user
.
firstname
+
'
'
+
user
.
lastname
;
return
user
;
};
return
{
models
:
[],
collections
:
[],
...
...
@@ -159,7 +145,7 @@ define([
me
.
editorConfig
=
$
.
extend
(
me
.
editorConfig
,
data
.
config
);
me
.
editorConfig
.
user
=
me
.
appOptions
.
user
=
fillUserInfo
(
me
.
editorConfig
.
user
,
me
.
editorConfig
.
lang
,
me
.
textAnonymous
);
me
.
appOptions
.
user
=
Common
.
Utils
.
fillUserInfo
(
me
.
editorConfig
.
user
,
me
.
editorConfig
.
lang
,
me
.
textAnonymous
);
me
.
appOptions
.
nativeApp
=
me
.
editorConfig
.
nativeApp
===
true
;
me
.
appOptions
.
isDesktopApp
=
me
.
editorConfig
.
targetApp
==
'
desktop
'
;
me
.
appOptions
.
canCreateNew
=
!
_
.
isEmpty
(
me
.
editorConfig
.
createUrl
)
&&
!
me
.
appOptions
.
isDesktopApp
;
...
...
@@ -198,8 +184,6 @@ define([
var
_user
=
new
Asc
.
asc_CUserInfo
();
_user
.
put_Id
(
this
.
appOptions
.
user
.
id
);
_user
.
put_FirstName
(
this
.
appOptions
.
user
.
firstname
);
_user
.
put_LastName
(
this
.
appOptions
.
user
.
lastname
);
_user
.
put_FullName
(
this
.
appOptions
.
user
.
fullname
);
docInfo
=
new
Asc
.
asc_CDocInfo
();
...
...
apps/spreadsheeteditor/mobile/app/controller/Main.js
View file @
b7c6ebc0
...
...
@@ -57,20 +57,6 @@ define([
Common
.
localStorage
.
setKeysFilter
(
'
sse-,asc.table
'
);
Common
.
localStorage
.
sync
();
var
fillUserInfo
=
function
(
info
,
lang
,
defname
)
{
var
user
=
info
||
{};
!
user
.
id
&&
(
user
.
id
=
(
'
uid-
'
+
Date
.
now
()));
_
.
isEmpty
(
user
.
firstname
)
&&
_
.
isEmpty
(
user
.
lastname
)
&&
(
user
.
firstname
=
defname
);
if
(
_
.
isEmpty
(
user
.
firstname
))
user
.
fullname
=
user
.
lastname
;
else
if
(
_
.
isEmpty
(
user
.
lastname
))
user
.
fullname
=
user
.
firstname
;
else
user
.
fullname
=
/^ru/
.
test
(
lang
)
?
user
.
lastname
+
'
'
+
user
.
firstname
:
user
.
firstname
+
'
'
+
user
.
lastname
;
return
user
;
};
return
{
models
:
[],
collections
:
[],
...
...
@@ -160,7 +146,7 @@ define([
this
.
editorConfig
=
$
.
extend
(
this
.
editorConfig
,
data
.
config
);
this
.
editorConfig
.
user
=
this
.
appOptions
.
user
=
fillUserInfo
(
this
.
editorConfig
.
user
,
this
.
editorConfig
.
lang
,
this
.
textAnonymous
);
this
.
appOptions
.
user
=
Common
.
Utils
.
fillUserInfo
(
this
.
editorConfig
.
user
,
this
.
editorConfig
.
lang
,
this
.
textAnonymous
);
this
.
appOptions
.
nativeApp
=
this
.
editorConfig
.
nativeApp
===
true
;
this
.
appOptions
.
isDesktopApp
=
this
.
editorConfig
.
targetApp
==
'
desktop
'
;
this
.
appOptions
.
canCreateNew
=
!
_
.
isEmpty
(
this
.
editorConfig
.
createUrl
)
&&
!
this
.
appOptions
.
isDesktopApp
;
...
...
@@ -198,8 +184,6 @@ define([
var
_user
=
new
Asc
.
asc_CUserInfo
();
_user
.
put_Id
(
this
.
appOptions
.
user
.
id
);
_user
.
put_FirstName
(
this
.
appOptions
.
user
.
firstname
);
_user
.
put_LastName
(
this
.
appOptions
.
user
.
lastname
);
_user
.
put_FullName
(
this
.
appOptions
.
user
.
fullname
);
docInfo
=
new
Asc
.
asc_CDocInfo
();
...
...
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