bugfix: queetbox did not work with unlimited

This commit is contained in:
Hannes Mannerheim 2014-05-16 22:41:45 +02:00
parent a5c6ed7c26
commit a3d245edbc
2 changed files with 16 additions and 2 deletions

View File

@ -349,7 +349,7 @@ class QvitterAction extends ApiAction
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/lib/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/lib/jquery.minicolors.min.js"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/dom-functions.js?v=19"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/misc-functions.js?v=12"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/misc-functions.js?v=13"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/ajax-functions.js?v=7"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/lan.js?v=15"></script>
<script type="text/javascript" src="<?php print $qvitterpath; ?>js/qvitter.js?v=14"></script>

View File

@ -452,8 +452,11 @@ function qOrAmp(stream) {
· · · · · · · · · · · · · */
function countCharsInQueetBox(src,trgt,btn) {
if(window.textLimit > 0) {
var numchars = $.trim(src).length;
// limited
if(window.textLimit > 0) {
trgt.html(window.textLimit - numchars);
// activate/deactivare button
@ -484,6 +487,17 @@ function countCharsInQueetBox(src,trgt,btn) {
trgt.removeAttr('style');
}
}
// unlimited
else {
if(numchars > 0) {
btn.removeClass('disabled');
btn.addClass('enabled');
}
else {
btn.removeClass('enabled');
btn.addClass('disabled');
}
}
}