dist/styleguide/js/patternlab-viewer.js
function (patternPartial, panelID) {

		var els;

		// turn off all of the active tabs
		els = document.querySelectorAll('#pl-' + patternPartial + '-tabs .pl-js-tab-link');
		for (i = 0; i < els.length; ++i) {
			els[i].classList.remove('pl-is-active-tab');
		}

		// hide all of the panels
		els = document.querySelectorAll('#pl-' + patternPartial + '-panels .pl-js-tab-panel');
		for (i = 0; i < els.length; ++i) {
			els[i].classList.remove('pl-is-active-tab');
		}

		// add active tab class
		document.getElementById('pl-' + patternPartial + '-' + panelID + '-tab').classList.add('pl-is-active-tab');

		// show the panel
		document.getElementById('pl-' + patternPartial + '-' + panelID + '-panel').classList.add('pl-is-active-tab');

	}
function (patternPartial, panelID) {

		var els;

		// turn off all of the active tabs
		els = document.querySelectorAll('#pl-' + patternPartial + '-tabs .pl-js-tab-link');
		for (i = 0; i < els.length; ++i) {
			els[i].classList.remove('pl-is-active-tab');
		}

		// hide all of the panels
		els = document.querySelectorAll('#pl-' + patternPartial + '-panels .pl-js-tab-panel');
		for (i = 0; i < els.length; ++i) {
			els[i].classList.remove('pl-is-active-tab');
		}

		// add active tab class
		document.getElementById('pl-' + patternPartial + '-' + panelID + '-tab').classList.add('pl-is-active-tab');

		// show the panel
		document.getElementById('pl-' + patternPartial + '-' + panelID + '-panel').classList.add('pl-is-active-tab');

	}
function ( patternPartial , panelID ) { var els ; // turn off all of the active tabs els = document . querySelectorAll ( '#pl-' + patternPartial + '-tabs .pl-js-tab-link' ) ; for ( i = 0 ; i < els . length ; ++ i ) { els [ i ] . classList . remove ( 'pl-is-active-tab' ) ; } // hide all of the panels els = document . querySelectorAll ( '#pl-' + patternPartial + '-panels .pl-js-tab-panel' ) ; for ( i = 0 ; i < els . length ; ++ i ) { els [ i ] . classList . remove ( 'pl-is-active-tab' ) ; } // add active tab class document . getElementById ( 'pl-' + patternPartial + '-' + panelID + '-tab' ) . classList . add ( 'pl-is-active-tab' ) ; // show the panel document . getElementById ( 'pl-' + patternPartial + '-' + panelID + '-panel' ) . classList . add ( 'pl-is-active-tab' ) ; }
Show a specific modal
@param  {String}      the pattern partial for the modal
@param  {String}      the ID of the panel to be shown
Show a specific modal