Browse Source

Merge pull request #21777 from abpframework/liangshiwei/docspatch

Prevent loading child items when lazy expand menu redirect
pull/21793/head
maliming 1 year ago
committed by GitHub
parent
commit
d64a5f0494
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 20
      modules/docs/app/VoloDocs.EntityFrameworkCore/Migrations/20241231072012_Initial.Designer.cs
  2. 7
      modules/docs/app/VoloDocs.EntityFrameworkCore/Migrations/20241231072012_Initial.cs
  3. 18
      modules/docs/app/VoloDocs.EntityFrameworkCore/Migrations/VoloDocsDbContextModelSnapshot.cs
  4. 5
      modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/index.js

20
modules/docs/app/VoloDocs.EntityFrameworkCore/Migrations/20240707104226_Initial.Designer.cs → modules/docs/app/VoloDocs.EntityFrameworkCore/Migrations/20241231072012_Initial.Designer.cs

@ -13,7 +13,7 @@ using VoloDocs.EntityFrameworkCore;
namespace Migrations namespace Migrations
{ {
[DbContext(typeof(VoloDocsDbContext))] [DbContext(typeof(VoloDocsDbContext))]
[Migration("20240707104226_Initial")] [Migration("20241231072012_Initial")]
partial class Initial partial class Initial
{ {
/// <inheritdoc /> /// <inheritdoc />
@ -22,7 +22,7 @@ namespace Migrations
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
.HasAnnotation("ProductVersion", "8.0.4") .HasAnnotation("ProductVersion", "9.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 128); .HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
@ -40,6 +40,10 @@ namespace Migrations
.HasColumnType("nvarchar(40)") .HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp"); .HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<string>("Description") b.Property<string>("Description")
.HasMaxLength(256) .HasMaxLength(256)
.HasColumnType("nvarchar(256)"); .HasColumnType("nvarchar(256)");
@ -116,6 +120,10 @@ namespace Migrations
.HasColumnType("nvarchar(40)") .HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp"); .HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<int>("EntityVersion") b.Property<int>("EntityVersion")
.HasColumnType("int"); .HasColumnType("int");
@ -281,9 +289,13 @@ namespace Migrations
.HasMaxLength(64) .HasMaxLength(64)
.HasColumnType("nvarchar(64)"); .HasColumnType("nvarchar(64)");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<string>("IpAddresses") b.Property<string>("IpAddresses")
.HasMaxLength(256) .HasMaxLength(2048)
.HasColumnType("nvarchar(256)"); .HasColumnType("nvarchar(2048)");
b.Property<DateTime?>("LastAccessed") b.Property<DateTime?>("LastAccessed")
.HasColumnType("datetime2"); .HasColumnType("datetime2");

7
modules/docs/app/VoloDocs.EntityFrameworkCore/Migrations/20240707104226_Initial.cs → modules/docs/app/VoloDocs.EntityFrameworkCore/Migrations/20241231072012_Initial.cs

@ -23,6 +23,7 @@ namespace Migrations
RegexDescription = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true), RegexDescription = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
Description = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), Description = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
ValueType = table.Column<int>(type: "int", nullable: false), ValueType = table.Column<int>(type: "int", nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false), ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false) ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false)
}, },
@ -137,6 +138,7 @@ namespace Migrations
IsStatic = table.Column<bool>(type: "bit", nullable: false), IsStatic = table.Column<bool>(type: "bit", nullable: false),
IsPublic = table.Column<bool>(type: "bit", nullable: false), IsPublic = table.Column<bool>(type: "bit", nullable: false),
EntityVersion = table.Column<int>(type: "int", nullable: false), EntityVersion = table.Column<int>(type: "int", nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false), ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false) ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: false)
}, },
@ -181,9 +183,10 @@ namespace Migrations
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ClientId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), ClientId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
IpAddresses = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), IpAddresses = table.Column<string>(type: "nvarchar(2048)", maxLength: 2048, nullable: true),
SignedIn = table.Column<DateTime>(type: "datetime2", nullable: false), SignedIn = table.Column<DateTime>(type: "datetime2", nullable: false),
LastAccessed = table.Column<DateTime>(type: "datetime2", nullable: true) LastAccessed = table.Column<DateTime>(type: "datetime2", nullable: true),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true)
}, },
constraints: table => constraints: table =>
{ {

18
modules/docs/app/VoloDocs.EntityFrameworkCore/Migrations/VoloDocsDbContextModelSnapshot.cs

@ -19,7 +19,7 @@ namespace Migrations
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
.HasAnnotation("ProductVersion", "8.0.4") .HasAnnotation("ProductVersion", "9.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 128); .HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
@ -37,6 +37,10 @@ namespace Migrations
.HasColumnType("nvarchar(40)") .HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp"); .HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<string>("Description") b.Property<string>("Description")
.HasMaxLength(256) .HasMaxLength(256)
.HasColumnType("nvarchar(256)"); .HasColumnType("nvarchar(256)");
@ -113,6 +117,10 @@ namespace Migrations
.HasColumnType("nvarchar(40)") .HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp"); .HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<int>("EntityVersion") b.Property<int>("EntityVersion")
.HasColumnType("int"); .HasColumnType("int");
@ -278,9 +286,13 @@ namespace Migrations
.HasMaxLength(64) .HasMaxLength(64)
.HasColumnType("nvarchar(64)"); .HasColumnType("nvarchar(64)");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<string>("IpAddresses") b.Property<string>("IpAddresses")
.HasMaxLength(256) .HasMaxLength(2048)
.HasColumnType("nvarchar(256)"); .HasColumnType("nvarchar(2048)");
b.Property<DateTime?>("LastAccessed") b.Property<DateTime?>("LastAccessed")
.HasColumnType("datetime2"); .HasColumnType("datetime2");

5
modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/index.js

@ -364,6 +364,11 @@ var doc = doc || {};
var initLazyExpandNavigation = function(){ var initLazyExpandNavigation = function(){
$("li .lazy-expand").off('click'); $("li .lazy-expand").off('click');
$("li .lazy-expand a").on('click', function(e){
if($(this).attr("href") !== "javascript:;"){
e.stopPropagation();
}
});
$("li .lazy-expand").on('click', function(){ $("li .lazy-expand").on('click', function(){
var $this = $(this); var $this = $(this);
if($this.has("ul").length > 0){ if($this.has("ul").length > 0){

Loading…
Cancel
Save