Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Genesys Backend
Commits
0d4e4e7c
Commit
0d4e4e7c
authored
Aug 03, 2017
by
Matija Obreza
Browse files
Merge branch '80-missing-javascripts' into 'master'
Missing javascript Closes
#80
See merge request !38
parents
cb888dda
de35a2d2
Changes
3
Show whitespace changes
Inline
Side-by-side
src/main/sourceapp/1/js/crophub.js
View file @
0d4e4e7c
...
...
@@ -651,6 +651,31 @@ var GenesysFilter = {
};
/* jshint ignore:start */
var
XUtil
=
{
x01
:
function
(
path
,
handler
,
object
)
{
$
.
ajax
(
path
,
$
.
extend
({},
{
type
:
'
POST
'
,
dataType
:
'
json
'
,
contentType
:
'
application/json; charset=utf-8
'
,
data
:
(
object
===
null
?
null
:
JSON
.
stringify
(
object
)),
beforeSend
:
function
()
{
},
success
:
function
(
respObject
)
{
document
.
console
.
log
(
respObject
);
},
error
:
function
(
jqXHR
,
textStatus
,
errorThrown
)
{
document
.
console
.
log
(
textStatus
);
document
.
console
.
log
(
errorThrown
);
}
},
handler
));
}
};
/* jshint ignore:end */
$
(
document
).
click
(
function
(
e
)
{
if
(
!
$
(
e
.
target
).
is
(
$
(
'
#navigation-menu
'
))
&&
!
$
(
e
.
target
).
is
(
$
(
'
.humburger-btn
'
)))
{
if
(
$
(
'
#navbar
'
).
hasClass
(
'
in
'
))
{
...
...
src/main/webapp/WEB-INF/jsp/admin/users/profile.jsp
View file @
0d4e4e7c
...
...
@@ -110,52 +110,42 @@
<content
tag=
"javascript"
>
<security:authorize
access=
"isAuthenticated()"
>
<script
src=
"
<c:url
value=
"/html/js/main.js"
/>
"
></script>
<script
src=
"
<c:url
value=
"/html/js/jsonclient.js"
/>
"
></script>
<script
type=
"text/javascript"
>
jQuery
(
document
).
ready
(
function
()
{
<security:authorize
access=
"principal.id == #user.id"
>
$
(
"
#new-team-form input[type=submit]
"
).
on
(
"
click
"
,
function
(
e
)
{
e
.
preventDefault
();
x01
(
"
<c:url
value=
"/json/v0/me/teams"
/>
"
,
{
success
:
function
(
e
)
{
window
.
location
.
reload
();
}},
$
(
this
.
form
).
serializeObject
());
});
$
(
"
a[x-team-id]
"
).
on
(
"
click
"
,
function
(
e
)
{
e
.
preventDefault
();
x01
(
"
<c:url
value=
"/json/v0/me/teams/"
/>
"
+
$
(
this
).
attr
(
'
x-team-id
'
)
+
"
/leave
"
,
{
success
:
function
(
e
)
{
BrowseUtil
.
x01
(
"
<c:url
value=
"/json/v0/me/teams/"
/>
"
+
$
(
this
).
attr
(
'
x-team-id
'
)
+
"
/leave
"
,
{
success
:
function
(
e
)
{
window
.
location
.
reload
();
}});
}
});
});
</security:authorize>
<security:authorize
access=
"hasRole('ADMINISTRATOR')"
>
$
(
"
button#acccount-enable
"
).
on
(
"
click
"
,
function
(
e
)
{
e
.
preventDefault
();
x01
(
"
<c:url
value=
"/json/v0/user/${user.uuid}/enabled"
/>
"
,
{
success
:
function
(
e
)
{
XUtil
.
x01
(
"
<c:url
value=
"/json/v0/user/${user.uuid}/enabled"
/>
"
,
{
success
:
function
(
e
)
{
window
.
location
.
reload
();
}},
true
);
});
$
(
"
button#acccount-disable
"
).
on
(
"
click
"
,
function
(
e
)
{
e
.
preventDefault
();
x01
(
"
<c:url
value=
"/json/v0/user/${user.uuid}/enabled"
/>
"
,
{
success
:
function
(
e
)
{
XUtil
.
x01
(
"
<c:url
value=
"/json/v0/user/${user.uuid}/enabled"
/>
"
,
{
success
:
function
(
e
)
{
window
.
location
.
reload
();
}},
false
);
});
$
(
"
button#acccount-lock
"
).
on
(
"
click
"
,
function
(
e
)
{
e
.
preventDefault
();
x01
(
"
<c:url
value=
"/json/v0/user/${user.uuid}/locked"
/>
"
,
{
success
:
function
(
e
)
{
XUtil
.
x01
(
"
<c:url
value=
"/json/v0/user/${user.uuid}/locked"
/>
"
,
{
success
:
function
(
e
)
{
window
.
location
.
reload
();
}},
true
);
});
$
(
"
button#acccount-unlock
"
).
on
(
"
click
"
,
function
(
e
)
{
e
.
preventDefault
();
x01
(
"
<c:url
value=
"/json/v0/user/${user.uuid}/locked"
/>
"
,
{
success
:
function
(
e
)
{
XUtil
.
x01
(
"
<c:url
value=
"/json/v0/user/${user.uuid}/locked"
/>
"
,
{
success
:
function
(
e
)
{
window
.
location
.
reload
();
}},
false
);
});
...
...
src/main/webapp/WEB-INF/jsp/user/profile.jsp
View file @
0d4e4e7c
...
...
@@ -103,33 +103,33 @@
<content
tag=
"javascript"
>
<security:authorize
access=
"isAuthenticated()"
>
<script
src=
"
<c:url
value=
"/html/js/main.js"
/>
"
></script>
<script
src=
"
<c:url
value=
"/html/js/jsonclient.js"
/>
"
></script>
<script
type=
"text/javascript"
>
jQuery
(
document
).
ready
(
function
()
{
<security:authorize
access=
"hasRole('ADMINISTRATOR')"
>
$
(
"
button#acccount-enable
"
).
on
(
"
click
"
,
function
(
e
)
{
e
.
preventDefault
();
x01
(
"
<c:url
value=
"/json/v0/user/${user.uuid}/enabled"
/>
"
,
{
success
:
function
(
e
)
{
XUtil
.
x01
(
"
<c:url
value=
"/json/v0/user/${user.uuid}/enabled"
/>
"
,
{
success
:
function
(
e
)
{
window
.
location
.
reload
();
}},
true
);
});
$
(
"
button#acccount-disable
"
).
on
(
"
click
"
,
function
(
e
)
{
e
.
preventDefault
();
x01
(
"
<c:url
value=
"/json/v0/user/${user.uuid}/enabled"
/>
"
,
{
success
:
function
(
e
)
{
XUtil
.
x01
(
"
<c:url
value=
"/json/v0/user/${user.uuid}/enabled"
/>
"
,
{
success
:
function
(
e
)
{
window
.
location
.
reload
();
}},
false
);
});
$
(
"
button#acccount-lock
"
).
on
(
"
click
"
,
function
(
e
)
{
e
.
preventDefault
();
x01
(
"
<c:url
value=
"/json/v0/user/${user.uuid}/locked"
/>
"
,
{
success
:
function
(
e
)
{
XUtil
.
x01
(
"
<c:url
value=
"/json/v0/user/${user.uuid}/locked"
/>
"
,
{
success
:
function
(
e
)
{
window
.
location
.
reload
();
}},
true
);
});
$
(
"
button#acccount-unlock
"
).
on
(
"
click
"
,
function
(
e
)
{
e
.
preventDefault
();
x01
(
"
<c:url
value=
"/json/v0/user/${user.uuid}/locked"
/>
"
,
{
success
:
function
(
e
)
{
XUtil
.
x01
(
"
<c:url
value=
"/json/v0/user/${user.uuid}/locked"
/>
"
,
{
success
:
function
(
e
)
{
window
.
location
.
reload
();
}},
false
);
});
...
...
Write
Preview
Supports
Markdown
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