mirror of https://github.com/abpframework/abp.git
137 changed files with 9082 additions and 8628 deletions
@ -0,0 +1,95 @@ |
|||||
|
# Buttons |
||||
|
|
||||
|
ABP framework has a special Tag Helper to create bootstrap button easily. |
||||
|
|
||||
|
`<abp-button>` |
||||
|
|
||||
|
## Attributes |
||||
|
|
||||
|
`<abp-button>` has 7 different attribute. |
||||
|
|
||||
|
* [`button-type`](#button-type) |
||||
|
* [`size`](#size) |
||||
|
* [`busy-text`](#busy-text) |
||||
|
* [`text`](#text) |
||||
|
* [`icon`](#icon) |
||||
|
* [`disabled`](#disabled) |
||||
|
* [`icon-type`](#icon-type) |
||||
|
|
||||
|
|
||||
|
### `button-type` |
||||
|
|
||||
|
`button-type` is a selectable parameter. It's default value is `Default`. |
||||
|
|
||||
|
`<abp-button button-type="Primary">Button</abp-button>` |
||||
|
|
||||
|
You can choose one of the button type listed below. |
||||
|
|
||||
|
* `Default` |
||||
|
* `Primary` |
||||
|
* `Secondary` |
||||
|
* `Success` |
||||
|
* `Danger` |
||||
|
* `Warning` |
||||
|
* `Info` |
||||
|
* `Light` |
||||
|
* `Dark` |
||||
|
* `Outline_Primary` |
||||
|
* `Outline_Secondary` |
||||
|
* `Outline_Success` |
||||
|
* `Outline_Danger` |
||||
|
* `Outline_Warning` |
||||
|
* `Outline_Info` |
||||
|
* `Outline_Light` |
||||
|
* `Outline_Dark` |
||||
|
* `Link` |
||||
|
|
||||
|
### `size` |
||||
|
|
||||
|
`size` is a selectable parameter. It's default value is `Default`. |
||||
|
|
||||
|
`<abp-button size="Default">Button</abp-button>` |
||||
|
|
||||
|
You can choose one of the size type listed below. |
||||
|
|
||||
|
* `Default` |
||||
|
* `Small` |
||||
|
* `Medium` |
||||
|
* `Large` |
||||
|
* `Block` |
||||
|
* `Block_Small` |
||||
|
* `Block_Medium` |
||||
|
* `Block_Large` |
||||
|
|
||||
|
### `busy-text` |
||||
|
|
||||
|
`busy-text` is a string parameter. IT shows the text while the button is busy. |
||||
|
|
||||
|
### `text` |
||||
|
|
||||
|
`text` is a string parameter that displaying on button. |
||||
|
|
||||
|
### `icon` |
||||
|
|
||||
|
`icon` is a string parameter. It is depending to [`icon-type`](#`icon-type`). For default, we use [Font Awesome](https://fontawesome.com/) for icons. To use it, you need to set `icon` parameter as a icon name. |
||||
|
|
||||
|
##### Example |
||||
|
|
||||
|
[fa-address-card](https://fontawesome.com/icons/address-card):  |
||||
|
|
||||
|
`<abp-button icon="address-card" text="Address" />` |
||||
|
|
||||
|
> Don't forget: You dont need to write prefix! It will add automatically "fa" prefix for [Font Awesome](https://fontawesome.com/) icons while you did not change `icon-type`. |
||||
|
|
||||
|
### `disabled` |
||||
|
|
||||
|
`disabled` is a boolean parameter. If you set it `true`, your button will be disabled. |
||||
|
|
||||
|
### `icon-type` |
||||
|
|
||||
|
`icon-type` is a selectable parameter. It's default value is `FontAwesome`. You can create your own icon type provider and change it. |
||||
|
|
||||
|
You can choose one of the size type listed below. |
||||
|
|
||||
|
* `FontAwesome` |
||||
|
* `Other` |
||||
|
After Width: | Height: | Size: 1.2 KiB |
@ -0,0 +1,73 @@ |
|||||
|
# Quartz Background Job Manager |
||||
|
|
||||
|
[Quartz](https://www.quartz-scheduler.net/) is an advanced background job manager. You can integrate Quartz with the ABP Framework to use it instead of the [default background job manager](Background-Jobs.md). In this way, you can use the same background job API for Quartz and your code will be independent of Quartz. If you like, you can directly use Quartz's API, too. |
||||
|
|
||||
|
> See the [background jobs document](Background-Jobs.md) to learn how to use the background job system. This document only shows how to install and configure the Quartz integration. |
||||
|
|
||||
|
## Installation |
||||
|
|
||||
|
It is suggested to use the [ABP CLI](CLI.md) to install this package. |
||||
|
|
||||
|
### Using the ABP CLI |
||||
|
|
||||
|
Open a command line window in the folder of the project (.csproj file) and type the following command: |
||||
|
|
||||
|
````bash |
||||
|
abp add-package Volo.Abp.BackgroundJobs.Quartz |
||||
|
```` |
||||
|
|
||||
|
### Manual Installation |
||||
|
|
||||
|
If you want to manually install; |
||||
|
|
||||
|
1. Add the [Volo.Abp.BackgroundJobs.Quartz](https://www.nuget.org/packages/Volo.Abp.BackgroundJobs.Quartz) NuGet package to your project: |
||||
|
|
||||
|
```` |
||||
|
Install-Package Volo.Abp.BackgroundJobs.Quartz |
||||
|
```` |
||||
|
|
||||
|
2. Add the `AbpBackgroundJobsQuartzModule` to the dependency list of your module: |
||||
|
|
||||
|
````csharp |
||||
|
[DependsOn( |
||||
|
//...other dependencies |
||||
|
typeof(AbpBackgroundJobsQuartzModule) //Add the new module dependency |
||||
|
)] |
||||
|
public class YourModule : AbpModule |
||||
|
{ |
||||
|
} |
||||
|
```` |
||||
|
|
||||
|
## Configuration |
||||
|
|
||||
|
Quartz is a very configurable library,and the ABP framework provides `AbpQuartzPreOptions` for this. You can use the `PreConfigure` method in your module class to pre-configure this option. ABP will use it when initializing the Quartz module. For example: |
||||
|
|
||||
|
````csharp |
||||
|
[DependsOn( |
||||
|
//...other dependencies |
||||
|
typeof(AbpBackgroundJobsQuartzModule) //Add the new module dependency |
||||
|
)] |
||||
|
public class YourModule : AbpModule |
||||
|
{ |
||||
|
public override void PreConfigureServices(ServiceConfigurationContext context) |
||||
|
{ |
||||
|
var configuration = context.Services.GetConfiguration(); |
||||
|
|
||||
|
PreConfigure<AbpQuartzPreOptions>(options => |
||||
|
{ |
||||
|
options.Properties = new NameValueCollection |
||||
|
{ |
||||
|
["quartz.jobStore.dataSource"] = "BackgroundJobsDemoApp", |
||||
|
["quartz.jobStore.type"] = "Quartz.Impl.AdoJobStore.JobStoreTX, Quartz", |
||||
|
["quartz.jobStore.tablePrefix"] = "QRTZ_", |
||||
|
["quartz.serializer.type"] = "json", |
||||
|
["quartz.dataSource.BackgroundJobsDemoApp.connectionString"] = configuration.GetConnectionString("Quartz"), |
||||
|
["quartz.dataSource.BackgroundJobsDemoApp.provider"] = "SqlServer", |
||||
|
["quartz.jobStore.driverDelegateType"] = "Quartz.Impl.AdoJobStore.SqlServerDelegate, Quartz", |
||||
|
}; |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
```` |
||||
|
|
||||
|
Quartz stores job and scheduling information **in memory by default**. In the example, we use the pre-configuration of [options pattern](Options.md) to change it to the database. For more configuration of Quartz, please refer to the Quartz's [documentation](https://www.quartz-scheduler.net/documentation/quartz-3.x/tutorial/index.html). |
||||
@ -0,0 +1,3 @@ |
|||||
|
# Background Workers |
||||
|
|
||||
|
TODO |
||||
@ -0,0 +1,68 @@ |
|||||
|
# Quartz Background Worker Manager |
||||
|
|
||||
|
[Quartz](https://www.quartz-scheduler.net/) is an advanced background worker manager. You can integrate Quartz with the ABP Framework to use it instead of the [default background worker manager](Background-Worker.md). ABP simply integrates quartz. |
||||
|
|
||||
|
## Installation |
||||
|
|
||||
|
It is suggested to use the [ABP CLI](CLI.md) to install this package. |
||||
|
|
||||
|
### Using the ABP CLI |
||||
|
|
||||
|
Open a command line window in the folder of the project (.csproj file) and type the following command: |
||||
|
|
||||
|
````bash |
||||
|
abp add-package Volo.Abp.BackgroundWorkers.Quartz |
||||
|
```` |
||||
|
|
||||
|
### Manual Installation |
||||
|
|
||||
|
If you want to manually install; |
||||
|
|
||||
|
1. Add the [Volo.Abp.BackgroundWorkers.Quartz](https://www.nuget.org/packages/Volo.Abp.BackgroundWorkers.Quartz) NuGet package to your project: |
||||
|
|
||||
|
```` |
||||
|
Install-Package Volo.Abp.BackgroundWorkers.Quartz |
||||
|
```` |
||||
|
|
||||
|
2. Add the `AbpBackgroundWorkersQuartzModule` to the dependency list of your module: |
||||
|
|
||||
|
````csharp |
||||
|
[DependsOn( |
||||
|
//...other dependencies |
||||
|
typeof(AbpBackgroundWorkersQuartzModule) //Add the new module dependency |
||||
|
)] |
||||
|
public class YourModule : AbpModule |
||||
|
{ |
||||
|
} |
||||
|
```` |
||||
|
|
||||
|
### Configuration |
||||
|
|
||||
|
See [Configuration](Background-Jobs-Quartz.md#Configuration). |
||||
|
|
||||
|
### Create a Background Worker |
||||
|
|
||||
|
A background work is a class that derives from the `QuartzBackgroundWorkerBase` base class. for example. A simple worker class is shown below: |
||||
|
|
||||
|
```` csharp |
||||
|
public class MyLogWorker : QuartzBackgroundWorkerBase |
||||
|
{ |
||||
|
public MyLogWorker() |
||||
|
{ |
||||
|
JobDetail = JobBuilder.Create<MyLogWorker>().Build(); |
||||
|
Trigger = TriggerBuilder.Create().StartNow().Build(); |
||||
|
} |
||||
|
|
||||
|
public override Task Execute(IJobExecutionContext context) |
||||
|
{ |
||||
|
Logger.LogInformation("Executed MyLogWorker..!"); |
||||
|
return Task.CompletedTask; |
||||
|
} |
||||
|
} |
||||
|
```` |
||||
|
|
||||
|
We simply implemented the Execute method to write a log. The background worker is a **singleton by default**. If you want, you can also implement a [dependency interface](Dependency-Injection.md#DependencyInterfaces) to register it as another life cycle. |
||||
|
|
||||
|
### More |
||||
|
|
||||
|
Please see Quartz's [documentation](https://www.quartz-scheduler.net/documentation/index.html) for more information. |
||||
@ -0,0 +1,73 @@ |
|||||
|
# Quartz 后台作业管理 |
||||
|
|
||||
|
[Quartz](https://www.quartz-scheduler.net/)是一个高级的作业管理. 你可以用ABP框架集成Quartz代替[默认后台作业管理](Background-Jobs.md). 通过这种方式你可以使用相同的后台作业API,将你的代码独立于Quartz. 如果你喜欢也可以直接使用Quartz的API. |
||||
|
|
||||
|
> 参阅[后台作业文档](Background-Jobs.md),学习如何使用后台作业系统. 本文只介绍了如何安装和配置Quartz集成. |
||||
|
|
||||
|
## 安装 |
||||
|
|
||||
|
建议使用[ABP CLI](CLI.md)安装包. |
||||
|
|
||||
|
### 使用ABP CLI |
||||
|
|
||||
|
在项目的文件夹(.csproj文件)中打开命令行窗口输入以下命令: |
||||
|
|
||||
|
````bash |
||||
|
abp add-package Volo.Abp.BackgroundJobs.Quartz |
||||
|
```` |
||||
|
|
||||
|
### 手动安装 |
||||
|
|
||||
|
如果你想手动安装; |
||||
|
|
||||
|
1. 添加 [Volo.Abp.BackgroundJobs.Quartz](https://www.nuget.org/packages/Volo.Abp.BackgroundJobs.Quartz) NuGet包添加到你的项目: |
||||
|
|
||||
|
```` |
||||
|
Install-Package Volo.Abp.BackgroundJobs.Quartz |
||||
|
```` |
||||
|
|
||||
|
2. 添加 `AbpBackgroundJobsQuartzModule` 到你的模块的依赖列表: |
||||
|
|
||||
|
````csharp |
||||
|
[DependsOn( |
||||
|
//...other dependencies |
||||
|
typeof(AbpBackgroundJobsQuartzModule) //Add the new module dependency |
||||
|
)] |
||||
|
public class YourModule : AbpModule |
||||
|
{ |
||||
|
} |
||||
|
```` |
||||
|
|
||||
|
## 配置 |
||||
|
|
||||
|
Quartz是一个可配置的类库,对此ABP框架提供了 `AbpQuartzPreOptions`. 你可以在模块预配置此选项,ABP在初始化Quartz模块时将使用它. 例: |
||||
|
|
||||
|
````csharp |
||||
|
[DependsOn( |
||||
|
//...other dependencies |
||||
|
typeof(AbpBackgroundJobsQuartzModule) //Add the new module dependency |
||||
|
)] |
||||
|
public class YourModule : AbpModule |
||||
|
{ |
||||
|
public override void PreConfigureServices(ServiceConfigurationContext context) |
||||
|
{ |
||||
|
var configuration = context.Services.GetConfiguration(); |
||||
|
|
||||
|
PreConfigure<AbpQuartzPreOptions>(options => |
||||
|
{ |
||||
|
options.Properties = new NameValueCollection |
||||
|
{ |
||||
|
["quartz.jobStore.dataSource"] = "BackgroundJobsDemoApp", |
||||
|
["quartz.jobStore.type"] = "Quartz.Impl.AdoJobStore.JobStoreTX, Quartz", |
||||
|
["quartz.jobStore.tablePrefix"] = "QRTZ_", |
||||
|
["quartz.serializer.type"] = "json", |
||||
|
["quartz.dataSource.BackgroundJobsDemoApp.connectionString"] = configuration.GetConnectionString("Quartz"), |
||||
|
["quartz.dataSource.BackgroundJobsDemoApp.provider"] = "SqlServer", |
||||
|
["quartz.jobStore.driverDelegateType"] = "Quartz.Impl.AdoJobStore.SqlServerDelegate, Quartz", |
||||
|
}; |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
```` |
||||
|
|
||||
|
Quartz**默认**将作业与调度信息存储在**内存**中,示例中我们使用[选项模式](Options.md)的预配置将其更改为存储到数据库中. 有关Quartz的更多配置请参阅[Quartz文档](https://www.quartz-scheduler.net/documentation/quartz-3.x/tutorial/index.html). |
||||
@ -0,0 +1,68 @@ |
|||||
|
# Quartz 后台工作者管理 |
||||
|
|
||||
|
[Quartz](https://www.quartz-scheduler.net/)是一个高级的后台工作者管理. 你可以用ABP框架集成Quartz代替[默认后台工作者管理](Background-Workers.md). ABP简单的集成了Quartz. |
||||
|
|
||||
|
## 安装 |
||||
|
|
||||
|
建议使用[ABP CLI](CLI.md)安装包. |
||||
|
|
||||
|
### 使用ABP CLI |
||||
|
|
||||
|
在项目的文件夹(.csproj文件)中打开命令行窗口输入以下命令: |
||||
|
|
||||
|
````bash |
||||
|
abp add-package Volo.Abp.BackgroundWorkers.Quartz |
||||
|
```` |
||||
|
|
||||
|
### 手动安装 |
||||
|
|
||||
|
如果你想手动安装; |
||||
|
|
||||
|
1. 添加 [Volo.Abp.BackgroundWorkers.Quartz](https://www.nuget.org/packages/Volo.Abp.BackgroundWorkers.Quartz) NuGet包添加到你的项目: |
||||
|
|
||||
|
```` |
||||
|
Install-Package Volo.Abp.BackgroundWorkers.Quartz |
||||
|
```` |
||||
|
|
||||
|
2. 添加 `AbpBackgroundWorkersQuartzModule` 到你的模块的依赖列表: |
||||
|
|
||||
|
````csharp |
||||
|
[DependsOn( |
||||
|
//...other dependencies |
||||
|
typeof(AbpBackgroundWorkersQuartzModule) //Add the new module dependency |
||||
|
)] |
||||
|
public class YourModule : AbpModule |
||||
|
{ |
||||
|
} |
||||
|
```` |
||||
|
|
||||
|
### 配置 |
||||
|
|
||||
|
参阅[配置](Background-Jobs-Quartz.md#配置). |
||||
|
|
||||
|
### 创建后台工作者 |
||||
|
|
||||
|
后台工作者是一个继承自 `QuartzBackgroundWorkerBase` 基类的类. 一个简单的工作者如下所示: |
||||
|
|
||||
|
```` csharp |
||||
|
public class MyLogWorker : QuartzBackgroundWorkerBase |
||||
|
{ |
||||
|
public MyLogWorker() |
||||
|
{ |
||||
|
JobDetail = JobBuilder.Create<MyLogWorker>().Build(); |
||||
|
Trigger = TriggerBuilder.Create().StartNow().Build(); |
||||
|
} |
||||
|
|
||||
|
public override Task Execute(IJobExecutionContext context) |
||||
|
{ |
||||
|
Logger.LogInformation("Executed MyLogWorker..!"); |
||||
|
return Task.CompletedTask; |
||||
|
} |
||||
|
} |
||||
|
```` |
||||
|
|
||||
|
示例中我们重写了 `Execute` 方法写入日志. 后台工作者默认是**单例**. 如果你需要,也可以实现[依赖接口](Dependency-Injection.md#依赖接口)将其注册为其他的生命周期. |
||||
|
|
||||
|
### 更多 |
||||
|
|
||||
|
参阅Quartz[文档](https://www.quartz-scheduler.net/documentation/index.html)了解更多信息. |
||||
@ -0,0 +1,3 @@ |
|||||
|
# 后台工作者 |
||||
|
|
||||
|
TODO |
||||
@ -0,0 +1,15 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace Volo.Abp.AspNetCore.Mvc.MultiTenancy |
||||
|
{ |
||||
|
public class CurrentTenantDto |
||||
|
{ |
||||
|
public Guid? Id { get; set; } |
||||
|
|
||||
|
public string Name { get; set; } |
||||
|
|
||||
|
public bool IsAvailable { get; set; } |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,11 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace Volo.Abp.AspNetCore.Mvc.MultiTenancy |
||||
|
{ |
||||
|
public class MultiTenancyInfoDto |
||||
|
{ |
||||
|
public bool IsEnabled { get; set; } |
||||
|
} |
||||
|
} |
||||
@ -1,12 +1,12 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/anchor-js", |
"name": "@abp/anchor-js", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/core": "^2.1.0", |
"@abp/core": "^2.2.0", |
||||
"anchor-js": "^4.2.2" |
"anchor-js": "^4.2.2" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,11 +1,11 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/aspnetcore.mvc.ui.theme.basic", |
"name": "@abp/aspnetcore.mvc.ui.theme.basic", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/aspnetcore.mvc.ui.theme.shared": "^2.1.0" |
"@abp/aspnetcore.mvc.ui.theme.shared": "^2.2.0" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,24 +1,24 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/aspnetcore.mvc.ui.theme.shared", |
"name": "@abp/aspnetcore.mvc.ui.theme.shared", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/aspnetcore.mvc.ui": "^2.1.0", |
"@abp/aspnetcore.mvc.ui": "^2.2.0", |
||||
"@abp/bootstrap": "^2.1.0", |
"@abp/bootstrap": "^2.2.0", |
||||
"@abp/bootstrap-datepicker": "^2.1.0", |
"@abp/bootstrap-datepicker": "^2.2.0", |
||||
"@abp/datatables.net-bs4": "^2.1.0", |
"@abp/datatables.net-bs4": "^2.2.0", |
||||
"@abp/font-awesome": "^2.1.0", |
"@abp/font-awesome": "^2.2.0", |
||||
"@abp/jquery-form": "^2.1.0", |
"@abp/jquery-form": "^2.2.0", |
||||
"@abp/jquery-validation-unobtrusive": "^2.1.0", |
"@abp/jquery-validation-unobtrusive": "^2.2.0", |
||||
"@abp/lodash": "^2.1.0", |
"@abp/lodash": "^2.2.0", |
||||
"@abp/luxon": "^2.1.0", |
"@abp/luxon": "^2.2.0", |
||||
"@abp/malihu-custom-scrollbar-plugin": "^2.1.0", |
"@abp/malihu-custom-scrollbar-plugin": "^2.2.0", |
||||
"@abp/select2": "^2.1.0", |
"@abp/select2": "^2.2.0", |
||||
"@abp/sweetalert": "^2.1.0", |
"@abp/sweetalert": "^2.2.0", |
||||
"@abp/timeago": "^2.1.0", |
"@abp/timeago": "^2.2.0", |
||||
"@abp/toastr": "^2.1.0" |
"@abp/toastr": "^2.2.0" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,13 +1,13 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/blogging", |
"name": "@abp/blogging", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/aspnetcore.mvc.ui.theme.shared": "^2.1.0", |
"@abp/aspnetcore.mvc.ui.theme.shared": "^2.2.0", |
||||
"@abp/owl.carousel": "^2.1.0", |
"@abp/owl.carousel": "^2.2.0", |
||||
"@abp/tui-editor": "^2.1.0" |
"@abp/tui-editor": "^2.2.0" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,12 +1,12 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/bootstrap", |
"name": "@abp/bootstrap", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/core": "^2.1.0", |
"@abp/core": "^2.2.0", |
||||
"bootstrap": "^4.3.1" |
"bootstrap": "^4.3.1" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,12 +1,12 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/clipboard", |
"name": "@abp/clipboard", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/core": "^2.1.0", |
"@abp/core": "^2.2.0", |
||||
"clipboard": "^2.0.4" |
"clipboard": "^2.0.4" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,12 +1,12 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/codemirror", |
"name": "@abp/codemirror", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/core": "^2.1.0", |
"@abp/core": "^2.2.0", |
||||
"codemirror": "^5.49.2" |
"codemirror": "^5.49.2" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,8 +1,8 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/core", |
"name": "@abp/core", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,12 +1,12 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/datatables.net-bs4", |
"name": "@abp/datatables.net-bs4", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/datatables.net": "^2.1.0", |
"@abp/datatables.net": "^2.2.0", |
||||
"datatables.net-bs4": "^1.10.20" |
"datatables.net-bs4": "^1.10.20" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,12 +1,12 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/datatables.net", |
"name": "@abp/datatables.net", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/core": "^2.1.0", |
"@abp/core": "^2.2.0", |
||||
"datatables.net": "^1.10.20" |
"datatables.net": "^1.10.20" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,15 +1,15 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/docs", |
"name": "@abp/docs", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/anchor-js": "^2.1.0", |
"@abp/anchor-js": "^2.2.0", |
||||
"@abp/clipboard": "^2.1.0", |
"@abp/clipboard": "^2.2.0", |
||||
"@abp/malihu-custom-scrollbar-plugin": "^2.1.0", |
"@abp/malihu-custom-scrollbar-plugin": "^2.2.0", |
||||
"@abp/popper.js": "^2.1.0", |
"@abp/popper.js": "^2.2.0", |
||||
"@abp/prismjs": "^2.1.0" |
"@abp/prismjs": "^2.2.0" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,12 +1,12 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/font-awesome", |
"name": "@abp/font-awesome", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/core": "^2.1.0", |
"@abp/core": "^2.2.0", |
||||
"@fortawesome/fontawesome-free": "^5.11.2" |
"@fortawesome/fontawesome-free": "^5.11.2" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,11 +1,11 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/highlight.js", |
"name": "@abp/highlight.js", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/core": "^2.1.0" |
"@abp/core": "^2.2.0" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,12 +1,12 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/jquery-form", |
"name": "@abp/jquery-form", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/jquery": "^2.1.0", |
"@abp/jquery": "^2.2.0", |
||||
"jquery-form": "^4.2.2" |
"jquery-form": "^4.2.2" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,12 +1,12 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/jquery-validation-unobtrusive", |
"name": "@abp/jquery-validation-unobtrusive", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/jquery-validation": "^2.1.0", |
"@abp/jquery-validation": "^2.2.0", |
||||
"jquery-validation-unobtrusive": "^3.2.11" |
"jquery-validation-unobtrusive": "^3.2.11" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,12 +1,12 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/jquery-validation", |
"name": "@abp/jquery-validation", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/jquery": "^2.1.0", |
"@abp/jquery": "^2.2.0", |
||||
"jquery-validation": "^1.19.1" |
"jquery-validation": "^1.19.1" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,12 +1,12 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/jquery", |
"name": "@abp/jquery", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/core": "^2.1.0", |
"@abp/core": "^2.2.0", |
||||
"jquery": "^3.4.1" |
"jquery": "^3.4.1" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,12 +1,12 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/lodash", |
"name": "@abp/lodash", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/core": "^2.1.0", |
"@abp/core": "^2.2.0", |
||||
"lodash": "^4.17.15" |
"lodash": "^4.17.15" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,12 +1,12 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/malihu-custom-scrollbar-plugin", |
"name": "@abp/malihu-custom-scrollbar-plugin", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/core": "^2.1.0", |
"@abp/core": "^2.2.0", |
||||
"malihu-custom-scrollbar-plugin": "^3.1.5" |
"malihu-custom-scrollbar-plugin": "^3.1.5" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,12 +1,12 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/markdown-it", |
"name": "@abp/markdown-it", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/core": "^2.1.0", |
"@abp/core": "^2.2.0", |
||||
"markdown-it": "^10.0.0" |
"markdown-it": "^10.0.0" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,12 +1,12 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/owl.carousel", |
"name": "@abp/owl.carousel", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/core": "^2.1.0", |
"@abp/core": "^2.2.0", |
||||
"owl.carousel": "^2.3.4" |
"owl.carousel": "^2.3.4" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,12 +1,12 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/popper.js", |
"name": "@abp/popper.js", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/core": "^2.1.0", |
"@abp/core": "^2.2.0", |
||||
"popper.js": "^1.16.0" |
"popper.js": "^1.16.0" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,12 +1,12 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/prismjs", |
"name": "@abp/prismjs", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/core": "^2.1.0", |
"@abp/core": "^2.2.0", |
||||
"prismjs": "^1.17.1" |
"prismjs": "^1.17.1" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,12 +1,12 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/select2", |
"name": "@abp/select2", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/core": "^2.1.0", |
"@abp/core": "^2.2.0", |
||||
"select2": "^4.0.12" |
"select2": "^4.0.12" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,12 +1,12 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/sweetalert", |
"name": "@abp/sweetalert", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/core": "^2.1.0", |
"@abp/core": "^2.2.0", |
||||
"sweetalert": "^2.1.2" |
"sweetalert": "^2.1.2" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,12 +1,12 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/timeago", |
"name": "@abp/timeago", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/jquery": "^2.1.0", |
"@abp/jquery": "^2.2.0", |
||||
"timeago": "^1.6.7" |
"timeago": "^1.6.7" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,12 +1,12 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/toastr", |
"name": "@abp/toastr", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/jquery": "^2.1.0", |
"@abp/jquery": "^2.2.0", |
||||
"toastr": "^2.1.4" |
"toastr": "^2.1.4" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,15 +1,15 @@ |
|||||
{ |
{ |
||||
"version": "2.1.0", |
"version": "2.2.0", |
||||
"name": "@abp/tui-editor", |
"name": "@abp/tui-editor", |
||||
"publishConfig": { |
"publishConfig": { |
||||
"access": "public" |
"access": "public" |
||||
}, |
}, |
||||
"dependencies": { |
"dependencies": { |
||||
"@abp/codemirror": "^2.1.0", |
"@abp/codemirror": "^2.2.0", |
||||
"@abp/highlight.js": "^2.1.0", |
"@abp/highlight.js": "^2.2.0", |
||||
"@abp/jquery": "^2.1.0", |
"@abp/jquery": "^2.2.0", |
||||
"@abp/markdown-it": "^2.1.0", |
"@abp/markdown-it": "^2.2.0", |
||||
"tui-editor": "^1.4.8" |
"tui-editor": "^1.4.8" |
||||
}, |
}, |
||||
"gitHead": "8b95e7469f6459fd51d56f4c20ca067533b07992" |
"gitHead": "d5707967977fb14328661ae403c41eaa679ee263" |
||||
} |
} |
||||
|
|||||
@ -1,56 +1,56 @@ |
|||||
@keyframes spin { |
@keyframes spin { |
||||
0% { |
0% { |
||||
transform: translateZ(0) rotate(0deg); |
transform: translateZ(0) rotate(0deg); |
||||
} |
} |
||||
|
|
||||
100% { |
100% { |
||||
transform: translateZ(0) rotate(360deg); |
transform: translateZ(0) rotate(360deg); |
||||
} |
} |
||||
} |
} |
||||
|
|
||||
.abp-block-area { |
.abp-block-area { |
||||
position: fixed; |
position: fixed; |
||||
top: 0; |
top: 0; |
||||
left: 0; |
left: 0; |
||||
width: 100%; |
width: 100%; |
||||
height: 100%; |
height: 100%; |
||||
z-index: 102; |
z-index: 102; |
||||
background-color: #fff; |
background-color: #fff; |
||||
opacity: .8; |
opacity: .8; |
||||
transition: opacity .25s; |
transition: opacity .25s; |
||||
} |
} |
||||
|
|
||||
.abp-block-area.abp-block-area-disappearing { |
.abp-block-area.abp-block-area-disappearing { |
||||
opacity: 0; |
opacity: 0; |
||||
} |
} |
||||
|
|
||||
.abp-block-area.abp-block-area-busy:after { |
.abp-block-area.abp-block-area-busy:after { |
||||
content: attr(data-text); |
content: attr(data-text); |
||||
display: block; |
display: block; |
||||
max-width: 125px; |
max-width: 125px; |
||||
position: absolute; |
position: absolute; |
||||
top: 50%; |
top: 50%; |
||||
left: 50%; |
left: 50%; |
||||
transform: translate(-50%, -50%); |
transform: translate(-50%, -50%); |
||||
font-size: 20px; |
font-size: 20px; |
||||
font-family: sans-serif; |
font-family: sans-serif; |
||||
color: #343a40; |
color: #343a40; |
||||
text-align: center; |
text-align: center; |
||||
text-transform: uppercase; |
text-transform: uppercase; |
||||
} |
} |
||||
|
|
||||
.abp-block-area.abp-block-area-busy:before { |
.abp-block-area.abp-block-area-busy:before { |
||||
content: ""; |
content: ""; |
||||
display: block; |
display: block; |
||||
width: 150px; |
width: 150px; |
||||
height: 150px; |
height: 150px; |
||||
border-radius: 50%; |
border-radius: 50%; |
||||
border-width: 2px; |
border-width: 2px; |
||||
border-style: solid; |
border-style: solid; |
||||
border-color: transparent #228ae6 #228ae6 #228ae6; |
border-color: transparent #228ae6 #228ae6 #228ae6; |
||||
position: absolute; |
position: absolute; |
||||
top: calc(50% - 75px); |
top: calc(50% - 75px); |
||||
left: calc(50% - 75px); |
left: calc(50% - 75px); |
||||
will-change: transform; |
will-change: transform; |
||||
animation: spin .75s infinite ease-in-out; |
animation: spin .75s infinite ease-in-out; |
||||
} |
} |
||||
|
|||||
File diff suppressed because it is too large
@ -1,393 +1,393 @@ |
|||||
var abp = abp || {}; |
var abp = abp || {}; |
||||
(function($) { |
(function($) { |
||||
|
|
||||
if (!$) { |
if (!$) { |
||||
throw "abp/jquery library requires the jquery library included to the page!"; |
throw "abp/jquery library requires the jquery library included to the page!"; |
||||
} |
} |
||||
|
|
||||
// ABP CORE OVERRIDES /////////////////////////////////////////////////////
|
// ABP CORE OVERRIDES /////////////////////////////////////////////////////
|
||||
|
|
||||
abp.message._showMessage = function (message, title) { |
abp.message._showMessage = function (message, title) { |
||||
alert((title || '') + ' ' + message); |
alert((title || '') + ' ' + message); |
||||
|
|
||||
return $.Deferred(function ($dfd) { |
return $.Deferred(function ($dfd) { |
||||
$dfd.resolve(); |
$dfd.resolve(); |
||||
}); |
}); |
||||
}; |
}; |
||||
|
|
||||
abp.message.confirm = function (message, titleOrCallback, callback) { |
abp.message.confirm = function (message, titleOrCallback, callback) { |
||||
if (titleOrCallback && !(typeof titleOrCallback == 'string')) { |
if (titleOrCallback && !(typeof titleOrCallback == 'string')) { |
||||
callback = titleOrCallback; |
callback = titleOrCallback; |
||||
} |
} |
||||
|
|
||||
var result = confirm(message); |
var result = confirm(message); |
||||
callback && callback(result); |
callback && callback(result); |
||||
|
|
||||
return $.Deferred(function ($dfd) { |
return $.Deferred(function ($dfd) { |
||||
$dfd.resolve(result); |
$dfd.resolve(result); |
||||
}); |
}); |
||||
}; |
}; |
||||
|
|
||||
abp.utils.isFunction = function (obj) { |
abp.utils.isFunction = function (obj) { |
||||
return $.isFunction(obj); |
return $.isFunction(obj); |
||||
}; |
}; |
||||
|
|
||||
// JQUERY EXTENSIONS //////////////////////////////////////////////////////
|
// JQUERY EXTENSIONS //////////////////////////////////////////////////////
|
||||
|
|
||||
$.fn.findWithSelf = function (selector) { |
$.fn.findWithSelf = function (selector) { |
||||
return this.filter(selector).add(this.find(selector)); |
return this.filter(selector).add(this.find(selector)); |
||||
}; |
}; |
||||
|
|
||||
// DOM ////////////////////////////////////////////////////////////////////
|
// DOM ////////////////////////////////////////////////////////////////////
|
||||
|
|
||||
abp.dom = abp.dom || {}; |
abp.dom = abp.dom || {}; |
||||
|
|
||||
abp.dom.onNodeAdded = function (callback) { |
abp.dom.onNodeAdded = function (callback) { |
||||
abp.event.on('abp.dom.nodeAdded', callback); |
abp.event.on('abp.dom.nodeAdded', callback); |
||||
}; |
}; |
||||
|
|
||||
abp.dom.onNodeRemoved = function (callback) { |
abp.dom.onNodeRemoved = function (callback) { |
||||
abp.event.on('abp.dom.nodeRemoved', callback); |
abp.event.on('abp.dom.nodeRemoved', callback); |
||||
}; |
}; |
||||
|
|
||||
var mutationObserverCallback = function (mutationsList) { |
var mutationObserverCallback = function (mutationsList) { |
||||
for (var i = 0; i < mutationsList.length; i++) { |
for (var i = 0; i < mutationsList.length; i++) { |
||||
var mutation = mutationsList[i]; |
var mutation = mutationsList[i]; |
||||
if (mutation.type === 'childList') { |
if (mutation.type === 'childList') { |
||||
if (mutation.addedNodes && mutation.removedNodes.length) { |
if (mutation.addedNodes && mutation.removedNodes.length) { |
||||
for (var k = 0; k < mutation.removedNodes.length; k++) { |
for (var k = 0; k < mutation.removedNodes.length; k++) { |
||||
abp.event.trigger( |
abp.event.trigger( |
||||
'abp.dom.nodeRemoved', |
'abp.dom.nodeRemoved', |
||||
{ |
{ |
||||
$el: $(mutation.removedNodes[k]) |
$el: $(mutation.removedNodes[k]) |
||||
} |
} |
||||
); |
); |
||||
} |
} |
||||
} |
} |
||||
|
|
||||
if (mutation.addedNodes && mutation.addedNodes.length) { |
if (mutation.addedNodes && mutation.addedNodes.length) { |
||||
for (var j = 0; j < mutation.addedNodes.length; j++) { |
for (var j = 0; j < mutation.addedNodes.length; j++) { |
||||
abp.event.trigger( |
abp.event.trigger( |
||||
'abp.dom.nodeAdded', |
'abp.dom.nodeAdded', |
||||
{ |
{ |
||||
$el: $(mutation.addedNodes[j]) |
$el: $(mutation.addedNodes[j]) |
||||
} |
} |
||||
); |
); |
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
}; |
}; |
||||
|
|
||||
new MutationObserver(mutationObserverCallback).observe( |
new MutationObserver(mutationObserverCallback).observe( |
||||
$('body')[0], |
$('body')[0], |
||||
{ |
{ |
||||
subtree: true, |
subtree: true, |
||||
childList: true |
childList: true |
||||
} |
} |
||||
); |
); |
||||
|
|
||||
// AJAX ///////////////////////////////////////////////////////////////////
|
// AJAX ///////////////////////////////////////////////////////////////////
|
||||
|
|
||||
abp.ajax = function (userOptions) { |
abp.ajax = function (userOptions) { |
||||
userOptions = userOptions || {}; |
userOptions = userOptions || {}; |
||||
|
|
||||
var options = $.extend(true, {}, abp.ajax.defaultOpts, userOptions); |
var options = $.extend(true, {}, abp.ajax.defaultOpts, userOptions); |
||||
|
|
||||
options.success = undefined; |
options.success = undefined; |
||||
options.error = undefined; |
options.error = undefined; |
||||
|
|
||||
return $.Deferred(function ($dfd) { |
return $.Deferred(function ($dfd) { |
||||
$.ajax(options) |
$.ajax(options) |
||||
.done(function (data, textStatus, jqXHR) { |
.done(function (data, textStatus, jqXHR) { |
||||
$dfd.resolve(data); |
$dfd.resolve(data); |
||||
userOptions.success && userOptions.success(data); |
userOptions.success && userOptions.success(data); |
||||
}).fail(function (jqXHR) { |
}).fail(function (jqXHR) { |
||||
if (jqXHR.getResponseHeader('_AbpErrorFormat') === 'true') { |
if (jqXHR.getResponseHeader('_AbpErrorFormat') === 'true') { |
||||
abp.ajax.handleAbpErrorResponse(jqXHR, userOptions, $dfd); |
abp.ajax.handleAbpErrorResponse(jqXHR, userOptions, $dfd); |
||||
} else { |
} else { |
||||
abp.ajax.handleNonAbpErrorResponse(jqXHR, userOptions, $dfd); |
abp.ajax.handleNonAbpErrorResponse(jqXHR, userOptions, $dfd); |
||||
} |
} |
||||
}); |
}); |
||||
}); |
}); |
||||
}; |
}; |
||||
|
|
||||
$.extend(abp.ajax, { |
$.extend(abp.ajax, { |
||||
defaultOpts: { |
defaultOpts: { |
||||
dataType: 'json', |
dataType: 'json', |
||||
type: 'POST', |
type: 'POST', |
||||
contentType: 'application/json', |
contentType: 'application/json', |
||||
headers: { |
headers: { |
||||
'X-Requested-With': 'XMLHttpRequest' |
'X-Requested-With': 'XMLHttpRequest' |
||||
} |
} |
||||
}, |
}, |
||||
|
|
||||
defaultError: { |
defaultError: { |
||||
message: 'An error has occurred!', |
message: 'An error has occurred!', |
||||
details: 'Error detail not sent by server.' |
details: 'Error detail not sent by server.' |
||||
}, |
}, |
||||
|
|
||||
defaultError401: { |
defaultError401: { |
||||
message: 'You are not authenticated!', |
message: 'You are not authenticated!', |
||||
details: 'You should be authenticated (sign in) in order to perform this operation.' |
details: 'You should be authenticated (sign in) in order to perform this operation.' |
||||
}, |
}, |
||||
|
|
||||
defaultError403: { |
defaultError403: { |
||||
message: 'You are not authorized!', |
message: 'You are not authorized!', |
||||
details: 'You are not allowed to perform this operation.' |
details: 'You are not allowed to perform this operation.' |
||||
}, |
}, |
||||
|
|
||||
defaultError404: { |
defaultError404: { |
||||
message: 'Resource not found!', |
message: 'Resource not found!', |
||||
details: 'The resource requested could not found on the server.' |
details: 'The resource requested could not found on the server.' |
||||
}, |
}, |
||||
|
|
||||
logError: function (error) { |
logError: function (error) { |
||||
abp.log.error(error); |
abp.log.error(error); |
||||
}, |
}, |
||||
|
|
||||
showError: function (error) { |
showError: function (error) { |
||||
if (error.details) { |
if (error.details) { |
||||
return abp.message.error(error.details, error.message); |
return abp.message.error(error.details, error.message); |
||||
} else { |
} else { |
||||
return abp.message.error(error.message || abp.ajax.defaultError.message); |
return abp.message.error(error.message || abp.ajax.defaultError.message); |
||||
} |
} |
||||
}, |
}, |
||||
|
|
||||
handleTargetUrl: function (targetUrl) { |
handleTargetUrl: function (targetUrl) { |
||||
if (!targetUrl) { |
if (!targetUrl) { |
||||
location.href = abp.appPath; |
location.href = abp.appPath; |
||||
} else { |
} else { |
||||
location.href = targetUrl; |
location.href = targetUrl; |
||||
} |
} |
||||
}, |
}, |
||||
|
|
||||
handleErrorStatusCode: function (status) { |
handleErrorStatusCode: function (status) { |
||||
switch (status) { |
switch (status) { |
||||
case 401: |
case 401: |
||||
abp.ajax.handleUnAuthorizedRequest( |
abp.ajax.handleUnAuthorizedRequest( |
||||
abp.ajax.showError(abp.ajax.defaultError401), |
abp.ajax.showError(abp.ajax.defaultError401), |
||||
abp.appPath |
abp.appPath |
||||
); |
); |
||||
break; |
break; |
||||
case 403: |
case 403: |
||||
abp.ajax.showError(abp.ajax.defaultError403); |
abp.ajax.showError(abp.ajax.defaultError403); |
||||
break; |
break; |
||||
case 404: |
case 404: |
||||
abp.ajax.showError(abp.ajax.defaultError404); |
abp.ajax.showError(abp.ajax.defaultError404); |
||||
break; |
break; |
||||
default: |
default: |
||||
abp.ajax.showError(abp.ajax.defaultError); |
abp.ajax.showError(abp.ajax.defaultError); |
||||
break; |
break; |
||||
} |
} |
||||
}, |
}, |
||||
|
|
||||
handleNonAbpErrorResponse: function (jqXHR, userOptions, $dfd) { |
handleNonAbpErrorResponse: function (jqXHR, userOptions, $dfd) { |
||||
if (userOptions.abpHandleError !== false) { |
if (userOptions.abpHandleError !== false) { |
||||
abp.ajax.handleErrorStatusCode(jqXHR.status); |
abp.ajax.handleErrorStatusCode(jqXHR.status); |
||||
} |
} |
||||
|
|
||||
$dfd.reject.apply(this, arguments); |
$dfd.reject.apply(this, arguments); |
||||
userOptions.error && userOptions.error.apply(this, arguments); |
userOptions.error && userOptions.error.apply(this, arguments); |
||||
}, |
}, |
||||
|
|
||||
handleAbpErrorResponse: function (jqXHR, userOptions, $dfd) { |
handleAbpErrorResponse: function (jqXHR, userOptions, $dfd) { |
||||
var messagePromise = null; |
var messagePromise = null; |
||||
|
|
||||
if (userOptions.abpHandleError !== false) { |
if (userOptions.abpHandleError !== false) { |
||||
messagePromise = abp.ajax.showError(jqXHR.responseJSON.error); |
messagePromise = abp.ajax.showError(jqXHR.responseJSON.error); |
||||
} |
} |
||||
|
|
||||
abp.ajax.logError(jqXHR.responseJSON.error); |
abp.ajax.logError(jqXHR.responseJSON.error); |
||||
|
|
||||
$dfd && $dfd.reject(jqXHR.responseJSON.error, jqXHR); |
$dfd && $dfd.reject(jqXHR.responseJSON.error, jqXHR); |
||||
userOptions.error && userOptions.error(jqXHR.responseJSON.error, jqXHR); |
userOptions.error && userOptions.error(jqXHR.responseJSON.error, jqXHR); |
||||
|
|
||||
if (jqXHR.status === 401 && userOptions.abpHandleError !== false) { |
if (jqXHR.status === 401 && userOptions.abpHandleError !== false) { |
||||
abp.ajax.handleUnAuthorizedRequest(messagePromise); |
abp.ajax.handleUnAuthorizedRequest(messagePromise); |
||||
} |
} |
||||
}, |
}, |
||||
|
|
||||
handleUnAuthorizedRequest: function (messagePromise, targetUrl) { |
handleUnAuthorizedRequest: function (messagePromise, targetUrl) { |
||||
if (messagePromise) { |
if (messagePromise) { |
||||
messagePromise.done(function () { |
messagePromise.done(function () { |
||||
abp.ajax.handleTargetUrl(targetUrl); |
abp.ajax.handleTargetUrl(targetUrl); |
||||
}); |
}); |
||||
} else { |
} else { |
||||
abp.ajax.handleTargetUrl(targetUrl); |
abp.ajax.handleTargetUrl(targetUrl); |
||||
} |
} |
||||
}, |
}, |
||||
|
|
||||
blockUI: function (options) { |
blockUI: function (options) { |
||||
if (options.blockUI) { |
if (options.blockUI) { |
||||
if (options.blockUI === true) { //block whole page
|
if (options.blockUI === true) { //block whole page
|
||||
abp.ui.setBusy(); |
abp.ui.setBusy(); |
||||
} else { //block an element
|
} else { //block an element
|
||||
abp.ui.setBusy(options.blockUI); |
abp.ui.setBusy(options.blockUI); |
||||
} |
} |
||||
} |
} |
||||
}, |
}, |
||||
|
|
||||
unblockUI: function (options) { |
unblockUI: function (options) { |
||||
if (options.blockUI) { |
if (options.blockUI) { |
||||
if (options.blockUI === true) { //unblock whole page
|
if (options.blockUI === true) { //unblock whole page
|
||||
abp.ui.clearBusy(); |
abp.ui.clearBusy(); |
||||
} else { //unblock an element
|
} else { //unblock an element
|
||||
abp.ui.clearBusy(options.blockUI); |
abp.ui.clearBusy(options.blockUI); |
||||
} |
} |
||||
} |
} |
||||
}, |
}, |
||||
|
|
||||
ajaxSendHandler: function (event, request, settings) { |
ajaxSendHandler: function (event, request, settings) { |
||||
var token = abp.security.antiForgery.getToken(); |
var token = abp.security.antiForgery.getToken(); |
||||
if (!token) { |
if (!token) { |
||||
return; |
return; |
||||
} |
} |
||||
|
|
||||
if (!settings.headers || settings.headers[abp.security.antiForgery.tokenHeaderName] === undefined) { |
if (!settings.headers || settings.headers[abp.security.antiForgery.tokenHeaderName] === undefined) { |
||||
request.setRequestHeader(abp.security.antiForgery.tokenHeaderName, token); |
request.setRequestHeader(abp.security.antiForgery.tokenHeaderName, token); |
||||
} |
} |
||||
} |
} |
||||
}); |
}); |
||||
|
|
||||
$(document).ajaxSend(function (event, request, settings) { |
$(document).ajaxSend(function (event, request, settings) { |
||||
return abp.ajax.ajaxSendHandler(event, request, settings); |
return abp.ajax.ajaxSendHandler(event, request, settings); |
||||
}); |
}); |
||||
|
|
||||
abp.event.on('abp.configurationInitialized', function () { |
abp.event.on('abp.configurationInitialized', function () { |
||||
var l = abp.localization.getResource('AbpUi'); |
var l = abp.localization.getResource('AbpUi'); |
||||
|
|
||||
abp.ajax.defaultError.message = l('DefaultErrorMessage'); |
abp.ajax.defaultError.message = l('DefaultErrorMessage'); |
||||
abp.ajax.defaultError.details = l('DefaultErrorMessageDetail'); |
abp.ajax.defaultError.details = l('DefaultErrorMessageDetail'); |
||||
abp.ajax.defaultError401.message = l('DefaultErrorMessage401'); |
abp.ajax.defaultError401.message = l('DefaultErrorMessage401'); |
||||
abp.ajax.defaultError401.details = l('DefaultErrorMessage401Detail'); |
abp.ajax.defaultError401.details = l('DefaultErrorMessage401Detail'); |
||||
abp.ajax.defaultError403.message = l('DefaultErrorMessage403'); |
abp.ajax.defaultError403.message = l('DefaultErrorMessage403'); |
||||
abp.ajax.defaultError403.details = l('DefaultErrorMessage403Detail'); |
abp.ajax.defaultError403.details = l('DefaultErrorMessage403Detail'); |
||||
abp.ajax.defaultError404.message = l('DefaultErrorMessage404'); |
abp.ajax.defaultError404.message = l('DefaultErrorMessage404'); |
||||
abp.ajax.defaultError404.details = l('DefaultErrorMessage404Detail'); |
abp.ajax.defaultError404.details = l('DefaultErrorMessage404Detail'); |
||||
}); |
}); |
||||
|
|
||||
// RESOURCE LOADER ////////////////////////////////////////////////////////
|
// RESOURCE LOADER ////////////////////////////////////////////////////////
|
||||
|
|
||||
/* UrlStates enum */ |
/* UrlStates enum */ |
||||
var UrlStates = { |
var UrlStates = { |
||||
LOADING: 'LOADING', |
LOADING: 'LOADING', |
||||
LOADED: 'LOADED', |
LOADED: 'LOADED', |
||||
FAILED: 'FAILED' |
FAILED: 'FAILED' |
||||
}; |
}; |
||||
|
|
||||
/* UrlInfo class */ |
/* UrlInfo class */ |
||||
function UrlInfo(url) { |
function UrlInfo(url) { |
||||
this.url = url; |
this.url = url; |
||||
this.state = UrlStates.LOADING; |
this.state = UrlStates.LOADING; |
||||
this.loadCallbacks = []; |
this.loadCallbacks = []; |
||||
this.failCallbacks = []; |
this.failCallbacks = []; |
||||
} |
} |
||||
|
|
||||
UrlInfo.prototype.succeed = function () { |
UrlInfo.prototype.succeed = function () { |
||||
this.state = UrlStates.LOADED; |
this.state = UrlStates.LOADED; |
||||
for (var i = 0; i < this.loadCallbacks.length; i++) { |
for (var i = 0; i < this.loadCallbacks.length; i++) { |
||||
this.loadCallbacks[i](); |
this.loadCallbacks[i](); |
||||
} |
} |
||||
}; |
}; |
||||
|
|
||||
UrlInfo.prototype.failed = function () { |
UrlInfo.prototype.failed = function () { |
||||
this.state = UrlStates.FAILED; |
this.state = UrlStates.FAILED; |
||||
for (var i = 0; i < this.failCallbacks.length; i++) { |
for (var i = 0; i < this.failCallbacks.length; i++) { |
||||
this.failCallbacks[i](); |
this.failCallbacks[i](); |
||||
} |
} |
||||
}; |
}; |
||||
|
|
||||
UrlInfo.prototype.handleCallbacks = function (loadCallback, failCallback) { |
UrlInfo.prototype.handleCallbacks = function (loadCallback, failCallback) { |
||||
switch (this.state) { |
switch (this.state) { |
||||
case UrlStates.LOADED: |
case UrlStates.LOADED: |
||||
loadCallback && loadCallback(); |
loadCallback && loadCallback(); |
||||
break; |
break; |
||||
case UrlStates.FAILED: |
case UrlStates.FAILED: |
||||
failCallback && failCallback(); |
failCallback && failCallback(); |
||||
break; |
break; |
||||
case UrlStates.LOADING: |
case UrlStates.LOADING: |
||||
this.addCallbacks(loadCallback, failCallback); |
this.addCallbacks(loadCallback, failCallback); |
||||
break; |
break; |
||||
} |
} |
||||
}; |
}; |
||||
|
|
||||
UrlInfo.prototype.addCallbacks = function (loadCallback, failCallback) { |
UrlInfo.prototype.addCallbacks = function (loadCallback, failCallback) { |
||||
loadCallback && this.loadCallbacks.push(loadCallback); |
loadCallback && this.loadCallbacks.push(loadCallback); |
||||
failCallback && this.failCallbacks.push(failCallback); |
failCallback && this.failCallbacks.push(failCallback); |
||||
}; |
}; |
||||
|
|
||||
/* ResourceLoader API */ |
/* ResourceLoader API */ |
||||
|
|
||||
abp.ResourceLoader = (function () { |
abp.ResourceLoader = (function () { |
||||
|
|
||||
var _urlInfos = {}; |
var _urlInfos = {}; |
||||
|
|
||||
function getCacheKey(url) { |
function getCacheKey(url) { |
||||
return url; |
return url; |
||||
} |
} |
||||
|
|
||||
function appendTimeToUrl(url) { |
function appendTimeToUrl(url) { |
||||
|
|
||||
if (url.indexOf('?') < 0) { |
if (url.indexOf('?') < 0) { |
||||
url += '?'; |
url += '?'; |
||||
} else { |
} else { |
||||
url += '&'; |
url += '&'; |
||||
} |
} |
||||
|
|
||||
url += '_=' + new Date().getTime(); |
url += '_=' + new Date().getTime(); |
||||
|
|
||||
return url; |
return url; |
||||
} |
} |
||||
|
|
||||
var _loadFromUrl = function (url, loadCallback, failCallback, serverLoader) { |
var _loadFromUrl = function (url, loadCallback, failCallback, serverLoader) { |
||||
|
|
||||
var cacheKey = getCacheKey(url); |
var cacheKey = getCacheKey(url); |
||||
|
|
||||
var urlInfo = _urlInfos[cacheKey]; |
var urlInfo = _urlInfos[cacheKey]; |
||||
|
|
||||
if (urlInfo) { |
if (urlInfo) { |
||||
urlInfo.handleCallbacks(loadCallback, failCallback); |
urlInfo.handleCallbacks(loadCallback, failCallback); |
||||
return; |
return; |
||||
} |
} |
||||
|
|
||||
_urlInfos[cacheKey] = urlInfo = new UrlInfo(url); |
_urlInfos[cacheKey] = urlInfo = new UrlInfo(url); |
||||
urlInfo.addCallbacks(loadCallback, failCallback); |
urlInfo.addCallbacks(loadCallback, failCallback); |
||||
|
|
||||
serverLoader(urlInfo); |
serverLoader(urlInfo); |
||||
}; |
}; |
||||
|
|
||||
var _loadScript = function (url, loadCallback, failCallback) { |
var _loadScript = function (url, loadCallback, failCallback) { |
||||
_loadFromUrl(url, loadCallback, failCallback, function (urlInfo) { |
_loadFromUrl(url, loadCallback, failCallback, function (urlInfo) { |
||||
$.get({ |
$.get({ |
||||
url: url, |
url: url, |
||||
dataType: 'text' |
dataType: 'text' |
||||
}) |
}) |
||||
.done(function (script) { |
.done(function (script) { |
||||
$.globalEval(script); |
$.globalEval(script); |
||||
urlInfo.succeed(); |
urlInfo.succeed(); |
||||
}) |
}) |
||||
.fail(function () { |
.fail(function () { |
||||
urlInfo.failed(); |
urlInfo.failed(); |
||||
}); |
}); |
||||
}); |
}); |
||||
}; |
}; |
||||
|
|
||||
var _loadStyle = function (url) { |
var _loadStyle = function (url) { |
||||
_loadFromUrl(url, undefined, undefined, function (urlInfo) { |
_loadFromUrl(url, undefined, undefined, function (urlInfo) { |
||||
|
|
||||
$('<link/>', { |
$('<link/>', { |
||||
rel: 'stylesheet', |
rel: 'stylesheet', |
||||
type: 'text/css', |
type: 'text/css', |
||||
href: appendTimeToUrl(url) |
href: appendTimeToUrl(url) |
||||
}).appendTo('head'); |
}).appendTo('head'); |
||||
}); |
}); |
||||
}; |
}; |
||||
|
|
||||
return { |
return { |
||||
loadScript: _loadScript, |
loadScript: _loadScript, |
||||
loadStyle: _loadStyle |
loadStyle: _loadStyle |
||||
} |
} |
||||
})(); |
})(); |
||||
|
|
||||
})(jQuery); |
})(jQuery); |
||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue