summaryrefslogtreecommitdiffstats
path: root/main/survey/app/Controllers/Vprasanja/DragDropController.php
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2024-05-27 13:08:29 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2024-05-27 13:08:29 +0200
commit75160b12821f7f4299cce7f0b69c83c1502ae071 (patch)
tree27e25e4ccaef45f0c58b22831164050d1af1d4db /main/survey/app/Controllers/Vprasanja/DragDropController.php
parentprvi-commit (diff)
download1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.gz
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.bz2
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.lz
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.xz
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.tar.zst
1ka-75160b12821f7f4299cce7f0b69c83c1502ae071.zip
Diffstat (limited to '')
-rw-r--r--main/survey/app/Controllers/Vprasanja/DragDropController.php44
1 files changed, 11 insertions, 33 deletions
diff --git a/main/survey/app/Controllers/Vprasanja/DragDropController.php b/main/survey/app/Controllers/Vprasanja/DragDropController.php
index 4b4f4bc..aad911e 100644
--- a/main/survey/app/Controllers/Vprasanja/DragDropController.php
+++ b/main/survey/app/Controllers/Vprasanja/DragDropController.php
@@ -103,7 +103,8 @@ class DragDropController 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)");
echo '<ul>';
@@ -209,7 +210,7 @@ class DragDropController extends Controller
echo '<td class="middle_mobile">';
}
echo '<b></b>';
- echo '<img src="' . self::$site_url . 'main/survey/skins/Modern/arrow.png" alt="arrow">';
+ //echo '<img src="' . self::$site_url . 'main/survey/skins/Modern/arrow.png" alt="arrow">';
echo '</td>';
//izris desne strani
@@ -386,7 +387,8 @@ class DragDropController 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)");
if (get('mobile') == 0 || get('mobile') == 2) {// ce respondent uporablja PC ali tablico
@@ -416,13 +418,9 @@ class DragDropController extends Controller
$length = strlen($value); //dolzina teksta kategorije odgovora
$style = '';
if (get('mobile') == 0 || get('mobile') == 2) {// ce respondent uporablja PC ali tablico
- //if($display_drag_and_drop_new_look != 1){
- $class = 'ranking';
-/* }else if($display_drag_and_drop_new_look == 1){
- $class = 'drag_and_drop_box';
- } */
-
- } else if (get('mobile') == 1) {
+ $class = 'ranking';
+ }
+ else if (get('mobile') == 1) {
$class = 'ranking_mobile';
}
$c = '';
@@ -490,32 +488,12 @@ class DragDropController extends Controller
$(document).ready(function () {
- //if(<?=$display_drag_and_drop_new_look?> == 0){
- GridDraggable(<?=$row['tip']?>, <?=$spremenljivka?>, <?=$vre_id?>, <?=$ajax?>, srv_meta_anketa_id, '<?=self::$site_url?>', usr_id, <?=$other?>, <?=get('mobile')?>, <?=$display_drag_and_drop_new_look?>, <?=$quick_view?>, <?=$preview_spremenljivka?>); //poklici funkcijo za ureditev draggable in droppable
-/* }
- else if(<?=$display_drag_and_drop_new_look?> == 1){
- //GridDraggableBox(<?=$row['tip']?>, <?=$spremenljivka?>, <?=$vre_id?>, <?=$ajax?>, srv_meta_anketa_id, '<?=self::$site_url?>', <?=$usr_id?>, <?=$other?>, <?=get('mobile')?>); //poklici funkcijo za ureditev draggable in droppable
- GridDraggableBox(<?=$row['tip']?>, <?=$spremenljivka?>, <?=$vre_id?>, <?=$ajax?>, srv_meta_anketa_id, '<?=self::$site_url?>', usr_id, <?=$other?>, <?=get('mobile')?>); //poklici funkcijo za ureditev draggable in droppable
- } */
+ GridDraggable(<?=$row['tip']?>, <?=$spremenljivka?>, <?=$vre_id?>, <?=$ajax?>, srv_meta_anketa_id, '<?=self::$site_url?>', usr_id, <?=$other?>, <?=get('mobile')?>, <?=$display_drag_and_drop_new_look?>, <?=$quick_view?>, <?=$preview_spremenljivka?>); //poklici funkcijo za ureditev draggable in droppable
});
</script>
<?
- //echo '<div id="vrednost_if_'.$id.'" class="variabla">';
- //echo '</div>'; //vrednost_if_ID
- //div ki vsebuje vrednost
- //if($length > 30)
- // if($length > 90){
- // $niz = substr($value, 0, 90);
- //echo '<div title="'.strip_tags($value).'" id="'.$class.'_'.$id.'" class="'.$class.'_long '.$c.'">'.$niz.'...</div>'."\n";
- // echo '<div title="'.strip_tags($value).'" id="'.$class.'_'.$vre_id.'" class="'.$class.'_long '.$c.'">'.$niz.'...</div>'."\n";
- // }
- // else
- //echo '<div title="'.strip_tags($value).'" id="'.$class.'_'.$id.'" class="'.$class.'_long '.$c.'">'.$value.'</div>'."\n";
- // echo '<div title="'.strip_tags($value).'" id="'.$class.'_'.$vre_id.'" class="'.$class.'_long '.$c.'">'.$value.'</div>'."\n";
- //else{
- //echo '<div id="'.$class.'_'.$id.'" class="'.$class.' '.$c.'">'.$value.'</div>'."\n";
+
echo '<div id="spremenljivka_' . $spremenljivka . '_vrednost_' . $vre_id . '" class="' . $class . ' ' . $c . '">' . $value . '</div>' . "\n"; //'#spremenljivka_'+spremenljivka+'_vrednost_'+id
- //}
}
echo '</li>' . "\n";
@@ -530,7 +508,7 @@ class DragDropController extends Controller
echo '<td class="middle_mobile">';
}
echo '<b></b>';
- echo '<img src="' . self::$site_url . 'main/survey/skins/Modern/arrow.png" alt="arrow">';
+ //echo '<img src="' . self::$site_url . 'main/survey/skins/Modern/arrow.png" alt="arrow">';
echo '</td>';
//izris desne strani***********************************************************************************