Explorar o código

test remove jquery-ui (see #73)

Piotr Labudda %!s(int64=11) %!d(string=hai) anos
pai
achega
1a7a4b657d

+ 41 - 36
SE/procesy/testy.php

@@ -2623,53 +2623,56 @@ function task_TEST_SORT() {
 	$cols['DESC'] = "DESC";
 	//$cols['TEST_SORT_PRIO'] = "Kolejno????";
 
-	echo '<link rel="stylesheet" type="text/css" href="stuff/jquery-ui-smoothness/jquery-ui-1.10.1.custom.min.css">';
-	echo '<style type="text/css">' . "
+	//echo '<link rel="stylesheet" type="text/css" href="stuff/jquery-ui-smoothness/jquery-ui-1.10.1.custom.min.css">';
+	?>
+	<style type="text/css">
 .tbl-view .selected td {background:#FCFFCE;}
 .tbl-view tr { background:#fff; }
 .tbl-view tr:nth-child(even) { background:#F3F3F3; }
 
-#sortable-proces-list tr {cursor:pointer;}
-#sortable-proces-list td {color:#000;}
-#sortable-proces-list .ui-state-highlight { height:1.1em; line-height:1em; }
+#sortableProcesList tr {cursor:pointer;}
+#sortableProcesList td {color:#000;}
+#sortableProcesList .ui-state-highlight { height:1.1em; line-height:1em; }
+#sortableProcesList .sortableProcesList-title {display:block; width:360px; height:3em; line-height:3em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
+#sortableProcesList .sortableProcesList-goto {display:block; height:3em; overflow:hidden;}
 
-	" . '</style>';
-	echo '<script type="text/javascript" src="stuff/jquery-ui.custom.min.js"></script>';
-	echo '<script type="text/javascript">' . "
+	</style>
+	<script type="text/javascript" src="stuff/jquery-ui.custom.min.js"></script>
+	<script type="text/javascript">
 jQuery(document).ready(function(){
-	jQuery('#sortable-proces-list').sortable({
+	jQuery('#sortableProcesList').sortable({
 		placeholder: 'ui-state-highlight',
 		axis: 'y'
 	});
 });
 
 function fun_TEST_SORT_SAVE() {
-	var sorted_list=jQuery('#sortable-proces-list').sortable('serialize', {attribute: 'id', key: 'p[]'});
+	var sorted_list=jQuery('#sortableProcesList').sortable('serialize', {attribute: 'id', key: 'p[]'});
 	window.location.href='?task=TEST_SORT&function_init=fun_TEST_SORT_SAVE&' + sorted_list;
 	return false;
 }
-			" . '</script>';
-
-	echo '<table cellspacing="0" cellpadding="0" border="1" class="tbl-view">';
-	echo '<thead>';
-		echo '<tr>';
-		foreach ($cols as $k_cell => $v_label) {
-			echo '<th>' . (empty($v_label)? str_replace('_', ' ', $k_cell) : $v_label) . '</th>';
-		}
-		echo '<th>' . "Kolejność ";
-			echo App::link('save', array('task'=>'TEST_SORT', 'function_init'=>'fun_TEST_SORT_SAVE'), array('ico'=>'save', 'title'=>"Zapisz kolejność", 'onclick'=>"return fun_TEST_SORT_SAVE();"));
-		echo '</th>';
-		echo '<th>' . "GOTO" . '</th>';
-		echo '</tr>';
-	echo '</thead>';
-	echo '<tbody id="sortable-proces-list">';
+	</script>
+	<table cellspacing="0" cellpadding="0" border="1" class="tbl-view">
+	<thead>
+		<tr>
+			<th>Nr</th>
+			<th style="width:360px">Opis</th>
+			<th>Kolejność
+				<?php echo App::link('save', array('task'=>'TEST_SORT', 'function_init'=>'fun_TEST_SORT_SAVE'), array('ico'=>'save', 'title'=>"Zapisz kolejność", 'onclick'=>"return fun_TEST_SORT_SAVE();")); ?>
+			</th>
+			<th style="width:30%;">GOTO</th>
+			<th></th>
+		</tr>
+	</thead>
+	<tbody id="sortableProcesList">
+	<?php
 	foreach ($proces_list as $v_proces) {
 		// class="(($proces_id == $v_proces->ID)? ' selected' : '')"
 		echo '<tr id="p_' . $v_proces->ID . '" class="ui-state-default">';
 		foreach ($cols as $k_cell => $v_label) {
-			$value = $v_proces->$k_cell;
-			if (is_string($value) && strlen($value) > 60) {
-				$value = '<span title="' . htmlspecialchars($value) . '">' . substr($value, 0, 60) . '...' . '</span>';
+			$value = $v_proces->{$k_cell};
+			if ('DESC' == $k_cell) {
+				$value = '<span class="sortableProcesList-title" title="' . htmlspecialchars($value) . '">' . $value . '</span>';
 			}
 			echo '<td>' . $value . '</td>';
 		}
@@ -2679,14 +2682,16 @@ function fun_TEST_SORT_SAVE() {
 			echo App::link('v', array('task'=>'TEST_SORT', '_proces_id'=>$v_proces->ID, '_dir'=>'dw'), array('class'=>'btn-clean', 'title'=>'w dół'));
 		echo '</td>';
 		echo '<td>';// GOTO
-		if (array_key_exists($v_proces->ID, $goto_list)) {
-			foreach ($goto_list[$v_proces->ID] as $k_id => $v_goto) {
-				$title = "Proces {$v_goto->ID} {$v_goto->IF_TRUE_GOTO_FLAG} {$v_goto->IF_TRUE_GOTO}";
-				echo '<span class="btn-box" style="font-family:monospace" title="' . $title . '">' . $v_goto->ID . ' ' . ProcesHelper::proces_flag($v_goto->ID, $v_goto->IF_TRUE_GOTO, $v_goto->IF_TRUE_GOTO_FLAG) . '</span>';
-			}
-		}
+			echo '<div class="sortableProcesList-goto">';
+				if (array_key_exists($v_proces->ID, $goto_list)) {
+					foreach ($goto_list[$v_proces->ID] as $k_id => $v_goto) {
+						$title = "Krok {$v_goto->ID} {$v_goto->IF_TRUE_GOTO_FLAG} {$v_goto->IF_TRUE_GOTO}";
+						echo '<span class="btn-box" style="font-family:monospace" title="' . $title . '">' . ProcesHelper::proces_flag($v_goto->ID, $v_goto->IF_TRUE_GOTO, $v_goto->IF_TRUE_GOTO_FLAG) . '</span>';
+					}
+				}
+			echo '</div>';
 		echo '</td>';
-		echo '<td><nobr>';
+		echo '<td>';
 			$path_arr=explode('/', $v_proces->path);
 			foreach($path_arr as $path) {
 				$col_temp_r=dechex(rand(0,25)*10);
@@ -2708,7 +2713,7 @@ function fun_TEST_SORT_SAVE() {
 			$path_last['SORT_PRIO']=$v_proces->SORT_PRIO;
 		//	echo $path_last['ID']."==?".$path_arr[count($path_arr)-2]." / ".$path_last['TEST_SORT_PRIO']." ".$path_last['SORT_PRIO'];
 
-		echo '</nobr></td>';
+		echo '</td>';
 		echo '</tr>';
 	}
 	echo '</tbody>';

+ 2 - 2
SE/se-lib/App.php

@@ -809,7 +809,7 @@ function scrollToProces(item_id) {
 
 	public static function show_head_css() {
 		?>
-		<link rel="stylesheet" type="text/css" href="stuff/jquery-ui-smoothness/jquery-ui-1.10.1.custom.min.css">
+		<!-- <link rel="stylesheet" type="text/css" href="stuff/jquery-ui-smoothness/jquery-ui-1.10.1.custom.min.css"> -->
 		<style type="text/css">
 .tip-popup-wrap{display:none;padding:0;position:absolute;z-index:10000;background:#fff;border:4px solid #444;}
 .tip-popup-wrap #tip-popup-box{margin:0;padding:3px;background:#fff;color:#000;text-align:left;overflow:auto;}
@@ -848,7 +848,7 @@ body.show-DEBUG_S .DEBUG_S {display:block;}
 	}
 	public static function show_head_js() {
 		?>
-		<script src="stuff/jquery-ui.custom.min.js"></script>
+		<!-- <script src="stuff/jquery-ui.custom.min.js"></script> -->
 		<script src="stuff/jquery.lightbox-0.5.js"></script>
 		<script src="stuff/jquery.scrollintoview.min.js"></script>
 		<?php

+ 17 - 23
SE/se-lib/PokazOfertyView.php

@@ -70,50 +70,44 @@ body{font-family:arial; font-size:12px;}
 	}
 
 	function print_jquery_ui() {
-		$out = '<link rel="stylesheet" type="text/css" href="stuff/jquery-ui-smoothness/jquery-ui-1.10.1.custom.min.css">' . "\n";
-		$out .= '<script type="text/javascript" src="stuff/jquery-ui.custom.min.js"></script>' . "\n";
-		return $out;
+		//$out = '<link rel="stylesheet" type="text/css" href="stuff/jquery-ui-smoothness/jquery-ui-1.10.1.custom.min.css">' . "\n";
+		//$out .= '<script type="text/javascript" src="stuff/jquery-ui.custom.min.js"></script>' . "\n";
+		return '';//$out;
 	}
 
 	function print_ui_widget_info($title, $msg = '') {
 		$out = '';
-		$out .= '<div class="ui-widget">';
-			$out .= '<div class="ui-state-highlight ui-corner-all" style="margin-top:20px; padding:0 .7em;">';
-				$out .= '<p><span class="ui-icon ui-icon-info" style="float:left; margin-right:.3em;"></span>';
-				$out .= '<strong></strong> ' . $title . '</p>';
-				if (!empty($msg)) {
-					$out .= '<p>' . $msg . '</p>';
-				}
-			$out .= '</div>';
+		$out .= '<div class="alert alert-info">';
+			$out .= '<p><span class="glyphicon glyphicon-info-sign"></span> ';
+			$out .= '<strong></strong> ' . $title . '</p>';
+			if (!empty($msg)) {
+				$out .= '<p>' . $msg . '</p>';
+			}
 		$out .= '</div>';
 		return $out;
 	}
 
 	function print_ui_widget_ok($title, $msg = '') {
 		$out = '';
-		$out .= '<div class="ui-widget">';
-			$out .= '<div class="ui-state-highlight ui-corner-all" style="margin-top:20px; padding:0 .7em;">';
-				$out .= '<p><span class="ui-icon ui-icon-check" style="float:left; margin-right:.3em;"></span>';
-				$out .= '<strong></strong> ' . $title . '</p>';
-				if (!empty($msg)) {
-					$out .= '<p>' . $msg . '</p>';
-				}
-			$out .= '</div>';
+		$out .= '<div class="alert alert-success">';
+			$out .= '<p><span class="glyphicon glyphicon-ok"></span> ';
+			$out .= '<strong></strong> ' . $title . '</p>';
+			if (!empty($msg)) {
+				$out .= '<p>' . $msg . '</p>';
+			}
 		$out .= '</div>';
 		return $out;
 	}
 
 	function print_ui_widget_errors($title, $errors_arr = array()) {
 		$out = '';
-		$out .= '<div class="ui-widget">';
-		$out .= '<div class="ui-state-error ui-corner-all" style="padding:0 .7em;">';
-			$out .= '<p><span class="ui-icon ui-icon-alert" style="float:left; margin-right:.3em;"></span>';
+		$out .= '<div class="alert alert-danger">';
+			$out .= '<p><span class="glyphicon glyphicon-warning-sign"></span> ';
 			$out .= '<strong>Error:</strong> ' . $title . '</p>';
 			if (!empty($errors_arr)) {
 				$out .= '<ul style="color:red"><li>' . implode('</li><li>', $errors_arr) . '</li></ul>';
 			}
 		$out .= '</div>';
-		$out .= '</div>';
 		return $out;
 	}
 

+ 1 - 1
SE/se-lib/TableAjax.php

@@ -261,7 +261,7 @@ class TableAjax extends ViewAjax {
 
 		<?php if ($tblAjaxMap) $tblAjaxMap->printCSS(); ?>
 		<?php if ($tblAjaxMap) $tblAjaxMap->printJS(); ?>
-		<link rel="stylesheet" type="text/css" href="stuff/jquery-ui-smoothness/jquery-ui-1.10.4.custom.min.css">
+<!-- <link rel="stylesheet" type="text/css" href="stuff/jquery-ui-smoothness/jquery-ui-1.10.4.custom.min.css"> -->
 		<style type="text/css">
 .AjaxTable{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0;}
 

+ 1 - 1
SE/se-lib/tmpl/_layout_gora.php

@@ -22,7 +22,7 @@
 	<script src="stuff/moment/pl.js"></script>
 	<script src="stuff/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
 	<script src="stuff/notify.min.js"></script>
-	<script src="stuff/jquery-ui-1.10.4.custom.min.js"></script>
+<!-- <script src="stuff/jquery-ui-1.10.4.custom.min.js"></script> -->
 	<script src="stuff/jquery.hotkeys.js"></script>
 	<script src="stuff/lodash.min.js"></script>
 	<script src="stuff/superagent.js"></script>

+ 1 - 1
SE/superedit-POKAZ_OFERTY_AKTUALNE_FUNC.php

@@ -8799,7 +8799,7 @@ class DealActivateRezygnacja {
 
 		$pokaz_oferty_view = new PokazOfertyView();
 		echo $pokaz_oferty_view->print_css();
-		echo $pokaz_oferty_view->print_jquery_ui();
+		//echo $pokaz_oferty_view->print_jquery_ui();
 		$pokaz_oferty_view->user_with_services($user, $active_deals_by_id);
 
 		if (1 == V::get('accept', 0, $_POST, 'int')) {

+ 1 - 1
SE/superedit-USERS2_OFFERS_GROUPS.php

@@ -1765,7 +1765,7 @@ jQuery(document).ready(function(){
 		Lib::loadClass('PokazOfertyView');
 		$view = new PokazOfertyView();
 		echo $view->print_css();
-		echo $view->print_jquery_ui();
+		//echo $view->print_jquery_ui();
 
 		$cols = array();
 		$cols []= 'ID';