mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
N°3939 - Keep focus on current tab on object modification
This commit is contained in:
@@ -367,21 +367,6 @@ JS
|
|||||||
SetUserPreference(parent_id+'_'+this.id+'_height', $(this).height(), true); // true => persistent
|
SetUserPreference(parent_id+'_'+this.id+'_height', $(this).height(), true); // true => persistent
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
// Shortcut menu actions
|
|
||||||
$('.actions_button a').on('click', function() {
|
|
||||||
aMatches = /#(.*)$/.exec(window.location.href);
|
|
||||||
if (aMatches != null)
|
|
||||||
{
|
|
||||||
currentHash = aMatches[1];
|
|
||||||
if ( /#(.*)$/.test(this.href))
|
|
||||||
{
|
|
||||||
this.href = this.href.replace(/#(.*)$/, '#'+currentHash);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// End of Tabs handling
|
|
||||||
|
|
||||||
PrepareWidgets();
|
PrepareWidgets();
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ $('#{{ oUIBlock.GetId() }}').on('edit_object', function(){
|
|||||||
$(this).find('button[name="UI:Menu:Modify"]').click();
|
$(this).find('button[name="UI:Menu:Modify"]').click();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$('#{{ oUIBlock.GetId() }}').on('delete_object', function(){
|
$('#{{ oUIBlock.GetId() }}').on('delete_object', function(){
|
||||||
$(this).find('button[name="UI:Menu:Delete"]').click();
|
$(this).find('button[name="UI:Menu:Delete"]').click();
|
||||||
});
|
});
|
||||||
@@ -22,3 +21,14 @@ $('#{{ oUIBlock.GetId() }}').on('save_object', function(){
|
|||||||
$(this).find('button[type="submit"][name="submit"][value="submit"]').click();
|
$(this).find('button[type="submit"][name="submit"][value="submit"]').click();
|
||||||
});
|
});
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
// Keep URL's hash parameters when clicking on a link of the header
|
||||||
|
$('#{{ oUIBlock.GetId() }}').on('click', '[data-role="ibo-panel--header-right"] a', function() {
|
||||||
|
aMatches = /#(.*)$/.exec(window.location.href);
|
||||||
|
if (aMatches != null) {
|
||||||
|
currentHash = aMatches[1];
|
||||||
|
if (/#(.*)$/.test(this.href)) {
|
||||||
|
this.href = this.href.replace(/#(.*)$/, '#'+currentHash);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user