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
434ef607
Commit
434ef607
authored
Apr 13, 2016
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Common] Window: добавлена возможность задания нескольких кастомных кнопок в алерты.
parent
091c0c7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
apps/common/main/lib/component/Window.js
apps/common/main/lib/component/Window.js
+8
-3
No files found.
apps/common/main/lib/component/Window.js
View file @
434ef607
...
...
@@ -301,9 +301,14 @@ define([
options
.
primary
=
'
ok
'
;
var
newBtns
=
{};
_
.
each
(
options
.
buttons
,
function
(
b
){
newBtns
[
b
]
=
{
text
:
(
b
==
'
custom
'
)
?
options
.
customButtonText
:
arrBtns
[
b
],
cls
:
(
options
.
primary
==
b
)
?
'
primary
'
:
''
};
if
(
b
==
'
custom
'
)
newBtns
[
b
].
cls
+=
'
custom
'
;
if
(
typeof
(
b
)
==
'
object
'
)
{
if
(
b
.
value
!==
undefined
)
newBtns
[
b
.
value
]
=
{
text
:
b
.
caption
,
cls
:
'
custom
'
+
((
b
.
primary
||
options
.
primary
==
b
.
value
)
?
'
primary
'
:
''
)};
}
else
{
newBtns
[
b
]
=
{
text
:
(
b
==
'
custom
'
)
?
options
.
customButtonText
:
arrBtns
[
b
],
cls
:
(
options
.
primary
==
b
)
?
'
primary
'
:
''
};
if
(
b
==
'
custom
'
)
newBtns
[
b
].
cls
+=
'
custom
'
;
}
});
options
.
buttons
=
newBtns
;
...
...
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