From: Michal Malý Date: Fri, 19 Dec 2014 02:11:08 +0000 (+0100) Subject: Add placeholder "hidden_image" class and use it in titration curve suite X-Git-Url: https://gitweb.devoid-pointer.net/?a=commitdiff_plain;h=72125c6f6ceef91668854e0b443fde8028b90e20;p=Nine-Q.git Add placeholder "hidden_image" class and use it in titration curve suite --- diff --git a/bin/styles/main.css b/bin/styles/main.css index fd04cae..3ff308f 100644 --- a/bin/styles/main.css +++ b/bin/styles/main.css @@ -206,6 +206,10 @@ img.expand_section { -webkit-border-radius: 4px; } +img.hidden_image { + display: hidden; +} + img.math_formula { height: 32px; width: auto; diff --git a/bin/templates/titration_curve_answer_section.html b/bin/templates/titration_curve_answer_section.html index 9ada318..d87ff07 100644 --- a/bin/templates/titration_curve_answer_section.html +++ b/bin/templates/titration_curve_answer_section.html @@ -1,5 +1,5 @@
Odpověď:
@_ANSWER_MESSAGE_@
- +
diff --git a/src/face_generators/face_generator.adb b/src/face_generators/face_generator.adb index 6c2ee1d..29bef21 100644 --- a/src/face_generators/face_generator.adb +++ b/src/face_generators/face_generator.adb @@ -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 => diff --git a/src/problem_generators/problem_generator_syswides.ads b/src/problem_generators/problem_generator_syswides.ads index 002a908..42b8dbd 100644 --- a/src/problem_generators/problem_generator_syswides.ads +++ b/src/problem_generators/problem_generator_syswides.ads @@ -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";