<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<publishUrl>E:\Publish</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles>
<CopyAllFilesToSingleFolderForPackageDependsOn>
CustomCollectFiles;
$(CopyAllFilesToSingleFolderForPackageDependsOn);
</CopyAllFilesToSingleFolderForPackageDependsOn>
</PropertyGroup>
<Target Name="CustomCollectFiles">
<ItemGroup>
<!-- =====Root folder ==== -->
<_CustomFilesForRootFolder Include="BuiltScripts\*.js">
<DestinationRelativePath>%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</_CustomFilesForRootFolder>
<FilesForPackagingFromProject Include="%(_CustomFilesForRootFolder.Identity)">
<DestinationRelativePath>MyScript\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
</Project>
$(this).blur(function () {
var removeErrorMessage = function(className) { $(this).next().children("." + className).remove(); };
var showErrorMessage = function(className, message ){
if (!($("." + className).length)){
$(this).parent().children(".error-list").append(["<li class='", className, "'>", message, "</li>"].join());
}
};
var showSuccessView = function() { $(this).parent().parent().attr("class", "control-group success"); };
var showWrongView = function() { $(this).parent().parent().attr("class", "control-group error"); };
var checkLogin = function(login){
var loginVerified = new RegExp(/^[a-zA-Z0-9_-]{3,16}$/).test(login);
if ((loginVerified) && (login.length >= 6)) showSuccessView(); else showWrongView();
if (login.length >= 6) removeErrorMessage("help-login-length");
else{
showErrorMessage("help-inline help-login-length", "В логине должно быть не менее 6 символов");
}
if (loginVerified) removeErrorMessage("help-login-reg");
else{
showErrorMessage("help-inline help-login-reg", "Только символы латинского алфавита, цифры, дефис и подчеркивание (a–z, 0-9, -, _).");
}
};
switch($(this).attr("id")){
case "id_username": checkLogin($(this).val()); break;
}
});