Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed issue #05134: I cannot display question number and/or code
Dev Added {QUESTION_NUMBER} and {QUESTION_CODE} placeholders, change the default setting for "Show question number and/or code" from "Show question number only" to "Hide both" git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev@10051 b72ed6b6-b9f8-46b5-92b4-906544132732
- Loading branch information
Tony Partner
committed
May 10, 2011
1 parent
c141c1d
commit 8fd36cb
Showing
27 changed files
with
1,790 additions
and
1,840 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,50 @@ | ||
/* | ||
* LimeSurvey | ||
* Copyright (C) 2007 The LimeSurvey Project Team / Carsten Schmitz | ||
* All rights reserved. | ||
* License: GNU/GPL License v2 or later, see LICENSE.php | ||
* LimeSurvey is free software. This version may have been modified pursuant | ||
* to the GNU General Public License, and as distributed it includes or | ||
* is derivative of works licensed under the GNU General Public License or | ||
* other free or open source software licenses. | ||
* See COPYRIGHT.php for copyright notices and details. | ||
* | ||
* | ||
* Description: Javascript file for templates. Put JS-functions for your template here. | ||
* | ||
* | ||
* $Id:$ | ||
*/ | ||
|
||
|
||
/* | ||
* The function focusFirst puts the Focus on the first non-hidden element in the Survey. | ||
* | ||
* Normally this is the first input field (the first answer). | ||
*/ | ||
function focusFirst(Event) | ||
{ | ||
var i=0; | ||
// count up as long as the elements are hidden | ||
while(document.forms[0].elements[i].type == "hidden" && | ||
document.forms[0].elements[i].style.visibility == 'visible') | ||
{ | ||
i++; | ||
} | ||
// put focus on the element we just counted. | ||
if (document.forms[0].elements[i].type == "hidden" && | ||
document.forms[0].elements[i].style.visibility == 'visible') | ||
{ | ||
document.forms[0].elements[i].focus(); | ||
} | ||
return; | ||
} | ||
/* | ||
* The focusFirst function is added to the eventlistener, when the page is loaded. | ||
* | ||
* This can be used to start other functions on pageload as well. Just put it inside the 'ready' function block | ||
*/ | ||
|
||
/** Uncomment if you want to use the focusFirst function | ||
$(document).ready(function(){ | ||
focusFirst(); | ||
}) | ||
**/ | ||
|
||
|
||
|
||
/* | ||
* LimeSurvey | ||
* Copyright (C) 2007 The LimeSurvey Project Team / Carsten Schmitz | ||
* All rights reserved. | ||
* License: GNU/GPL License v2 or later, see LICENSE.php | ||
* LimeSurvey is free software. This version may have been modified pursuant | ||
* to the GNU General Public License, and as distributed it includes or | ||
* is derivative of works licensed under the GNU General Public License or | ||
* other free or open source software licenses. | ||
* See COPYRIGHT.php for copyright notices and details. | ||
* | ||
* | ||
* Description: Javascript file for templates. Put JS-functions for your template here. | ||
* | ||
* | ||
* $Id:$ | ||
*/ | ||
|
||
|
||
/* | ||
* The function focusFirst puts the Focus on the first non-hidden element in the Survey. | ||
* | ||
* Normally this is the first input field (the first answer). | ||
*/ | ||
function focusFirst(Event) | ||
{ | ||
$('#limesurvey :input:visible:enabled:first').focus(); | ||
} | ||
/* | ||
* The focusFirst function is added to the eventlistener, when the page is loaded. | ||
* | ||
* This can be used to start other functions on pageload as well. Just put it inside the 'ready' function block | ||
*/ | ||
|
||
/* Uncomment below if you want to use the focusFirst function */ | ||
/* | ||
$(document).ready(function(){ | ||
focusFirst(); | ||
}); | ||
*/ | ||
|
||
$(document).ready(function(){ | ||
// If the question code and number are hidden, hide any white space in the span(for dumb browsers) | ||
if($('.qnumcode').text().replace(/\s/g, '').length == 0) { | ||
$('.qnumcode').hide(); | ||
} | ||
}); | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,50 @@ | ||
/* | ||
* LimeSurvey | ||
* Copyright (C) 2007 The LimeSurvey Project Team / Carsten Schmitz | ||
* All rights reserved. | ||
* License: GNU/GPL License v2 or later, see LICENSE.php | ||
* LimeSurvey is free software. This version may have been modified pursuant | ||
* to the GNU General Public License, and as distributed it includes or | ||
* is derivative of works licensed under the GNU General Public License or | ||
* other free or open source software licenses. | ||
* See COPYRIGHT.php for copyright notices and details. | ||
* | ||
* | ||
* Description: Javascript file for templates. Put JS-functions for your template here. | ||
* | ||
* | ||
* $Id:$ | ||
*/ | ||
|
||
|
||
/* | ||
* The function focusFirst puts the Focus on the first non-hidden element in the Survey. | ||
* | ||
* Normally this is the first input field (the first answer). | ||
*/ | ||
function focusFirst(Event) | ||
{ | ||
var i=0; | ||
// count up as long as the elements are hidden | ||
while(document.forms[0].elements[i].type == "hidden" && | ||
document.forms[0].elements[i].style.visibility == 'visible') | ||
{ | ||
i++; | ||
} | ||
// put focus on the element we just counted. | ||
if (document.forms[0].elements[i].type == "hidden" && | ||
document.forms[0].elements[i].style.visibility == 'visible') | ||
{ | ||
document.forms[0].elements[i].focus(); | ||
} | ||
return; | ||
} | ||
/* | ||
* The focusFirst function is added to the eventlistener, when the page is loaded. | ||
* | ||
* This can be used to start other functions on pageload as well. Just put it inside the 'ready' function block | ||
*/ | ||
|
||
/** Uncomment if you want to use the focusFirst function | ||
$(document).ready(function(){ | ||
focusFirst(); | ||
}) | ||
**/ | ||
|
||
|
||
|
||
/* | ||
* LimeSurvey | ||
* Copyright (C) 2007 The LimeSurvey Project Team / Carsten Schmitz | ||
* All rights reserved. | ||
* License: GNU/GPL License v2 or later, see LICENSE.php | ||
* LimeSurvey is free software. This version may have been modified pursuant | ||
* to the GNU General Public License, and as distributed it includes or | ||
* is derivative of works licensed under the GNU General Public License or | ||
* other free or open source software licenses. | ||
* See COPYRIGHT.php for copyright notices and details. | ||
* | ||
* | ||
* Description: Javascript file for templates. Put JS-functions for your template here. | ||
* | ||
* | ||
* $Id:$ | ||
*/ | ||
|
||
|
||
/* | ||
* The function focusFirst puts the Focus on the first non-hidden element in the Survey. | ||
* | ||
* Normally this is the first input field (the first answer). | ||
*/ | ||
function focusFirst(Event) | ||
{ | ||
$('#limesurvey :input:visible:enabled:first').focus(); | ||
} | ||
/* | ||
* The focusFirst function is added to the eventlistener, when the page is loaded. | ||
* | ||
* This can be used to start other functions on pageload as well. Just put it inside the 'ready' function block | ||
*/ | ||
|
||
/* Uncomment below if you want to use the focusFirst function */ | ||
/* | ||
$(document).ready(function(){ | ||
focusFirst(); | ||
}); | ||
*/ | ||
|
||
$(document).ready(function(){ | ||
// If the question code and number are hidden, hide any white space in the span(for dumb browsers) | ||
if($('.qnumcode').text().replace(/\s/g, '').length == 0) { | ||
$('.qnumcode').hide(); | ||
} | ||
}); | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<div {QUESTION_ESSENTIALS} class="question-wrapper {QUESTION_CLASS}{QUESTION_MAN_CLASS}{QUESTION_INPUT_ERROR_CLASS}"> | ||
<div class="question-text"> | ||
<span class="asterisk">{QUESTION_MANDATORY}</span>{QUESTION_TEXT} | ||
</div> | ||
<div class="error-wrapper">{QUESTION_MAN_MESSAGE}{QUESTION_VALID_MESSAGE}</div> | ||
<div class="tip help">{QUESTION_HELP}</div> | ||
<div class="answers"> | ||
{ANSWER} | ||
</div> | ||
<div class="question-help"> | ||
{QUESTIONHELP} | ||
</div> | ||
</div> | ||
<div {QUESTION_ESSENTIALS} class="question-wrapper {QUESTION_CLASS}{QUESTION_MAN_CLASS}{QUESTION_INPUT_ERROR_CLASS}"> | ||
<div class="question-text"> | ||
<span class="asterisk">{QUESTION_MANDATORY}</span><span class="qnumcode">{QUESTION_NUMBER} {QUESTION_CODE} </span>{QUESTION_TEXT} | ||
</div> | ||
<div class="error-wrapper">{QUESTION_MAN_MESSAGE}{QUESTION_VALID_MESSAGE}</div> | ||
<div class="tip help">{QUESTION_HELP}</div> | ||
<div class="answers"> | ||
{ANSWER} | ||
</div> | ||
<div class="question-help"> | ||
{QUESTIONHELP} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.