Problem with Citronade Template

More
3 years 10 months ago - 3 years 10 months ago #102444 by dweisser
dweisser created the topic: Problem with Citronade Template
Hi Lime Team,
I copied the template Citronade with the intent to alter it for use. It's a great mobile-friendly template and I have successfully added many style updates to the CSS as well as the tempate.js.

The survey allows the previous button to be shown.
Unfortunately, if it seems that if I alter the Welcome Page - at all - no matter how insignificant the change - the previous button vanishes. If I undo the change, the previous button does not come back.

I found this post that I hoped would solve my problem, but alas - it did not. The post suggests that replacing this line in startpage.pstpl:
<script type='text/javascript'>/*<![CDATA[*/(function(H){ H.className=H.className.replace(/bno-jsb/,'js') })(document.getElementsByTagName('body')[0]);/*]]>*/</script>

With this:
<script type='text/javascript'>/*<![CDATA[*/(function(H){ H.className=H.className.replace(/\bno-js\b/,'js') })(document.getElementsByTagName('body')[0]);/*]]>*/</script>

will solve the problem. However, this is the way the template ships - with the "replacement" line above. As soon as I save the template - even if I make no changes at all - that line of script changes to reflect the corrupted line of code.

So, no matter what change I make, that broken line of code persists.

I've cleared cache a hundred times. Is this a bug in the template? What would cause that line to be changed when the template is saved? Does anyone have a possible explanation for this behavior?

Any and all comments would be helpful in tracking this down.
Thank you,
David
Attachments:
Last Edit: 3 years 10 months ago by dweisser. Reason: More information

Please Log in to join the conversation.

More
3 years 10 months ago #102465 by DenisChenu
DenisChenu replied the topic: Problem with Citronade Template
Hi,

What is your exact version of LimeSurvey ?
Because old citronade are updated for 2.05 but 2.00 included citronade is OK.
I make a test (adding UPDATED to the header title) and no problem here: 200.sondages.pro/survey/index/sid/10000/newtest/Y/lang/fr

Denis
PS: you can remove this line but then update the no-js class to js only class. It's a know system to have different page betwwen js and no-js, insipration by Paul Irish : www.paulirish.com/2009/avoiding-the-fouc-v3/

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
3 years 10 months ago - 3 years 10 months ago #102477 by dweisser
dweisser replied the topic: Problem with Citronade Template
Thank you Denis -

I am running
Version 2.00+ Build 131107.

There is an update available...I will hit that now and report.

So I updated to:
Version 2.00+ Build 131206

And my previous button still disappears. I will delete that line and see what happens...and report.

So I deleted that line, cleared cache...and my previous button is still gone. Absolutely maddening.

Would you be able to export your template for me as a replacement for mine?
Last Edit: 3 years 10 months ago by dweisser.

Please Log in to join the conversation.

More
3 years 10 months ago #102487 by DenisChenu
DenisChenu replied the topic: Problem with Citronade Template
Attention :

In LS 2.0 the previous button can be used ONLY with javascript.

This line is here to detect if user have javascript activated on his computer. Then for user without js : previous is not view.

And look whith FTP on your file : some server remove/update line with <script> inside

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
3 years 10 months ago #102530 by dweisser
dweisser replied the topic: Problem with Citronade Template
This "update" of that line is EXACTLY what is happening to me.
I'm on a a linux Server hosted at GoDaddy. Any thoughts on how to stop that from happening?
David

Please Log in to join the conversation.

More
3 years 10 months ago #102558 by DenisChenu
DenisChenu replied the topic: Problem with Citronade Template

dweisser wrote: Any thoughts on how to stop that from happening?

No,

We can not adapt this .

You need to contact your hoster.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
3 years 10 months ago #102745 by dweisser
dweisser replied the topic: Problem with Citronade Template
So I solved this.

I found that when I used the template editor, that line of code changes upon save.
However, when I simply ftp my template changes to the server, that line remains in tact and all is well.

Question:
When I include this in my template.js:

/*
$(document).ready(function()
{
document.getElementById("answer856216X180X1271").disabled=true;
}
)
/*

The Progress Bar stops working. Any thoughts on why - seems really random.

Please Log in to join the conversation.

More
3 years 10 months ago #102746 by DenisChenu
DenisChenu replied the topic: Problem with Citronade Template
Use jquery,

And here i think there are more comment than needed ;)
$(document).ready(function()
{
$("#answer856216X180X1271").attr('disabled','disabled');
});
PS , you already have a ready funcion in template.js.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
3 years 10 months ago #102752 by dweisser
dweisser replied the topic: Problem with Citronade Template
Thank you Denis -
I realized last night (in my sleep) that this must be due to a simple syntax error.

I did this:
$(document).ready(function() {
if($('#answer856216X180X1271').length > 0) {
document.getElementById("answer856216X180X1271").disabled=true;
};
});

And it worked. But your solution is better.
Thanks for all you do.
Happy holidays,
David

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now