Compare commits
224 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6a5a320a22 | |||
| ebf22d155e | |||
| 01644e8f6c | |||
| f2be1669bf | |||
| 24911bffe2 | |||
| d343340f56 | |||
| 0c82f78c43 | |||
| 5cf3a619f7 | |||
| 49550b410a | |||
| b9df55ef98 | |||
| e456c44b46 | |||
| 61315a8d83 | |||
| a1c65f0518 | |||
| 49c8313c9e | |||
| 141f9b6ea1 | |||
| d223ee97cd | |||
| a098e49840 | |||
| 8785239964 | |||
| 74a691ac3a | |||
| 38c1669e57 | |||
| 58f0d1a464 | |||
| f30740bd49 | |||
| 3de3ccad00 | |||
| 75502ca18c | |||
| c531c36cab | |||
| 387e64acac | |||
| 91a5d55183 | |||
| 9819318060 | |||
| 2e990a7869 | |||
| ed7175192b | |||
| 4e63bb38f3 | |||
| d61b9bfdd7 | |||
| 0de53308f5 | |||
| 85bf47df82 | |||
| 791c3f5208 | |||
| bc7876681b | |||
| 68aa3f7b1b | |||
| 976531fe7e | |||
| ded7350d74 | |||
| e3594bf6fc | |||
| 6a6d9ec7b0 | |||
| 200a400fc5 | |||
| 76c807a4e7 | |||
| 985db6d2e3 | |||
| 7894fcfc91 | |||
| f41b0ff4b5 | |||
| d0a5892f9f | |||
| c0f4950270 | |||
| 1d9c3b1a79 | |||
| c5047148b3 | |||
| a6b3233c10 | |||
| 9ec1f9b3f9 | |||
| ed2126eef9 | |||
| ce4b56895e | |||
| eaac76cdc1 | |||
| bffe52e060 | |||
| 94db371234 | |||
| b12cd81c01 | |||
| 103e226b51 | |||
| 208cf8a01d | |||
| 1f81107485 | |||
| bf5042e3d0 | |||
| 15b55f2b36 | |||
| 57f2250f13 | |||
| f15682ef60 | |||
| 1b1ec04e7c | |||
| 049c65a2c7 | |||
| d50aa38c31 | |||
| 1531f979a2 | |||
| 69ffecd686 | |||
| 6ec297aaaf | |||
| bb1edd2051 | |||
| 14790559cb | |||
| 97457087c7 | |||
| 8469d18a0e | |||
| da3269e970 | |||
| b2b0afde4b | |||
| ff849ab912 | |||
| 97b8a5000a | |||
| f59489a5cb | |||
| b03427cabc | |||
| 2eb5c08825 | |||
| 37eb66510f | |||
| dc7c7304ad | |||
| 8327b8aa0e | |||
| 7759249963 | |||
| 9d9070c979 | |||
| feb1a14650 | |||
| 4cb4ff0617 | |||
| 9e1d6dbf9b | |||
| 82ec2d28ef | |||
| 66383c6f16 | |||
| dc60eb8383 | |||
| 9733c5c031 | |||
| 0c0c08ec98 | |||
| d7d800331b | |||
| 4346578160 | |||
| cfe0b2f9e5 | |||
| d7d7d88ecc | |||
| fd34a9cd29 | |||
| 6da1a5adb3 | |||
| 23cf5b544a | |||
| b0cde715da | |||
| 366ca11490 | |||
| a1a985e4a8 | |||
| 3384634033 | |||
| b6bcdcb351 | |||
| db5b99dbf1 | |||
| a64dbb172e | |||
| b1913c9a07 | |||
| 11fc06d75d | |||
| f6179ff813 | |||
| 186e664894 | |||
| 1735c5adca | |||
| 31e715e146 | |||
| 4a7f7813e7 | |||
| 5f50bae65c | |||
| 996d74b1d3 | |||
| e6d8a83519 | |||
| d3aa1b3d7e | |||
| 3effe6b96d | |||
| 0b2428e9a3 | |||
| 6458c223b8 | |||
| d36fc65baa | |||
| a511c84b4d | |||
| ff34024f39 | |||
| bdc0ae7e2f | |||
| 60965ecd92 | |||
| 708b49ca13 | |||
| b6baa9af3d | |||
| 8c7db9e846 | |||
| 176ec0edc0 | |||
| 0d1cf872d3 | |||
| 13b6318ad2 | |||
| 18352f8a4d | |||
| ad52b86336 | |||
| 38df2017de | |||
| 210f66cc4a | |||
| e7e209280c | |||
| 5b7e9c712e | |||
| 33aa4e2062 | |||
| 1efa75c891 | |||
| f48fb5c499 | |||
| cb13b4a0e0 | |||
| cb8dbf9da5 | |||
| 2a05687c8b | |||
| d4514844f8 | |||
| 6b7a495d19 | |||
| 601eb0bf38 | |||
| 037e7e0797 | |||
| a7e32e97e3 | |||
| 9d90506265 | |||
| 08100793af | |||
| a265424b3f | |||
| bb87fa7fa8 | |||
| 16cf64866a | |||
| 11da6d5be7 | |||
| ea35ea1af5 | |||
| 33c32579c8 | |||
| 1ac6f6db50 | |||
| 7baa81c2df | |||
| a0e88a297d | |||
| 8d2b52a5b0 | |||
| 81389ce435 | |||
| e981776e6d | |||
| 48b3806129 | |||
| 9fc8e18881 | |||
| 250276bbd4 | |||
| af29f61478 | |||
| cdfebe705d | |||
| e6714ae829 | |||
| a0dead872b | |||
| b6ebc34199 | |||
| 49e7ace2d9 | |||
| d140eab12d | |||
| 83e05a4f84 | |||
| ff52755636 | |||
| a7cd18c3d2 | |||
| 98a0208b47 | |||
| b923305527 | |||
| 04ccbdde4d | |||
| de1e3d150f | |||
| 07182529f4 | |||
| e076b687c6 | |||
| 7f305db637 | |||
| 50e10155e7 | |||
| 478b7cde42 | |||
| c86f52d5ea | |||
| 58fc51ae93 | |||
| 413248a126 | |||
| f114f94740 | |||
| ce162e2657 | |||
| 00518f8451 | |||
| ba3c1f9d21 | |||
| 7535585b63 | |||
| bf288c0502 | |||
| 2391ee1368 | |||
| 327d17c90e | |||
| d6b4c47cd9 | |||
| a052fc42b1 | |||
| c89fb0a0be | |||
| 03a606432a | |||
| 54e826bc96 | |||
| 6c57222a2e | |||
| 97e8573dff | |||
| 683862932b | |||
| 9a856df8bc | |||
| e1ef2e8700 | |||
| 59599efab6 | |||
| 20813ef207 | |||
| 99e0a1f11b | |||
| 9bf2819ac6 | |||
| cafeb6d8c6 | |||
| d04f2a98b9 | |||
| f41f82adc5 | |||
| e6ae88c016 | |||
| 474dcd0754 | |||
| 369f6ac935 | |||
| 5a928aa459 | |||
| 416a9ed064 | |||
| b13c3aa3b9 | |||
| 99ae94a82f | |||
| c6af319805 | |||
| 5716edcf80 |
@@ -106,3 +106,4 @@ src/Umbraco.Web.UI/[Uu]mbraco/[Vv]iews/**/*.js
|
||||
src/Umbraco.Web.UI/[Cc]onfig/appSettings.config
|
||||
src/Umbraco.Web.UI/[Cc]onfig/connectionStrings.config
|
||||
src/Umbraco.Web.UI/umbraco/plugins/*
|
||||
src/Umbraco.Web.UI/umbraco/js/init.js
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
@ECHO OFF
|
||||
SET release=7.0.0
|
||||
SET release=7.0.1
|
||||
SET comment=
|
||||
SET version=%release%
|
||||
|
||||
|
||||
@@ -45,9 +45,6 @@
|
||||
<file src="..\_BuildOutput\WebApp\bin\log4net.dll" target="lib\log4net.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Microsoft.ApplicationBlocks.Data.dll" target="lib\Microsoft.ApplicationBlocks.Data.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Microsoft.Web.Helpers.dll" target="lib\Microsoft.Web.Helpers.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Our.Umbraco.uGoLive.47x.dll" target="lib\Our.Umbraco.uGoLive.47x.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Our.Umbraco.uGoLive.Checks.dll" target="lib\Our.Umbraco.uGoLive.Checks.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\Our.Umbraco.uGoLive.dll" target="lib\Our.Umbraco.uGoLive.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\SQLCE4Umbraco.dll" target="lib\SQLCE4Umbraco.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\System.Data.SqlServerCe.dll" target="lib\System.Data.SqlServerCe.dll" />
|
||||
<file src="..\_BuildOutput\WebApp\bin\System.Data.SqlServerCe.Entity.dll" target="lib\System.Data.SqlServerCe.Entity.dll" />
|
||||
|
||||
@@ -268,7 +268,7 @@ namespace Umbraco.Core.Configuration
|
||||
/// <param name="value">Value of the setting to be saved.</param>
|
||||
internal static void SaveSetting(string key, string value)
|
||||
{
|
||||
var fileName = IOHelper.MapPath(string.Format("{0}/appSettings.config", SystemDirectories.Config));
|
||||
var fileName = IOHelper.MapPath(string.Format("{0}/web.config", SystemDirectories.Root));
|
||||
var xml = XDocument.Load(fileName, LoadOptions.PreserveWhitespace);
|
||||
|
||||
var appSettings = xml.Root.DescendantsAndSelf("appSettings").Single();
|
||||
@@ -290,7 +290,7 @@ namespace Umbraco.Core.Configuration
|
||||
/// <param name="key">Key of the setting to be removed.</param>
|
||||
internal static void RemoveSetting(string key)
|
||||
{
|
||||
var fileName = IOHelper.MapPath(string.Format("{0}/appSettings.config", SystemDirectories.Config));
|
||||
var fileName = IOHelper.MapPath(string.Format("{0}/web.config", SystemDirectories.Root));
|
||||
var xml = XDocument.Load(fileName, LoadOptions.PreserveWhitespace);
|
||||
|
||||
var appSettings = xml.Root.DescendantsAndSelf("appSettings").Single();
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
|
||||
return new OptionalInnerTextConfigurationElement<bool>(
|
||||
(InnerTextConfigurationElement<bool>)this["ResolveUrlsFromTextString"],
|
||||
//set the default
|
||||
true);
|
||||
false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
|
||||
return new OptionalInnerTextConfigurationElement<string>(
|
||||
(InnerTextConfigurationElement<string>)this["authCookieName"],
|
||||
//set the default
|
||||
"UMB_UCONTEXT");
|
||||
Constants.Web.AuthCookieName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace Umbraco.Core.Configuration
|
||||
{
|
||||
public class UmbracoVersion
|
||||
{
|
||||
private static readonly Version Version = new Version("7.0.0");
|
||||
private static readonly Version Version = new Version("7.0.1");
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current version of Umbraco.
|
||||
|
||||
@@ -23,5 +23,22 @@
|
||||
public const int RecycleBinMedia = -21;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines the identifiers for Umbraco system nodes.
|
||||
/// </summary>
|
||||
public static class Web
|
||||
{
|
||||
/// <summary>
|
||||
/// The preview cookie name
|
||||
/// </summary>
|
||||
public const string PreviewCookieName = "UMB_PREVIEW";
|
||||
|
||||
/// <summary>
|
||||
/// The auth cookie name
|
||||
/// </summary>
|
||||
public const string AuthCookieName = "UMB_UCONTEXT";
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -64,7 +64,7 @@ namespace Umbraco.Core
|
||||
InitializeProfilerResolver();
|
||||
|
||||
_timer = DisposableTimer.DebugDuration<CoreBootManager>("Umbraco application starting", "Umbraco application startup complete");
|
||||
|
||||
|
||||
CreateApplicationCache();
|
||||
|
||||
//Create the legacy prop-eds mapping
|
||||
@@ -223,10 +223,7 @@ namespace Umbraco.Core
|
||||
throw new InvalidOperationException("The boot manager has already been completed");
|
||||
|
||||
FreezeResolution();
|
||||
|
||||
//stop the timer and log the output
|
||||
_timer.Dispose();
|
||||
|
||||
|
||||
//call OnApplicationStarting of each application events handler
|
||||
ApplicationEventsResolver.Current.ApplicationEventHandlers
|
||||
.ForEach(x => x.OnApplicationStarted(UmbracoApplication, ApplicationContext));
|
||||
@@ -244,6 +241,9 @@ namespace Umbraco.Core
|
||||
// we're ready to serve content!
|
||||
ApplicationContext.IsReady = true;
|
||||
|
||||
//stop the timer and log the output
|
||||
_timer.Dispose();
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -268,7 +268,9 @@ namespace Umbraco.Core
|
||||
{
|
||||
new Lazy<Type>(() => typeof (RequiredManifestValueValidator)),
|
||||
new Lazy<Type>(() => typeof (RegexValidator)),
|
||||
new Lazy<Type>(() => typeof (DelimitedManifestValueValidator))
|
||||
new Lazy<Type>(() => typeof (DelimitedManifestValueValidator)),
|
||||
new Lazy<Type>(() => typeof (EmailValidator)),
|
||||
new Lazy<Type>(() => typeof (IntegerValidator)),
|
||||
});
|
||||
|
||||
//by default we'll use the standard configuration based sync
|
||||
|
||||
@@ -250,7 +250,7 @@ namespace Umbraco.Core
|
||||
_connectionString = connectionString;
|
||||
_providerName = providerName;
|
||||
|
||||
var fileName = IOHelper.MapPath(string.Format("{0}/connectionStrings.config", SystemDirectories.Config));
|
||||
var fileName = IOHelper.MapPath(string.Format("{0}/web.config", SystemDirectories.Root));
|
||||
var xml = XDocument.Load(fileName, LoadOptions.PreserveWhitespace);
|
||||
var connectionstrings = xml.Root.DescendantsAndSelf("connectionStrings").Single();
|
||||
|
||||
@@ -424,24 +424,19 @@ namespace Umbraco.Core
|
||||
return _result;
|
||||
}
|
||||
|
||||
internal Result CreateDatabaseSchemaAndDataOrUpgrade()
|
||||
internal Result CreateDatabaseSchemaAndData()
|
||||
{
|
||||
if (_configured == false || (string.IsNullOrEmpty(_connectionString) || string.IsNullOrEmpty(ProviderName)))
|
||||
var readyForInstall = CheckReadyForInstall();
|
||||
if (readyForInstall.Success == false)
|
||||
{
|
||||
return new Result
|
||||
{
|
||||
Message =
|
||||
"Database configuration is invalid. Please check that the entered database exists and that the provided username and password has write access to the database.",
|
||||
Success = false,
|
||||
Percentage = "10"
|
||||
};
|
||||
return readyForInstall.Result;
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
LogHelper.Info<DatabaseContext>("Database configuration status: Started");
|
||||
|
||||
var message = string.Empty;
|
||||
string message;
|
||||
|
||||
var database = new UmbracoDatabase(_connectionString, ProviderName);
|
||||
var supportsCaseInsensitiveQueries = SqlSyntaxContext.SqlSyntaxProvider.SupportsCaseInsensitiveQueries(database);
|
||||
@@ -456,50 +451,73 @@ namespace Umbraco.Core
|
||||
|
||||
return new Result { Message = message, Success = false, Percentage = "15" };
|
||||
}
|
||||
else if (supportsCaseInsensitiveQueries == null)
|
||||
{
|
||||
message = "<p> </p><p>Warning! Could not check if your database type supports case insensitive queries. <br />We currently do not support these databases that do not support case insensitive queries.</p>" +
|
||||
"<p>You can check this by looking for the following setting in your my.ini file in your MySQL installation directory:</p>" +
|
||||
"<pre>lower_case_table_names=1</pre><br />" +
|
||||
"<p>Note: Make sure to check with your hosting provider if they support case insensitive queries as well.</p>" +
|
||||
"<p>For more technical information on case sensitivity in MySQL, have a look at " +
|
||||
"<a href='http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html'>the documentation on the subject</a></p>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SqlSyntaxContext.SqlSyntaxProvider.GetType() == typeof(MySqlSyntaxProvider))
|
||||
{
|
||||
message = "<p> </p><p>Congratulations, the database step ran successfully!</p>" +
|
||||
"<p>Note: You're using MySQL and the database instance you're connecting to seems to support case insensitive queries.</p>" +
|
||||
"<p>However, your hosting provider may not support this option. Umbraco does not currently support MySQL installs that do not support case insensitive queries</p>" +
|
||||
"<p>Make sure to check with your hosting provider if they support case insensitive queries as well.</p>" +
|
||||
"<p>They can check this by looking for the following setting in the my.ini file in their MySQL installation directory:</p>" +
|
||||
"<pre>lower_case_table_names=1</pre><br />" +
|
||||
"<p>For more technical information on case sensitivity in MySQL, have a look at " +
|
||||
"<a href='http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html'>the documentation on the subject</a></p>";
|
||||
}
|
||||
}
|
||||
|
||||
message = GetResultMessageForMySql(supportsCaseInsensitiveQueries);
|
||||
|
||||
var schemaResult = ValidateDatabaseSchema();
|
||||
var installedVersion = schemaResult.DetermineInstalledVersion();
|
||||
|
||||
|
||||
//If Configuration Status is empty and the determined version is "empty" its a new install - otherwise upgrade the existing
|
||||
if (string.IsNullOrEmpty(GlobalSettings.ConfigurationStatus) && installedVersion.Equals(new Version(0, 0, 0)))
|
||||
{
|
||||
database.CreateDatabaseSchema();
|
||||
message = message + "<p>Installation completed!</p>";
|
||||
|
||||
//now that everything is done, we need to determine the version of SQL server that is executing
|
||||
LogHelper.Info<DatabaseContext>("Database configuration status: " + message);
|
||||
return new Result { Message = message, Success = true, Percentage = "100" };
|
||||
}
|
||||
else
|
||||
{
|
||||
var configuredVersion = string.IsNullOrEmpty(GlobalSettings.ConfigurationStatus)
|
||||
|
||||
//we need to do an upgrade so return a new status message and it will need to be done during the next step
|
||||
LogHelper.Info<DatabaseContext>("Database requires upgrade");
|
||||
message = "<p>Upgrading database, this may take some time...</p>";
|
||||
return new Result
|
||||
{
|
||||
RequiresUpgrade = true,
|
||||
Message = message,
|
||||
Success = true,
|
||||
Percentage = "30"
|
||||
};
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return HandleInstallException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This assumes all of the previous checks are done!
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
internal Result UpgradeSchemaAndData()
|
||||
{
|
||||
var readyForInstall = CheckReadyForInstall();
|
||||
if (readyForInstall.Success == false)
|
||||
{
|
||||
return readyForInstall.Result;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
LogHelper.Info<DatabaseContext>("Database upgrade started");
|
||||
|
||||
var database = new UmbracoDatabase(_connectionString, ProviderName);
|
||||
var supportsCaseInsensitiveQueries = SqlSyntaxContext.SqlSyntaxProvider.SupportsCaseInsensitiveQueries(database);
|
||||
|
||||
var message = GetResultMessageForMySql(supportsCaseInsensitiveQueries);
|
||||
|
||||
var schemaResult = ValidateDatabaseSchema();
|
||||
var installedVersion = schemaResult.DetermineInstalledVersion();
|
||||
|
||||
//DO the upgrade!
|
||||
|
||||
var configuredVersion = string.IsNullOrEmpty(GlobalSettings.ConfigurationStatus)
|
||||
? installedVersion
|
||||
: new Version(GlobalSettings.ConfigurationStatus);
|
||||
var targetVersion = UmbracoVersion.Current;
|
||||
var runner = new MigrationRunner(configuredVersion, targetVersion, GlobalSettings.UmbracoMigrationName);
|
||||
var upgraded = runner.Execute(database, true);
|
||||
message = message + "<p>Upgrade completed!</p>";
|
||||
}
|
||||
var targetVersion = UmbracoVersion.Current;
|
||||
var runner = new MigrationRunner(configuredVersion, targetVersion, GlobalSettings.UmbracoMigrationName);
|
||||
var upgraded = runner.Execute(database, true);
|
||||
message = message + "<p>Upgrade completed!</p>";
|
||||
|
||||
//now that everything is done, we need to determine the version of SQL server that is executing
|
||||
|
||||
@@ -509,26 +527,72 @@ namespace Umbraco.Core
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Info<DatabaseContext>("Database configuration failed with the following error and stack trace: " + ex.Message + "\n" + ex.StackTrace);
|
||||
|
||||
if (_result != null)
|
||||
{
|
||||
LogHelper.Info<DatabaseContext>("The database schema validation produced the following summary: \n" + _result.GetSummary());
|
||||
}
|
||||
|
||||
return new Result
|
||||
{
|
||||
Message =
|
||||
"The database configuration failed with the following message: " + ex.Message +
|
||||
"\n Please check log file for additional information (can be found in '/App_Data/Logs/UmbracoTraceLog.txt')",
|
||||
Success = false,
|
||||
Percentage = "90"
|
||||
};
|
||||
return HandleInstallException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
private string GetResultMessageForMySql(bool? supportsCaseInsensitiveQueries)
|
||||
{
|
||||
if (supportsCaseInsensitiveQueries == null)
|
||||
{
|
||||
return "<p> </p><p>Warning! Could not check if your database type supports case insensitive queries. <br />We currently do not support these databases that do not support case insensitive queries.</p>" +
|
||||
"<p>You can check this by looking for the following setting in your my.ini file in your MySQL installation directory:</p>" +
|
||||
"<pre>lower_case_table_names=1</pre><br />" +
|
||||
"<p>Note: Make sure to check with your hosting provider if they support case insensitive queries as well.</p>" +
|
||||
"<p>For more technical information on case sensitivity in MySQL, have a look at " +
|
||||
"<a href='http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html'>the documentation on the subject</a></p>";
|
||||
}
|
||||
if (SqlSyntaxContext.SqlSyntaxProvider.GetType() == typeof(MySqlSyntaxProvider))
|
||||
{
|
||||
return "<p> </p><p>Congratulations, the database step ran successfully!</p>" +
|
||||
"<p>Note: You're using MySQL and the database instance you're connecting to seems to support case insensitive queries.</p>" +
|
||||
"<p>However, your hosting provider may not support this option. Umbraco does not currently support MySQL installs that do not support case insensitive queries</p>" +
|
||||
"<p>Make sure to check with your hosting provider if they support case insensitive queries as well.</p>" +
|
||||
"<p>They can check this by looking for the following setting in the my.ini file in their MySQL installation directory:</p>" +
|
||||
"<pre>lower_case_table_names=1</pre><br />" +
|
||||
"<p>For more technical information on case sensitivity in MySQL, have a look at " +
|
||||
"<a href='http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html'>the documentation on the subject</a></p>";
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
private Attempt<Result> CheckReadyForInstall()
|
||||
{
|
||||
if (_configured == false || (string.IsNullOrEmpty(_connectionString) || string.IsNullOrEmpty(ProviderName)))
|
||||
{
|
||||
return Attempt.Fail(new Result
|
||||
{
|
||||
Message =
|
||||
"Database configuration is invalid. Please check that the entered database exists and that the provided username and password has write access to the database.",
|
||||
Success = false,
|
||||
Percentage = "10"
|
||||
});
|
||||
}
|
||||
return Attempt<Result>.Succeed();
|
||||
}
|
||||
|
||||
private Result HandleInstallException(Exception ex)
|
||||
{
|
||||
LogHelper.Info<DatabaseContext>("Database configuration failed with the following error and stack trace: " + ex.Message + "\n" + ex.StackTrace);
|
||||
|
||||
if (_result != null)
|
||||
{
|
||||
LogHelper.Info<DatabaseContext>("The database schema validation produced the following summary: \n" + _result.GetSummary());
|
||||
}
|
||||
|
||||
return new Result
|
||||
{
|
||||
Message =
|
||||
"The database configuration failed with the following message: " + ex.Message +
|
||||
"\n Please check log file for additional information (can be found in '/App_Data/Logs/UmbracoTraceLog.txt')",
|
||||
Success = false,
|
||||
Percentage = "90"
|
||||
};
|
||||
}
|
||||
|
||||
internal class Result
|
||||
{
|
||||
public bool RequiresUpgrade { get; set; }
|
||||
public string Message { get; set; }
|
||||
public bool Success { get; set; }
|
||||
public string Percentage { get; set; }
|
||||
|
||||
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using HtmlAgilityPack;
|
||||
|
||||
namespace Umbraco.Core.Macros
|
||||
{
|
||||
@@ -10,7 +11,7 @@ namespace Umbraco.Core.Macros
|
||||
/// </summary>
|
||||
internal class MacroTagParser
|
||||
{
|
||||
private static readonly Regex MacroRteContent = new Regex(@"(<div.*?>.*?<!--\s*?)(<\?UMBRACO_MACRO.*?/>)(.*?</div>)", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
|
||||
private static readonly Regex MacroRteContent = new Regex(@"(<!--\s*?)(<\?UMBRACO_MACRO.*?/>)(\s*?-->)", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
|
||||
private static readonly Regex MacroPersistedFormat = new Regex(@"(<\?UMBRACO_MACRO macroAlias=[""'](\w+?)[""'].+?)(?:/>|>.*?</\?UMBRACO_MACRO>)", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
|
||||
|
||||
/// <summary>
|
||||
@@ -88,7 +89,34 @@ namespace Umbraco.Core.Macros
|
||||
/// </remarks>
|
||||
internal static string FormatRichTextContentForPersistence(string rteContent)
|
||||
{
|
||||
return MacroRteContent.Replace(rteContent, match =>
|
||||
if (string.IsNullOrEmpty(rteContent))
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
var html = new HtmlDocument();
|
||||
html.LoadHtml(rteContent);
|
||||
|
||||
//get all the comment nodes we want
|
||||
var commentNodes = html.DocumentNode.SelectNodes("//comment()[contains(., '<?UMBRACO_MACRO')]");
|
||||
if (commentNodes == null)
|
||||
{
|
||||
//There are no macros found, just return the normal content
|
||||
return rteContent;
|
||||
}
|
||||
|
||||
//replace each containing parent <div> with the comment node itself.
|
||||
foreach (var c in commentNodes)
|
||||
{
|
||||
var div = c.ParentNode;
|
||||
var divContainer = div.ParentNode;
|
||||
divContainer.ReplaceChild(c, div);
|
||||
}
|
||||
|
||||
var parsed = html.DocumentNode.OuterHtml;
|
||||
|
||||
//now replace all the <!-- and --> with nothing
|
||||
return MacroRteContent.Replace(parsed, match =>
|
||||
{
|
||||
if (match.Groups.Count >= 3)
|
||||
{
|
||||
@@ -96,7 +124,7 @@ namespace Umbraco.Core.Macros
|
||||
return match.Groups[2].Value;
|
||||
}
|
||||
//replace with nothing if we couldn't find the syntax for whatever reason
|
||||
return "";
|
||||
return string.Empty;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,15 @@ namespace Umbraco.Core.Media
|
||||
return codec.MimeType;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the thumbnails if the image is larger than all of the specified ones.
|
||||
/// </summary>
|
||||
/// <param name="fs"></param>
|
||||
/// <param name="fileName"></param>
|
||||
/// <param name="extension"></param>
|
||||
/// <param name="originalImage"></param>
|
||||
/// <param name="additionalThumbSizes"></param>
|
||||
/// <returns></returns>
|
||||
internal static IEnumerable<ResizedImage> GenerateMediaThumbnails(
|
||||
IFileSystem fs,
|
||||
string fileName,
|
||||
@@ -32,22 +41,33 @@ namespace Umbraco.Core.Media
|
||||
Image originalImage,
|
||||
IEnumerable<int> additionalThumbSizes)
|
||||
{
|
||||
// Make default thumbnails
|
||||
var thumbs = new List<ResizedImage>
|
||||
{
|
||||
Resize(fs, fileName, extension, 100, "thumb", originalImage),
|
||||
Resize(fs, fileName, extension, 500, "big-thumb", originalImage)
|
||||
};
|
||||
|
||||
//make custom ones
|
||||
foreach (var thumb in additionalThumbSizes.Where(x => x > 0).Distinct())
|
||||
var result = new List<ResizedImage>();
|
||||
|
||||
var allSizes = new List<int> {100, 500};
|
||||
allSizes.AddRange(additionalThumbSizes.Where(x => x > 0).Distinct());
|
||||
|
||||
foreach (var s in allSizes)
|
||||
{
|
||||
thumbs.Add(Resize(fs, fileName, extension, thumb, string.Format("thumb_{0}", thumb), originalImage));
|
||||
if (originalImage.Width >= s && originalImage.Height >= s)
|
||||
{
|
||||
result.Add(Resize(fs, fileName, extension, s, "thumb", originalImage));
|
||||
}
|
||||
}
|
||||
|
||||
return thumbs;
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs an image resize
|
||||
/// </summary>
|
||||
/// <param name="fileSystem"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="extension"></param>
|
||||
/// <param name="maxWidthHeight"></param>
|
||||
/// <param name="fileNameAddition"></param>
|
||||
/// <param name="originalImage"></param>
|
||||
/// <returns></returns>
|
||||
private static ResizedImage Resize(IFileSystem fileSystem, string path, string extension, int maxWidthHeight, string fileNameAddition, Image originalImage)
|
||||
{
|
||||
var fileNameThumb = String.IsNullOrEmpty(fileNameAddition)
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Umbraco.Core.Models
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract(IsReference = true)]
|
||||
internal class MacroProperty : TracksChangesEntityBase, IMacroProperty, IRememberBeingDirty
|
||||
public class MacroProperty : TracksChangesEntityBase, IMacroProperty, IRememberBeingDirty
|
||||
{
|
||||
public MacroProperty()
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Delete
|
||||
|
||||
public IDeleteColumnFromTableSyntax Column(string columnName)
|
||||
{
|
||||
var expression = _databaseProviders == null
|
||||
var expression = _databaseProviders == null
|
||||
? new DeleteColumnExpression { ColumnNames = { columnName } }
|
||||
: new DeleteColumnExpression(_context.CurrentDatabaseProvider, _databaseProviders) { ColumnNames = { columnName } };
|
||||
_context.Expressions.Add(expression);
|
||||
@@ -36,7 +36,7 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Delete
|
||||
|
||||
public IDeleteForeignKeyFromTableSyntax ForeignKey()
|
||||
{
|
||||
var expression = _databaseProviders == null
|
||||
var expression = _databaseProviders == null
|
||||
? new DeleteForeignKeyExpression()
|
||||
: new DeleteForeignKeyExpression(_context.CurrentDatabaseProvider, _databaseProviders);
|
||||
_context.Expressions.Add(expression);
|
||||
@@ -45,7 +45,7 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Delete
|
||||
|
||||
public IDeleteForeignKeyOnTableSyntax ForeignKey(string foreignKeyName)
|
||||
{
|
||||
var expression = _databaseProviders == null
|
||||
var expression = _databaseProviders == null
|
||||
? new DeleteForeignKeyExpression { ForeignKey = { Name = foreignKeyName } }
|
||||
: new DeleteForeignKeyExpression(_context.CurrentDatabaseProvider, _databaseProviders) { ForeignKey = { Name = foreignKeyName } };
|
||||
_context.Expressions.Add(expression);
|
||||
@@ -68,17 +68,17 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Delete
|
||||
|
||||
public IDeleteIndexForTableSyntax Index(string indexName)
|
||||
{
|
||||
var expression = new DeleteIndexExpression {Index = {Name = indexName}};
|
||||
var expression = new DeleteIndexExpression { Index = { Name = indexName } };
|
||||
_context.Expressions.Add(expression);
|
||||
return new DeleteIndexBuilder(expression);
|
||||
}
|
||||
|
||||
public IDeleteConstraintOnTableSyntax PrimaryKey(string primaryKeyName)
|
||||
{
|
||||
var expression = new DeleteConstraintExpression(ConstraintType.PrimaryKey)
|
||||
{
|
||||
Constraint = { ConstraintName = primaryKeyName }
|
||||
};
|
||||
var expression = new DeleteConstraintExpression(_context.CurrentDatabaseProvider, _databaseProviders, ConstraintType.PrimaryKey)
|
||||
{
|
||||
Constraint = { ConstraintName = primaryKeyName }
|
||||
};
|
||||
_context.Expressions.Add(expression);
|
||||
return new DeleteConstraintBuilder(expression);
|
||||
}
|
||||
@@ -86,16 +86,16 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Delete
|
||||
public IDeleteConstraintOnTableSyntax UniqueConstraint(string constraintName)
|
||||
{
|
||||
var expression = new DeleteConstraintExpression(ConstraintType.Unique)
|
||||
{
|
||||
Constraint = { ConstraintName = constraintName }
|
||||
};
|
||||
{
|
||||
Constraint = { ConstraintName = constraintName }
|
||||
};
|
||||
_context.Expressions.Add(expression);
|
||||
return new DeleteConstraintBuilder(expression);
|
||||
}
|
||||
|
||||
public IDeleteDefaultConstraintOnTableSyntax DefaultConstraint()
|
||||
{
|
||||
var expression = _databaseProviders == null
|
||||
var expression = _databaseProviders == null
|
||||
? new DeleteDefaultConstraintExpression()
|
||||
: new DeleteDefaultConstraintExpression(_context.CurrentDatabaseProvider, _databaseProviders);
|
||||
_context.Expressions.Add(expression);
|
||||
|
||||
+28
-1
@@ -10,13 +10,40 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Delete.Expressions
|
||||
Constraint = new ConstraintDefinition(type);
|
||||
}
|
||||
|
||||
public DeleteConstraintExpression(DatabaseProviders current, DatabaseProviders[] databaseProviders, ConstraintType type)
|
||||
: base(current, databaseProviders)
|
||||
{
|
||||
Constraint = new ConstraintDefinition(type);
|
||||
}
|
||||
|
||||
public ConstraintDefinition Constraint { get; private set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format(SqlSyntaxContext.SqlSyntaxProvider.DeleteConstraint,
|
||||
// Test for MySQL primary key situation.
|
||||
if (CurrentDatabaseProvider == DatabaseProviders.MySql)
|
||||
{
|
||||
if (Constraint.IsPrimaryKeyConstraint)
|
||||
{
|
||||
return string.Format(SqlSyntaxContext.SqlSyntaxProvider.DeleteConstraint,
|
||||
SqlSyntaxContext.SqlSyntaxProvider.GetQuotedTableName(Constraint.TableName),
|
||||
"PRIMARY KEY",
|
||||
"");
|
||||
}
|
||||
else
|
||||
{
|
||||
return string.Format(SqlSyntaxContext.SqlSyntaxProvider.DeleteConstraint,
|
||||
SqlSyntaxContext.SqlSyntaxProvider.GetQuotedTableName(Constraint.TableName),
|
||||
"FOREIGN KEY",
|
||||
"");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return string.Format(SqlSyntaxContext.SqlSyntaxProvider.DeleteConstraint,
|
||||
SqlSyntaxContext.SqlSyntaxProvider.GetQuotedTableName(Constraint.TableName),
|
||||
SqlSyntaxContext.SqlSyntaxProvider.GetQuotedName(Constraint.ConstraintName));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -27,7 +27,7 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Delete.Expressions
|
||||
if (ForeignKey.ForeignTable == null)
|
||||
throw new ArgumentNullException("Table name not specified, ensure you have appended the OnTable extension. Format should be Delete.ForeignKey(KeyName).OnTable(TableName)");
|
||||
|
||||
if(CurrentDatabaseProvider == DatabaseProviders.MySql)
|
||||
if (CurrentDatabaseProvider == DatabaseProviders.MySql)
|
||||
{
|
||||
//MySql naming "convention" for foreignkeys, which aren't explicitly named
|
||||
if (string.IsNullOrEmpty(ForeignKey.Name))
|
||||
@@ -35,7 +35,7 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Delete.Expressions
|
||||
|
||||
return string.Format(SqlSyntaxContext.SqlSyntaxProvider.DeleteConstraint,
|
||||
SqlSyntaxContext.SqlSyntaxProvider.GetQuotedTableName(ForeignKey.ForeignTable),
|
||||
"FOREIGN KEY ",
|
||||
"FOREIGN KEY",
|
||||
SqlSyntaxContext.SqlSyntaxProvider.GetQuotedName(ForeignKey.Name));
|
||||
}
|
||||
|
||||
|
||||
+7
-7
@@ -26,11 +26,11 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSeven
|
||||
//create a new col which we will make a foreign key, but first needs to be populated with data.
|
||||
Alter.Table("cmsTagRelationship").AddColumn("propertyTypeId").AsInt32().Nullable();
|
||||
|
||||
//drop the foreign key on umbracoNode. Must drop foreign key first before primary key can be removed in MySql.
|
||||
Delete.ForeignKey("FK_cmsTagRelationship_umbracoNode_id").OnTable("cmsTagRelationship");
|
||||
|
||||
//we need to drop the primary key
|
||||
Delete.PrimaryKey("PK_cmsTagRelationship").FromTable("cmsTagRelationship");
|
||||
|
||||
//drop the foreign key on umbracoNode
|
||||
Delete.ForeignKey("FK_cmsTagRelationship_umbracoNode_id").OnTable("cmsTagRelationship");
|
||||
}
|
||||
|
||||
private void Upgrade()
|
||||
@@ -57,9 +57,9 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSeven
|
||||
var propertyTypes = propertyTypeIdRef.Where(x => x.NodeId == tr.NodeId).ToArray();
|
||||
if (propertyTypes.Length == 0)
|
||||
{
|
||||
LogHelper.Warn<AlterTagRelationsTable>("There was no cmsContent reference for cmsTagRelationship for nodeId "
|
||||
LogHelper.Warn<AlterTagRelationsTable>("There was no cmsContent reference for cmsTagRelationship for nodeId "
|
||||
+ tr.NodeId +
|
||||
". The new tag system only supports tags with references to content in the cmsContent and cmsPropertyType tables. This row will be deleted: "
|
||||
". The new tag system only supports tags with references to content in the cmsContent and cmsPropertyType tables. This row will be deleted: "
|
||||
+ string.Format("nodeId: {0}, tagId: {1}", tr.NodeId, tr.TagId));
|
||||
Delete.FromTable("cmsTagRelationship").Row(new { nodeId = tr.NodeId, tagId = tr.TagId });
|
||||
}
|
||||
@@ -92,7 +92,7 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSeven
|
||||
Alter.Table("cmsTagRelationship").AlterColumn("propertyTypeId").AsInt32().NotNullable();
|
||||
|
||||
//we need to re-add the new primary key on all 3 columns
|
||||
Create.PrimaryKey("PK_cmsTagRelationship").OnTable("cmsTagRelationship").Columns(new[] {"nodeId", "propertyTypeId", "tagId"});
|
||||
Create.PrimaryKey("PK_cmsTagRelationship").OnTable("cmsTagRelationship").Columns(new[] { "nodeId", "propertyTypeId", "tagId" });
|
||||
|
||||
//now we need to add a foreign key to the propertyTypeId column and change it's constraints
|
||||
Create.ForeignKey("FK_cmsTagRelationship_cmsPropertyType")
|
||||
@@ -102,7 +102,7 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSeven
|
||||
.PrimaryColumn("id")
|
||||
.OnDelete(Rule.None)
|
||||
.OnUpdate(Rule.None);
|
||||
|
||||
|
||||
//now we need to add a foreign key to the nodeId column to cmsContent (intead of the original umbracoNode)
|
||||
Create.ForeignKey("FK_cmsTagRelationship_cmsContent")
|
||||
.FromTable("cmsTagRelationship")
|
||||
|
||||
@@ -261,6 +261,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
foreach (var item in items)
|
||||
{
|
||||
//Before a PropertyType can be deleted, all Properties based on that PropertyType should be deleted.
|
||||
Database.Delete<TagRelationshipDto>("WHERE propertyTypeId = @Id", new { Id = item });
|
||||
Database.Delete<PropertyDataDto>("WHERE propertytypeid = @Id", new {Id = item});
|
||||
Database.Delete<PropertyTypeDto>("WHERE contentTypeId = @Id AND id = @PropertyTypeId",
|
||||
new {Id = entity.Id, PropertyTypeId = item});
|
||||
|
||||
@@ -12,5 +12,12 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
/// <returns></returns>
|
||||
IEnumerable<IMember> GetByMemberGroup(string groupName);
|
||||
|
||||
/// <summary>
|
||||
/// Checks if a member with the username exists
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
bool Exists(string username);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
/// Assigns the given tags to a content item's property
|
||||
/// </summary>
|
||||
/// <param name="contentId"></param>
|
||||
/// <param name="propertyTypeAlias"></param>
|
||||
/// <param name="propertyTypeId"></param>
|
||||
/// <param name="tags">The tags to assign</param>
|
||||
/// <param name="replaceTags">
|
||||
/// If set to true, this will replace all tags with the given tags,
|
||||
@@ -44,14 +44,14 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
/// <remarks>
|
||||
/// This can also be used to remove all tags from a property by specifying replaceTags = true and an empty tag list.
|
||||
/// </remarks>
|
||||
void AssignTagsToProperty(int contentId, string propertyTypeAlias, IEnumerable<ITag> tags, bool replaceTags);
|
||||
void AssignTagsToProperty(int contentId, int propertyTypeId, IEnumerable<ITag> tags, bool replaceTags);
|
||||
|
||||
/// <summary>
|
||||
/// Removes any of the given tags from the property association
|
||||
/// </summary>
|
||||
/// <param name="contentId"></param>
|
||||
/// <param name="propertyTypeAlias"></param>
|
||||
/// <param name="propertyTypeId"></param>
|
||||
/// <param name="tags">The tags to remove from the property</param>
|
||||
void RemoveTagsFromProperty(int contentId, string propertyTypeAlias, IEnumerable<ITag> tags);
|
||||
void RemoveTagsFromProperty(int contentId, int propertyTypeId, IEnumerable<ITag> tags);
|
||||
}
|
||||
}
|
||||
@@ -446,6 +446,17 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
return BuildFromDtos(dtos);
|
||||
}
|
||||
|
||||
public bool Exists(string username)
|
||||
{
|
||||
var sql = new Sql();
|
||||
var escapedUserName = Database.EscapeAtSymbols(username);
|
||||
sql.Select("COUNT(*)")
|
||||
.From<MemberDto>()
|
||||
.Where<MemberDto>(x => x.LoginName == escapedUserName);
|
||||
|
||||
return Database.ExecuteScalar<int>(sql) > 0;
|
||||
}
|
||||
|
||||
private IMember BuildFromDto(List<MemberReadOnlyDto> dtos)
|
||||
{
|
||||
if (dtos == null || dtos.Any() == false)
|
||||
|
||||
@@ -230,7 +230,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
/// Assigns the given tags to a content item's property
|
||||
/// </summary>
|
||||
/// <param name="contentId"></param>
|
||||
/// <param name="propertyTypeAlias"></param>
|
||||
/// <param name="propertyTypeId"></param>
|
||||
/// <param name="tags">The tags to assign</param>
|
||||
/// <param name="replaceTags">
|
||||
/// If set to true, this will replace all tags with the given tags,
|
||||
@@ -240,7 +240,8 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
/// <remarks>
|
||||
/// This can also be used to remove all tags from a property by specifying replaceTags = true and an empty tag list.
|
||||
/// </remarks>
|
||||
public void AssignTagsToProperty(int contentId, string propertyTypeAlias, IEnumerable<ITag> tags, bool replaceTags)
|
||||
//public void AssignTagsToProperty(int contentId, string propertyTypeAlias, IEnumerable<ITag> tags, bool replaceTags)
|
||||
public void AssignTagsToProperty(int contentId, int propertyTypeId, IEnumerable<ITag> tags, bool replaceTags)
|
||||
{
|
||||
//First we need to ensure there are no duplicates
|
||||
var asArray = tags.Distinct(new TagComparer()).ToArray();
|
||||
@@ -251,8 +252,6 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
return;
|
||||
}
|
||||
|
||||
var propertyTypeId = EnsureContentProperty(contentId, propertyTypeAlias);
|
||||
|
||||
//next check if we're removing all of the tags
|
||||
if (asArray.Length == 0 && replaceTags)
|
||||
{
|
||||
@@ -310,7 +309,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
"left outer join cmsTagRelationship ",
|
||||
"on (cmsTagRelationship.TagId = NewTagsSet.Id and cmsTagRelationship.nodeId = ",
|
||||
contentId,
|
||||
"and cmsTagRelationship.propertyTypeId = ",
|
||||
" and cmsTagRelationship.propertyTypeId = ",
|
||||
propertyTypeId,
|
||||
") ",
|
||||
"where cmsTagRelationship.tagId is null ");
|
||||
@@ -327,12 +326,10 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
/// Removes any of the given tags from the property association
|
||||
/// </summary>
|
||||
/// <param name="contentId"></param>
|
||||
/// <param name="propertyTypeAlias"></param>
|
||||
/// <param name="propertyTypeId"></param>
|
||||
/// <param name="tags">The tags to remove from the property</param>
|
||||
public void RemoveTagsFromProperty(int contentId, string propertyTypeAlias, IEnumerable<ITag> tags)
|
||||
public void RemoveTagsFromProperty(int contentId, int propertyTypeId, IEnumerable<ITag> tags)
|
||||
{
|
||||
var propertyTypeId = EnsureContentProperty(contentId, propertyTypeAlias);
|
||||
|
||||
var tagSetSql = GetTagSet(tags);
|
||||
|
||||
var deleteSql = string.Concat("DELETE FROM cmsTagRelationship WHERE nodeId = ",
|
||||
@@ -396,36 +393,5 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ensures the content and property alias exist, then returns the property type id for the alias
|
||||
/// </summary>
|
||||
/// <param name="contentId"></param>
|
||||
/// <param name="propertyAlias"></param>
|
||||
/// <returns></returns>
|
||||
private int EnsureContentProperty(int contentId, string propertyAlias)
|
||||
{
|
||||
//ensure that there's content and a property to assign - NOTE: we cannot use the content repository here
|
||||
// because the content repository requires one of us TagsRepository instance, then we'll have circular dependencies
|
||||
// instead we'll just look it up ourselves.
|
||||
|
||||
var sql = new Sql()
|
||||
.Select("cmsPropertyType.id")
|
||||
.From<ContentDto>()
|
||||
.InnerJoin<ContentTypeDto>()
|
||||
.On<ContentTypeDto, ContentDto>(left => left.NodeId, right => right.ContentTypeId)
|
||||
.InnerJoin<PropertyTypeDto>()
|
||||
.On<PropertyTypeDto, ContentTypeDto>(left => left.ContentTypeId, right => right.NodeId)
|
||||
.Where<ContentDto>(dto => dto.NodeId == contentId)
|
||||
.Where<PropertyTypeDto>(dto => dto.Alias == propertyAlias);
|
||||
|
||||
var result = Database.Fetch<int>(sql).ToArray();
|
||||
|
||||
if (result.Length == 0)
|
||||
{
|
||||
throw new InvalidOperationException("Cannot modify tags for content id " + contentId + " and property " + propertyAlias + " because the content item does not exist with this property");
|
||||
}
|
||||
|
||||
return result.First();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -106,7 +106,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
//remove the specific tags
|
||||
tagRepo.RemoveTagsFromProperty(
|
||||
entity.Id,
|
||||
tagProp.Alias,
|
||||
tagProp.PropertyTypeId,
|
||||
tagProp.TagSupport.Tags.Select(x => new Tag { Text = x.Item1, Group = x.Item2 }));
|
||||
}
|
||||
else
|
||||
@@ -114,7 +114,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
//assign the tags
|
||||
tagRepo.AssignTagsToProperty(
|
||||
entity.Id,
|
||||
tagProp.Alias,
|
||||
tagProp.PropertyTypeId,
|
||||
tagProp.TagSupport.Tags.Select(x => new Tag { Text = x.Item1, Group = x.Item2 }),
|
||||
tagProp.TagSupport.Behavior == PropertyTagBehavior.Replace);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
TimeColumnDefinition = "time";
|
||||
DecimalColumnDefinition = "decimal(38,6)";
|
||||
GuidColumnDefinition = "char(36)";
|
||||
|
||||
|
||||
InitColumnTypeMap();
|
||||
|
||||
DefaultValueFormat = "DEFAULT '{0}'";
|
||||
@@ -48,7 +48,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
var items =
|
||||
db.Fetch<dynamic>(
|
||||
"SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = @TableSchema",
|
||||
new {TableSchema = db.Connection.Database});
|
||||
new { TableSchema = db.Connection.Database });
|
||||
list = items.Select(x => x.TABLE_NAME).Cast<string>().ToList();
|
||||
}
|
||||
finally
|
||||
@@ -67,7 +67,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
var items =
|
||||
db.Fetch<dynamic>(
|
||||
"SELECT TABLE_NAME, COLUMN_NAME, ORDINAL_POSITION, COLUMN_DEFAULT, IS_NULLABLE, DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = @TableSchema",
|
||||
new {TableSchema = db.Connection.Database});
|
||||
new { TableSchema = db.Connection.Database });
|
||||
list =
|
||||
items.Select(
|
||||
item =>
|
||||
@@ -90,7 +90,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
var items =
|
||||
db.Fetch<dynamic>(
|
||||
"SELECT TABLE_NAME, CONSTRAINT_NAME FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE TABLE_SCHEMA = @TableSchema",
|
||||
new {TableSchema = db.Connection.Database});
|
||||
new { TableSchema = db.Connection.Database });
|
||||
list = items.Select(item => new Tuple<string, string>(item.TABLE_NAME, item.CONSTRAINT_NAME)).ToList();
|
||||
}
|
||||
finally
|
||||
@@ -109,7 +109,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
var items =
|
||||
db.Fetch<dynamic>(
|
||||
"SELECT TABLE_NAME, COLUMN_NAME, CONSTRAINT_NAME FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE TABLE_SCHEMA = @TableSchema",
|
||||
new {TableSchema = db.Connection.Database});
|
||||
new { TableSchema = db.Connection.Database });
|
||||
list =
|
||||
items.Select(
|
||||
item =>
|
||||
@@ -133,7 +133,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
db.ExecuteScalar<long>("SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES " +
|
||||
"WHERE TABLE_NAME = @TableName AND " +
|
||||
"TABLE_SCHEMA = @TableSchema",
|
||||
new {TableName = tableName, TableSchema = db.Connection.Database});
|
||||
new { TableName = tableName, TableSchema = db.Connection.Database });
|
||||
|
||||
}
|
||||
finally
|
||||
@@ -213,7 +213,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
|
||||
return string.Format(CreateIndex,
|
||||
GetQuotedName(name),
|
||||
GetQuotedTableName(index.TableName),
|
||||
GetQuotedTableName(index.TableName),
|
||||
columns);
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotSupportedException("Default constraints are not supported in MySql");
|
||||
return "ALTER TABLE {0} ALTER COLUMN {1} DROP DEFAULT";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
|
||||
public override string CreateForeignKeyConstraint { get { return "ALTER TABLE {0} ADD FOREIGN KEY ({1}) REFERENCES {2} ({3}){4}{5}"; } }
|
||||
|
||||
public override string DeleteConstraint { get { return "ALTER TABLE {0} DROP {1}{2}"; } }
|
||||
public override string DeleteConstraint { get { return "ALTER TABLE {0} DROP {1} {2}"; } }
|
||||
|
||||
public override string DropIndex { get { return "DROP INDEX {0} ON {1}"; } }
|
||||
|
||||
@@ -318,11 +318,11 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
db.OpenSharedConnection();
|
||||
// Need 4 @ signs as it is regarded as a parameter, @@ escapes it once, @@@@ escapes it twice
|
||||
var lowerCaseTableNames = db.Fetch<int>("SELECT @@@@Global.lower_case_table_names");
|
||||
|
||||
if(lowerCaseTableNames.Any())
|
||||
|
||||
if (lowerCaseTableNames.Any())
|
||||
supportsCaseInsensitiveQueries = lowerCaseTableNames.First() == 1;
|
||||
}
|
||||
catch(Exception ex)
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logging.LogHelper.Error<MySqlSyntaxProvider>("Error querying for lower_case support", ex);
|
||||
}
|
||||
|
||||
@@ -309,7 +309,7 @@ namespace Umbraco.Core
|
||||
|
||||
//return false but specify this exception type so we can detect it
|
||||
if (typeElement == null)
|
||||
return Attempt<IEnumerable<string>>.Fail(new CachedPluginNotFoundInFile());
|
||||
return Attempt<IEnumerable<string>>.Fail(new CachedPluginNotFoundInFileException());
|
||||
|
||||
//return success
|
||||
return Attempt.Succeed(typeElement.Elements("add")
|
||||
@@ -459,24 +459,24 @@ namespace Umbraco.Core
|
||||
private readonly HashSet<TypeList> _types = new HashSet<TypeList>();
|
||||
private IEnumerable<Assembly> _assemblies;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns all found property editors
|
||||
/// Returns all found property editors (based on the resolved Iparameter editors - this saves a scan)
|
||||
/// </summary>
|
||||
internal IEnumerable<Type> ResolvePropertyEditors()
|
||||
{
|
||||
//return all proeprty editor types found except for the base property editor type
|
||||
return ResolveTypes<PropertyEditor>().ToArray()
|
||||
.Except(new[] {typeof (PropertyEditor)});
|
||||
return ResolveTypes<IParameterEditor>()
|
||||
.Where(x => x.IsType<PropertyEditor>())
|
||||
.Except(new[] { typeof(PropertyEditor) });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns all found parameter editors
|
||||
/// Returns all found parameter editors (which includes property editors)
|
||||
/// </summary>
|
||||
internal IEnumerable<Type> ResolveParameterEditors()
|
||||
{
|
||||
//return all paramter editor types found except for the base property editor type
|
||||
return ResolveTypes<IParameterEditor>().ToArray()
|
||||
return ResolveTypes<IParameterEditor>()
|
||||
.Except(new[] { typeof(ParameterEditor), typeof(PropertyEditor) });
|
||||
}
|
||||
|
||||
@@ -671,8 +671,15 @@ namespace Umbraco.Core
|
||||
{
|
||||
//check if the TypeList already exists, if so return it, if not we'll create it
|
||||
var typeList = _types.SingleOrDefault(x => x.IsTypeList<T>(resolutionType));
|
||||
|
||||
//need to put some logging here to try to figure out why this is happening: http://issues.umbraco.org/issue/U4-3505
|
||||
if (cacheResult && typeList != null)
|
||||
{
|
||||
LogHelper.Debug<PluginManager>("Existing typeList found for {0} with resolution type {1}", () => typeof(T), () => resolutionType);
|
||||
}
|
||||
|
||||
//if we're not caching the result then proceed, or if the type list doesn't exist then proceed
|
||||
if (!cacheResult || typeList == null)
|
||||
if (cacheResult == false || typeList == null)
|
||||
{
|
||||
//upgrade to a write lock since we're adding to the collection
|
||||
readLock.UpgradeToWriteLock();
|
||||
@@ -681,15 +688,17 @@ namespace Umbraco.Core
|
||||
|
||||
//we first need to look into our cache file (this has nothing to do with the 'cacheResult' parameter which caches in memory).
|
||||
//if assemblies have not changed and the cache file actually exists, then proceed to try to lookup by the cache file.
|
||||
if (!HaveAssembliesChanged && File.Exists(GetPluginListFilePath()))
|
||||
if (HaveAssembliesChanged == false && File.Exists(GetPluginListFilePath()))
|
||||
{
|
||||
var fileCacheResult = TryGetCachedPluginsFromFile<T>(resolutionType);
|
||||
|
||||
//here we need to identify if the CachedPluginNotFoundInFile was the exception, if it was then we need to re-scan
|
||||
//in some cases the plugin will not have been scanned for on application startup, but the assemblies haven't changed
|
||||
//so in this instance there will never be a result.
|
||||
if (fileCacheResult.Exception != null && fileCacheResult.Exception is CachedPluginNotFoundInFile)
|
||||
if (fileCacheResult.Exception != null && fileCacheResult.Exception is CachedPluginNotFoundInFileException)
|
||||
{
|
||||
LogHelper.Debug<PluginManager>("Tried to find typelist for type {0} and resolution {1} in file cache but the type was not found so loading types by assembly scan ", () => typeof(T), () => resolutionType);
|
||||
|
||||
//we don't have a cache for this so proceed to look them up by scanning
|
||||
LoadViaScanningAndUpdateCacheFile<T>(typeList, resolutionType, finder);
|
||||
}
|
||||
@@ -717,20 +726,22 @@ namespace Umbraco.Core
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!successfullyLoadedFromCache)
|
||||
if (successfullyLoadedFromCache == false)
|
||||
{
|
||||
//we need to manually load by scanning if loading from the file was not successful.
|
||||
LoadViaScanningAndUpdateCacheFile<T>(typeList, resolutionType, finder);
|
||||
}
|
||||
else
|
||||
{
|
||||
LogHelper.Debug<PluginManager>("Loaded plugin types " + typeof(T).FullName + " from persisted cache");
|
||||
LogHelper.Debug<PluginManager>("Loaded plugin types {0} with resolution {1} from persisted cache", () => typeof(T), () => resolutionType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LogHelper.Debug<PluginManager>("Assembly changes detected, loading types {0} for resolution {1} by assembly scan", () => typeof(T), () => resolutionType);
|
||||
|
||||
//we don't have a cache for this so proceed to look them up by scanning
|
||||
LoadViaScanningAndUpdateCacheFile<T>(typeList, resolutionType, finder);
|
||||
}
|
||||
@@ -739,7 +750,10 @@ namespace Umbraco.Core
|
||||
if (cacheResult)
|
||||
{
|
||||
//add the type list to the collection
|
||||
_types.Add(typeList);
|
||||
var added = _types.Add(typeList);
|
||||
|
||||
LogHelper.Debug<PluginManager>("Caching of typelist for type {0} and resolution {1} was successful = {2}", () => typeof(T), () => resolutionType, () => added);
|
||||
|
||||
}
|
||||
}
|
||||
typesFound = typeList.GetTypes().ToList();
|
||||
@@ -863,14 +877,14 @@ namespace Umbraco.Core
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the current TypeList is of the same type and of the same type
|
||||
/// Returns true if the current TypeList is of the same lookup type
|
||||
/// </summary>
|
||||
/// <typeparam name="TLookup"></typeparam>
|
||||
/// <param name="resolutionType"></param>
|
||||
/// <returns></returns>
|
||||
public override bool IsTypeList<TLookup>(TypeResolutionKind resolutionType)
|
||||
{
|
||||
return _resolutionType == resolutionType && (typeof(T)).IsType<TLookup>();
|
||||
return _resolutionType == resolutionType && (typeof(T)) == typeof(TLookup);
|
||||
}
|
||||
|
||||
public override IEnumerable<Type> GetTypes()
|
||||
@@ -883,7 +897,7 @@ namespace Umbraco.Core
|
||||
/// This class is used simply to determine that a plugin was not found in the cache plugin list with the specified
|
||||
/// TypeResolutionKind.
|
||||
/// </summary>
|
||||
internal class CachedPluginNotFoundInFile : Exception
|
||||
internal class CachedPluginNotFoundInFileException : Exception
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Xml;
|
||||
using System.Xml.Linq;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence;
|
||||
using umbraco.interfaces;
|
||||
|
||||
namespace Umbraco.Core.PropertyEditors
|
||||
@@ -11,9 +14,11 @@ namespace Umbraco.Core.PropertyEditors
|
||||
/// This is used purelty to attempt to maintain some backwards compatibility with new property editors that don't have a
|
||||
/// legacy property editor predecessor when developers are using the legacy APIs
|
||||
/// </summary>
|
||||
internal class BackwardsCompatibleData : IData
|
||||
internal class BackwardsCompatibleData : IData, IDataValueSetter
|
||||
{
|
||||
private readonly string _propertyEditorAlias;
|
||||
private bool _valueLoaded = false;
|
||||
private object _value;
|
||||
|
||||
public BackwardsCompatibleData(string propertyEditorAlias)
|
||||
{
|
||||
@@ -21,8 +26,33 @@ namespace Umbraco.Core.PropertyEditors
|
||||
}
|
||||
|
||||
public int PropertyId { set; get; }
|
||||
|
||||
public object Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// This returns the value
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// There's code here to load the data from the db just like the legacy DefaultData does but in theory the value of this
|
||||
/// IData should always be set using the IDataValueSetter.SetValue which is done externally. Just in case there's some edge
|
||||
/// case out there that doesn't set this value, we'll go and get it based on the same logic in DefaultData.
|
||||
/// </remarks>
|
||||
public virtual object Value
|
||||
{
|
||||
get
|
||||
{
|
||||
//Lazy load the value when it is required.
|
||||
if (_valueLoaded == false)
|
||||
{
|
||||
LoadValueFromDatabase();
|
||||
_valueLoaded = true;
|
||||
}
|
||||
return _value;
|
||||
}
|
||||
set
|
||||
{
|
||||
_value = value;
|
||||
_valueLoaded = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public XmlNode ToXMl(XmlDocument data)
|
||||
@@ -66,7 +96,7 @@ namespace Umbraco.Core.PropertyEditors
|
||||
return doc.CreateCDataSection(sValue);
|
||||
}
|
||||
|
||||
public void MakeNew(int PropertyId)
|
||||
public void MakeNew(int propertyId)
|
||||
{
|
||||
//DO nothing
|
||||
}
|
||||
@@ -78,5 +108,40 @@ namespace Umbraco.Core.PropertyEditors
|
||||
+ " is a legacy object and is not supported by runtime generated "
|
||||
+ " instances to maintain backwards compatibility with the legacy APIs. Consider upgrading your code to use the new Services APIs.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is here for performance reasons since in some cases we will have already resolved the value from the db
|
||||
/// and want to just give this object the value so it doesn't go re-look it up from the database.
|
||||
/// </summary>
|
||||
/// <param name="val"></param>
|
||||
/// <param name="strDbType"></param>
|
||||
void IDataValueSetter.SetValue(object val, string strDbType)
|
||||
{
|
||||
_value = val;
|
||||
_valueLoaded = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// In the case where the value is not set, this will go get it from the db ourselves - this shouldn't really ever be needed,
|
||||
/// the value should always be set with IDataValueSetter.SetValue
|
||||
/// </summary>
|
||||
private void LoadValueFromDatabase()
|
||||
{
|
||||
var sql = new Sql();
|
||||
sql.Select("*")
|
||||
.From<PropertyDataDto>()
|
||||
.InnerJoin<PropertyTypeDto>()
|
||||
.On<PropertyTypeDto, PropertyDataDto>(x => x.Id, y => y.PropertyTypeId)
|
||||
.InnerJoin<DataTypeDto>()
|
||||
.On<DataTypeDto, PropertyTypeDto>(x => x.DataTypeId, y => y.DataTypeId)
|
||||
.Where<PropertyDataDto>(x => x.Id == PropertyId);
|
||||
var dto = ApplicationContext.Current.DatabaseContext.Database.Fetch<PropertyDataDto, PropertyTypeDto, DataTypeDto>(sql).FirstOrDefault();
|
||||
|
||||
if (dto != null)
|
||||
{
|
||||
//get the value for the data type, if null, set it to an empty string
|
||||
_value = dto.GetValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,10 +12,13 @@ namespace Umbraco.Core.PropertyEditors
|
||||
{
|
||||
public override IEnumerable<ValidationResult> Validate(object value, string config, PreValueCollection preValues, PropertyEditor editor)
|
||||
{
|
||||
var result = value.TryConvertTo<int>();
|
||||
if (result.Success == false)
|
||||
if (value != null && value.ToString() != string.Empty)
|
||||
{
|
||||
yield return new ValidationResult("The value " + value + " is not a valid integer", new[] {"value"});
|
||||
var result = value.TryConvertTo<int>();
|
||||
if (result.Success == false)
|
||||
{
|
||||
yield return new ValidationResult("The value " + value + " is not a valid integer", new[] { "value" });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -132,12 +132,17 @@ namespace Umbraco.Core.PropertyEditors
|
||||
/// <remarks>
|
||||
/// This is generally not going to be used by anything unless a property editor wants to change the merging
|
||||
/// functionality or needs to convert some legacy persisted data, or convert the string values to strongly typed values in json (i.e. booleans)
|
||||
///
|
||||
/// IMPORTANT! When using this method the default pre values dictionary should not be modified which would change the property editor's global
|
||||
/// singleton pre-values!
|
||||
/// </remarks>
|
||||
public virtual IDictionary<string, object> ConvertDbToEditor(IDictionary<string, object> defaultPreVals, PreValueCollection persistedPreVals)
|
||||
{
|
||||
if (defaultPreVals == null)
|
||||
//we'll make a copy since we'll merge into the defaults - but we don't want to overwrite the global singleton ones passed in!
|
||||
var defaultPreValCopy = new Dictionary<string, object>();
|
||||
if (defaultPreVals != null)
|
||||
{
|
||||
defaultPreVals = new Dictionary<string, object>();
|
||||
defaultPreValCopy = new Dictionary<string, object>(defaultPreVals);
|
||||
}
|
||||
|
||||
if (persistedPreVals.IsDictionaryBased)
|
||||
@@ -147,13 +152,13 @@ namespace Umbraco.Core.PropertyEditors
|
||||
{
|
||||
//The persisted dictionary contains values of type PreValue which contain the ID and the Value, we don't care
|
||||
// about the Id, just the value so ignore the id.
|
||||
defaultPreVals[item.Key] = item.Value.Value;
|
||||
defaultPreValCopy[item.Key] = item.Value.Value;
|
||||
}
|
||||
//now we're going to try to see if any of the values are JSON, if they are we'll convert them to real JSON objects
|
||||
// so they can be consumed as real json in angular!
|
||||
ConvertItemsToJsonIfDetected(defaultPreVals);
|
||||
ConvertItemsToJsonIfDetected(defaultPreValCopy);
|
||||
|
||||
return defaultPreVals;
|
||||
return defaultPreValCopy;
|
||||
}
|
||||
|
||||
//it's an array so need to format it
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Security.Principal;
|
||||
using System.Threading;
|
||||
using System.Web;
|
||||
@@ -127,6 +129,26 @@ namespace Umbraco.Core.Security
|
||||
Logout(http, UmbracoConfig.For.UmbracoSettings().Security.AuthCookieName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This clears the forms authentication cookie
|
||||
/// </summary>
|
||||
/// <param name="response"></param>
|
||||
public static void UmbracoLogout(this HttpResponseMessage response)
|
||||
{
|
||||
if (response == null) throw new ArgumentNullException("response");
|
||||
//remove the cookie
|
||||
var cookie = new CookieHeaderValue(UmbracoConfig.For.UmbracoSettings().Security.AuthCookieName, "")
|
||||
{
|
||||
Expires = DateTime.Now.AddYears(-1),
|
||||
Path = "/"
|
||||
};
|
||||
response.Headers.AddCookies(new[] { cookie });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This clears the forms authentication cookie
|
||||
/// </summary>
|
||||
/// <param name="http"></param>
|
||||
internal static void UmbracoLogout(this HttpContext http)
|
||||
{
|
||||
if (http == null) throw new ArgumentNullException("http");
|
||||
@@ -143,7 +165,9 @@ namespace Umbraco.Core.Security
|
||||
if (http == null) throw new ArgumentNullException("http");
|
||||
return RenewAuthTicket(http,
|
||||
UmbracoConfig.For.UmbracoSettings().Security.AuthCookieName,
|
||||
UmbracoConfig.For.UmbracoSettings().Security.AuthCookieDomain);
|
||||
UmbracoConfig.For.UmbracoSettings().Security.AuthCookieDomain,
|
||||
//Umbraco has always persisted it's original cookie for 1 day so we'll keep it that way
|
||||
1440);
|
||||
}
|
||||
|
||||
internal static bool RenewUmbracoAuthTicket(this HttpContext http)
|
||||
@@ -279,8 +303,9 @@ namespace Umbraco.Core.Security
|
||||
/// <param name="http"></param>
|
||||
/// <param name="cookieName"></param>
|
||||
/// <param name="cookieDomain"></param>
|
||||
/// <param name="minutesPersisted"></param>
|
||||
/// <returns>true if there was a ticket to renew otherwise false if there was no ticket</returns>
|
||||
private static bool RenewAuthTicket(this HttpContextBase http, string cookieName, string cookieDomain)
|
||||
private static bool RenewAuthTicket(this HttpContextBase http, string cookieName, string cookieDomain, int minutesPersisted)
|
||||
{
|
||||
if (http == null) throw new ArgumentNullException("http");
|
||||
//get the ticket
|
||||
@@ -301,10 +326,17 @@ namespace Umbraco.Core.Security
|
||||
var hash = FormsAuthentication.Encrypt(renewed);
|
||||
//write it to the response
|
||||
var cookie = new HttpCookie(cookieName, hash)
|
||||
{
|
||||
Expires = formsCookie.Expires,
|
||||
{
|
||||
Expires = DateTime.Now.AddMinutes(minutesPersisted),
|
||||
Domain = cookieDomain
|
||||
};
|
||||
|
||||
if (GlobalSettings.UseSSL)
|
||||
cookie.Secure = true;
|
||||
|
||||
//ensure http only, this should only be able to be accessed via the server
|
||||
cookie.HttpOnly = true;
|
||||
|
||||
//rewrite the cooke
|
||||
http.Response.Cookies.Set(cookie);
|
||||
return true;
|
||||
|
||||
@@ -58,6 +58,11 @@ namespace Umbraco.Core.Security
|
||||
get { return DeserializedData.Culture; }
|
||||
}
|
||||
|
||||
public string SessionId
|
||||
{
|
||||
get { return DeserializedData.SessionId; }
|
||||
}
|
||||
|
||||
//public int SessionTimeout
|
||||
//{
|
||||
// get
|
||||
|
||||
@@ -16,6 +16,26 @@ namespace Umbraco.Core.Security
|
||||
Roles = new string[] {};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Use this constructor to create/assign new UserData to the ticket
|
||||
/// </summary>
|
||||
/// <param name="sessionId">
|
||||
/// A unique id that is assigned to this ticket
|
||||
/// </param>
|
||||
public UserData(string sessionId)
|
||||
{
|
||||
SessionId = sessionId;
|
||||
AllowedApplications = new string[] { };
|
||||
Roles = new string[] { };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is used to Id the current ticket which we can then use to mitigate csrf attacks
|
||||
/// and other things that require request validation.
|
||||
/// </summary>
|
||||
[DataMember(Name = "sessionId")]
|
||||
public string SessionId { get; set; }
|
||||
|
||||
[DataMember(Name = "id")]
|
||||
public object Id { get; set; }
|
||||
|
||||
|
||||
@@ -795,7 +795,7 @@ namespace Umbraco.Core.Services
|
||||
var repository = _repositoryFactory.CreateContentRepository(uow);
|
||||
//NOTE What about content that has the contenttype as part of its composition?
|
||||
var query = Query<IContent>.Builder.Where(x => x.ContentTypeId == contentTypeId);
|
||||
var contents = repository.GetByQuery(query);
|
||||
var contents = repository.GetByQuery(query).ToArray();
|
||||
|
||||
if (Deleting.IsRaisedEventCancelled(new DeleteEventArgs<IContent>(contents), this))
|
||||
return;
|
||||
@@ -1429,49 +1429,48 @@ namespace Umbraco.Core.Services
|
||||
var list = new List<IContent>();
|
||||
|
||||
var uow = _uowProvider.GetUnitOfWork();
|
||||
using (var repository = _repositoryFactory.CreateContentRepository(uow))
|
||||
|
||||
//First we're going to get the data that needs to be inserted before clearing anything, this
|
||||
//ensures that we don't accidentally leave the content xml table empty if something happens
|
||||
//during the lookup process.
|
||||
|
||||
list.AddRange(contentTypeIds.Any() == false
|
||||
? GetAllPublished()
|
||||
: contentTypeIds.SelectMany(GetPublishedContentOfContentType));
|
||||
|
||||
var xmlItems = new List<ContentXmlDto>();
|
||||
foreach (var c in list)
|
||||
{
|
||||
//First we're going to get the data that needs to be inserted before clearing anything, this
|
||||
//ensures that we don't accidentally leave the content xml table empty if something happens
|
||||
//during the lookup process.
|
||||
var xml = c.ToXml();
|
||||
xmlItems.Add(new ContentXmlDto { NodeId = c.Id, Xml = xml.ToString(SaveOptions.None) });
|
||||
}
|
||||
|
||||
list.AddRange(contentTypeIds.Any() == false
|
||||
? GetAllPublished()
|
||||
: contentTypeIds.SelectMany(GetPublishedContentOfContentType));
|
||||
|
||||
var xmlItems = new List<ContentXmlDto>();
|
||||
foreach (var c in list)
|
||||
//Ok, now we need to remove the data and re-insert it, we'll do this all in one transaction too.
|
||||
using (var tr = uow.Database.GetTransaction())
|
||||
{
|
||||
if (contentTypeIds.Any() == false)
|
||||
{
|
||||
var xml = c.ToXml();
|
||||
xmlItems.Add(new ContentXmlDto {NodeId = c.Id, Xml = xml.ToString(SaveOptions.None)});
|
||||
}
|
||||
|
||||
//Ok, now we need to remove the data and re-insert it, we'll do this all in one transaction too.
|
||||
using (var tr = uow.Database.GetTransaction())
|
||||
{
|
||||
if (contentTypeIds.Any() == false)
|
||||
{
|
||||
//Remove all Document records from the cmsContentXml table (DO NOT REMOVE Media/Members!)
|
||||
uow.Database.Execute(@"DELETE FROM cmsContentXml WHERE nodeId IN
|
||||
//Remove all Document records from the cmsContentXml table (DO NOT REMOVE Media/Members!)
|
||||
uow.Database.Execute(@"DELETE FROM cmsContentXml WHERE nodeId IN
|
||||
(SELECT DISTINCT cmsContentXml.nodeId FROM cmsContentXml
|
||||
INNER JOIN cmsDocument ON cmsContentXml.nodeId = cmsDocument.nodeId)");
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var id in contentTypeIds)
|
||||
{
|
||||
foreach (var id in contentTypeIds)
|
||||
{
|
||||
//first we'll clear out the data from the cmsContentXml table for this type
|
||||
uow.Database.Execute(@"delete from cmsContentXml where nodeId in
|
||||
//first we'll clear out the data from the cmsContentXml table for this type
|
||||
uow.Database.Execute(@"delete from cmsContentXml where nodeId in
|
||||
(select cmsDocument.nodeId from cmsDocument
|
||||
inner join cmsContent on cmsDocument.nodeId = cmsContent.nodeId
|
||||
where published = 1 and contentType = @contentTypeId)", new { contentTypeId = id });
|
||||
}
|
||||
}
|
||||
|
||||
//bulk insert it into the database
|
||||
uow.Database.BulkInsertRecords(xmlItems, tr);
|
||||
}
|
||||
|
||||
//bulk insert it into the database
|
||||
uow.Database.BulkInsertRecords(xmlItems, tr);
|
||||
}
|
||||
|
||||
Audit.Add(AuditTypes.Publish, "RebuildXmlStructures completed, the xml has been regenerated in the database", 0, -1);
|
||||
}
|
||||
}
|
||||
@@ -1657,6 +1656,10 @@ namespace Umbraco.Core.Services
|
||||
using (var repository = _repositoryFactory.CreateContentRepository(uow))
|
||||
{
|
||||
//Since this is the Save and Publish method, the content should be saved even though the publish fails or isn't allowed
|
||||
if (content.HasIdentity == false)
|
||||
{
|
||||
content.CreatorId = userId;
|
||||
}
|
||||
content.WriterId = userId;
|
||||
|
||||
repository.AddOrUpdate(content);
|
||||
@@ -1717,6 +1720,10 @@ namespace Umbraco.Core.Services
|
||||
var uow = _uowProvider.GetUnitOfWork();
|
||||
using (var repository = _repositoryFactory.CreateContentRepository(uow))
|
||||
{
|
||||
if (content.HasIdentity == false)
|
||||
{
|
||||
content.CreatorId = userId;
|
||||
}
|
||||
content.WriterId = userId;
|
||||
|
||||
//Only change the publish state if the "previous" version was actually published or marked as unpublished
|
||||
@@ -1933,6 +1940,7 @@ namespace Umbraco.Core.Services
|
||||
/// <summary>
|
||||
/// Occurs before Create
|
||||
/// </summary>
|
||||
[Obsolete("This event should not be used, it was originally created for backwards compatibility for the legacy API. To modify a new document before it is saved use the Saving event")]
|
||||
public static event TypedEventHandler<IContentService, NewEventArgs<IContent>> Creating;
|
||||
|
||||
/// <summary>
|
||||
@@ -1942,6 +1950,7 @@ namespace Umbraco.Core.Services
|
||||
/// Please note that the Content object has been created, but might not have been saved
|
||||
/// so it does not have an identity yet (meaning no Id has been set).
|
||||
/// </remarks>
|
||||
[Obsolete("This event should not be used, it was originally created for backwards compatibility for the legacy API. To modify a new document before it is saved use the Saving event")]
|
||||
public static event TypedEventHandler<IContentService, NewEventArgs<IContent>> Created;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -9,6 +9,13 @@ namespace Umbraco.Core.Services
|
||||
/// </summary>
|
||||
internal interface IMemberService : IMembershipMemberService
|
||||
{
|
||||
/// <summary>
|
||||
/// Checks if a member with the id exists
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
bool Exists(int id);
|
||||
|
||||
IMember GetById(int id);
|
||||
IMember GetByKey(Guid id);
|
||||
IEnumerable<IMember> GetMembersByMemberType(string memberTypeAlias);
|
||||
@@ -26,6 +33,13 @@ namespace Umbraco.Core.Services
|
||||
/// </remarks>
|
||||
internal interface IMembershipMemberService : IService
|
||||
{
|
||||
/// <summary>
|
||||
/// Checks if a member with the username exists
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
bool Exists(string username);
|
||||
|
||||
IMember CreateMember(string username, string email, string password, string memberTypeAlias, int userId = 0);
|
||||
|
||||
IMember GetById(object id);
|
||||
|
||||
@@ -526,13 +526,19 @@ namespace Umbraco.Core.Services
|
||||
|
||||
var uow = _uowProvider.GetUnitOfWork();
|
||||
using (var repository = _repositoryFactory.CreateMediaRepository(uow))
|
||||
{
|
||||
{
|
||||
//Remove 'published' xml from the cmsContentXml table for the unpublished media
|
||||
uow.Database.Delete<ContentXmlDto>("WHERE nodeId = @Id", new { Id = media.Id });
|
||||
|
||||
media.ChangeTrashedState(true, -21);
|
||||
repository.AddOrUpdate(media);
|
||||
|
||||
//Loop through descendants to update their trash state, but ensuring structure by keeping the ParentId
|
||||
foreach (var descendant in descendants)
|
||||
{
|
||||
//Remove 'published' xml from the cmsContentXml table for the unpublished media
|
||||
uow.Database.Delete<ContentXmlDto>("WHERE nodeId = @Id", new { Id = descendant.Id });
|
||||
|
||||
descendant.ChangeTrashedState(true, descendant.ParentId);
|
||||
repository.AddOrUpdate(descendant);
|
||||
}
|
||||
@@ -840,7 +846,7 @@ namespace Umbraco.Core.Services
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Rebuilds all xml content in the cmsContentXml table for all media
|
||||
/// </summary>
|
||||
@@ -856,7 +862,34 @@ namespace Umbraco.Core.Services
|
||||
var list = new List<IMedia>();
|
||||
|
||||
var uow = _uowProvider.GetUnitOfWork();
|
||||
using (var repository = _repositoryFactory.CreateContentRepository(uow))
|
||||
|
||||
//First we're going to get the data that needs to be inserted before clearing anything, this
|
||||
//ensures that we don't accidentally leave the content xml table empty if something happens
|
||||
//during the lookup process.
|
||||
|
||||
if (contentTypeIds.Any() == false)
|
||||
{
|
||||
var rootMedia = GetRootMedia();
|
||||
foreach (var media in rootMedia)
|
||||
{
|
||||
list.Add(media);
|
||||
list.AddRange(GetDescendants(media));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
list.AddRange(contentTypeIds.SelectMany(i => GetMediaOfMediaType(i).Where(media => media.Trashed == false)));
|
||||
}
|
||||
|
||||
var xmlItems = new List<ContentXmlDto>();
|
||||
foreach (var c in list)
|
||||
{
|
||||
var xml = c.ToXml();
|
||||
xmlItems.Add(new ContentXmlDto { NodeId = c.Id, Xml = xml.ToString(SaveOptions.None) });
|
||||
}
|
||||
|
||||
//Ok, now we need to remove the data and re-insert it, we'll do this all in one transaction too.
|
||||
using (var tr = uow.Database.GetTransaction())
|
||||
{
|
||||
if (contentTypeIds.Any() == false)
|
||||
{
|
||||
@@ -865,16 +898,7 @@ namespace Umbraco.Core.Services
|
||||
(SELECT DISTINCT cmsContentXml.nodeId FROM cmsContentXml
|
||||
INNER JOIN umbracoNode ON cmsContentXml.nodeId = umbracoNode.id
|
||||
WHERE nodeObjectType = @nodeObjectType)",
|
||||
new {nodeObjectType = Constants.ObjectTypes.Media});
|
||||
|
||||
// Consider creating a Path query instead of recursive method:
|
||||
// var query = Query<IContent>.Builder.Where(x => x.Path.StartsWith("-1"));
|
||||
var rootMedia = GetRootMedia();
|
||||
foreach (var media in rootMedia)
|
||||
{
|
||||
list.Add(media);
|
||||
list.AddRange(GetDescendants(media));
|
||||
}
|
||||
new { nodeObjectType = Constants.ObjectTypes.Media });
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -886,24 +910,14 @@ namespace Umbraco.Core.Services
|
||||
INNER JOIN umbracoNode ON cmsContentXml.nodeId = umbracoNode.id
|
||||
INNER JOIN cmsContent ON cmsContent.nodeId = umbracoNode.id
|
||||
WHERE nodeObjectType = @nodeObjectType AND cmsContent.contentType = @contentTypeId)",
|
||||
new {contentTypeId = id, nodeObjectType = Constants.ObjectTypes.Media});
|
||||
|
||||
//now get all media objects of this type and add to the list
|
||||
list.AddRange(GetMediaOfMediaType(id));
|
||||
new { contentTypeId = id, nodeObjectType = Constants.ObjectTypes.Media });
|
||||
}
|
||||
}
|
||||
|
||||
var xmlItems = new List<ContentXmlDto>();
|
||||
foreach (var c in list)
|
||||
{
|
||||
//generate the xml
|
||||
var xml = c.ToXml();
|
||||
//create the dto to insert
|
||||
xmlItems.Add(new ContentXmlDto { NodeId = c.Id, Xml = xml.ToString(SaveOptions.None) });
|
||||
}
|
||||
//bulk insert it into the database
|
||||
uow.Database.BulkInsertRecords(xmlItems);
|
||||
uow.Database.BulkInsertRecords(xmlItems, tr);
|
||||
}
|
||||
|
||||
Audit.Add(AuditTypes.Publish, "RebuildXmlStructures completed, the xml has been regenerated in the database", 0, -1);
|
||||
}
|
||||
}
|
||||
@@ -998,6 +1012,7 @@ namespace Umbraco.Core.Services
|
||||
/// <summary>
|
||||
/// Occurs before Create
|
||||
/// </summary>
|
||||
[Obsolete("This event should not be used, it was originally created for backwards compatibility for the legacy API. To modify a new document before it is saved use the Saving event")]
|
||||
public static event TypedEventHandler<IMediaService, NewEventArgs<IMedia>> Creating;
|
||||
|
||||
/// <summary>
|
||||
@@ -1007,6 +1022,7 @@ namespace Umbraco.Core.Services
|
||||
/// Please note that the Media object has been created, but not saved
|
||||
/// so it does not have an identity yet (meaning no Id has been set).
|
||||
/// </remarks>
|
||||
[Obsolete("This event should not be used, it was originally created for backwards compatibility for the legacy API. To modify a new document before it is saved use the Saving event")]
|
||||
public static event TypedEventHandler<IMediaService, NewEventArgs<IMedia>> Created;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -38,6 +38,32 @@ namespace Umbraco.Core.Services
|
||||
|
||||
#region IMemberService Implementation
|
||||
|
||||
/// <summary>
|
||||
/// Checks if a member with the username exists
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
public bool Exists(string username)
|
||||
{
|
||||
using (var repository = _repositoryFactory.CreateMemberRepository(_uowProvider.GetUnitOfWork()))
|
||||
{
|
||||
return repository.Exists(username);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if a member with the id exists
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public bool Exists(int id)
|
||||
{
|
||||
using (var repository = _repositoryFactory.CreateMemberRepository(_uowProvider.GetUnitOfWork()))
|
||||
{
|
||||
return repository.Exists(id);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a Member by its integer Id
|
||||
/// </summary>
|
||||
@@ -46,7 +72,7 @@ namespace Umbraco.Core.Services
|
||||
public IMember GetById(int id)
|
||||
{
|
||||
using (var repository = _repositoryFactory.CreateMemberRepository(_uowProvider.GetUnitOfWork()))
|
||||
{
|
||||
{
|
||||
return repository.Get(id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -736,6 +736,21 @@ namespace Umbraco.Core.Services
|
||||
|
||||
#region DataTypes
|
||||
|
||||
/// <summary>
|
||||
/// Export a list of data types
|
||||
/// </summary>
|
||||
/// <param name="dataTypeDefinitions"></param>
|
||||
/// <returns></returns>
|
||||
internal XElement Export(IEnumerable<IDataTypeDefinition >dataTypeDefinitions)
|
||||
{
|
||||
var container = new XElement("DataTypes");
|
||||
foreach (var d in dataTypeDefinitions)
|
||||
{
|
||||
container.Add(Export(d));
|
||||
}
|
||||
return container;
|
||||
}
|
||||
|
||||
internal XElement Export(IDataTypeDefinition dataTypeDefinition)
|
||||
{
|
||||
var prevalues = new XElement("PreValues");
|
||||
@@ -848,8 +863,19 @@ namespace Umbraco.Core.Services
|
||||
var dataTypeDefinitionName = dataTypeElement.Attribute("Name").Value;
|
||||
var dataTypeDefinition = dataTypes.First(x => x.Name == dataTypeDefinitionName);
|
||||
|
||||
var values = prevaluesElement.Elements("PreValue").Select(prevalue => prevalue.Attribute("Value").Value).ToList();
|
||||
_dataTypeService.SavePreValues(dataTypeDefinition.Id, values);
|
||||
var valuesWithoutKeys = prevaluesElement.Elements("PreValue")
|
||||
.Where(x => ((string) x.Attribute("Alias")).IsNullOrWhiteSpace())
|
||||
.Select(x => x.Attribute("Value").Value);
|
||||
|
||||
var valuesWithKeys = prevaluesElement.Elements("PreValue")
|
||||
.Where(x => ((string) x.Attribute("Alias")).IsNullOrWhiteSpace() == false)
|
||||
.ToDictionary(key => (string) key.Attribute("Alias"), val => new PreValue((string) val.Attribute("Value")));
|
||||
|
||||
//save the values with keys
|
||||
_dataTypeService.SavePreValues(dataTypeDefinition.Id, valuesWithKeys);
|
||||
|
||||
//save the values without keys (this is legacy)
|
||||
_dataTypeService.SavePreValues(dataTypeDefinition.Id, valuesWithoutKeys);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -166,7 +166,8 @@ namespace Umbraco.Core.Services
|
||||
|
||||
var uow = _uowProvider.GetUnitOfWork();
|
||||
var sql = new Sql();
|
||||
sql.Select("app").From<User2AppDto>().Where("[user] = @userID", new {userID = user.Id});
|
||||
sql.Select("app").From<User2AppDto>()
|
||||
.Where<User2AppDto>(dto => dto.UserId == (int)user.Id);
|
||||
return uow.Database.Fetch<string>(sql);
|
||||
}
|
||||
|
||||
|
||||
@@ -63,6 +63,19 @@ namespace Umbraco.Core
|
||||
return mName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cleans string to aid in preventing xss attacks.
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
internal static string CleanForXss(this string input)
|
||||
{
|
||||
//remove any html
|
||||
input = input.StripHtml();
|
||||
//strip out any potential chars involved with XSS
|
||||
return input.ExceptChars(new HashSet<char>("*?(){}[];:%<>/\\|&'\"".ToCharArray()));
|
||||
}
|
||||
|
||||
public static string ExceptChars(this string str, HashSet<char> toExclude)
|
||||
{
|
||||
var sb = new StringBuilder(str.Length);
|
||||
@@ -907,7 +920,7 @@ namespace Umbraco.Core
|
||||
/// This allows you to replace strings like & , etc.. with your replacement character before the automatic
|
||||
/// reduction.
|
||||
/// </remarks>
|
||||
[UmbracoWillObsolete("This method should be removed. Use ToUrlSegment instead.")]
|
||||
[Obsolete("This method should be removed. Use ToUrlSegment instead.")]
|
||||
public static string ToUrlAlias(this string value, IDictionary<string, string> charReplacements, bool replaceDoubleDashes, bool stripNonAscii, bool urlEncode)
|
||||
{
|
||||
var helper = ShortStringHelper;
|
||||
@@ -931,7 +944,7 @@ namespace Umbraco.Core
|
||||
/// and <c>UmbracoSettings.RemoveDoubleDashesFromUrlReplacing</c>.</para>
|
||||
/// <para>Other helpers may use different parameters.</para>
|
||||
/// </remarks>
|
||||
[UmbracoWillObsolete("This method should be removed. Use ToUrlSegment instead.")]
|
||||
[Obsolete("This method should be removed. Use ToUrlSegment instead.")]
|
||||
public static string FormatUrl(this string url)
|
||||
{
|
||||
var helper = ShortStringHelper;
|
||||
@@ -1011,7 +1024,7 @@ namespace Umbraco.Core
|
||||
/// <param name="removeSpaces">Indicates whether spaces should be removed. THIS PARAMETER IS IGNORED.</param>
|
||||
/// <returns>The safe alias.</returns>
|
||||
/// <remarks>CamelCase, and remove spaces, whatever the parameters.</remarks>
|
||||
[UmbracoWillObsolete("This method should be removed. Use ToSafeAlias instead.")]
|
||||
[Obsolete("This method should be removed. Use ToSafeAlias instead.")]
|
||||
public static string ToUmbracoAlias(this string phrase, StringAliasCaseType caseType = StringAliasCaseType.CamelCase, bool removeSpaces = false)
|
||||
{
|
||||
var helper = ShortStringHelper;
|
||||
@@ -1056,7 +1069,7 @@ namespace Umbraco.Core
|
||||
/// <para>This is the legacy method, so we can't really change it, although it has issues (see unit tests).</para>
|
||||
/// <para>It does more than "converting the case", and also remove spaces, etc.</para>
|
||||
/// </remarks>
|
||||
[UmbracoWillObsolete("This method should be removed. Use CleanString instead.")]
|
||||
[Obsolete("This method should be removed. Use CleanString instead.")]
|
||||
public static string ConvertCase(this string phrase, StringAliasCaseType cases)
|
||||
{
|
||||
var helper = ShortStringHelper;
|
||||
|
||||
@@ -44,6 +44,9 @@
|
||||
<Reference Include="AutoMapper.Net4">
|
||||
<HintPath>..\packages\AutoMapper.3.0.0\lib\net40\AutoMapper.Net4.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="HtmlAgilityPack">
|
||||
<HintPath>..\packages\HtmlAgilityPack.1.4.6\lib\Net45\HtmlAgilityPack.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=1.2.11.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\log4net-mediumtrust.2.0.0\lib\log4net.dll</HintPath>
|
||||
@@ -72,6 +75,11 @@
|
||||
<HintPath>..\packages\SqlServerCE.4.0.0.0\lib\System.Data.SqlServerCe.Entity.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.4.0.30506.0\lib\net40\System.Net.Http.Formatting.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http.WebRequest" />
|
||||
<Reference Include="System.Runtime.Caching" />
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Transactions" />
|
||||
|
||||
@@ -202,20 +202,20 @@ namespace Umbraco.Core
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts from an XElement to an XmlElement
|
||||
/// </summary>
|
||||
/// <param name="xElement"></param>
|
||||
/// <returns></returns>
|
||||
public static XmlNode ToXmlElement(this XContainer xElement)
|
||||
{
|
||||
var xmlDocument = new XmlDocument();
|
||||
using (var xmlReader = xElement.CreateReader())
|
||||
{
|
||||
xmlDocument.Load(xmlReader);
|
||||
}
|
||||
return xmlDocument.DocumentElement;
|
||||
}
|
||||
///// <summary>
|
||||
///// Converts from an XElement to an XmlElement
|
||||
///// </summary>
|
||||
///// <param name="xElement"></param>
|
||||
///// <returns></returns>
|
||||
//public static XmlNode ToXmlElement(this XContainer xElement)
|
||||
//{
|
||||
// var xmlDocument = new XmlDocument();
|
||||
// using (var xmlReader = xElement.CreateReader())
|
||||
// {
|
||||
// xmlDocument.Load(xmlReader);
|
||||
// }
|
||||
// return xmlDocument.DocumentElement;
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// Converts from an XmlElement to an XElement
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="AutoMapper" version="3.0.0" targetFramework="net45" />
|
||||
<package id="HtmlAgilityPack" version="1.4.6" targetFramework="net45" />
|
||||
<package id="log4net-mediumtrust" version="2.0.0" targetFramework="net40" />
|
||||
<package id="Microsoft.AspNet.Mvc" version="4.0.30506.0" targetFramework="net40" />
|
||||
<package id="Microsoft.AspNet.Razor" version="2.0.30506.0" targetFramework="net40" />
|
||||
<package id="Microsoft.AspNet.WebApi.Client" version="4.0.30506.0" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="2.0.30506.0" targetFramework="net40" />
|
||||
<package id="Microsoft.Net.Http" version="2.0.20710.0" targetFramework="net45" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net40" />
|
||||
<package id="MiniProfiler" version="2.1.0" targetFramework="net40" />
|
||||
<package id="Newtonsoft.Json" version="4.5.11" targetFramework="net45" />
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Security.Claims;
|
||||
using System.Security.Principal;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using NUnit.Framework;
|
||||
using Umbraco.Core.Security;
|
||||
using Umbraco.Tests.TestHelpers;
|
||||
using Umbraco.Web.WebApi.Filters;
|
||||
|
||||
namespace Umbraco.Tests.AngularIntegration
|
||||
{
|
||||
[TestFixture]
|
||||
public class AngularAntiForgeryTests
|
||||
{
|
||||
|
||||
[TearDown]
|
||||
public void TearDown()
|
||||
{
|
||||
HttpContext.Current = null;
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Can_Validate_Generated_Tokens()
|
||||
{
|
||||
using (var writer = new StringWriter())
|
||||
{
|
||||
HttpContext.Current = new HttpContext(new HttpRequest("test.html", "http://test/", ""), new HttpResponse(writer));
|
||||
|
||||
string cookieToken, headerToken;
|
||||
AngularAntiForgeryHelper.GetTokens(out cookieToken, out headerToken);
|
||||
|
||||
Assert.AreEqual(true, AngularAntiForgeryHelper.ValidateTokens(cookieToken, headerToken));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Can_Validate_Generated_Tokens_With_User()
|
||||
{
|
||||
using (var writer = new StringWriter())
|
||||
{
|
||||
HttpContext.Current = new HttpContext(new HttpRequest("test.html", "http://test/", ""), new HttpResponse(writer))
|
||||
{
|
||||
User = new GenericPrincipal(new HttpListenerBasicIdentity("test", "test"), new string[] {})
|
||||
};
|
||||
|
||||
string cookieToken, headerToken;
|
||||
AngularAntiForgeryHelper.GetTokens(out cookieToken, out headerToken);
|
||||
|
||||
Assert.AreEqual(true, AngularAntiForgeryHelper.ValidateTokens(cookieToken, headerToken));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -157,7 +157,7 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings
|
||||
[Test]
|
||||
public void ResolveUrlsFromTextString()
|
||||
{
|
||||
Assert.IsTrue(SettingsSection.Content.ResolveUrlsFromTextString);
|
||||
Assert.IsFalse(SettingsSection.Content.ResolveUrlsFromTextString);
|
||||
}
|
||||
[Test]
|
||||
public void MacroErrors()
|
||||
|
||||
@@ -15,13 +15,13 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings
|
||||
Assert.IsTrue(SettingsSection.PackageRepositories.Repositories.ElementAt(0).Name == "Umbraco package Repository");
|
||||
Assert.IsTrue(SettingsSection.PackageRepositories.Repositories.ElementAt(0).HasCustomWebServiceUrl == false);
|
||||
Assert.IsTrue(SettingsSection.PackageRepositories.Repositories.ElementAt(0).WebServiceUrl == "/umbraco/webservices/api/repository.asmx");
|
||||
Assert.IsTrue(SettingsSection.PackageRepositories.Repositories.ElementAt(0).RepositoryUrl == "http://our.umbraco.org");
|
||||
Assert.IsTrue(SettingsSection.PackageRepositories.Repositories.ElementAt(0).RepositoryUrl == "http://packages.umbraco.org");
|
||||
|
||||
Assert.IsTrue(SettingsSection.PackageRepositories.Repositories.ElementAt(1).Id == Guid.Parse("163245E0-CD22-44B6-841A-1B9B9D2E955F"));
|
||||
Assert.IsTrue(SettingsSection.PackageRepositories.Repositories.ElementAt(1).Name == "Test Repo");
|
||||
Assert.IsTrue(SettingsSection.PackageRepositories.Repositories.ElementAt(1).HasCustomWebServiceUrl == false);
|
||||
Assert.IsTrue(SettingsSection.PackageRepositories.Repositories.ElementAt(0).WebServiceUrl == "/umbraco/webservices/api/repository.asmx");
|
||||
Assert.IsTrue(SettingsSection.PackageRepositories.Repositories.ElementAt(0).RepositoryUrl == "http://our.umbraco.org");
|
||||
Assert.IsTrue(SettingsSection.PackageRepositories.Repositories.ElementAt(0).RepositoryUrl == "http://packages.umbraco.org");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using NUnit.Framework;
|
||||
using Umbraco.Core;
|
||||
|
||||
namespace Umbraco.Tests.Configurations.UmbracoSettings
|
||||
{
|
||||
@@ -23,7 +24,7 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings
|
||||
[Test]
|
||||
public void AuthCookieName()
|
||||
{
|
||||
Assert.IsTrue(SettingsSection.Security.AuthCookieName == "UMB_UCONTEXT");
|
||||
Assert.IsTrue(SettingsSection.Security.AuthCookieName == Constants.Web.AuthCookieName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -122,11 +122,11 @@ namespace Umbraco.Tests.IO
|
||||
|
||||
Assert.AreEqual(DateTime.Today.Year, created.Year);
|
||||
Assert.AreEqual(DateTime.Today.Month, created.Month);
|
||||
Assert.AreEqual(DateTime.Today.Date, created.Date);
|
||||
Assert.AreEqual(DateTime.UtcNow.Date, created.Date);
|
||||
|
||||
Assert.AreEqual(DateTime.Today.Year, modified.Year);
|
||||
Assert.AreEqual(DateTime.Today.Month, modified.Month);
|
||||
Assert.AreEqual(DateTime.Today.Date, modified.Date);
|
||||
Assert.AreEqual(DateTime.UtcNow.Date, modified.Date);
|
||||
|
||||
_fileSystem.DeleteFile("test.txt");
|
||||
}
|
||||
|
||||
@@ -8,6 +8,14 @@ namespace Umbraco.Tests.Macros
|
||||
[TestFixture]
|
||||
public class MacroParserTests
|
||||
{
|
||||
[Test]
|
||||
public void Format_RTE_Data_For_Editor_With_No_Macros()
|
||||
{
|
||||
var content = @"<p>hello world</p>";
|
||||
var result = MacroTagParser.FormatRichTextContentForPersistence(content);
|
||||
Assert.AreEqual(@"<p>hello world</p>", content);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Format_RTE_Data_For_Editor()
|
||||
{
|
||||
@@ -158,5 +166,22 @@ asdfsdf
|
||||
</body>
|
||||
</html>".Replace(Environment.NewLine, string.Empty), result.Replace(Environment.NewLine, string.Empty));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Format_RTE_Data_For_Persistence_Custom_Single_Entry()
|
||||
{
|
||||
var content = @"<div class=""umb-macro-holder Test mceNonEditable umb-macro-mce_1""><!-- <?UMBRACO_MACRO macroAlias=""Test"" content=""1089"" textArea=""asdfasdf"" title="""" bool=""0"" number="""" contentType="""" multiContentType="""" multiProperties="""" properties="""" tabs="""" multiTabs="""" /> --><ins>
|
||||
<div class=""facts-box"">
|
||||
<div class=""fatcs-box-header"">
|
||||
<h3>null</h3>
|
||||
</div>
|
||||
<div class=""fatcs-box-body"">1089</div>
|
||||
</div>
|
||||
</ins></div>";
|
||||
var result = MacroTagParser.FormatRichTextContentForPersistence(content);
|
||||
|
||||
Assert.AreEqual(@"<?UMBRACO_MACRO macroAlias=""Test"" content=""1089"" textArea=""asdfasdf"" title="""" bool=""0"" number="""" contentType="""" multiContentType="""" multiProperties="""" properties="""" tabs="""" multiTabs="""" />", result);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -77,7 +77,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
Assert.That(dataTypeDefinitions, Is.Not.Null);
|
||||
Assert.That(dataTypeDefinitions.Any(), Is.True);
|
||||
Assert.That(dataTypeDefinitions.Any(x => x == null), Is.False);
|
||||
Assert.That(dataTypeDefinitions.Count(), Is.EqualTo(20));
|
||||
Assert.That(dataTypeDefinitions.Count(), Is.EqualTo(21));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -104,18 +104,6 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Cannot_Assign_Tags_To_Non_Existing_Property()
|
||||
{
|
||||
var provider = new PetaPocoUnitOfWorkProvider();
|
||||
var unitOfWork = provider.GetUnitOfWork();
|
||||
using (var repository = CreateRepository(unitOfWork))
|
||||
{
|
||||
Assert.Throws<InvalidOperationException>(() => repository.AssignTagsToProperty(1234, "hello", Enumerable.Empty<ITag>(), true));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Can_Create_Tag_Relations()
|
||||
{
|
||||
@@ -136,7 +124,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
{
|
||||
repository.AssignTagsToProperty(
|
||||
content.Id,
|
||||
contentType.PropertyTypes.First().Alias,
|
||||
contentType.PropertyTypes.First().Id,
|
||||
new[]
|
||||
{
|
||||
new Tag {Text = "tag1", Group = "test"},
|
||||
@@ -168,7 +156,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
{
|
||||
repository.AssignTagsToProperty(
|
||||
content.Id,
|
||||
contentType.PropertyTypes.First().Alias,
|
||||
contentType.PropertyTypes.First().Id,
|
||||
new[]
|
||||
{
|
||||
new Tag {Text = "tag1", Group = "test"},
|
||||
@@ -177,7 +165,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
|
||||
repository.AssignTagsToProperty(
|
||||
content.Id,
|
||||
contentType.PropertyTypes.First().Alias,
|
||||
contentType.PropertyTypes.First().Id,
|
||||
new[]
|
||||
{
|
||||
new Tag {Text = "tag3", Group = "test"},
|
||||
@@ -209,7 +197,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
{
|
||||
repository.AssignTagsToProperty(
|
||||
content.Id,
|
||||
contentType.PropertyTypes.First().Alias,
|
||||
contentType.PropertyTypes.First().Id,
|
||||
new[]
|
||||
{
|
||||
new Tag {Text = "tag1", Group = "test"},
|
||||
@@ -218,7 +206,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
|
||||
repository.AssignTagsToProperty(
|
||||
content.Id,
|
||||
contentType.PropertyTypes.First().Alias,
|
||||
contentType.PropertyTypes.First().Id,
|
||||
new[]
|
||||
{
|
||||
new Tag {Text = "tag3", Group = "test"},
|
||||
@@ -253,7 +241,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
{
|
||||
repository.AssignTagsToProperty(
|
||||
content.Id,
|
||||
contentType.PropertyTypes.First().Alias,
|
||||
contentType.PropertyTypes.First().Id,
|
||||
new[]
|
||||
{
|
||||
new Tag {Text = "tag1", Group = "test"},
|
||||
@@ -262,7 +250,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
|
||||
repository.AssignTagsToProperty(
|
||||
content.Id,
|
||||
contentType.PropertyTypes.First().Alias,
|
||||
contentType.PropertyTypes.First().Id,
|
||||
new[]
|
||||
{
|
||||
new Tag {Text = "tag2", Group = "test"},
|
||||
@@ -295,7 +283,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
{
|
||||
repository.AssignTagsToProperty(
|
||||
content.Id,
|
||||
contentType.PropertyTypes.First().Alias,
|
||||
contentType.PropertyTypes.First().Id,
|
||||
new[]
|
||||
{
|
||||
new Tag {Text = "tag1", Group = "test"},
|
||||
@@ -304,7 +292,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
|
||||
repository.AssignTagsToProperty(
|
||||
content.Id,
|
||||
contentType.PropertyTypes.First().Alias,
|
||||
contentType.PropertyTypes.First().Id,
|
||||
Enumerable.Empty<ITag>(), true);
|
||||
|
||||
var result = repository.GetTagsForEntity(content.Id);
|
||||
@@ -333,7 +321,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
{
|
||||
repository.AssignTagsToProperty(
|
||||
content.Id,
|
||||
contentType.PropertyTypes.First().Alias,
|
||||
contentType.PropertyTypes.First().Id,
|
||||
new[]
|
||||
{
|
||||
new Tag {Text = "tag1", Group = "test"},
|
||||
@@ -344,7 +332,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
|
||||
repository.RemoveTagsFromProperty(
|
||||
content.Id,
|
||||
contentType.PropertyTypes.First().Alias,
|
||||
contentType.PropertyTypes.First().Id,
|
||||
new[]
|
||||
{
|
||||
new Tag {Text = "tag2", Group = "test"},
|
||||
@@ -381,7 +369,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
{
|
||||
repository.AssignTagsToProperty(
|
||||
content1.Id,
|
||||
contentType.PropertyTypes.First().Alias,
|
||||
contentType.PropertyTypes.First().Id,
|
||||
new[]
|
||||
{
|
||||
new Tag {Text = "tag1", Group = "test"},
|
||||
@@ -392,7 +380,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
|
||||
repository.AssignTagsToProperty(
|
||||
content2.Id,
|
||||
contentType.PropertyTypes.First().Alias,
|
||||
contentType.PropertyTypes.First().Id,
|
||||
new[]
|
||||
{
|
||||
new Tag {Text = "tag1", Group = "test"},
|
||||
@@ -427,7 +415,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
{
|
||||
repository.AssignTagsToProperty(
|
||||
content1.Id,
|
||||
contentType.PropertyTypes.First().Alias,
|
||||
contentType.PropertyTypes.First().Id,
|
||||
new[]
|
||||
{
|
||||
new Tag {Text = "tag1", Group = "test"},
|
||||
@@ -438,7 +426,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
|
||||
repository.AssignTagsToProperty(
|
||||
content2.Id,
|
||||
contentType.PropertyTypes.First().Alias,
|
||||
contentType.PropertyTypes.First().Id,
|
||||
new[]
|
||||
{
|
||||
new Tag {Text = "tag1", Group = "test"},
|
||||
@@ -471,7 +459,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
{
|
||||
repository.AssignTagsToProperty(
|
||||
content1.Id,
|
||||
contentType.PropertyTypes.First().Alias,
|
||||
contentType.PropertyTypes.First().Id,
|
||||
new[]
|
||||
{
|
||||
new Tag {Text = "tag1", Group = "test"},
|
||||
@@ -482,7 +470,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
|
||||
repository.AssignTagsToProperty(
|
||||
content1.Id,
|
||||
contentType.PropertyTypes.Last().Alias,
|
||||
contentType.PropertyTypes.Last().Id,
|
||||
new[]
|
||||
{
|
||||
new Tag {Text = "tag1", Group = "test"},
|
||||
@@ -518,7 +506,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
{
|
||||
repository.AssignTagsToProperty(
|
||||
content1.Id,
|
||||
contentType.PropertyTypes.First().Alias,
|
||||
contentType.PropertyTypes.First().Id,
|
||||
new[]
|
||||
{
|
||||
new Tag {Text = "tag1", Group = "test"},
|
||||
@@ -529,7 +517,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
|
||||
repository.AssignTagsToProperty(
|
||||
content1.Id,
|
||||
contentType.PropertyTypes.Last().Alias,
|
||||
contentType.PropertyTypes.Last().Id,
|
||||
new[]
|
||||
{
|
||||
new Tag {Text = "tag1", Group = "test"},
|
||||
@@ -575,7 +563,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
{
|
||||
repository.AssignTagsToProperty(
|
||||
content1.Id,
|
||||
contentType.PropertyTypes.First().Alias,
|
||||
contentType.PropertyTypes.First().Id,
|
||||
new[]
|
||||
{
|
||||
new Tag {Text = "tag1", Group = "test"},
|
||||
@@ -585,7 +573,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
|
||||
repository.AssignTagsToProperty(
|
||||
media1.Id,
|
||||
mediaType.PropertyTypes.Last().Alias,
|
||||
mediaType.PropertyTypes.Last().Id,
|
||||
new[]
|
||||
{
|
||||
new Tag {Text = "tag1", Group = "test"},
|
||||
@@ -631,7 +619,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
{
|
||||
repository.AssignTagsToProperty(
|
||||
content1.Id,
|
||||
contentType.PropertyTypes.First().Alias,
|
||||
contentType.PropertyTypes.First().Id,
|
||||
new[]
|
||||
{
|
||||
new Tag {Text = "tag1", Group = "test"},
|
||||
@@ -642,7 +630,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
|
||||
repository.AssignTagsToProperty(
|
||||
media1.Id,
|
||||
mediaType.PropertyTypes.Last().Alias,
|
||||
mediaType.PropertyTypes.Last().Id,
|
||||
new[]
|
||||
{
|
||||
new Tag {Text = "tag1", Group = "test"},
|
||||
@@ -680,7 +668,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
{
|
||||
repository.AssignTagsToProperty(
|
||||
content1.Id,
|
||||
contentType.PropertyTypes.First().Alias,
|
||||
contentType.PropertyTypes.First().Id,
|
||||
new[]
|
||||
{
|
||||
new Tag {Text = "tag1", Group = "test"},
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
@@ -9,8 +10,10 @@ using NUnit.Framework;
|
||||
using SqlCE4Umbraco;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Core.PropertyEditors;
|
||||
using Umbraco.Tests.TestHelpers;
|
||||
using Umbraco.Web;
|
||||
using Umbraco.Web.PropertyEditors;
|
||||
using umbraco;
|
||||
using umbraco.DataLayer;
|
||||
using umbraco.MacroEngines;
|
||||
@@ -334,6 +337,29 @@ namespace Umbraco.Tests
|
||||
Assert.AreEqual(3, types.Count());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This demonstrates this issue: http://issues.umbraco.org/issue/U4-3505 - the TypeList was returning a list of assignable types
|
||||
/// not explicit types which is sort of ideal but is confusing so we'll do it the less confusing way.
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TypeList_Resolves_Explicit_Types()
|
||||
{
|
||||
var types = new HashSet<PluginManager.TypeList>();
|
||||
|
||||
var propEditors = new PluginManager.TypeList<PropertyEditor>(PluginManager.TypeResolutionKind.FindAllTypes);
|
||||
propEditors.AddType(typeof(LabelPropertyEditor));
|
||||
types.Add(propEditors);
|
||||
|
||||
var found = types.SingleOrDefault(x => x.IsTypeList<PropertyEditor>(PluginManager.TypeResolutionKind.FindAllTypes));
|
||||
|
||||
Assert.IsNotNull(found);
|
||||
|
||||
//This should not find a type list of this type
|
||||
var shouldNotFind = types.SingleOrDefault(x => x.IsTypeList<IParameterEditor>(PluginManager.TypeResolutionKind.FindAllTypes));
|
||||
|
||||
Assert.IsNull(shouldNotFind);
|
||||
}
|
||||
|
||||
[XsltExtension("Blah.Blah")]
|
||||
public class MyXsltExtension
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.Linq;
|
||||
using System.Threading;
|
||||
using NUnit.Framework;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Membership;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence;
|
||||
using Umbraco.Core.Persistence.Repositories;
|
||||
@@ -201,6 +202,27 @@ namespace Umbraco.Tests.Services
|
||||
Assert.That(content.CreatorId, Is.EqualTo(0));//Default to zero/administrator
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Can_Save_New_Content_With_Explicit_User()
|
||||
{
|
||||
var user = new User(ServiceContext.UserService.GetUserTypeByAlias("admin"))
|
||||
{
|
||||
Name = "Test",
|
||||
Email = "test@test.com",
|
||||
Username = "test",
|
||||
Password = "test"
|
||||
};
|
||||
ServiceContext.UserService.SaveUser(user);
|
||||
var content = new Content("Test", -1, ServiceContext.ContentTypeService.GetContentType("umbTextpage"));
|
||||
|
||||
// Act
|
||||
ServiceContext.ContentService.Save(content, (int)user.Id);
|
||||
|
||||
// Assert
|
||||
Assert.That(content.CreatorId, Is.EqualTo(user.Id));
|
||||
Assert.That(content.WriterId, Is.EqualTo(user.Id));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Cannot_Create_Content_With_Non_Existing_ContentType_Alias()
|
||||
{
|
||||
|
||||
@@ -10,6 +10,7 @@ using Umbraco.Core.Publishing;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web;
|
||||
using Umbraco.Web.Models.Mapping;
|
||||
using umbraco.BusinessLogic;
|
||||
using ObjectExtensions = Umbraco.Core.ObjectExtensions;
|
||||
|
||||
namespace Umbraco.Tests.TestHelpers
|
||||
@@ -67,7 +68,12 @@ namespace Umbraco.Tests.TestHelpers
|
||||
{
|
||||
Mapper.Initialize(configuration =>
|
||||
{
|
||||
var mappers = PluginManager.Current.FindAndCreateInstances<IMapperConfiguration>(specificAssemblies: new[] { typeof(ContentModelMapper).Assembly });
|
||||
var mappers = PluginManager.Current.FindAndCreateInstances<IMapperConfiguration>(
|
||||
specificAssemblies: new[]
|
||||
{
|
||||
typeof(ContentModelMapper).Assembly,
|
||||
typeof(ApplicationRegistrar).Assembly
|
||||
});
|
||||
foreach (var mapper in mappers)
|
||||
{
|
||||
mapper.ConfigureMappings(configuration, ApplicationContext);
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.Security.Principal;
|
||||
using System.Web;
|
||||
using System.Web.Routing;
|
||||
using Moq;
|
||||
using Umbraco.Core;
|
||||
|
||||
namespace Umbraco.Tests.TestHelpers
|
||||
{
|
||||
@@ -58,7 +59,7 @@ namespace Umbraco.Tests.TestHelpers
|
||||
|
||||
//Cookie collection
|
||||
var cookieCollection = new HttpCookieCollection();
|
||||
cookieCollection.Add(new HttpCookie("UMB_UCONTEXT", "FBA996E7-D6BE-489B-B199-2B0F3D2DD826"));
|
||||
cookieCollection.Add(new HttpCookie(Constants.Web.AuthCookieName, "FBA996E7-D6BE-489B-B199-2B0F3D2DD826"));
|
||||
|
||||
//Request
|
||||
var requestMock = new Mock<HttpRequestBase>();
|
||||
|
||||
@@ -161,6 +161,7 @@
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AngularIntegration\AngularAntiForgeryTests.cs" />
|
||||
<Compile Include="AngularIntegration\ContentModelSerializationTests.cs" />
|
||||
<Compile Include="AngularIntegration\JsInitializationTests.cs" />
|
||||
<Compile Include="AngularIntegration\ServerVariablesParserTests.cs" />
|
||||
|
||||
@@ -2,18 +2,17 @@
|
||||
@name Manifest overview
|
||||
@description
|
||||
|
||||
This is a sample manifest, it is always stored in a folder in /app_plugins, with the name package.manifest:
|
||||
This is a sample manifest, it is always stored in a folder in /app_plugins/{YourPackageName}, with the name package.manifest:
|
||||
|
||||
{
|
||||
propertyEditors: [
|
||||
{
|
||||
alias: "Sir.Trevor",
|
||||
name: "Sir Trevor",
|
||||
hideLabel: true,
|
||||
valueType: "JSON",
|
||||
editor: {
|
||||
view: "~/App_Plugins/SirTrevor/SirTrevor.html"
|
||||
}
|
||||
name: "Sir Trevor",
|
||||
editor: {
|
||||
view: "~/App_Plugins/SirTrevor/SirTrevor.html",
|
||||
hideLabel: true,
|
||||
valueType: "JSON"
|
||||
}
|
||||
],
|
||||
javascript: [
|
||||
|
||||
@@ -502,18 +502,3 @@ necessary. Here is a sample; alter the names:
|
||||
That's all there is to it!
|
||||
|
||||
|
||||
on on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("autoresize",function(e){function t(a){var r,o,c=e.getDoc(),s=c.body,u=c.documentElement,l=tinymce.DOM,m=n.autoresize_min_height;"setcontent"==a.type&&a.initial||e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen()||(o=tinymce.Env.ie?s.scrollHeight:tinymce.Env.webkit&&0===s.clientHeight?0:s.offsetHeight,o>n.autoresize_min_height&&(m=o),n.autoresize_max_height&&o>n.autoresize_max_height?(m=n.autoresize_max_height,s.style.overflowY="auto",u.style.overflowY="auto"):(s.style.overflowY="hidden",u.style.overflowY="hidden",s.scrollTop=0),m!==i&&(r=m-i,l.setStyle(l.get(e.id+"_ifr"),"height",m+"px"),i=m,tinymce.isWebKit&&0>r&&t(a)))}var n=e.settings,i=0;e.settings.inline||(n.autoresize_min_height=parseInt(e.getParam("autoresize_min_height",e.getElement().offsetHeight),10),n.autoresize_max_height=parseInt(e.getParam("autoresize_max_height",0),10),e.on("init",function(){e.dom.setStyle(e.getBody(),"paddingBottom",e.getParam("autoresize_bottom_margin",50)+"px")}),e.on("change setcontent paste keyup",t),e.getParam("autoresize_on_init",!0)&&e.on("load",t),e.addCommand("mceAutoResize",t))});
|
||||
tinymce.PluginManager.add("autoresize",function(e){function t(i){var a,s,r=e.getDoc(),g=r.body,u=r.documentElement,m=tinymce.DOM,l=n.autoresize_min_height;"setcontent"==i.type&&i.initial||e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen()||(s=tinymce.Env.ie?g.scrollHeight:tinymce.Env.webkit&&0===g.clientHeight?0:g.offsetHeight,s>n.autoresize_min_height&&(l=s),n.autoresize_max_height&&s>n.autoresize_max_height?(l=n.autoresize_max_height,g.style.overflowY="auto",u.style.overflowY="auto"):(g.style.overflowY="hidden",u.style.overflowY="hidden",g.scrollTop=0),l!==o&&(a=l-o,m.setStyle(m.get(e.id+"_ifr"),"height",l+"px"),o=l,tinymce.isWebKit&&0>a&&t(i)))}function i(e,n,o){setTimeout(function(){t({}),e--?i(e,n,o):o&&o()},n)}var n=e.settings,o=0;e.settings.inline||(n.autoresize_min_height=parseInt(e.getParam("autoresize_min_height",e.getElement().offsetHeight),10),n.autoresize_max_height=parseInt(e.getParam("autoresize_max_height",0),10),e.on("init",function(){e.dom.setStyle(e.getBody(),"paddingBottom",e.getParam("autoresize_bottom_margin",50)+"px")}),e.on("change setcontent paste keyup",t),e.getParam("autoresize_on_init",!0)&&e.on("init",function(){i(20,100,function(){i(5,1e3)})}),e.addCommand("mceAutoResize",t))});
|
||||
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("autosave",function(e){function t(e,t){var n={s:1e3,m:6e4};return e=/^(\d+)([ms]?)$/.exec(""+(e||t)),(e[2]?n[e[2]]:1)*parseInt(e,10)}function n(){var e=parseInt(f.getItem(h+"autosave.time"),10)||0;return(new Date).getTime()-e>d.autosave_retention?(i(!1),!1):!0}function i(t){f.removeItem(h+"autosave.draft"),f.removeItem(h+"autosave.time"),t!==!1&&e.fire("RemoveDraft")}function a(){c()||(f.setItem(h+"autosave.draft",e.getContent({format:"raw",no_events:!0})),f.setItem(h+"autosave.time",(new Date).getTime()),e.fire("StoreDraft"))}function r(){n()&&(e.setContent(f.getItem(h+"autosave.draft"),{format:"raw"}),e.fire("RestoreDraft"))}function o(){m||(setInterval(function(){e.removed||a()},d.autosave_interval),m=!0)}function s(){var t=this;t.disabled(!n()),e.on("StoreDraft RestoreDraft RemoveDraft",function(){t.disabled(!n())}),o()}function l(){e.undoManager.beforeChange(),r(),i(),e.undoManager.add()}function u(){var e;return tinymce.each(tinymce.editors,function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&t.getParam("autosave_ask_before_unload",!0)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))}),e}function c(t){var n=e.settings.forced_root_block;return t=tinymce.trim("undefined"==typeof t?e.getBody().innerHTML:t),""===t||new RegExp("^<"+n+">(( | |[ ]|<br[^>]*>)+?|)</"+n+">|<br>$","i").test(t)}var m,d=e.settings,f=tinymce.util.LocalStorage,h=e.id;d.autosave_interval=t(d.autosave_interval,"30s"),d.autosave_retention=t(d.autosave_retention,"20m"),e.addButton("restoredraft",{title:"Restore last draft",onclick:l,onPostRender:s}),e.addMenuItem("restoredraft",{text:"Restore last draft",onclick:l,onPostRender:s,context:"file"}),e.settings.autosave_restore_when_empty!==!1&&(e.on("init",function(){n()&&c()&&r()}),e.on("saveContent",function(){i()})),window.onbeforeunload=u,this.hasDraft=n,this.storeDraft=a,this.restoreDraft=r,this.removeDraft=i,this.isEmpty=c});
|
||||
tinymce.PluginManager.add("autosave",function(e){function t(e,t){var n={s:1e3,m:6e4};return e=/^(\d+)([ms]?)$/.exec(""+(e||t)),(e[2]?n[e[2]]:1)*parseInt(e,10)}function n(){var e=parseInt(l.getItem(d+"time"),10)||0;return(new Date).getTime()-e>v.autosave_retention?(a(!1),!1):!0}function a(t){l.removeItem(d+"draft"),l.removeItem(d+"time"),t!==!1&&e.fire("RemoveDraft")}function r(){c()||(l.setItem(d+"draft",e.getContent({format:"raw",no_events:!0})),l.setItem(d+"time",(new Date).getTime()),e.fire("StoreDraft"))}function o(){n()&&(e.setContent(l.getItem(d+"draft"),{format:"raw"}),e.fire("RestoreDraft"))}function i(){m||(setInterval(function(){e.removed||r()},v.autosave_interval),m=!0)}function s(){var t=this;t.disabled(!n()),e.on("StoreDraft RestoreDraft RemoveDraft",function(){t.disabled(!n())}),i()}function u(){e.undoManager.beforeChange(),o(),a(),e.undoManager.add()}function f(){var e;return tinymce.each(tinymce.editors,function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&t.getParam("autosave_ask_before_unload",!0)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))}),e}function c(t){var n=e.settings.forced_root_block;return t=tinymce.trim("undefined"==typeof t?e.getBody().innerHTML:t),""===t||new RegExp("^<"+n+"[^>]*>(( | |[ ]|<br[^>]*>)+?|)</"+n+">|<br>$","i").test(t)}var d,m,v=e.settings,l=tinymce.util.LocalStorage;d=v.autosave_prefix||"tinymce-autosave-{path}{query}-{id}-",d=d.replace(/\{path\}/g,document.location.pathname),d=d.replace(/\{query\}/g,document.location.search),d=d.replace(/\{id\}/g,e.id),v.autosave_interval=t(v.autosave_interval,"30s"),v.autosave_retention=t(v.autosave_retention,"20m"),e.addButton("restoredraft",{title:"Restore last draft",onclick:u,onPostRender:s}),e.addMenuItem("restoredraft",{text:"Restore last draft",onclick:u,onPostRender:s,context:"file"}),e.settings.autosave_restore_when_empty!==!1&&(e.on("init",function(){n()&&c()&&o()}),e.on("saveContent",function(){a()})),window.onbeforeunload=f,this.hasDraft=n,this.storeDraft=r,this.restoreDraft=o,this.removeDraft=a,this.isEmpty=c});
|
||||
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("code",function(e){function o(){e.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:e.getParam("code_dialog_width",600),minHeight:e.getParam("code_dialog_height",Math.min(tinymce.DOM.getViewPort().h-200,500)),value:e.getContent({source_view:!0}),spellcheck:!1},onSubmit:function(o){e.undoManager.transact(function(){e.setContent(o.data.code)}),e.nodeChanged()}})}e.addCommand("mceCodeEditor",o),e.addButton("code",{icon:"code",tooltip:"Source code",onclick:o}),e.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:o})});
|
||||
tinymce.PluginManager.add("code",function(e){function o(){e.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:e.getParam("code_dialog_width",600),minHeight:e.getParam("code_dialog_height",Math.min(tinymce.DOM.getViewPort().h-200,500)),value:e.getContent({source_view:!0}),spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(o){e.focus(),e.undoManager.transact(function(){e.setContent(o.data.code)}),e.selection.setCursorLocation(),e.nodeChanged()}})}e.addCommand("mceCodeEditor",o),e.addButton("code",{icon:"code",tooltip:"Source code",onclick:o}),e.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:o})});
|
||||
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("contextmenu",function(e){var t;e.on("contextmenu",function(n){var i;if(n.preventDefault(),i=e.settings.contextmenu||"link image inserttable | cell row column deletetable",t)t.show();else{var o=[];tinymce.each(i.split(/[ ,]/),function(t){var n=e.menuItems[t];"|"==t&&(n={text:t}),n&&(n.shortcut="",o.push(n))});for(var a=0;a<o.length;a++)"|"==o[a].text&&(0===a||a==o.length-1)&&o.splice(a,1);t=new tinymce.ui.Menu({items:o,context:"contextmenu"}),t.renderTo(document.body)}var r={x:n.pageX,y:n.pageY};e.inline||(r=tinymce.DOM.getPos(e.getContentAreaContainer()),r.x+=n.clientX,r.y+=n.clientY),t.moveTo(r.x,r.y),e.on("remove",function(){t.remove(),t=null})})});
|
||||
tinymce.PluginManager.add("contextmenu",function(e){var n,t=e.settings.contextmenu_never_use_native;e.on("contextmenu",function(o){var i;if(!o.ctrlKey||t){if(o.preventDefault(),i=e.settings.contextmenu||"link image inserttable | cell row column deletetable",n)n.show();else{var c=[];tinymce.each(i.split(/[ ,]/),function(n){var t=e.menuItems[n];"|"==n&&(t={text:n}),t&&(t.shortcut="",c.push(t))});for(var a=0;a<c.length;a++)"|"==c[a].text&&(0===a||a==c.length-1)&&c.splice(a,1);n=new tinymce.ui.Menu({items:c,context:"contextmenu"}),n.addClass("contextmenu"),n.renderTo(document.body),e.on("remove",function(){n.remove(),n=null})}var l={x:o.pageX,y:o.pageY};e.inline||(l=tinymce.DOM.getPos(e.getContentAreaContainer()),l.x+=o.clientX,l.y+=o.clientY),n.moveTo(l.x,l.y)}})});
|
||||
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("emoticons",function(e,t){function n(){var e;return e='<table role="presentation" class="mce-grid">',tinymce.each(i,function(n){e+="<tr>",tinymce.each(n,function(n){var i=t+"/img/smiley-"+n+".gif";e+='<td><a href="#" data-mce-url="'+i+'" tabindex="-1"><img src="'+i+'" style="width: 18px; height: 18px"></a></td>'}),e+="</tr>"}),e+="</table>"}var i=[["cool","cry","embarassed","foot-in-mouth"],["frown","innocent","kiss","laughing"],["money-mouth","sealed","smile","surprised"],["tongue-out","undecided","wink","yell"]];e.addButton("emoticons",{type:"panelbutton",popoverAlign:"bc-tl",panel:{autohide:!0,html:n,onclick:function(t){var n=e.dom.getParent(t.target,"a");n&&(e.insertContent('<img src="'+n.getAttribute("data-mce-url")+'" />'),this.hide())}},tooltip:"Emoticons"})});
|
||||
tinymce.PluginManager.add("emoticons",function(t,e){function n(){var t;return t='<table role="presentation" class="mce-grid">',tinymce.each(i,function(n){t+="<tr>",tinymce.each(n,function(n){var i=e+"/img/smiley-"+n+".gif";t+='<td><a href="#" data-mce-url="'+i+'" tabindex="-1"><img src="'+i+'" style="width: 18px; height: 18px"></a></td>'}),t+="</tr>"}),t+="</table>"}var i=[["cool","cry","embarassed","foot-in-mouth"],["frown","innocent","kiss","laughing"],["money-mouth","sealed","smile","surprised"],["tongue-out","undecided","wink","yell"]];t.addButton("emoticons",{type:"panelbutton",panel:{autohide:!0,html:n,onclick:function(e){var n=t.dom.getParent(e.target,"a");n&&(t.insertContent('<img src="'+n.getAttribute("data-mce-url")+'" />'),this.hide())}},tooltip:"Emoticons"})});
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("fullscreen",function(e){function t(){var e,t,n=window,i=document,a=i.body;return a.offsetWidth&&(e=a.offsetWidth,t=a.offsetHeight),n.innerWidth&&n.innerHeight&&(e=n.innerWidth,t=n.innerHeight),{w:e,h:t}}function n(){function n(){l.setStyle(c,"height",t().h-(s.clientHeight-c.clientHeight))}var s,c,u,d=document.body,m=document.documentElement;o=!o,s=e.getContainer().firstChild,c=e.getContentAreaContainer().firstChild,u=c.style,o?(i=u.width,a=u.height,u.width=u.height="100%",l.addClass(d,"mce-fullscreen"),l.addClass(m,"mce-fullscreen"),l.addClass(s,"mce-fullscreen"),l.bind(window,"resize",n),n(),r=n):(u.width=i,u.height=a,l.removeClass(d,"mce-fullscreen"),l.removeClass(m,"mce-fullscreen"),l.removeClass(s,"mce-fullscreen"),l.unbind(window,"resize",r)),e.fire("FullscreenStateChanged",{state:o})}var i,a,r,o=!1,l=tinymce.DOM;if(!e.settings.inline)return e.on("init",function(){e.addShortcut("Ctrl+Alt+F","",n)}),e.on("remove",function(){r&&l.unbind(window,"resize",r)}),e.addCommand("mceFullScreen",n),e.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Alt+F",selectable:!0,onClick:n,onPostRender:function(){var t=this;e.on("FullscreenStateChanged",function(e){t.active(e.state)})},context:"view"}),e.addButton("fullscreen",{tooltip:"Fullscreen",shortcut:"Ctrl+Alt+F",onClick:n,onPostRender:function(){var t=this;e.on("FullscreenStateChanged",function(e){t.active(e.state)})}}),{isFullscreen:function(){return o}}});
|
||||
tinymce.PluginManager.add("fullscreen",function(e){function t(){var e,t,n=window,i=document,l=i.body;return l.offsetWidth&&(e=l.offsetWidth,t=l.offsetHeight),n.innerWidth&&n.innerHeight&&(e=n.innerWidth,t=n.innerHeight),{w:e,h:t}}function n(){function n(){d.setStyle(a,"height",t().h-(h.clientHeight-a.clientHeight))}var u,h,a,f,m=document.body,g=document.documentElement;s=!s,h=e.getContainer(),u=h.style,a=e.getContentAreaContainer().firstChild,f=a.style,s?(i=f.width,l=f.height,f.width=f.height="100%",c=u.width,o=u.height,u.width=u.height="",d.addClass(m,"mce-fullscreen"),d.addClass(g,"mce-fullscreen"),d.addClass(h,"mce-fullscreen"),d.bind(window,"resize",n),n(),r=n):(f.width=i,f.height=l,c&&(u.width=c),o&&(u.height=o),d.removeClass(m,"mce-fullscreen"),d.removeClass(g,"mce-fullscreen"),d.removeClass(h,"mce-fullscreen"),d.unbind(window,"resize",r)),e.fire("FullscreenStateChanged",{state:s})}var i,l,r,c,o,s=!1,d=tinymce.DOM;return e.settings.inline?void 0:(e.on("init",function(){e.addShortcut("Ctrl+Alt+F","",n)}),e.on("remove",function(){r&&d.unbind(window,"resize",r)}),e.addCommand("mceFullScreen",n),e.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Alt+F",selectable:!0,onClick:n,onPostRender:function(){var t=this;e.on("FullscreenStateChanged",function(e){t.active(e.state)})},context:"view"}),e.addButton("fullscreen",{tooltip:"Fullscreen",shortcut:"Ctrl+Alt+F",onClick:n,onPostRender:function(){var t=this;e.on("FullscreenStateChanged",function(e){t.active(e.state)})}}),{isFullscreen:function(){return s}})});
|
||||
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("image",function(t){function e(t,e){function n(t,n){i.parentNode.removeChild(i),e({width:t,height:n})}var i=document.createElement("img");i.onload=function(){n(i.clientWidth,i.clientHeight)},i.onerror=function(){n()},i.src=t;var a=i.style;a.visibility="hidden",a.position="fixed",a.bottom=a.left=0,a.width=a.height="auto",document.body.appendChild(i)}function n(e){return function(){var n=t.settings.image_list;"string"==typeof n?tinymce.util.XHR.send({url:n,success:function(t){e(tinymce.util.JSON.parse(t))}}):e(n)}}function i(n){function i(){var t=[{text:"None",value:""}];return tinymce.each(n,function(e){t.push({text:e.text||e.title,value:e.value||e.url,menu:e.menu})}),t}function a(t){var e,n,i,a;e=s.find("#width")[0],n=s.find("#height")[0],i=e.value(),a=n.value(),s.find("#constrain")[0].checked()&&h&&u&&i&&a&&(t.control==e?(a=Math.round(i/h*a),n.value(a)):(i=Math.round(a/u*i),e.value(i))),h=i,u=a}function o(){function e(e){function i(){e.onload=e.onerror=null,t.selection.select(e),t.nodeChanged()}e.onload=function(){n.width||n.height||m.setAttribs(e,{width:e.clientWidth,height:e.clientHeight}),i()},e.onerror=i}var n=s.toJSON();""===n.width&&(n.width=null),""===n.height&&(n.height=null),""===n.style&&(n.style=null),n={src:n.src,alt:n.alt,width:n.width,height:n.height,style:n.style},t.undoManager.transact(function(){return n.src?(p?m.setAttribs(p,n):(n.id="__mcenew",t.selection.setContent(m.createHTML("img",n)),p=m.get("__mcenew"),m.setAttrib(p,"id",null)),e(p),void 0):(p&&(m.remove(p),t.nodeChanged()),void 0)})}function l(t){return t&&(t=t.replace(/px$/,"")),t}function r(){e(this.value(),function(t){t.width&&t.height&&(h=t.width,u=t.height,s.find("#width").value(h),s.find("#height").value(u))})}function c(){function t(t){return t.length>0&&/^[0-9]+$/.test(t)&&(t+="px"),t}var e=s.toJSON(),n=m.parseStyle(e.style);m.setAttrib(p,"style",""),delete n.margin,n["margin-top"]=n["margin-bottom"]=t(e.vspace),n["margin-left"]=n["margin-right"]=t(e.hspace),n["border-width"]=t(e.border),s.find("#style").value(m.serializeStyle(m.parseStyle(m.serializeStyle(n))))}var s,d,h,u,g,m=t.dom,p=t.selection.getNode();h=m.getAttrib(p,"width"),u=m.getAttrib(p,"height"),"IMG"!=p.nodeName||p.getAttribute("data-mce-object")?p=null:d={src:m.getAttrib(p,"src"),alt:m.getAttrib(p,"alt"),width:h,height:u},n&&(g={name:"target",type:"listbox",label:"Image list",values:i(),onselect:function(t){var e=s.find("#alt");(!e.value()||t.lastControl&&e.value()==t.lastControl.text())&&e.value(t.control.text()),s.find("#src").value(t.control.value())}});var y=[{name:"src",type:"filepicker",filetype:"image",label:"Source",autofocus:!0,onchange:r},g,{name:"alt",type:"textbox",label:"Image description"},{type:"container",label:"Dimensions",layout:"flex",direction:"row",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:3,size:3,onchange:a},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:3,size:3,onchange:a},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}];t.settings.image_advtab?(p&&(d.hspace=l(p.style.marginLeft||p.style.marginRight),d.vspace=l(p.style.marginTop||p.style.marginBottom),d.border=l(p.style.borderWidth),d.style=t.dom.serializeStyle(t.dom.parseStyle(t.dom.getAttrib(p,"style")))),s=t.windowManager.open({title:"Insert/edit image",data:d,bodyType:"tabpanel",body:[{title:"General",type:"form",items:y},{title:"Advanced",type:"form",pack:"start",items:[{label:"Style",name:"style",type:"textbox"},{type:"form",layout:"grid",packV:"start",columns:2,padding:0,alignH:["left","right"],defaults:{type:"textbox",maxWidth:50,onchange:c},items:[{label:"Vertical space",name:"vspace"},{label:"Horizontal space",name:"hspace"},{label:"Border",name:"border"}]}]}],onSubmit:o})):s=t.windowManager.open({title:"Insert/edit image",data:d,body:y,onSubmit:o})}t.addButton("image",{icon:"image",tooltip:"Insert/edit image",onclick:n(i),stateSelector:"img:not([data-mce-object])"}),t.addMenuItem("image",{icon:"image",text:"Insert image",onclick:n(i),context:"insert",prependToContext:!0})});
|
||||
tinymce.PluginManager.add("image",function(t){function e(t,e){function n(t,n){i.parentNode.removeChild(i),e({width:t,height:n})}var i=document.createElement("img");i.onload=function(){n(i.clientWidth,i.clientHeight)},i.onerror=function(){n()},i.src=t;var a=i.style;a.visibility="hidden",a.position="fixed",a.bottom=a.left=0,a.width=a.height="auto",document.body.appendChild(i)}function n(e){return function(){var n=t.settings.image_list;"string"==typeof n?tinymce.util.XHR.send({url:n,success:function(t){e(tinymce.util.JSON.parse(t))}}):e(n)}}function i(n){function i(){var e=[{text:"None",value:""}];return tinymce.each(n,function(n){e.push({text:n.text||n.title,value:t.convertURL(n.value||n.url,"src"),menu:n.menu})}),e}function a(t){var e,n,i,a;e=s.find("#width")[0],n=s.find("#height")[0],i=e.value(),a=n.value(),s.find("#constrain")[0].checked()&&d&&u&&i&&a&&(t.control==e?(a=Math.round(i/d*a),n.value(a)):(i=Math.round(a/u*i),e.value(i))),d=i,u=a}function o(){function e(e){function i(){e.onload=e.onerror=null,t.selection.select(e),t.nodeChanged()}e.onload=function(){n.width||n.height||m.setAttribs(e,{width:e.clientWidth,height:e.clientHeight}),i()},e.onerror=i}var n=s.toJSON();""===n.width&&(n.width=null),""===n.height&&(n.height=null),""===n.style&&(n.style=null),n={src:n.src,alt:n.alt,width:n.width,height:n.height,style:n.style},t.undoManager.transact(function(){return n.src?(p?m.setAttribs(p,n):(n.id="__mcenew",t.selection.setContent(m.createHTML("img",n)),p=m.get("__mcenew"),m.setAttrib(p,"id",null)),e(p),void 0):(p&&(m.remove(p),t.nodeChanged()),void 0)})}function l(t){return t&&(t=t.replace(/px$/,"")),t}function r(){h&&h.value(t.convertURL(this.value(),"src")),e(this.value(),function(t){t.width&&t.height&&(d=t.width,u=t.height,s.find("#width").value(d),s.find("#height").value(u))})}function c(){function t(t){return t.length>0&&/^[0-9]+$/.test(t)&&(t+="px"),t}var e=s.toJSON(),n=m.parseStyle(e.style);delete n.margin,n["margin-top"]=n["margin-bottom"]=t(e.vspace),n["margin-left"]=n["margin-right"]=t(e.hspace),n["border-width"]=t(e.border),s.find("#style").value(m.serializeStyle(m.parseStyle(m.serializeStyle(n))))}var s,d,u,h,g={},m=t.dom,p=t.selection.getNode();d=m.getAttrib(p,"width"),u=m.getAttrib(p,"height"),"IMG"!=p.nodeName||p.getAttribute("data-mce-object")?p=null:g={src:m.getAttrib(p,"src"),alt:m.getAttrib(p,"alt"),width:d,height:u},n&&(h={type:"listbox",label:"Image list",values:i(),value:g.src&&t.convertURL(g.src,"src"),onselect:function(t){var e=s.find("#alt");(!e.value()||t.lastControl&&e.value()==t.lastControl.text())&&e.value(t.control.text()),s.find("#src").value(t.control.value())},onPostRender:function(){h=this}});var y=[{name:"src",type:"filepicker",filetype:"image",label:"Source",autofocus:!0,onchange:r},h,{name:"alt",type:"textbox",label:"Image description"},{type:"container",label:"Dimensions",layout:"flex",direction:"row",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:3,size:3,onchange:a},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:3,size:3,onchange:a},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}];t.settings.image_advtab?(p&&(g.hspace=l(p.style.marginLeft||p.style.marginRight),g.vspace=l(p.style.marginTop||p.style.marginBottom),g.border=l(p.style.borderWidth),g.style=t.dom.serializeStyle(t.dom.parseStyle(t.dom.getAttrib(p,"style")))),s=t.windowManager.open({title:"Insert/edit image",data:g,bodyType:"tabpanel",body:[{title:"General",type:"form",items:y},{title:"Advanced",type:"form",pack:"start",items:[{label:"Style",name:"style",type:"textbox"},{type:"form",layout:"grid",packV:"start",columns:2,padding:0,alignH:["left","right"],defaults:{type:"textbox",maxWidth:50,onchange:c},items:[{label:"Vertical space",name:"vspace"},{label:"Horizontal space",name:"hspace"},{label:"Border",name:"border"}]}]}],onSubmit:o})):s=t.windowManager.open({title:"Insert/edit image",data:g,body:y,onSubmit:o})}t.addButton("image",{icon:"image",tooltip:"Insert/edit image",onclick:n(i),stateSelector:"img:not([data-mce-object])"}),t.addMenuItem("image",{icon:"image",text:"Insert image",onclick:n(i),context:"insert",prependToContext:!0})});
|
||||
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("importcss",function(t){function e(e,s){function i(t,e){var o=t.href;if(e||c[o]){if(s){if(s instanceof RegExp&&!s.test(o))return;if("string"==typeof s&&-1===o.indexOf(s))return}n(t.imports,function(t){i(t,!0)}),n(t.cssRules||t.rules,function(t){t.styleSheet?i(t.styleSheet,!0):t.selectorText&&n(t.selectorText.split(","),function(t){r.push(tinymce.trim(t))})})}}var r=[],c={};n(t.contentCSS,function(t){c[t]=!0});try{n(e.styleSheets,i)}catch(o){}return r}function s(e){var s,n=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(e);if(n){var i=n[1],r=n[2].substr(1).split(".").join(" ");return n[1]?(s={title:e},t.schema.getTextBlockElements()[i]?s.block=i:t.schema.getBlockElements()[i]?s.selector=i:s.inline=i):n[2]&&(s={inline:"span",title:e.substr(1),classes:r}),t.settings.importcss_merge_classes!==!1?s.classes=r:s.attributes={"class":r},s}}var n=tinymce.each;t.settings.style_formats||t.on("renderFormatsMenu",function(i){var r=t.settings.importcss_selector_converter||s,c={},o=t.settings.importcss_file_filter;t.settings.importcss_append||i.control.items().remove(),n(e(t.getDoc(),o),function(e){if(-1===e.indexOf(".mce-")&&!c[e]){var s=r(e);if(s){var n=s.name||tinymce.DOM.uniqueId();t.formatter.register(n,s),i.control.add(tinymce.extend({},i.control.settings.itemDefaults,{text:s.title,format:n}))}c[e]=!0}}),i.control.renderNew()})});
|
||||
tinymce.PluginManager.add("importcss",function(t){function e(t){return"string"==typeof t?function(e){return-1!==e.indexOf(t)}:t instanceof RegExp?function(e){return t.test(e)}:t}function n(e,n){function r(t,e){var o,l=t.href;if((e||c[l])&&(!n||n(l))){s(t.imports,function(t){r(t,!0)});try{o=t.cssRules||t.rules}catch(a){}s(o,function(t){t.styleSheet?r(t.styleSheet,!0):t.selectorText&&s(t.selectorText.split(","),function(t){i.push(tinymce.trim(t))})})}}var i=[],c={};s(t.contentCSS,function(t){c[t]=!0});try{s(e.styleSheets,function(t){r(t)})}catch(o){}return i}function r(e){var n,r=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(e);if(r){var i=r[1],s=r[2].substr(1).split(".").join(" ");return r[1]?(n={title:e},t.schema.getTextBlockElements()[i]?n.block=i:t.schema.getBlockElements()[i]?n.selector=i:n.inline=i):r[2]&&(n={inline:"span",title:e.substr(1),classes:s}),t.settings.importcss_merge_classes!==!1?n.classes=s:n.attributes={"class":s},n}}var i=this,s=tinymce.each;t.settings.style_formats||t.on("renderFormatsMenu",function(c){var o=t.settings,l={},a=o.importcss_selector_converter||r,f=e(o.importcss_selector_filter);t.settings.importcss_append||c.control.items().remove();var m=o.importcss_groups;if(m)for(var u=0;u<m.length;u++)m[u].filter=e(m[u].filter);s(n(t.getDoc(),e(o.importcss_file_filter)),function(e){if(-1===e.indexOf(".mce-")&&!l[e]&&(!f||f(e))){var n,r=a.call(i,e);if(r){var s=r.name||tinymce.DOM.uniqueId();if(m)for(var o=0;o<m.length;o++)if(!m[o].filter||m[o].filter(e)){m[o].item||(m[o].item={text:m[o].title,menu:[]}),n=m[o].item.menu;break}t.formatter.register(s,r);var u=tinymce.extend({},c.control.settings.itemDefaults,{text:r.title,format:s});n?n.push(u):c.control.add(u)}l[e]=!0}}),s(m,function(t){c.control.add(t.item)}),c.control.renderNew()}),i.convertSelectorToFormat=r});
|
||||
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("link",function(e){function t(t){return function(){var n=e.settings.link_list;"string"==typeof n?tinymce.util.XHR.send({url:n,success:function(e){t(tinymce.util.JSON.parse(e))}}):t(n)}}function n(t){function n(e){var t=d.find("#text");(!t.value()||e.lastControl&&t.value()==e.lastControl.text())&&t.value(e.control.text()),d.find("#href").value(e.control.value())}function i(){var e=[{text:"None",value:""}];return tinymce.each(t,function(t){e.push({text:t.text||t.title,value:t.value||t.url,menu:t.menu})}),e}function a(t){var n=[{text:"None",value:""}];return tinymce.each(e.settings.rel_list,function(e){n.push({text:e.text||e.title,value:e.value,selected:t===e.value})}),n}function o(t){var n=[{text:"None",value:""}];return e.settings.target_list||n.push({text:"New window",value:"_blank"}),tinymce.each(e.settings.target_list,function(e){n.push({text:e.text||e.title,value:e.value,selected:t===e.value})}),n}function r(t){var i=[];return tinymce.each(e.dom.select("a:not([href])"),function(e){var n=e.name||e.id;n&&i.push({text:n,value:"#"+n,selected:-1!=t.indexOf("#"+n)})}),i.length?(i.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:i,onselect:n}):void 0}function s(){c||0!==g.text.length||this.parent().parent().find("#text")[0].value(this.value())}var l,u,c,d,m,f,h,g={},p=e.selection,v=e.dom;l=p.getNode(),u=v.getParent(l,"a[href]"),g.text=c=u?u.innerText||u.textContent:p.getContent({format:"text"}),g.href=u?v.getAttrib(u,"href"):"",g.target=u?v.getAttrib(u,"target"):"",g.rel=u?v.getAttrib(u,"rel"):"","IMG"==l.nodeName&&(g.text=c=" "),t&&(m={type:"listbox",label:"Link list",values:i(),onselect:n}),e.settings.target_list!==!1&&(h={name:"target",type:"listbox",label:"Target",values:o(g.target)}),e.settings.rel_list&&(f={name:"rel",type:"listbox",label:"Rel",values:a(g.rel)}),d=e.windowManager.open({title:"Insert link",data:g,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:s,onkeyup:s},{name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){g.text=this.value()}},r(g.href),m,f,h],onSubmit:function(t){function n(t,n){window.setTimeout(function(){e.windowManager.confirm(t,n)},0)}function i(){a.text!=c?u?(e.focus(),u.innerHTML=a.text,v.setAttribs(u,{href:o,target:a.target?a.target:null,rel:a.rel?a.rel:null}),p.select(u)):e.insertContent(v.createHTML("a",{href:o,target:a.target?a.target:null,rel:a.rel?a.rel:null},a.text)):e.execCommand("mceInsertLink",!1,{href:o,target:a.target,rel:a.rel?a.rel:null})}var a=t.data,o=a.href;return o?o.indexOf("@")>0&&-1==o.indexOf("//")&&-1==o.indexOf("mailto:")?(n("The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(e){e&&(o="mailto:"+o),i()}),void 0):/^\s*www\./i.test(o)?(n("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(e){e&&(o="http://"+o),i()}),void 0):(i(),void 0):(e.execCommand("unlink"),void 0)}})}e.addButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Ctrl+K",onclick:t(n),stateSelector:"a[href]"}),e.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink",stateSelector:"a[href]"}),e.addShortcut("Ctrl+K","",t(n)),this.showDialog=n,e.addMenuItem("link",{icon:"link",text:"Insert link",shortcut:"Ctrl+K",onclick:t(n),stateSelector:"a[href]",context:"insert",prependToContext:!0})});
|
||||
tinymce.PluginManager.add("link",function(e){function t(t){return function(){var n=e.settings.link_list;"string"==typeof n?tinymce.util.XHR.send({url:n,success:function(e){t(tinymce.util.JSON.parse(e))}}):t(n)}}function n(t){function n(e){var t=f.find("#text");(!t.value()||e.lastControl&&t.value()==e.lastControl.text())&&t.value(e.control.text()),f.find("#href").value(e.control.value())}function l(){var n=[{text:"None",value:""}];return tinymce.each(t,function(t){n.push({text:t.text||t.title,value:e.convertURL(t.value||t.url,"href"),menu:t.menu})}),n}function i(t){var n=[{text:"None",value:""}];return tinymce.each(e.settings.rel_list,function(e){n.push({text:e.text||e.title,value:e.value,selected:t===e.value})}),n}function r(t){var n=[{text:"None",value:""}];return e.settings.target_list||n.push({text:"New window",value:"_blank"}),tinymce.each(e.settings.target_list,function(e){n.push({text:e.text||e.title,value:e.value,selected:t===e.value})}),n}function a(t){var l=[];return tinymce.each(e.dom.select("a:not([href])"),function(e){var n=e.name||e.id;n&&l.push({text:n,value:"#"+n,selected:-1!=t.indexOf("#"+n)})}),l.length?(l.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:l,onselect:n}):void 0}function o(){d&&d.value(e.convertURL(this.value(),"href")),c||0!==x.text.length||this.parent().parent().find("#text")[0].value(this.value())}var u,s,c,f,d,h,v,x={},g=e.selection,m=e.dom;u=g.getNode(),s=m.getParent(u,"a[href]"),x.text=c=s?s.innerText||s.textContent:g.getContent({format:"text"}),x.href=s?m.getAttrib(s,"href"):"",x.target=s?m.getAttrib(s,"target"):"",x.rel=s?m.getAttrib(s,"rel"):"","IMG"==u.nodeName&&(x.text=c=" "),t&&(d={type:"listbox",label:"Link list",values:l(),onselect:n,value:e.convertURL(x.href,"href"),onPostRender:function(){d=this}}),e.settings.target_list!==!1&&(v={name:"target",type:"listbox",label:"Target",values:r(x.target)}),e.settings.rel_list&&(h={name:"rel",type:"listbox",label:"Rel",values:i(x.rel)}),f=e.windowManager.open({title:"Insert link",data:x,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:o,onkeyup:o},{name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){x.text=this.value()}},a(x.href),d,h,v],onSubmit:function(t){function n(t,n){window.setTimeout(function(){e.windowManager.confirm(t,n)},0)}function l(){i.text!=c?s?(e.focus(),s.innerHTML=i.text,m.setAttribs(s,{href:r,target:i.target?i.target:null,rel:i.rel?i.rel:null}),g.select(s)):e.insertContent(m.createHTML("a",{href:r,target:i.target?i.target:null,rel:i.rel?i.rel:null},i.text)):e.execCommand("mceInsertLink",!1,{href:r,target:i.target,rel:i.rel?i.rel:null})}var i=t.data,r=i.href;return r?r.indexOf("@")>0&&-1==r.indexOf("//")&&-1==r.indexOf("mailto:")?(n("The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(e){e&&(r="mailto:"+r),l()}),void 0):/^\s*www\./i.test(r)?(n("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(e){e&&(r="http://"+r),l()}),void 0):(l(),void 0):(e.execCommand("unlink"),void 0)}})}e.addButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Ctrl+K",onclick:t(n),stateSelector:"a[href]"}),e.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink",stateSelector:"a[href]"}),e.addShortcut("Ctrl+K","",t(n)),this.showDialog=n,e.addMenuItem("link",{icon:"link",text:"Insert link",shortcut:"Ctrl+K",onclick:t(n),stateSelector:"a[href]",context:"insert",prependToContext:!0})});
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("pagebreak",function(e){var t,n="mce-pagebreak",i=e.getParam("pagebreak_separator","<!-- pagebreak -->"),a='<img src="'+tinymce.Env.transparentSrc+'" class="'+n+'" data-mce-resize="false" />';t=new RegExp(i.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"gi"),e.addCommand("mcePageBreak",function(){e.execCommand("mceInsertContent",0,a)}),e.addButton("pagebreak",{title:"Page break",cmd:"mcePageBreak"}),e.addMenuItem("pagebreak",{text:"Page break",icon:"pagebreak",cmd:"mcePageBreak",context:"insert"}),e.on("ResolveName",function(t){"IMG"==t.target.nodeName&&e.dom.hasClass(t.target,n)&&(t.name="pagebreak")}),e.on("click",function(t){t=t.target,"IMG"===t.nodeName&&e.dom.hasClass(t,n)&&e.selection.select(t)}),e.on("BeforeSetContent",function(e){e.content=e.content.replace(t,a)}),e.on("PreInit",function(){e.serializer.addNodeFilter("img",function(e){for(var t,n,a=e.length;a--;)t=e[a],n=t.attr("class"),n&&-1!==n.indexOf("mce-pagebreak")&&(t.type=3,t.value=i,t.raw=!0)})})});
|
||||
tinymce.PluginManager.add("pagebreak",function(e){var a="mce-pagebreak",t=e.getParam("pagebreak_separator","<!-- pagebreak -->"),n=new RegExp(t.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"gi"),r='<img src="'+tinymce.Env.transparentSrc+'" class="'+a+'" data-mce-resize="false" />';e.addCommand("mcePageBreak",function(){e.settings.pagebreak_split_block?e.insertContent("<p>"+r+"</p>"):e.insertContent(r)}),e.addButton("pagebreak",{title:"Page break",cmd:"mcePageBreak"}),e.addMenuItem("pagebreak",{text:"Page break",icon:"pagebreak",cmd:"mcePageBreak",context:"insert"}),e.on("ResolveName",function(t){"IMG"==t.target.nodeName&&e.dom.hasClass(t.target,a)&&(t.name="pagebreak")}),e.on("click",function(t){t=t.target,"IMG"===t.nodeName&&e.dom.hasClass(t,a)&&e.selection.select(t)}),e.on("BeforeSetContent",function(e){e.content=e.content.replace(n,r)}),e.on("PreInit",function(){e.serializer.addNodeFilter("img",function(a){for(var n,r,c=a.length;c--;)if(n=a[c],r=n.attr("class"),r&&-1!==r.indexOf("mce-pagebreak")){var o=n.parent;if(e.schema.getBlockElements()[o.name]&&e.settings.pagebreak_split_block){o.type=3,o.value=t,o.raw=!0,n.remove();continue}n.type=3,n.value=t,n.raw=!0}})})});
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("preview",function(e){var t=e.settings;e.addCommand("mcePreview",function(){e.windowManager.open({title:"Preview",width:parseInt(e.getParam("plugin_preview_width","650"),10),height:parseInt(e.getParam("plugin_preview_height","500"),10),html:'<iframe src="javascript:\'\'" frameborder="0"></iframe>',buttons:{text:"Close",onclick:function(){this.parent().parent().close()}},onPostRender:function(){var n,i=this.getEl("body").firstChild.contentWindow.document,a="";tinymce.each(e.contentCSS,function(t){a+='<link type="text/css" rel="stylesheet" href="'+e.documentBaseURI.toAbsolute(t)+'">'});var r=t.body_id||"tinymce";-1!=r.indexOf("=")&&(r=e.getParam("body_id","","hash"),r=r[e.id]||r);var o=t.body_class||"";-1!=o.indexOf("=")&&(o=e.getParam("body_class","","hash"),o=o[e.id]||""),n="<!DOCTYPE html><html><head>"+a+"</head>"+'<body id="'+r+'" class="mce-content-body '+o+'">'+e.getContent()+"</body>"+"</html>",i.open(),i.write(n),i.close()}})}),e.addButton("preview",{title:"Preview",cmd:"mcePreview"}),e.addMenuItem("preview",{text:"Preview",cmd:"mcePreview",context:"view"})});
|
||||
tinymce.PluginManager.add("preview",function(e){var t=e.settings;e.addCommand("mcePreview",function(){e.windowManager.open({title:"Preview",width:parseInt(e.getParam("plugin_preview_width","650"),10),height:parseInt(e.getParam("plugin_preview_height","500"),10),html:'<iframe src="javascript:\'\'" frameborder="0"></iframe>',buttons:{text:"Close",onclick:function(){this.parent().parent().close()}},onPostRender:function(){var i,n=this.getEl("body").firstChild.contentWindow.document,a="";tinymce.each(e.contentCSS,function(t){a+='<link type="text/css" rel="stylesheet" href="'+e.documentBaseURI.toAbsolute(t)+'">'});var d=t.body_id||"tinymce";-1!=d.indexOf("=")&&(d=e.getParam("body_id","","hash"),d=d[e.id]||d);var r=t.body_class||"";-1!=r.indexOf("=")&&(r=e.getParam("body_class","","hash"),r=r[e.id]||""),i="<!DOCTYPE html><html><head>"+a+"</head>"+'<body id="'+d+'" class="mce-content-body '+r+'">'+e.getContent()+"</body>"+"</html>",n.open(),n.write(i),n.close()}})}),e.addButton("preview",{title:"Preview",cmd:"mcePreview"}),e.addMenuItem("preview",{text:"Preview",cmd:"mcePreview",context:"view"})});
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("template",function(e){function t(){function t(t){function r(t){if(-1==t.indexOf("<html>")){var n="";tinymce.each(e.contentCSS,function(t){n+='<link type="text/css" rel="stylesheet" href="'+e.documentBaseURI.toAbsolute(t)+'">'}),t="<!DOCTYPE html><html><head>"+n+"</head>"+"<body>"+t+"</body>"+"</html>"}t=l(t,"template_preview_replace_values");var r=a.find("iframe")[0].getEl().contentWindow.document;r.open(),r.write(t),r.close()}var c=t.control.value();c.url?tinymce.util.XHR.send({url:c.url,success:function(e){n=e,r(n)}}):(n=c.content,r(n)),a.find("#description")[0].text(t.control.value().description)}var a,n,c=[];return e.settings.templates?(tinymce.each(e.settings.templates,function(e){c.push({selected:!c.length,text:e.title,value:{url:e.url,content:e.content,description:e.description}})}),a=e.windowManager.open({title:"Insert template",body:[{type:"container",label:"Templates",items:{type:"listbox",name:"template",values:c,onselect:t}},{type:"label",name:"description",label:"Description",text:" "},{type:"iframe",minWidth:600,minHeight:400,border:1}],onsubmit:function(){r(!1,n)}}),a.find("listbox")[0].fire("select"),void 0):(e.windowManager.alert("No templates defined"),void 0)}function a(t,a){function n(e,t){if(e=""+e,e.length<t)for(var a=0;a<t-e.length;a++)e="0"+e;return e}var l="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),r="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),c="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),o="January February March April May June July August September October November December".split(" ");return a=a||new Date,t=t.replace("%D","%m/%d/%Y"),t=t.replace("%r","%I:%M:%S %p"),t=t.replace("%Y",""+a.getFullYear()),t=t.replace("%y",""+a.getYear()),t=t.replace("%m",n(a.getMonth()+1,2)),t=t.replace("%d",n(a.getDate(),2)),t=t.replace("%H",""+n(a.getHours(),2)),t=t.replace("%M",""+n(a.getMinutes(),2)),t=t.replace("%S",""+n(a.getSeconds(),2)),t=t.replace("%I",""+((a.getHours()+11)%12+1)),t=t.replace("%p",""+(a.getHours()<12?"AM":"PM")),t=t.replace("%B",""+e.translate(o[a.getMonth()])),t=t.replace("%b",""+e.translate(c[a.getMonth()])),t=t.replace("%A",""+e.translate(r[a.getDay()])),t=t.replace("%a",""+e.translate(l[a.getDay()])),t=t.replace("%%","%")}function n(t){var a=e.dom,n=e.getParam("template_replace_values");c(a.select("*",t),function(e){c(n,function(t,l){a.hasClass(e,l)&&"function"==typeof n[l]&&n[l](e)})})}function l(t,a){return c(e.getParam(a),function(e,a){"function"!=typeof e&&(t=t.replace(new RegExp("\\{\\$"+a+"\\}","g"),e))}),t}function r(t,r){function o(e,t){return new RegExp("\\b"+t+"\\b","g").test(e.className)}var s,i,m=e.dom,p=e.selection.getContent();r=l(r,"template_replace_values"),s=m.create("div",null,r),i=m.select(".mceTmpl",s),i&&i.length>0&&(s=m.create("div",null),s.appendChild(i[0].cloneNode(!0))),c(m.select("*",s),function(t){o(t,e.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))&&(t.innerHTML=a(e.getParam("template_cdate_format",e.getLang("template.cdate_format")))),o(t,e.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(t.innerHTML=a(e.getParam("template_mdate_format",e.getLang("template.mdate_format")))),o(t,e.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))&&(t.innerHTML=p)}),n(s),e.execCommand("mceInsertContent",!1,s.innerHTML),e.addVisual()}var c=tinymce.each;e.addCommand("mceInsertTemplate",r),e.addButton("template",{title:"Insert template",onclick:t}),e.addMenuItem("template",{text:"Insert template",onclick:t,context:"insert"}),e.on("PreProcess",function(t){var l=e.dom;c(l.select("div",t.node),function(t){l.hasClass(t,"mceTmpl")&&(c(l.select("*",t),function(t){l.hasClass(t,e.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(t.innerHTML=a(e.getParam("template_mdate_format",e.getLang("template.mdate_format"))))}),n(t))})})});
|
||||
tinymce.PluginManager.add("template",function(e){function t(t){return function(){var a=e.settings.templates;"string"==typeof a?tinymce.util.XHR.send({url:a,success:function(e){t(tinymce.util.JSON.parse(e))}}):t(a)}}function a(t){function a(t){function a(t){if(-1==t.indexOf("<html>")){var a="";tinymce.each(e.contentCSS,function(t){a+='<link type="text/css" rel="stylesheet" href="'+e.documentBaseURI.toAbsolute(t)+'">'}),t="<!DOCTYPE html><html><head>"+a+"</head>"+"<body>"+t+"</body>"+"</html>"}t=r(t,"template_preview_replace_values");var l=n.find("iframe")[0].getEl().contentWindow.document;l.open(),l.write(t),l.close()}var c=t.control.value();c.url?tinymce.util.XHR.send({url:c.url,success:function(e){l=e,a(l)}}):(l=c.content,a(l)),n.find("#description")[0].text(t.control.value().description)}var n,l,i=[];return t&&0!==t.length?(tinymce.each(t,function(e){i.push({selected:!i.length,text:e.title,value:{url:e.url,content:e.content,description:e.description}})}),n=e.windowManager.open({title:"Insert template",layout:"flex",direction:"column",align:"stretch",padding:15,spacing:10,items:[{type:"form",flex:0,padding:0,items:[{type:"container",label:"Templates",items:{type:"listbox",label:"Templates",name:"template",values:i,onselect:a}}]},{type:"label",name:"description",label:"Description",text:" "},{type:"iframe",flex:1,border:1}],onsubmit:function(){c(!1,l)},width:e.getParam("template_popup_width",600),height:e.getParam("template_popup_height",500)}),n.find("listbox")[0].fire("select"),void 0):(e.windowManager.alert("No templates defined"),void 0)}function n(t,a){function n(e,t){if(e=""+e,e.length<t)for(var a=0;a<t-e.length;a++)e="0"+e;return e}var l="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),r="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),c="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),i="January February March April May June July August September October November December".split(" ");return a=a||new Date,t=t.replace("%D","%m/%d/%Y"),t=t.replace("%r","%I:%M:%S %p"),t=t.replace("%Y",""+a.getFullYear()),t=t.replace("%y",""+a.getYear()),t=t.replace("%m",n(a.getMonth()+1,2)),t=t.replace("%d",n(a.getDate(),2)),t=t.replace("%H",""+n(a.getHours(),2)),t=t.replace("%M",""+n(a.getMinutes(),2)),t=t.replace("%S",""+n(a.getSeconds(),2)),t=t.replace("%I",""+((a.getHours()+11)%12+1)),t=t.replace("%p",""+(a.getHours()<12?"AM":"PM")),t=t.replace("%B",""+e.translate(i[a.getMonth()])),t=t.replace("%b",""+e.translate(c[a.getMonth()])),t=t.replace("%A",""+e.translate(r[a.getDay()])),t=t.replace("%a",""+e.translate(l[a.getDay()])),t=t.replace("%%","%")}function l(t){var a=e.dom,n=e.getParam("template_replace_values");i(a.select("*",t),function(e){i(n,function(t,l){a.hasClass(e,l)&&"function"==typeof n[l]&&n[l](e)})})}function r(t,a){return i(e.getParam(a),function(e,a){"function"!=typeof e&&(t=t.replace(new RegExp("\\{\\$"+a+"\\}","g"),e))}),t}function c(t,a){function c(e,t){return new RegExp("\\b"+t+"\\b","g").test(e.className)}var o,s,p=e.dom,m=e.selection.getContent();a=r(a,"template_replace_values"),o=p.create("div",null,a),s=p.select(".mceTmpl",o),s&&s.length>0&&(o=p.create("div",null),o.appendChild(s[0].cloneNode(!0))),i(p.select("*",o),function(t){c(t,e.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))&&(t.innerHTML=n(e.getParam("template_cdate_format",e.getLang("template.cdate_format")))),c(t,e.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(t.innerHTML=n(e.getParam("template_mdate_format",e.getLang("template.mdate_format")))),c(t,e.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))&&(t.innerHTML=m)}),l(o),e.execCommand("mceInsertContent",!1,o.innerHTML),e.addVisual()}var i=tinymce.each;e.addCommand("mceInsertTemplate",c),e.addButton("template",{title:"Insert template",onclick:t(a)}),e.addMenuItem("template",{text:"Insert template",onclick:t(a),context:"insert"}),e.on("PreProcess",function(t){var a=e.dom;i(a.select("div",t.node),function(t){a.hasClass(t,"mceTmpl")&&(i(a.select("*",t),function(t){a.hasClass(t,e.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(t.innerHTML=n(e.getParam("template_mdate_format",e.getLang("template.mdate_format"))))}),l(t))})})});
|
||||
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("textcolor",function(e){function t(){var t,n,i=[];for(n=e.settings.textcolor_map||["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Brown","C0C0C0","Silver","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum","FFFFFF","White"],t=0;t<n.length;t+=2)i.push({text:n[t+1],color:n[t]});return i}function n(){var n,i,a,o,r,l,c,s,u,d=this;for(n=t(),a='<table class="mce-grid mce-grid-border mce-colorbutton-grid" role="presentation" cellspacing="0"><tbody>',o=n.length-1,r=e.settings.textcolor_rows||5,l=e.settings.textcolor_cols||8,s=0;r>s;s++){for(a+="<tr>",c=0;l>c;c++)u=s*l+c,u>o?a+="<td></td>":(i=n[u],a+='<td><div id="'+d._id+"-"+u+'"'+' data-mce-color="'+i.color+'"'+' role="option"'+' tabIndex="-1"'+' style="'+(i?"background-color: #"+i.color:"")+'"'+' title="'+i.text+'">'+"</div>"+"</td>");a+="</tr>"}return a+="</tbody></table>"}function i(t){var n,i=this.parent();(n=t.target.getAttribute("data-mce-color"))&&(i.hidePanel(),n="#"+n,i.color(n),e.execCommand(i.settings.selectcmd,!1,n))}function a(){var t=this;t._color&&e.execCommand(t.settings.selectcmd,!1,t._color)}e.addButton("forecolor",{type:"colorbutton",tooltip:"Text color",popoverAlign:"bc-tl",selectcmd:"ForeColor",panel:{html:n,onclick:i},onclick:a}),e.addButton("backcolor",{type:"colorbutton",tooltip:"Background color",popoverAlign:"bc-tl",selectcmd:"HiliteColor",panel:{html:n,onclick:i},onclick:a})});
|
||||
tinymce.PluginManager.add("textcolor",function(e){function o(){var o,t,r=[];for(t=e.settings.textcolor_map||["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Brown","C0C0C0","Silver","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum","FFFFFF","White"],o=0;o<t.length;o+=2)r.push({text:t[o+1],color:t[o]});return r}function t(){var t,r,l,c,n,a,F,i,d,u=this;for(t=o(),l='<table class="mce-grid mce-grid-border mce-colorbutton-grid" role="presentation" cellspacing="0"><tbody>',c=t.length-1,n=e.settings.textcolor_rows||5,a=e.settings.textcolor_cols||8,i=0;n>i;i++){for(l+="<tr>",F=0;a>F;F++)d=i*a+F,d>c?l+="<td></td>":(r=t[d],l+='<td><div id="'+u._id+"-"+d+'"'+' data-mce-color="'+r.color+'"'+' role="option"'+' tabIndex="-1"'+' style="'+(r?"background-color: #"+r.color:"")+'"'+' title="'+r.text+'">'+"</div>"+"</td>");l+="</tr>"}return l+="</tbody></table>"}function r(o){var t,r=this.parent();(t=o.target.getAttribute("data-mce-color"))&&(r.hidePanel(),t="#"+t,r.color(t),e.execCommand(r.settings.selectcmd,!1,t))}function l(){var o=this;o._color&&e.execCommand(o.settings.selectcmd,!1,o._color)}e.addButton("forecolor",{type:"colorbutton",tooltip:"Text color",selectcmd:"ForeColor",panel:{html:t,onclick:r},onclick:l}),e.addButton("backcolor",{type:"colorbutton",tooltip:"Background color",selectcmd:"HiliteColor",panel:{html:t,onclick:r},onclick:l})});
|
||||
@@ -166,7 +166,8 @@ tinymce.PluginManager.add('umbracolink', function(editor) {
|
||||
var anchor = $(anchorElm);
|
||||
currentTarget = {
|
||||
name: anchor.attr("title"),
|
||||
url: anchor.attr("href")
|
||||
url: anchor.attr("href"),
|
||||
target: anchor.attr("target")
|
||||
};
|
||||
|
||||
//locallink detection, we do this here, to avoid poluting the dialogservice
|
||||
@@ -209,7 +210,7 @@ tinymce.PluginManager.add('umbracolink', function(editor) {
|
||||
|
||||
//if we have an id, it must be a locallink:id
|
||||
if(data.id){
|
||||
href = "{localLink:" + data.id + "}";
|
||||
href = "/{localLink:" + data.id + "}";
|
||||
insertLink();
|
||||
return;
|
||||
}
|
||||
@@ -260,4 +261,4 @@ tinymce.PluginManager.add('umbracolink', function(editor) {
|
||||
context: 'insert',
|
||||
prependToContext: true
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("wordcount",function(e){function t(){e.theme.panel.find("#wordcount").text(["Words: {0}",a.getCount()])}var n,i,a=this;n=e.getParam("wordcount_countregex",/[\w\u2019\x27\-]+/g),i=e.getParam("wordcount_cleanregex",/[0-9.(),;:!?%#$?\x27\x22_+=\\\/\-]*/g),e.on("init",function(){var n=e.theme.panel&&e.theme.panel.find("#statusbar")[0];n&&window.setTimeout(function(){n.insert({type:"label",name:"wordcount",text:["Words: {0}",a.getCount()],classes:"wordcount"},0),e.on("setcontent beforeaddundo",t),e.on("keyup",function(e){32==e.keyCode&&t()})},0)}),a.getCount=function(){var t=e.getContent({format:"raw"}),a=0;if(t){t=t.replace(/\.\.\./g," "),t=t.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," "),t=t.replace(/(\w+)(&.+?;)+(\w+)/,"$1$3").replace(/&.+?;/g," "),t=t.replace(i,"");var o=t.match(n);o&&(a=o.length)}return a}});
|
||||
tinymce.PluginManager.add("wordcount",function(e){function t(){e.theme.panel.find("#wordcount").text(["Words: {0}",a.getCount()])}var n,o,a=this;n=e.getParam("wordcount_countregex",/[\w\u2019\x27\-\u0600-\u06FF]+/g),o=e.getParam("wordcount_cleanregex",/[0-9.(),;:!?%#$?\x27\x22_+=\\\/\-]*/g),e.on("init",function(){var n=e.theme.panel&&e.theme.panel.find("#statusbar")[0];n&&window.setTimeout(function(){n.insert({type:"label",name:"wordcount",text:["Words: {0}",a.getCount()],classes:"wordcount",disabled:e.settings.readonly},0),e.on("setcontent beforeaddundo",t),e.on("keyup",function(e){32==e.keyCode&&t()})},0)}),a.getCount=function(){var t=e.getContent({format:"raw"}),a=0;if(t){t=t.replace(/\.\.\./g," "),t=t.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," "),t=t.replace(/(\w+)(&.+?;)+(\w+)/,"$1$3").replace(/&.+?;/g," "),t=t.replace(o,"");var r=t.match(n);r&&(a=r.length)}return a}});
|
||||
+1
-1
@@ -1 +1 @@
|
||||
.mce-object{border:1px dotted #3a3a3a;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px!important;height:9px!important;border:1px dotted #3a3a3a;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp{background:#AAA}hr{cursor:default}.mce-match-marker{background:green;color:#fff}.mce-spellchecker-word{background:url(img/wline.gif) repeat-x bottom left;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td.mce-item-selected,th.mce-item-selected{background-color:#39f!important}.mce-edit-focus{outline:1px dotted #333}
|
||||
.mce-object{border:1px dotted #3A3A3A;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px !important;height:9px !important;border:1px dotted #3A3A3A;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp{background:#AAA}hr{cursor:default}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{background:url(img/wline.gif) repeat-x bottom left;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td.mce-item-selected,th.mce-item-selected{background-color:#3399ff !important}.mce-edit-focus{outline:1px dotted #333}
|
||||
@@ -1 +1 @@
|
||||
body{background-color:#fff;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px;scrollbar-3dlight-color:#f0f0ee;scrollbar-arrow-color:#676662;scrollbar-base-color:#f0f0ee;scrollbar-darkshadow-color:#ddd;scrollbar-face-color:#e0e0dd;scrollbar-highlight-color:#f0f0ee;scrollbar-shadow-color:#f0f0ee;scrollbar-track-color:#f5f5f5}td,th{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px}.mce-object{border:1px dotted #3a3a3a;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px!important;height:9px!important;border:1px dotted #3a3a3a;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp{background:#AAA}hr{cursor:default}.mce-match-marker{background:green;color:#fff}.mce-spellchecker-word{background:url(img/wline.gif) repeat-x bottom left;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td.mce-item-selected,th.mce-item-selected{background-color:#39f!important}.mce-edit-focus{outline:1px dotted #333}
|
||||
body{background-color:#FFFFFF;color:#000000;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px;scrollbar-3dlight-color:#F0F0EE;scrollbar-arrow-color:#676662;scrollbar-base-color:#F0F0EE;scrollbar-darkshadow-color:#DDDDDD;scrollbar-face-color:#E0E0DD;scrollbar-highlight-color:#F0F0EE;scrollbar-shadow-color:#F0F0EE;scrollbar-track-color:#F5F5F5}td,th{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px}.mce-object{border:1px dotted #3A3A3A;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px !important;height:9px !important;border:1px dotted #3A3A3A;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp{background:#AAA}hr{cursor:default}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{background:url(img/wline.gif) repeat-x bottom left;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td.mce-item-selected,th.mce-item-selected{background-color:#3399ff !important}.mce-edit-focus{outline:1px dotted #333}
|
||||
Binary file not shown.
@@ -0,0 +1,175 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>
|
||||
This is a custom SVG font generated by IcoMoon.
|
||||
<iconset grid="16"></iconset>
|
||||
</metadata>
|
||||
<defs>
|
||||
<font id="tinymce-small" horiz-adv-x="512" >
|
||||
<font-face units-per-em="512" ascent="480" descent="-32" />
|
||||
<missing-glyph horiz-adv-x="512" />
|
||||
<glyph class="hidden" unicode="" d="M0,480L 512 -32L0 -32 z" horiz-adv-x="0" />
|
||||
<glyph unicode="" d="M 352,64l0,18.502 c 75.674,30.814, 128,96.91, 128,173.498c0,106.039-100.288,192-224,192S 32,362.039, 32,256
|
||||
c0-76.588, 52.327-142.684, 128-173.498L 160,64 L 64,64 l-32,48l0-112 l 160,0 L 192,111.406 c-50.45,25.681-85.333,80.77-85.333,144.594
|
||||
c0,88.366, 66.859,160, 149.333,160c 82.474,0, 149.333-71.634, 149.333-160c0-63.824-34.883-118.913-85.333-144.594L 320,0 l 160,0 L 480,112 l-32-48
|
||||
L 352,64 z" />
|
||||
<glyph unicode="" d="M 128,448l0-448 l 128,128l 128-128L 384,448 L 128,448 z M 352,85.255l-96,96l-96-96L 160,416 l 192,0 L 352,85.255 z" />
|
||||
<glyph unicode="" d="M 463.637,364.892l-66.745,66.744C 386.34,442.188, 372.276,448, 357.293,448s-29.047-5.812-39.598-16.363l-82.746-82.745
|
||||
c-21.834-21.834-21.834-57.362,0-79.196l 1.373-1.373l 33.941,33.941l-1.373,1.373c-3.066,3.066-3.066,8.247,0,11.313l 82.746,82.746
|
||||
C 353.641,399.7, 356.040,400, 357.292,400s 3.651-0.299, 5.656-2.305l 66.745-66.744c 3.066-3.067, 3.066-8.249, 0.001-11.314l-82.747-82.747
|
||||
c-2.004-2.004-4.403-2.304-5.655-2.304s-3.651,0.3-5.656,2.306l-1.373,1.373l-33.94-33.942l 1.371-1.371
|
||||
c 10.553-10.554, 24.615-16.364, 39.6-16.364s 29.047,5.812, 39.598,16.363l 82.747,82.746C 485.47,307.53, 485.47,343.057, 463.637,364.892
|
||||
zM 275.678,179.678l-33.941-33.941l 1.373-1.373c 2.004-2.004, 2.305-4.403, 2.305-5.655c0-1.253-0.299-3.651-2.303-5.657
|
||||
l-82.747-82.745c-2.005-2.005-4.405-2.305-5.657-2.305s-3.652,0.3-5.657,2.305L 82.305,117.050C 80.3,119.055, 80,121.455, 80,122.707
|
||||
s 0.299,3.65, 2.305,5.656l 82.745,82.744c 2.005,2.006, 4.405,2.306, 5.657,2.306s 3.652-0.3, 5.657-2.306l 1.373-1.371l 33.941,33.94
|
||||
l-1.373,1.373c-10.552,10.552-24.615,16.363-39.598,16.363s-29.046-5.812-39.598-16.363l-82.744-82.743
|
||||
C 37.812,151.754, 32,137.689, 32,122.707s 5.812-29.047, 16.363-39.599l 66.745-66.745C 125.661,5.812, 139.724,0, 154.707,0
|
||||
s 29.046,5.812, 39.598,16.363l 82.747,82.746c 10.552,10.552, 16.361,24.615, 16.361,39.598s-5.812,29.047-16.363,39.598
|
||||
L 275.678,179.678zM 400,61c-4.862,0-9.725,1.854-13.435,5.565l-64,63.999c-7.422,7.42-7.422,19.449,0,26.869
|
||||
c 7.42,7.422, 19.448,7.422, 26.868,0l 64-64c 7.422-7.42, 7.422-19.448,0-26.868C 409.725,62.854, 404.862,61, 400,61zM 304,0c-8.837,0-16,7.163-16,16l0,64 c0,8.837, 7.163,16, 16,16s 16-7.163, 16-16l0-64 C 320,7.163, 312.837,0, 304,0zM 464,160l-64,0 c-8.837,0-16,7.163-16,16s 7.163,16, 16,16l 64,0 c 8.837,0, 16-7.163, 16-16S 472.837,160, 464,160zM 112,387c 4.862,0, 9.725-1.854, 13.435-5.565l 64-64c 7.421-7.42, 7.421-19.449,0-26.869c-7.42-7.422-19.449-7.422-26.869,0
|
||||
l-64,64c-7.421,7.42-7.421,19.449,0,26.869C 102.275,385.146, 107.138,387, 112,387zM 208,448c 8.837,0, 16-7.163, 16-16l0-64 c0-8.837-7.163-16-16-16s-16,7.163-16,16L 192,432 C 192,440.837, 199.163,448, 208,448zM 48,288l 64,0 c 8.837,0, 16-7.163, 16-16s-7.163-16-16-16L 48,256 c-8.837,0-16,7.163-16,16S 39.163,288, 48,288z" />
|
||||
<glyph unicode="" d="M 463.637,364.892l-66.745,66.744C 386.34,442.188, 372.276,448, 357.293,448s-29.047-5.812-39.598-16.363l-82.746-82.745
|
||||
c-21.834-21.834-21.834-57.362,0-79.196l 1.373-1.373l 33.941,33.941l-1.373,1.373c-3.066,3.066-3.066,8.247,0,11.313l 82.746,82.746
|
||||
C 353.641,399.7, 356.040,400, 357.292,400s 3.651-0.299, 5.656-2.305l 66.745-66.744c 3.066-3.067, 3.066-8.249, 0.001-11.314l-82.747-82.747
|
||||
c-2.004-2.004-4.403-2.304-5.655-2.304s-3.651,0.3-5.656,2.306l-1.373,1.373l-33.94-33.942l 1.371-1.371
|
||||
c 10.553-10.554, 24.615-16.364, 39.6-16.364s 29.047,5.812, 39.598,16.363l 82.747,82.746C 485.47,307.53, 485.47,343.057, 463.637,364.892
|
||||
zM 275.678,179.678l-33.941-33.941l 1.373-1.373c 2.004-2.004, 2.305-4.403, 2.305-5.655c0-1.253-0.299-3.651-2.303-5.657
|
||||
l-82.747-82.745c-2.005-2.005-4.405-2.305-5.657-2.305s-3.652,0.3-5.657,2.305L 82.305,117.050C 80.3,119.055, 80,121.455, 80,122.707
|
||||
s 0.299,3.65, 2.305,5.656l 82.745,82.744c 2.005,2.006, 4.405,2.306, 5.657,2.306s 3.652-0.3, 5.657-2.306l 1.373-1.371l 33.941,33.94
|
||||
l-1.373,1.373c-10.552,10.552-24.615,16.363-39.598,16.363s-29.046-5.812-39.598-16.363l-82.744-82.743
|
||||
C 37.812,151.754, 32,137.689, 32,122.707s 5.812-29.047, 16.363-39.599l 66.745-66.745C 125.661,5.812, 139.724,0, 154.707,0
|
||||
s 29.046,5.812, 39.598,16.363l 82.747,82.746c 10.552,10.552, 16.361,24.615, 16.361,39.598s-5.812,29.047-16.363,39.598
|
||||
L 275.678,179.678zM 176,125c-4.862,0-9.725,1.855-13.435,5.564c-7.42,7.42-7.42,19.449,0,26.869l 160,160c 7.42,7.42, 19.448,7.42, 26.868,0
|
||||
c 7.422-7.42, 7.422-19.45,0-26.87l-160-160C 185.725,126.855, 180.862,125, 176,125z" />
|
||||
<glyph unicode="" d="M 288,339.337L 288,448 l 168.001-168L 288,112L 288,223.048 C 92.547,227.633, 130.5,99.5, 160,0C 16,160, 53.954,345.437, 288,339.337z" />
|
||||
<glyph unicode="" d="M 352,0c 29.5,99.5, 67.453,227.633-128,223.048L 224,112 L 55.999,280L 224,448l0-108.663 C 458.046,345.437, 496,160, 352,0z" />
|
||||
<glyph unicode="" d="M 128.214,267.637c 52.9,0, 95.786-45.585, 95.786-101.819C 224,109.586, 181.114,64, 128.214,64
|
||||
c-52.901,0-95.786,45.585-95.786,101.818L 32,180.364C 32,292.829, 117.77,384, 223.572,384l0-58.182 c-36.55,0-70.913-15.13-96.758-42.602
|
||||
c-4.977-5.289-9.517-10.917-13.612-16.828C 118.094,267.208, 123.105,267.637, 128.214,267.637zM 384.214,267.637c 52.9,0, 95.786-45.585, 95.786-101.819C 480,109.586, 437.114,64, 384.214,64
|
||||
c-52.901,0-95.786,45.585-95.786,101.818L 288,180.364C 288,292.829, 373.77,384, 479.572,384l0-58.182 c-36.55,0-70.913-15.13-96.758-42.602
|
||||
c-4.978-5.289-9.518-10.917-13.612-16.828C 374.094,267.208, 379.105,267.637, 384.214,267.637z" />
|
||||
<glyph unicode="" d="M 32,384L 480,384L 480,320L 32,320zM 192,192L 480,192L 480,128L 192,128zM 192,288L 480,288L 480,224L 192,224zM 32,96L 480,96L 480,32L 32,32zM 32,288L 144,208L 32,128 z" />
|
||||
<glyph unicode="" d="M 32,384L 480,384L 480,320L 32,320zM 32,192L 320,192L 320,128L 32,128zM 32,288L 320,288L 320,224L 32,224zM 32,96L 480,96L 480,32L 32,32zM 480,288L 368,208L 480,128 z" />
|
||||
<glyph unicode="" d="M 192,416L 480,416L 480,352L 192,352zM 192,256L 480,256L 480,192L 192,192zM 192,96L 480,96L 480,32L 192,32zM 160,215L 160,288L 128,288L 128,448L 64,448L 64,416L 96,416L 96,288L 64,288L 64,256L 128,256L 128,231L 64,201L 64,128L 128,128L 128,96L 64,96L 64,64L 128,64L 128,32L 64,32L 64,0L 160,0L 160,160L 96,160L 96,185 z" />
|
||||
<glyph unicode="" d="M 192,416L 480,416L 480,352L 192,352zM 192,256L 480,256L 480,192L 192,192zM 192,96L 480,96L 480,32L 192,32zM 64,384A32,32 2700 1 1 128,384A32,32 2700 1 1 64,384zM 64,224A32,32 2700 1 1 128,224A32,32 2700 1 1 64,224zM 64,64A32,32 2700 1 1 128,64A32,32 2700 1 1 64,64z" />
|
||||
<glyph unicode="" d="M 444,288l-28,0 L 416,416 l 32,0 L 448,448 L 288,448 l0-32 l 32,0 l0-128 L 192,288 L 192,416 l 32,0 L 224,448 L 64,448 l0-32 l 32,0 l0-128 L 68,288 c-19.8,0-36-16.2-36-36l0-216 c0-19.8, 16.2-36, 36-36l 120,0
|
||||
c 19.8,0, 36,16.2, 36,36L 224,192 l 64,0 l0-156 c0-19.8, 16.2-36, 36-36l 120,0 c 19.8,0, 36,16.2, 36,36L 480,252 C 480,271.8, 463.8,288, 444,288z M 174,32L 82,32
|
||||
c-9.9,0-18,7.2-18,16s 8.1,16, 18,16l 92,0 c 9.9,0, 18-7.2, 18-16S 183.9,32, 174,32z M 272,224l-32,0 c-8.8,0-16,7.2-16,16s 7.2,16, 16,16l 32,0
|
||||
c 8.8,0, 16-7.2, 16-16S 280.8,224, 272,224z M 430,32l-92,0 c-9.9,0-18,7.2-18,16s 8.1,16, 18,16l 92,0 c 9.9,0, 18-7.2, 18-16S 439.9,32, 430,32z" />
|
||||
<glyph unicode="" d="M 352,288l0,80 c0,8.8-7.2,16-16,16l-80,0 L 256,416 c0,17.6-14.4,32-32,32l-64,0 c-17.602,0-32-14.4-32-32l0-32 L 48,384 c-8.801,0-16-7.2-16-16l0-256
|
||||
c0-8.8, 7.199-16, 16-16l 112,0 l0-96 l 192,0 l 96,96L 448,288 L 352,288 z M 160,415.943c 0.017,0.019, 0.036,0.039, 0.057,0.057l 63.884,0
|
||||
c 0.021-0.018, 0.041-0.038, 0.059-0.057L 224,384 l-64,0 L 160,415.943 L 160,415.943z M 96,320l0,32 l 192,0 l0-32 L 96,320 z M 352,45.255L 352,96 l 50.745,0 L 352,45.255z
|
||||
M 416,128l-96,0 l0-96 L 192,32 L 192,256 l 224,0 L 416,128 z" />
|
||||
<glyph unicode="" d="M 416,320l-96,0 l0,32 l-96,96L 32,448 l0-352 l 192,0 l0-96 l 288,0 L 512,224 L 416,320z M 416,274.745L 466.745,224L 416,224 L 416,274.745 z M 224,402.745L 274.745,352
|
||||
L 224,352 L 224,402.745 z M 64,416l 128,0 l0-96 l 96,0 l0-192 L 64,128 L 64,416 z M 480,32L 256,32 l0,64 l 64,0 L 320,288 l 64,0 l0-96 l 96,0 L 480,32 z" />
|
||||
<glyph unicode="" d="M 432.204,144.934c-23.235,23.235-53.469,34.002-80.541,31.403L 320,208l 96,96c0,0, 64,64,0,128L 256,272L 96,432
|
||||
c-64-64,0-128,0-128l 96-96l-31.663-31.663c-27.072,2.599-57.305-8.169-80.54-31.403c-37.49-37.49-42.556-93.209-11.313-124.45
|
||||
c 31.241-31.241, 86.96-26.177, 124.45,11.313c 23.235,23.234, 34.001,53.469, 31.403,80.54L 256,144l 31.664-31.664
|
||||
c-2.598-27.072, 8.168-57.305, 31.403-80.539c 37.489-37.49, 93.209-42.556, 124.449-11.313
|
||||
C 474.76,51.725, 469.694,107.443, 432.204,144.934z M 176.562,100.711c-1.106-12.166-7.51-24.913-17.57-34.973
|
||||
C 147.886,54.631, 133.452,48, 120.383,48c-5.262,0-12.649,1.114-17.958,6.424c-10.703,10.702-8.688,36.566, 11.313,56.568
|
||||
c 11.106,11.107, 25.54,17.738, 38.609,17.738c 5.262,0, 12.649-1.114, 17.958-6.424C 176.861,115.751, 177.040,105.962, 176.562,100.711z
|
||||
M 256,176c-17.673,0-32,14.327-32,32s 14.327,32, 32,32s 32-14.327, 32-32S 273.673,176, 256,176z M 409.576,54.424
|
||||
c-5.31-5.31-12.696-6.424-17.958-6.424c-13.069,0-27.503,6.631-38.609,17.738c-10.061,10.060-16.464,22.807-17.569,34.973
|
||||
c-0.479,5.251-0.3,15.040, 6.257,21.596c 5.309,5.311, 12.695,6.424, 17.958,6.424c 13.068,0, 27.503-6.631, 38.608-17.737
|
||||
C 418.265,90.99, 420.279,65.126, 409.576,54.424z" />
|
||||
<glyph unicode="" d="M 32,384L 480,384L 480,320L 32,320zM 32,192L 480,192L 480,128L 32,128zM 32,288L 480,288L 480,224L 32,224zM 32,96L 480,96L 480,32L 32,32z" />
|
||||
<glyph unicode="" d="M 32,384L 480,384L 480,320L 32,320zM 32,192L 480,192L 480,128L 32,128zM 128,288L 384,288L 384,224L 128,224zM 128,96L 384,96L 384,32L 128,32z" />
|
||||
<glyph unicode="" d="M 32,384L 480,384L 480,320L 32,320zM 32,192L 480,192L 480,128L 32,128zM 192,288L 480,288L 480,224L 192,224zM 192,96L 480,96L 480,32L 192,32z" />
|
||||
<glyph unicode="" d="M 32,384L 480,384L 480,320L 32,320zM 32,192L 480,192L 480,128L 32,128zM 32,288L 320,288L 320,224L 32,224zM 32,96L 320,96L 320,32L 32,32z" />
|
||||
<glyph unicode="" d="M 480,224l-4.571,0 L 347.062,224 c-25.039,17.71-57.215,27.43-91.062,27.43c-44.603,0-82.286,25.121-82.286,54.856
|
||||
c0,29.735, 37.683,54.857, 82.286,54.857c 37.529,0, 70.154-17.788, 79.56-41.143l 56.508,0 c-3.965,25.322-18.79,48.984-42.029,66.413
|
||||
C 324.599,405.493, 291.201,416, 256,416c-35.202,0-68.598-10.507-94.037-29.587c-27.394-20.545-43.106-49.751-43.106-80.127
|
||||
s 15.712-59.582, 43.106-80.127c 0.978-0.733, 1.971-1.449, 2.973-2.158L 36.571,224.001 L 32,224.001 l0-32 l 256.266,0 c 29.104-8.553, 50.021-28.135, 50.021-50.286
|
||||
c0-29.734-37.684-54.855-82.286-54.855c-37.53,0-70.154,17.787-79.559,41.143l-56.508,0 c 3.965-25.32, 18.791-48.984, 42.030-66.413
|
||||
C 187.402,42.508, 220.798,32, 256,32c 35.201,0, 68.599,10.508, 94.037,29.587c 27.395,20.545, 43.104,49.751, 43.104,80.127
|
||||
c0,17.649-5.327,34.896-15.147,50.286L 480,192 L 480,224 z" />
|
||||
<glyph unicode="" d="M 96,64l 288,0 l0-32 L 96,32 L 96,64 zM 320,416l0-192 c0-15.656-7.35-30.812-20.695-42.676C 283.834,167.573, 262.771,160, 240,160c-22.772,0-43.834,7.573-59.304,21.324
|
||||
C 167.35,193.188, 160,208.344, 160,224L 160,416 L 96,416 l0-192 c0-70.691, 64.471-128, 144-128c 79.529,0, 144,57.309, 144,128L 384,416 L 320,416 z" />
|
||||
<glyph unicode="" d="M 416,416l0-32 l-72,0 L 216,64l 72,0 l0-32 L 64,32 l0,32 l 72,0 L 264,384l-72,0 L 192,416 L 416,416 z" />
|
||||
<glyph unicode="" d="M 312.721,232.909C 336.758,251.984, 352,280.337, 352,312c0,57.438-50.145,104-112,104L 128,416 l0-384 l 144,0
|
||||
c 61.856,0, 112,46.562, 112,104C 384,180.098, 354.441,217.781, 312.721,232.909z M 192,328c0,13.255, 10.745,24, 24,24l 33.602,0
|
||||
C 270.809,352, 288,330.51, 288,304s-17.191-48-38.398-48L 192,256 L 192,328 z M 273.6,96L 216,96 c-13.255,0-24,10.745-24,24l0,72 l 81.6,0
|
||||
c 21.209,0, 38.4-21.49, 38.4-48S 294.809,96, 273.6,96z" />
|
||||
<glyph unicode="" d="M 425.373,358.627l-66.746,66.745C 346.183,437.818, 321.6,448, 304,448L 96,448 c-17.6,0-32-14.4-32-32l0-384 c0-17.6, 14.4-32, 32-32l 320,0
|
||||
c 17.6,0, 32,14.4, 32,32L 448,304 C 448,321.6, 437.817,346.182, 425.373,358.627z M 402.745,336.001c 3.396-3.398, 6.896-9.581, 9.447-16.001L 320,320
|
||||
L 320,412.193 c 6.42-2.55, 12.602-6.050, 16-9.448L 402.745,336.001z M 415.942,32L 96.057,32 c-0.020,0.017-0.041,0.038-0.057,0.058L 96,415.943
|
||||
c 0.017,0.020, 0.038,0.041, 0.057,0.057L 288,416 l0-128 l 128,0 l0-255.942 C 415.983,32.038, 415.962,32.017, 415.942,32z" />
|
||||
<glyph unicode="" d="M 480,40L 480,335.969 L 368.031,448L 72,448 c-22.091,0-40-17.908-40-40l0-368 c0-22.092, 17.909-40, 40-40l 368,0
|
||||
C 462.092,0, 480,17.908, 480,40z M 288,384l 32,0 l0-96 l-32,0 L 288,384 z M 352,64L 160,64 L 160,191.941 c 0.017,0.021, 0.038,0.041, 0.058,0.059l 191.885,0
|
||||
c 0.020-0.018, 0.041-0.038, 0.058-0.059L 352,64L 352,64z M 416,64l-32,0 L 384,192 c0,17.6-14.4,32-32,32L 160,224 c-17.6,0-32-14.4-32-32l0-128 L 96,64 L 96,384
|
||||
l 32,0 l0-96 c0-17.6, 14.4-32, 32-32l 160,0 c 17.6,0, 32,14.4, 32,32l0,85.505 l 64-64.036L 416,64 z" />
|
||||
<glyph unicode="" d="M 32,384l0-352 l 448,0 L 480,384 L 32,384 z M 192,160l0,64 l 128,0 l0-64 L 192,160 z M 320,128l0-64 L 192,64 l0,64 L 320,128 z M 320,320l0-64 L 192,256 l0,64 L 320,320 z M 160,320l0-64 L 64,256 l0,64 L 160,320
|
||||
z M 64,224l 96,0 l0-64 L 64,160 L 64,224 z M 352,224l 96,0 l0-64 l-96,0 L 352,224 z M 352,256l0,64 l 96,0 l0-64 L 352,256 z M 64,128l 96,0 l0-64 L 64,64 L 64,128 z M 352,64l0,64 l 96,0 l0-64 L 352,64 z" />
|
||||
<glyph unicode="" d="M 256,410c 49.683,0, 96.391-19.347, 131.521-54.478S 442,273.683, 442,224s-19.348-96.391-54.479-131.521S 305.683,38, 256,38
|
||||
s-96.391,19.348-131.522,54.479S 70,174.317, 70,224s 19.347,96.391, 54.478,131.522S 206.317,410, 256,410 M 256,448
|
||||
C 132.288,448, 32,347.712, 32,224s 100.288-224, 224-224s 224,100.288, 224,224S 379.712,448, 256,448L 256,448zM 160,288A32,32 2700 1 1 224,288A32,32 2700 1 1 160,288zM 288,288A32,32 2700 1 1 352,288A32,32 2700 1 1 288,288zM 256,152c-50.92,0-96.28,18.437-125.583,47.164C 141.98,140.36, 193.806,96, 256,96c 62.194,0, 114.020,44.36, 125.584,103.164
|
||||
C 352.28,170.437, 306.92,152, 256,152z" />
|
||||
<glyph unicode="" d="M 240,288L 144,384L 208,448L 32,448L 32,272L 96,336L 192,240 zM 320,240L 416,336L 480,272L 480,448L 304,448L 368,384L 272,288 zM 272,160L 368,64L 304,0L 480,0L 480,176L 416,112L 320,208 zM 192,208L 96,112L 32,176L 32,0L 208,0L 144,64L 240,160 z" />
|
||||
<glyph unicode="" d="M 32,256L 480,256L 480,192L 32,192z" />
|
||||
<glyph unicode="" d="M 32,96l 256,0 l0-64 L 32,32 L 32,96 z M 384,384L 273.721,384 l-91.883-256l-66.144,0 l 91.881,256L 96,384 L 96,448 l 288,0 L 384,384 z M 464.887,32L 400,96.887
|
||||
L 335.113,32L 304,63.113L 368.887,128L 304,192.887L 335.113,224L 400,159.113L 464.887,224L 496,192.887L 431.113,128L 496,63.113
|
||||
L 464.887,32z" />
|
||||
<glyph unicode="" d="M 128,416l 256,0 l0-64 L 128,352 L 128,416 z M 448,320L 64,320 c-17.6,0-32-14.4-32-32l0-128 c0-17.6, 14.398-32, 32-32l 64,0 l0-96 l 256,0 l0,96 l 64,0
|
||||
c 17.6,0, 32,14.4, 32,32L 480,288 C 480,305.6, 465.6,320, 448,320z M 352,64L 160,64 L 160,192 l 192,0 L 352,64 z M 455.2,272c0-12.813-10.387-23.2-23.199-23.2
|
||||
S 408.8,259.187, 408.8,272s 10.389,23.2, 23.201,23.2C 444.814,295.2, 455.2,284.813, 455.2,272z" />
|
||||
<glyph unicode="" d="M 192,416c-61.856,0-112-50.144-112-112s 50.144-112, 112-112l0-160 l 64,0 L 256,352 l 32,0 l0-320 l 64,0 L 352,352 l 64,0 L 416,416 L 192,416 z" />
|
||||
<glyph unicode="" d="M 224,416c-61.856,0-112-50.144-112-112s 50.144-112, 112-112l0-160 l 64,0 L 288,352 l 32,0 l0-320 l 64,0 L 384,352 l 64,0 L 448,416 L 224,416 zM 32,32L 144,128L 32,224 z" />
|
||||
<glyph unicode="" d="M 160,416C 98.144,416, 48,365.856, 48,304s 50.144-112, 112-112l0-160 l 64,0 L 224,352 l 32,0 l0-320 l 64,0 L 320,352 l 64,0 L 384,416 L 160,416 zM 480,224L 368,128L 480,32 z" />
|
||||
<glyph unicode="" d="M 256,288L 320,288L 320,256L 256,256zM 256,96L 320,96L 320,64L 256,64zM 288,192L 352,192L 352,160L 288,160zM 384,192L 384,96L 352,96L 352,64L 416,64L 416,192 zM 192,192L 256,192L 256,160L 192,160zM 160,96L 224,96L 224,64L 160,64zM 160,288L 224,288L 224,256L 160,256zM 96,384L 96,256L 128,256L 128,352L 160,352L 160,384 zM 352,256L 416,256L 416,384L 384,384L 384,288L 352,288 zM 32,448l0-448 l 448,0 L 480,448 L 32,448 z M 448,32L 64,32 L 64,416 l 384,0 L 448,32 zM 96,192L 96,64L 128,64L 128,160L 160,160L 160,192 zM 288,384L 352,384L 352,352L 288,352zM 192,384L 256,384L 256,352L 192,352z" />
|
||||
<glyph unicode="" d="M 408,448l 8-192L 96,256 l 8,192l 16,0 l 8-160l 256,0 l 8,160L 408,448 z M 104,0l-8,160l 320,0 l-8-160l-16,0 l-8,128L 128,128 l-8-128L 104,0 zM 32,224L 96,224L 96,192L 32,192zM 128,224L 192,224L 192,192L 128,192zM 224,224L 288,224L 288,192L 224,192zM 320,224L 384,224L 384,192L 320,192zM 416,224L 480,224L 480,192L 416,192z" />
|
||||
<glyph unicode="" d="M 480,416L 480,448 l-96,0 c-17.601,0-32-14.4-32-32l0-160 c0-7.928, 2.929-15.201, 7.748-20.807L 208,105l-71,74l-41-35l 112-144l 208,224l 64,0
|
||||
l0,32 l-96,0 L 384,416 L 480,416 zM 128,224l 32,0 L 160,416 c0,17.6-14.4,32-32,32L 64,448 c-17.6,0-32-14.4-32-32l0-192 l 32,0 l0,96 l 64,0 L 128,224 z M 64,352L 64,416 l 64,0 l0-64 L 64,352 zM 320,256l0,48 c0,17.6-4.4,32-22,32c 17.6,0, 22,14.4, 22,32L 320,416 c0,17.6-14.4,32-32,32l-96,0 l0-224 l 96,0 C 305.6,224, 320,238.4, 320,256z
|
||||
M 224,416l 64,0 l0-64 l-64,0 L 224,416 z M 224,320l 64,0 l0-64 l-64,0 L 224,320 z" />
|
||||
<glyph unicode="" d="M 224,224l-64,0 l0,64 l 64,0 l0,64 l 64,0 l0-64 l 64,0 l0-64 l-64,0 l0-64 l-64,0 L 224,224 z M 480,192l0-160 L 32,32 L 32,192 l 64,0 l0-96 l 320,0 l0,96 L 480,192 z" />
|
||||
<glyph unicode="" d="M 208,128L 112,224L 208,320L 176,352L 48,224L 176,96 zM 336,352L 304,320L 400,224L 304,128L 336,96L 464,224 z" />
|
||||
<glyph unicode="" d="M 224,128l 64,0 l0-64 l-64,0 L 224,128 z M 352,352c 17.673,0, 32-14.327, 32-32l0-83 l-114-77l-46,0 l0,32 l 96,64l0,32 L 160,288 l0,64 L 352,352 z M 256,448
|
||||
c-59.833,0-116.083-23.3-158.392-65.608C 55.301,340.083, 32,283.833, 32,224c0-59.832, 23.301-116.084, 65.608-158.392
|
||||
C 139.917,23.3, 196.167,0, 256,0c 59.832,0, 116.084,23.3, 158.392,65.608C 456.7,107.916, 480,164.168, 480,224
|
||||
c0,59.833-23.3,116.083-65.608,158.392C 372.084,424.7, 315.832,448, 256,448z" />
|
||||
<glyph unicode="" d="M 448,416L 64,416 c-17.6,0-32-14.4-32-32l0-320 c0-17.6, 14.4-32, 32-32l 384,0 c 17.6,0, 32,14.4, 32,32L 480,384 C 480,401.6, 465.6,416, 448,416z
|
||||
M 448,64.058c-0.006-0.007-0.015-0.014-0.021-0.021L 352,224l-80-64L 160,304L 64.016,64.042c-0.005,0.005-0.011,0.011-0.016,0.016
|
||||
L 64,383.943 c 0.017,0.020, 0.038,0.041, 0.057,0.057l 383.885,0 c 0.020-0.017, 0.041-0.038, 0.058-0.058L 448,64.058 zM 320,304A48,48 2700 1 1 416,304A48,48 2700 1 1 320,304z" />
|
||||
<glyph unicode="" d="M 448,416L 64,416 c-17.6,0-32-14.4-32-32l0-320 c0-17.6, 14.4-32, 32-32l 384,0 c 17.6,0, 32,14.4, 32,32L 480,384 C 480,401.6, 465.6,416, 448,416z
|
||||
M 128,64L 64,64 l0,64 l 64,0 L 128,64 z M 128,192L 64,192 l0,64 l 64,0 L 128,192 z M 128,320L 64,320 L 64,384 l 64,0 L 128,320 z M 352,64L 160,64 L 160,384 l 192,0 L 352,64 z M 448,64l-64,0 l0,64 l 64,0 L 448,64 z
|
||||
M 448,192l-64,0 l0,64 l 64,0 L 448,192 z M 448,320l-64,0 L 384,384 l 64,0 L 448,320 zM 192,320L 192,128L 336,224 z" />
|
||||
<glyph unicode="" d="M 38.899,327.688l 40.707-25.441C 105.007,342.804, 144,373.974, 190.21,389.37l-15.183,45.547
|
||||
C 118.153,415.968, 70.163,377.604, 38.899,327.688zM 336.973,434.917L 321.79,389.37c 46.211-15.396, 85.202-46.566, 110.604-87.124l 40.706,25.441
|
||||
C 441.837,377.604, 393.847,415.968, 336.973,434.917zM 303.987,127.996c-2.404,0-4.846,0.545-7.143,1.693L 224,166.111L 224,272 c0,8.836, 7.164,16, 16,16s 16-7.164, 16-16l0-86.111
|
||||
l 55.155-27.578c 7.903-3.951, 11.107-13.562, 7.155-21.466C 315.508,131.238, 309.856,127.997, 303.987,127.996zM 256,384C 149.961,384, 64,298.039, 64,192c0-106.039, 85.961-192, 192-192c 106.039,0, 192,85.961, 192,192
|
||||
C 448,298.039, 362.039,384, 256,384z M 256,48c-79.529,0-144,64.471-144,144c0,79.529, 64.471,144, 144,144c 79.529,0, 144-64.471, 144-144
|
||||
C 400,112.471, 335.529,48, 256,48z" />
|
||||
<glyph unicode="" d="M 32,252.127c 22.659,24.96, 48.581,46.18, 76.636,62.562C 153.802,341.061, 204.759,355, 256,355
|
||||
c 51.24,0, 102.198-13.939, 147.363-40.312c 28.056-16.382, 53.978-37.602, 76.637-62.562l0,58.716
|
||||
c-16.505,14.059-34.062,26.57-52.434,37.297C 375.063,378.796, 315.737,395, 256,395s-119.064-16.204-171.567-46.86
|
||||
C 66.062,337.413, 48.505,324.901, 32,310.842L 32,252.127 zM 256,320c-91.598,0-172.919-50.278-224-128c 51.081-77.724, 132.402-128, 224-128c 91.598,0, 172.919,50.276, 224,128
|
||||
C 428.919,269.722, 347.598,320, 256,320z M 256,224c0-17.673-14.327-32-32-32s-32,14.327-32,32c0,17.674, 14.327,32, 32,32
|
||||
S 256,241.674, 256,224z M 364.033,131.669C 330.316,111.982, 293.969,102, 256,102s-74.316,9.982-108.033,29.669
|
||||
C 122.19,146.721, 98.659,167.324, 78.91,192c 19.749,24.675, 43.28,45.279, 69.058,60.33c 6.638,3.876, 13.379,7.37, 20.213,10.491
|
||||
C 162.925,250.95, 160,237.817, 160,224c0-53.020, 42.981-96, 96-96c 53.020,0, 96,42.98, 96,96c0,13.817-2.925,26.95-8.18,38.821
|
||||
c 6.834-3.122, 13.575-6.615, 20.213-10.491c 25.777-15.051, 49.308-35.655, 69.058-60.33
|
||||
C 413.342,167.324, 389.811,146.721, 364.033,131.669z" />
|
||||
<glyph unicode="" d="M 325.584,338.083C 313.278,379.064, 311.146,384, 272,384l-32,0 c-39.809,0-41.332-5.076-54.209-48c0-0.001,0-0.001-0.001-0.002
|
||||
L 113.791,96l 56.818,0 l 28.8,96l 113.183,0 l 28.8-96l 56.815,0 L 325.584,338.083z M 218.609,256l 19.2,68c 5.043,16.809, 18.19,15, 18.19,15
|
||||
s 13.147,1.809, 18.19-15l 0.002,0 l 19.2-68L 218.609,256 z" />
|
||||
<glyph unicode="" d="M 288,448 C 411.712,448 512,347.712 512,224 C 512,100.288 411.712,0 288,0 L 288,48 C 335.012,48 379.209,66.307 412.451,99.549 C 445.693,132.791 464,176.988 464,224 C 464,271.011 445.693,315.209 412.451,348.451 C 379.209,381.693 335.012,400 288,400 C 240.989,400 196.791,381.693 163.549,348.451 C 137.979,322.882 121.258,290.828 114.896,256 L 208,256 L 96,128 L -16,256 L 66.285,256 C 81.815,364.551 175.154,448 288,448 ZM 384,256 L 384,192 L 256,192 L 256,352 L 320,352 L 320,256 Z" />
|
||||
<glyph unicode="" d="M 512,183.771l0,80.458 l-79.572,7.957c-4.093,15.021-10.044,29.274-17.605,42.49l 52.298,63.919L 410.595,435.12l-63.918-52.298
|
||||
c-13.217,7.562-27.471,13.513-42.491,17.604L 296.229,480l-80.458,0 l-7.957-79.573c-15.021-4.093-29.274-10.043-42.49-17.604
|
||||
L 101.405,435.12L 44.88,378.595l 52.298-63.918c-7.562-13.216-13.513-27.47-17.605-42.49L0,264.229l0-80.458 l 79.573-7.957
|
||||
c 4.093-15.021, 10.043-29.274, 17.605-42.491L 44.88,69.405l 56.524-56.524l 63.919,52.298c 13.216-7.562, 27.47-13.514, 42.49-17.605
|
||||
L 215.771-32l 80.458,0 l 7.957,79.572c 15.021,4.093, 29.274,10.044, 42.491,17.605l 63.918-52.298l 56.524,56.524l-52.298,63.918
|
||||
c 7.562,13.217, 13.514,27.471, 17.605,42.49L 512,183.771z M 352,192l-64-64l-64,0 l-64,64l0,64 l 64,64l 64,0 l 64-64L 352,192 z" />
|
||||
<glyph unicode="" d="M 384,377 L 384,352 L 448,352 L 448,320 L 352,320 L 352,393 L 416,423 L 416,448 L 352,448 L 352,480 L 448,480 L 448,407 ZM 338,352L 270,352L 176,258L 82,352L 14,352L 142,224L 14,96L 82,96L 176,190L 270,96L 338,96L 210,224 z" />
|
||||
<glyph unicode="" d="M 384,25 L 384,0 L 448,0 L 448-32 L 352-32 L 352,41 L 416,71 L 416,96 L 352,96 L 352,128 L 448,128 L 448,55 ZM 338,352L 270,352L 176,258L 82,352L 14,352L 142,224L 14,96L 82,96L 176,190L 270,96L 338,96L 210,224 z" />
|
||||
<glyph unicode="" d="M 352,288l0,80 c0,8.8-7.2,16-16,16l-80,0 L 256,416 c0,17.6-14.4,32-32,32l-64,0 c-17.602,0-32-14.4-32-32l0-32 L 48,384 c-8.801,0-16-7.2-16-16
|
||||
l0-256 c0-8.8, 7.199-16, 16-16l 112,0 l0-96 l 288,0 L 448,288 L 352,288 z M 160,415.943c 0.017,0.019, 0.036,0.039, 0.057,0.057l 63.884,0
|
||||
c 0.021-0.018, 0.041-0.038, 0.059-0.057L 224,384 l-64,0 L 160,415.943 z M 96,320l0,32 l 192,0 l0-32 L 96,320 z M 416,32L 192,32 L 192,256 l 224,0 L 416,32 zM 224,224L 224,160L 240,160L 256,192L 288,192L 288,96L 264,96L 264,64L 344,64L 344,96L 320,96L 320,192L 352,192L 368,160L 384,160L 384,224 z" />
|
||||
<glyph unicode="" d="M 384,352L 416,352L 416,320L 384,320zM 320,288L 352,288L 352,256L 320,256zM 320,224L 352,224L 352,192L 320,192zM 320,160L 352,160L 352,128L 320,128zM 256,224L 288,224L 288,192L 256,192zM 256,160L 288,160L 288,128L 256,128zM 192,160L 224,160L 224,128L 192,128zM 384,288L 416,288L 416,256L 384,256zM 384,224L 416,224L 416,192L 384,192zM 384,160L 416,160L 416,128L 384,128zM 384,96L 416,96L 416,64L 384,64zM 320,96L 352,96L 352,64L 320,64zM 256,96L 288,96L 288,64L 256,64zM 192,96L 224,96L 224,64L 192,64zM 128,96L 160,96L 160,64L 128,64z" />
|
||||
<glyph unicode="" d="M 464,416L 256,416L 240,448L 64,448L 32,384L 480,384 zM 420.17,128L 464,128 l 16,224L 32,352 l 32-320l 178.040,0 C 189.599,50.888, 152,101.133, 152,160c0,74.991, 61.009,136, 136,136
|
||||
c 74.99,0, 136-61.009, 136-136C 424,149.161, 422.689,138.425, 420.17,128zM 437.498,55.125l-67.248,55.346C 378.977,124.932, 384,141.878, 384,160c0,53.020-42.98,96-96,96s-96-42.98-96-96
|
||||
s 42.98-96, 96-96c 18.122,0, 35.069,5.023, 49.529,13.75l 55.346-67.248c 11.481-13.339, 31.059-14.070, 43.503-1.626l 2.746,2.746
|
||||
C 451.568,24.066, 450.837,43.644, 437.498,55.125z M 288,98c-34.242,0-62,27.758-62,62s 27.758,62, 62,62s 62-27.758, 62-62
|
||||
S 322.242,98, 288,98z" />
|
||||
<glyph unicode=" " horiz-adv-x="256" />
|
||||
</font></defs></svg>
|
||||
|
After Width: | Height: | Size: 25 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,153 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>
|
||||
This is a custom SVG font generated by IcoMoon.
|
||||
<iconset grid="16"></iconset>
|
||||
</metadata>
|
||||
<defs>
|
||||
<font id="tinymce" horiz-adv-x="512" >
|
||||
<font-face units-per-em="512" ascent="480" descent="-32" />
|
||||
<missing-glyph horiz-adv-x="512" />
|
||||
<glyph class="hidden" unicode="" d="M0,480L 512 -32L0 -32 z" horiz-adv-x="0" />
|
||||
<glyph unicode="" d="M 464,416L 256,416L 240,448L 64,448L 32,384L 480,384 zM 452.17,128l 37.43,0 L 512,352L0,352 l 32-320l 242.040,0 C 221.599,50.888, 184,101.133, 184,160c0,74.991, 61.009,136, 136,136
|
||||
c 74.99,0, 136-61.009, 136-136C 456,149.161, 454.689,138.425, 452.17,128zM 501.498,23.125l-99.248,87.346C 410.977,124.931, 416,141.878, 416,160c0,53.020-42.98,96-96,96s-96-42.98-96-96
|
||||
s 42.98-96, 96-96c 18.122,0, 35.069,5.023, 49.529,13.75l 87.346-99.248c 11.481-13.339, 31.059-14.070, 43.503-1.626l 2.746,2.746
|
||||
C 515.568-7.934, 514.837,11.644, 501.498,23.125z M 320,98c-34.242,0-62,27.758-62,62s 27.758,62, 62,62s 62-27.758, 62-62
|
||||
S 354.242,98, 320,98z" />
|
||||
<glyph unicode="" d="M 384,352L 416,352L 416,320L 384,320zM 320,288L 352,288L 352,256L 320,256zM 320,224L 352,224L 352,192L 320,192zM 320,160L 352,160L 352,128L 320,128zM 256,224L 288,224L 288,192L 256,192zM 256,160L 288,160L 288,128L 256,128zM 192,160L 224,160L 224,128L 192,128zM 384,288L 416,288L 416,256L 384,256zM 384,224L 416,224L 416,192L 384,192zM 384,160L 416,160L 416,128L 384,128zM 384,96L 416,96L 416,64L 384,64zM 320,96L 352,96L 352,64L 320,64zM 256,96L 288,96L 288,64L 256,64zM 192,96L 224,96L 224,64L 192,64zM 128,96L 160,96L 160,64L 128,64z" />
|
||||
<glyph unicode="" d="M 416,352l-96,0 L 320,384 L 224,480L0,480 l0-384 l 192,0 l0-128 l 320,0 L 512,256 L 416,352z M 416,306.745L 466.745,256L 416,256 L 416,306.745 z M 224,434.745L 274.745,384L 224,384
|
||||
L 224,434.745 z M 32,448l 160,0 l0-96 l 96,0 l0-224 L 32,128 L 32,448 z M 480,0L 224,0 l0,96 l 96,0 L 320,320 l 64,0 l0-96 l 96,0 L 480,0 z" />
|
||||
<glyph unicode="" d="M 128,448 L 384,448 L 384,384 L 320,384 L 320,0 L 256,0 L 256,384 L 192,384 L 192,0 L 128,0 L 128,224 C 66.144,224 16,274.144 16,336 C 16,397.856 66.144,448 128,448 ZM 480,32L 352,144L 480,256 z" />
|
||||
<glyph unicode="" d="M 224,448 L 480,448 L 480,384 L 416,384 L 416,0 L 352,0 L 352,384 L 288,384 L 288,0 L 224,0 L 224,224 C 162.144,224 112,274.144 112,336 C 112,397.856 162.144,448 224,448 ZM 32,256L 160,144L 32,32 z" />
|
||||
<glyph unicode="" d="M 192,448 L 448,448 L 448,384 L 384,384 L 384,0 L 320,0 L 320,384 L 256,384 L 256,0 L 192,0 L 192,224 C 130.144,224 80,274.144 80,336 C 80,397.856 130.144,448 192,448 Z" />
|
||||
<glyph unicode="" d="M 365.71,221.482 C 397.67,197.513 416,163.439 416,128 C 416,92.561 397.67,58.487 365.71,34.518 C 336.031,12.259 297.068,0 256,0 C 214.931,0 175.969,12.259 146.29,34.518 C 114.33,58.487 96,92.561 96,128 L 160,128 C 160,93.309 203.963,64 256,64 C 308.037,64 352,93.309 352,128 C 352,162.691 308.037,192 256,192 C 214.931,192 175.969,204.259 146.29,226.518 C 114.33,250.488 96,284.561 96,320 C 96,355.439 114.33,389.512 146.29,413.482 C 175.969,435.741 214.931,448 256,448 C 297.068,448 336.031,435.741 365.71,413.482 C 397.67,389.512 416,355.439 416,320 L 352,320 C 352,354.691 308.037,384 256,384 C 203.963,384 160,354.691 160,320 C 160,285.309 203.963,256 256,256 C 297.068,256 336.031,243.741 365.71,221.482 ZM0,224L 512,224L 512,192L0,192z" />
|
||||
<glyph unicode="" d="M 352,448 L 416,448 L 416,240 C 416,160.471 344.366,96 256,96 C 167.635,96 96,160.471 96,240 L 96,448 L 160,448 L 160,240 C 160,219.917 169.119,200.648 185.677,185.747 C 204.125,169.145 229.1,160 256,160 C 282.9,160 307.875,169.145 326.323,185.747 C 342.881,200.648 352,219.917 352,240 L 352,448 ZM 96,64L 416,64L 416,0L 96,0z" />
|
||||
<glyph unicode="" d="M 448,448 L 448,416 L 384,416 L 224,32 L 288,32 L 288,0 L 64,0 L 64,32 L 128,32 L 288,416 L 224,416 L 224,448 Z" />
|
||||
<glyph unicode="" d="M 353.94,237.674C 372.689,259.945, 384,288.678, 384,320c0,70.58-57.421,128-128,128l-64,0 l-64,0 L 96,448 l0-448 l 32,0 l 64,0 l 96,0
|
||||
c 70.579,0, 128,57.421, 128,128C 416,174.478, 391.101,215.248, 353.94,237.674z M 192,384l 50.75,0 c 27.984,0, 50.75-28.71, 50.75-64
|
||||
s-22.766-64-50.75-64L 192,256 L 192,384 z M 271.5,64L 192,64 L 192,192 l 79.5,0 c 29.225,0, 53-28.71, 53-64S 300.725,64, 271.5,64z" />
|
||||
<glyph unicode="" d="M 192,64L 288,64L 288-32L 192-32zM 400,448 C 426.51,448 448,426.51 448,400 L 448,256 L 288,160 L 288,96 L 192,96 L 192,192 L 352,288 L 352,352 L 96,352 L 96,448 L 400,448 Z" />
|
||||
<glyph unicode="" d="M 288,448 C 411.712,448 512,347.712 512,224 C 512,100.288 411.712,0 288,0 L 288,48 C 335.012,48 379.209,66.307 412.451,99.549 C 445.693,132.791 464,176.988 464,224 C 464,271.011 445.693,315.209 412.451,348.451 C 379.209,381.693 335.012,400 288,400 C 240.989,400 196.791,381.693 163.549,348.451 C 137.979,322.882 121.258,290.828 114.896,256 L 208,256 L 96,128 L -16,256 L 66.285,256 C 81.815,364.551 175.154,448 288,448 ZM 384,256 L 384,192 L 256,192 L 256,352 L 320,352 L 320,256 Z" />
|
||||
<glyph unicode="" d="M0,224L 64,224L 64,192L0,192zM 96,224L 192,224L 192,192L 96,192zM 224,224L 288,224L 288,192L 224,192zM 320,224L 416,224L 416,192L 320,192zM 448,224L 512,224L 512,192L 448,192zM 440,480 L 448,256 L 64,256 L 72,480 L 88,480 L 96,288 L 416,288 L 424,480 ZM 72-32 L 64,160 L 448,160 L 440-32 L 424-32 L 416,128 L 96,128 L 88-32 Z" />
|
||||
<glyph unicode="" d="M 192,384L 256,384L 256,352L 192,352zM 288,384L 352,384L 352,352L 288,352zM 448,384 L 448,256 L 352,256 L 352,288 L 416,288 L 416,352 L 384,352 L 384,384 ZM 160,288L 224,288L 224,256L 160,256zM 256,288L 320,288L 320,256L 256,256zM 96,352 L 96,288 L 128,288 L 128,256 L 64,256 L 64,384 L 160,384 L 160,352 ZM 192,192L 256,192L 256,160L 192,160zM 288,192L 352,192L 352,160L 288,160zM 448,192 L 448,64 L 352,64 L 352,96 L 416,96 L 416,160 L 384,160 L 384,192 ZM 160,96L 224,96L 224,64L 160,64zM 256,96L 320,96L 320,64L 256,64zM 96,160 L 96,96 L 128,96 L 128,64 L 64,64 L 64,192 L 160,192 L 160,160 ZM 480,448 L 32,448 L 32,0 L 480,0 L 480,448 Z M 512,480 L 512,480 L 512-32 L 0-32 L 0,480 L 512,480 Z" />
|
||||
<glyph unicode="" d="M 224,192 L 128,192 L 128,256 L 224,256 L 224,352 L 288,352 L 288,256 L 384,256 L 384,192 L 288,192 L 288,96 L 224,96 ZM 512,160 L 512-32 L 0-32 L 0,160 L 64,160 L 64,32 L 448,32 L 448,160 Z" />
|
||||
<glyph unicode="" d="M 64,352l 64,0 l0-96 l 32,0 L 160,448 c0,17.6-14.4,32-32,32L 64,480 C 46.4,480, 32,465.6, 32,448l0-192 l 32,0 L 64,352 z M 64,448l 64,0 l0-64 L 64,384 L 64,448 z M 480,448L 480,480 l-96,0
|
||||
c-17.601,0-32-14.4-32-32l0-160 c0-17.6, 14.399-32, 32-32l 96,0 l0,32 l-96,0 L 384,448 L 480,448 z M 320,400L 320,448 c0,17.6-14.4,32-32,32l-96,0 l0-224 l 96,0
|
||||
c 17.6,0, 32,14.4, 32,32l0,48 c0,17.6-4.4,32-22,32C 315.6,368, 320,382.4, 320,400z M 288,288l-64,0 l0,64 l 64,0 L 288,288 z M 288,384l-64,0 L 224,448 l 64,0 L 288,384 zM 416,192 L 208-32 L 96,112 L 137,147 L 208,73 L 384,224 Z" />
|
||||
<glyph unicode="" d="M 512,480 L 512,288 L 442.87,357.13 L 336.87,251.13 L 283.13,304.87 L 389.13,410.87 L 320,480 ZM 122.87,410.87 L 228.87,304.87 L 175.13,251.13 L 69.13,357.13 L 0,288 L 0,480 L 192,480 ZM 442.87,90.87 L 512,160 L 512-32 L 320-32 L 389.13,37.13 L 283.13,143.13 L 336.87,196.87 ZM 228.87,143.13 L 122.87,37.13 L 192-32 L 0-32 L 0,160 L 69.13,90.87 L 175.13,196.87 Z" />
|
||||
<glyph unicode="" d="M 128,448L 384,448L 384,384L 128,384zM 480,352L 32,352 C 14.4,352,0,337.6,0,320l0-160 c0-17.6, 14.398-32, 32-32l 96,0 l0-128 l 256,0 L 384,128 l 96,0 c 17.6,0, 32,14.4, 32,32L 512,320
|
||||
C 512,337.6, 497.6,352, 480,352z M 352,32L 160,32 L 160,192 l 192,0 L 352,32 z M 487.2,304c0-12.813-10.387-23.2-23.199-23.2
|
||||
c-12.813,0-23.201,10.387-23.201,23.2s 10.388,23.2, 23.201,23.2C 476.814,327.2, 487.2,316.813, 487.2,304z" />
|
||||
<glyph unicode="" d="M 256,480C 114.615,480,0,365.386,0,224c0-141.385, 114.614-256, 256-256c 141.385,0, 256,114.615, 256,256
|
||||
C 512,365.386, 397.385,480, 256,480z M 256,8c-119.293,0-216,96.706-216,216c0,119.293, 96.707,216, 216,216c 119.295,0, 216-96.707, 216-216
|
||||
C 472,104.706, 375.295,8, 256,8z M 192,320c0-17.673-14.327-32-32-32s-32,14.327-32,32s 14.327,32, 32,32S 192,337.673, 192,320z
|
||||
M 384,320c0-17.673-14.326-32-32-32s-32,14.327-32,32s 14.326,32, 32,32S 384,337.673, 384,320zM 256,154 C 326.537,154 387.344,182.766 415.231,215.596 C 404.795,129.986 337.087,64 256,64 C 174.941,64 107.251,130.013 96.778,215.584 C 124.671,182.761 185.471,154 256,154 Z" />
|
||||
<glyph unicode="" d="M 352,32 L 480,32 L 512,96 L 512-32 L 320-32 L 320,75.107 C 385.556,103.349 432,173.688 432,256 C 432,363.216 353.201,447.133 256,447.133 C 158.797,447.133 80,363.217 80,256 C 80,173.688 126.443,103.349 192,75.107 L 192-32 L 0-32 L 0,96 L 32,32 L 160,32 L 160,48.295 C 66.185,81.525 0,161.996 0,256 C 0,379.712 114.615,480 256,480 C 397.385,480 512,379.712 512,256 C 512,161.996 445.815,81.525 352,48.295 L 352,32 Z" />
|
||||
<glyph unicode="" d="M 384,377 L 384,352 L 448,352 L 448,320 L 352,320 L 352,393 L 416,423 L 416,448 L 352,448 L 352,480 L 448,480 L 448,407 ZM 338,352L 270,352L 176,258L 82,352L 14,352L 142,224L 14,96L 82,96L 176,190L 270,96L 338,96L 210,224 z" />
|
||||
<glyph unicode="" d="M 384,25 L 384,0 L 448,0 L 448-32 L 352-32 L 352,41 L 416,71 L 416,96 L 352,96 L 352,128 L 448,128 L 448,55 ZM 338,352L 270,352L 176,258L 82,352L 14,352L 142,224L 14,96L 82,96L 176,190L 270,96L 338,96L 210,224 z" />
|
||||
<glyph unicode="" d="M0,32L 288,32L 288-32L0-32zM 96,480L 448,480L 448,416L 96,416zM 138.694,64 L 241.038,456.082 L 302.963,439.918 L 204.838,64 ZM 464.887-32 L 400,32.887 L 335.113-32 L 304-0.887 L 368.887,64 L 304,128.887 L 335.113,160 L 400,95.113 L 464.887,160 L 496,128.887 L 431.113,64 L 496-0.887 Z" />
|
||||
<glyph unicode="" d="M0,256L 512,256L 512,192L0,192z" />
|
||||
<glyph unicode="" d="M0,448l0-448 l 512,0 L 512,448 L0,448 z M 192,160l0,96 l 128,0 l0-96 L 192,160 z M 320,128l0-96 L 192,32 l0,96 L 320,128 z M 320,384l0-96 L 192,288 L 192,384 L 320,384 z M 160,384l0-96 L 32,288 L 32,384 L 160,384 z
|
||||
M 32,256l 128,0 l0-96 L 32,160 L 32,256 z M 352,256l 128,0 l0-96 L 352,160 L 352,256 z M 352,288L 352,384 l 128,0 l0-96 L 352,288 z M 32,128l 128,0 l0-96 L 32,32 L 32,128 z M 352,32l0,96 l 128,0 l0-96 L 352,32 z" />
|
||||
<glyph unicode="" d="M 161.009,64l 28.8,96l 132.382,0 l 28.8-96l 56.816,0 L 311.809,384L 200.191,384 l-96-320L 161.009,64 z M 237.809,320l 36.382,0 l 28.8-96l-93.982,0
|
||||
L 237.809,320z" />
|
||||
<glyph unicode="" d="M 256,320C 151.316,320, 58.378,269.722,0,192c 58.378-77.723, 151.316-128, 256-128c 104.684,0, 197.622,50.277, 256,128
|
||||
C 453.622,269.722, 360.684,320, 256,320z M 224,256c 17.673,0, 32-14.327, 32-32s-14.327-32-32-32s-32,14.327-32,32S 206.327,256, 224,256z
|
||||
M 386.808,127.352c-19.824-10.129-40.826-17.931-62.423-23.188C 302.141,98.746, 279.134,96, 256,96
|
||||
c-23.133,0-46.141,2.746-68.384,8.162c-21.597,5.259-42.599,13.061-62.423,23.188c-31.51,16.101-60.111,38.205-83.82,64.649
|
||||
c 23.709,26.444, 52.31,48.55, 83.82,64.649c 16.168,8.261, 33.121,14.973, 50.541,20.020C 165.79,261.547, 160,243.451, 160,224
|
||||
c0-53.020, 42.981-96, 96-96c 53.019,0, 96,42.98, 96,96c0,19.451-5.791,37.547-15.733,52.67c 17.419-5.048, 34.372-11.76, 50.541-20.021
|
||||
c 31.511-16.099, 60.109-38.204, 83.819-64.649C 446.917,165.557, 418.318,143.45, 386.808,127.352z M 430.459,358.139
|
||||
C 376.099,385.916, 317.403,400, 256,400c-61.403,0-120.099-14.084-174.459-41.861C 52.155,343.123, 24.675,324.187,0,302.101l0-54.603
|
||||
c 27.669,29.283, 60.347,53.877, 96.097,72.145C 145.907,345.095, 199.706,358, 256,358s 110.093-12.905, 159.902-38.358
|
||||
c 35.751-18.268, 68.429-42.862, 96.098-72.145L 512,302.1 C 487.325,324.187, 459.846,343.123, 430.459,358.139z" />
|
||||
<glyph unicode="" d="M 256,384C 149.962,384, 64,298.039, 64,192s 85.961-192, 192-192c 106.037,0, 192,85.961, 192,192S 362.037,384, 256,384z
|
||||
M 357.822,90.177C 330.626,62.979, 294.464,48, 256,48s-74.625,14.979-101.823,42.177C 126.979,117.374, 112,153.536, 112,192
|
||||
s 14.979,74.625, 42.177,101.823C 181.375,321.021, 217.536,336, 256,336s 74.626-14.979, 101.821-42.177
|
||||
C 385.022,266.625, 400,230.464, 400,192S 385.021,117.374, 357.822,90.177zM 162.965,378.069l-21.47,42.939C 92.058,396.24, 51.76,355.942, 26.992,306.504l 42.938-21.47
|
||||
C 90.054,325.202, 122.796,357.945, 162.965,378.069zM 442.067,285.035l 42.939,21.469C 460.24,355.942, 419.943,396.24, 370.504,421.008l-21.472-42.939
|
||||
C 389.201,357.945, 421.944,325.203, 442.067,285.035zM 256,288l-32,0 l0-96 c0-5.055, 2.35-9.555, 6.011-12.486l-0.006-0.008l 80-64l 19.988,24.988L 256,199.689L 256,288 z" />
|
||||
<glyph unicode="" d="M 160,352L 32,224L 160,96L 224,96L 96,224L 224,352 zM 352,352L 288,352L 416,224L 288,96L 352,96L 480,224 z" />
|
||||
<glyph unicode="" d="M 224,128L 288,128L 288,64L 224,64zM 352,352 C 369.673,352 384,337.673 384,320 L 384,224 L 288,160 L 224,160 L 224,192 L 320,256 L 320,288 L 160,288 L 160,352 L 352,352 ZM 256,432 C 200.441,432 148.208,410.364 108.922,371.078 C 69.636,331.792 48,279.559 48,224 C 48,168.441 69.636,116.208 108.922,76.922 C 148.208,37.636 200.441,16 256,16 C 311.559,16 363.792,37.636 403.078,76.922 C 442.364,116.208 464,168.441 464,224 C 464,279.559 442.364,331.792 403.078,371.078 C 363.792,410.364 311.559,432 256,432 Z M 256,480 L 256,480 C 397.385,480 512,365.385 512,224 C 512,82.615 397.385-32 256-32 C 114.615-32 0,82.615 0,224 C 0,365.385 114.615,480 256,480 Z" />
|
||||
<glyph unicode="" d="M0,416l0-384 l 512,0 L 512,416 L0,416 z M 96,64L 32,64 l0,64 l 64,0 L 96,64 z M 96,192L 32,192 l0,64 l 64,0 L 96,192 z M 96,320L 32,320 L 32,384 l 64,0 L 96,320 z M 384,64L 128,64 L 128,384 l 256,0 L 384,64 z
|
||||
M 480,64l-64,0 l0,64 l 64,0 L 480,64 z M 480,192l-64,0 l0,64 l 64,0 L 480,192 z M 480,320l-64,0 L 416,384 l 64,0 L 480,320 zM 192,320L 192,128L 320,224 z" />
|
||||
<glyph unicode="" d="M0,416l0-416 l 512,0 L 512,416 L0,416 z M 480,32L 32,32 L 32,384 l 448,0 L 480,32 zM 352,304A48,48 3060 1 0 448,304A48,48 3060 1 0 352,304zM 448,64 L 64,64 L 160,320 L 288,160 L 352,208 Z" />
|
||||
<glyph unicode="" d="M 96,480l0-512 l 160,160l 160-160L 416,480 L 96,480 z M 384,45.255l-128,128l-128-128L 128,448 l 256,0 L 384,45.255 z" />
|
||||
<glyph unicode="" d="M 238.444,142.443c 2.28-4.524, 3.495-9.579, 3.495-14.848c0-8.808-3.372-17.029-9.496-23.154l-81.69-81.69
|
||||
c-6.124-6.124-14.348-9.496-23.154-9.496s-17.030,3.372-23.154,9.496l-49.69,49.69c-6.124,6.125-9.496,14.348-9.496,23.154
|
||||
s 3.372,17.030, 9.496,23.154l 81.69,81.691c 6.124,6.123, 14.348,9.496, 23.154,9.496c 5.269,0, 10.322-1.215, 14.848-3.494l 32.669,32.668
|
||||
c-13.935,10.705-30.72,16.080-47.517,16.080c-19.993,0-39.986-7.583-55.154-22.751l-81.69-81.691
|
||||
c-30.335-30.335-30.335-79.975,0-110.309l 49.69-49.691c 15.167-15.166, 35.16-22.75, 55.153-22.75
|
||||
c 19.994,0, 39.987,7.584, 55.154,22.751l 81.69,81.69c 27.91,27.91, 30.119,72.149, 6.672,102.673L 238.444,142.443zM 489.248,407.558l-49.69,49.691C 424.391,472.417, 404.398,480, 384.404,480c-19.993,0-39.985-7.583-55.153-22.751l-81.691-81.691
|
||||
c-27.91-27.91-30.119-72.149-6.671-102.671l 32.669,32.67c-2.279,4.525-3.494,9.58-3.494,14.847c0,8.808, 3.372,17.030, 9.496,23.154
|
||||
l 81.691,81.691c 6.123,6.124, 14.347,9.497, 23.153,9.497c 8.808,0, 17.030-3.373, 23.154-9.497l 49.69-49.691
|
||||
c 6.124-6.124, 9.496-14.347, 9.496-23.154c0-8.807-3.372-17.030-9.496-23.154l-81.69-81.691c-6.124-6.124-14.347-9.496-23.154-9.496
|
||||
c-5.268,0-10.322,1.215-14.848,3.495l-32.669-32.669c 13.936-10.705, 30.72-16.080, 47.517-16.080c 19.994,0, 39.987,7.584, 55.154,22.752
|
||||
l 81.69,81.69C 519.584,327.584, 519.584,377.223, 489.248,407.558zM 116.684,340.688L 20.687,436.685L 43.315,459.313L 139.312,363.316zM 192,480L 224,480L 224,384L 192,384zM0,288L 96,288L 96,256L0,256zM 395.316,107.312L 491.314,11.314L 468.686-11.314L 372.688,84.684zM 288,64L 320,64L 320-32L 288-32zM 416,192L 512,192L 512,160L 416,160z" />
|
||||
<glyph unicode="" d="M 160,128c 8.8-8.8, 23.637-8.363, 32.971,0.971L 351.030,287.029C 360.364,296.363, 360.8,311.2, 352,320
|
||||
s-23.637,8.363-32.971-0.971L 160.971,160.971C 151.637,151.637, 151.2,136.8, 160,128zM 238.444,142.444c 2.28-4.525, 3.495-9.58, 3.495-14.848c0-8.808-3.372-17.030-9.496-23.154l-81.691-81.691
|
||||
c-6.124-6.124-14.347-9.496-23.154-9.496s-17.030,3.372-23.154,9.496l-49.691,49.691c-6.124,6.124-9.496,14.347-9.496,23.154
|
||||
s 3.372,17.030, 9.496,23.154l 81.691,81.691c 6.124,6.124, 14.347,9.497, 23.154,9.497c 5.268,0, 10.322-1.215, 14.848-3.495l 32.669,32.669
|
||||
c-13.935,10.705-30.72,16.080-47.517,16.080c-19.993,0-39.986-7.583-55.154-22.751l-81.691-81.691
|
||||
c-30.335-30.335-30.335-79.974,0-110.309l 49.691-49.691C 87.611-24.416, 107.604-32, 127.597-32
|
||||
c 19.994,0, 39.987,7.584, 55.154,22.751l 81.691,81.691c 27.91,27.91, 30.119,72.149, 6.672,102.672L 238.444,142.444zM 489.249,407.558l-49.691,49.691C 424.391,472.417, 404.398,480, 384.404,480c-19.993,0-39.986-7.583-55.154-22.751l-81.691-81.691
|
||||
c-27.91-27.91-30.119-72.149-6.671-102.671l 32.669,32.67c-2.279,4.525-3.494,9.58-3.494,14.847c0,8.808, 3.372,17.030, 9.496,23.154
|
||||
l 81.691,81.691c 6.124,6.124, 14.347,9.497, 23.154,9.497s 17.030-3.373, 23.154-9.497l 49.691-49.691
|
||||
c 6.124-6.124, 9.496-14.347, 9.496-23.154s-3.372-17.030-9.496-23.154l-81.691-81.691c-6.124-6.124-14.347-9.496-23.154-9.496
|
||||
c-5.268,0-10.322,1.215-14.848,3.495l-32.669-32.669c 13.936-10.705, 30.72-16.080, 47.517-16.080c 19.994,0, 39.987,7.584, 55.154,22.751
|
||||
l 81.691,81.691C 519.584,327.584, 519.584,377.223, 489.249,407.558z" />
|
||||
<glyph unicode="" d="M 288,355.814L 288,480 l 192-192L 288,96L 288,222.912 C 64.625,228.153, 74.206,71.016, 131.070-32
|
||||
C-9.286,119.707, 20.52,362.785, 288,355.814z" />
|
||||
<glyph unicode="" d="M 380.931-32C 437.794,71.016, 447.375,228.153, 224,222.912L 224,96 L 32,288L 224,480l0-124.186
|
||||
C 491.481,362.785, 521.285,119.707, 380.931-32z" />
|
||||
<glyph unicode="" d="M 112.5,256 C 174.356,256 224.5,205.855 224.5,144 C 224.5,82.144 174.356,32 112.5,32 C 50.644,32 0.5,82.144 0.5,144 L 0,160 C 0,283.712 100.288,384 224,384 L 224,320 C 181.263,320 141.083,303.357 110.863,273.137 C 105.046,267.319 99.737,261.129 94.948,254.627 C 100.667,255.527 106.528,256 112.5,256 ZM 400.5,256 C 462.355,256 512.5,205.855 512.5,144 C 512.5,82.144 462.355,32 400.5,32 C 338.645,32 288.5,82.144 288.5,144 L 288,160 C 288,283.712 388.288,384 512,384 L 512,320 C 469.263,320 429.083,303.357 398.863,273.137 C 393.045,267.319 387.736,261.129 382.947,254.627 C 388.667,255.527 394.527,256 400.5,256 Z" />
|
||||
<glyph unicode="" d="M0,448L 512,448L 512,384L0,384zM 192,352L 512,352L 512,288L 192,288zM 192,256L 512,256L 512,192L 192,192zM 192,160L 512,160L 512,96L 192,96zM0,64L 512,64L 512,0L0,0zM 128,320 L 128,128 L 0,224 Z" />
|
||||
<glyph unicode="" d="M0,448L 512,448L 512,384L0,384zM 192,352L 512,352L 512,288L 192,288zM 192,256L 512,256L 512,192L 192,192zM 192,160L 512,160L 512,96L 192,96zM0,64L 512,64L 512,0L0,0zM 0,128 L 0,320 L 128,224 Z" />
|
||||
<glyph unicode="" d="M 192,64L 512,64L 512,0L 192,0zM 192,256L 512,256L 512,192L 192,192zM 192,448L 512,448L 512,384L 192,384zM 96,480 L 96,352 L 64,352 L 64,448 L 32,448 L 32,480 ZM 64,217 L 64,192 L 128,192 L 128,160 L 32,160 L 32,233 L 96,263 L 96,288 L 32,288 L 32,320 L 128,320 L 128,247 ZM 128,128 L 128-32 L 32-32 L 32,0 L 96,0 L 96,32 L 32,32 L 32,64 L 96,64 L 96,96 L 32,96 L 32,128 Z" />
|
||||
<glyph unicode="" d="M 192,448l 320,0 l0-64 L 192,384 L 192,448 z M 192,256l 320,0 l0-64 L 192,192 L 192,256 z M 192,64l 320,0 l0-64 L 192,0 L 192,64 zM0,416A64,64 3060 1 0 128,416A64,64 3060 1 0 0,416zM0,224A64,64 3060 1 0 128,224A64,64 3060 1 0 0,224zM0,32A64,64 3060 1 0 128,32A64,64 3060 1 0 0,32z" />
|
||||
<glyph unicode="" d="M 32,480L 224,480L 224,448L 32,448zM 288,480L 480,480L 480,448L 288,448zM 476,320l-28,0 L 448,448 L 320,448 l0-128 L 192,320 L 192,448 L 64,448 l0-128 L 36,320 c-19.8,0-36-16.2-36-36l0-280 c0-19.8, 16.2-36, 36-36l 152,0 c 19.8,0, 36,16.2, 36,36L 224,192 l 64,0
|
||||
l0-188 c0-19.8, 16.2-36, 36-36l 152,0 c 19.8,0, 36,16.2, 36,36L 512,284 C 512,303.8, 495.8,320, 476,320z M 174,0L 50,0 c-9.9,0-18,7.2-18,16
|
||||
s 8.1,16, 18,16l 124,0 c 9.9,0, 18-7.2, 18-16S 183.9,0, 174,0z M 272,224l-32,0 c-8.8,0-16,7.2-16,16s 7.2,16, 16,16l 32,0 c 8.8,0, 16-7.2, 16-16
|
||||
S 280.8,224, 272,224z M 462,0L 338,0 c-9.9,0-18,7.2-18,16s 8.1,16, 18,16l 124,0 c 9.9,0, 18-7.2, 18-16S 471.9,0, 462,0z" />
|
||||
<glyph unicode="" d="M 416,320L 416,400 c0,8.8-7.2,16-16,16L 288,416 L 288,448 c0,17.6-14.4,32-32,32l-64,0 c-17.602,0-32-14.4-32-32l0-32 L 48,416 c-8.801,0-16-7.2-16-16l0-320
|
||||
c0-8.8, 7.199-16, 16-16l 144,0 l0-96 l 224,0 l 96,96L 512,320 L 416,320 z M 192,447.943c 0.017,0.019, 0.036,0.039, 0.057,0.057l 63.884,0
|
||||
c 0.021-0.018, 0.041-0.038, 0.059-0.057L 256,416 l-64,0 L 192,447.943 z M 96,352L 96,384 l 256,0 l0-32 L 96,352 z M 416,13.255L 416,64 l 50.745,0 L 416,13.255z M 480,96l-96,0 l0-96
|
||||
L 224,0 L 224,288 l 256,0 L 480,96 z" />
|
||||
<glyph unicode="" d="M 445.387,125.423c-22.827,22.778-51.864,34.536-78.973,34.536l-14.556,0 l-31.952,32.004l 127.81,128.019
|
||||
c 31.952,32.005, 31.952,96.014,0,128.019L 256.001,255.973L 64.285,448c-31.952-32.004-31.952-96.014,0-128.019l 127.811-128.017
|
||||
l-31.953-32.004l-14.557,0 c-27.11,0-56.146-11.759-78.974-34.538c-40.811-40.721-46.325-101.242-12.315-135.175
|
||||
C 69.282-24.704, 89.441-32, 110.795-32c 27.108,0, 56.145,11.757, 78.973,34.536c 26.792,26.732, 38.371,62, 33.542,92.674l 32.692,32.744
|
||||
l 32.688-32.744c-4.828-30.674, 6.753-65.941, 33.542-92.674C 345.063-20.243, 374.098-32, 401.206-32
|
||||
c 21.354,0, 41.512,7.296, 56.497,22.248C 491.713,24.181, 486.197,84.702, 445.387,125.423z M 176.512,57.231
|
||||
c-3.849-8.941-9.505-17.173-16.813-24.463c-7.318-7.302-15.586-12.959-24.574-16.812c-8.066-3.458-16.48-5.284-24.331-5.284
|
||||
c-7.573,0-18.306,1.701-26.431,9.806c-8.068,8.052-9.76,18.659-9.76,26.144c0,7.771, 1.821,16.105, 5.263,24.106
|
||||
c 3.85,8.942, 9.507,17.173, 16.813,24.463c 7.317,7.303, 15.586,12.957, 24.575,16.812c 8.067,3.457, 16.48,5.284, 24.332,5.284
|
||||
c 7.573,0, 18.306-1.7, 26.429-9.807c 8.067-8.049, 9.761-18.658, 9.761-26.142C 181.777,73.567, 179.957,65.23, 176.512,57.231z
|
||||
M 256.002,146.702c-24.957,0-45.188,20.266-45.188,45.263c0,24.996, 20.231,45.26, 45.188,45.26s 45.186-20.264, 45.186-45.26
|
||||
C 301.188,166.966, 280.958,146.702, 256.002,146.702z M 427.636,20.479c-8.124-8.104-18.856-9.806-26.43-9.806
|
||||
c-7.852,0-16.265,1.826-24.333,5.284c-8.986,3.853-17.254,9.51-24.571,16.812c-7.307,7.29-12.963,15.521-16.813,24.463
|
||||
c-3.443,7.999-5.263,16.336-5.263,24.106c0,7.483, 1.692,18.094, 9.76,26.143c 8.123,8.104, 18.856,9.807, 26.43,9.807
|
||||
c 7.85,0, 16.265-1.827, 24.33-5.284c 8.989-3.854, 17.258-9.509, 24.575-16.812c 7.305-7.29, 12.962-15.521, 16.813-24.463
|
||||
c 3.442-7.999, 5.263-16.335, 5.263-24.106C 437.396,39.138, 435.702,28.53, 427.636,20.479z" />
|
||||
<glyph unicode="" d="M0,448L 512,448L 512,384L0,384zM0,352L 512,352L 512,288L0,288zM0,256L 512,256L 512,192L0,192zM0,160L 512,160L 512,96L0,96zM0,64L 512,64L 512,0L0,0z" />
|
||||
<glyph unicode="" d="M0,448L 512,448L 512,384L0,384zM 192,352L 512,352L 512,288L 192,288zM 192,160L 512,160L 512,96L 192,96zM0,256L 512,256L 512,192L0,192zM0,64L 512,64L 512,0L0,0z" />
|
||||
<glyph unicode="" d="M0,448L 512,448L 512,384L0,384zM 96,352L 416,352L 416,288L 96,288zM 96,160L 416,160L 416,96L 96,96zM0,256L 512,256L 512,192L0,192zM0,64L 512,64L 512,0L0,0z" />
|
||||
<glyph unicode="" d="M0,448L 512,448L 512,384L0,384zM0,352L 320,352L 320,288L0,288zM0,160L 320,160L 320,96L0,96zM0,256L 512,256L 512,192L0,192zM0,64L 512,64L 512,0L0,0z" />
|
||||
<glyph unicode="" d="M 512,183.771l0,80.458 l-79.572,7.957c-4.093,15.021-10.044,29.274-17.605,42.49l 52.298,63.919L 410.595,435.12l-63.918-52.298
|
||||
c-13.217,7.562-27.471,13.513-42.491,17.604L 296.229,480l-80.458,0 l-7.957-79.573c-15.021-4.093-29.274-10.043-42.49-17.604
|
||||
L 101.405,435.12L 44.88,378.595l 52.298-63.918c-7.562-13.216-13.513-27.47-17.605-42.49L0,264.229l0-80.458 l 79.573-7.957
|
||||
c 4.093-15.021, 10.043-29.274, 17.605-42.491L 44.88,69.405l 56.524-56.524l 63.919,52.298c 13.216-7.562, 27.47-13.514, 42.49-17.605
|
||||
L 215.771-32l 80.458,0 l 7.957,79.572c 15.021,4.093, 29.274,10.044, 42.491,17.605l 63.918-52.298l 56.524,56.524l-52.298,63.918
|
||||
c 7.562,13.217, 13.514,27.471, 17.605,42.49L 512,183.771z M 352,192l-64-64l-64,0 l-64,64l0,64 l 64,64l 64,0 l 64-64L 352,192 z" />
|
||||
<glyph unicode="" d="M 451.716,380.285l-71.432,71.431C 364.728,467.272, 334,480, 312,480L 72,480 C 50,480, 32,462, 32,440l0-432 c0-22, 18-40, 40-40l 368,0 c 22,0, 40,18, 40,40
|
||||
L 480,312 C 480,334, 467.272,364.729, 451.716,380.285z M 429.089,357.657c 1.565-1.565, 3.125-3.487, 4.64-5.657L 352,352 L 352,433.728
|
||||
c 2.17-1.515, 4.092-3.075, 5.657-4.64L 429.089,357.657z M 448,8c0-4.336-3.664-8-8-8L 72,0 c-4.336,0-8,3.664-8,8L 64,440 c0,4.336, 3.664,8, 8,8
|
||||
l 240,0 c 2.416,0, 5.127-0.305, 8-0.852L 320,320 l 127.148,0 c 0.547-2.873, 0.852-5.583, 0.852-8L 448,8 z" />
|
||||
<glyph unicode="" d="M 448,480L0,480 l0-512 l 512,0 L 512,416 L 448,480z M 256,416l 64,0 l0-128 l-64,0 L 256,416 z M 448,32L 64,32 L 64,416 l 32,0 l0-160 l 288,0 L 384,416 l 37.489,0 L 448,389.491L 448,32 z" />
|
||||
<glyph unicode="" d="M 64,208L 208,64L 448,304L 384,368L 208,192L 128,272 z" />
|
||||
<glyph unicode="" d="M 256,224L 256,160L 272,160L 288,192L 320,192L 320,64L 296,64L 296,32L 408,32L 408,64L 384,64L 384,192L 416,192L 432,160L 448,160L 448,224 zM 416,320L 416,400 c0,8.8-7.2,16-16,16L 288,416 L 288,448 c0,17.6-14.4,32-32,32l-64,0 c-17.602,0-32-14.4-32-32l0-32 L 48,416 c-8.801,0-16-7.2-16-16l0-320
|
||||
c0-8.8, 7.199-16, 16-16l 144,0 l0-96 l 320,0 L 512,320 L 416,320 z M 192,447.943c 0.017,0.019, 0.036,0.039, 0.057,0.057l 63.884,0
|
||||
c 0.021-0.018, 0.041-0.038, 0.059-0.057L 256,416 l-64,0 L 192,447.943 z M 96,352L 96,384 l 256,0 l0-32 L 96,352 z M 480,0L 224,0 L 224,288 l 256,0 L 480,0 z" />
|
||||
<glyph unicode=" " horiz-adv-x="256" />
|
||||
</font></defs></svg>
|
||||
|
After Width: | Height: | Size: 26 KiB |
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+10
-10
File diff suppressed because one or more lines are too long
@@ -361,7 +361,7 @@ Umbraco.Sys.registerNamespace("Umbraco.Application");
|
||||
else {
|
||||
//instead of calling just the dialog service we funnel it through the global
|
||||
//event emitter
|
||||
getRootScope().$emit("closeDialogs", undefined);
|
||||
getRootScope().$emit("app.closeDialogs", undefined);
|
||||
}
|
||||
},
|
||||
_debug: function(strMsg) {
|
||||
|
||||
@@ -4,166 +4,54 @@
|
||||
* @restrict E
|
||||
**/
|
||||
angular.module("umbraco.directives.html")
|
||||
.directive('umbPhotoFolder', function ($compile, $log, $timeout, $filter, imageHelper, umbRequestHelper) {
|
||||
.directive('umbPhotoFolder', function($compile, $log, $timeout, $filter, umbPhotoFolderHelper) {
|
||||
|
||||
return {
|
||||
restrict: 'E',
|
||||
replace: true,
|
||||
require: '?ngModel',
|
||||
terminate: true,
|
||||
templateUrl: 'views/directives/html/umb-photo-folder.html',
|
||||
link: function(scope, element, attrs, ngModel) {
|
||||
|
||||
function renderCollection(scope, photos) {
|
||||
// get row width - this is fixed.
|
||||
var w = scope.lastWidth;
|
||||
var rows = [];
|
||||
ngModel.$render = function() {
|
||||
if (ngModel.$modelValue) {
|
||||
|
||||
// initial height - effectively the maximum height +/- 10%;
|
||||
var h = Math.max(scope.minHeight, Math.floor(w / 5));
|
||||
$timeout(function() {
|
||||
var photos = ngModel.$modelValue;
|
||||
|
||||
// store relative widths of all images (scaled to match estimate height above)
|
||||
var ws = [];
|
||||
$.each(photos, function (key, val) {
|
||||
scope.clickHandler = scope.$eval(element.attr('on-click'));
|
||||
|
||||
val.width_n = $.grep(val.properties, function (v, index) { return (v.alias === "umbracoWidth"); })[0];
|
||||
val.height_n = $.grep(val.properties, function (v, index) { return (v.alias === "umbracoHeight"); })[0];
|
||||
//todo: this doesn't do anything
|
||||
var imagesOnly = element.attr('imagesOnly');
|
||||
|
||||
//val.url_n = imageHelper.getThumbnail({ imageModel: val, scope: scope });
|
||||
var margin = element.attr('border') ? parseInt(element.attr('border'), 10) : 5;
|
||||
var startingIndex = element.attr('baseline') ? parseInt(element.attr('baseline'), 10) : 0;
|
||||
var minWidth = element.attr('min-width') ? parseInt(element.attr('min-width'), 10) : 420;
|
||||
var minHeight = element.attr('min-height') ? parseInt(element.attr('min-height'), 10) : 100;
|
||||
var maxHeight = element.attr('max-height') ? parseInt(element.attr('max-height'), 10) : 300;
|
||||
var idealImgPerRow = element.attr('ideal-items-per-row') ? parseInt(element.attr('ideal-items-per-row'), 10) : 5;
|
||||
var fixedRowWidth = Math.max(element.width(), minWidth);
|
||||
|
||||
if (val.width_n && val.height_n) {
|
||||
var wt = parseInt(val.width_n.value, 10);
|
||||
var ht = parseInt(val.height_n.value, 10);
|
||||
scope.containerStyle = { width: fixedRowWidth + "px" };
|
||||
|
||||
if (ht !== h) {
|
||||
wt = Math.floor(wt * (h / ht));
|
||||
}
|
||||
scope.rows = umbPhotoFolderHelper.buildGrid(photos, fixedRowWidth, maxHeight, startingIndex, minHeight, idealImgPerRow, margin);
|
||||
|
||||
ws.push(wt);
|
||||
} else {
|
||||
//if its files or folders, we make them square
|
||||
ws.push(scope.minHeight);
|
||||
if (attrs.filterBy) {
|
||||
scope.$watch(attrs.filterBy, function(newVal, oldVal) {
|
||||
if (newVal !== oldVal) {
|
||||
var p = $filter('filter')(photos, newVal, false);
|
||||
scope.baseline = 0;
|
||||
var m = umbPhotoFolderHelper.buildGrid(p, fixedRowWidth, 400);
|
||||
scope.rows = m;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}, 500); //end timeout
|
||||
} //end if modelValue
|
||||
|
||||
}; //end $render
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
var rowNum = 0;
|
||||
var limit = photos.length;
|
||||
while (scope.baseline < limit) {
|
||||
rowNum++;
|
||||
// number of images appearing in this row
|
||||
var c = 0;
|
||||
// total width of images in this row - including margins
|
||||
var tw = 0;
|
||||
|
||||
// calculate width of images and number of images to view in this row.
|
||||
while ((tw * 1.1 < w) && (scope.baseline + c < limit)) {
|
||||
tw += ws[scope.baseline + c++] + scope.border * 2;
|
||||
}
|
||||
|
||||
// Ratio of actual width of row to total width of images to be used.
|
||||
var r = w / tw;
|
||||
// image number being processed
|
||||
var i = 0;
|
||||
// reset total width to be total width of processed images
|
||||
tw = 0;
|
||||
|
||||
// new height is not original height * ratio
|
||||
var ht = Math.floor(h * r);
|
||||
|
||||
var row = {};
|
||||
row.photos = [];
|
||||
row.style = {};
|
||||
row.style = { "height": ht + scope.border * 2, "width": scope.lastWidth };
|
||||
rows.push(row);
|
||||
|
||||
while (i < c) {
|
||||
var photo = photos[scope.baseline + i];
|
||||
// Calculate new width based on ratio
|
||||
var wt = Math.floor(ws[scope.baseline + i] * r);
|
||||
// add to total width with margins
|
||||
tw += wt + scope.border * 2;
|
||||
|
||||
//get the image property (if one exists)
|
||||
var imageProp = imageHelper.getImagePropertyValue({ imageModel: photo });
|
||||
if (!imageProp) {
|
||||
//TODO: Do something better than this!!
|
||||
photo.thumbnail = "none";
|
||||
}
|
||||
else {
|
||||
|
||||
//get the proxy url for big thumbnails (this ensures one is always generated)
|
||||
var thumbnailUrl = umbRequestHelper.getApiUrl(
|
||||
"mediaApiBaseUrl",
|
||||
"GetBigThumbnail",
|
||||
[{ mediaId: photo.id }]);
|
||||
photo.thumbnail = thumbnailUrl;
|
||||
}
|
||||
|
||||
photo.style = { "width": wt, "height": ht, "margin": scope.border + "px", "cursor": "pointer" };
|
||||
row.photos.push(photo);
|
||||
i++;
|
||||
}
|
||||
|
||||
// set row height to actual height + margins
|
||||
scope.baseline += c;
|
||||
|
||||
// if total width is slightly smaller than
|
||||
// actual div width then add 1 to each
|
||||
// photo width till they match
|
||||
|
||||
/*i = 0;
|
||||
while (tw < w-1) {
|
||||
row.photos[i].style.width++;
|
||||
i = (i + 1) % c;
|
||||
tw++;
|
||||
}*/
|
||||
|
||||
// if total width is slightly bigger than
|
||||
// actual div width then subtract 1 from each
|
||||
// photo width till they match
|
||||
i = 0;
|
||||
while (tw > w-1) {
|
||||
row.photos[i].style.width--;
|
||||
i = (i + 1) % c;
|
||||
tw--;
|
||||
}
|
||||
}
|
||||
|
||||
return rows;
|
||||
}
|
||||
|
||||
return {
|
||||
restrict: 'E',
|
||||
replace: true,
|
||||
require: '?ngModel',
|
||||
terminate: true,
|
||||
templateUrl: 'views/directives/html/umb-photo-folder.html',
|
||||
link: function (scope, element, attrs, ngModel) {
|
||||
|
||||
ngModel.$render = function () {
|
||||
if (ngModel.$modelValue) {
|
||||
|
||||
$timeout(function () {
|
||||
var photos = ngModel.$modelValue;
|
||||
|
||||
scope.imagesOnly = element.attr('imagesOnly');
|
||||
scope.baseline = element.attr('baseline') ? parseInt(element.attr('baseline'), 10) : 0;
|
||||
scope.minWidth = element.attr('min-width') ? parseInt(element.attr('min-width'), 10) : 420;
|
||||
scope.minHeight = element.attr('min-height') ? parseInt(element.attr('min-height'), 10) : 200;
|
||||
scope.border = element.attr('border') ? parseInt(element.attr('border'), 10) : 5;
|
||||
scope.clickHandler = scope.$eval(element.attr('on-click'));
|
||||
scope.lastWidth = Math.max(element.width(), scope.minWidth);
|
||||
|
||||
scope.rows = renderCollection(scope, photos);
|
||||
|
||||
if (attrs.filterBy) {
|
||||
scope.$watch(attrs.filterBy, function (newVal, oldVal) {
|
||||
if (newVal !== oldVal) {
|
||||
var p = $filter('filter')(photos, newVal, false);
|
||||
scope.baseline = 0;
|
||||
var m = renderCollection(scope, p);
|
||||
scope.rows = m;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}, 500); //end timeout
|
||||
} //end if modelValue
|
||||
|
||||
}; //end $render
|
||||
}
|
||||
};
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* @name umbraco.directives.directive:umbSections
|
||||
* @restrict E
|
||||
**/
|
||||
function sectionsDirective($timeout, $window, navigationService, treeService, sectionResource, appState) {
|
||||
function sectionsDirective($timeout, $window, navigationService, treeService, sectionResource, appState, eventsService) {
|
||||
return {
|
||||
restrict: "E", // restrict to an element
|
||||
replace: true, // replace the html element with the template
|
||||
@@ -51,7 +51,7 @@ function sectionsDirective($timeout, $window, navigationService, treeService, se
|
||||
}
|
||||
|
||||
//Listen for global state changes
|
||||
scope.$on("appState.globalState.changed", function (e, args) {
|
||||
eventsService.on("appState.globalState.changed", function (e, args) {
|
||||
if (args.key === "showTray") {
|
||||
scope.showTray = args.value;
|
||||
}
|
||||
@@ -60,7 +60,7 @@ function sectionsDirective($timeout, $window, navigationService, treeService, se
|
||||
}
|
||||
});
|
||||
|
||||
scope.$on("appState.sectionState.changed", function (e, args) {
|
||||
eventsService.on("appState.sectionState.changed", function (e, args) {
|
||||
if (args.key === "currentSection") {
|
||||
scope.currentSection = args.value;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ angular.module("umbraco.directives")
|
||||
node.stateCssClass = (node.cssClasses || []).join(" ");
|
||||
|
||||
if (node.style) {
|
||||
$(element).find("i").attr("style", node.style);
|
||||
$(element).find("i:first").attr("style", node.style);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ angular.module('umbraco.directives')
|
||||
.directive('onKeydown', function () {
|
||||
return {
|
||||
link: function (scope, elm, attrs) {
|
||||
$key('keydown', scope, elm, attrs);
|
||||
scope.$apply(attrs.onKeydown);
|
||||
}
|
||||
};
|
||||
})
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
angular.module('umbraco.directives.validation')
|
||||
.directive('valTriggerChange', function($sniffer) {
|
||||
return {
|
||||
link : function(scope, elem, attrs) {
|
||||
elem.bind('click', function(){
|
||||
$(attrs.valTriggerChange).trigger($sniffer.hasEvent('input') ? 'input' : 'change');
|
||||
});
|
||||
},
|
||||
priority : 1
|
||||
};
|
||||
});
|
||||
@@ -1 +1,2 @@
|
||||
angular.module("umbraco.mocks", ['ngCookies']);
|
||||
angular.module("umbraco.mocks", ['ngCookies']);
|
||||
angular.module("umbraco.mocks.services", []);
|
||||
@@ -0,0 +1,24 @@
|
||||
angular.module('umbraco.mocks.services')
|
||||
.factory('assetsService', function ($q) {
|
||||
|
||||
return {
|
||||
loadCss : function(path, scope, attributes, timeout){
|
||||
var deferred = $q.defer();
|
||||
deferred.resolve();
|
||||
return deferred.promise;
|
||||
},
|
||||
loadJs : function(path, scope, attributes, timeout){
|
||||
var deferred = $q.defer();
|
||||
|
||||
if(path[0] !== "/"){
|
||||
path = "/" + path;
|
||||
}
|
||||
|
||||
$.getScript( "base" + path, function( data, textStatus, jqxhr ) {
|
||||
deferred.resolve();
|
||||
});
|
||||
|
||||
return deferred.promise;
|
||||
}
|
||||
};
|
||||
});
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user