olivier.massot 7 роки тому
батько
коміт
f28ce47720

+ 1 - 1
CD67.FicheCollege.Entity/EntityModel.edmx.diagram

@@ -4,7 +4,7 @@
   <edmx:Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
     <!-- Diagram content (shape and connector positions) -->
     <edmx:Diagrams>
-      <Diagram DiagramId="86b727c7572a49c5b7e8139c8d489465" Name="Diagram1">
+      <Diagram DiagramId="86b727c7572a49c5b7e8139c8d489465" Name="Diagram1" ZoomLevel="97">
         <EntityTypeShape EntityType="CD67.FicheCollege.TypeCollege" Width="1.5" PointX="0.625" PointY="2.25" />
         <EntityTypeShape EntityType="CD67.FicheCollege.Territoire" Width="1.5" PointX="0.75" PointY="4.375" />
         <EntityTypeShape EntityType="CD67.FicheCollege.College" Width="1.75" PointX="3" PointY="2.625" />

+ 1 - 0
CD67.FicheCollege.Entity/Extend/ActionEduActeur.cs

@@ -28,6 +28,7 @@ namespace CD67.FicheCollege.Entity
         public string Sid { get; set; }
 
         [Required(ErrorMessage = "Obligatoire")]
+        [Display(Name = "Rôle")]
         public int RoleId { get; set; }
 
         public string Commentaire { get; set; }

+ 15 - 5
CD67.FicheCollege.MVC/Content/cd67-custom.less

@@ -15,11 +15,6 @@
     color: @color1;
 }
 
-.menu-button{
-    background: @color1;
-    border-color: @color1;
-}
-
 .input-group-addon{
     background-color: @color1;
     border-color: @color1;
@@ -38,6 +33,21 @@ legend {
     color: black;
 }
 
+.menu-hamburger {
+    color: @color1;
+    top: 7px;
+    left: 20px;
+    position: fixed;
+    cursor: pointer;
+    font-size: 3em;
+}
+
+.menu-hamburger:hover {
+    color: darken(@color1, 25%);
+}
+
+
+
 /* Fond de la sidebar */
 .color2 {
     color: #5a5555;

+ 0 - 62
CD67.FicheCollege.MVC/Content/cd67-model.less

@@ -124,50 +124,6 @@ label[for=recherche]{
    margin-left:30px;
 }
 
-.menu-button{
-    border: medium none;
-    color: transparent;
-    height: 50px;
-    padding: 0;
-    position: fixed;
-    text-indent: 2.5em;
-    width: 50px;
-    z-index: 101;
-    left: 15px;
-    border: 10px solid #DA1251;
-    top: 3px;
-    border-radius: 25px;
-    box-shadow: 0px 1px 4px 1px #cccccc;
-    cursor: pointer;
-}
-
-.menu-button:before, .menu-button:after, .menu-button span {
-    background: #fff none repeat scroll 0 0;
-}
-
-.menu-button span {
-    height: 3px;
-    left: 0;
-    overflow: hidden;
-    position: absolute;
-    text-indent: 200%;
-    transition: opacity 0.25s ease 0s;
-    width: 100%;
-    top: 15px;
-}
-
-.menu-button:before, .menu-button:after {
-    content: "";
-    height: 3px;
-    left: 0;
-    pointer-events: none;
-    position: absolute;
-    top: 50%;
-    transform-origin: 50% 50% 0;
-    transition: transform 0.25s ease 0s;
-    width: 100%;
-}
-
 .title::before{
     padding-right:15px;
     left:45px;
@@ -181,24 +137,6 @@ label[for=recherche]{
     padding : 15px 45px;
 }
 
-.menu-button:after {
-    transform: translate3d(0px, 10px, 0px) scale3d(1, 1, 1);
-}
-
-.menu-button:before {
-    transform: translate3d(0px, -10px, 0px) scale3d(1, 1, 1);
-}
-
-.menu-button--open span {
-    opacity: 0;
-}
-.menu-button--open:before {
-    transform: rotate3d(0, 0, 1, 45deg);
-}
-.menu-button--open:after {
-    transform: rotate3d(0, 0, 1, -45deg);
-}
-
 .navbar-login-session {
     padding: 10px;
     padding-bottom: 0px;

+ 43 - 3
CD67.FicheCollege.MVC/Views/ActionsEduActeurs/Create.cshtml

@@ -23,8 +23,16 @@
         <div class="form-group">
             @Html.LabelFor(model => actionEduActeur.Nom, htmlAttributes: new { @class = "control-label col-md-2" })
             <div class="col-md-10">
-                @Html.EditorFor(model => actionEduActeur.Nom, new { htmlAttributes = new { @class = "form-control" } })
+                <input id="actionEduActeur_nom" class="form-control picker" name="actionEduActeur.nom" data-picker="structure.description">
                 @Html.ValidationMessageFor(model => actionEduActeur.Nom, "", new { @class = "text-danger" })
+                <input id="actionEduActeur_Sid" name="actionEduActeur.Sid" class="picker" value="" data-picker="structure.id" type="hidden">
+                <div>
+                    <p>
+                        <a class="modal-window cboxElement" href="http://referentiel.bas-rhin.fr/picker/cd67/org67/" title="Selection structure (nouvelle fenetre)">
+                            Sélectionner un service ou une mission du CD67
+                        </a>
+                    </p>
+                </div>
             </div>
         </div>
 
@@ -45,9 +53,41 @@
         </div>
 
         <div class="form-group">
-            <div class="col-md-offset-2 col-md-10">
+            <span class="col-md-offset-2 col-md-4">
                 <input type="submit" value="Créer" class="btn btn-default" />
-            </div>
+            </span>
+            <span class="col-md-4">
+                <a href="@Url.Action("Details", "ActionsEdu", new { id = actionEduActeur.ActionEduId })">Annuler</a>
+            </span>
         </div>
     </div>
 }
+
+@section Scripts {
+    <script type="text/javascript">
+        $.event.special.inputchange = {
+            setup: function () {
+                var self = this, val;
+                $.data(this, 'timer', window.setInterval(function () {
+                    val = self.value;
+                    if ($.data(self, 'cache') != val) {
+                        $.data(self, 'cache', val);
+                        $(self).trigger('inputchange');
+                    }
+                }, 20));
+            },
+            teardown: function () {
+                window.clearInterval($.data(this, 'timer'));
+            },
+            add: function () {
+                $.data(this, 'cache', this.value);
+            }
+        };
+
+        $("#actionEduActeur_Sid").on('inputchange', function () {
+            $("#actionEduActeur_nom").prop("readonly", true);
+        });
+    </script>
+
+    @Scripts.Render("~/bundles/jqueryval")
+}

+ 2 - 2
CD67.FicheCollege.MVC/Views/ActionsEduActeurs/Details.cshtml

@@ -23,7 +23,7 @@
         }
     </legend>
     <dl class="dl-horizontal">
-        <dt>@Html.DisplayNameFor(model => actionEduActeur.ActionEduActeurRole.Libelle)</dt>
+        <dt>@Html.DisplayNameFor(model => actionEduActeur.RoleId)</dt>
         <dd>@Html.DisplayFor(model => actionEduActeur.ActionEduActeurRole.Libelle)</dd>
 
         <dt>@Html.DisplayNameFor(model => actionEduActeur.Commentaire)</dt>
@@ -32,4 +32,4 @@
 </fieldset>
 
 
-<a href="@Url.Action("Details", "ActionsEdu", new { id = actionEduActeur.ActionEdu.Id })">Retour à l'index</a>
+<a href="@Url.Action("Details", "ActionsEdu", new { id = actionEduActeur.ActionEdu.Id })">Retour à l'action</a>

+ 2 - 2
CD67.FicheCollege.MVC/Views/Shared/_Layout.cshtml

@@ -52,11 +52,11 @@
             <div id="topbar" class="navbar navbar-inner">
 
                 @* Logo menu déroulant *@
-                <div id="open-button" class="menu-button"><span>Menu</span></div>
+                <div id="open-button" class="menu-hamburger fa fa-bars"></div>
 
                 @* Titre et année en cours *@
                 <div id="titre" class="nav navbar">
-                    <h1 id="app-title">Fiches collège 
+                    <h1 id="app-title">Fiches Collèges
                         <a id="select-annee" href="/Annees">@Model.Annee_Lib <sup class="fa fa-edit sup"></sup></a>
                         <select name="yearpicker" id="yearpicker" data-default="@Model.Annee_Lib" style="display:none;">
                             @* Rempli en Ajax *@