[Ils-source] r1349 - trunk/webapp
scribe at crosswire.org
scribe at crosswire.org
Wed Sep 30 11:29:38 MST 2015
Author: scribe
Date: 2015-09-30 11:29:38 -0700 (Wed, 30 Sep 2015)
New Revision: 1349
Modified:
trunk/webapp/admin_coursenew.jsp
Log:
added red warning when Course Description text is within 100 characters of limit. PCR ILS-11
Modified: trunk/webapp/admin_coursenew.jsp
===================================================================
--- trunk/webapp/admin_coursenew.jsp 2015-08-24 22:57:19 UTC (rev 1348)
+++ trunk/webapp/admin_coursenew.jsp 2015-09-30 18:29:38 UTC (rev 1349)
@@ -232,6 +232,15 @@
<script type="text/javascript" src="crosswire.js"></script>
<link href="lms_style.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="js/jquery/jquery.min.js"></script>
+
+<style>
+
+.almostFull {
+ color : red;
+}
+
+</style>
+
<script type="text/javascript" language="JavaScript">
//<!--
function rD(val) {
@@ -249,9 +258,12 @@
}
function updateRemainingDescription() {
+ var limit = 500;
var d = $('#courseDescription').val();
- if (d.length > 500) { d = d.substring(0,500); $('#courseDescription').val(d); }
- $('#remainingDescription').html((500-d.length) + ' Remaining ');
+ if (d.length > limit) { d = d.substring(0,limit); $('#courseDescription').val(d); }
+ if (d.length >= (limit-100)) $('#remainingDescription').addClass('almostFull');
+ else $('#remainingDescription').removeClass('almostFull');
+ $('#remainingDescription').html((limit-d.length) + ' Remaining ');
}
$(document).ready(function() {
More information about the Ils-source
mailing list