Skip to content

Commit

Permalink
* Html to Pdf converter (5)
Browse files Browse the repository at this point in the history
* Fixes #577
  • Loading branch information
muratcakir committed Jan 7, 2015
1 parent 13dbd5d commit 8c8d55f
Show file tree
Hide file tree
Showing 16 changed files with 420 additions and 203 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* #538 Spcification attribute labels in product filter mask are not displayed localized
* #540 AmazonPay: Multistore configuration might be lost if "All stores" are left empty
* #532 AmazonPay: Reflect refunds made at amazon seller central when using data polling
* #577 Exception thrown because of missing TaxRate table when opening tax by region provider configuration
* Added IIS rewrite rule for `/productreviews/{id}` > `/product/reviews/{id}`
* Email a friend redirects to "not found"
* #567 Products marked as 'Featured' should also be included in regular lists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public virtual void InitializeDatabase(TContext context)
// prior integrating EF Migrations.
// Running the Migrator with initial DDL would crash in this case as
// the db objects exist already. Therefore we set a suppression flag
// which we read in the corresposnding InitialMigration to exit early.
// which we read in the corresponding InitialMigration to exit early.
DbMigrationContext.Current.SetSuppressInitialCreate<TContext>(true);
}
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Plugins/SmartStore.Tax/SmartStore.Tax.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'EFMigrations|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\EFMigrations\</OutputPath>
<OutputPath>..\..\Presentation\SmartStore.Web\bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down
10 changes: 0 additions & 10 deletions src/Plugins/SmartStore.Tax/web.config
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- We use this file to make razor intellisense work in the class library -->
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<appSettings>
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" />
Expand Down Expand Up @@ -118,10 +114,4 @@
</dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
</configuration>
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;

namespace SmartStore.Web.Framework.Controllers
{
Expand All @@ -22,31 +16,17 @@ namespace SmartStore.Web.Framework.Controllers
public class AdminThemedAttribute : ActionFilterAttribute
{

public override void OnActionExecuted(ActionExecutedContext filterContext)
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
if (filterContext == null)
return;

// add extra view location formats to all view results (even the partial ones)
var viewResultBase = filterContext.Result as ViewResultBase;
if (viewResultBase != null)
filterContext.RouteData.DataTokens["ExtraAreaViewLocations"] = new string[]
{
filterContext.RouteData.DataTokens["ExtraAreaViewLocations"] = new string[]
{
"~/Administration/Views/{1}/{0}.cshtml",
"~/Administration/Views/Shared/{0}.cshtml"
};
}

//// set MasterName (aka Layout) to view results if not explicitly specified
//if (!filterContext.IsChildAction)
//{
// var viewResult = filterContext.Result as ViewResult;
// if (viewResult != null && viewResult.MasterName.IsEmpty())
// {
// viewResult.MasterName = "_AdminLayout";
// }
//}
"~/Administration/Views/{1}/{0}.cshtml",
"~/Administration/Views/Shared/{0}.cshtml"
};
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,7 @@ public ActionResult Create(ProductModel model, bool continueEditing, FormCollect
product.AllowCustomerReviews = true;
product.Published = true;
product.VisibleIndividually = true;
product.MaximumCustomerEnteredPrice = 1000;

if (product.ProductType == ProductType.BundledProduct)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
$("#@Html.FieldIdFor(model => model.ProductTypeId)").change(toggleProductType);
$("#@Html.FieldIdFor(model => model.RequireOtherProducts)").click(toggleRequireOtherProducts);
$("#@Html.FieldIdFor(model => model.IsGiftCard)").click(toggleGiftCard);
$("#@Html.FieldIdFor(model => model.CustomerEntersPrice)").click(toggleCustomerEntersPrice);
$("#@Html.FieldIdFor(model => model.IsDownload)").click(toggleDownloadableProduct);
$("#@Html.FieldIdFor(model => model.UnlimitedDownloads)").click(toggleDownloadableProduct);
$("#@Html.FieldIdFor(model => model.HasSampleDownload)").click(toggleDownloadableProduct);
Expand All @@ -30,7 +29,6 @@
toggleProductType();
toggleRequireOtherProducts();
toggleGiftCard();
toggleCustomerEntersPrice();
toggleDownloadableProduct();
toggleRecurring();
toggleShipping();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
var fieldBasePriceBaseAmount;
$(function () {
$("#@Html.FieldIdFor(model => model.CustomerEntersPrice)").click(toggleCustomerEntersPrice);
$("#@Html.FieldIdFor(model => model.BasePriceEnabled)").click(toggleBasePrice);
fieldBasePriceMeasureUnit = $("#@Html.FieldIdFor(model => model.BasePriceMeasureUnit)");
Expand All @@ -19,6 +20,7 @@
fieldBasePriceAmount.on("blur", getCurrentBasePrice);
fieldBasePriceBaseAmount.on("blur", getCurrentBasePrice);
toggleCustomerEntersPrice();
getCurrentBasePrice();
toggleBasePrice();
Expand All @@ -34,27 +36,39 @@
"basePriceAmount": fieldBasePriceAmount.val(),
"basePriceBaseAmount": fieldBasePriceBaseAmount.val()
},
success: function (data) {
$("#BasePriceAmountInfo").html(data.BasePrice);
},
error: function (xhr, ajaxOptions, thrownError){
alert(thrownError);
}
});
success: function (data) {
$("#BasePriceAmountInfo").html(data.BasePrice);
},
error: function (xhr, ajaxOptions, thrownError){
alert(thrownError);
}
});
}
return false;
}
return false;
}
function toggleBasePrice() {
if ($('#@Html.FieldIdFor(model => model.BasePriceEnabled)').is(':checked')) {
$('#pnlBasePriceBaseAmount').show();
$('#pnlBasePriceAmount').show();
function toggleBasePrice() {
if ($('#@Html.FieldIdFor(model => model.BasePriceEnabled)').is(':checked')) {
$('#pnlBasePriceBaseAmount').show();
$('#pnlBasePriceAmount').show();
}
else {
$('#pnlBasePriceBaseAmount').hide();
$('#pnlBasePriceAmount').hide();
}
}
else {
$('#pnlBasePriceBaseAmount').hide();
$('#pnlBasePriceAmount').hide();
function toggleCustomerEntersPrice() {
var src = $('#@Html.FieldIdFor(model => model.CustomerEntersPrice)');
if (src.is(':checked')) {
$('#pnlMinimumCustomerEnteredPrice').show();
$('#pnlMaximumCustomerEnteredPrice').show();
}
else {
$('#pnlMinimumCustomerEnteredPrice').hide();
$('#pnlMaximumCustomerEnteredPrice').hide();
}
}
}
})
</script>

Expand Down
Loading

0 comments on commit 8c8d55f

Please sign in to comment.