Welcome, Guest
Username: Password: Remember me

TOPIC: Problem with Citronade Template

Problem with Citronade Template 11 months 1 week ago #102444

  • dweisser
  • dweisser's Avatar
  • OFFLINE
  • Bronze Donor
  • Posts: 205
  • Thank you received: 5
  • Karma: 5
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: 11 months 1 week ago by dweisser. Reason: More information
The administrator has disabled public write access.

Problem with Citronade Template 11 months 1 week ago #102465

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6551
  • Thank you received: 869
  • Karma: 257
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/
The administrator has disabled public write access.

Problem with Citronade Template 11 months 1 week ago #102477

  • dweisser
  • dweisser's Avatar
  • OFFLINE
  • Bronze Donor
  • Posts: 205
  • Thank you received: 5
  • Karma: 5
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: 11 months 1 week ago by dweisser.
The administrator has disabled public write access.

Problem with Citronade Template 11 months 1 week ago #102487

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6551
  • Thank you received: 869
  • Karma: 257
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
The administrator has disabled public write access.

Problem with Citronade Template 11 months 1 week ago #102530

  • dweisser
  • dweisser's Avatar
  • OFFLINE
  • Bronze Donor
  • Posts: 205
  • Thank you received: 5
  • Karma: 5
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
The administrator has disabled public write access.

Problem with Citronade Template 11 months 1 week ago #102558

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6551
  • Thank you received: 869
  • Karma: 257
dweisser wrote:
Any thoughts on how to stop that from happening?
No,

We can not adapt this .

You need to contact your hoster.

Denis
The administrator has disabled public write access.

Problem with Citronade Template 11 months 3 days ago #102745

  • dweisser
  • dweisser's Avatar
  • OFFLINE
  • Bronze Donor
  • Posts: 205
  • Thank you received: 5
  • Karma: 5
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.
The administrator has disabled public write access.

Problem with Citronade Template 11 months 3 days ago #102746

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6551
  • Thank you received: 869
  • Karma: 257
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.
The administrator has disabled public write access.

Problem with Citronade Template 11 months 2 days ago #102752

  • dweisser
  • dweisser's Avatar
  • OFFLINE
  • Bronze Donor
  • Posts: 205
  • Thank you received: 5
  • Karma: 5
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
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.167 seconds
Donation Image