Merge pull request #172 from Aeto-J/5.0/bugfixes
Fix dynaform preview that did not create new tab
This commit is contained in:
19
js/cases.js
19
js/cases.js
@@ -28,18 +28,21 @@ along with this plugin. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
glpi_pm = {
|
glpi_pm = {
|
||||||
add_tab_panel: function (name, title, html){
|
add_tab_panel: function (name, title, html){
|
||||||
//debugger ;
|
//debugger ;
|
||||||
var loctabs = $('#tabspanel').next('div[id^=tabs]');
|
var loctabs = $('#tabspanel');
|
||||||
if( !loctabs[0].children[name] ) { // panel is not yet existing, create one
|
if( !loctabs[0].children[name] ) { // panel is not yet existing, create one
|
||||||
if( loctabs.find('a[href=\"#'+name+'\"]').length == 0 ) {
|
if (loctabs.find('a[data-bs-target=\"#'+name+'\"]').length == 0 ) {
|
||||||
loctabs.find('ul').append( '<li><a href=\'#' + name + '\'>' + title + '</a></li>' );
|
loctabs.append("<li class='nav-item ms-0'><a class='nav-link justify-content-between pe-1' href='#' data-bs-toggle='tab' title='" + title + "' data-bs-target='#" + name + "'>" + title + "</a></li>" );
|
||||||
}
|
}
|
||||||
|
var select = loctabs.next('select');
|
||||||
loctabs.append( '<div id=\'' + name + '\'>' + html + '</div>');
|
select.append("<option value='" + (parseInt(select.children().last().val()) + 1) + "'>" + title + "</option >")
|
||||||
loctabs.tabs('refresh'); // to show the panel
|
var tabcontentdiv = select.next('div');
|
||||||
|
tabcontentdiv.append("<div class='tab-pane fade' role='tabpanel' id='" + name + "'>" + html + "</div>");
|
||||||
|
$("a[data-bs-target='#" +name +"']").tab("show");
|
||||||
|
//tabcontentdiv.tabs('refresh'); // to show the panel
|
||||||
}
|
}
|
||||||
// activate it
|
// activate it
|
||||||
var tabIndex = loctabs.find('a[href=\"#'+name+'\"]').parent().index();
|
//var tabIndex = loctabs.find('a[href=\"#'+name+'\"]').parent().index();
|
||||||
loctabs.tabs( 'option', 'active', tabIndex) ; // to activate it
|
// loctabs.tabs( 'option', 'active', tabIndex) ; // to activate it
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
<compatibility>9.5</compatibility>
|
<compatibility>9.5</compatibility>
|
||||||
</version>
|
</version>
|
||||||
<version>
|
<version>
|
||||||
<num>5.0.2</num>
|
<num>5.0.3</num>
|
||||||
<compatibility>10.0</compatibility>
|
<compatibility>10.0</compatibility>
|
||||||
</version>
|
</version>
|
||||||
</versions>
|
</versions>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this plugin. If not, see <http://www.gnu.org/licenses/>.
|
along with this plugin. If not, see <http://www.gnu.org/licenses/>.
|
||||||
--------------------------------------------------------------------------
|
--------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
define('PROCESSMAKER_VERSION', '5.0.2');
|
define('PROCESSMAKER_VERSION', '5.0.3');
|
||||||
|
|
||||||
// Minimal GLPI version, inclusive
|
// Minimal GLPI version, inclusive
|
||||||
define('PLUGIN_PROCESSMAKER_MIN_GLPI', '10.0');
|
define('PLUGIN_PROCESSMAKER_MIN_GLPI', '10.0');
|
||||||
|
|||||||
Reference in New Issue
Block a user