diff --git a/.travis.yml b/.travis.yml index db0f3196cf8..64744627dc5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -305,6 +305,9 @@ script: php upgrade.php 5.0.0 6.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade500600.log php upgrade2.php 5.0.0 6.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade500600-2.log php step5.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-3.log + php upgrade.php 6.0.0 7.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade600700.log + php upgrade2.php 6.0.0 7.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade600700-2.log + php step5.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-3.log cd - set +e echo diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 7d7347dfe70..508f71fdc86 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -3854,11 +3854,12 @@ class Facture extends CommonInvoice } $this->lines[$xnbp]=$line; - $xnbp++; $this->total_ht += $line->total_ht; $this->total_tva += $line->total_tva; $this->total_ttc += $line->total_ttc; + + $xnbp++; } $this->revenuestamp = 0; diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php index 1fd57089a11..3760dc04081 100644 --- a/htdocs/core/class/doleditor.class.php +++ b/htdocs/core/class/doleditor.class.php @@ -142,11 +142,12 @@ class DolEditor * Output depends on this->tool (fckeditor, ckeditor, textarea, ...) * * @param int $noprint 1=Return HTML string instead of printing it to output - * @param string $morejs Add more js. For example: ".on( \'saveSnapshot\', function(e) { alert(\'ee\'); });" - * @param boolean $disallowAnyContent Disallow to use any content. true=restrict to a predefined list of allowed elements. + * @param string $morejs Add more js. For example: ".on( \'saveSnapshot\', function(e) { alert(\'ee\'); });". Used by CKEditor only. + * @param boolean $disallowAnyContent Disallow to use any content. true=restrict to a predefined list of allowed elements. Used by CKEditor only. + * @param string $titlecontent Show title content before editor area. Used by ACE editor only. * @return void|string */ - function Create($noprint=0, $morejs='', $disallowAnyContent=true) + function Create($noprint=0, $morejs='', $disallowAnyContent=true, $titlecontent='') { global $conf,$langs; @@ -256,6 +257,26 @@ class DolEditor $format=(GETPOST('format','aZ09')?GETPOST('format','aZ09'):'php'); $out.= ''."\n"; + + if ($titlecontent) + { + $out.= '
'.$titlecontent; + $out.= '   -   '.dol_escape_htmltag($langs->trans("ShowMoreLines")).'     '; + $out.= '
'; + $out.= ''."\n"; + } + $out.= '
mode_reglement_code = 'CHQ';
         $this->note_public='This is a comment (public)';
         $this->note_private='This is a comment (private)';
-        // Lines
-        $nbp = 5;
-        $xnbp = 0;
-        while ($xnbp < $nbp)
-        {
-            $line=new FactureLigne($this->db);
-            $line->desc=$langs->trans("Description")." ".$xnbp;
-            $line->qty=1;
-            $line->subprice=100;
-            $line->pu_ht=100;		// the canelle template use pu_ht and not subprice
-            $line->price=100;
-            $line->tva_tx=19.6;
-            $line->localtax1_tx=0;
-            $line->localtax2_tx=0;
-			if ($xnbp == 2)
-			{
-			    $line->total_ht=50;
-			    $line->total_ttc=59.8;
-			    $line->total_tva=9.8;
-    			$line->remise_percent=50;
-			}
-			else
-			{
-			    $line->total_ht=100;
-			    $line->total_ttc=119.6;
-			    $line->total_tva=19.6;
-    			$line->remise_percent=0;
-			}
 
-            if ($num_prods > 0)
-            {
-				$prodid = mt_rand(1, $num_prods);
-            	$line->fk_product=$prodids[$prodid];
-            }
-            $line->product_type=0;
+		if (empty($option) || $option != 'nolines')
+		{
+	        // Lines
+	        $nbp = 5;
+	        $xnbp = 0;
+	        while ($xnbp < $nbp)
+	        {
+	            $line=new FactureLigne($this->db);
+	            $line->desc=$langs->trans("Description")." ".$xnbp;
+	            $line->qty=1;
+	            $line->subprice=100;
+	            $line->pu_ht=100;		// the canelle template use pu_ht and not subprice
+	            $line->price=100;
+	            $line->tva_tx=19.6;
+	            $line->localtax1_tx=0;
+	            $line->localtax2_tx=0;
+				if ($xnbp == 2)
+				{
+				    $line->total_ht=50;
+				    $line->total_ttc=59.8;
+				    $line->total_tva=9.8;
+	    			$line->remise_percent=50;
+				}
+				else
+				{
+				    $line->total_ht=100;
+				    $line->total_ttc=119.6;
+				    $line->total_tva=19.6;
+	    			$line->remise_percent=0;
+				}
 
-            $this->lines[$xnbp]=$line;
+	            if ($num_prods > 0)
+	            {
+					$prodid = mt_rand(1, $num_prods);
+	            	$line->fk_product=$prodids[$prodid];
+	            }
+	            $line->product_type=0;
 
-    		$this->total_ht       += $line->total_ht;
-    		$this->total_tva      += $line->total_tva;
-    		$this->total_ttc      += $line->total_ttc;
+	            $this->lines[$xnbp]=$line;
 
-            $xnbp++;
-        }
+	    		$this->total_ht       += $line->total_ht;
+	    		$this->total_tva      += $line->total_tva;
+	    		$this->total_ttc      += $line->total_ttc;
+
+	    		$xnbp++;
+	        }
+		}
 
         $this->amount_ht      = $xnbp*100;
         $this->total_ht       = $xnbp*100;
diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php
index b5cba7c7352..1fc949c6f02 100644
--- a/htdocs/modulebuilder/index.php
+++ b/htdocs/modulebuilder/index.php
@@ -760,7 +760,7 @@ $head[$h][2] = 'deletemodule';
 $h++;
 
 
-dol_fiche_head($head, $module, $langs->trans("Modules"), -1, 'generic');
+dol_fiche_head($head, $module, $langs->trans("Modules"), -1, 'generic');	// Modules
 
 if ($module == 'initmodule')
 {
@@ -871,8 +871,6 @@ elseif (! empty($module))
         print ' '.$linktoenabledisable;
         print '

'; - dol_fiche_head($head2, $tab, '', -1, ''); - if ($tab == 'description') { $pathtofile = $modulelowercase.'/core/modules/mod'.$module.'.class.php'; @@ -881,7 +879,9 @@ elseif (! empty($module)) if ($action != 'editfile' || empty($file)) { - print $langs->trans("ModuleBuilderDesc".$tab).'

'; + dol_fiche_head($head2, $tab, '', -1, ''); // Description - level 2 + + print $langs->trans("ModuleBuilderDesc".$tab).'

'; print ' '.$langs->trans("DescriptorFile").' : '.$pathtofile.''; print ' '.img_picto($langs->trans("Edit"), 'edit').''; @@ -978,10 +978,12 @@ elseif (! empty($module)) print $moduleobj->getChangeLog(); print ''; + + dol_fiche_end(); } else { - $fullpathoffile=dol_buildpath($file, 0); + $fullpathoffile=dol_buildpath($file, 0); // Description - level 2 $content = file_get_contents($fullpathoffile); @@ -993,28 +995,12 @@ elseif (! empty($module)) print ''; print ''; - $htmlname='editfilecontent'; + dol_fiche_head($head2, $tab, '', -1, ''); - $out.= '
'.$langs->trans("File").' : '.$file; - $out.= '   -   '.dol_escape_htmltag($langs->trans("ShowMoreLines")).'     '; - $out.= '
'; - $out.= ''."\n"; - print $out; + $doleditor=new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%', ''); + print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file); - $doleditor=new DolEditor($htmlname, $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%', ''); - print $doleditor->Create(1, '', false); + dol_fiche_end(); print '
'; print ''; @@ -1025,6 +1011,10 @@ elseif (! empty($module)) print ''; } } + else + { + dol_fiche_head($head2, $tab, '', -1, ''); // Level 2 + } if ($tab == 'specifications') @@ -1062,7 +1052,7 @@ elseif (! empty($module)) print ''; $doleditor=new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%'); - print $doleditor->Create(1, '', false); + print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file); print '
'; print '
'; print ''; @@ -1112,7 +1102,7 @@ elseif (! empty($module)) else $tabobj = 'newobject'; } - dol_fiche_head($head3, $tabobj, '', -1, ''); + dol_fiche_head($head3, $tabobj, '', -1, ''); // Level 3 if ($tabobj == 'newobject') { @@ -1324,7 +1314,7 @@ elseif (! empty($module)) print ''; $doleditor=new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%'); - print $doleditor->Create(1, '', false); + print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file); print '
'; print '
'; print ''; @@ -1335,6 +1325,8 @@ elseif (! empty($module)) print ''; } } + + dol_fiche_end(); // Level 3 } if ($tab == 'menus') @@ -1373,7 +1365,7 @@ elseif (! empty($module)) print ''; $doleditor=new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%'); - print $doleditor->Create(1, '', false); + print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file); print '
'; print '
'; print ''; @@ -1418,7 +1410,7 @@ elseif (! empty($module)) print ''; $doleditor=new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%'); - print $doleditor->Create(1, '', false); + print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file); print '
'; print '
'; print ''; @@ -1462,7 +1454,7 @@ elseif (! empty($module)) print ''; $doleditor=new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%'); - print $doleditor->Create(1, '', false); + print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file); print '
'; print '
'; print ''; @@ -1559,11 +1551,14 @@ elseif (! empty($module)) print ''; } - dol_fiche_end(); + if ($tab != 'description') + { + dol_fiche_end(); + } } } -dol_fiche_end(); +dol_fiche_end(); // End modules diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 4baaf59d51e..46650804063 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -3672,7 +3672,7 @@ a.cke_dialog_ui_button_ok span { bottom: 0; height: 20px; background-color: #ebebeb; - /* color: gray; */ + color: #666; } .ace_status-indicator { color: gray; @@ -3680,12 +3680,11 @@ a.cke_dialog_ui_button_ok span { right: 0; border-left: 1px solid; } -.aceeditorstatusbar { - +pre#editfilecontentaceeditorid { + margin-top: 5px; } - /* ============================================================================== */ /* File upload */ /* ============================================================================== */