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
986ddd4e
Commit
986ddd4e
authored
Mar 09, 2017
by
Alexander Yuzhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SE mobile] Fix bug 34144
parent
0a49c21e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
91 additions
and
50 deletions
+91
-50
apps/spreadsheeteditor/mobile/app/controller/add/AddFunction.js
...preadsheeteditor/mobile/app/controller/add/AddFunction.js
+62
-34
apps/spreadsheeteditor/mobile/app/template/AddFunction.template
...preadsheeteditor/mobile/app/template/AddFunction.template
+2
-2
apps/spreadsheeteditor/mobile/app/view/add/AddFunction.js
apps/spreadsheeteditor/mobile/app/view/add/AddFunction.js
+23
-14
apps/spreadsheeteditor/mobile/locale/de.json
apps/spreadsheeteditor/mobile/locale/de.json
+1
-0
apps/spreadsheeteditor/mobile/locale/en.json
apps/spreadsheeteditor/mobile/locale/en.json
+1
-0
apps/spreadsheeteditor/mobile/locale/fr.json
apps/spreadsheeteditor/mobile/locale/fr.json
+1
-0
apps/spreadsheeteditor/mobile/locale/ru.json
apps/spreadsheeteditor/mobile/locale/ru.json
+1
-0
No files found.
apps/spreadsheeteditor/mobile/app/controller/add/AddFunction.js
View file @
986ddd4e
...
...
@@ -58,13 +58,15 @@ define([
],
initialize
:
function
()
{
Common
.
NotificationCenter
.
on
(
'
addcontainer:show
'
,
_
.
bind
(
this
.
initEvents
,
this
));
Common
.
NotificationCenter
.
on
(
'
document:ready
'
,
_
.
bind
(
this
.
onDocumentReady
,
this
));
var
me
=
this
;
Common
.
NotificationCenter
.
on
(
'
addcontainer:show
'
,
_
.
bind
(
me
.
initEvents
,
me
));
Common
.
NotificationCenter
.
on
(
'
document:ready
'
,
_
.
bind
(
me
.
onDocumentReady
,
me
));
this
.
addListeners
({
me
.
addListeners
({
'
AddFunction
'
:
{
'
function:insert
'
:
this
.
onInsertFunction
.
bind
(
this
),
'
function:info
'
:
this
.
onFunctionInfo
.
bind
(
this
)
'
function:insert
'
:
me
.
onInsertFunction
.
bind
(
me
),
'
function:info
'
:
me
.
onFunctionInfo
.
bind
(
me
)
}
});
},
...
...
@@ -75,12 +77,6 @@ define([
onLaunch
:
function
()
{
this
.
createView
(
'
AddFunction
'
).
render
();
var
me
=
this
;
_
.
defer
(
function
()
{
me
.
api
.
asc_setLocalization
(
fc
);
me
.
fillFunctions
.
call
(
me
);
});
},
initEvents
:
function
()
{
...
...
@@ -90,35 +86,67 @@ define([
var
me
=
this
;
_
.
defer
(
function
()
{
me
.
api
.
asc_setLocalization
(
fc
);
me
.
fillFunctions
.
call
(
me
);
var
editorLang
=
SSE
.
getController
(
"
Main
"
).
editorConfig
.
lang
;
var
localizationFunctions
=
function
(
data
)
{
fc
=
data
;
me
.
api
.
asc_setLocalization
(
fc
);
me
.
fillFunctions
.
call
(
me
);
};
$
.
getJSON
(
Common
.
Utils
.
String
.
format
(
"
{0}/{1}.json
"
,
"
resources/l10n/functions
"
,
editorLang
),
function
(
json
)
{
localizationFunctions
(
json
);
}).
fail
(
function
()
{
localizationFunctions
(
fc
);
});
});
},
fillFunctions
:
function
()
{
var
functions
=
{};
var
jsonDescr
=
JSON
.
parse
(
fd
);
var
grouparr
=
this
.
api
.
asc_getFormulasInfo
();
for
(
var
g
in
grouparr
)
{
var
group
=
grouparr
[
g
];
var
groupname
=
group
.
asc_getGroupName
();
var
funcarr
=
group
.
asc_getFormulasArray
();
for
(
var
f
in
funcarr
)
{
var
func
=
funcarr
[
f
];
var
_name
=
func
.
asc_getName
();
functions
[
_name
]
=
{
type
:
_name
,
group
:
groupname
,
caption
:
func
.
asc_getLocaleName
(),
args
:
jsonDescr
[
_name
].
a
||
''
,
descr
:
jsonDescr
[
_name
].
d
||
''
};
var
me
=
this
,
functions
=
{},
editorLang
=
SSE
.
getController
(
"
Main
"
).
editorConfig
.
lang
;
var
localizationFunctionsDesc
=
function
(
data
)
{
var
jsonDesc
=
{},
view
=
me
.
getView
(
'
AddFunction
'
);
fd
=
data
;
try
{
jsonDesc
=
JSON
.
parse
(
fd
);
}
catch
(
e
)
{
jsonDesc
=
fd
}
var
grouparr
=
me
.
api
.
asc_getFormulasInfo
();
for
(
var
g
in
grouparr
)
{
var
group
=
grouparr
[
g
];
var
groupname
=
group
.
asc_getGroupName
();
var
funcarr
=
group
.
asc_getFormulasArray
();
for
(
var
f
in
funcarr
)
{
var
func
=
funcarr
[
f
];
var
_name
=
func
.
asc_getName
();
functions
[
_name
]
=
{
type
:
_name
,
group
:
groupname
,
caption
:
func
.
asc_getLocaleName
(),
args
:
jsonDesc
[
_name
].
a
||
''
,
descr
:
jsonDesc
[
_name
].
d
||
''
};
}
}
}
this
.
getView
(
'
AddFunction
'
).
setFunctions
(
functions
);
view
.
setFunctions
(
functions
);
view
.
render
();
};
$
.
getJSON
(
Common
.
Utils
.
String
.
format
(
"
{0}/{1}_desc.json
"
,
"
resources/l10n/functions
"
,
editorLang
),
function
(
json
)
{
localizationFunctionsDesc
(
json
);
}).
fail
(
function
()
{
localizationFunctionsDesc
(
fd
);
});
},
onInsertFunction
:
function
(
type
)
{
...
...
apps/spreadsheeteditor/mobile/app/template/AddFunction.template
View file @
986ddd4e
...
...
@@ -47,7 +47,7 @@
<div id="add-function-group">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= textBack %></span><% } %></a></div>
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%=
scope.
textBack %></span><% } %></a></div>
<div class="center sliding"><%= groupname %></div>
</div>
</div>
...
...
@@ -79,7 +79,7 @@
<div id="add-function-info">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= textBack %></span><% } %></a></div>
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%=
scope.
textBack %></span><% } %></a></div>
<div class="center sliding"><%= caption %></div>
</div>
</div>
...
...
apps/spreadsheeteditor/mobile/app/view/add/AddFunction.js
View file @
986ddd4e
...
...
@@ -53,7 +53,7 @@ define([
android
:
Common
.
SharedSettings
.
get
(
'
android
'
),
phone
:
Common
.
SharedSettings
.
get
(
'
phone
'
),
view
:
viewid
,
textBack
:
'
Back
'
scope
:
this
};
_
.
extend
(
_params
,
args
);
...
...
@@ -94,6 +94,8 @@ define([
// Render layout
render
:
function
()
{
var
me
=
this
;
var
quickFunctions
=
[
{
caption
:
'
SUM
'
,
type
:
'
SUM
'
},
{
caption
:
'
MIN
'
,
type
:
'
MIN
'
},
...
...
@@ -101,24 +103,30 @@ define([
{
caption
:
'
COUNT
'
,
type
:
'
COUNT
'
}
];
this
.
groups
=
{
'
DateAndTime
'
:
this
.
sCatDateAndTime
,
'
Engineering
'
:
this
.
sCatEngineering
,
'
TextAndData
'
:
this
.
sCatTextAndData
,
'
Statistical
'
:
this
.
sCatStatistical
,
'
Financial
'
:
this
.
sCatFinancial
,
'
Mathematic
'
:
this
.
sCatMathematic
,
'
LookupAndReference
'
:
this
.
sCatLookupAndReference
,
'
Information
'
:
this
.
sCatInformation
,
'
Logical
'
:
this
.
sCatLogical
if
(
me
.
functions
)
{
_
.
each
(
quickFunctions
,
function
(
quickFunction
)
{
quickFunction
.
caption
=
me
.
functions
[
quickFunction
.
type
].
caption
});
}
me
.
groups
=
{
'
DateAndTime
'
:
me
.
sCatDateAndTime
,
'
Engineering
'
:
me
.
sCatEngineering
,
'
TextAndData
'
:
me
.
sCatTextAndData
,
'
Statistical
'
:
me
.
sCatStatistical
,
'
Financial
'
:
me
.
sCatFinancial
,
'
Mathematic
'
:
me
.
sCatMathematic
,
'
LookupAndReference
'
:
me
.
sCatLookupAndReference
,
'
Information
'
:
me
.
sCatInformation
,
'
Logical
'
:
me
.
sCatLogical
};
this
.
layout
=
$
(
'
<div/>
'
).
append
(
_
.
template
(
this
.
template
,
{
me
.
layout
=
$
(
'
<div/>
'
).
append
(
_
.
template
(
me
.
template
,
{
android
:
Common
.
SharedSettings
.
get
(
'
android
'
),
phone
:
Common
.
SharedSettings
.
get
(
'
phone
'
),
textGroups
:
this
.
textGroups
,
textGroups
:
me
.
textGroups
,
quick
:
quickFunctions
,
groups
:
this
.
groups
,
groups
:
me
.
groups
,
view
:
'
root
'
}));
...
...
@@ -180,6 +188,7 @@ define([
},
textGroups
:
'
CATEGORIES
'
,
textBack
:
'
Back
'
,
sCatLogical
:
'
Logical
'
,
// sCatCube: 'Cube',
// sCatDatabase: 'Database',
...
...
apps/spreadsheeteditor/mobile/locale/de.json
View file @
986ddd4e
...
...
@@ -222,6 +222,7 @@
"SSE.Views.AddFunction.sCatStatistical"
:
"Statistisch"
,
"SSE.Views.AddFunction.sCatTextAndData"
:
"Text und Daten"
,
"SSE.Views.AddFunction.textGroups"
:
"Kategorien"
,
"SSE.Views.AddFunction.textBack"
:
"Zurück"
,
"SSE.Views.AddLink.textAddLink"
:
"Link hinzufügen"
,
"SSE.Views.AddLink.textAddress"
:
"Adresse"
,
"SSE.Views.AddLink.textDisplay"
:
"Anzeigen"
,
...
...
apps/spreadsheeteditor/mobile/locale/en.json
View file @
986ddd4e
...
...
@@ -224,6 +224,7 @@
"SSE.Views.AddFunction.sCatStatistical"
:
"Statistical"
,
"SSE.Views.AddFunction.sCatTextAndData"
:
"Text and data"
,
"SSE.Views.AddFunction.textGroups"
:
"Categories"
,
"SSE.Views.AddFunction.textBack"
:
"Back"
,
"SSE.Views.AddLink.textAddLink"
:
"Add Link"
,
"SSE.Views.AddLink.textAddress"
:
"Address"
,
"SSE.Views.AddLink.textDisplay"
:
"Display"
,
...
...
apps/spreadsheeteditor/mobile/locale/fr.json
View file @
986ddd4e
...
...
@@ -222,6 +222,7 @@
"SSE.Views.AddFunction.sCatStatistical"
:
"Statistiques"
,
"SSE.Views.AddFunction.sCatTextAndData"
:
"Texte et données"
,
"SSE.Views.AddFunction.textGroups"
:
"Catégories"
,
"SSE.Views.AddFunction.textBack"
:
"Retour"
,
"SSE.Views.AddLink.textAddLink"
:
"Ajouter le lien"
,
"SSE.Views.AddLink.textAddress"
:
"Adresse"
,
"SSE.Views.AddLink.textDisplay"
:
"Afficher"
,
...
...
apps/spreadsheeteditor/mobile/locale/ru.json
View file @
986ddd4e
...
...
@@ -222,6 +222,7 @@
"SSE.Views.AddFunction.sCatStatistical"
:
"Статистические"
,
"SSE.Views.AddFunction.sCatTextAndData"
:
"Текст и данные"
,
"SSE.Views.AddFunction.textGroups"
:
"Категории"
,
"SSE.Views.AddFunction.textBack"
:
"Назад"
,
"SSE.Views.AddLink.textAddLink"
:
"Добавить ссылку"
,
"SSE.Views.AddLink.textAddress"
:
"Адрес"
,
"SSE.Views.AddLink.textDisplay"
:
"Отображать"
,
...
...
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