Skip to content

Commit

Permalink
Dev Survey mainbar is now using a jQuery carousel - Feedback please
Browse files Browse the repository at this point in the history
Dev Changed admin notification feature so it can be used to set freely email addresses - please re-install DB

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev@9391 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Nov 2, 2010
1 parent b440aee commit 30e5fc9
Show file tree
Hide file tree
Showing 18 changed files with 259 additions and 288 deletions.
2 changes: 0 additions & 2 deletions admin/conditionshandling.php
Expand Up @@ -1907,8 +1907,6 @@
$js_admin_includes[]= $rooturl.'/scripts/jquery/lime-conditions-tabs.js';
$js_admin_includes[]= $rooturl.'/scripts/jquery/jquery-ui.js';

// $css_admin_includes[]= $homeurl."/styles/default/jquery-ui-tibo.css";

if ($subaction == "editthiscondition" && isset($p_cid))
{
$submitLabel = $clang->gT("Update condition");
Expand Down
4 changes: 2 additions & 2 deletions admin/database.php
Expand Up @@ -1068,7 +1068,6 @@ function get_max_question_order($gid)
'refurl'=>$_POST['refurl'],
'publicgraphs'=>$_POST['publicgraphs'],
'usecookie'=>$_POST['usecookie'],
'notification'=>$_POST['notification'],
'allowregister'=>$_POST['allowregister'],
'allowsave'=>$_POST['allowsave'],
'printanswers'=>$_POST['printanswers'],
Expand All @@ -1084,7 +1083,8 @@ function get_max_question_order($gid)
'htmlemail'=>$_POST['htmlemail'],
'tokenanswerspersistence'=>$_POST['tokenanswerspersistence'],
'usecaptcha'=>$_POST['usecaptcha'],
'emailresponseto'=>$_POST['emailresponseto'],
'emailresponseto'=>trim($_POST['emailresponseto']),
'emailnotificationto'=>trim($_POST['emailnotificationto']),
'tokenlength'=>$_POST['tokenlength']
);

Expand Down
217 changes: 62 additions & 155 deletions admin/html.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion admin/install/create-mssql.sql
Expand Up @@ -267,7 +267,6 @@ CREATE TABLE [prefix_surveys] (
[additional_languages] VARCHAR(255) default NULL,
[datestamp] char(1) default 'N',
[usecookie] char(1) default 'N',
[notification] char(1) default '0',
[allowregister] char(1) default 'N',
[allowsave] char(1) default 'Y',
[autonumber_start] bigINT default '0',
Expand All @@ -293,6 +292,7 @@ CREATE TABLE [prefix_surveys] (
[bounce_email] VARCHAR(320) default NULL,
[attributedescriptions] text NULL,
[emailresponseto] text NULL,
[emailnotificationto] text NULL,
[tokenlength] tinyint default '15',
[bouncetime] BIGINT(20) NOT NULL,
[bounceprocessing] varchar(1) default 'N',
Expand Down
13 changes: 5 additions & 8 deletions admin/install/create-mssqlnative.sql
Expand Up @@ -248,7 +248,6 @@ CREATE TABLE [prefix_surveys] (
[additional_languages] VARCHAR(255) default NULL,
[datestamp] char(1) default 'N',
[usecookie] char(1) default 'N',
[notification] char(1) default '0',
[allowregister] char(1) default 'N',
[allowsave] char(1) default 'Y',
[autonumber_start] bigINT default '0',
Expand All @@ -274,6 +273,7 @@ CREATE TABLE [prefix_surveys] (
[bounce_email] VARCHAR(320) default NULL,
[attributedescriptions] varchar(max),
[emailresponseto] varchar(max),
[emailnotificationto] varchar(max),
[tokenlength] tinyint default '15',
[bouncetime] BIGINT(20) NOT NULL,
[bounceprocessing] varchar(1) default 'N',
Expand All @@ -282,17 +282,15 @@ CREATE TABLE [prefix_surveys] (
[bounceaccountuser] VARCHAR(320) default NULL,
[bounceaccountpass] VARCHAR(320) default NULL,
[bounceaccountencryption] VARCHAR(3) default NULL,

PRIMARY KEY ([sid])
)
;
--
-- Table structure for table [surveys_languagesettings]
--

if EXISTS (select * from dbo.sysobjects where id = object_id(N'[dbo].[prefix_surveys_languagesettings]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
DROP TABLE [dbo].[prefix_surveys_languagesettings]
;

--
-- Table structure for table surveys_languagesettings
--
CREATE TABLE [prefix_surveys_languagesettings] (
[surveyls_survey_id] INT NOT NULL DEFAULT 0,
[surveyls_language] VARCHAR(45) NOT NULL DEFAULT 'en',
Expand Down Expand Up @@ -360,7 +358,6 @@ CREATE TABLE [prefix_survey_permissions] (
--
-- Table structure for table user_groups
--

CREATE TABLE [prefix_user_groups] (
[ugid] INT NOT NULL IDENTITY (1,1) PRIMARY KEY,
[name] VARCHAR(20) NOT NULL UNIQUE,
Expand Down
4 changes: 2 additions & 2 deletions admin/install/create-mysql.sql
Expand Up @@ -255,7 +255,6 @@ CREATE TABLE `prefix_surveys` (
`additional_languages` varchar(255) default NULL,
`datestamp` char(1) default 'N',
`usecookie` char(1) default 'N',
`notification` char(1) default '0',
`allowregister` char(1) default 'N',
`allowsave` char(1) default 'Y',
`autonumber_start` bigint(11) default '0',
Expand Down Expand Up @@ -287,7 +286,8 @@ CREATE TABLE `prefix_surveys` (
`usetokens` char(1) default 'N',
`bounce_email` varchar(320) default NULL,
`attributedescriptions` text,
`emailresponseto` text default NULL,
`emailresponseto` text default NULL,
`emailnotificationto` text default NULL,
`tokenlength` tinyint(2) default '15',
PRIMARY KEY(`sid`)
) ENGINE=$databasetabletype CHARACTER SET utf8 COLLATE utf8_unicode_ci;
Expand Down
4 changes: 2 additions & 2 deletions admin/install/create-postgres.sql
Expand Up @@ -280,7 +280,6 @@ CREATE TABLE prefix_surveys (
additional_languages character varying(255),
datestamp character(1) DEFAULT 'N'::bpchar,
usecookie character(1) DEFAULT 'N'::bpchar,
notification character(1) DEFAULT '0'::bpchar,
allowregister character(1) DEFAULT 'N'::bpchar,
allowsave character(1) DEFAULT 'Y'::bpchar,
printanswers character(1) DEFAULT 'N'::bpchar,
Expand Down Expand Up @@ -311,8 +310,9 @@ CREATE TABLE prefix_surveys (
bounceaccountencryption character(320)
usetokens character(1) DEFAULT 'N'::bpchar,
"bounce_email" character varying(320) NOT NULL,
attributedescriptions text,
attributedescriptions text,
emailresponseto text,
emailnotificationto text,
tokenlength smallint DEFAULT '15'
);

Expand Down
31 changes: 2 additions & 29 deletions admin/scripts/surveytoolbar.js
Expand Up @@ -2,36 +2,9 @@
// based on TTabs from http://interface.eyecon.ro/

$(document).ready(function(){
$('.btnsurveybar').click(function(){
$('.btnsurveybar').attr('disabled','disabled');
$('#basicsurveybar').css('white-space','nowrap')
$('#advancedsurveybar').css('white-space','nowrap')
$('.btnsurveybar').toggle();
$('#basicsurveybar').animate({width: 'toggle'}, {duration:1500, easing:'easeOutExpo'});
$('#advancedsurveybar').animate({ width: 'toggle'}, 1500, 'easeOutExpo', function()
{
$('#basicsurveybar').css('white-space','normal')
$('#advancedsurveybar').css('white-space','normal')
$('.btnsurveybar').attr('disabled',false);
});
$.cookie('surveybarmode',$('#advancedsurveybar').css('width'));


$('#surveybarcarousel').jcarousel({ visible:8,
scroll:8
});

if ($.cookie('surveybarmode')!='1px')
{
$('#surveyhandleright').hide();
$('#advancedsurveybar').hide();
$('#advancedsurveybar').attr('width','0%');
$('#basicsurveybar').show();
}
else
{
$('#surveyhandleleft').hide();
$('#advancedsurveybar').show();
$('#basicsurveybar').hide();
$('#basicsurveybar').attr('width','0%');
}

});
101 changes: 101 additions & 0 deletions admin/styles/default/carousel.css
@@ -0,0 +1,101 @@
.jcarousel-skin-tango .jcarousel-container {

}

.jcarousel-skin-tango .jcarousel-direction-rtl {
direction: rtl;
}

.jcarousel-skin-tango .jcarousel-container-horizontal {
width: 318px;
padding: 0px 40px;
}



.jcarousel-skin-tango .jcarousel-item {
width: 40px;
height: 3px;
}

.jcarousel-skin-tango .jcarousel-item-horizontal {
margin-left: 0;
margin-right: 10px;
}




/**
* Horizontal Buttons
*/
.jcarousel-skin-tango .jcarousel-next-horizontal {
position: absolute;
top: 5px;
right: 5px;
width: 32px;
height: 32px;
cursor: pointer;
background: transparent url(images/next-horizontal.png) no-repeat 0 0;
}

.jcarousel-skin-tango .jcarousel-direction-rtl .jcarousel-next-horizontal {
left: 5px;
right: auto;
background-image: url(images/prev-horizontal.png);
}

.jcarousel-skin-tango .jcarousel-next-horizontal:hover {
background-position: -32px 0;
}

.jcarousel-skin-tango .jcarousel-next-horizontal:active {
background-position: -64px 0;
}

.jcarousel-skin-tango .jcarousel-next-disabled-horizontal,
.jcarousel-skin-tango .jcarousel-next-disabled-horizontal:hover,
.jcarousel-skin-tango .jcarousel-next-disabled-horizontal:active {
cursor: default;
background-position: -96px 0;
}

.jcarousel-skin-tango .jcarousel-prev-horizontal {
position: absolute;
top: 5px;
left: 5px;
width: 32px;
height: 32px;
cursor: pointer;
background: transparent url(images/prev-horizontal.png) no-repeat 0 0;
}

.jcarousel-skin-tango .jcarousel-direction-rtl .jcarousel-prev-horizontal {
left: auto;
right: 5px;
background-image: url(images/next-horizontal.png);
}

.jcarousel-skin-tango .jcarousel-prev-horizontal:hover {
background-position: -32px 0;
}

.jcarousel-skin-tango .jcarousel-prev-horizontal:active {
background-position: -64px 0;
}

.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal,
.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal:hover,
.jcarousel-skin-tango .jcarousel-prev-disabled-horizontal:active {
cursor: default;
background-position: -96px 0;
}



div.jcarousel-skin-tango
{
display:inline;
float:left;
height:40px;
}
Binary file added admin/styles/default/images/next-horizontal.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added admin/styles/default/images/prev-horizontal.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions admin/tokens.php
Expand Up @@ -729,7 +729,7 @@
$tokenoutput .= PrepareEditorScript();
$tokenoutput .="<tr><td align='center'>"
. "<div class='header'>\n"
. "".$clang->gT("Edit email settings")."</div>\n"
. "".$clang->gT("Edit email templates")."</div>\n"
. "<form class='form30' name='frmemailsettings' action='$scriptname' method='post'>\n"
. '<div class="tab-pane" id="tab-pane-emailsettings-'.$surveyid.'">';
$surveyinfo=getSurveyInfo($surveyid);
Expand Down Expand Up @@ -819,9 +819,9 @@
$usresult = $connect->Execute($usquery) or safe_die("Error updating<br />".$usquery."<br /><br />".$connect->ErrorMsg());
}
}
$tokenoutput .= "<div class='header'>".$clang->gT("Edit email settings")."</div>\n"
$tokenoutput .= "<div class='header'>".$clang->gT("Edit email templates")."</div>\n"
."<div class='messagebox'>"
."\t<div class='successheader'>".$clang->gT("Token email settings have been saved.")."</div>\n"
."\t<div class='successheader'>".$clang->gT("Email templates have been saved.")."</div>\n"
."</div>";
}

Expand Down
1 change: 0 additions & 1 deletion common_functions.php
Expand Up @@ -1303,7 +1303,6 @@ function getSurveyInfo($surveyid, $languagecode='')
$thissurvey['tablename']=$dbprefix.'survey_'.$thissurvey['sid'];
$thissurvey['urldescrip']=$thissurvey['surveyls_urldescription'];
$thissurvey['url']=$thissurvey['surveyls_url'];
$thissurvey['sendnotification']=$thissurvey['notification'];
$thissurvey['expiry']=$thissurvey['expires'];
$thissurvey['email_invite_subj']=$thissurvey['surveyls_email_invite_subj'];
$thissurvey['email_invite']=$thissurvey['surveyls_email_invite'];
Expand Down
9 changes: 4 additions & 5 deletions group.php
Expand Up @@ -213,11 +213,10 @@
submittokens();
}

//Send notification to survey administrator //Thanks to Jeff Clement http://jclement.ca
if ($thissurvey['sendnotification'] > 0 && $thissurvey['adminemail'])
{
sendsubmitnotification($thissurvey['sendnotification']);
}
//Send notifications

SendSubmitNotifications();


$content='';

Expand Down

0 comments on commit 30e5fc9

Please sign in to comment.