Hi, I have added a modal in my application. but there is some issue I am facing. I write code on js file of modal. It works only one time. When i again open the modal the code written on js file does not work. It is loading js file only one time. Then next time it is not loading. How to make it work. Thanks
Hi,
yes, Its problem regarding table. Now its resolved now.
Thanks
Hi, I haven't find anything in Logs.txt . But i noted something. I implemented same thing in other pages. Like i have one more page in which i am using database table named "UserDetails". It is working fine. All data is displaying in jtable.
The only difference i noted in both tables one is FileDetails (using previously) and other is UserDetails (using now) is that filedetails table contains Foreign keys and userdetails not. Does foreign keys has anything to do with this error ?
Thanks
Hi, I am trying to add data in jtable with set its paging to true. But it is retrieving emtpy data everytime. It is getting data from database but not displaying in jtable.
the code i am using is as follows . Please check and tell me what i am missing.
----- jtable code ------
METHOD OF JTABLE ------------
var _$FileTable = $('#FileTable'); // FileTable is a div.
_$FileTable.jtable({ selecting: true, paging: true, sorting: true, multiSorting: true, actions: { listAction: { method: _fileService.getFiles } },
fields: {
id: {
key: true,
list: false
},
actions: {
title: app.localize('Actions'),
// width: '30%',
display: function (data) {
var $span = $('<span></span>');
if (_permissions.open) {
$('<a class="action-open" data-toggle="tooltip" data-placement="right" title="Open File" href="../Mpa/BuilderInformation/Index?jobid=' + data.record.id + '" ><i class="fa fa-folder-open-o"></a>')
.appendTo($span)
.click(function () {
//$.ajax({
// url: abp.appPath + 'Mpa/FileTracking/DMS', data: { FileID: "hide"}
//});
});
}
if (_permissions.edit) {
$('<button class="btn btn-icon btn-xs" data-toggle="tooltip" data-placement="top" title="Edit" ><i class="fa fa-edit"></i></button>')
.appendTo($span)
.click(function () {
showhidedivs(0);
_addNewFile.html('<i class="fa fa-save"></i> Update');
updateFileid = data.record.id;
getfileinfo(data.record.id);
});
}
if (_permissions.delete) {
$('<button class="btn btn-icon btn-xs" data-toggle="tooltip" data-placement="top" title="' + app.localize('Delete') + '"><i class="fa fa-trash-o"></i></button>')
.appendTo($span)
.click(function () {
deleteUser(data.record);
});
}
return $span;
}
},
fileNumber: {
title: app.localize('FileNumber')
},
client: {
title: app.localize('Client')
},
creationTime: {
title: app.localize('CreationTime'),
display: function (data) {
$(data.record).each(function () {
if (newJobId < data.record.id) {
newJobId = data.record.id;
}
});
return moment(data.record.creationTime).format('L');
}
}
},
});
----LOADING JTABLE METHOD -------------
function getRoles(reload) { if (reload) { _$FileTable.jtable('reload'); } else { _$FileTable.jtable('load', { filter: $('#FilterPeopleText').val() }); } }
getRoles();
---------------APP SERVICE CODE -----------------
public PagedResultDto<FileDetails> getFiles(GetFileTrack input) { var files = _fileRepository.GetAll().Include(p => p.MainUser) .WhereIf(!input.Filter.IsNullOrEmpty(), p => p.FileNumber.ToLower().Contains(input.Filter.ToLower()) || p.Id.ToString().ToLower().Contains(input.Filter.ToLower()) ).OrderBy(p => p.FileNumber).AsQueryable(); var userCount = files.ToList().Count; if (input.Skipcount > 0) { files = files.Skip(input.Skipcount); } if (input.Maxresultcount > 0) { files = files.Take(input.Maxresultcount); } return new PagedResultDto<FileDetails>( userCount, files.ToList() );
}
WHERE GetFileTrack is ------------
public class GetFileTrack : EntityDto { public string Filter { get; set; } public int Maxresultcount { get; set; } public int Skipcount { get; set; } }
Thanks
Hi, I am retrieving data from database and displaying using jtable. i am returing PagedResultDto which contaions 14188 records. So, I implemented paging on jtable. So it made 1419 pages . but it is not showing page number 1 and last page number 1419 in dropdown. It is displaying page number from 2 to 1418 in dropdown. Why it is not showing 1 and last page number.
This is jtable code -
_$EncumbranceListTable.jtable({ // title: app.localize('Builders List'), paging: true, sorting: true, multiSorting: true, actions: { listAction: { method: _EncumbranceListService.getEncumbranceList } },
fields: {
id: {
key: true,
list: false
},
actions: {
title: app.localize('Actions'),
width: '15%',
sorting: false,
display: function (data) {
var $span = $('<span></span>');
if (_permissions.edit) {
$('<button class="btn btn-icon btn-xs" title="' + app.localize('Edit') + '"><i class="fa fa-edit"></i></button>')
.appendTo($span)
.click(function () {
showhidedivs(0);
_EncumbranceListCompanies.html('<i class="fa fa-save"></i> Update');
updateEncumbranceListid = data.record.id;
getEncumbranceListinfo(data.record.id);
});
}
if (_permissions.delete) {
$('<button class="btn btn-icon btn-xs" title="' + app.localize('Delete') + '"><i class="fa fa-trash-o"></i></button>')
.appendTo($span)
.click(function () {
deleteUser(data.record);
});
}
return $span;
}
},
encumbranceNumber: {
title: app.localize('EncumbranceNumber')
},
descriptionShort: {
title: app.localize('DescriptionShort')
}
}
});
Thanks
Hi,
The library which conflicts is not the inner library. I am using some external library (name - ays-beforeunload-shim.js).
No, i didn't update the mustache.js.
Any solution regarding console error which I discussed before ?
Thanks.
Hi, i am using 1.0.0.0 version.
Thanks
Hi, I am creating a menu tree as shown below.
->Main menu -> menu 1 -> menu 2 -> menu 3 -> sub menu 3a -> sub menu 3b -> sub menu 3c
When i click on menu 2 it is working fine showing selected menu 2. But when i select submenu (eg. sub menu 3a) it hides all menus and showing only Main menu as shown in fig.
-> Main menu
How to show selected sub menu (full tree view).
Thanks
Hi, Issue is resolved. There is confliction in mustache.js with some other script. Now i am calling Mustache.js at end. Now the button is working fine in Apple devices. But the error which i showed you still occurred. But i am not facing any problem till now.
Thanks.