diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index 450dece7..00000000 --- a/ChangeLog +++ /dev/null @@ -1,28 +0,0 @@ -2015-10-04 Paul Schneider - - * Makefile: cleaner code - -2015-08-20 Paul Schneider - - * Yavsc.sln: Adds the `Presta` project - -2015-08-14 Paul Schneider - - * README.md: blanked: not clear enough - -2015-07-17 Paul Schneider - - * Yavsc.sln: - -2015-06-09 Paul Schneider - - * Yavsc.sln: creates a packaging project - -2015-06-07 Paul Schneider - - * Makefile: cleans the StyleCop cache - -2015-06-06 Paul Schneider - - * Yavsc.sln: modifies the Version control integration - diff --git a/ITContentProvider/ChangeLog b/ITContentProvider/ChangeLog deleted file mode 100644 index bbc773fd..00000000 --- a/ITContentProvider/ChangeLog +++ /dev/null @@ -1,18 +0,0 @@ -2015-10-01 Paul Schneider - - * packages.config: - * ITContentProvider.csproj: - -2015-07-15 Paul Schneider - - * ITContentProvider.csproj: Moves to Mono framework - -2015-06-10 Paul Schneider - - * ITContentProvider.csproj: - -2015-06-09 Paul Schneider - - * ITContentProvider.csproj: Helps to fix packaging, and cleans - dependencies - diff --git a/NpgsqlBlogProvider/ChangeLog b/NpgsqlBlogProvider/ChangeLog deleted file mode 100644 index 6768c756..00000000 --- a/NpgsqlBlogProvider/ChangeLog +++ /dev/null @@ -1,35 +0,0 @@ -2015-10-01 Paul Schneider - - * packages.config: - * NpgsqlBlogProvider.csproj: - -2015-09-27 Paul Schneider - - * NpgsqlBlogProvider.cs: Fixes the sql command preparation - -2015-09-23 Paul Schneider - - * NpgsqlBlogProvider.cs: refactoring: The `UserName` property - from the `BlogEntry` class is renamed to `Author` - -2015-08-04 Paul Schneider - - * NpgsqlBlogProvider.cs: * Remove post by id - * Manage collections of entries on a couple (user,title), not - a single post - - -2015-07-15 Paul Schneider - - * NpgsqlBlogProvider.csproj: Moves to Mono framework - -2015-07-02 Paul Schneider - - * NpgsqlBlogProvider.cs: - * NpgsqlBlogProvider.csproj: - -2015-06-09 Paul Schneider - - * NpgsqlBlogProvider.csproj: Helps to fix packaging, and - cleans dependencies - diff --git a/NpgsqlContentProvider/ChangeLog b/NpgsqlContentProvider/ChangeLog deleted file mode 100644 index 07dfdab5..00000000 --- a/NpgsqlContentProvider/ChangeLog +++ /dev/null @@ -1,62 +0,0 @@ -2015-10-01 Paul Schneider - - * packages.config: - * NpgsqlContentProvider.csproj: - -2015-09-27 Paul Schneider - - * NpgsqlCircleProvider.cs: Fixes the sql command preparation - -2015-09-10 Paul Schneider - - * NpgsqlCircleProvider.cs: - -2015-09-10 Paul Schneider - - * NpgsqlCircleProvider.cs: * refactoring - * updates the circle - -2015-08-20 Paul Schneider - - * NpgsqlCircleProvider.cs: circle members are now stored in bd - upon their user's name - -2015-08-04 Paul Schneider - - * NpgsqlCircleProvider.cs: Fixes the "Match" method. - - * NpgsqlContentProvider.cs: refactoring - -2015-07-15 Paul Schneider - - * NpgsqlCircleProvider.cs: Makes Circles private, or not - - * NpgsqlContentProvider.cs: Impacts htmldoc - - * NpgsqlContentProvider.csproj: Moves to Mono framework - -2015-07-02 Paul Schneider - - * NpgsqlCircleProvider.cs: - -2015-06-18 Paul Schneider - - * NpgsqlCircleProvider.cs: Fixes the Circle creation - - * NpgsqlContentProvider.cs: code formatting - -2015-06-10 Paul Schneider - - * NpgsqlCircleProvider.cs: - -2015-06-10 Paul Schneider - - * NpgsqlCircleProvider.cs: implements a Circle provider - - * NpgsqlContentProvider.csproj: new circle provider - -2015-06-09 Paul Schneider - - * NpgsqlContentProvider.csproj: Helps to fix packaging, and - cleans dependencies - diff --git a/NpgsqlMRPProviders/ChangeLog b/NpgsqlMRPProviders/ChangeLog deleted file mode 100644 index 33f180e5..00000000 --- a/NpgsqlMRPProviders/ChangeLog +++ /dev/null @@ -1,46 +0,0 @@ -2015-10-01 Paul Schneider - - * packages.config: - * NpgsqlProfileProvider.cs: - * NpgsqlMRPProviders.csproj: - * NpgsqlMembershipProvider.cs: - -2015-08-04 Paul Schneider - - * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider - - * NpgsqlRoleProvider.cs: simpler init method - - * NpgsqlUserNameProvider.cs: impements a UserNameProvider - -2015-08-01 Paul Schneider - - * NpgsqlMembershipProvider.cs: Fixes the membership update. - -2015-07-15 Paul Schneider - - * NpgsqlMRPProviders.csproj: Moves to Mono framework - - * NpgsqlMembershipProvider.cs: Makes possible to change the - UserName - - * NpgsqlRoleProvider.cs: Drops this SQL code, which is - actually maintained in Web/instdbws.sql - -2015-06-18 Paul Schneider - - * NpgsqlMembershipProvider.cs: should fix a bug at resetting - the password - -2015-06-10 Paul Schneider - - * NpgsqlMembershipProvider.cs: Fixes the Google registration - since usage of NuGet for Npgsql - -2015-06-09 Paul Schneider - - * NpgsqlCircleProvider.cs: Refactoring: Npgsql prefix - - * NpgsqlMRPProviders.csproj: Helps to fix packaging, and - cleans dependencies - diff --git a/TestAPI/ChangeLog b/TestAPI/ChangeLog deleted file mode 100644 index fd94087f..00000000 --- a/TestAPI/ChangeLog +++ /dev/null @@ -1,14 +0,0 @@ -2015-10-01 Paul Schneider - - * TestAPI.csproj: - * packages.config: - -2015-07-17 Paul Schneider - - * TestAPI.csproj: - * AssemblyInfo.cs: - - * TestAutomate.cs: Tests an Automate - - * packages.config: using Machine.Specifications - diff --git a/WebControls/ChangeLog b/WebControls/ChangeLog index a859b82b..efe3e9e7 100644 --- a/WebControls/ChangeLog +++ b/WebControls/ChangeLog @@ -1,3 +1,7 @@ +2015-10-04 Paul Schneider + + * ResultPages.cs: . + 2015-09-23 Paul Schneider * InputUserName.cs: formatting diff --git a/WebControls/ResultPages.cs b/WebControls/ResultPages.cs index ed1d3a3d..f3232106 100644 --- a/WebControls/ResultPages.cs +++ b/WebControls/ResultPages.cs @@ -4,6 +4,7 @@ using System.Security.Permissions; using System.Web.UI; using System.Web.UI.WebControls; using System.ComponentModel; +using System.Collections; namespace Yavsc.WebControls { @@ -29,19 +30,16 @@ namespace Yavsc.WebControls } - /// /// Gets or sets the results per page. /// /// The results per page. - [Bindable (true)] - [DefaultValue(10)] - public int ResultsPerPage { + public int PageSize { get { - return (int)( ViewState["ResultsPerPage"]==null?10:ViewState["ResultsPerPage"]); + return (int)( ViewState["PageSize"]==null?10:ViewState["PageSize"]); } set { - ViewState["ResultsPerPage"]=value; + ViewState["PageSize"]=value; } } @@ -50,11 +48,8 @@ namespace Yavsc.WebControls /// Gets or sets the result count. /// /// The result count. - [Bindable (true)] - [DefaultValue(0)] public int ResultCount { get { - return (int)( ViewState["ResultCount"]==null?0:ViewState["ResultCount"]); } set { @@ -66,7 +61,6 @@ namespace Yavsc.WebControls /// Gets or sets the text. /// /// The text. - [Bindable (true)] [DefaultValue("Pages:")] [Localizable(true)] public string Text { @@ -85,25 +79,27 @@ namespace Yavsc.WebControls /// /// The action. [Bindable (true)] - [DefaultValue("")] + [DefaultValue("?pageIndex=")] public string Action { get { string s = (string)ViewState["Action"]; - return (s == null) ? String.Empty : s; + return (s == null) ? "?pageIndex=" : s; } set { ViewState["Action"] = value; } } + /// + /// Gets or sets the none. + /// + /// The none. [Bindable (true)] [DefaultValue("none")] public string None { get { - - string s = (string) ViewState["None"]; - return (s == null) ? String.Empty : s; + return (string) ViewState["None"]; } set { ViewState["None"] = value; @@ -116,41 +112,42 @@ namespace Yavsc.WebControls /// The current page. [Bindable (true)] [DefaultValue(0)] - public int CurrentPage { + public int PageIndex { get { - int i = (int)(ViewState["CurrentPage"]==null?0:ViewState["CurrentPage"]); + int i = (int)(ViewState["PageIndex"]==null?0:ViewState["PageIndex"]); return i; } set { - ViewState["CurrentPage"] = value; + ViewState["PageIndex"] = value; } } + /// /// Renders the contents as the list of links to pages of results. /// /// Writer. protected override void RenderContents (HtmlTextWriter writer) { - if (ResultCount > 0 && ResultCount > ResultsPerPage ) { + if (ResultCount > 0 && ResultCount > PageSize ) { writer.WriteEncodedText (Text); - int pageCount = ((ResultCount-1) / ResultsPerPage) + 1; - for (int pi = (CurrentPage < 5) ? 0 : CurrentPage - 5; pi < pageCount && pi < CurrentPage + 5; pi++) { - if (CurrentPage == pi) - writer.RenderBeginTag ("b"); - else { - writer.AddAttribute (HtmlTextWriterAttribute.Href, - string.Format (Action, pi)); - writer.RenderBeginTag ("a"); + int pageCount = ((ResultCount-1) / PageSize) + 1; + if ( pageCount > 1 ) { + for (int pi = (PageIndex < 5) ? 0 : PageIndex - 5; pi < pageCount && pi < PageIndex + 5; pi++) { + if (PageIndex == pi) + writer.RenderBeginTag ("b"); + else { + writer.AddAttribute (HtmlTextWriterAttribute.Href, + string.Format (Action, pi)); + writer.RenderBeginTag ("a"); + } + writer.Write (pi + 1); + writer.RenderEndTag (); + writer.Write (" "); } - writer.Write (pi+1); - writer.RenderEndTag (); - writer.Write (" "); } } if (ResultCount == 0) { - writer.Write ("("); writer.Write (None); - writer.Write (")"); } } diff --git a/web/App_Themes/style.css b/web/App_Themes/style.css index 784232e3..dc2bbb65 100644 --- a/web/App_Themes/style.css +++ b/web/App_Themes/style.css @@ -96,7 +96,7 @@ aside { max-width: 40em; padding: .5em; margin: .5em; - background-color: rgba(32,32,64,0.8); + background-color: rgba(32,32,32,0.8); border-radius:10px; } .postpreview video, .postpreview img { @@ -107,11 +107,11 @@ aside { display:block; margin:1em; padding:1em; - background-color: rgba(32,32,64,0.8); + background-color: rgba(32,32,32,0.8); color: #aaa; border-radius:10px; } -.hiddenpost { background-color: rgba(16,16,16,0.7); } +.hiddenpost { background-color: rgba(16,16,16,0.5); } .fullwidth { width: 100%; } textarea.fullwidth { min-height:10em; } @@ -125,7 +125,7 @@ textarea.fullwidth { min-height:10em; } } .panel,.bshpanel, aside { - background-color: rgba(32,16,16,0.8); + background-color: rgba(32,32,16,0.8); border-radius:5px; margin:.5em; padding: .5em; @@ -147,11 +147,13 @@ content: ")"; a { text-decoration: none; color: #B0B080; + background-color:rgba(20,20,20,0.5); + text-decoration: none; } .usertitleref { color: #B0B080; border-radius: 5px; - background-color:rgba(0,0,32,0.8); + background-color:rgba(0,0,32,0.6); font-family: 'Arial', cursive; padding: 1em; } @@ -167,19 +169,19 @@ label { .message, #message { font-size: large; - background-color: rgba(0,64,0,0.1); + background-color: rgba(64,64,0,0.5); } .dirty { - background-color: rgba(128,128,0,0.3); + background-color: rgba(128,128,0,0.5); } .error, #error { color: #f88; font-size: large; - background-color: rgba(128,0,0,0.3); + background-color: rgba(256,0,0,0.5); } .validation-summary-errors{ color: #f88; - background-color: rgba(64,0,0,0.3); + background-color: rgba(256,0,0,0.5); } @@ -201,7 +203,7 @@ ul.preview li:nth-child(n) { .actionlink { color: #B0B080; border-radius: 5px; - background-color:rgba(0,0,32,0.8); + background-color:rgba(0,0,32,0.5); cursor: pointer; font-family: 'Arial', cursive; padding: .2em; diff --git a/web/ChangeLog b/web/ChangeLog deleted file mode 100644 index b6dd02c4..00000000 --- a/web/ChangeLog +++ /dev/null @@ -1,1018 +0,0 @@ -2015-10-04 Paul Schneider - - * parralax.js: refactoring - - * drummer-652345_1280.xxs.jpg: - * musician-923526_1280.xxs.jpg: - * live-concert-388160_1280.xxs.jpg: totem style - - * style.css: -> Totem - - * BlogsController.cs: Fixes edition validation - - * App.master: externalize the parralax javascript code, - finishes the merge from yavsc - - * UserPosts.aspx: Affiche "pas de contenu" quand aucun post - n'est à afficher - - * Web.csproj: Totem images - - * instdbws.sql: Header images - -2015-10-02 Paul Schneider - - * style.css: yauniformisation small & large screens. - nav and footer must have a repeating background image - -2015-10-02 Paul Schneider - - * style.css: style uniformisation, between small and large - screens - - * App.master: mainly cleans the code - additionaly, modifies the background speed for `nav` - -2015-10-02 Paul Schneider - - * Web.csproj: new images - - * App.master: a nicer javascript and better structure - - * style.css: less padding on small screens - - * p8-av4.xxs.png: from Kali, Da code - - * p8-av4.xxs.jpg: from Kali, Da code, da light one - - * Index.aspx: print titles, removes actionlink class to these last one - - * UserPosts.aspx: print titles, removes actionlink class to these last one - - * star-939235_1280.xxs.jpg: a lighter weight - - * helix-nebula-1400x1400.xxs.jpg: a lighter weight - -2015-10-02 Paul Schneider - - * Web.csproj: - * p8-av4.png: - * all.css: - * core.css: - * tabs.css: - * base.css: - * menu.css: - * style.css: - * theme.css: - * dialog.css: - * button.css: - * slider.css: - * tooltip.css: - * spinner.css: - * sortable.css: - * draggable.css: - * resizable.css: - * accordion.css: - * selectable.css: - * selectmenu.css: - * datepicker.css: - * progressbar.css: - * star-939235_1280.jpg: - * autocomplete.css: - -2015-10-01 Paul Schneider - - * style.css: nicer theme - - * App.master: fixes the return url using Url.Encode - -2015-10-01 Paul Schneider - - * style.css: more space - - * Web.config: - * YavscHelpers.cs: - * OAuth2.cs: - * AccountController.cs: refactoring - - * BlogsController.cs: A new page, to become a media chooser - - * App.master: nice small parralax.js, could work on android - browers - - * Web.config: unix line endings - -2015-10-01 Paul Schneider - - * Web.config: - * YavscHelpers.cs: - * GoogleController.cs: refactoring - - * OAuth2.cs: refactoring - - - * AccountController.cs: * refactoring profile properties - * fixes profile edition auth - - * instdbws.sql: remove some ownership attribution - - * Web.csproj: totem prod custo - - * App.master: Totem prod custo - nice and simple parralax effect, - quiet working on my android browser ... - - * Profile.aspx: a smaller avatar - - * style.css: Totem prod custo - -2015-10-01 Paul Schneider - - * UserPost.aspx: Fixes the anonymous access ! - - * drummer-652345_1280.jpg: - * musician-923526_1280.jpg: - * an-pierle-876094_1280.jpg: - * drummer-652345_1280.s.jpg: - * helix-nebula-1400x1400.jpg: - * musician-923526_1280.s.jpg: - * live-concert-388160_1280.jpg: - * helix-nebula-1400x1400.s.jpg: - * live-concert-388160_1280.s.jpg: initial import - -2015-09-30 Paul Schneider - - * style.css: Makes a better style - - * Banner.png: Made obsolete - - * ChangeLog: Must not exist in the source tree - - * Web.config: - * instdbws.sql: Groups profile properties - - * App.master: A better Html structure - - * AccountController.cs: Fixes the Profile edition - - * MarkdownHelper.cs: Adds an extraction of an introduction - from a Markdown text - - * Edit.aspx: - * Index.aspx: - * UserPost.aspx: a better html structure - - * UserPosts.aspx: * a better html structure - * post previews - - * Web.csproj: Adds and removes images - -2015-09-30 Paul Schneider - - * drummer-652345_1280.jpg: - * musician-923526_1280.jpg: - * an-pierle-876094_1280.jpg: - * drummer-652345_1280.s.jpg: - * musician-923526_1280.s.jpg: - * helix-nebula-1400x1400.jpg: - * live-concert-388160_1280.jpg: - * helix-nebula-1400x1400.s.jpg: - * live-concert-388160_1280.s.jpg: some image - - * style.css: makes a new style - - * AccountController.cs: fixes the profile edition - - * MarkdownHelper.cs: implements an helper to build a preview - from some Markdown text - - * App.master: * use the non-min jquery-ui.js - * use a simpler code for parallax - * nicer code - * small icon in the link to blog posts - * do not show G+1 in Debug mode - - * Web.config: - * Edit.aspx: - * Index.aspx: - * UserPost.aspx: a better html structure - - * UserPosts.aspx: * a better html structure - * displays a post preview - - * Web.csproj: image additions and deletion - - * instdbws.sql: groups some profile attributes - - * Banner.png: obsolete - -2015-09-28 Paul Schneider - - * App.master: Use local copies for jquery & jquery-ui - - * BlogsController.cs: Defines a search method targeting blog - attached files and other user files. - -2015-09-28 Paul Schneider - - * FontAwesome.otf: - * font-awesome.css: - * fontawesome-webfont.eot: - * fontawesome-webfont.svg: - * fontawesome-webfont.ttf: - * fontawesome-webfont.woff: - * font-awesome.min.css: return to version 4.4 - - * hallo.js: using my development version - - * Edit.aspx: * code made obsolete, by using the halloblacklist - plugin - -2015-09-28 Paul Schneider - - * App.master: Fixes the missing jquery ui css - -2015-09-27 Paul Schneider - - * App.master: Circles edition needs also this lib, all pages - will need it ... - - * Edit.aspx: Restores the post visibility control - - * Web.config: Fixes the new connection string, the `Encoding` - parameter is no more supported. - - * Web.csproj: Nuget packages updating - - * packages.config: Nuget packages updating - -2015-09-27 Paul Schneider - - * jquery.htmlClean.min.js: * in order to paste from any(?) - document - - * rangy-selectionsaverestore.js: required by hallo html - cleanup - - * App.master: * A link to awesome fonts - * a hint, to engage to invoice :-) - - * rangy-core.js: using the bower installed one - - * to-markdown.js: using the new code, came from the `npm - start` process - - * Edit.aspx: fixes copy/paste from LibreOffice writter colored - text. - - * Web.csproj: using new javascript references to: - rangy-core, rangy-selectionsaverestore jquery.htmlClean - - * mdd_help.htm: - * mdd_styles.css: - * rangyinputs-jquery-1.1.2.js: obsolete - -2015-09-25 Paul Schneider - - * BlogsController.cs: Fixes the Markdown usage of the uploaded - files: - Files are now renamed by dropping invalid characters and - replacing spaces by underscores. - An existing destination file is removed at upload. - - - * showdown.js: Renders audio and video at client side - - * to-markdown.js: converts html audio and video to Markdown - - * TestByteA.cs: adds a prefix, an underscore, to the test - table `_testbytea` - - * Edit.aspx: Uses the new `showdown` javascript module (that - previously was named `Showdown`) - - * Web.csproj: cleaning - - * MarkdownDeep.dll: Renders video an audio - - * GruntFile.js: Was pollution - -2015-09-23 Paul Schneider - - * font-awesome.css: an awesome css - - * hallo.js: Use a forked Hallo.js - - * showdown.js: - * to-markdown.js: - * mdd_gripper.png: - * mdd_toolbar.png: - * mdd_modal_background.png: The client side Markdown is now - implemented using Hallo.js - - * FontAwesome.otf: - * fontawesome-webfont.eot: - * fontawesome-webfont.svg: - * fontawesome-webfont.ttf: - * fontawesome-webfont.woff: - * fontawesome-webfont.woff2: awesome - - * MarkdownDeep.dll: a modified version to render video and - audio tags - - * BlogsController.cs: * refactoring: The `UserName` property - from the `BlogEntry` class is renamed to `Author` - * Fixes pandoc process on file named with some spaces - - * CalendarController.cs: - * WorkFlowController.cs: refactoring: The `UserName` property - from the `BlogEntry` class is renamed to `Author` - - * BlogsController.cs: UserName became Author on BlogEntry - objects - - * Global.asax.cs: route /fonts is now ignored. - - * MarkdownHelper.cs: transform Markdown using a given base url - - * App.master: jquery was not needed on all pages. - - * Edit.aspx: using Hallo.js - - * UserPost.aspx: - * UserPosts.aspx: - * RemoveTitle.aspx: refactoring - - * Web.config: ? - - * Web.csproj: * use my local assembly for MarkdownDeep.dll - * fontawesome integration - * Hallo.js, to-markdown.js, showdowwn.js integration - - - * packages.config: Now use forked MarkdownDeep - - * MarkdownDeepLib.min.js: - * MarkdownDeep License.txt: - * MarkdownDeep Quick Reference.txt: using my local revision - - * mdd_ajax_loader.gif: The client side Markdown is now - implemented using Hallo.js - - -2015-09-16 Paul Schneider - - * mdd_help.htm: - * mdd_styles.css: - * jquery-ui-1.11.4.js: - * all.css: - * base.css: - * menu.css: - * core.css: - * tabs.css: - * theme.css: - * dialog.css: - * button.css: - * slider.css: - * tooltip.css: - * jquery-ui-1.11.4.min.js: - * spinner.css: - * sortable.css: - * resizable.css: - * accordion.css: - * draggable.css: - * datepicker.css: - * selectmenu.css: - * selectable.css: - * progressbar.css: - * autocomplete.css: - * ui-icons_2e83ff_256x240.png: - * ui-icons_454545_256x240.png: - * ui-icons_222222_256x240.png: - * ui-icons_888888_256x240.png: - * ui-icons_cd0a0a_256x240.png: - * ui-bg_flat_0_aaaaaa_40x100.png: - * ui-bg_flat_75_ffffff_40x100.png: - * ui-bg_glass_55_fbf9ee_1x400.png: - * ui-bg_glass_65_ffffff_1x400.png: - * ui-bg_glass_75_dadada_1x400.png: - * ui-bg_glass_75_e6e6e6_1x400.png: - * ui-bg_glass_95_fef1ec_1x400.png: - * ui-bg_highlight-soft_75_cccccc_1x100.png: - - * BlogsController.cs: implements the access control on file - upload to blog entries - - * style.css: nicer appmenu - - * BlogsController.cs: Enables the input validation at posting - blog entries - - * MarkdownHelper.cs: enables ExtraMode transformation - parameter - - * App.master: Error and message html divisions must exist in - the DOM to display Ajax messages and errors - - * yavsc.js: - * yavsc.circles.js: refactoring - - * Circles.aspx: removes a DOM element that already exists in - the mastyer page : the message box - - * Edit.aspx: submits files for import as Markdown text - - * Web.config: Disables the local trace - - * Web.csproj: jQuery.UI addition - - * packages.config: adds a ref to jQuery.UI Combined - -2015-09-11 Paul Schneider - - * style.css: yastyle - - * Web.csproj: Cleanning - - * FileInfoCollection.cs: cleanning - -2015-09-11 Paul Schneider - - * BlogsController.cs: * refactoring - * implements a file posting, in a directory named with an - user's post id - - * BlogsController.cs: Any user may edit any title - -2015-09-11 Paul Schneider - - * Global.asax.cs: ignored routes are revisited - - * YavscApiController.cs: implements a default web api response - - * Web.csproj: bask to net451 - - * AccountController.cs: refactoring - - * Web.config: removes the app setting - "ClientValidationEnabled" - - * Web.config: Makes true the clientValidationEnabled app - parameter - - * packages.config: retargeting Paypal api to net451 - - * AccountController.cs: xml doc - -2015-09-10 Paul Schneider - - * Circles.aspx: fixes circle updates - - * yavsc.circles.js: * refactoring - * fixes circle update - -2015-09-10 Paul Schneider - - * instdbws.sql: - -2015-09-10 Paul Schneider - - * yavsc.js: - * yavsc.circles.js: js refactoring - - * Credits.aspx: A credit about to add - - * CircleController.cs: refactoring : drops the NewCircle class - The `List` method now resterns collection of circlebase - - * style.css: * a new `dirty` css class, could be used to tag - data to validate ala ajax - * removed quite all of the `float` usages - - * AccountController.cs: xml doc - - * BlogsController.cs: Avatar method moved to the Account - controller - - * YavscHelpers.cs: An avatar url - - * App.master: Login div moved up - - * Circles.aspx: a new `private` filed in the `Circle` object, - in order to keep circle names from being published as user's - information, - should be true by default - - * Profile.aspx: removed the tables - - * Index.aspx: Un message plus explicite - - * Web.config: nothing to view - - * Web.csproj: * new page : Credit - * new script: yavsc.circle.js - - - * instdbws.sql: circles are uniques for a given user against a - given app - -2015-08-22 Paul Schneider - - * yavsc.js: factorize some javascript - - * BlogsController.cs: removes Html used as text - - * App.master: removes the bsd css class script - - * Circles.aspx: fixes the Javascript circle selection - - * Index.aspx: - * AssemblyInfo.aspx: `Indexe` is not a french word, sorry for - the trouble - - * Web.csproj: includes yavsc Javascript in the project - - * style.css: panels float left - -2015-08-20 Paul Schneider - - * CircleController.cs: * Authorize some Http methods - * Lists circles as circles - - - * style.css: Fixes the missing "hidden" css class - - * AccountController.cs: using the new Circle provider - interface - - * BlogsController.cs: * using the new Circle provider - interface - * do not test blog entry collections in order to group them by - a unique user name or title, it's too bad, - instead, keep user's request id as guide to model and view. - - * YavscHelpers.cs: Adds a Circle Html formatter - - * Circles.aspx: List of circles is now given as a list of - `Circle` objects - - * instdbws.sql: fixes the db in order to store user names in - circle member's records. - -2015-08-14 Paul Schneider - - * FileSystemController.cs: Fixes the route to user's Files by - an Admin. - -2015-08-05 Paul Schneider - - * style.css: Gives a margin to the login panel - - * BlogsController.cs: Simplifies the code and method - - * UserList.aspx: Displays the creation date - -2015-08-05 Paul Schneider - - * style.css: the style changes ... - - * BlogsController.cs: Fixes the comment posting - - * App.master: Don't hide the Home page link! TODO: a logo - - * UserPost.aspx: don't hide the blog title - -2015-08-05 Paul Schneider - - * Index.aspx: - * UserPost.aspx: - * UserPosts.aspx: sets actionlink and block disply to titles - -2015-08-05 Paul Schneider - - * Index.aspx: Fixes another link to Blog - -2015-08-05 Paul Schneider - - * style.css: * Gives main background a color - * lets small screens keep their font sizes - - * Catalog.xml: makes it a better - - * BlogsController.cs: Fixes the access to the Blog - - * App.master: fixes the quick link to the user's blog - - * Index.aspx: removes the table - - * UserPosts.aspx: Mainly links to UserPost - -2015-08-04 Paul Schneider - - * bg.gif: - * asc.gif: - * desc.gif: - * style.css: moved to App_Themes - - * style.css: - * bg.gif: - * asc.gif: - * bg.png: - * rect.png: - * asc.png: - * desc.gif: - * jquery-ui.css: - * mdd_styles.css: - * croix.png: - * desc.png: - * style.css: - * jquery-ui.min.css: - * mdd_gripper.png: - * mdd_toolbar.png: - * jquery.timepicker.css: - * mdd_ajax_loader.gif: - * mdd_modal_background.png: moved to /App_Themes - - * BlogsController.cs: access control simplified - - * FrontOfficeController.cs: Pdf generation made public ni case - of formatting exception - - * mdd_styles.css: Theme -> App_Themes - - * style.css: yet another style impact - - * AccountController.cs: Fixes the user name modification - - * BlogsController.cs: * Fixes the removal process - * On a title and user name, we get collection of posts, not - only one. - * Implements an Access on circle - - - * FrontOfficeController.cs: * implements a new Get method. - * ensure a membership existence before delivering an estimate. - - - * GoogleController.cs: Fixes the user name modification on a - Google account - - * ErrorHtmlFormatter.cs: nice error message in html (using - Markdown helper) - - * FormatterException.cs: formatter exception exposes error and - standard output of the process - - * TexToPdfFormatter.cs: * generates temporary files in the - folder returned by Path.GetTempPath() - * throws FormatterException - - * Global.asax.cs: new route map: - Blogs/{action}/{user}/{title} - Blog/{user}/{title} - B/{id} - {controller}/{action}/{id} - - - * App.master: * refactoring: Theme moved to App_Themes - * a link to the logged user's blog - * - - * NoLogin.master: refactoring: Theme moved to App_Themes - - * Circles.aspx: refactoring : circles now are given as select - items - - * Login.aspx: fixes the html presentation - - * Register.aspx: Fixes a Typo - - * Edit.aspx: - * Estimates.aspx: refactoring - - * Index.aspx: Implements a blog index, due to M&C changes with - this commit - - * RemovePost.aspx: links to the new route to the "RemovePost" - action, giving it a post id - - - * RemoveTitle.aspx: fixes a not yet linked page to remove a - post collection under a given title - - * EventPub.aspx: code refactoring - - * Writting.ascx: cleans the code - - * Web.config: fills the config with new names in the space - - * Web.config: configures the new NpgsqlUserNameProvider - - * Web.csproj: refactoring and others - - * UserPosts.aspx: adds a link to remove a post - - * UserPost.aspx: now uses the new BlogEntryCollection object - -2015-07-23 Paul Schneider - - * Web.config: Trace may be enabled, as long it is in local - mode - - * Web.csproj: - * RemoveTitle.aspx: Removes all posts related to a given title - - * RemovePost.aspx: Removes a single bill - -2015-07-17 Paul Schneider - - * Web.csproj: - * FrontOfficeController.cs: - -2015-07-15 Paul Schneider - - * cldr.js: - * Web.config: - * styles.json: - * globalize.js: - * event.js: - * Auth.aspx: - * Book.aspx: - * jquery-2.1.4.js: - * Login.aspx: - * map-load.gif: - * Book.aspx: - * Auth.aspx: - * mapstyle.css: - * mdd_help.htm: - * date.js: - * Login.aspx: - * unresolved.js: - * fit-bounds.png: - * plural.js: - * number.js: - * mapstyle-ie.css: - * jquery-2.1.4.min.js: - * supplemental.js: - * jquery-2.1.4.min.map: - * jquery.googlemaps.js: - * pin-pink.png: - * message.js: - * mapstyle.min.css: - * jquery-2.1.4-vsdoc.js: - * ChooseADate.aspx: - * pin-green.png: - * pin-azure.png: - * currency.js: - * flag-green.png: - * flag-azure.png: - * MarkdownDeepLib.min.js: - * ChooseADate.aspx: - * needle-pink.png: - * current-location.png: - * jquery.googlemaps.min.js: - * niddle-green.png: - * ChooseCalendar.aspx: - * ErrorMessage.aspx: - * relative-time.js: - * ChooseCalendar.aspx: - * GoogleErrorMessage.aspx: - * popup-template-circle.html: - * popup-template-marker.html: - * popup-template-polygon.html: - * popup-template-polyline.html: - * popup-template-rectangle.html: - - * OAuth2.cs: - * CircleController.cs: - * AccountController.cs: Impacts htmldoc - - * PeopleApi.cs: - * GoogleController.cs: - * PaypalController.cs: Refactoring - - * Global.asax.cs: Dropped an useless url mapping - - * MarkdownHelper.cs: Package update - - * App.master: - * NoLogin.master: Site's favicon update - - * Circles.aspx: TO BE FIXED :-D - - * UserPost.aspx: Comment only when logged in - - * Web.csproj: Moves to Mono framework - - * instdbws.sql: Circle public - - * packages.config: package update - -2015-07-02 Paul Schneider - - * Web.csproj: - * Web.config: - * instdbws.sql: - * Web.config: - * Edit.aspx: - * YavscHelpers.cs: - * ThanksHelper.cs: - * Circles.aspx: - * BlogsController.cs: - * TitleNotFound.aspx: - * NotAuthorized.aspx: - * TexToPdfFormatter.cs: - * AccountController.cs: - * CircleController.cs: - -2015-06-28 Paul Schneider - - * AccountController.cs: Fixes the canonical login - - * App.master: Cleans the code - - * NoLogin.master: Fixes the canonical login (broken with last - master changes) - - * style.css: yet another footer style - - * UserPost.aspx: puts links in a "aside" block - -2015-06-26 Paul Schneider - - * Web.csproj: - * ThanksHelper.cs: - * YavscHelpers.cs: - * CalendarController.cs: - * FrontOfficeController.cs: refactoring - - * PaypalApiController.cs: adds a package reference to payPal - buttons - - * T.cs: xml doc - - * App.master: yet another thanks giving - - * style.css: Yet another impact on style sheet - - * Web.config: adds a circle provider section - - * packages.config: Adds PayPal Button manager package - reference - -2015-06-18 Paul Schneider - - * instdbws.sql: Creates a new table to store one time usage - passwords - - * AccountController.cs: Allows the questions and answer to be - specified for passw recovery - -2015-06-18 Paul Schneider - - * AccountController.cs: Register and reset passord from Web - API - - * GCMController.cs: initial creation, will host GCM calls and - related procedures. - - * ResetPassword.aspx: Html view to resetr the password - - * BlogsController.cs: - * CircleController.cs: - * WorkFlowController.cs: - * PaypalApiController.cs: - * FrontOfficeController.cs: refactoring - - * Web.config: - * Web.csproj: - * CalendarController.cs: - - * AccountController.cs: Adds the way to reset the password - - * Global.asax.cs: - * AdminController.cs: code formatting - - * FrontOfficeController.cs: xml doc - - * T.cs: Make this class an helper to translation - - * YavscHelpers.cs: Implements the e-mail sending - - * style.css: style uniformization - - * Circles.aspx: Implements the Html interface to Circle - creation (modifications and deletions are still to implement) - - * Register.ascx: Allows the error display in case of lack of - power of the user at registering another user. - - - * Estimate.aspx: use the partial view to register from the - Account folder. - Cleans the useless reference to ~/Theme/dark/style.css, that - was for using the "tablesorter.js", no used anymore. - - - * Web.config: Trying to have all the Index pages to work... - -2015-06-12 Paul Schneider - - * AccountController.cs: Code formatting - - * Web.csproj: cleanning - - * Web.config: Yavsc.Model.Circles in imported namespaces - - * Circles.aspx: Allow Circle view to handle null model - -2015-06-12 Paul Schneider - - * Web.csproj: - * Web.config: - * instdbws.sql: - * style.css: - * App.master: - * NoLogin.master: - * Login.aspx: - * Circles.aspx: - * AccountController.cs: - * WorkFlowController.cs: - -2015-06-11 Paul Schneider - - * App.master: g+1 feels better at right ... - - * style.css: smaller, but clearer - -2015-06-10 Paul Schneider - - * Estim.cs: - * BasketApiController.cs: - * CircleApiController.cs: - * CalendarApiController.cs: - * WorkFlowApiController.cs: - * FrontOfficeApiController.cs: - - * Web.csproj: refactoring - - * instdbws.sql: Foreign keys are cascading updates and - deletions - - * Estim.tt: User's profile does not contain anymore the main - e-mail address, it conflicts with registration informations, - it is not part of the profile data - -2015-06-10 Paul Schneider - - * CalendarController.cs: refactoring - - * CircleController.cs: implements with default circle provider - - * FrontOfficeController.cs: throws descriptive exception - message at searching for a catalog - - * Catalog.aspx: Fixes links on product categories - - * ProductCategory.aspx: Fixes links on products - -2015-06-09 Paul Schneider - - * Edit.aspx: A Page Title - - * style.css: space was needed - -2015-06-09 Paul Schneider - - * BlogsController.cs: - cleans unused code - - drops the server side "Preview" notion, made obsolete by - client side MarkdownDeep js - - * Edit.aspx: no more server side preview action - -2015-06-09 Paul Schneider - - * CircleController.cs: adds a Circle controller - - * NUnitTestClass.cs: xml doc - - * Web.config: - * Web.csproj: - * TestExec.cs: - * packages.config: - * TestByteA.cs: trying to use xUnit - -2015-06-07 Paul Schneider - - * CalendarController.cs: removes useless spaces - - * FrontOfficeApiController.cs: Makes the tex to pdf exceptions - available to the user interface, as part of the application - process. - Cleans the using clauses. - - * TexToPdfFormatter.cs: sets the filename as response header. - - * Web.csproj: a new FormatterException, thrown when exit code - of texi2pdf is not null - diff --git a/web/Controllers/BlogsController.cs b/web/Controllers/BlogsController.cs index d448f00c..6ce6d660 100644 --- a/web/Controllers/BlogsController.cs +++ b/web/Controllers/BlogsController.cs @@ -82,11 +82,10 @@ namespace Yavsc.Controllers /// Page size. public ActionResult BlogList (int pageIndex = 0, int pageSize = 10) { - ViewData ["SiteName"] = sitename; int totalRecords; var bs = BlogManager.LastPosts (pageIndex, pageSize, out totalRecords); - ViewData ["RecordCount"] = totalRecords; - ViewData ["pageSize"] = pageSize; + ViewData ["ResultCount"] = totalRecords; + ViewData ["PageSize"] = pageSize; ViewData ["PageIndex"] = pageIndex; return View ("Index", new BlogEntryCollection(bs) ); } diff --git a/web/Controllers/GoogleController.cs b/web/Controllers/GoogleController.cs index aa3b33a5..923c9b15 100644 --- a/web/Controllers/GoogleController.cs +++ b/web/Controllers/GoogleController.cs @@ -341,4 +341,4 @@ namespace Yavsc.Controllers return View (model); } } -} \ No newline at end of file +} diff --git a/web/Formatters/ErrorHtmlFormatter.cs b/web/Formatters/ErrorHtmlFormatter.cs index 8f823547..e8b4ddcd 100644 --- a/web/Formatters/ErrorHtmlFormatter.cs +++ b/web/Formatters/ErrorHtmlFormatter.cs @@ -29,6 +29,7 @@ using System.Web.Mvc; using System.Net; using MarkdownDeep; using Yavsc.Helpers; +using Yavsc.Model.Blogs; namespace Yavsc.Formatters { diff --git a/web/Helpers/YavscHelpers.cs b/web/Helpers/YavscHelpers.cs index d504ad86..b64e507b 100644 --- a/web/Helpers/YavscHelpers.cs +++ b/web/Helpers/YavscHelpers.cs @@ -171,10 +171,9 @@ namespace Yavsc.Helpers /// Username. public static string AvatarUrl (this HtmlHelper helper, string username) { ProfileBase pr = ProfileBase.Create (username); - var avpath = pr.GetPropertyValue("Avatar") ; - if (avpath != null) - return helper.Encode (avpath); - return "/avatars/" + helper.Encode(username)+".png"; + var a = pr.GetPropertyValue("Avatar") ; + if (a == null || a is DBNull) return "/avatars/" + helper.Encode(username)+".png"; + return helper.Encode ((string)a); } } } diff --git a/web/Views/Blogs/Index.aspx b/web/Views/Blogs/Index.aspx index c6190120..3877671c 100644 --- a/web/Views/Blogs/Index.aspx +++ b/web/Views/Blogs/Index.aspx @@ -10,7 +10,7 @@
<%= Html.ActionLink(p.Title, "UserPost", new { user = g.Key, title = p.Title }, new { @class = "usertitleref" } ) %> - +

<%= Html.Markdown(p.Intro,"/bfiles/"+p.Id+"/") %>

<% } %> <% } %> - -
- <% rp1.ResultCount = Model.Count; rp1.ResultsPerPage = 50; %> -<% rp1.CurrentPage = (int) ViewData["PageIndex"]; %> -<% rp1.None = Html.Translate("no content"); %> - + +<% rp1.ResultCount = (int) ViewData["ResultCount"]; + rp1.PageSize = (int) ViewData ["PageSize"]; + rp1.PageIndex = (int) ViewData["PageIndex"]; + rp1.None = Html.Translate("no content"); +%> + + Aucun résultat - - + diff --git a/web/Views/Blogs/UserPosts.aspx b/web/Views/Blogs/UserPosts.aspx index 06ee7413..73b20108 100644 --- a/web/Views/Blogs/UserPosts.aspx +++ b/web/Views/Blogs/UserPosts.aspx @@ -33,24 +33,23 @@ <%= Html.ActionLink("Editer","Edit", new { id = e.Id }, new { @class="actionlink" }) %> <%= Html.ActionLink("Supprimer","RemovePost", new { id = e.Id }, new { @class="actionlink" } ) %> <% } %> - + + + <% } %> - -
- <% +
- \ No newline at end of file + diff --git a/web/Web.csproj b/web/Web.csproj index e1aa0dd1..a497466d 100644 --- a/web/Web.csproj +++ b/web/Web.csproj @@ -188,7 +188,6 @@ - diff --git a/yavscModel/Blogs/BlogEntryCollection.cs b/yavscModel/Blogs/BlogEntryCollection.cs index 5d6fc5b3..e0306b59 100644 --- a/yavscModel/Blogs/BlogEntryCollection.cs +++ b/yavscModel/Blogs/BlogEntryCollection.cs @@ -56,15 +56,11 @@ namespace Yavsc.Model.Blogs { return this.Where (x => x.Title == title).ToArray (); } + /// - /// Post info. + /// Base post info. /// - public struct PostInfoByTitle { - - /// - /// The name of the user. - /// - public string Author; + public class BasePostInfo { /// /// The identifier. /// @@ -78,29 +74,32 @@ namespace Yavsc.Model.Blogs /// public DateTime Modified; + /// + /// The intro. + /// + public string Intro; } + /// - /// Post info by user. + /// Post info. /// - public struct PostInfoByUser { + public class PostInfoByTitle : BasePostInfo { /// /// The name of the user. /// - public string Title; - /// - /// The identifier. - /// - public long Id; - /// - /// The posted. - /// - public DateTime Posted; + public string Author; + + } + /// + /// Post info by user. + /// + public class PostInfoByUser : BasePostInfo { + /// - /// The modified. + /// The name of the user. /// - public DateTime Modified; - + public string Title; } /// @@ -108,11 +107,12 @@ namespace Yavsc.Model.Blogs /// public IEnumerable> GroupByTitle() { + bool truncated; return from be in this orderby be.Posted descending group new PostInfoByTitle { Author=be.Author, Id=be.Id, - Posted=be.Posted, Modified=be.Modified } + Posted=be.Posted, Modified=be.Modified, Intro = MarkdownHelper.MarkdownIntro(be.Content, out truncated) } by be.Title into titlegroup select titlegroup; @@ -123,11 +123,12 @@ namespace Yavsc.Model.Blogs /// The by user. public IEnumerable> GroupByUser() { + bool truncated; return from be in this orderby be.Posted descending group new PostInfoByUser { Title=be.Title, Id=be.Id, - Posted=be.Posted, Modified=be.Modified } + Posted=be.Posted, Modified=be.Modified, Intro = MarkdownHelper.MarkdownIntro(be.Content, out truncated) } by be.Author into usergroup select usergroup; diff --git a/web/Helpers/MarkdownHelper.cs b/yavscModel/Blogs/MarkdownHelper.cs similarity index 72% rename from web/Helpers/MarkdownHelper.cs rename to yavscModel/Blogs/MarkdownHelper.cs index 100a3dbe..422835ca 100644 --- a/web/Helpers/MarkdownHelper.cs +++ b/yavscModel/Blogs/MarkdownHelper.cs @@ -2,7 +2,7 @@ using System.Web.Mvc; using MarkdownDeep; -namespace Yavsc.Helpers +namespace Yavsc.Model.Blogs { /// /// Helper class for transforming Markdown. @@ -44,27 +44,47 @@ namespace Yavsc.Helpers return new MvcHtmlString(html); } - public static IHtmlString MarkdownToHtmlIntro(this HtmlHelper helper, out bool truncated, string text, string urlBaseLocation="") - { + public static string MarkdownIntro(string markdown, out bool truncated) { int maxLen = 250; - // Transform the supplied text (Markdown) into HTML. - var markdownTransformer = new Markdown(); - markdownTransformer.ExtraMode = true; - markdownTransformer.UrlBaseLocation = urlBaseLocation; - if (text.Length < maxLen) { + if (markdown.Length < maxLen) { truncated = false; - return new MvcHtmlString(markdownTransformer.Transform(text)); + return markdown; } - string intro = text.Remove (maxLen); + string intro = markdown.Remove (maxLen); truncated = true; int inl = intro.LastIndexOf ("\n"); if (inl > 20) intro = intro.Remove (inl); intro += " ..."; - - string html = markdownTransformer.Transform(intro); + return intro; + } + /// + /// Markdowns to html intro. + /// + /// The to html intro. + /// Truncated. + /// Text. + /// URL base location. + public static string MarkdownToHtmlIntro(out bool truncated, string text, string urlBaseLocation="") { + var md = MarkdownIntro(text, out truncated); + var markdownTransformer = new Markdown(); + markdownTransformer.ExtraMode = true; + markdownTransformer.UrlBaseLocation = urlBaseLocation; + string html = markdownTransformer.Transform(md); + return html; + } + /// + /// Markdowns to html intro. + /// + /// The to html intro. + /// Helper. + /// Truncated. + /// Text. + /// URL base location. + public static IHtmlString MarkdownToHtmlIntro(this HtmlHelper helper, out bool truncated, string text, string urlBaseLocation="") + { // Wrap the html in an MvcHtmlString otherwise it'll be HtmlEncoded and displayed to the user as HTML :( - return new MvcHtmlString(html); + return new MvcHtmlString(MarkdownToHtmlIntro (out truncated, text, urlBaseLocation)); } /// diff --git a/yavscModel/ChangeLog b/yavscModel/ChangeLog index c459a9b4..1de591d9 100644 --- a/yavscModel/ChangeLog +++ b/yavscModel/ChangeLog @@ -1,3 +1,11 @@ +2015-10-04 Paul Schneider + + * MarkdownHelper.cs: + * BlogEntryCollection.cs: refactoring + extract an intro from + Markdown for PostInfo* + + * YavscModel.csproj: MarkdownHelper integration + 2015-10-01 Paul Schneider * Profile.cs: refactoring diff --git a/yavscModel/YavscModel.csproj b/yavscModel/YavscModel.csproj index 925ec5f6..feb09ae1 100644 --- a/yavscModel/YavscModel.csproj +++ b/yavscModel/YavscModel.csproj @@ -41,6 +41,9 @@ + + ..\web\lib\MarkdownDeep.dll + @@ -167,6 +170,7 @@ +