Skip to content

Commit

Permalink
Fixed issue #10195: CKEditor should use Bootstrap style
Browse files Browse the repository at this point in the history
Dev More fixes for the dialogs
  • Loading branch information
c-schmitz committed Mar 16, 2016
1 parent 4a1f06a commit ddf9860
Show file tree
Hide file tree
Showing 6 changed files with 697 additions and 694 deletions.
4 changes: 2 additions & 2 deletions application/views/admin/htmleditor/pop_editor_view.php
Expand Up @@ -31,8 +31,8 @@ function closeme()


var saveChanges = false;
var sReplacementFieldTitle = '<?php eT('LimeSurvey replacement field properties','js');?>';
var sReplacementFieldButton = '<?php eT('Insert/edit LimeSurvey replacement field','js');?>';
var sReplacementFieldTitle = '<?php eT('Placeholder fields','js');?>';
var sReplacementFieldButton = '<?php eT('Insert/edit placeholder field','js');?>';
$(document).ready(function(){
//console.log('iGroupId: '+iGroupId);
// Better use try/catch to not crash JS completely
Expand Down
154 changes: 76 additions & 78 deletions application/views/admin/limeReplacementFields_view.php
@@ -1,10 +1,9 @@
<script language="javascript">

$(document).ready(function ()
{
LoadSelected() ;
mydialog.SetOkButton( true ) ;
SelectField( 'cquestions' ) ;
{
LoadSelected() ;
mydialog.SetOkButton( true ) ;
SelectField( 'cquestions' ) ;
});

var eSelected = dialog.Selection.GetSelectedElement() ;
Expand All @@ -29,108 +28,107 @@ function Ok()
</script>
</head>
<body scroll="no" style="OVERFLOW: hidden;">
<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
<tr>
<td>
<?php
if (count($replFields) > 0 || isset($cquestions) )
{
$InsertansUnsupportedtypes= Yii::app()->getConfig('InsertansUnsupportedtypes');
<div class="form-group">
<?php
if (count($replFields) > 0 || isset($cquestions) )
{
$InsertansUnsupportedtypes= Yii::app()->getConfig('InsertansUnsupportedtypes');
?>
<select name='cquestions' id='cquestions' size='14' ondblclick="$('.cke_dialog_ui_button_ok').children().click();" class='form-control'>
<?php
$noselection = false;
}
else
{
eT("No replacement variable available for this field");
$noselection = true;
}

if (count($replFields) > 0)
{
?>
<select name='cquestions' id='cquestions' size='14' ondblclick="$('.cke_dialog_ui_button_ok').children().click();">
<optgroup label='<?php eT("Standard Fields");?>'>
<?php
$noselection = false;
}
else
{
eT("No replacement variable available for this field");
$noselection = true;
}

if (count($replFields) > 0)
foreach ($replFields as $stdfield)
{
?>
<optgroup label='<?php eT("Standard Fields");?>'>
<?php

foreach ($replFields as $stdfield)
{
?>
<option value='<?php echo $stdfield[0];?>' title='<?php echo $stdfield[1];?>'><?php echo $stdfield[1];?></option>
<?php
}
?>
</optgroup>
<?php
<option value='<?php echo $stdfield[0];?>' title='<?php echo $stdfield[1];?>'><?php echo $stdfield[1];?></option>
<?php
}
?>
</optgroup>
<?php
}

if (isset($cquestions))
if (isset($cquestions))
{
?>
<optgroup label='<?php eT("Previous answer fields");?>'>
<?php
foreach ($cquestions as $cqn)
{
?>
<optgroup label='<?php eT("Previous answer fields");?>'>
<?php
foreach ($cquestions as $cqn)
{
$isDisabled="";
if (in_array($cqn[2],$InsertansUnsupportedtypes))
{
$isDisabled=" disabled='disabled'";
}
elseif ($cqn[4] === false)
{
$isDisabled=" disabled='disabled'";
}
?>
<option value='INSERTANS:<?php echo $cqn[3];?>' title='<?php echo $cqn[0];?>' <?php echo $isDisabled;?>><?php echo $cqn[0];?></option>
<?php
}
$isDisabled="";
if (in_array($cqn[2],$InsertansUnsupportedtypes))
{
$isDisabled=" disabled='disabled'";
}
elseif ($cqn[4] === false)
{
$isDisabled=" disabled='disabled'";
}
?>
</optgroup>
<?php
<option value='INSERTANS:<?php echo $cqn[3];?>' title='<?php echo $cqn[0];?>' <?php echo $isDisabled;?>><?php echo $cqn[0];?></option>
<?php
}

if ($noselection === false)
{
?>
</select>
</optgroup>
<?php
}
?>
</td>
</tr>
<?php
if (isset($surveyformat))
}

if ($noselection === false)
{
?>
</select>
<?php
}
?>
<?php
if (isset($surveyformat))
{
?>
<div class="panel panel-default">
<?php
switch ($surveyformat)
{
case 'A':
?>
<tr>
<td>
?>
<div class="panel-body">

<br />
<font color='orange'><?php eT("Some Question have been disabled");?></font>
<br />
<?php echo sprintf(gT("Survey Format is %s:"), gT("All in one"));?>
<br />
<i><?php eT("Only Previous pages answers are available");?></i>
<br />
</td>
</tr>
<?php
</div>
<?php
break;
case 'G':
?>
<tr>
<td>
?>
<div>
<br />
<font color='orange'><?php eT("Some Question have been disabled");?></font>
<br /><?php echo sprintf(gT("Survey mode is set to %s:"), gT("Group by Group"));?>
<br/><i><?php eT("Only Previous pages answers are available");?>
</i><br />
</td></tr>
<?php
</div>
<?php
break;
}
}
}?>
</div>
<?php
}
?>
</table>
</div>
4 changes: 2 additions & 2 deletions application/views/admin/survey/prepareEditorScript_view.php
Expand Up @@ -19,8 +19,8 @@
}
});

var sReplacementFieldTitle = '<?php eT('LimeSurvey replacement field properties','js');?>';
var sReplacementFieldButton = '<?php eT('Insert/edit LimeSurvey replacement field','js');?>';
var sReplacementFieldTitle = '<?php eT('Placeholder fields','js');?>';
var sReplacementFieldButton = '<?php eT('Insert/edit placeholder field','js');?>';
var editorwindowsHash = new Object();

function find_popup_editor(fieldname)
Expand Down
Expand Up @@ -11,7 +11,7 @@
generalLabel = editor.lang.common.generalTab;
return {
title : lang.title,
minWidth : 300,
minWidth : 400,
minHeight : 80,
height : 260,
resizable : CKEDITOR.DIALOG_RESIZE_NONE,
Expand Down

0 comments on commit ddf9860

Please sign in to comment.