Skip to content

Commit

Permalink
Dev Added missing template.js files and links to several templates
Browse files Browse the repository at this point in the history
Dev per feature request - http://ideas.limesurvey.org/ideatorrent/idea/104/

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@8446 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
Tony Partner committed Mar 1, 2010
1 parent 9aedba9 commit 92c9319
Show file tree
Hide file tree
Showing 11 changed files with 383 additions and 25 deletions.
4 changes: 3 additions & 1 deletion templates/basic/startpage.pstpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
<style type="text/css" media="aural tty">
progress-graph .zero, progress-graph .graph, progress-graph .cent { display: none; }
</style>
<link rel="shortcut icon" href="{TEMPLATEURL}favicon.ico" />

<script type="text/javascript" src="{TEMPLATEURL}template.js"></script>
<link rel="shortcut icon" href="{TEMPLATEURL}favicon.ico" />
</head>
<body>
<table width="80%" align="center" class="bf" cellpadding="0" cellspacing="11">
Expand Down
2 changes: 2 additions & 0 deletions templates/bluengrey/startpage.pstpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
<style type="text/css" media="aural tty">
progress-graph .zero, progress-graph .graph, progress-graph .cent { display: none; }
</style>

<script type="text/javascript" src="{TEMPLATEURL}template.js"></script>
<link rel="shortcut icon" href="{TEMPLATEURL}favicon.ico" />
</head>
<body>
Expand Down
6 changes: 4 additions & 2 deletions templates/business_grey/startpage.pstpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
<style type="text/css" media="aural tty">
progress-graph .zero, progress-graph .graph, progress-graph .cent { display: none; }
</style>
<link rel="shortcut icon" href="{TEMPLATEURL}favicon.ico" />
</head>

<script type="text/javascript" src="{TEMPLATEURL}template.js"></script>
<link rel="shortcut icon" href="{TEMPLATEURL}favicon.ico" />
</head>
<body>
<table width="500" align="center" style="border-collapse: collapse" bgcolor="#E1E1E1" border="4" cellspacing="0">
<tr>
Expand Down
26 changes: 14 additions & 12 deletions templates/clear_logo/startpage.pstpl
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@

<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />

<title>{SURVEYNAME} :: {GROUPNAME}</title>
<!-- The following line includes template.css and if an RTL-language is used template-rtl.css -->
{TEMPLATECSS}
<title>{SURVEYNAME} :: {GROUPNAME}</title>
<!-- The following line includes template.css and if an RTL-language is used template-rtl.css -->
{TEMPLATECSS}
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="{TEMPLATEURL}ie_fix_7.css" />
<link rel="stylesheet" type="text/css" href="{TEMPLATEURL}ie_fix_7.css" />
<![endif]-->
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="{TEMPLATEURL}ie_fix_6.css" />
<link rel="stylesheet" type="text/css" href="{TEMPLATEURL}ie_fix_6.css" />
<![endif]-->

<!-- The following CSS hides visual elements of the progress bar from screen readers. -->
<style type="text/css" media="aural tty">
progress-graph .zero, progress-graph .graph, progress-graph .cent { display: none; }
</style>
<link rel="shortcut icon" href="{TEMPLATEURL}favicon.ico" />
</head>
<body>
<style type="text/css" media="aural tty">
progress-graph .zero, progress-graph .graph, progress-graph .cent { display: none; }
</style>

<script type="text/javascript" src="{TEMPLATEURL}template.js"></script>
<link rel="shortcut icon" href="{TEMPLATEURL}favicon.ico" />
</head>
<body>

86 changes: 86 additions & 0 deletions templates/clear_logo/template.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/*
* 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();
})
**/



function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6.
{
var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])
if ((version >= 5.5) && (version<7) && (document.body.filters))
{
for(var i=0; i<document.images.length; i++)
{
var img = document.images[i]
var imgName = img.src.toUpperCase()
if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
{
var imgID = (img.id) ? "id='" + img.id + "' " : "";
var imgClass = (img.className) ? "class='" + img.className + "' " : "";
var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";
var imgStyle = "display:inline-block;" + img.style.cssText;
if (img.align == "left") imgStyle = "float:left;" + imgStyle;
if (img.align == "right") imgStyle = "float:right;" + imgStyle;
if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle;
var strNewHTML = "<span " + imgID + imgClass + imgTitle
+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+ "(src='" + img.src + "', sizingMethod='scale');\"></span>"
img.outerHTML = strNewHTML
i = i-1
}
}
}
}
18 changes: 10 additions & 8 deletions templates/eirenicon/startpage.pstpl
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@

<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title> {SURVEYNAME} </title>
<meta name="generator" content="LimeSurvey http://www.limesurvey.org" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title> {SURVEYNAME} </title>
<meta name="generator" content="LimeSurvey http://www.limesurvey.org" />

<!-- The following line includes template.css and if an RTL-language is used template-rtl.css -->
{TEMPLATECSS}
<!-- The following line includes template.css and if an RTL-language is used template-rtl.css -->
{TEMPLATECSS}
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="{TEMPLATEURL}ie_fix_7.css" />
<link rel="stylesheet" type="text/css" href="{TEMPLATEURL}ie_fix_7.css" />
<![endif]-->
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="{TEMPLATEURL}ie_fix_6.css" />
<link rel="stylesheet" type="text/css" href="{TEMPLATEURL}ie_fix_6.css" />
<![endif]-->

<!-- The following CSS hides visual elements of the progress bar from screen readers. -->
<style type="text/css" media="aural tty">
progress-graph .zero, progress-graph .graph, progress-graph .cent { display: none; }
</style>
<link rel="shortcut icon" href="{TEMPLATEURL}favicon.ico" />

<script type="text/javascript" src="{TEMPLATEURL}template.js"></script>
<link rel="shortcut icon" href="{TEMPLATEURL}favicon.ico" />
</head>

<body bgcolor="#C0C0C0">
Expand Down
86 changes: 86 additions & 0 deletions templates/eirenicon/template.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/*
* 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();
})
**/



function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6.
{
var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])
if ((version >= 5.5) && (version<7) && (document.body.filters))
{
for(var i=0; i<document.images.length; i++)
{
var img = document.images[i]
var imgName = img.src.toUpperCase()
if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
{
var imgID = (img.id) ? "id='" + img.id + "' " : "";
var imgClass = (img.className) ? "class='" + img.className + "' " : "";
var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";
var imgStyle = "display:inline-block;" + img.style.cssText;
if (img.align == "left") imgStyle = "float:left;" + imgStyle;
if (img.align == "right") imgStyle = "float:right;" + imgStyle;
if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle;
var strNewHTML = "<span " + imgID + imgClass + imgTitle
+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+ "(src='" + img.src + "', sizingMethod='scale');\"></span>"
img.outerHTML = strNewHTML
i = i-1
}
}
}
}
4 changes: 3 additions & 1 deletion templates/sherpa/startpage.pstpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
<style type="text/css" media="aural tty">
progress-graph .zero, progress-graph .graph, progress-graph .cent { display: none; }
</style>
<link rel="shortcut icon" href="{TEMPLATEURL}favicon.ico" />

<script type="text/javascript" src="{TEMPLATEURL}template.js"></script>
<link rel="shortcut icon" href="{TEMPLATEURL}favicon.ico" />
</head>
<body>

Expand Down
86 changes: 86 additions & 0 deletions templates/sherpa/template.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/*
* 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();
})
**/



function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6.
{
var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])
if ((version >= 5.5) && (version<7) && (document.body.filters))
{
for(var i=0; i<document.images.length; i++)
{
var img = document.images[i]
var imgName = img.src.toUpperCase()
if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
{
var imgID = (img.id) ? "id='" + img.id + "' " : "";
var imgClass = (img.className) ? "class='" + img.className + "' " : "";
var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";
var imgStyle = "display:inline-block;" + img.style.cssText;
if (img.align == "left") imgStyle = "float:left;" + imgStyle;
if (img.align == "right") imgStyle = "float:right;" + imgStyle;
if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle;
var strNewHTML = "<span " + imgID + imgClass + imgTitle
+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+ "(src='" + img.src + "', sizingMethod='scale');\"></span>"
img.outerHTML = strNewHTML
i = i-1
}
}
}
}
4 changes: 3 additions & 1 deletion templates/vallendar/startpage.pstpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
<style type="text/css" media="aural tty">
progress-graph .zero, progress-graph .graph, progress-graph .cent { display: none; }
</style>
<link rel="shortcut icon" href="{TEMPLATEURL}favicon.ico" />

<script type="text/javascript" src="{TEMPLATEURL}template.js"></script>
<link rel="shortcut icon" href="{TEMPLATEURL}favicon.ico" />
</head>
<body bgcolor="#C0C0C0">
<table width="75%" align="center" style="border-collapse: collapse;border-color:#333333" bgcolor="#EDEDED" border="1" cellspacing="0">
Expand Down

0 comments on commit 92c9319

Please sign in to comment.