Publish:合并北京京烟物流项目到主分支

This commit is contained in:
Argo-MacBookPro 2018-08-30 14:29:54 +08:00
parent 4cd87d8122
commit 5e1bcadb20
55 changed files with 687 additions and 862 deletions

667
.gitignore vendored
View File

@ -1,341 +1,346 @@
###### -- File Created With Git Source Control Provider 2015 -- ######
###### -- From https://github.com/github/gitignore -- ######
###### -- Warning Regenerating this file will erase all your custom ignores, unless you add them below the Custom Ignore section at the bottom -- ######
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush
.cr/
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush
.cr/
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# MAC Files
**/.DS_Store
# Windows db files
**/[tT]humbs.db
###### -- Custom Ignore Section, Make sure all files you add to the git repo are below this line -- ######
# Net Core Keys
[Kk]eys/
###### -- Custom Ignore Section, Make sure all files you add to the git repo are below this line -- ######

View File

@ -58,16 +58,6 @@ namespace Bootstrap.Admin.Controllers
///
/// </summary>
/// <returns></returns>
public ActionResult Register(User p)
{
if (string.IsNullOrEmpty(p.UserName) || string.IsNullOrEmpty(p.Password) || string.IsNullOrEmpty(p.DisplayName) || string.IsNullOrEmpty(p.Description)) return View();
p.UserStatus = 1;
return UserHelper.SaveUser(p) ? (ActionResult)Redirect("~/html/RegResult.html") : View();
}
/// <summary>
///
/// </summary>
/// <returns></returns>
public ActionResult Mobile()
{
return View();

View File

@ -1,5 +1,6 @@
using Bootstrap.DataAccess;
using Bootstrap.Security;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Linq;
@ -17,9 +18,18 @@ namespace Bootstrap.Admin.Controllers
/// <param name="value"></param>
/// <returns></returns>
[HttpGet]
[AllowAnonymous]
public bool Get(string userName)
{
return BootstrapUser.RetrieveUserByUserName(userName) == null && !UserHelper.RetrieveNewUsers().Any(u => u.UserName == userName);
}
[HttpPost]
[AllowAnonymous]
public bool Post([FromBody] User user)
{
var ret = false;
if (string.IsNullOrEmpty(user.UserName) || string.IsNullOrEmpty(user.Password) || string.IsNullOrEmpty(user.DisplayName) || string.IsNullOrEmpty(user.Description)) return ret;
return UserHelper.SaveUser(user);
}
}
}

View File

@ -78,10 +78,10 @@ namespace Bootstrap.Admin.Controllers.Api
/// <param name="value"></param>
/// <returns></returns>
[HttpGet("{id}")]
public Notifications Get(string id)
public object Get(string id)
{
var ret = new Notifications();
if (id == "newusers" || id == "all") ret.Users = UserHelper.RetrieveNewUsers().OrderByDescending(u => u.RegisterTime).ToList();
var ret = new object();
if (id == "newusers") ret = UserHelper.RetrieveNewUsers().ToList();
return ret;
}

View File

@ -1,7 +1,10 @@
using Bootstrap.Admin.Models;
using Bootstrap.DataAccess;
using Longbow.Web.WebSockets;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
namespace Bootstrap.Admin.Controllers
{

View File

@ -46,10 +46,10 @@ namespace Bootstrap.Admin
services.AddConfigurationManager();
services.AddCacheManager();
services.AddDBAccessFactory();
services.AddDataProtection(op => op.ApplicationDiscriminator = "BootstrapAdmin")
.SetApplicationName("__bd__")
.DisableAutomaticKeyGeneration()
.PersistKeysToFileSystem(new DirectoryInfo(ConfigurationManager.AppSettings["KeyPath"]));
var dataProtectionBuilder = services.AddDataProtection(op => op.ApplicationDiscriminator = Configuration["ApplicationDiscriminator"])
.SetApplicationName(Configuration["ApplicationName"])
.PersistKeysToFileSystem(new DirectoryInfo(Configuration["KeyPath"]));
if (Configuration["DisableAutomaticKeyGeneration"] == "True") dataProtectionBuilder.DisableAutomaticKeyGeneration();
services.AddMvc(options =>
{
options.Filters.Add<BootstrapAdminAuthorizeFilter>();

View File

@ -1,4 +1,4 @@
@model Bootstrap.Admin.Models.ModelBase
@model ModelBase
@{
ViewBag.Title = Model.Title;
Layout = "~/Views/Shared/_Login.cshtml";

View File

@ -1,4 +1,4 @@
@model Bootstrap.Admin.Models.ModelBase
@model ModelBase
@{
ViewBag.Title = Model.Title;
Layout = "~/Views/Shared/_Login.cshtml";

View File

@ -1,112 +0,0 @@
@{
ViewBag.Title = "注册新用户";
Layout = "~/Views/Shared/_Root.cshtml";
}
@section css {
<link href="~/css/bootstrap.css" rel="stylesheet">
<link href="~/css/bootstrap-theme.css" rel="stylesheet">
<link href="~/css/font-awesome.css" rel="stylesheet" />
<link href="~/css/register.css" rel="stylesheet" />
}
@section javascript {
<script src="~/js/bootstrap.js"></script>
<script src="~/js/Longbow.Common.js"></script>
<script src="~/js/jquery.validate.js"></script>
<script src="~/js/messages_zh.js"></script>
<script src="~/js/sweetalert.js"></script>
<script src="~/js/register.js"></script>
}
<div class="container">
<div class="setup-wrapper">
<header><h2>新用户注册</h2></header>
<div class="setup-header">
<ol class="steps">
<li class="current">
<strong class="step">步骤 1:</strong><span>创建一个账号</span>
</li>
<li>
<strong class="step">步骤 2:</strong><span>确认信息</span>
</li>
</ol>
</div>
<form autocomplete="off" id="signup-form" method="post">
<div class="setup-main">
<div class="setup-form-container">
<h3 class="setup-form-title mb-3">
创建您的账号
</h3>
<div class="form-group">
<label for="userName">登陆账号:</label>
<div class="input-group">
<span class="input-group-addon">@@</span>
<input type="text" id="userName" name="userName" class="form-control" placeholder="登陆账号" value="" autofocus maxlength="50" />
</div>
</div>
<div class="form-group">
<label for="displayName">显示名称:</label>
<div class="input-group">
<span class="glyphicon glyphicon-user input-group-addon"></span>
<input type="text" id="displayName" name="displayName" class="form-control" value="" placeholder="显示名称" maxlength="50" />
</div>
</div>
<div class="form-group">
<label for="password">密码:</label>
<div class="input-group">
<span class="glyphicon glyphicon-lock input-group-addon"></span>
<input type="password" id="password" name="password" class="form-control" value="" placeholder="密码" maxlength="50" />
</div>
</div>
<div class="form-group">
<label for="assurePassword">确认密码:</label>
<div class="input-group">
<span class="glyphicon glyphicon-lock input-group-addon"></span>
<input type="password" id="assurePassword" name="assurePassword" class="form-control" value="" placeholder="确认密码" maxlength="50" />
</div>
</div>
<div class="form-group">
<label for="description">申请理由:</label>
<div class="input-group">
<span class="glyphicon glyphicon-certificate input-group-addon"></span>
<textarea id="description" name="description" class="form-control" placeholder="申请理由500字以内" rows="6" maxlength="500"></textarea>
</div>
</div>
<div class="form-group">
<button id="btnAccount" class="btn btn-primary pull-right" type="button">继续</button>
</div> <!-- /.setup-form-container -->
</div>
</div>
<div class="setup-confirm">
<h3>您注册的信息如下:</h3>
<div class="form-group">
<label>登陆账号:</label><span id="loginID" class="form-control-static"></span>
</div>
<div class="form-group">
<label>显示名称:</label><span id="loginName" class="form-control-static"></span>
</div>
<div class="form-group">
<label>申请理由:</label><span id="loginDesc" class="form-control-static"></span>
</div>
<div class="form-group">
<button id="btnPrev" class="btn btn-secondary" type="button">上一步</button>
<button id="btnSubmit" class="btn btn-primary pull-right" type="submit">确认并提交</button>
</div>
</div>
</form>
<div class="setup-secondary">
<div class="setup-info-module">
<h4>欢迎加入本系统</h4>
<ul class="features-list">
<li><strong>Unlimited</strong> 特性一</li>
<li><strong>Unlimited</strong> 特性二</li>
<li><strong>Unlimited</strong> 特性三</li>
<li><strong>Unlimited</strong> 特性四</li>
<li class="list-divider"></li>
<li><i class="glyphicon glyphicon-ok"></i> 优点一</li>
<li><i class="glyphicon glyphicon-ok"></i> 优点二</li>
<li><i class="glyphicon glyphicon-ok"></i> 优点三</li>
<li><i class="glyphicon glyphicon-ok"></i> 优点四</li>
</ul>
</div>
</div>
</div>
</div>

View File

@ -1,30 +1,38 @@
@model Bootstrap.Admin.Models.ModelBase
<h2 class="form-signin-heading">@Model.Title</h2>
<div class="login-wrap" data-toggle="LgbValidate" data-valid-button="#btnSubmit">
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="fa fa-user input-group-text"></span>
@model ModelBase
<div class="container">
<form id="login" method="post" class="form-signin">
<h2 class="form-signin-heading">@Model.Title</h2>
<div class="login-wrap" data-toggle="LgbValidate" data-valid-button="button[type='submit']">
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text">
<span class="fa fa-user"></span>
</div>
</div>
<input type="text" name="userName" class="form-control" placeholder="用户名" data-required-msg="请输入用户名" value="" autofocus data-valid="true" />
</div>
</div>
<input type="text" name="userName" class="form-control" placeholder="用户名" data-required-msg="请输入用户名" value="" autofocus data-valid="true" />
</div>
</div>
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="fa fa-lock input-group-text"></span>
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text">
<span class="fa fa-lock"></span>
</div>
</div>
<input type="password" name="password" class="form-control" value="" placeholder="密码" data-required-msg="请输入密码" data-valid="true" />
</div>
</div>
<div class="form-group">
<div class="form-check">
<input id="remember" name="remember" type="checkbox" class="form-check-input" value="true" /><label for="remember" class="form-check-label">记住我</label>
</div>
</div>
<button class="btn btn-lg btn-login btn-block" type="submit">登 陆</button>
<div class="login-footer">
<a href="#" data-method="register">申请账号</a>
<a href="#" data-method="forgot">忘记密码</a>
</div>
<input type="password" name="password" class="form-control" value="" placeholder="密码" data-required-msg="请输入密码" data-valid="true" />
</div>
</div>
<div class="form-group">
<div class="form-check">
<input id="remember" name="remember" type="checkbox" class="form-check-input" value="true" /><label for="remember" class="form-check-label">记住我</label>
</div>
</div>
<button class="btn btn-lg btn-login btn-block" type="submit" id="btnSubmit">登 陆</button>
<div class="login-footer">
<div class="login-create"><a href="Register">申请账号</a></div>
<div class="login-reset"><a href="#">忘记密码</a></div>
</div>
</form>
</div>

View File

@ -5,7 +5,7 @@
}
@section Javascript {
<script src="~/js/bootstrap3-typeahead.js"></script>
<script src="~/js/Dicts.js"></script>
<script src="~/js/dicts.js"></script>
}
@section query {
<form class="form-inline">
@ -38,7 +38,7 @@
}
@section toolbar {
<div class="toolbar btn-group dropdown">
<button class="btn dropdown-toggle" data-toggle="dropdown" type="button"><i class="fa fa-gear"></i></button>
<button class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" type="button"><i class="fa fa-gear"></i></button>
<div class="dropdown-menu">
@await Html.PartialAsync("_ButtonBarGroup")
</div>
@ -51,26 +51,28 @@
</div>
<div class="modal-body">
<form class="form-inline">
<input type="text" class="form-control d-none" id="dictID" data-default-val="0" />
<div class="form-group col-12">
<label class="control-label" for="dictCate">字典标签</label>
<input type="text" class="form-control form-control-url" id="dictCate" placeholder="不可为空50字以内" maxlength="50" data-valid="true" />
</div>
<div class="form-group col-12">
<label class="control-label" for="dictName">字典名称</label>
<input type="text" class="form-control form-control-url" id="dictName" placeholder="不可为空50字以内" maxlength="50" data-valid="true" />
</div>
<div class="form-group col-12">
<label class="control-label" for="dictCode">字典代码</label>
<input type="text" class="form-control form-control-url" id="dictCode" placeholder="不可为空50字以内" maxlength="50" data-valid="true" />
</div>
<div class="form-group col-12">
<label class="control-label" for="dictDefine">字典类型</label>
<div class="dropdown">
<button id="dictDefine" class="btn btn-success dropdown-select dropdown-toggle" data-toggle="dropdown" data-default-val="1">全部</button>
<div class="dropdown-menu">
<a href="#" data-val="0">系统使用</a>
<a href="#" data-val="1">自定义</a>
<div class="form-row">
<input type="text" class="form-control d-none" id="dictID" data-default-val="0" />
<div class="form-group col-12">
<label class="control-label" for="dictCate">字典标签</label>
<input type="text" class="form-control form-control-url" id="dictCate" placeholder="不可为空50字以内" maxlength="50" data-valid="true" />
</div>
<div class="form-group col-12">
<label class="control-label" for="dictName">字典名称</label>
<input type="text" class="form-control form-control-url" id="dictName" placeholder="不可为空50字以内" maxlength="50" data-valid="true" />
</div>
<div class="form-group col-12">
<label class="control-label" for="dictCode">字典代码</label>
<input type="text" class="form-control form-control-url" id="dictCode" placeholder="不可为空50字以内" maxlength="50" data-valid="true" />
</div>
<div class="form-group col-12">
<label class="control-label" for="dictDefine">字典类型</label>
<div class="dropdown">
<button id="dictDefine" class="btn btn-success dropdown-select dropdown-toggle" data-toggle="dropdown" data-default-val="1">全部</button>
<div class="dropdown-menu">
<a href="#" data-val="0">系统使用</a>
<a href="#" data-val="1">自定义</a>
</div>
</div>
</div>
</div>

View File

@ -14,7 +14,7 @@
<script src="~/js/longbow.dataentity.js"></script>
<script src="~/js/bootstrap-datetimepicker.js"></script>
<script src="~/js/bootstrap-datetimepicker.zh-CN.js"></script>
<script src="~/js/Exceptions.js"></script>
<script src="~/js/exceptions.js"></script>
}
<div class="card">
<div class="card-header">查询条件</div>
@ -58,7 +58,7 @@
<i class="fa fa-file-text-o" aria-hidden="true"></i><span>服务器日志</span>
</button>
<div class="toolbar btn-group dropdown">
<button class="btn dropdown-toggle" data-toggle="dropdown" type="button"><i class="fa fa-gear"></i></button>
<button class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" type="button"><i class="fa fa-gear"></i></button>
<div class="dropdown-menu">
<a id="tb_view" href="#" title="查看明细"><i class="fa fa-file-text-o"></i></a>
</div>
@ -85,7 +85,8 @@
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">
关闭
<i class="fa fa-times"></i>
<span>关闭</span>
</button>
</div>
</div>
@ -109,7 +110,8 @@
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary">
关闭
<i class="fa fa-times"></i>
<span>关闭</span>
</button>
</div>
</div>

View File

@ -4,7 +4,7 @@
Layout = "~/Views/Shared/_Default.cshtml";
}
@section Javascript {
<script src="~/js/Groups.js"></script>
<script src="~/js/groups.js"></script>
}
@section query {
<form class="form-inline">
@ -31,7 +31,7 @@
<span class="fa fa-sitemap" aria-hidden="true"></span><span>分配角色</span>
</button>
<div class="toolbar btn-group">
<button class="btn dropdown-toggle" data-toggle="dropdown" type="button"><i class="fa fa-gear"></i></button>
<button class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" type="button"><i class="fa fa-gear"></i></button>
<div class="dropdown-menu">
@await Html.PartialAsync("_ButtonBarGroup")
<a id="tb_assignRole" href="#" title="分配角色"><i class="fa fa-sitemap"></i></a>

View File

@ -26,7 +26,7 @@
</environment>
<script src="~/js/bootstrap-datetimepicker.zh-CN.js"></script>
<script src="~/js/longbow.dataentity.js"></script>
<script src="~/js/Logs.js"></script>
<script src="~/js/logs.js"></script>
}
<div class="card">
<div class="card-header">查询条件</div>

View File

@ -9,7 +9,7 @@
}
@section Javascript {
<script src="~/js/jquery.nestable.js"></script>
<script src="~/js/Menus.js"></script>
<script src="~/js/menus.js"></script>
}
@section query {
<form class="form-inline">
@ -57,7 +57,7 @@
<span class="fa fa-sitemap" aria-hidden="true"></span><span>分配角色</span>
</button>
<div class="toolbar btn-group">
<button class="btn dropdown-toggle" data-toggle="dropdown" type="button"><i class="fa fa-gear"></i></button>
<button class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" type="button"><i class="fa fa-gear"></i></button>
<div class="dropdown-menu">
@await Html.PartialAsync("_ButtonBarGroup")
<a id="tb_assignRole" href="#" title="分配角色"><i class="fa fa-sitemap"></i></a>
@ -179,9 +179,15 @@
<div class="loadIconView"><i class="fa fa-spinner fa-pulse"></i><span>正在加载图标...请稍等</span></div>
</div>
<div class="modal-footer">
<span>被选择的图标</span><i id="pickIcon"></i>
<button type="button" class="btn" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" id="btnSubmitIcon">保存</button>
<span>被选择的图标</span><i class="fa fa-fa" id="pickIcon"></i>
<button type="button" class="btn btn-secondary" data-dismiss="modal">
<i class="fa fa-times"></i>
<span>关闭</span>
</button>
<button type="button" class="btn btn-primary" id="btnSubmitIcon">
<i class="fa fa-save"></i>
<span>确定</span>
</button>
</div>
</div>
@await Html.PartialAsync("NavigatorConfig")

View File

@ -10,7 +10,7 @@
<div class="sm-side">
<div class="user-head">
<a href="javascript:;" class="inbox-avatar">
<img src="../images/logo6.jpg" alt="">
<img src="~/images/logo6.jpg" alt="">
</a>
<div class="user-name"><h5><a href="#">@Model.DisplayName</a></h5></div>
</div>

View File

@ -1,19 +1,30 @@
@model Bootstrap.Admin.Models.NavigatorBarModel
@model NavigatorBarModel
@{
ViewBag.Title = "通知管理";
Layout = "~/Views/Shared/_Admin.cshtml";
}
@section Javascript {
<script src="~/js/noti.js"></script>
}
@section css {
<link href="~/css/tasks.css" rel="stylesheet" />
<environment include="Development">
<link href="~/css/bootstrap-table.css" rel="stylesheet" />
</environment>
<environment exclude="Development">
<link href="~/css/bootstrap-table.min.css" rel="stylesheet" />
</environment>
}
@section Javascript {
<environment include="Development">
<script src="~/js/bootstrap-table.js"></script>
<script src="~/js/bootstrap-table-zh-CN.js"></script>
</environment>
<environment exclude="Development">
<script src="~/js/bootstrap-table.min.js"></script>
<script src="~/js/bootstrap-table-zh-CN.min.js"></script>
</environment>
<script src="~/js/noti.js"></script>
}
<div class="card">
<div class="card-header">用户注册<span class="pull-right"><a id="refreshUsers" href="javascript:;" class="fa fa-refresh" title="点击刷新" data-toggle="tooltip" data-placement="left"></a></span></div>
<div class="card-body">
<div class="tasks-widget">
<ul id="tasks-users" class="task-list ui-sortable"></ul>
</div>
<div class="card-body" style="padding-top: 25px;">
<table></table>
</div>
</div>

View File

@ -17,7 +17,7 @@
<script src="~/js/fileinput.zh.js"></script>
<script src="~/js/longbow.dataentity.js"></script>
<script src="~/js/longbow.validate.js"></script>
<script src="~/js/Profiles.js"></script>
<script src="~/js/profiles.js"></script>
<script src="~/js/theme.js"></script>
}
@section css {
@ -66,7 +66,7 @@
</div>
<div class="form-group col-sm-6">
<label class="control-label" for="confirmPassword">确认密码: </label>
<input type="password" class="form-control" id="confirmPassword" placeholder="与新密码一致50字以内" maxlength="50" data-valid="true" />
<input type="password" class="form-control" id="confirmPassword" placeholder="与新密码一致50字以内" maxlength="50" equalTo="#newPassword" data-valid="true" />
</div>
</div>
</form>

View File

@ -9,7 +9,7 @@
}
@section Javascript {
<script src="~/js/jquery.nestable.js"></script>
<script src="~/js/Roles.js"></script>
<script src="~/js/roles.js"></script>
}
@section query {
@ -40,7 +40,7 @@
<span class="fa fa-dashboard" aria-hidden="true"></span><span>分配菜单</span>
</button>
<div class="toolbar btn-group">
<button class="btn dropdown-toggle" data-toggle="dropdown" type="button"><i class="fa fa-gear"></i></button>
<button class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" type="button"><i class="fa fa-gear"></i></button>
<div class="dropdown-menu">
@await Html.PartialAsync("_ButtonBarGroup")
<a id="tb_assignUser" href="#" title="分配用户"><i class="fa fa-user"></i></a>

View File

@ -14,7 +14,7 @@
</environment>
<script src="~/js/longbow.dataentity.js"></script>
<script src="~/js/longbow.validate.js"></script>
<script src="~/js/Settings.js"></script>
<script src="~/js/settings.js"></script>
}
<div class="card">
<div class="card-header">系统名称设置</div>

View File

@ -4,7 +4,7 @@
Layout = "~/Views/Shared/_Default.cshtml";
}
@section Javascript {
<script src="~/js/Users.js"></script>
<script src="~/js/users.js"></script>
}
@section query {
<form class="form-inline">
@ -31,7 +31,7 @@
<span class="fa fa-sitemap" aria-hidden="true"></span><span>分配角色</span>
</button>
<div class="toolbar btn-group">
<button class="btn dropdown-toggle" data-toggle="dropdown" type="button"><i class="fa fa-gear"></i></button>
<button class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" type="button"><i class="fa fa-gear"></i></button>
<div class="dropdown-menu">
@await Html.PartialAsync("_ButtonBarGroup")
<a id="tb_assignRole" href="#" title="分配角色"><i class="fa fa-sitemap"></i></a>

View File

@ -11,7 +11,7 @@
</style>
}
@section javascript {
<script src="~/js/Content.js"></script>
<script src="~/js/content.js"></script>
}
<div id="content" class="content-body welcome-bg">
</div>

View File

@ -17,7 +17,7 @@
</button>
<button type="button" class="btn btn-primary" data-dismiss="modal" id="btnSubmitMenu">
<i class="fa fa-save"></i>
<span>保存</span>
<span>确认</span>
</button>
</div>
</div>

View File

@ -39,7 +39,7 @@
</button>
<button type="button" class="btn btn-primary" id="btnSubmit">
<i class="fa fa-save"></i>
<span>提交更改</span>
<span>保存</span>
</button>
</div>
</div>

View File

@ -30,10 +30,10 @@
<script src="~/js/bootstrap.bundle.min.js"></script>
</environment>
<script src="~/js/nprogress.js"></script>
<script src="~/js/Longbow.Common.js"></script>
<script src="~/js/longbow.common.js"></script>
@RenderSection("Javascript", false)
}
@await Html.PartialAsync("Header")
@RenderBody()
@await Html.PartialAsync("Footer")
@RenderSection("modal", false)
@RenderSection("modal", false)

View File

@ -1,4 +1,4 @@
@model Bootstrap.Admin.Models.ModelBase
@model ModelBase
@{
ViewBag.Title = Model.Title;
Layout = "~/Views/Shared/_Root.cshtml";
@ -12,26 +12,99 @@
<link href="~/css/bootstrap.min.css" rel="stylesheet">
<link href="~/css/font-awesome.min.css" rel="stylesheet" />
</environment>
<link href="~/css/sweetalert.css" rel="stylesheet" />
<link href="~/css/theme.css" rel="stylesheet" />
@RenderSection("css", false)
@if (!string.IsNullOrEmpty(Model.Theme))
{
<link href="~/css/@Model.Theme" rel="stylesheet" />
}
}
@section javascript {
<environment include="Development">
<script src="~/js/bootstrap.bundle.js"></script>
<script src="~/js/jquery.validate.js"></script>
<script src="~/js/messages_zh.js"></script>
<script src="~/js/sweetalert.js"></script>
</environment>
<environment exclude="Development">
<script src="~/js/bootstrap.bundle.min.js"></script>
<script src="~/js/jquery.validate.min.js"></script>
<script src="~/js/messages_zh.min.js"></script>
<script src="~/js/sweetalert.min.js"></script>
</environment>
<script src="~/js/Longbow.Common.js"></script>
<script src="~/js/longbow.common.js"></script>
<script src="~/js/longbow.validate.js"></script>
<script src="~/js/login.js"></script>
}
<div class="container">
<form id="login" method="post" class="form-signin">
@await Html.PartialAsync("SignIn")
</form>
@await Html.PartialAsync("SignIn")
<div class="modal fade" id="dialogNew" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
<div class="modal-content" data-toggle="LgbValidate" data-valid-button="#btnSubmit" data-valid-modal="#dialogNew">
<div class="modal-header">
<h5 class="modal-title" id="myModalLabel">新用户注册</h5>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
</div>
<div class="modal-body">
<div class="form-group">
<label for="userName">登陆账号:</label>
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text">
<span class="fa fa-user-plus"></span>
</div>
</div>
<input type="text" id="userName" autocomplete="off" class="form-control" placeholder="登陆账号不可为空" value="" maxlength="50" remote="api/New/" data-remote-msg="此用户已存在" data-valid="true" />
</div>
</div>
<div class="form-group">
<label for="displayName">显示名称:</label>
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text">
<span class="fa fa-user-circle-o"></span>
</div>
</div>
<input type="text" id="displayName" class="form-control" value="" placeholder="显示名称不可为空" maxlength="50" data-valid="true" />
</div>
</div>
<div class="form-group">
<label for="password">密码:</label>
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text">
<span class="fa fa-lock"></span>
</div>
</div>
<input type="password" id="password" class="form-control" value="" placeholder="密码不可为空" maxlength="50" data-valid="true" />
</div>
</div>
<div class="form-group">
<label for="assurePassword">确认密码:</label>
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text">
<span class="fa fa-lock"></span>
</div>
</div>
<input type="password" id="assurePassword" class="form-control" value="" placeholder="确认密码" maxlength="50" equalTo="#password" data-valid="true" />
</div>
</div>
<div class="form-group">
<label for="description">申请理由:</label>
<textarea id="description" class="form-control" placeholder="申请理由500字以内" rows="6" maxlength="500" data-valid="true"></textarea>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">
<i class="fa fa-times"></i>
<span>关闭</span>
</button>
<button type="button" class="btn btn-primary" id="btnSubmit">
<i class="fa fa-save"></i>
<span>提交</span>
</button>
</div>
</div>
</div>
</div>

View File

@ -18,7 +18,7 @@
</div>
<![endif]-->
@RenderBody()
<a id="pathBase" href="~/" class="hidden"></a>
<a id="pathBase" href="~/" hidden></a>
<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<environment include="Development">
<script src="~/js/jquery-3.3.1.js"></script>

View File

@ -5,9 +5,20 @@
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
},
"LgbFile": {
"IncludeScopes": true,
"LogLevel": {
"Default": "Error"
},
"FileName": "Error\\Log.log"
}
},
"KeyPath": "C:\\keys",
"ConnectionStrings": {
"ba": "Data Source=.;Initial Catalog=BootstrapAdmin;User ID=sa;Password=sa"
},
"KeyPath": "keys",
"DisableAutomaticKeyGeneration": false,
"AllowOrigins": "http://localhost:49823",
"LongbowCache": {
"CorsItems": [

View File

@ -15,7 +15,10 @@
"ConnectionStrings": {
"ba": "Data Source=.;Initial Catalog=BootstrapAdmin;User ID=sa;Password=sa"
},
"ApplicationName": "__bd__",
"ApplicationDiscriminator": "BootstrapAdmin",
"KeyPath": "D:\\App\\Web-App\\keys",
"DisableAutomaticKeyGeneration": true,
"AllowOrigins": "http://localhost,http://10.15.63.218",
"LongbowCache": {
"Enabled": true,

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<key id="82d748ff-6805-478e-874b-3b2bc18f0d5e" version="1">
<creationDate>2018-08-09T03:55:32.53885Z</creationDate>
<activationDate>2018-08-09T03:55:32.385151Z</activationDate>
<expirationDate>2018-11-07T03:55:32.385151Z</expirationDate>
<descriptor deserializerType="Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60">
<descriptor>
<encryption algorithm="AES_256_CBC" />
<validation algorithm="HMACSHA256" />
<masterKey p4:requiresEncryption="true" xmlns:p4="http://schemas.asp.net/2015/03/dataProtection">
<!-- Warning: the key below is in an unencrypted form. -->
<value>MdM3yzqgpecEwWKQIisJTzvrrl8TEUCvbzhGz3xc2LWloldqlcOyZKTZUy71RjxDIlqdb7muunyvlOCiw/Fv5A==</value>
</masterKey>
</descriptor>
</descriptor>
</key>

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<key id="e6fbc37c-30c9-4a54-baa5-1ae2c56f776a" version="1">
<creationDate>2018-08-06T10:17:52.873305Z</creationDate>
<activationDate>2018-08-06T10:17:52.799718Z</activationDate>
<expirationDate>2018-11-04T10:17:52.799718Z</expirationDate>
<descriptor deserializerType="Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60">
<descriptor>
<encryption algorithm="AES_256_CBC" />
<validation algorithm="HMACSHA256" />
<masterKey p4:requiresEncryption="true" xmlns:p4="http://schemas.asp.net/2015/03/dataProtection">
<!-- Warning: the key below is in an unencrypted form. -->
<value>YkYwkjCOjQmSL6HOYCTXiqz9C7dz5hT7Nh7UjL+csdF9oU3EfJEOJlZRX+DnEh8yZK8+mN1F5qqttnGkP+jXwA==</value>
</masterKey>
</descriptor>
</descriptor>
</key>

View File

@ -6,6 +6,7 @@
background-color: #5899c8;
border-color: #3581b8;
color: #fff;
border-radius: 4px 4px 0 0;
}
.card-header a, .modal-header a {

View File

@ -124,22 +124,20 @@
white-space: nowrap;
}
.icon-content .modal-footer span {
vertical-align: middle;
font-size: 14px;
.icon-content .modal-footer > span {
color: #000;
}
.icon-content .modal-footer i {
vertical-align: middle;
.icon-content .modal-footer > i {
font-size: 22px;
margin: 0 4px 0 8px;
text-align: center;
color: #337ab7;
display: inline-block;
border: solid 1px;
padding: 3px;
border-radius: 4px;
min-width: 36px;
min-height: 34px;
display: flex;
align-items: center;
justify-content: center;
}
.icon-content .modal-footer span {

View File

@ -19,22 +19,14 @@
}
.login-wrap {
margin: 22px 0 0 370px;
margin: 36px 0 0 370px;
width: 280px;
height: 200px;
}
.login-wrap .login-footer {
padding-bottom: 15px;
}
.login-wrap .login-footer .login-create {
float: left;
}
.login-wrap .login-footer .login-reset {
float: right;
}
.login-footer a:last-child {
float: right;
}
.btn-login {
background: #f67a6e;

View File

@ -25,17 +25,9 @@
padding: 20px;
}
.login-wrap .login-footer {
padding-bottom: 15px;
}
.login-wrap .login-footer .login-create {
float: left;
}
.login-wrap .login-footer .login-reset {
float: right;
}
.login-footer a:last-child {
float: right;
}
.btn-login {
background: #f67a6e;

View File

@ -1,174 +0,0 @@
header h2 {
text-align: center;
}
h3 {
margin-bottom: 20px;
}
ol {
display: block;
list-style-type: decimal;
-webkit-margin-before: 1em;
-webkit-margin-after: 1em;
-webkit-margin-start: 0px;
-webkit-margin-end: 0px;
-webkit-padding-start: 40px;
}
input.is-invalid {
background-repeat: no-repeat;
background-image: url('../images/error.png');
background-position: right 8px center;
}
input.is-valid {
background-repeat: no-repeat;
background-image: url('../images/success.png');
background-position: right 8px center;
}
.setup-wrapper {
margin: 0 auto;
}
form input {
padding-right: 30px !important;
}
.setup-header {
margin: 0 auto;
text-align: left;
}
.setup-main, .setup-confirm {
float: left;
width: 450px;
}
.setup-confirm {
display: none;
}
.setup-confirm h4 {
padding: 6px 0;
}
.setup-main span {
top: 0;
}
.setup-main .input-group {
margin-bottom: 15px;
}
.setup-secondary {
display: inline-block;
float: right;
width: 250px;
margin-top: 70px;
}
.setup-info-module {
margin-bottom: 30px;
background-color: #fff;
border: 1px solid #ccc;
border-radius: 3px;
box-shadow: 0 1px 3px rgba(0,0,0,0.075);
}
.setup-info-module h4 {
padding: 15px;
margin-bottom: 15px;
overflow: hidden;
border-bottom: 1px solid #ddd;
margin-top: 0;
background-color: #5cb85c;
color: #000;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
}
.features-list {
padding: 0 15px 15px;
margin: 0;
font-size: 14px;
list-style: none;
}
.features-list li:first-child {
margin-top: 0;
}
.features-list li {
margin-top: 10px;
}
.features-list li strong {
font-weight: 600;
}
.features-list li i {
margin-right: 5px;
color: #60b044;
}
.features-list .list-divider {
margin: 15px -15px;
border-top: 1px solid #eee;
}
.steps {
display: table;
width: 100%;
padding: 0;
margin: 30px auto 0;
overflow: hidden;
list-style: none;
border: 1px solid #ddd;
border-radius: 3px;
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.steps li:first-child {
border-left: 0;
}
.steps li.current {
color: #000;
background-color: #5cb85c;
}
.steps li {
display: table-cell;
width: 50%;
padding: 10px 15px;
color: #ccc;
cursor: default;
background-color: #fafafa;
border-left: 1px solid #ddd;
}
.steps li .step {
display: block;
}
@media (max-width: 767px) {
.steps {
display: inherit;
}
.steps li {
display: inherit;
width: inherit;
}
.setup-secondary {
display: none;
}
.setup-main, .setup-confirm {
float: inherit;
width: inherit;
}
}

View File

@ -14,6 +14,10 @@ ul li {
list-style: none;
}
.modal-body .dd {
margin-bottom: 15px;
}
a, a:hover, a:focus {
text-decoration: none;
outline: none;
@ -71,6 +75,7 @@ a, a:hover, a:focus {
border-radius: 4px;
padding: 6px 12px;
color: #777;
transition: all .25s linear;
}
.header [data-toggle="dropdown"]:hover {
@ -113,6 +118,9 @@ a, a:hover, a:focus {
.nav .dropdown-footer {
padding: 6px 0;
background-color: #f1f2f7;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
}
.nav .dropdown-item {
@ -122,6 +130,10 @@ a, a:hover, a:focus {
font-size: 0.75rem;
}
.nav .dropdown-item:nth-of-type(odd) {
background-color: #F7F8F9;
}
.nav .dropdown-item:hover {
background-color: #93c9e8;
}
@ -273,20 +285,25 @@ label.dropdown-item:first-child {
font-weight: bold;
color: #0077de;
background-color: #b5f1b6;
padding: 10px 15px;
padding: 12px 15px;
border-radius: 4px 4px 0 0;
margin-bottom: 0;
}
.cache-item {
display: flex;
align-items: center;
padding: 6px 4px 10px 4px;
margin-bottom: 4px;
padding: 10px 4px;
border-bottom: 1px solid #EBEBEB;
}
.cache-item:nth-of-type(odd) {
background-color: #F7F8F9;
}
.cache-item:last-child {
border-bottom: none;
margin-bottom: 15px;
}
.cache-item > :not(:first-child) {
@ -322,7 +339,7 @@ label.dropdown-item:first-child {
line-height: normal;
}
.cache-item .btn {
.cache-item .btn, td .btn:not(.btn-lg) {
margin-left: 5px;
font-size: 0.75rem;
padding: 1px 5px;

View File

@ -12,6 +12,11 @@
box-shadow: none !important;
}
.input-group .btn:not(.btn-secondary) {
background-color: #e9ecef;
border-color: #ced4da;
}
.close:focus {
outline: none;
}
@ -103,10 +108,22 @@ input.pending {
}
/*Bootstrap Table BUG */
.bootstrap-table .table thead > tr > th {
border-top: none;
}
.fixed-table-toolbar .bs-bars, .fixed-table-toolbar .search, .fixed-table-toolbar .columns {
line-height: normal;
}
.table-condensed > thead > tr > th, .table-condensed > tbody > tr > th, .table-condensed > tfoot > tr > th, .table-condensed > thead > tr > td, .table-condensed > tbody > tr > td, .table-condensed > tfoot > tr > td {
padding: 5px;
}
.datetimepicker table tr td span {
white-space: nowrap;
}
.card-view:not(:last-child) {
margin-bottom: 6px;
}

View File

@ -1,3 +0,0 @@
$(function () {
$(".container").autoCenter();
})

View File

@ -84,48 +84,47 @@
$('#logoutNoti').text(result.NewUsersCount);
that.resetWidget();
// tasks
// new users
$('#msgHeaderTask').text(result.TasksCount);
$('#msgHeaderTaskBadge').text(result.TasksCount);
var htmlUserTemplate = '<a class="dropdown-item" href="../Admin/Tasks?id={3}"><span class="desc">{0}-{2}</span><span class="percent">{1}%</span></span><div class="progress progress-striped"><div class="progress-bar" role="progressbar" aria-valuenow="{1}" aria-valuemin="0" aria-valuemax="100" style="width: {1}%"><span class="sr-only">{1}% 完成</span></div></div></a>';
var htmlUserTemplate = '<a class="dropdown-item" href="{4}?id={3}"><span class="desc">{0}-{2}</span><span class="percent">{1}%</span></span><div class="progress progress-striped"><div class="progress-bar" role="progressbar" aria-valuenow="{1}" aria-valuemin="0" aria-valuemax="100" style="width: {1}%"><span class="sr-only">{1}% 完成</span></div></div></a>';
var html = result.Tasks.map(function (u) {
return $.format(htmlUserTemplate, u.TaskName, u.TaskProgress, u.AssignDisplayName, u.Id);
return $.format(htmlUserTemplate, u.TaskName, u.TaskProgress, u.AssignDisplayName, u.Id, $.formatUrl('Admin/Tasks'));
}).join('');
$(html).insertAfter($('#msgHeaderTaskContent'));
// new users
$('#msgHeaderUser').text(result.NewUsersCount);
$('#msgHeaderUserBadge').text(result.NewUsersCount);
htmlUserTemplate = '<li><a href="../Admin/Notifications"><span class="label label-success"><i class="fa fa-plus"></i></span><div title="{2}" class="content">{1}({0})</div><span class="small italic">{3}</span></a></li>';
htmlUserTemplate = '<a class="dropdown-item" href="{4}"><span class="label label-success"><i class="fa fa-plus"></i></span><div title="{2}" class="content">{1}({0})</div><span class="small italic">{3}</span></a>';
html = result.Users.map(function (u) {
return $.format(htmlUserTemplate, u.UserName, u.DisplayName, u.Description, u.Period);
return $.format(htmlUserTemplate, u.UserName, u.DisplayName, u.Description, u.Period, $.formatUrl('Admin/Notifications'));
}).join('');
$(html).insertAfter($('#msgHeaderUserContent'));
// apps
$('#msgHeaderApp').text(result.AppExceptionsCount);
$('#msgHeaderAppBadge').text(result.AppExceptionsCount);
htmlUserTemplate = '<a class="dropdown-item" href="../Admin/Exceptions"><span class="label label-warning"><i class="fa fa-bug"></i></span><div title="{1}" class="content">{0}</div><span class="small italic">{2}</span></a>';
htmlUserTemplate = '<a class="dropdown-item" href="{3}"><span class="label label-warning"><i class="fa fa-bug"></i></span><div title="{1}" class="content">{0}</div><span class="small italic">{2}</span></a>';
html = result.Apps.map(function (u) {
return $.format(htmlUserTemplate, u.ExceptionType, u.Message, u.Period);
return $.format(htmlUserTemplate, u.ExceptionType, u.Message, u.Period, $.formatUrl('Admin/Exceptions'));
}).join('');
$(html).insertAfter($('#msgHeaderAppContent'));
// dbs
$('#msgHeaderDb').text(result.DbExceptionsCount);
$('#msgHeaderDbBadge').text(result.DbExceptionsCount);
htmlUserTemplate = '<a class="dropdown-item" href="../Admin/Exceptions"><span class="label label-danger"><i class="fa fa-bolt"></i></span><div title="{1}" class="content">{0}</div><span class="small italic">{2}</span></a>';
htmlUserTemplate = '<a class="dropdown-item" href="{3}"><span class="label label-danger"><i class="fa fa-bolt"></i></span><div title="{1}" class="content">{0}</div><span class="small italic">{2}</span></a>';
html = result.Dbs.map(function (u) {
return $.format(htmlUserTemplate, u.ErrorPage, u.Message, u.Period);
return $.format(htmlUserTemplate, u.ErrorPage, u.Message, u.Period, $.formatUrl('Admin/Exceptions'));
}).join('');
$(html).insertAfter($('#msgHeaderDbContent'));
// messages
$('#msgHeaderMsg').text(result.MessagesCount);
$('#msgHeaderMsgBadge').text(result.MessagesCount);
htmlUserTemplate = '<li><a href="../Admin/Messages?id={0}"><span class="photo"><img alt="avatar" src="{1}"></span><span class="subject"><span class="from">{2}</span><span class="time">{4}</span></span><span class="message" title="{5}">{3}</span></a></li>';
htmlUserTemplate = '<a class="dropdown-item" href="{6}?id={0}"><span class="photo"><img alt="avatar" src="{1}"></span><span class="subject"><span class="from">{2}</span><span class="time">{4}</span></span><span class="message" title="{5}">{3}</span></a>';
html = result.Messages.map(function (u) {
return $.format(htmlUserTemplate, u.Id, u.FromIcon, u.FromDisplayName, u.Title, u.Period, u.Content);
return $.format(htmlUserTemplate, u.Id, u.FromIcon, u.FromDisplayName, u.Title, u.Period, u.Content, $.formatUrl('Admin/Messages'));
}).join('');
$(html).insertAfter($('#msgHeaderMsgContent'));
}

View File

@ -0,0 +1,27 @@
$(function () {
$(".container").autoCenter();
$("a[data-method]").on('click', function () {
var $this = $(this);
switch ($this.attr("data-method")) {
case "register":
$("#dialogNew").modal('show');
break;
case "forgot":
break;
}
});
$('#btnSubmit').on('click', function () {
$.bc({
url: 'api/New',
data: { UserName: $('#userName').val(), Password: $('#password').val(), DisplayName: $('#displayName').val(), Description: $('#description').val() },
modal: '#dialogNew',
swal: false,
callback: function (result) {
var title = result ? "提交成功<br/>等待管理员审批" : "提交失败";
swal({ html: true, showConfirmButton: false, showCancelButton: false, timer: 1500, title: title, type: result ? "success" : "error" });
}
});
});
})

View File

@ -189,7 +189,7 @@
},
lgbSwal: function (options) {
if ($.isFunction(swal)) {
swal($.extend({ showConfirmButton: false, showCancelButton: false, timer: 1000, title: '未设置', type: "success" }, options));
swal($.extend({ html: true, showConfirmButton: false, showCancelButton: false, timer: 1000, title: '未设置', type: "success" }, options));
}
},
getUID: function (prefix) {
@ -216,6 +216,7 @@
return this;
},
formatUrl: function (url) {
if (!url) return url;
if (url.substr(0, 4) == "http") return url;
var base = $('#pathBase').attr('href');
return base + url;

View File

@ -176,7 +176,7 @@
Validate.prototype.check = function (element) {
var result = true;
var $this = $(element);
if ($this.is(':hidden')) return result;
var methods = this.rules(element);
for (var rule in methods) {
if ($.isFunction($.validator.methods[rule])) {

View File

@ -150,6 +150,8 @@
$btnPickIcon.on('click', function () {
$dialogNew.find('[data-toggle="LgbValidate"] [aria-describedby]').tooltip('hide');
$dialogNew.hide();
var icon = $inputIcon.val();
if (icon) $pickIcon.attr('class', icon);
$dialogIcon.show();
});

View File

@ -1,40 +1,35 @@
$(function () {
var $btnRefreshUser = $('#refreshUsers');
var htmlNewUsersHeader = '<li class="task-header"><div class="task-title notifi"><span class="task-title-sp">登陆名称</span><span class="task-value">显示名称/备注</span><span class="task-time">注册时间</span><div class="pull-right task-oper">操作</div></div></li>';
var htmlNewUsers = '<li class="list-primary"><i class="fa fa-ellipsis-v"></i><div class="task-title notifi"><span class="task-title-sp">{0}</span><span class="task-value">{4}{1}</span><span class="task-time">{2}</span><div class="pull-right hidden-phone"><button class="btn btn-success btn-xs fa fa-check" data-toggle="tooltip" data-id="{3}" data-result="1" title="同意授权"></button><button class="btn btn-danger btn-xs fa fa-remove" data-toggle="tooltip" data-id="{3}" data-result="0" title="拒绝授权"></button></div></div></li>';
function listData() {
$btnRefreshUser.toggleClass('fa-spin');
var $taskUsers = $('#tasks-users');
$taskUsers.html(htmlNewUsersHeader);
$.bc({
Id: 'newusers', url: Notifications.url, method: 'GET', swal: false,
callback: function (result) {
if (result) {
var content = result.Users.map(function (noti) {
return $.format(htmlNewUsers, noti.UserName, noti.Description, noti.RegisterTime, noti.Id, noti.DisplayName);
}).join('');
$taskUsers.append(content);
$('#tasks-users').find('[data-toggle="tooltip"]').tooltip();
var $table = $('table').smartTable({
url: Notifications.url + "newusers",
sidePagination: "client",
showToggle: false,
showRefresh: false,
showColumns: false,
columns: [
{ title: "登陆名称", field: "UserName" },
{ title: "显示名称", field: "DisplayName" },
{ title: "说明信息", field: "Description" },
{ title: "注册时间", field: "RegisterTime" },
{
title: "操作", field: "Id", formatter: function (value, row, index, field) {
return $.format('<button class="btn btn-success" data-toggle="tooltip" data-id="{0}" data-result="1" title="同意授权"><i class="fa fa-check"></i></button> <button class="btn btn-danger" data-toggle="tooltip" data-id="{0}" data-result="0" title="拒绝授权"><i class="fa fa-remove"></i></button>', value);
}
$btnRefreshUser.toggleClass('fa-spin');
}
]
}).on('click', 'button[data-id]', function () {
var $this = $(this);
var id = $this.attr('data-id');
var result = $this.attr('data-result');
$.bc({
id: id, url: User.url, method: "PUT", data: { type: "user", userIds: result }, title: result == "1" ? "授权用户" : "拒绝用户",
callback: function (result) {
$table.bootstrapTable('refresh');
$.pullNotification($('.header .nav').reloadWidget());
}
});
}
listData();
$btnRefreshUser.tooltip().on('click', function () {
listData();
});
$('#tasks-users').on('click', 'button', function () {
var id = $(this).attr('data-id');
var result = $(this).attr('data-result');
$.bc({
Id: id, url: User.url, method: "PUT", data: { type: "user", userIds: result }, title: result == "1" ? "授权用户" : "拒绝用户",
callback: function (result) {
listData({ ctl: $('#refreshUsers') });
}
});
$('#refreshUsers').tooltip().on('click', function () {
$table.bootstrapTable('refresh');
});
});

View File

@ -1,19 +0,0 @@
$(function () {
$('#btnAccount').click(function () {
var valid = $('form').valid();
if (valid) {
$('.setup-main').hide();
$('.steps li').toggleClass('current');
$('#loginID').text($('#userName').val());
$('#loginName').text($('#displayName').val());
$('#loginDesc').text($('#description').val());
$('.setup-confirm').show();
}
});
$('#btnPrev').click(function () {
$('.steps li').toggleClass('current');
$('.setup-main').show();
$('.setup-confirm').hide();
});
});

View File

@ -72,7 +72,7 @@
swal: false,
callback: function (result) {
if ($.isArray(result)) {
var html = '<div class="cache-item"><i class="fa fa-ellipsis-v"></i><div><span data-toggle="tooltip" title="{2}">{2}</span><span class="badge badge-pill badge-success">{0}</span></div><span title="{3}">{3}</span><div><span>{7}</span><button class="btn btn-danger btn-xs" title="{1}" data-url="{5}?cacheKey={1}" data-toggle="tooltip" data-self="{6}" data-placement="left"><i class="fa fa-trash-o"></i></button></div></div>';
var html = '<div class="cache-item"><i class="fa fa-ellipsis-v"></i><div><span data-toggle="tooltip" title="{2}">{2}</span><span class="badge badge-pill badge-success">{0}</span></div><span title="{3}">{3}</span><div><span>{7}</span><button class="btn btn-danger" title="{1}" data-url="{5}?cacheKey={1}" data-toggle="tooltip" data-self="{6}" data-placement="left"><i class="fa fa-trash-o"></i></button></div></div>';
var content = result.sort(function (x, y) {
return x.Key > y.Key ? 1 : -1;
}).map(function (ele) {