Toggle show source sections
326620
function() {
                $('.source_container').on('click', '.' + SourceCodeToggle, function (e) {
                    e.preventDefault();
                    var codeCnt = $(this).closest('.' + SourceCode);
                    codeCnt.toggleClass(SourceCodeMin);
                });
            }
1256141
function(source) {
            var
              api      = (settings.api)
                ? 1
                : 0,
              autoplay = (settings.autoplay)
                ? 1
                : 0,
              hd       = (settings.hd)
                ? 1
                : 0,
              showUI   = (settings.showUI)
                ? 1
                : 0,
              // opposite used for some params
              hideUI   = !(settings.showUI)
                ? 1
                : 0,
              url = ''
            ;
            if(source == 'vimeo') {
              url = ''
                +      'api='      + api
                + '&amp;title='    + showUI
                + '&amp;byline='   + showUI
                + '&amp;portrait=' + showUI
                + '&amp;autoplay=' + autoplay
              ;
              if(settings.color) {
                url += '&amp;color=' + settings.color;
              }
            }
            if(source == 'ustream') {
              url = ''
                + 'autoplay=' + autoplay
              ;
              if(settings.color) {
                url += '&amp;color=' + settings.color;
              }
            }
            else if(source == 'youtube') {
              url = ''
                +      'enablejsapi=' + api
                + '&amp;autoplay='    + autoplay
                + '&amp;autohide='    + hideUI
                + '&amp;hq='          + hd
                + '&amp;modestbranding=1'
              ;
              if(settings.color) {
                url += '&amp;color=' + settings.color;
              }
            }
            return url;
          }
1200686
function () {

			var headersLength = sourceHeaders.length;
			var minDistance = Number.MAX_VALUE;
			var closestHeader = -1;
			var fileNameInUrl = filename === '' ? '' : filename + '.' +  extension;

			if ((document.body.scrollTop || document.documentElement.scrollTop) < hashThreshold) {

				if (!!window.location.hash)	{
					currentHeader = -1;
					if (!!(window.history && history.pushState)) {
						window.history.replaceState({anchor: 0}, document.title, window.location.pathname);
					}
				}

				return;
			}

			// catch section which is closed for top window border
			for (var i=0; i < headersLength; i++) {

				if ((sourceHeaders[i].tagName === 'H3') && (!utils.hasClass(utils.closest(sourceHeaders[i], 'source_section'), 'source_section__open')) ) {
					continue;
				}

				var currentDist = Math.abs( utils.offsetTop(sourceHeaders[i]) - 60 - window.pageYOffset ); //60 = Header heights
				if (currentDist < minDistance) {
					closestHeader = i;
					minDistance = currentDist;
				}
			}

			if (closestHeader !== currentHeader) {
				utils.removeClass( document.querySelector('.source_main_nav_li.__active'), '__active');
				utils.removeClass( document.querySelector('.source_main_nav_a.__active'), '__active');

				utils.addClass(navHeaders[closestHeader], '__active');

				var parent = utils.closest(navHeaders[closestHeader], 'source_main_nav_li');
				var hashFromLink = navHeaders[closestHeader].getAttribute('href');

				if (!!parent && parent) {
					utils.addClass(parent, '__active');
				}

				if (_this.conf.updateHash) {
					// TODO: pause hash change when scrolling - append it only on stand-still

					// Modern browsers uses history API for correct back-button-browser functionality
					if (!!(window.history && history.pushState)) {
						window.history.replaceState({anchor: closestHeader+1}, document.title, fileNameInUrl + hashFromLink);
					} else { // ie9 fallback
						 window.location.hash = hashFromLink;
					}
				}

				currentHeader = closestHeader;
			}
		}
739860
function toggleTree(){
  // Do the actual toggling by modifying the class on the body element. That way we can get some nice CSS transitions going.
  if(sidebarVisible){
    document.body.className = document.body.className.replace(/\s*sidebar/g,'');
    sidebarVisible = false;
  }else{
    document.body.className += ' sidebar';
    sidebarVisible = true;
  }
  if(window.localStorage){
    if(sidebarVisible){
      window.localStorage.otis_showSidebar = 'yes';
    }else{
      window.localStorage.otis_showSidebar = 'no';
    }
  }
}
232904
def on_source_directory_chooser_clicked(self):
        """"""

        title = self.tr('Set the source directory for script and scenario')
        self.choose_directory(self.source_directory, title)
906688
def _update_show_toolbars_action(self):
        """"""
        if self.toolbars_visible:
            text = _("Hide toolbars")
            tip = _("Hide toolbars")
        else:
            text = _("Show toolbars")
            tip = _("Show toolbars")
        self.show_toolbars_action.setText(text)
        self.show_toolbars_action.setToolTip(tip)
979421
def OnTableListToggle(self, event):
        """"""

        table_list_panel_info = \
            self.main_window._mgr.GetPane("table_list_panel")

        self._toggle_pane(table_list_panel_info)

        event.Skip()
1048180
def show_help(self, wizard_step):
        """"""
        self.wizard_step = wizard_step

        header = html_header()
        footer = html_footer()

        content = header

        message = self.wizard_step.help()

        content += message.to_html()
        content += footer

        self.help_web_view.setHtml(content)

        # Store buttons' state
        self.next_button_state = self.parent.pbnNext.isEnabled()
        self.back_button_state = self.parent.pbnBack.isEnabled()

        # Disable those buttons
        self.parent.pbnNext.setEnabled(False)
        self.parent.pbnBack.setEnabled(False)
601486
function toggleview ( $suffix = '')
		{
			global $spancnt;

			$spancnt++;
			if ($suffix)
			{
				$suffix  .=  ':';
			}
			$ret =  '[' . $suffix . '<a href="javascript:void(\'\');" onclick="toggleVisibility(document.getElementById(\'Block' . $spancnt . '\'), this); return false">Hide Block</a>]<span id="Block' . $spancnt . '" style="display:block">';
			return $ret;
		}
615593
function showTooltipBind() {
              if (hasEnableExp && !scope.$eval(attrs[prefix + 'Enable'])) {
                return;
              }

              cancelHide();
              prepareTooltip();

              if (ttScope.popupDelay) {
                // Do nothing if the tooltip was already scheduled to pop-up.
                // This happens if show is triggered multiple times before any hide is triggered.
                if (!showTimeout) {
                  showTimeout = $timeout(show, ttScope.popupDelay, false);
                }
              } else {
                show();
              }
            }
1175230
public function sectionStdInsert()
	{
		$templates = Templates::getInstance();
		$templates->add(arg('name'), 'std', arg('code'), $this->stdTemplates[arg('name')]['caption']);
		HTTP::redirect(arg('submitURL'));
	}
224068
def toggle_all(self, checked):
        """"""
        self.parent_widget.sig_option_changed.emit('show_all', checked)
        self.show_all = checked
        self.set_show_all(checked)
1250341
function PDFOutlineViewer_toggleOutlineItem(root, show) {
            this.lastToggleIsShow = show;
            var togglers = root.querySelectorAll('.outlineItemToggler');
            for (var i = 0, ii = togglers.length; i < ii; ++i) {
              togglers[i].classList[show ? 'remove' : 'add']('outlineItemsHidden');
            }
          }
88883
def toggle_rich_text(self, checked):
        """"""
        if checked:
            self.docstring = not checked
            self.switch_to_rich_text()
        self.set_option('rich_mode', checked)
605575
function _toggleProjectScope() {
        if (_includeProjectScope() === projectScopeIsIncluded) {
            return;
        }
        if (projectScopeIsIncluded) {
            PreferencesImpl.manager.removeFromScopeOrder("project");
        } else {
            PreferencesImpl.manager.addToScopeOrder("project", "user");
        }
        projectScopeIsIncluded = !projectScopeIsIncluded;
    }
916151
def switch_to_rich_text(self):
        """"""
        self.rich_help = True
        self.plain_text.hide()
        self.rich_text.show()
        self.rich_text_action.setChecked(True)
        self.show_source_action.setChecked(False)
937111
def toggle_concatenate(self):
        """"""
        if not (self.chunk['epoch'].isChecked() and
                self.lock_to_staging.get_value()):
            for i,j in zip([self.idx_chan, self.idx_cycle, self.idx_stage,
                            self.idx_evt_type],
                   [self.cat['chan'], self.cat['cycle'],
                    self.cat['stage'], self.cat['evt_type']]):
                if len(i.selectedItems()) > 1:
                    j.setEnabled(True)
                else:
                    j.setEnabled(False)
                    j.setChecked(False)

        if not self.chunk['event'].isChecked():
            self.cat['evt_type'].setEnabled(False)

        if not self.cat['discontinuous'].get_value():
            self.cat['chan'].setEnabled(False)
            self.cat['chan'].setChecked(False)

        self.update_nseg()