]> Devoid-pointer.net GitWeb - Nine-Q.git/commitdiff
Add placeholder "hidden_image" class and use it in titration curve suite
authorMichal Malý <madcatxster@devoid-pointer.net>
Fri, 19 Dec 2014 02:11:08 +0000 (03:11 +0100)
committerMichal Malý <madcatxster@devoid-pointer.net>
Fri, 19 Dec 2014 02:11:08 +0000 (03:11 +0100)
bin/styles/main.css
bin/templates/titration_curve_answer_section.html
src/face_generators/face_generator.adb
src/problem_generators/problem_generator_syswides.ads

index fd04caec9da1d2541f08b8986bb2a441c0a6ca91..3ff308ff618bac4b9df09c54df8cd323f0680310 100644 (file)
@@ -206,6 +206,10 @@ img.expand_section {
   -webkit-border-radius: 4px;
 }
 
+img.hidden_image {
+  display: hidden;
+}
+
 img.math_formula {
   height: 32px;
   width: auto;
index 9ada318287fa74310a9e84d80214fb86bd9513fc..d87ff071080919336deae203815f306831706557 100644 (file)
@@ -1,5 +1,5 @@
   <div class="backgrounded_block">
     <div class="caption_v1">Odpověď:</div>
     <div class="@_ANSWER_KIND_@">@_ANSWER_MESSAGE_@</div>
-    <img class="titration_curve_image" src="@_TITRATION_CURVE_IMAGE_PATH_@" />
+    <img class="@_TITRATION_CURVE_IMAGE_CLASS_@" src="@_TITRATION_CURVE_IMAGE_PATH_@" />
   </div>
index 6c2ee1d29c46ee3c125bfc178322dc6597731e6d..29bef218a87612d1a2f81ffdbc40eac206ab259a 100644 (file)
@@ -542,12 +542,14 @@ package body Face_Generator is
        Insert(Translations_Answer, Assoc(ANSWER_KIND_KEY, ANSWER_KIND_GOOD));
        Insert(Translations_Answer, Assoc(ANSWER_MESSAGE_KEY, UB_Text_To_Fixed_String(Answer_Message)));
        Insert(Translations_Answer, Assoc(Titration_Curve_Suite.TITRATION_CURVE_IMAGE_PATH_KEY, Assignment.Element(Titration_Curve_Suite.TITRATION_CURVE_IMAGE_PATH_KEY)));
+       Insert(Translations_Answer, Assoc(Titration_Curve_Suite.TITRATION_CURVE_IMAGE_CLASS_KEY, Titration_Curve_Suite.TITRATION_CURVE_IMAGE_CLASS_NORM));
        Temp := Parse(Filename => "templates/titration_curve_answer_section.html", Translations => Translations_Answer);
        Insert(Translations, Assoc(ANSWER_SECTION_KEY, HTML_To_Fixed_String(Temp)));
       when Wrong_Answer | Malformed_Answer =>
        Insert(Translations_Answer, Assoc(ANSWER_KIND_KEY, ANSWER_KIND_BAD));
        Insert(Translations_Answer, Assoc(ANSWER_MESSAGE_KEY, UB_Text_To_Fixed_String(Answer_Message)));
        Insert(Translations_Answer, Assoc(Titration_Curve_Suite.TITRATION_CURVE_IMAGE_PATH_KEY, "/resources/noimage.png"));
+       Insert(Translations_Answer, Assoc(Titration_Curve_Suite.TITRATION_CURVE_IMAGE_CLASS_KEY, Titration_Curve_Suite.TITRATION_CURVE_IMAGE_CLASS_NODISP));
        Temp := Parse(Filename => "templates/titration_curve_answer_section.html", Translations => Translations_Answer);
        Insert(Translations, Assoc(ANSWER_SECTION_KEY, HTML_To_Fixed_String(Temp)));
       when others =>
index 002a9089f9bd27859262ea0dc8042395e0328631..42b8dbd48e4428423fc278a34011c8e3e8d84591 100644 (file)
@@ -150,6 +150,9 @@ package Problem_Generator_Syswides is
     ANSWER_PH_OVER_SECOND_EQUIV_KEY: constant String := "ANSWER_PH_OVER_SECOND_EQUIV";
     ANSWER_VOLUME_OVER_SECOND_EQUIV_KEY: constant String := "ANSWER_VOLUME_OVER_SECOND_EQUIV";
     --
+    TITRATION_CURVE_IMAGE_CLASS_KEY: constant String := "TITRATION_CURVE_IMAGE_CLASS";
+      TITRATION_CURVE_IMAGE_CLASS_NODISP: constant String := "hidden_image";
+      TITRATION_CURVE_IMAGE_CLASS_NORM: constant String := "titration_curve_image";
     TITRATION_CURVE_IMAGE_PATH_KEY: constant String := "TITRATION_CURVE_IMAGE_PATH";