à lire: README.md et Features.md
* README.md: mise à jour des priorités * Global.asax.cs: Fixe un 404 Not Found sur le script d'internationalisation. * YavscAjaxHelper.cs: Fixe un 404 Not Found sur le script d'internationalisation: Implementation d'une alternative à Ajax.GlobalisationScript() de Mono System.Web.MVC * App.master: utilise la nouvelle methode pour construire les references aux scripts d'internationalisation
This commit is contained in:
@ -1,3 +1,7 @@
|
||||
2015-12-01 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* README.md: mise à jour des priorités
|
||||
|
||||
2015-11-30 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* .gitignore: ignorer ma config
|
||||
|
25
README.md
25
README.md
@ -5,6 +5,12 @@ yavsc
|
||||
|
||||
# à faire, par ordre de priorité
|
||||
|
||||
0) Rendre pliable les groupes de champs de formulaire
|
||||
|
||||
0.1) Donner des descriptions textuelles au cotes (ex: dans le cadre d'un prestataire, ses 5 cotes seraient
|
||||
par exemple "Nouvelle star" "Artiste local" "Artiste régional" "Star nationale" "Star internationale"
|
||||
|
||||
0.2) Fixer l'edition de la côte zéro. (y en a 6, ou onze avec les moitiés, pas cinq (ni dix avec les moitiés))
|
||||
|
||||
1) Créer un contrôle "bouton utilisateur" `UserNameControl`
|
||||
avec
|
||||
@ -16,13 +22,20 @@ yavsc
|
||||
|
||||
2) Refabrication de l'Api :
|
||||
|
||||
Concerning the blog entry edition, we only need Two methods:
|
||||
concernant la mise à jour la creation et l'edition d'un post, on
|
||||
doit pouvoir fondre tout en une seule methode :
|
||||
|
||||
* ```long PostFile(long id)```,
|
||||
used for creation when the given id is 0, in which case, the entry id created is returned.
|
||||
Otherwise, used for import in the post spécified by its id, in which case, 0 is returned.
|
||||
* `long Post(BlogEntry be)`, used to create or update a given or not
|
||||
blog entry content. the returned value is the entry id at creation, or 0.
|
||||
* ```long PostFile(BlogEntry be)```,
|
||||
Utilisée pour la creation quand id est à 0, auquel cas, l'identiffiant
|
||||
du post créé est renvoyé en retour (non nul).
|
||||
Sinon, c'est une mise a jour des propriétés
|
||||
du billet, et on renvoie zero.
|
||||
|
||||
Dans tous les cas, toutes les propriétés du post sont fournies car mises à jour,
|
||||
et on effectue la reception des fichiers attachés.
|
||||
|
||||
Dans le cas de l'edition (id non nul),
|
||||
seules les propriétés spécifiées non nulles sont mises à jour
|
||||
(NDLR:la visibilité est donc par exemple toujours mis à jour).
|
||||
|
||||
3) Corriger un peu le thème clair (fond de titres trop sombre)
|
||||
|
@ -98,6 +98,7 @@ namespace Yavsc
|
||||
AreaRegistration.RegisterAllAreas ();
|
||||
WebApiConfig.Register (GlobalConfiguration.Configuration);
|
||||
RegisterRoutes (RouteTable.Routes);
|
||||
AjaxHelper.GlobalizationScriptPath = "~/Scripts/globalize";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1,3 +1,17 @@
|
||||
2015-12-01 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* Global.asax.cs: Fixe un 404 Not Found sur le script
|
||||
d'internationalisation.
|
||||
|
||||
* YavscAjaxHelper.cs: Fixe un 404 Not Found sur le script
|
||||
d'internationalisation:
|
||||
Implementation d'une alternative à Ajax.GlobalisationScript()
|
||||
de Mono System.Web.MVC
|
||||
|
||||
|
||||
* App.master: utilise la nouvelle methode pour construire les
|
||||
references aux scripts d'internationalisation
|
||||
|
||||
2015-11-30 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* p8-av4.jpg:
|
||||
|
@ -25,6 +25,9 @@ using Yavsc.Model.Messaging;
|
||||
using System.Runtime.Serialization.Json;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Globalization;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Web;
|
||||
|
||||
namespace Yavsc.Helpers
|
||||
{
|
||||
@ -47,7 +50,47 @@ namespace Yavsc.Helpers
|
||||
new Notification { body = QuoteJavascriptString((string)message),
|
||||
click_action = click_action } ) ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Globalizations the script.
|
||||
/// </summary>
|
||||
/// <returns>The script.</returns>
|
||||
/// <param name="ajaxHelper">Ajax helper.</param>
|
||||
public static MvcHtmlString YaGlobalizationScript(this AjaxHelper ajaxHelper)
|
||||
{
|
||||
return YaGlobalizationScript(ajaxHelper, CultureInfo.CurrentCulture);
|
||||
}
|
||||
/// <summary>
|
||||
/// Globalizations the script.
|
||||
/// </summary>
|
||||
/// <returns>The script.</returns>
|
||||
/// <param name="ajaxHelper">Ajax helper.</param>
|
||||
/// <param name="cultureInfo">Culture info.</param>
|
||||
[SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "ajaxHelper", Justification = "This is an extension method")]
|
||||
public static MvcHtmlString YaGlobalizationScript(this AjaxHelper ajaxHelper, CultureInfo cultureInfo)
|
||||
{
|
||||
return YaGlobalizationScriptHelper(AjaxHelper.GlobalizationScriptPath, cultureInfo);
|
||||
}
|
||||
|
||||
internal static MvcHtmlString YaGlobalizationScriptHelper(string scriptPath, CultureInfo cultureInfo)
|
||||
{
|
||||
if (cultureInfo == null)
|
||||
{
|
||||
throw new ArgumentNullException("cultureInfo");
|
||||
}
|
||||
|
||||
// references the global script :
|
||||
TagBuilder tagBuilder = new TagBuilder("script");
|
||||
tagBuilder.MergeAttribute("type", "text/javascript");
|
||||
string src = VirtualPathUtility.AppendTrailingSlash(scriptPath) + "globalize.js";
|
||||
tagBuilder.MergeAttribute("src", VirtualPathUtility.ToAbsolute (src));
|
||||
|
||||
TagBuilder tagCurrentBuilder = new TagBuilder("script");
|
||||
string srccurrent = VirtualPathUtility.AppendTrailingSlash(scriptPath) + "cultures/globalize.culture." + HttpUtility.UrlEncode(cultureInfo.Name) + ".js";
|
||||
tagCurrentBuilder.MergeAttribute("src", VirtualPathUtility.ToAbsolute (srccurrent));
|
||||
|
||||
string html = tagBuilder.ToString(TagRenderMode.Normal)+tagCurrentBuilder.ToString(TagRenderMode.Normal);
|
||||
return new MvcHtmlString(html);
|
||||
}
|
||||
/// <summary>
|
||||
/// Quotes the javascript string.
|
||||
/// </summary>
|
||||
|
@ -27,7 +27,7 @@ var apiBaseUrl = '<%=Url.Content(Yavsc.WebApiConfig.UrlPrefixRelative)%>';
|
||||
$('[data-type="rate-bill"]').rate({target: 'Blogs/Rate'});
|
||||
});
|
||||
</script>
|
||||
<%=Ajax.GlobalizationScript()%>
|
||||
<%=Ajax.YaGlobalizationScript()%>
|
||||
<script src="<%=Url.Content("~/Scripts/yavsc.js")%>"></script>
|
||||
<script src="<%=Url.Content("~/Scripts/yavsc.tags.js")%>"></script>
|
||||
<script src="<%=Url.Content("~/Scripts/yavsc.rate.js")%>"></script>
|
||||
|
Reference in New Issue
Block a user