/// <summary> /// Set true if need to use widget in ASP.NET WebForms project /// </summary> /// <param name="useHttpHandlers">True by default</param> /// <returns></returns> public override string ToString() { var result = new StringBuilder(); result.Append(Styles.Render(BundleTable.Bundles.ResolveBundleUrl(BundleConfigurator.AddPrefix("~/comparison/styles", false)))); //Add comparison css scripts result.Append(base.ToString()); return(result.ToString()); }
public override string ToString() { var applicationPath = _applicationPathFinder.GetApplicationPath(); var result = new StringBuilder(); var embeddeScriptsTemplate = String.Format("<script type='text/javascript' src='{0}{1}/{{0}}'></script>", applicationPath, _settings.EmbeddedResourceUrl); result.AppendFormat(embeddeScriptsTemplate, "scripts/lib/jquery-1.9.1.min.js"); result.AppendFormat(embeddeScriptsTemplate, "scripts/lib/jquery-ui-1.10.3.min.js"); result.AppendFormat(embeddeScriptsTemplate, "scripts/lib/knockout-3.2.0.js"); result.AppendFormat(embeddeScriptsTemplate, "scripts/lib/turn.min.js"); result.AppendFormat(embeddeScriptsTemplate, "scripts/lib/modernizr.2.6.2.Transform2d.min.js"); result.AppendFormat(embeddeScriptsTemplate, "scripts/lib/installableViewer.js"); result.AppendLine("<script type='text/javascript'> $.ui.groupdocsViewer.prototype.applicationPath = 'http://*****:*****@" define('comparison-settings', function () {{ var sessionId = '', sourceFileId = '', targetFileId = '', resultFileId = '{0}', thumbsImageBase64Encoded = '{2}', mode = 'embed'; return {{ sessionId: sessionId, sourceFileId: sourceFileId, targetFileId: targetFileId, resultFileId: resultFileId, thumbsImageBase64Encoded: thumbsImageBase64Encoded, mode: mode }}; }});"; result.AppendLine(String.Format(settings, "", "", "")); result.AppendLine("</script>"); result.AppendFormat(Scripts.Render(String.Format("~/{0}/comparison/core", _settings.AppClientFilesPrefix)).ToString()); result.AppendFormat(embeddeScriptsTemplate, "scripts/comparison2/core/main.js"); result.AppendFormat(embeddeScriptsTemplate, "scripts/comparison2/redline.js"); result.Append(helper.GenerateClientCode()); return(result.ToString()); }