Changeset:
        9b016fa1083d
        
https://sourceforge.net/p/mrbs/hg-code/ci/9b016fa1083d334744c1b803f481cb7b35e2e26f
Author:
        Campbell Morrison <[email protected]>
Date:
        Thu Mar 09 13:12:59 2017 +0000
Log message:

Moved checkmark and cross on booking form out of HTML and into CSS.

diffstat:

 web/css/mrbs-ielte8.css  |  16 ++++++++++++++--
 web/css/mrbs.css.php     |  12 ++++++++++--
 web/edit_entry.php       |   7 ++-----
 web/js/edit_entry.js.php |  10 ++++------
 4 files changed, 30 insertions(+), 15 deletions(-)

diffs (112 lines):

diff -r 7f24e8633cd0 -r 9b016fa1083d web/css/mrbs-ielte8.css
--- a/web/css/mrbs-ielte8.css   Tue Mar 07 17:32:17 2017 +0000
+++ b/web/css/mrbs-ielte8.css   Thu Mar 09 13:12:59 2017 +0000
@@ -11,7 +11,7 @@
 
 [lang="fr"] label:after,
 [lang="fr"] .list td:first-child:after  {
-  content: '\0000a0:';  <?php // &nbsp; before the colon ?>
+  content: '\0000a0:';  /* &nbsp; before the colon */
 }
 
 label.no_suffix:after {
@@ -26,7 +26,19 @@
   content: '\0000a0>>';
 }
 
-.awaiting_approval a:before {content: "? "}
+.awaiting_approval a:before {
+  content: '? ';
+}
+
+div.good:after {
+  content: '\002714';  /* checkmark */
+  color: green;
+}
+
+div.bad:after {
+  content: '\002718';  /* cross */
+  color: red;
+}
 
 
 /* ------------ PRIVATE BOOKINGS ---------------------------*/
diff -r 7f24e8633cd0 -r 9b016fa1083d web/css/mrbs.css.php
--- a/web/css/mrbs.css.php      Tue Mar 07 17:32:17 2017 +0000
+++ b/web/css/mrbs.css.php      Thu Mar 09 13:12:59 2017 +0000
@@ -861,8 +861,16 @@
 
 div#conflict_check, div#policy_check {float: left; clear: none; width: 2em; 
padding: 1em 0.5em; cursor: pointer}
 div#conflict_check {margin-left: 3em}
-div.good {color: green}
-div.bad {color: red}
+
+div.good::after {
+  content: '\002714';  <?php // checkmark ?>
+  color: green;
+}
+
+div.bad::after {
+  content: '\002718';  <?php // cross ?>
+  color: red;
+}
 
 .form_general table {border-collapse: collapse}
 .form_general table, .form_general tr, .form_general th, .form_general td 
{padding: 0; margin: 0; border: 0}
diff -r 7f24e8633cd0 -r 9b016fa1083d web/edit_entry.php
--- a/web/edit_entry.php        Tue Mar 07 17:32:17 2017 +0000
+++ b/web/edit_entry.php        Thu Mar 09 13:12:59 2017 +0000
@@ -1435,11 +1435,8 @@
     echo "</div>\n";
     
     // divs to hold the results of the Ajax checking of the booking
-    echo "<div id=\"conflict_check\">\n";
-    echo "</div>\n";
-    
-    echo "<div id=\"policy_check\">\n";
-    echo "</div>\n";
+    echo "<div id=\"conflict_check\"></div>\n";
+    echo "<div id=\"policy_check\"></div>\n";
     
     echo "</fieldset>";
     
diff -r 7f24e8633cd0 -r 9b016fa1083d web/js/edit_entry.js.php
--- a/web/js/edit_entry.js.php  Tue Mar 07 17:32:17 2017 +0000
+++ b/web/js/edit_entry.js.php  Thu Mar 09 13:12:59 2017 +0000
@@ -600,18 +600,16 @@
             var conflictDiv = $('#conflict_check');
             var scheduleDetails = $('#schedule_details');
             var policyDetails = $('#policy_details');
-            var checkMark = "\u2714";
-            var cross = "\u2718";
             var titleText, detailsHTML;
             if (result.conflicts.length === 0)
             {
-              conflictDiv.text(checkMark).attr('class', 'good');
+              conflictDiv.attr('class', 'good');
               titleText = '<?php echo 
escape_js(mrbs_entity_decode(get_vocab("no_conflicts"))) ?>';
               detailsHTML = titleText;
             }
             else
             {
-              conflictDiv.text(cross).attr('class', 'bad');
+              conflictDiv.attr('class', 'bad');
               detailsHTML = "<p>";
               titleText = '<?php echo 
escape_js(mrbs_entity_decode(get_vocab("conflict"))) ?>' + ":  \n\n";
               detailsHTML += titleText + "<\/p>";
@@ -624,13 +622,13 @@
             var policyDiv = $('#policy_check');
             if (result.rules_broken.length === 0)
             {
-              policyDiv.text(checkMark).attr('class', 'good');
+              policyDiv.attr('class', 'good');
               titleText = '<?php echo 
escape_js(mrbs_entity_decode(get_vocab("no_rules_broken"))) ?>';
               detailsHTML = titleText;
             }
             else
             {
-              policyDiv.text(cross).attr('class', 'bad');
+              policyDiv.attr('class', 'bad');
               detailsHTML = "<p>";
               titleText = '<?php echo 
escape_js(mrbs_entity_decode(get_vocab("rules_broken"))) ?>' + ":  \n\n";
               detailsHTML += titleText + "<\/p>";

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to