Skip to content

Commit

Permalink
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into d…
Browse files Browse the repository at this point in the history
…evelop
  • Loading branch information
eldy committed May 29, 2017
2 parents d0f0108 + c651f1d commit 84a3cbb
Show file tree
Hide file tree
Showing 37 changed files with 2,384 additions and 1,720 deletions.
33 changes: 9 additions & 24 deletions htdocs/bookmarks/bookmarks.lib.php
Expand Up @@ -41,29 +41,15 @@ function printBookmarksList($aDb, $aLangs)
$langs->load("bookmarks");

$url= $_SERVER["PHP_SELF"].(! empty($_SERVER["QUERY_STRING"])?'?'.$_SERVER["QUERY_STRING"]:'');
// TODO Add post param to $url

$ret = '';

// Menu bookmark
/*
$ret.= '<div class="menu_titre">';
$ret.= '<table class="nobordernopadding" width="100%" summary="bookmarkstable"><tr><td>';
$ret.= '<a class="vmenu" href="'.DOL_URL_ROOT.'/bookmarks/list.php">'.$langs->trans('Bookmarks').'</a>';
$ret.= '</td><td align="right">';
if ($user->rights->bookmark->creer)
{
$ret.= '<a class="vsmenu addbookmarkpicto" href="'.DOL_URL_ROOT.'/bookmarks/card.php?action=create&amp;urlsource='.urlencode($url).'&amp;url='.urlencode($url).'">';
$ret.=img_object($langs->trans('AddThisPageToBookmarks'),'bookmark');
$ret.= '</a>';
}
$ret.= '</td></tr></table>';
$ret.= '</div>';
*/
$ret.= '<div class="menu_top"></div>'."\n";

$ret.= '<!-- form with POST method by default --><form id="actionbookmark" name="actionbookmark" method="POST" action="">';
$ret.= '<select name="bookmark" id="boxbookmark" class="flat boxcombo vmenusearchselectcombo">';
$ret.= '<!-- form with POST method by default, will be replaced with GET for external link by js -->'."\n";
$ret.= '<form id="actionbookmark" name="actionbookmark" method="POST" action="">';
$ret.= '<select name="bookmark" id="boxbookmark" class="flat boxcombo vmenusearchselectcombo" alt="Bookmarks">';
$ret.= '<option hidden value="listbookmarks" class="optiongrey" selected rel="'.DOL_URL_ROOT.'/bookmarks/list.php">'.$langs->trans('Bookmarks').'</option>';
$ret.= '<option value="listbookmark" class="optionblue" rel="'.dol_escape_htmltag(DOL_URL_ROOT.'/bookmarks/list.php').'">'.dol_escape_htmltag($user->rights->bookmark->creer ? $langs->trans('EditBookmarks') : $langs->trans('ListOfBookmarks')).'...</option>';
// Url to go on create new bookmark page
Expand All @@ -77,19 +63,18 @@ function printBookmarksList($aDb, $aLangs)
{
$sql = "SELECT rowid, title, url, target FROM ".MAIN_DB_PREFIX."bookmark";
$sql.= " WHERE (fk_user = ".$user->id." OR fk_user is NULL OR fk_user = 0)";
$sql.= " AND entity = ".$conf->entity;
$sql.= " AND entity IN (".getEntity('bookmarks',1).")";
$sql.= " ORDER BY position";
if ($resql = $db->query($sql) )
{
$i=0;
while ($i < $conf->global->BOOKMARKS_SHOW_IN_MENU && $obj = $db->fetch_object($resql))
{
//$ret.='<div class="menu_contenu">';
$ret.='<option name="bookmark'.$obj->rowid.'" value="'.$obj->rowid.'" '.($obj->target == 1?' target="_blank"':'').' rel="'.dol_escape_htmltag($obj->url).'">'.img_picto('','object_bookmark').' '.$obj->title.'</option>';
/*$ret.='<a class="vsmenu" title="'.$obj->title.'" href="'.$obj->url.'"'.($obj->target == 1?' target="_blank"':'').'>';
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $ret.=' '.img_object('','bookmark').' ';
$ret.= dol_trunc($obj->title, 20).'</a><br>';*/
//$ret.='</div>';
$ret.='<option name="bookmark'.$obj->rowid.'" value="'.$obj->rowid.'" '.($obj->target == 1?' target="_blank"':'').' rel="'.dol_escape_htmltag($obj->url).'">';
//$ret.='<span class="fa fa-print">aa</span>';
$ret.=img_picto('','object_bookmark').' ';
$ret.=$obj->title;
$ret.='</option>';
$i++;
}
}
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/ajax/check_notifications.php
Expand Up @@ -33,7 +33,7 @@

global $user, $db, $langs, $conf;

$time = (int) GETPOST('time'); // Use the time parameter that is always increased by time_update, even if call is late
$time = (int) GETPOST('time','int'); // Use the time parameter that is always increased by time_update, even if call is late
//$time=dol_now();


Expand Down
4 changes: 3 additions & 1 deletion htdocs/core/lib/files.lib.php
Expand Up @@ -54,7 +54,7 @@ function dol_basename($pathfile)
* @return array Array of array('name'=>'xxx','fullname'=>'/abc/xxx','date'=>'yyy','size'=>99,'type'=>'dir|file',...)
* @see dol_dir_list_indatabase
*/
function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefilter="", $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=false)
function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefilter="", $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0)
{
global $db, $hookmanager;
global $object;
Expand Down Expand Up @@ -483,6 +483,8 @@ function dolReplaceInFile($srcfile, $arrayreplacement, $destfile='', $newmask=0)

dol_delete_file($tmpdestfile);

// Create $newpathoftmpdestfile from $newpathofsrcfile




Expand Down
29 changes: 19 additions & 10 deletions htdocs/install/default.css
Expand Up @@ -289,11 +289,11 @@ div.comment {
}

h3 {
margin-top: 10px;
margin-top: 20px;
font-size:16px;
font-weight: normal;
color: #4965B3;
text-shadow: 1px 1px 1px #c0c0c0;
color: rgb(100,60,20);
/* text-shadow: 1px 1px 1px #c0c0c0; */
}

tr.bg1 {
Expand Down Expand Up @@ -345,15 +345,15 @@ ul {

.button {
background: #fcfcfc;
border: 1px solid #d0d0d0;
border: 1px solid #e0e0e0;
padding: 0.3em 0.7em;
margin: 0 0.5em;
-moz-border-radius:0 5px 0 5px;
-webkit-border-radius:0 5px 0 5px;
border-radius:0 5px 0 5px;
-moz-box-shadow: 2px 2px 3px #CCC;
-webkit-box-shadow: 2px 2px 3px #CCC;
box-shadow: 2px 2px 3px #CCC;
-moz-border-radius: 5px 5px 5px 5px;
-webkit-border-radius: 5px 5px 5px 5px;
border-radius: 5px 5px 5px 5px;
-moz-box-shadow: 2px 2px 3px #ddd;
-webkit-box-shadow: 2px 2px 3px #ddd;
box-shadow: 2px 2px 3px #ddd;
}
a.button:hover {
text-decoration:none;
Expand All @@ -368,3 +368,12 @@ a.button:hover {
.center {
text-align: center;
}

.valignmiddle {
vertical-align: middle;
}

.valigntextbottom {
vertical-align: text-bottom;
}

52 changes: 26 additions & 26 deletions htdocs/install/fileconf.php
Expand Up @@ -86,7 +86,7 @@

if (! empty($force_install_message))
{
print '<div><table><tr><td valign="middle"><img src="../theme/common/information.png" style="height:40px;"></td><td valign="middle">'.$langs->trans($force_install_message).'</td></tr></table>';
print '<div><br>'.$langs->trans($force_install_message).'</div>';

/*print '<script type="text/javascript">';
print ' jQuery(document).ready(function() {
Expand All @@ -109,8 +109,8 @@
<table class="nobordernopadding<?php if ($force_install_noedit) print ' hidewhennoedit'; ?>">

<tr>
<td colspan="3" class="label" align="center">
<h3><?php echo $langs->trans("WebServer"); ?></h3>
<td colspan="3" class="label">
<h3><img class="valigntextbottom" src="../theme/common/octicons/lib/svg/globe.svg" width="20" alt="webserver"> <?php echo $langs->trans("WebServer"); ?></h3>
</td>
</tr>

Expand All @@ -125,7 +125,7 @@
$dolibarr_main_document_root = detect_dolibarr_main_document_root();
}
?>
<td class="label" valign="top">
<td class="label tdtop">
<input type="text"
class="minwidth300"
value="<?php print $dolibarr_main_document_root ?>"
Expand Down Expand Up @@ -156,7 +156,7 @@ class="minwidth300"
$dolibarr_main_data_root = detect_dolibarr_main_data_root($dolibarr_main_document_root);
}
?>
<td class="label" valign="top">
<td class="label tdtop">
<input type="text"
class="minwidth300"
value="<?php print $dolibarr_main_data_root ?>"
Expand Down Expand Up @@ -210,7 +210,7 @@ class="minwidth300"
?>
<tr>
<td class="tdtop label"><?php echo $langs->trans("ForceHttps"); ?></td>
<td class="label" valign="top">
<td class="label tdtop">
<input type="checkbox"
name="main_force_https"
<?php if (!empty($force_install_mainforcehttps)) {
Expand All @@ -232,15 +232,15 @@ class="minwidth300"
<!-- Dolibarr database -->

<tr>
<td colspan="3" class="label" align="center"><br>
<h3><?php echo $langs->trans("DolibarrDatabase"); ?></h3>
<td colspan="3" class="label"><br>
<h3><img class="valigntextbottom" src="../theme/common/octicons/lib/svg/database.svg" width="20" alt="webserver"> <?php echo $langs->trans("DolibarrDatabase"); ?></h3>
</td>
</tr>

<tr>
<td class="label" valign="top"><b> <?php echo $langs->trans("DatabaseName"); ?>
<td class="label tdtop"><b> <?php echo $langs->trans("DatabaseName"); ?>
</b></td>
<td class="label" valign="top">
<td class="label tdtop">
<input type="text" id="db_name"
name="db_name"
value="<?php echo (!empty($dolibarr_main_db_name)) ? $dolibarr_main_db_name : ($force_install_database ? $force_install_database : 'dolibarr'); ?>"
Expand Down Expand Up @@ -371,9 +371,9 @@ class="minwidth300"
</tr>

<tr class="hidesqlite">
<td class="label" valign="top"><?php echo $langs->trans("DatabasePrefix"); ?>
<td class="label tdtop"><?php echo $langs->trans("DatabasePrefix"); ?>
</td>
<td class="label" valign="top">
<td class="label tdtop">
<input type="text" id="db_prefix"
name="db_prefix"
value="<?php echo(!empty($force_install_prefix) ? $force_install_prefix : (!empty($dolibarr_main_db_prefix) ? $dolibarr_main_db_prefix : 'llx_')); ?>"
Expand All @@ -386,9 +386,9 @@ class="minwidth300"
</tr>

<tr class="hidesqlite">
<td class="label" valign="top"><?php echo $langs->trans("CreateDatabase"); ?>
<td class="label tdtop"><?php echo $langs->trans("CreateDatabase"); ?>
</td>
<td class="label" valign="top">
<td class="label tdtop">
<input type="checkbox"
id="db_create_database"
name="db_create_database"
Expand All @@ -405,9 +405,9 @@ class="minwidth300"
</tr>

<tr class="hidesqlite">
<td class="label" valign="top"><b><?php echo $langs->trans("Login"); ?></b>
<td class="label tdtop"><b><?php echo $langs->trans("Login"); ?></b>
</td>
<td class="label" valign="top">
<td class="label tdtop">
<input type="text" id="db_user"
name="db_user"
value="<?php print (!empty($force_install_databaselogin)) ? $force_install_databaselogin : $dolibarr_main_db_user; ?>"
Expand All @@ -420,9 +420,9 @@ class="minwidth300"
</tr>

<tr class="hidesqlite">
<td class="label" valign="top"><b><?php echo $langs->trans("Password"); ?></b>
<td class="label tdtop"><b><?php echo $langs->trans("Password"); ?></b>
</td>
<td class="label" valign="top">
<td class="label tdtop">
<input type="password" id="db_pass" autocomplete="off"
name="db_pass"
value="<?php
Expand All @@ -442,9 +442,9 @@ class="minwidth300"
</tr>

<tr class="hidesqlite">
<td class="label" valign="top"><?php echo $langs->trans("CreateUser"); ?>
<td class="label tdtop"><?php echo $langs->trans("CreateUser"); ?>
</td>
<td class="label" valign="top">
<td class="label tdtop">
<input type="checkbox"
id="db_create_user" name="db_create_user"
<?php if (!empty($force_install_createuser)) {
Expand All @@ -466,14 +466,14 @@ class="minwidth300"
$force_install_databaserootpass = parse_database_pass($force_install_databaserootpass);
?>
<tr class="hidesqlite hideroot">
<td colspan="3" class="label" align="center"><br>
<h3><?php echo $langs->trans("DatabaseSuperUserAccess"); ?></h3>
<td colspan="3" class="label"><br>
<h3><img class="valigntextbottom" src="../theme/common/octicons/lib/svg/shield.svg" width="20" alt="webserver"> <?php echo $langs->trans("DatabaseSuperUserAccess"); ?></h3>
</td>
</tr>

<tr class="hidesqlite hideroot">
<td class="label" valign="top"><b><?php echo $langs->trans("Login"); ?></b></td>
<td class="label" valign="top">
<td class="label tdtop"><b><?php echo $langs->trans("Login"); ?></b></td>
<td class="label tdtop">
<input type="text"
id="db_user_root"
name="db_user_root"
Expand All @@ -496,9 +496,9 @@ class="needroot"

</tr>
<tr class="hidesqlite hideroot">
<td class="label" valign="top"><b><?php echo $langs->trans("Password"); ?></b>
<td class="label tdtop"><b><?php echo $langs->trans("Password"); ?></b>
</td>
<td class="label" valign="top">
<td class="label tdtop">
<input type="password"
autocomplete="off"
id="db_pass_root"
Expand Down
1 change: 1 addition & 0 deletions htdocs/langs/en_US/errors.lang
Expand Up @@ -18,6 +18,7 @@ ErrorFailToCreateFile=Failed to create file '<b>%s</b>'.
ErrorFailToRenameDir=Failed to rename directory '<b>%s</b>' into '<b>%s</b>'.
ErrorFailToCreateDir=Failed to create directory '<b>%s</b>'.
ErrorFailToDeleteDir=Failed to delete directory '<b>%s</b>'.
ErrorFailToMakeReplacementInto=Failed to make replacement into file '<b>%s</b>'.
ErrorThisContactIsAlreadyDefinedAsThisType=This contact is already defined as contact for this type.
ErrorCashAccountAcceptsOnlyCashMoney=This bank account is a cash account, so it accepts payments of type cash only.
ErrorFromToAccountsMustDiffers=Source and targets bank accounts must be different.
Expand Down
1 change: 1 addition & 0 deletions htdocs/langs/en_US/modulebuilder.lang
@@ -1,5 +1,6 @@
# Dolibarr language file - Source file is en_US - loan
ModuleBuilderDesc=This tools give you utilites to build or edit your own module.
EnterNameOfModuleDesc=Enter name of the module to create with no spaces. Use uppercase to separate words (For example: MyModule, EcommerceForShop, SyncWithMySystem...)
ModuleBuilderDesc2=Path were modules are generated/edited (first alternative directory defined into %s): <strong>%s</strong>
ModuleBuilderDesc3=Generated/editable modules found: <strong>%s</strong> (they are detected as editable when the file <strong>%s</strong> exists in root of module directory).
NewModule=New module
Expand Down

0 comments on commit 84a3cbb

Please sign in to comment.