diff --git a/web/App_Themes/style.css b/web/App_Themes/style.css index 65f836c0..963d1cb2 100644 --- a/web/App_Themes/style.css +++ b/web/App_Themes/style.css @@ -146,7 +146,7 @@ display:inline-block; border-radius: 1em; padding: 1em; } -.spanel { +.spanel, fieldset { max-width: 18em; display: inline-block; padding: .3em; @@ -254,9 +254,9 @@ input, select, textarea { white-space: pre-wrap; } -#avatar { - float: left; - margin:1em; +.avatar { + vertical-align: middle; + max-height: 1.3em; max-width: 1.3em; } .comment { diff --git a/web/ChangeLog b/web/ChangeLog index cc4627ac..9b154b84 100644 --- a/web/ChangeLog +++ b/web/ChangeLog @@ -1,3 +1,18 @@ +2015-12-01 Paul Schneider + + * yavsc.hidefieldset.js: Creation d'un nouveau module jQuery + pour afficher/cacher les champ de formulaire en cliquant sur + le titre des groupes de champ. + + * style.css: style plus compact pour les fieldset + + * App.master: appelle l'initialisation des widget hidefieldset + + * Profile.aspx: mettre tous les elements fils d'un groupe + champ dans des noeud cachable. + + * Yavsc.csproj: referencer le nouveau script dans le projet + 2015-12-01 Paul Schneider * Global.asax.cs: Fixe un 404 Not Found sur le script diff --git a/web/Models/App.master b/web/Models/App.master index ae003857..6e73b6ff 100644 --- a/web/Models/App.master +++ b/web/Models/App.master @@ -31,6 +31,7 @@ var apiBaseUrl = '<%=Url.Content(Yavsc.WebApiConfig.UrlPrefixRelative)%>'; + diff --git a/web/Scripts/yavsc.hidefieldset.js b/web/Scripts/yavsc.hidefieldset.js new file mode 100644 index 00000000..5ce5b5ec --- /dev/null +++ b/web/Scripts/yavsc.hidefieldset.js @@ -0,0 +1,42 @@ +(function() { + (function(jQuery) { + return jQuery.widget('Yavsc.hidefieldset', { + options: { + jsCallBack: null, + disabled: false + }, + button: null, + _create: function() { + var $ctl = $(this.element); + var _this = this; + var _btn = $ctl.children('legend'); + if (!this.options.disabled && _btn) { + _btn.addClass('actionlink'); + _btn.addClass('fa'); + _btn.addClass('fa-eye'); + this.button = _btn; + $ctl.children(':not(legend)').hide(); + this.button.click( function (e) { + if ( _btn.hasClass('fa-eye') ) { + _btn.removeClass('fa-eye'); + _btn.addClass('fa-eye-slash'); + + $ctl.children(':not(legend)').show(); + } + else { + _btn.addClass('fa-eye'); + _btn.removeClass('fa-eye-slash'); + + $ctl.children(':not(legend)').hide(); + + } + }); + } + }, +})})(jQuery); +}).call(this); + +$(document).ready(function(){ +$('fieldset').hidefieldset(); +}); + diff --git a/web/Views/Account/Profile.aspx b/web/Views/Account/Profile.aspx index b2f8331c..6067f997 100644 --- a/web/Views/Account/Profile.aspx +++ b/web/Views/Account/Profile.aspx @@ -29,7 +29,11 @@ <%= Html.ValidationSummary() %> <%= Html.Hidden("UserName",ViewData["ProfileUserName"]) %> -
Informations publiques +
Informations publiques + + avatar + <%=Html.Encode(Model.UserName)%> APE:<%=Model.MEACode%> <%=Model.WebSite%> + <%= Html.LabelFor(model => model.MEACode) %> : <%= Html.DropDownList("MEACode") %> <%= Html.ValidationMessage("MEACode", "*") %> @@ -45,22 +49,27 @@ <%= Html.ValidationMessage("WebSite", "*") %>
-Avatar : avatar - +Avatar : <%= Html.ValidationMessage("AvatarFile", "*") %> - +
-
Informations administratives +
Informations administratives +<%= string.IsNullOrWhiteSpace(Model.Name)?"KO":Html.Encode(Model.Name) %> + + + <%= Html.LabelFor(model => model.Name) %> : <%= Html.TextBox("Name") %> -<%= Html.ValidationMessage("Name", "*") %> +<%= Html.ValidationMessage("Name", "*") %>
-
Blog -
+
Blog <%=Html.Encode(Model.BlogTitle)%> + <%= Model.BlogVisible?null:Html.Translate("hidden") %> + +
<%= Html.LabelFor(model => model.BlogVisible) %> : <%= Html.CheckBox("BlogVisible") %> <%= Html.ValidationMessage("BlogVisible", "*") %> @@ -72,7 +81,10 @@ Avatar :
-
Contact +
Contact + <%=Html.Encode(Model.Phone)%> <%=Html.Encode(Model.Mobile)%> + <%=Html.Encode(Model.HasPostalAddress?"adresse OK":"adresse KO")%> +
<%= Html.LabelFor(model => model.Phone) %> <%= Html.TextBox("Phone") %> @@ -99,14 +111,18 @@ Avatar :
-
Disponibilité +
Disponibilité +<%=Html.Encode( + string.IsNullOrWhiteSpace(Model.GoogleCalendar)?"KO":"OK")%>
<%= Html.LabelFor(model => model.GoogleCalendar) %> : <%= Html.Encode(Model.GoogleCalendar) %> <%= Html.ActionLink("Choisir l'agenda","ChooseCalendar","Google",new { returnUrl= Request.Url.AbsolutePath }, new { @class="actionlink" }) %>
-
Informations de facturation +
Informations de facturation + <%=Html.Encode(Model.HasBankAccount?"OK":"KO")%> +
<%= Html.LabelFor(model => model.BankCode) %> : @@ -136,11 +152,14 @@ Avatar :
-
Interface utilisateur - +
Interface utilisateur + <%=Html.Encode(Model.UITheme)%> + + <%= Html.LabelFor(model => model.UITheme) %> : <%= Html.TextBox("UITheme") %> -<%= Html.ValidationMessage("UITheme", "*") %> +<%= Html.ValidationMessage("UITheme", "*") %> +
<% } %> diff --git a/web/Yavsc.csproj b/web/Yavsc.csproj index 84f0a82e..c365d8e1 100644 --- a/web/Yavsc.csproj +++ b/web/Yavsc.csproj @@ -531,6 +531,7 @@ + diff --git a/yavscModel/ChangeLog b/yavscModel/ChangeLog index 14cab23d..b4c7770b 100644 --- a/yavscModel/ChangeLog +++ b/yavscModel/ChangeLog @@ -1,3 +1,10 @@ +2015-12-01 Paul Schneider + + * LocalizedText.resx: + * LocalizedText.fr.resx: + * LocalizedText.Designer.cs: + * LocalizedText.fr.Designer.cs: traductions + 2015-11-30 Paul Schneider * BlogProvider.cs: doc xml diff --git a/yavscModel/LocalizedText.Designer.cs b/yavscModel/LocalizedText.Designer.cs index 2c047592..a53b2b80 100644 --- a/yavscModel/LocalizedText.Designer.cs +++ b/yavscModel/LocalizedText.Designer.cs @@ -364,9 +364,9 @@ namespace Yavsc.Model { } } - public static string Google_registration_id { + public static string hidden { get { - return ResourceManager.GetString("Google_registration_id", resourceCulture); + return ResourceManager.GetString("hidden", resourceCulture); } } @@ -424,6 +424,12 @@ namespace Yavsc.Model { } } + public static string Google_registration_id { + get { + return ResourceManager.GetString("Google_registration_id", resourceCulture); + } + } + public static string Bill_removal { get { return ResourceManager.GetString("Bill_removal", resourceCulture); diff --git a/yavscModel/LocalizedText.fr.Designer.cs b/yavscModel/LocalizedText.fr.Designer.cs index 5051606b..1236e13c 100644 --- a/yavscModel/LocalizedText.fr.Designer.cs +++ b/yavscModel/LocalizedText.fr.Designer.cs @@ -358,9 +358,9 @@ namespace Yavsc.Model { } } - public static string Google_registration_id { + public static string hidden { get { - return ResourceManager.GetString("Google_registration_id", resourceCulture); + return ResourceManager.GetString("hidden", resourceCulture); } } @@ -418,6 +418,12 @@ namespace Yavsc.Model { } } + public static string Google_registration_id { + get { + return ResourceManager.GetString("Google_registration_id", resourceCulture); + } + } + public static string Bill_removal { get { return ResourceManager.GetString("Bill_removal", resourceCulture); @@ -496,9 +502,9 @@ namespace Yavsc.Model { } } - public static string My_Estimates { + public static string Non_existent_user { get { - return ResourceManager.GetString("My_Estimates", resourceCulture); + return ResourceManager.GetString("Non_existent_user", resourceCulture); } } @@ -724,9 +730,9 @@ namespace Yavsc.Model { } } - public static string Non_existent_user { + public static string My_Estimates { get { - return ResourceManager.GetString("Non_existent_user", resourceCulture); + return ResourceManager.GetString("My_Estimates", resourceCulture); } } diff --git a/yavscModel/LocalizedText.fr.resx b/yavscModel/LocalizedText.fr.resx index f039eebb..a3d03380 100644 --- a/yavscModel/LocalizedText.fr.resx +++ b/yavscModel/LocalizedText.fr.resx @@ -56,6 +56,7 @@ Cacher le texte source du billet Accueil Cacher + caché J'ai compris URI de l'image Exception à l'import diff --git a/yavscModel/LocalizedText.resx b/yavscModel/LocalizedText.resx index 390ae61b..76b97943 100644 --- a/yavscModel/LocalizedText.resx +++ b/yavscModel/LocalizedText.resx @@ -54,6 +54,7 @@ Please, use a date in the future as starting date. Home Hide + hidden Hide the bill source text entries Google calendar