Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
b2245e462a
@ -6976,34 +6976,37 @@ abstract class CommonObject
|
|||||||
if (!empty($conf->use_javascript_ajax)) {
|
if (!empty($conf->use_javascript_ajax)) {
|
||||||
$out .= '
|
$out .= '
|
||||||
<script>
|
<script>
|
||||||
jQuery(document).ready(function() {
|
jQuery(document).ready(function() {
|
||||||
function showOptions(child_list, parent_list)
|
function showOptions(child_list, parent_list, orig_select)
|
||||||
{
|
{
|
||||||
var val = $("select[name=\""+parent_list+"\"]").val();
|
var val = $("select[name=\""+parent_list+"\"]").val();
|
||||||
var parentVal = parent_list + ":" + val;
|
var parentVal = parent_list + ":" + val;
|
||||||
if(val > 0) {
|
if(val > 0) {
|
||||||
$("select[name=\""+child_list+"\"] option[parent]").hide();
|
var options = orig_select.find("option[parent=\""+parentVal+"\"]").clone();
|
||||||
$("select[name=\""+child_list+"\"] option[parent=\""+parentVal+"\"]").show();
|
$("select[name=\""+child_list+"\"] option[parent]").remove();
|
||||||
} else {
|
$("select[name=\""+child_list+"\"]").append(options);
|
||||||
$("select[name=\""+child_list+"\"] option").show();
|
} else {
|
||||||
}
|
var options = orig_select.find("option[parent]").clone();
|
||||||
}
|
$("select[name=\""+child_list+"\"] option[parent]").remove();
|
||||||
function setListDependencies() {
|
$("select[name=\""+child_list+"\"]").append(options);
|
||||||
jQuery("select option[parent]").parent().each(function() {
|
|
||||||
var child_list = $(this).attr("name");
|
|
||||||
var parent = $(this).find("option[parent]:first").attr("parent");
|
|
||||||
var infos = parent.split(":");
|
|
||||||
var parent_list = infos[0];
|
|
||||||
showOptions(child_list, parent_list);
|
|
||||||
|
|
||||||
$("select[name=\""+parent_list+"\"]").change(function() {
|
|
||||||
showOptions(child_list, parent_list);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
function setListDependencies() {
|
||||||
|
jQuery("select option[parent]").parent().each(function() {
|
||||||
|
var orig_select = {};
|
||||||
|
var child_list = $(this).attr("name");
|
||||||
|
orig_select[child_list] = $(this).clone();
|
||||||
|
var parent = $(this).find("option[parent]:first").attr("parent");
|
||||||
|
var infos = parent.split(":");
|
||||||
|
var parent_list = infos[0];
|
||||||
|
$("select[name=\""+parent_list+"\"]").change(function() {
|
||||||
|
showOptions(child_list, parent_list, orig_select[child_list]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
setListDependencies();
|
setListDependencies();
|
||||||
});
|
});
|
||||||
</script>'."\n";
|
</script>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -145,7 +145,7 @@ if ($permission)
|
|||||||
$newcardbutton = '';
|
$newcardbutton = '';
|
||||||
if (!empty($object->socid) && $object->socid > 1 && $user->rights->societe->creer)
|
if (!empty($object->socid) && $object->socid > 1 && $user->rights->societe->creer)
|
||||||
{
|
{
|
||||||
$newcardbutton .= '<a href="'.DOL_URL_ROOT.'/contact/card.php?socid='.$object->socid.'&action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id).'" title="'.$langs->trans('NewContact').'"><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>';
|
$newcardbutton .= '<a href="'.DOL_URL_ROOT.'/contact/card.php?socid='.$selectedCompany.'&action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id).'" title="'.$langs->trans('NewContact').'"><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>';
|
||||||
}
|
}
|
||||||
print $newcardbutton;
|
print $newcardbutton;
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -366,6 +366,8 @@ ALTER TABLE llx_facturedet ADD COLUMN ref_ext varchar(255) AFTER multicurrency_t
|
|||||||
ALTER TABLE llx_c_ticket_category ADD COLUMN fk_parent integer DEFAULT 0 NOT NULL;
|
ALTER TABLE llx_c_ticket_category ADD COLUMN fk_parent integer DEFAULT 0 NOT NULL;
|
||||||
ALTER TABLE llx_c_ticket_category ADD COLUMN force_severity varchar(32) NULL;
|
ALTER TABLE llx_c_ticket_category ADD COLUMN force_severity varchar(32) NULL;
|
||||||
|
|
||||||
|
ALTER TABLE llx_c_ticket_severity CHANGE color color VARCHAR(10) NULL;
|
||||||
|
|
||||||
ALTER TABLE llx_expensereport ADD COLUMN fk_user_creat integer NULL;
|
ALTER TABLE llx_expensereport ADD COLUMN fk_user_creat integer NULL;
|
||||||
|
|
||||||
ALTER TABLE llx_expensereport_ik ADD COLUMN ikoffset double DEFAULT 0 NOT NULL;
|
ALTER TABLE llx_expensereport_ik ADD COLUMN ikoffset double DEFAULT 0 NOT NULL;
|
||||||
|
|||||||
@ -22,7 +22,7 @@ create table llx_c_ticket_severity
|
|||||||
code varchar(32) NOT NULL,
|
code varchar(32) NOT NULL,
|
||||||
pos varchar(32) NOT NULL,
|
pos varchar(32) NOT NULL,
|
||||||
label varchar(128) NOT NULL,
|
label varchar(128) NOT NULL,
|
||||||
color varchar(10) NOT NULL,
|
color varchar(10) NULL,
|
||||||
active integer DEFAULT 1,
|
active integer DEFAULT 1,
|
||||||
use_default integer DEFAULT 1,
|
use_default integer DEFAULT 1,
|
||||||
description varchar(255)
|
description varchar(255)
|
||||||
|
|||||||
@ -1471,7 +1471,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0)
|
|||||||
print '</a>';
|
print '</a>';
|
||||||
|
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<a class="reposition paddingleft" href="'.$_SERVER["PHP_SELF"].'?id='.$task_time->fk_task.'&action=deletelin&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">';
|
print '<a class="reposition paddingleft" href="'.$_SERVER["PHP_SELF"].'?id='.$task_time->fk_task.'&action=deleteline&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">';
|
||||||
print img_delete('default', 'class="pictodelete paddingleft"');
|
print img_delete('default', 'class="pictodelete paddingleft"');
|
||||||
print '</a>';
|
print '</a>';
|
||||||
|
|
||||||
|
|||||||
@ -387,7 +387,7 @@ if ($result) {
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->free();
|
$db->free($result);
|
||||||
} else {
|
} else {
|
||||||
print '<tr><td colspan="6" class="opacitymedium">'.$langs->trans('NoUnreadTicketsFound').'</td></tr>';
|
print '<tr><td colspan="6" class="opacitymedium">'.$langs->trans('NoUnreadTicketsFound').'</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user