From 9b30f116f11250762f22a6031d1e47cc3d2f29fb Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Fri, 10 May 2013 12:48:11 +0200
Subject: [PATCH] Fix: Some lib missing when jmobile enabled.

---
 htdocs/categories/fiche.php                |  2 +-
 htdocs/core/class/html.formother.class.php | 24 +++++++++++++---------
 htdocs/main.inc.php                        |  8 +++++++-
 3 files changed, 22 insertions(+), 12 deletions(-)

diff --git a/htdocs/categories/fiche.php b/htdocs/categories/fiche.php
index 34a036156a3..c97d023f5b8 100644
--- a/htdocs/categories/fiche.php
+++ b/htdocs/categories/fiche.php
@@ -211,7 +211,7 @@ if ($user->rights->categorie->creer)
 
 		// Ref
 		print '<tr>';
-		print '<td width="25%" class="fieldrequired">'.$langs->trans("Ref").'</td><td><input id="label" name="label" size="25" value="'.$label.'">';
+		print '<td width="25%" class="fieldrequired">'.$langs->trans("Ref").'</td><td><input id="label" class="flat" name="label" size="25" value="'.$label.'">';
 		print'</td></tr>';
 
 		// Description
diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php
index c87f2df36dd..c3157c07124 100644
--- a/htdocs/core/class/html.formother.class.php
+++ b/htdocs/core/class/html.formother.class.php
@@ -1004,11 +1004,13 @@ class FormOther
                 }
             }
 
-            $emptybox->box_id='A';
-            $emptybox->info_box_head=array();
-            $emptybox->info_box_contents=array();
-            $emptybox->showBox(array(),array());
-
+            if (empty($conf->browser->phone))
+            {	
+            	$emptybox->box_id='A';
+            	$emptybox->info_box_head=array();
+            	$emptybox->info_box_contents=array();
+            	$emptybox->showBox(array(),array());
+            }
             print "</div>\n";
             print "<!-- End box container -->\n";
 
@@ -1033,11 +1035,13 @@ class FormOther
                 }
             }
 
-            $emptybox->box_id='B';
-            $emptybox->info_box_head=array();
-            $emptybox->info_box_contents=array();
-            $emptybox->showBox(array(),array());
-
+            if (empty($conf->browser->phone))
+            {	
+            	$emptybox->box_id='B';
+            	$emptybox->info_box_head=array();
+            	$emptybox->info_box_contents=array();
+            	$emptybox->showBox(array(),array());
+            }
             print "</div>\n";
             print "<!-- End box container -->\n";
 
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 6e03a9ac2ce..6bee9a606ca 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -984,7 +984,10 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
             if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || ! empty($conf->dol_use_jmobile))
             {
             	print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.css" />'."\n";
-            }
+            	//$arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css');
+            	print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/jquerytreeview/jquery.treeview.css" />'."\n";
+            }
+            
         }
 
         print '<!-- Includes CSS for Dolibarr theme -->'."\n";
@@ -1148,6 +1151,9 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
             if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || (! empty($conf->dol_use_jmobile) && $conf->dol_use_jmobile > 0))
             {
             	print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js"></script>'."\n";
+            	//$arrayofjs=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js');
+            	print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jquerytreeview/jquery.treeview.js"></script>'."\n";
+            	print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js"></script>'."\n";
             }
         }
 
-- 
GitLab