Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dev: added "No Bootstrap" template, first step
- Loading branch information
LouisGac
committed
Oct 16, 2017
1 parent
99165bc
commit 3fbe61b
Showing
90 changed files
with
5,298 additions
and
8 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
body { | ||
font-family: arial, helvetica, sans-serif; | ||
font-size: 12pt; | ||
} | ||
h1,h2,h3,h4 { | ||
font-family: verdana, arial, helvetica, sans-serif; | ||
} | ||
* { | ||
page-break-after: auto; | ||
} | ||
.container{width:100%} | ||
@page{ | ||
margin: 1cm 1cm 2cm; | ||
} | ||
.question-wrapper { | ||
border: 0.1em solid #aaa; | ||
padding: 1em; | ||
margin: 1em 0.5em; | ||
clear: both; | ||
page-break-inside: avoid; | ||
page-break-before: auto; | ||
} | ||
.dir-ltr .question-code{margin-right:1em} | ||
.dir-rtl .question-code{margin-left:1em} | ||
.question-wrapper .h3{margin-top:0} | ||
.table-print-answers thead th{text-align:center;vertical-align:bottom} | ||
.table-print-answers tbody td{text-align:center;vertical-align:middle} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
.top-container { margin-top: 10px} |
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,150 @@ | ||
/* | ||
* LimeSurvey | ||
* Copyright (C) 2007-2016 The LimeSurvey Project Team / Carsten Schmitz | ||
* All rights reserved. | ||
* License: GNU/GPL License v3 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. | ||
* | ||
* | ||
*/ | ||
|
||
|
||
/** | ||
* 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(); | ||
} | ||
|
||
/** | ||
* Code included inside this will only run once the page Document Object Model (DOM) is ready for JavaScript code to execute | ||
* @see https://learn.jquery.com/using-jquery-core/document-ready/ | ||
*/ | ||
$(document).ready(function() | ||
{ | ||
/* Uncomment below if you want to use the focusFirst function */ | ||
//focusFirst(); | ||
/* Some function are launched in endpage.pstpl */ | ||
hideEmptyPart(); | ||
// If list of nav-bar action is empty: remove it (else .navbar-toggle is shown on small screen) // | ||
if(!$("#navbar li").length){ | ||
$("#navbar").remove(); | ||
$("[data-target='#navbar']").remove(); | ||
} | ||
// Scroll to first error | ||
if($(".input-error").length > 0) { | ||
$('#bootstrap-alert-box-modal').on('hidden.bs.modal', function () { | ||
$firstError = $(".input-error").first(); | ||
$pixToScroll = ( $firstError.offset().top - 100 ); | ||
$('html, body').animate({ | ||
scrollTop: $pixToScroll + 'px' | ||
}, 'fast'); | ||
}); | ||
} | ||
|
||
$('.language-changer').each(function(){ | ||
$that = $(this); | ||
if(!$.trim($that.children('div').html())) | ||
{ | ||
$that.hide(); | ||
} | ||
}); | ||
|
||
// Hide the menu buttons at the end of the Survey | ||
if($(".hidemenubutton").length>0) | ||
{ | ||
$('.navbar-right').hide(); | ||
} | ||
|
||
// Survey list footer | ||
if($('#surveyListFooter').length>0) | ||
{ | ||
$surveyListFooter = $('#surveyListFooter'); | ||
$('#outerframeContainer').after($surveyListFooter); | ||
} | ||
|
||
$(function () { | ||
$('[data-toggle="tooltip"]').tooltip() | ||
}) | ||
}); | ||
/** | ||
* Code included inside this will run each time windows is resized | ||
* @see https://api.jquery.com/resize/ | ||
*/ | ||
$(window).resize(function () { | ||
fixBodyPadding(); | ||
}); | ||
|
||
/** | ||
* Replace all existing alert default javascript function | ||
*/ | ||
//~ window.alert = function(message, title) { | ||
//~ $(function() { | ||
//~ $("#bootstrap-alert-box-modal .modal-header .h4").text(title || ""); | ||
//~ $("#bootstrap-alert-box-modal .modal-body").html("<p>"+message+"</p>" || ""); | ||
//~ $("#bootstrap-alert-box-modal").modal('show'); | ||
//~ }); | ||
//~ }; | ||
|
||
|
||
/** | ||
* fix padding of body according to navbar-fixed-top | ||
* in endpage and in $(window).resize | ||
*/ | ||
function fixBodyPadding(){ | ||
/* The 60 px is fixed in template.css */ | ||
$("body").css("padding-top",$(".navbar-fixed-top").height()+"px") | ||
} | ||
/** | ||
* Set suffix/prefix clone for little screen (at top) | ||
*/ | ||
function sliderSuffixClone(){ | ||
$(".numeric-multi .slider-item .slider-right").each(function(){ | ||
if($(this).closest(".slider-item").find(".slider-left").length){ | ||
var colWidth="6"; | ||
}else{ | ||
var colWidth="12"; | ||
} | ||
$(this).clone().removeClass("col-xs-12").addClass("visible-xs-block col-xs-"+colWidth).prop("aria-hidden",true).insertBefore($(this).prev(".slider-container")); | ||
$(this).addClass("hidden-xs"); | ||
$(this).closest(".slider-item").find(".slider-left").removeClass("col-xs-12").addClass("col-xs-6"); | ||
}); | ||
} | ||
|
||
/** | ||
* Hide some part if empty | ||
* Some can be needed if contain only js | ||
* Some are not really needed : little margin only is shown | ||
*/ | ||
function hideEmptyPart() | ||
{ | ||
$(".question-help-container").each(function(){ | ||
if($(this).text().trim()==""){/* Only if have only script tag inside or empty tag */ | ||
$(this).addClass("hidden"); | ||
} | ||
}); | ||
$(".group-description").each(function(){ | ||
if($(this).text().trim()==""){/* Only if have only script tag inside or empty tag */ | ||
$(this).addClass("hidden"); | ||
} | ||
}); | ||
$(".question-help-container.hidden").on("html:updated",function(){ | ||
if($(this).text().trim()!=""){ | ||
$(this).removeClass("hidden"); | ||
} | ||
}); | ||
$(".question-help-container").on("html:updated",function(){ // .question-help-container:not(.hidden) don't work ? | ||
if($(this).text().trim()==""){ | ||
$(this).addClass("hidden"); | ||
} | ||
}); | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{# | ||
LimeSurvey | ||
Copyright (C) 2007-2017 The LimeSurvey Project Team / Louis Gac | ||
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. | ||
(¯`·._.·(¯`·._.· Clear All Layout ·._.·´¯)·._.·´¯) | ||
This file displays the page shown to a respondent when they have cleared the survey (only show "Restart this survey") | ||
NOTE: It probably doesn't need to be a separated layout. | ||
#} | ||
|
||
{# Call the global layout #} | ||
{% extends "./layout_global.twig" %} | ||
|
||
{# Replace the content block #} | ||
{% block content %} | ||
<div class='{{ aSurveyInfo.class.clearall }}'> | ||
<div class=" {{ aSurveyInfo.class.clearalldiv }} "> | ||
<a href="{{ aSurveyInfo.surveyUrl }}" class="{{ aSurveyInfo.class.clearalla }}">{{ "Restart this Survey" | t}}</a> | ||
</div> | ||
</div> | ||
{% endblock %} |
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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{# | ||
LimeSurvey | ||
Copyright (C) 2007-2017 The LimeSurvey Project Team / Louis Gac | ||
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. | ||
(¯`·._.·(¯`·._.· Default Template Errors Layout ·._.·´¯)·._.·´¯) | ||
This layout is used to render errors that block survey rendering. | ||
Eg: wrong survey id, empty group in preview group, etc. | ||
It has no obligation to be the same layout as layout.twig, it can be completly different. | ||
NOTE: the main purpose of this file is to show how different the layouts can be. This one has a completely different design. | ||
To see it: just try to preview a survey with an empty group. | ||
#} | ||
{% set aError = aSurveyInfo.aError %} | ||
|
||
<!DOCTYPE html> | ||
<html lang="{{ aSurveyInfo.languagecode }}" dir="{{ aSurveyInfo.dir }}" class="{{ aSurveyInfo.languagecode }} dir-{{ aSurveyInfo.dir }} {{ aSurveyInfo.class.html }}"> | ||
|
||
<head> | ||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
|
||
<title> | ||
ERROR! {{ aSurveyInfo.surveyls_title }} | ||
</title> | ||
|
||
{# | ||
NOTE: YES, it's very bad to do it here. It a first cycle. I'll see what to do once I'll done all those kind of error page | ||
TODO: move it to a separated css file | ||
#} | ||
<meta name="generator" content="LimeSurvey http://www.limesurvey.org" /> | ||
<link rel="shortcut icon" href="{{ templateurl }}favicon.ico" /> | ||
</head> | ||
|
||
<body class="{{ aSurveyInfo.class.body }} lang-{{surveylanguage}} {{surveyformat}}" marginwidth="0" marginheight="0" {{ aSurveyInfo.attr.body }}> | ||
<div id="block_error"> | ||
<div> | ||
<h2>{{ aError.title }}</h2> | ||
<p> | ||
{{ aError.message }} | ||
</p> | ||
<p> | ||
{{"For further information please contact"| t }} {{ aSurveyInfo.adminname }}:<br> | ||
<a href='mailto:{{ aSurveyInfo.adminemail }}'>{{ aSurveyInfo.adminemail }}</a> | ||
</p> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.