-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
IF NOT EXISTS ( SELECT 1 | ||
FROM sys.syscolumns | ||
WHERE id = OBJECT_ID(N'Navigation') | ||
AND name = N'IsMobile' ) | ||
BEGIN | ||
ALTER TABLE dbo.Navigation ADD IsMobile BIT NULL; | ||
END; | ||
GO | ||
IF NOT EXISTS ( SELECT 1 | ||
FROM dbo.Language | ||
WHERE LanKey = N'NavigationEntity@IsMobile' ) | ||
BEGIN | ||
INSERT INTO dbo.Language | ||
( LanKey , | ||
LanID , | ||
LanValue , | ||
Module , | ||
LanType | ||
) | ||
VALUES ( N'NavigationEntity@IsMobile' , | ||
2052 , | ||
N'ÊÖ»úµ¼º½' , | ||
N'NavigationEntity' , | ||
N'EntityProperty' | ||
); | ||
END; | ||
GO |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,33 @@ | ||
@using System.Text.RegularExpressions | ||
@model Easy.CMS.Common.Models.VideoWidget | ||
|
||
@if (Model.Url.IsNotNullAndWhiteSpace()) | ||
{ | ||
<video controls="controls" | ||
name="media" | ||
src="@Url.Content(Model.Url)" | ||
style="width:@(Model.Width.HasValue?Model.Width+"px":"auto");height:@(Model.Height.HasValue?Model.Height+"px":"auto")"> | ||
您的浏览器不支持播放该视频 | ||
</video> | ||
} | ||
else if (Model.Code.IsNotNullAndWhiteSpace()) | ||
{ | ||
if (Model.Width.HasValue) | ||
<div class="widget-video"> | ||
@if (Model.Url.IsNotNullAndWhiteSpace()) | ||
{ | ||
Model.Code = Regex.Replace(Model.Code, @"width=""(\d+)""", "width=\"" + Model.Width + "\""); | ||
Model.Code = Regex.Replace(Model.Code, @"width=(\d+)", "width=" + Model.Width); | ||
Model.Code = Regex.Replace(Model.Code, @"width:(\d+)", "width:" + Model.Width); | ||
<video controls="controls" | ||
name="media" | ||
src="@Url.Content(Model.Url)" | ||
style="width:@(Model.Width.HasValue?Model.Width+"px":"auto");height:@(Model.Height.HasValue?Model.Height+"px":"auto")"> | ||
您的浏览器不支持播放该视频 | ||
</video> | ||
} | ||
else | ||
else if (Model.Code.IsNotNullAndWhiteSpace()) | ||
{ | ||
Model.Code = Regex.Replace(Model.Code, @"width=""(\d+)""", "width=\"100%\""); | ||
Model.Code = Regex.Replace(Model.Code, @"width=(\d+)", "width=100%"); | ||
Model.Code = Regex.Replace(Model.Code, @"width:(\d+)", "width:100%"); | ||
if (Model.Width.HasValue) | ||
{ | ||
Model.Code = Regex.Replace(Model.Code, @"("")?width("")?=("")?(\d+)("")?", "width=\"" + Model.Width.Value + "\""); | ||
Model.Code = Regex.Replace(Model.Code, @"("")?width("")?:("")?(\d+)("")?", "width:" + Model.Width); | ||
} | ||
else | ||
{ | ||
Model.Code = Regex.Replace(Model.Code, @"("")?width("")?=("")?(\d+)("")?", "width=\"100%\""); | ||
Model.Code = Regex.Replace(Model.Code, @"width:(\d+)(px|%)", "width:100%"); | ||
} | ||
if (Model.Height.HasValue) | ||
{ | ||
Model.Code = Regex.Replace(Model.Code, @"("")?height("")?=("")?(\d+)("")?", "height=" + Model.Height.Value); | ||
Model.Code = Regex.Replace(Model.Code, @"("")?height("")?:("")?(\d+)("")?", "height:" + Model.Height.Value); | ||
} | ||
@Html.Raw(Model.Code) | ||
} | ||
if (Model.Height.HasValue) | ||
{ | ||
Model.Code = Regex.Replace(Model.Code, @"height=""(\d+)""", "height=\"" + Model.Height + "\""); | ||
Model.Code = Regex.Replace(Model.Code, @"height=(\d+)", "height=" + Model.Height); | ||
Model.Code = Regex.Replace(Model.Code, @"height:(\d+)", "height:" + Model.Height); | ||
} | ||
@Html.Raw(Model.Code) | ||
} | ||
</div> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Large diffs are not rendered by default.