Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zimbra-admin-api-js
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Public
zimbra-admin-api-js
Commits
759c58d4
Commit
759c58d4
authored
May 31, 2016
by
Juorder Antonio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add tooltip on plans list, some style too, and hide button submit when have not plans
parent
73014b34
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
9 deletions
+60
-9
create_mailbox.jsx
src/components/mailbox/create_mailbox.jsx
+36
-9
_mailbox.scss
src/sass/routes/_mailbox.scss
+24
-0
No files found.
src/components/mailbox/create_mailbox.jsx
View file @
759c58d4
...
...
@@ -360,6 +360,7 @@ export default class CreateMailBox extends React.Component {
let
domains
=
[];
let
form
=
null
;
let
checkboxes
=
[];
let
counterPlans
=
9999
;
if
(
this
.
state
.
error
)
{
message
=
(
...
...
@@ -383,7 +384,13 @@ export default class CreateMailBox extends React.Component {
if
(
this
.
state
.
enabledAccounts
)
{
const
accounts
=
this
.
state
.
enabledAccounts
;
if
(
accounts
.
length
>
0
)
{
counterPlans
=
accounts
.
length
;
accounts
.
forEach
((
plan
)
=>
{
if
(
plan
.
enabled
<=
0
)
{
counterPlans
--
;
}
});
/*if (accounts.length > 0) {
const response = accounts.map((account) => {
return (
<li
...
...
@@ -408,7 +415,7 @@ export default class CreateMailBox extends React.Component {
</div>
</div>
);
}
}
*/
}
if
(
this
.
state
.
domains
)
{
...
...
@@ -437,10 +444,24 @@ export default class CreateMailBox extends React.Component {
for
(
let
plan
in
plans
)
{
if
(
plans
.
hasOwnProperty
(
plan
))
{
let
isDisabled
=
null
;
let
classCss
=
null
;
let
info
=
null
;
if
(
this
.
state
.
enabledAccounts
)
{
this
.
state
.
enabledAccounts
.
forEach
((
p
)
=>
{
if
(
plans
[
plan
]
===
p
.
cosId
)
{
isDisabled
=
p
.
enabled
<
1
?
true
:
null
;
classCss
=
p
.
classCss
;
info
=
(
<
div
>
<
span
>
Usadas:
{
p
.
used
}
</
span
>
<
span
>
-
</
span
>
<
span
className=
{
p
.
enabled
<=
0
?
'text-danger'
:
'text-success'
}
>
Libres:
{
p
.
enabled
}
</
span
>
</
div
>
);
}
});
}
...
...
@@ -463,7 +484,11 @@ export default class CreateMailBox extends React.Component {
/>
<
span
></
span
>
</
div
>
{
Utils
.
titleCase
(
plan
)
}
<
span
className=
{
`${classCss} status-plan`
}
>
{
Utils
.
titleCase
(
plan
)
}
</
span
>
{
info
}
</
label
>
);
checkboxes
.
push
(
item
);
...
...
@@ -644,12 +669,14 @@ export default class CreateMailBox extends React.Component {
<
div
className=
'form-group'
>
<
div
className=
'col-sm-8 col-sm-offset-3'
>
<
input
type=
'submit'
name=
'commit'
value=
'Guardar'
className=
'btn btn-primary action-save'
/>
{
counterPlans
>
0
&&
(
<
input
type=
'submit'
name=
'commit'
value=
'Guardar'
className=
'btn btn-primary action-save'
/>
)
}
<
Button
btnAttrs=
{
{
...
...
src/sass/routes/_mailbox.scss
View file @
759c58d4
...
...
@@ -62,3 +62,27 @@
}
}
}
// scss-lint:disable PropertySortOrder
.status-plan
[
class
^=
'btn'
]
{
border-radius
:
0
5px
5px
0
;
display
:
inline-block
;
margin-left
:
5px
;
padding
:
1px
5px
0
;
position
:
relative
;
&
:
:
before
{
border
:
5px
solid
;
border-color
:
inherit
;
border-bottom-color
:
transparent
;
border-left-color
:
transparent
;
border-top-color
:
transparent
;
content
:
''
;
display
:
block
;
position
:
absolute
;
transform
:
translateY
(
-50%
);
top
:
50%
;
right
:
100%
;
}
}
// scss-lint:enable PropertySortOrder
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