forked from Wavyzz/dolibarr
Merge branch 'develop' of github.com:Dolibarr/dolibarr into develop#3
This commit is contained in:
@@ -547,6 +547,9 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null
|
||||
}
|
||||
} elseif (isset($user->default_values[$relativepathstring]['filters'])) {
|
||||
foreach ($user->default_values[$relativepathstring]['filters'] as $defkey => $defval) { // $defkey is a querystring like 'a=b&c=d', $defval is key of user
|
||||
if (!empty($_GET['disabledefaultvalues'])) { // If set of default values has been disabled by a request parameter
|
||||
continue;
|
||||
}
|
||||
$qualified = 0;
|
||||
if ($defkey != '_noquery_') {
|
||||
$tmpqueryarraytohave = explode('&', $defkey);
|
||||
@@ -1581,8 +1584,7 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename =
|
||||
* @param string $disabled Disabled text
|
||||
* @param string $morecss More CSS
|
||||
* @param string $backtopagejsfields The back to page must be managed using javascript instead of a redirect.
|
||||
* Value is 'Name of html component to set with id:Name of html component to set with label'
|
||||
* TODO Support this mode, for example when used from the page create a project on thirdparty creation.
|
||||
* Value is 'keyforpopupid:Name_of_html_component_to_set_with id,Name_of_html_component_to_set_with_label'
|
||||
* @return string HTML component with button
|
||||
*/
|
||||
function dolButtonToOpenUrlInDialogPopup($name, $label, $buttonstring, $url, $disabled = '', $morecss = 'button bordertransp', $backtopagejsfields = '')
|
||||
@@ -1597,10 +1599,16 @@ function dolButtonToOpenUrlInDialogPopup($name, $label, $buttonstring, $url, $di
|
||||
|
||||
$backtopagejsfieldsid = ''; $backtopagejsfieldslabel = '';
|
||||
if ($backtopagejsfields) {
|
||||
$url .= '&backtopagejsfields='.urlencode($backtopagejsfields);
|
||||
$tmpbacktopagejsfields = explode(':', $backtopagejsfields);
|
||||
$backtopagejsfieldsid = empty($tmpbacktopagejsfields[0]) ? '' : $tmpbacktopagejsfields[0];
|
||||
$backtopagejsfieldslabel = empty($tmpbacktopagejsfields[1]) ? '' : $tmpbacktopagejsfields[1];
|
||||
if (empty($tmpbacktopagejsfields[1])) { // If the part 'keyforpopupid:' is missing, we add $name for it.
|
||||
$backtopagejsfields = $name.":".$backtopagejsfields;
|
||||
$tmp2backtopagejsfields = explode(',', $tmpbacktopagejsfields[0]);
|
||||
} else {
|
||||
$tmp2backtopagejsfields = explode(',', $tmpbacktopagejsfields[1]);
|
||||
}
|
||||
$backtopagejsfieldsid = empty($tmp2backtopagejsfields[0]) ? '' : $tmp2backtopagejsfields[0];
|
||||
$backtopagejsfieldslabel = empty($tmp2backtopagejsfields[1]) ? '' : $tmp2backtopagejsfields[1];
|
||||
$url .= '&backtopagejsfields='.urlencode($backtopagejsfields);
|
||||
}
|
||||
|
||||
//print '<input type="submit" class="button bordertransp"'.$disabled.' value="'.dol_escape_htmltag($langs->trans("MediaFiles")).'" name="file_manager">';
|
||||
@@ -1623,7 +1631,7 @@ function dolButtonToOpenUrlInDialogPopup($name, $label, $buttonstring, $url, $di
|
||||
width: \'80%\',
|
||||
title: \''.dol_escape_js($label).'\',
|
||||
open: function (event, ui) {
|
||||
console.log("open popup");
|
||||
console.log("open popup name='.$name.', backtopagejsfields='.$backtopagejsfields.'");
|
||||
},
|
||||
close: function (event, ui) {
|
||||
returnedid = jQuery("#varforreturndialogid'.$name.'").text();
|
||||
@@ -1772,7 +1780,7 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab
|
||||
$out .= '<div class="tab tab'.($isactive?'active':'unactive').'" style="margin: 0 !important">';
|
||||
if (!empty($links[$i][0])) {
|
||||
$titletoshow = preg_replace('/<.*$/', '', $links[$i][1]);
|
||||
$out .= '<a'.(!empty($links[$i][2]) ? ' id="'.$links[$i][2].'"' : '').' class="tab inline-block'.($morecss ? ' '.$morecss : '').'" href="'.$links[$i][0].'" title="'.dol_escape_htmltag($titletoshow).'">';
|
||||
$out .= '<a'.(!empty($links[$i][2]) ? ' id="'.$links[$i][2].'"' : '').' class="tab inline-block valignmiddle'.($morecss ? ' '.$morecss : '').'" href="'.$links[$i][0].'" title="'.dol_escape_htmltag($titletoshow).'">';
|
||||
}
|
||||
$out .= $links[$i][1];
|
||||
if (!empty($links[$i][0])) {
|
||||
@@ -1820,7 +1828,7 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab
|
||||
if (empty($tabsname)) {
|
||||
$tabsname = str_replace("@", "", $picto);
|
||||
}
|
||||
$out .= '<div id="moretabs'.$tabsname.'" class="inline-block tabsElem">';
|
||||
$out .= '<div id="moretabs'.$tabsname.'" class="inline-block tabsElem valignmiddle">';
|
||||
$out .= '<div class="tab"><a href="#" class="tab moretab inline-block tabunactive"><span class="hideonsmartphone">'.$langs->trans("More").'</span>... ('.$nbintab.')</a></div>'; // Do not use "reposition" class in the "More".
|
||||
$out .= '<div id="moretabsList'.$tabsname.'" style="width: '.$widthofpopup.'px; position: absolute; '.$left.': -999em; text-align: '.$left.'; margin:0px; padding:2px; z-index:10;">';
|
||||
$out .= $outmore;
|
||||
|
||||
Reference in New Issue
Block a user