Merge branch 'master' of https://github.com/wso2/carbon-device-mgt into theme-migration

merge-requests/7/head
Imesh Chandrasiri 8 years ago
commit 1599b84e54

@ -15,6 +15,27 @@
specific language governing permissions and limitations
under the License.
-->
{{#zone "breadcrumbs"}}
<li>
<a href="{{@app.context}}/">
<i class="icon fw fw-home"></i>
</a>
</li>
<li>
<!--suppress HtmlUnknownTarget -->
<a href="{{@app.context}}/devices">
Devices
</a>
</li>
<li>
<!--suppress HtmlUnknownTarget -->
<a href="{{@app.context}}/devices/search">
Search
</a>
</li>
{{/zone}}
{{#zone "content"}}
<!-- content/body -->
<div class="row">
@ -32,15 +53,15 @@
<hr/>
<div id="device-listing-status" class="raw hidden">
<div class="col-lg-12 col-md-12">
<ul style="list-style-type: none;">
<li class="message message-info">
<h4>
<i class="icon fw fw-info"></i>
<a id="device-listing-status-msg"></a>
</h4>
</li>
</ul>
</div>
<ul style="list-style-type: none;">
<li class="message message-info">
<h4>
<i class="icon fw fw-info"></i>
<a id="device-listing-status-msg"></a>
</h4>
</li>
</ul>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12">

@ -99,12 +99,9 @@ function formatRepo (user) {
var markup = '<div class="clearfix">' +
'<div class="col-sm-8">' +
'<div class="clearfix">' +
'<div class="col-sm-3">User : ' + user.username + '</div>';
if (user.name) {
markup += '<div class="col-sm-3"> ' + user.name + '</div>';
}
if (user.emailAddress) {
markup += '<div class="col-sm-3"> ' + user.emailAddress + '</div>';
'<div class="col-sm-4">' + user.username + '</div>';
if (user.name || user.name != undefined) {
markup += '<div class="col-sm-8"> ( ' + user.name + ' )</div>';
}
markup += '</div></div></div>';
return markup;
@ -140,8 +137,9 @@ $(document).ready(function () {
var user = {};
user.id = value.username;
user.username = value.username;
user.name = value.firstname + " " + value.lastname;
user.emailAddress = value.emailAddress;
if(value.firstname && value.lastname) {
user.name = value.firstname + " " + value.lastname;
}
newData.push(user);
});
return {

@ -234,13 +234,8 @@ $(document).ready(function () {
addUserAPI,
addUserFormData,
function (data, textStatus, jqXHR) {
if (jqXHR.status == 201) {
if (jqXHR.status == 200) {
// Clearing user input fields.
$("input#username").val("");
$("input#firstname").val("");
$("input#lastname").val("");
$("input#email").val("");
$("select#roles").select2("val", "");
// Refreshing with success message
$("#user-create-form").addClass("hidden");
$("#user-created-msg").removeClass("hidden");

Loading…
Cancel
Save