Fixing template source file information

--HG--
branch : dev
This commit is contained in:
Sebastien Ros
2011-03-24 21:28:43 -07:00
parent 5dcbffd3a2
commit 00e7ee7ff3
2 changed files with 6 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
(function ($) {
jQuery(document).ready(function ($) {
$(function () {
// append the shape tracing window container at the end of the document
$('<div id="shape-tracing-container"> ' +
@@ -405,4 +405,4 @@
return node;
}
})(jQuery);
});

View File

@@ -1,4 +1,5 @@
using System.IO;
using System.Linq;
using System.Web.Routing;
using System.Xml;
using Orchard.DisplayManagement.Descriptors;
@@ -96,11 +97,11 @@ namespace Orchard.DesignerTools.Services {
context.Shape._Dump = sw.ToString();
}
shape.Template = descriptor.BindingSource;
shape.Template = descriptor.Bindings.Values.FirstOrDefault().BindingSource;
try {
if (_webSiteFolder.FileExists(descriptor.BindingSource)) {
shape.TemplateContent = _webSiteFolder.ReadFile(descriptor.BindingSource);
if (_webSiteFolder.FileExists(shape.Template)) {
shape.TemplateContent = _webSiteFolder.ReadFile(shape.Template);
}
}
catch {