-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add slider alignment support. Now slider related to some widget zone displays with alignment. Plugin supports: left side, centered and right side alignments. Adds: - localization values for enums; - update method to install database changes;
- Loading branch information
1 parent
2aabdd7
commit 236bc09
Showing
14 changed files
with
162 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using FluentMigrator; | ||
using Nop.Data.Migrations; | ||
using Nop.Plugin.Widgets.qBoSlider.Domain; | ||
|
||
namespace Nop.Plugin.Widgets.qBoSlider.Migrations | ||
{ | ||
[NopMigration("2023/09/12 15:33:23:6455432", "Baroque. qBoSlider. Add slider alignment property for widget zones", MigrationProcessType.Update)] | ||
public partial class AddSliderAlignmentMigration : AutoReversingMigration | ||
{ | ||
public override void Up() | ||
{ | ||
Create.Column(nameof(WidgetZone.SliderAlignmentId)) | ||
.OnTable(nameof(WidgetZone)) | ||
.AsInt32() | ||
.NotNullable() | ||
.WithDefaultValue(5); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
@model WidgetZoneModel | ||
@using Nop.Plugin.Widgets.qBoSlider; | ||
@model WidgetZoneModel | ||
@{ | ||
Layout = ""; | ||
//Html.AddScriptParts(ResourceLocation.Footer, "~/Plugins/Widgets.qBoSlider/Scripts/jssor.js"); | ||
|
@@ -8,11 +9,26 @@ | |
nopHtml.AddCssFileParts("~/Plugins/Widgets.qBoSlider/Content/slider.css"); | ||
|
||
string autoPlay = Model.AutoPlay ? "True" : string.Empty; | ||
string alignment = string.Empty; | ||
switch(Model.AlignmentId) | ||
{ | ||
case (int)SliderAlignment.Left: | ||
alignment = "margin-right: auto;"; | ||
break; | ||
case (int)SliderAlignment.Center: | ||
alignment = "margin-left: auto; margin-right: auto;"; | ||
break; | ||
case (int)SliderAlignment.Right: | ||
alignment = "margin-left: auto;"; | ||
break; | ||
default: | ||
break; | ||
} | ||
} | ||
@using Nop.Web.Framework.UI | ||
|
||
|
||
<div class="slider-container" id="[email protected]"> | ||
<div class="slider-container" id="[email protected]" style="@alignment"> | ||
<div u="loading" id="slider-loading"> | ||
<div id="slider-loading-background"> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters