diff options
Diffstat (limited to '')
-rw-r--r-- | main/survey/app/Controllers/Vprasanja/RankingController.php | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/main/survey/app/Controllers/Vprasanja/RankingController.php b/main/survey/app/Controllers/Vprasanja/RankingController.php index 014bb37..b91bd6f 100644 --- a/main/survey/app/Controllers/Vprasanja/RankingController.php +++ b/main/survey/app/Controllers/Vprasanja/RankingController.php @@ -94,7 +94,7 @@ class RankingController extends Controller // prestavljanje za SAZU - n>k
else if ($row['design'] == 0 && get('mobile') == 0
&& SurveyInfo::getInstance()->checkSurveyModule('sazu')
- && in_array($spremenljivka, array('11092569','11092563'))
+ && in_array($spremenljivka, array('11092569','11092563','763259','763254'))
)
$this->displayPrestavljanjeSAZU($spremenljivka, $preview_spremenljivka, $quick_view, $ajax);
@@ -196,7 +196,8 @@ class RankingController extends Controller // Datapiping
$row2['naslov'] = Helper::dataPiping($row2['naslov']);
- $value = $row2['naslov'];
+ $value = strip_tags($row2['naslov'], '<p><br>');
+
$vre_id = $row2['id'];
array_push($vre_idCache1, $vre_id);
$length = strlen($value); //dolzina teksta kategorije odgovora
@@ -286,7 +287,8 @@ class RankingController extends Controller // Datapiping
$row2['naslov'] = Helper::dataPiping($row2['naslov']);
- $value = $row2['naslov'];
+ $value = strip_tags($row2['naslov'], '<p><br>');
+
$vre_id = $row2['id'];
array_push($vre_idCache2, $vre_id);
$length = strlen($value); //dolzina teksta kategorije odgovora
@@ -372,7 +374,7 @@ class RankingController extends Controller //izracun visine
$num = mysqli_num_rows($sql1);
- $size = $num * 37;
+ $size = $num * 40;
//nastavimo $max (maximum prenesenih vrednosti) -> ce lahko nosimo vse vrednosti ($row['ranking_k'] == 0) je $max stevilo vseh vrednotsti
if ($row['ranking_k'] == 0)
@@ -394,7 +396,6 @@ class RankingController extends Controller echo "<script>
$(document).ready(
function(){
-
$('#half_$spremenljivka div').dblclick(function() {
var litem = $(this).clone();
litem.appendTo($('#half2_$spremenljivka'));
@@ -419,7 +420,7 @@ class RankingController extends Controller $('#half_$spremenljivka, #half2_$spremenljivka').sortable({
opacity: '0.7',
connectWith: ['#half_$spremenljivka, #half2_$spremenljivka'],
-
+
placeholder: 'frame_ranking_hover',
//stop: function (){
@@ -493,7 +494,7 @@ class RankingController extends Controller echo '<table class="ranking_table">';
echo '<tr>';
//zaslon razdelimo na dva dela - izris leve strani
- echo '<td>';
+ echo '<td class="first">';
if (get('lang_id') != null) $_lang = '_' . get('lang_id'); else $_lang = '';
$srv_ranking_avaliable_categories = SurveySetting::getInstance()->getSurveyMiscSetting('srvlang_srv_ranking_avaliable_categories' . $_lang);
@@ -501,7 +502,8 @@ class RankingController extends Controller echo '<b>' . $srv_ranking_avaliable_categories . ':</b>';
- echo '<div id="half_' . $spremenljivka . '" class="dropzone" style="height:' . $size . 'px">';
+ //echo '<div id="half_' . $spremenljivka . '" class="dropzone" style="height:' . $size . 'px">';
+ echo '<div id="half_' . $spremenljivka . '" class="dropzone" style="min-height:' . $size . 'px">';
$sql1 = sisplet_query("SELECT id, naslov, other FROM srv_vrednost WHERE spr_id='$spremenljivka' AND id NOT IN(SELECT vre_id FROM srv_data_rating WHERE spr_id = '$spremenljivka' AND usr_id='" . get('usr_id') . "' AND loop_id $loop_id) ORDER BY FIELD(vrstni_red, $order)");
$vre_idCacheL = array();
@@ -515,7 +517,8 @@ class RankingController extends Controller // Datapiping
$row1['naslov'] = Helper::dataPiping($row1['naslov']);
- $value = $row1['naslov'];
+ $value = strip_tags($row1['naslov'], '<p><br>');
+
$vre_id = $row1['id'];
array_push($vre_idCacheL, $vre_id);
$other = $row1['other']; //drugo, po navadi missing
@@ -529,7 +532,9 @@ class RankingController extends Controller $class = 'ranking_mobile';
}
- $c = '';
+ $c = '';
+
+
echo '<div id="spremenljivka_' . $spremenljivka . '_vrednost_' . $vre_id . '" class="' . $class . ' ' . $c . '">' . $value . '</div>' . "\n"; //'#spremenljivka_'+spremenljivka+'_vrednost_'+id
}
@@ -544,7 +549,7 @@ class RankingController extends Controller ?>
<script>
$(document).ready(function () {
- customizeImageView4Respondent(<?=$row['tip']?>, <?=$spremenljivka?>, <?=$vre_id?>, <?=$ajax?>, srv_meta_anketa_id, '<?=self::$site_url?>', usr_id, <?=$otherCacheL[$indeksVre_idCacheL]?>, <?=get('mobile')?>, <?=$quick_view?>, <?=$preview_spremenljivka?>); //poklici funkcijo za ureditev draggable in droppable
+ customizeImageView4Respondent(<?=$row['tip']=0?>, <?=$spremenljivka?>, <?=$vre_id?>, <?=$ajax?>, srv_meta_anketa_id, '<?=self::$site_url?>', usr_id, <?=$otherCacheL[$indeksVre_idCacheL]?>, <?=get('mobile')?>, <?=$quick_view?>, <?=$preview_spremenljivka?>); //poklici funkcijo za ureditev ureditev draggable in droppable
});
</script>
<?
@@ -553,10 +558,11 @@ class RankingController extends Controller //ureditev gladkega delovanja prikazovanja visjih blokov odgovorov (vecvrsticni, s slikami, ipd.) - konec
//srednja celica (stevilo prenesenih in spodaj puscica)
- echo '<td class="middle">';
+ /* echo '<td class="middle">';
echo '<b>' . $count . '/' . $max . '</b>';
- echo '<img src="' . self::$site_url . 'main/survey/skins/Modern/arrow.png" alt="arrow">';
- echo '</td>';
+ //echo '<img src="' . self::$site_url . 'main/survey/skins/Modern/arrow.png" alt="arrow">';
+ echo '<div class="arrow_dnd"> </div>';
+ echo '</td>'; */
//izris desne strani
echo '<td>';
@@ -565,7 +571,7 @@ class RankingController extends Controller $srv_ranking_ranked_categories = SurveySetting::getInstance()->getSurveyMiscSetting('srvlang_srv_ranking_ranked_categories' . $_lang);
if ($srv_ranking_ranked_categories == '') $srv_ranking_ranked_categories = self::$lang['srv_ranking_ranked_categories'];
- echo '<b>' . $srv_ranking_ranked_categories . ':</b>';
+ echo '<b>' . $srv_ranking_ranked_categories . '(' . $count . '/' . $max . '):</b>';
echo '<div class="dropholder">'; // ker na td ne primer position relative za nastavit position absolute na dropzone
@@ -586,8 +592,8 @@ class RankingController extends Controller // Datapiping
$row1['naslov'] = Helper::dataPiping($row1['naslov']);
+ $value = strip_tags($row1['naslov'], '<p><br>');
- $value = $row1['naslov'];
$vre_id = $row1['id'];
array_push($vre_idCacheD, $vre_id);
$length = strlen($value); //dolzina teksta kategorije odgovora
@@ -626,6 +632,7 @@ class RankingController extends Controller <script>
$(document).ready(function () {
question_height_ranking(<?=$spremenljivka?>);
+ //console.log("tukaj!");
});
</script>
<?
@@ -965,7 +972,7 @@ class RankingController extends Controller type="hidden"
name="spremenljivka_' . $spremenljivka . '_vrednost_' . $row1['id'] . '"
id="spremenljivka_' . $spremenljivka . '_ranking_cifre_' . $counter . '"
- value="' . $row2['vrstni_red'] . '"
+ value="' . (isset($row2['vrstni_red']) ? $row2['vrstni_red'] : '') . '"
> ';
echo '<br />';
@@ -985,7 +992,7 @@ class RankingController extends Controller type="hidden"
name="spremenljivka_' . $spremenljivka . '_vrednost_' . $row1['id'] . '"
id="spremenljivka_' . $spremenljivka . '_ranking_cifre_' . $counter . '"
- value="' . $row2['vrstni_red'] . '"
+ value="' . (isset($row2['vrstni_red']) ? $row2['vrstni_red'] : '') . '"
> ';
echo '<br />';
|