diff --git a/src/Volo.Abp.Identity.Web/Pages/Identity/Users/Index.cshtml b/src/Volo.Abp.Identity.Web/Pages/Identity/Users/Index.cshtml index fe35f568f5..ee386d41e1 100644 --- a/src/Volo.Abp.Identity.Web/Pages/Identity/Users/Index.cshtml +++ b/src/Volo.Abp.Identity.Web/Pages/Identity/Users/Index.cshtml @@ -9,8 +9,7 @@ @section scripts { - - + diff --git a/src/Volo.Abp.Identity.Web/Volo.Abp.Identity.Web.csproj b/src/Volo.Abp.Identity.Web/Volo.Abp.Identity.Web.csproj index e4e756be91..dbc8386f59 100644 --- a/src/Volo.Abp.Identity.Web/Volo.Abp.Identity.Web.csproj +++ b/src/Volo.Abp.Identity.Web/Volo.Abp.Identity.Web.csproj @@ -16,10 +16,6 @@ - - - - diff --git a/src/Volo.Abp.Identity.Web/wwwroot/modules/identity/helpers/datatables.extensions.js b/src/Volo.Abp.Identity.Web/wwwroot/modules/identity/helpers/datatables.extensions.js new file mode 100644 index 0000000000..257f54a795 --- /dev/null +++ b/src/Volo.Abp.Identity.Web/wwwroot/modules/identity/helpers/datatables.extensions.js @@ -0,0 +1,224 @@ +var abp = abp; + +(function ($) { + + + /************************************************************************ + * RECORD-ACTIONS extension for datatables * + *************************************************************************/ + var recordActions = function() { + if (!$.fn.dataTableExt) { + return; + } + + var _createDropdownItem = function (record, fieldItem) { + var $li = $('
  • '); + var $a = $(''); + + if (fieldItem.text) { + $a.html(fieldItem.text); + } + + if (fieldItem.action) { + $a.click(function (e) { + e.preventDefault(); + + if (!$(this).closest('li').hasClass('disabled')) { + fieldItem.action({ + record: record + }); + } + }); + } + + $a.appendTo($li); + return $li; + } + + var _createButtonDropdown = function (record, field) { + var $container = $('
    ') + .addClass('dropdown') + .addClass('action-button'); + + var $dropdownButton = $('' + - '' + - '
    '; - } else { - htmlContent = '-'; //TODO: ...? - } - - return htmlContent; - } - } - }; - -})(); -