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
59bc3851
Commit
59bc3851
authored
May 31, 2016
by
Juorder Antonio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add loading icon on when login is fired, add messagebar on add admin, automatically close modal.
parent
f76b13db
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
16 deletions
+43
-16
path.json
path.json
+1
-1
companies.jsx
src/components/companies/companies.jsx
+18
-12
add_admin_modal.jsx
src/components/domain/add_admin_modal.jsx
+10
-0
login.jsx
src/components/login/login.jsx
+10
-1
login_email.jsx
src/components/login/login_email.jsx
+2
-1
config.json
src/config/config.json
+2
-1
No files found.
path.json
View file @
59bc3851
module.exports
=
{
"main"
:{
"js"
:
"/534318bundle.js"
}}
\ No newline at end of file
module.exports
=
{
"main"
:{
"js"
:
"/354185bundle.js"
}}
\ No newline at end of file
src/components/companies/companies.jsx
View file @
59bc3851
...
...
@@ -193,27 +193,30 @@ export default class Companies extends React.Component {
}
render
()
{
if
(
!
this
.
state
.
companies
)
{
return
<
div
/>;
}
let
panelBody
;
let
noLimitError
;
let
pagination
=
null
;
const
textLoading
=
this
.
isGlobalAdmin
?
'Cargando Empresas...'
:
'Cargando Mi Empresa...'
;
if
(
this
.
state
.
loading
)
{
panelBody
=
(
<
div
className=
'text-center'
>
if
(
!
this
.
state
.
companies
&&
this
.
state
.
loading
)
{
return
(
<
div
key=
'panelbody-loading.company'
className=
'text-center content animate-panel'
>
<
i
className=
'fa fa-spinner fa-spin fa-4x fa-fw'
></
i
>
<
p
>
{
textLoading
}
</
p
>
</
div
>
);
}
let
panelBody
;
let
noLimitError
;
let
pagination
=
null
;
if
(
this
.
state
.
companies
.
length
===
0
)
{
panelBody
=
(
<
div
className=
'center-block text-center'
>
<
div
key=
'panelbody-nofound'
className=
'center-block text-center'
>
<
h5
>
{
'Actualmente no hay ninguna empresa registrada '
}
<
label
style=
{
{
transform
:
'rotate(90deg)'
}
}
>
...
...
@@ -305,7 +308,10 @@ export default class Companies extends React.Component {
});
panelBody
=
(
<
div
className=
'table-responsive'
>
<
div
key=
'panelbody-companies'
className=
'table-responsive'
>
<
div
className=
'table-responsive'
>
<
table
cellPadding=
'1'
...
...
src/components/domain/add_admin_modal.jsx
View file @
59bc3851
...
...
@@ -86,6 +86,16 @@ export default class AddAdminModal extends React.Component {
});
}
if
(
this
.
props
.
show
)
{
this
.
props
.
onHide
();
setTimeout
(()
=>
{
GlobalActions
.
emitMessage
({
message
:
'Se ha agregado su administrador éxitoxamente.'
,
type
:
Constants
.
MessageType
.
SUCCESS
});
},
1000
);
}
return
DomainStore
.
addAdmin
(
user
);
}
);
...
...
src/components/login/login.jsx
View file @
59bc3851
...
...
@@ -10,6 +10,7 @@ import ZimbraStore from '../../stores/zimbra_store.jsx';
import
Constants
from
'../../utils/constants.jsx'
;
import
*
as
Client
from
'../../utils/client.jsx'
;
import
*
as
Utils
from
'../../utils/utils.jsx'
;
import
Panel
from
'../panel.jsx'
;
import
LoginEmail
from
'./login_email.jsx'
;
...
...
@@ -49,8 +50,9 @@ export default class Login extends React.Component {
browserHistory
.
push
(
'/mailboxes'
);
}
}
submit
(
email
,
password
)
{
submit
(
email
,
password
,
refs
)
{
var
state
=
this
.
state
;
const
oldText
=
refs
.
submitbutton
.
innerHTML
;
if
(
!
email
)
{
state
.
loginError
=
'El correo electrónico es obligatorio'
;
...
...
@@ -64,19 +66,26 @@ export default class Login extends React.Component {
return
;
}
refs
.
submitbutton
.
innerHTML
=
'<i class="fa fa-spinner fa-spin fa-1x fa-fw"></i> Cargando ...'
;
Utils
.
toggleStatusButtons
(
'.btn-block'
,
true
);
this
.
setState
({
loginError
:
null
});
Client
.
login
(
email
,
password
,
()
=>
{
return
Client
.
getAllCos
(
(
cosData
)
=>
{
refs
.
submitbutton
.
innerHTML
=
oldText
;
ZimbraStore
.
setAllCos
(
cosData
);
Utils
.
toggleStatusButtons
(
'.btn-block'
,
false
);
browserHistory
.
push
(
'/mailboxes'
);
}
);
},
(
err
)
=>
{
refs
.
submitbutton
.
innerHTML
=
oldText
;
this
.
setState
({
loginError
:
err
.
message
});
Utils
.
toggleStatusButtons
(
'.btn-block'
,
false
);
}
);
}
...
...
src/components/login/login_email.jsx
View file @
59bc3851
...
...
@@ -21,7 +21,7 @@ export default class LoginEmail extends React.Component {
const
email
=
this
.
refs
.
email
.
value
.
trim
();
const
password
=
this
.
refs
.
password
.
value
.
trim
();
this
.
props
.
submit
(
email
,
password
);
this
.
props
.
submit
(
email
,
password
,
this
.
refs
);
}
render
()
{
let
errorClass
=
''
;
...
...
@@ -64,6 +64,7 @@ export default class LoginEmail extends React.Component {
<
button
type=
'submit'
className=
'btn btn-success btn-block'
ref=
'submitbutton'
>
{
'Ingresar'
}
</
button
>
...
...
src/config/config.json
View file @
59bc3851
...
...
@@ -65,7 +65,8 @@
"zimbraPrefOutOfOfficeUntilDate"
:
true
,
"zimbraPrefOutOfOfficeReply"
:
true
,
"zimbraCreateTimestamp"
:
true
,
"zimbraLastLogonTimestamp"
:
true
"zimbraLastLogonTimestamp"
:
true
,
"zimbraIsDelegatedAdminAccount"
:
true
}
}
},
...
...
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