Open Modaal ----------------------------------------------------------------
421095
function() {
			var self = this;
			var modal_wrapper = $( '#' + self.scope.id );
			var animation_type = self.options.animation;

			if (animation_type === 'none' ){
				modal_wrapper.removeClass('modaal-start_none');
				self.options.after_open.call(self, modal_wrapper);
			}

			// Open with fade
			if (animation_type === 'fade') {
				modal_wrapper.removeClass('modaal-start_fade');
			}

			// Open with slide down
			if (animation_type === 'slide-down') {
				modal_wrapper.removeClass('modaal-start_slide_down');
			}

			var focusTarget = modal_wrapper;

			// Switch focusTarget tabindex (switch from other modal if exists)
			$('.modaal-wrapper *[tabindex=0]').removeAttr('tabindex');

			if ( self.options.type == 'image' ) {
				focusTarget = $('#' + self.scope.id).find('.modaal-gallery-item.' + self.private_options.active_class);

			} else if ( modal_wrapper.find('.modaal-iframe-elem').length ) {
				focusTarget = modal_wrapper.find('.modaal-iframe-elem');

			} else if ( modal_wrapper.find('.modaal-video-wrap').length ) {
				focusTarget = modal_wrapper.find('.modaal-video-wrap');

			} else {
				focusTarget = modal_wrapper.find('.modaal-focus');

			}

			// now set the focus
			focusTarget.attr('tabindex', '0').focus();

			// Run after_open
			if (animation_type !== 'none') {
				// CB: after_open
				setTimeout(function() {
					self.options.after_open.call(self, modal_wrapper)
				}, self.options.after_callback_delay);
			}
		}
654168
function pongOnTheFlyOpenDlg(id, modalName, resourceURL, params) {
  log( "PoNG-OnTheFly", "Open " + id + " " + modalName + " " + resourceURL );
  var viewCfg = getViewConfig( id );
  log( "PoNG-OnTheFly", "GET " + resourceURL + '/' + viewCfg.type );
  $.getJSON( resourceURL + '/' + viewCfg.type, function(pluginConfig) {
    log( "PoNG-OnTheFly", "Config loaded from " + resourceURL + '/'
        + viewCfg.type );
    $( '#' + id + modalName + 'Dialog' ).dialog( 'open' );
    $( '#' + id + modalName + 'DialogConfig' ).val(
        JSON.stringify( pluginConfig, null, "  " ) );
  } );
  if ( params && params.assistUrl ) {
    $.get( 
        params.assistUrl, 
        function(assistTxt) {
          log( "PoNG-OnTheFly", "Assistance loaded from " + params.assistUrl );
          $( '#' + id + modalName + 'DialogAssist' ).val( assistTxt );
        } 
      ).fail(
          function() { publishEvent( 'feedback', {'text': 'Can not load assistance ' } ) }
      );
  }
}
1343414
function () {
			this.writeDebug('modalClose');
			// Callback
			if (this.settings.callbackModalClose) {
				this.settings.callbackModalClose.call(this);
			}

			// Reset the filters
			filters = {};

			// Undo category selections
			$('.' + this.settings.overlay + ' select').prop('selectedIndex', 0);
			$('.' + this.settings.overlay + ' input').prop('checked', false);

			// Hide the modal
			$('.' + this.settings.overlay).hide();
		}
876821
function renderSaveModal() {
    var modal = null;
    if (this.state.saveModalIsOpen) {
      modal = React.createElement(_SaveModal2.default, { initialTitle: this.state.saveInitialTitle,
        tabWindow: this.state.saveTabWindow,
        onClose: this.closeSaveModal,
        onSubmit: this.doSave,
        appComponent: this
      });
    }

    return modal;
  }
330016
public function openModalForm($visit_date, $member_campaign_id, $top_term_id) {
    $response = new AjaxResponse();
    $memberCampaignStorage = $this->entityTypeManager->getStorage('openy_campaign_member_campaign');

    // Get the modal form using the form builder.
    $activityTrackingModalForm = $this->formBuilder->getForm('Drupal\openy_campaign\Form\ActivityTrackingModalForm', $visit_date, $member_campaign_id, $top_term_id);

    $memberCampaign = $memberCampaignStorage->load($member_campaign_id);
    /** @var \Drupal\node\Entity\Node $campaign */
    $campaign = $memberCampaign->getCampaign();
    // If member logged in.
    if (MemberCampaign::isLoggedIn($campaign->id())) {
      // Add an AJAX command to open a modal dialog with the form as the content.
      $response->addCommand(new OpenModalDialogCommand(t('Track activity'), $activityTrackingModalForm, ['width' => '800']));
    }

    return $response;
  }
390813
public function run()
    {
        echo "\n" . $this->renderBodyEnd();
        echo "\n" . $this->renderFooter();
        echo "\n" . Html::endTag('div'); // modal-content
        echo "\n" . Html::endTag('div'); // modal-dialog
        echo "\n" . Html::endTag('div');

        $this->registerPlugin('modal');
    }
947298
function() {

      var x, arr, el, configs, model, value, attr, parts, style;

      // setup config events
      arr = document.querySelectorAll('.hashedit-config, .hashedit-modal');

      for (x = 0; x < arr.length; x += 1) {

        // delegate on .hashedit-config
        ['propertychange', 'change', 'click', 'keyup', 'input', 'paste'].forEach
          (function(e) {

            arr[x].addEventListener(e, function(e) {

              el = e.target;

              if (el.hasAttribute('hashedit-cancel-modal')) {

                // hide .hashedit-config, .hashedit-modal
                configs = document.querySelectorAll(
                  '.hashedit-modal');

                for (x = 0; x < configs.length; x += 1) {
                  configs[x].removeAttribute('visible');
                }

              }

              // look for [data-model]
              if (el.hasAttribute('data-model')) {

                model = el.getAttribute('data-model');
                value = '';
                attr = '';

                value = el.value;

                if (model.indexOf('node.') != -1) {
                  parts = model.split('.');

                  // converts camelcase to hyphens, sets attribute
                  if (parts.length > 1) {

                    // get property
                    attr = parts[1].replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();

                    if(attr === 'html') {
                      hashedit.current.node.innerHTML = value;

                      hashedit.setupElementMenu(hashedit.current.node);
                    }
                    else { // other elements

                      // get currentValue
                      var old = hashedit.current.node.getAttribute(attr);

                      // set attribute
                      hashedit.current.node.setAttribute(attr, value);

                      if(hashedit.debug === true) {
                        console.log('setattribute on [data-model]');
                        console.log('attr=' + attr + 'value=' + value);
                      }

                      // create text style
                      style = hashedit.createTextStyle(hashedit.current.node);

                      hashedit.current.node.setAttribute('style', style);

                      // call change event
                      for (x = 0; x < hashedit.menu.length; x += 1) {

                        if(hashedit.current.node.matches(hashedit.menu[x].selector)) {
                          if(hashedit.menu[x].change) {
                            hashedit.menu[x].change(attr, value, old);
                          }

                        }

                      }

                    }


                  }
                }

                if (model.indexOf('link.') != -1) {
                  parts = model.split('.');

                  // converts camelcase to hyphens, sets attribute
                  if (parts.length > 1) {

                    // get property
                    attr = parts[1].replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();

                    // set attribute
                    hashedit.currLink.setAttribute(attr, value);

                    // get current node
                    if(hashedit.current.node == null){
                      hashedit.current.node = hashedit.findParentBySelector(hashedit.currLink, '[hashedit-element]');
                    }

                    // fire event
                    hashedit.current.node.dispatchEvent(new Event(
                      'input', {
                        'bubbles': true
                      }));

                  }
                }

                if (model.indexOf('image.') != -1) {
                  parts = model.split('.');

                  // converts camelcase to hyphens, sets attribute
                  if (parts.length > 1) {

                    // get property
                    attr = parts[1].replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();

                    // set attribute
                    hashedit.current.image.setAttribute(attr, value);

                    hashedit.current.node = hashedit.findParentBySelector(hashedit.current.image, '[hashedit-element]');

                    // fire event
                    if (hashedit.current.node !== null) {

                      hashedit.current.node.dispatchEvent(new Event(
                        'input', {
                          'bubbles': true
                        }));
                    }

                  }
                }

              }

            }, false);

          });

      }

    }
960146
function modaal_inline_options(self) {

		// new empty options
		var options = {};
		var inline_options = false;

		// option: type
		if ( self.attr('data-modaal-type') ) {
			inline_options = true;
			options.type = self.attr('data-modaal-type');
		}

		// option: type
		if ( self.attr('data-modaal-content-source') ) {
			inline_options = true;
			options.content_source = self.attr('data-modaal-content-source');
		}

		// option: animation
		if ( self.attr('data-modaal-animation') ) {
			inline_options = true;
			options.animation = self.attr('data-modaal-animation');
		}

		// option: animation_speed
		if ( self.attr('data-modaal-animation-speed') ) {
			inline_options = true;
			options.animation_speed = self.attr('data-modaal-animation-speed');
		}

		// option: after_callback_delay
		if ( self.attr('data-modaal-after-callback-delay') ) {
			inline_options = true;
			options.after_callback_delay = self.attr('data-modaal-after-callback-delay');
		}

		// option: is_locked
		if ( self.attr('data-modaal-is-locked') ) {
			inline_options = true;
			options.is_locked = (self.attr('data-modaal-is-locked') === 'true' ? true : false);
		}

		// option: hide_close
		if ( self.attr('data-modaal-hide-close') ) {
			inline_options = true;
			options.hide_close = (self.attr('data-modaal-hide-close') === 'true' ? true : false);
		}

		// option: background
		if ( self.attr('data-modaal-background') ) {
			inline_options = true;
			options.background = self.attr('data-modaal-background');
		}

		// option: overlay_opacity
		if ( self.attr('data-modaal-overlay-opacity') ) {
			inline_options = true;
			options.overlay_opacity = self.attr('data-modaal-overlay-opacity');
		}

		// option: overlay_close
		if ( self.attr('data-modaal-overlay-close') ) {
			inline_options = true;
			options.overlay_close = (self.attr('data-modaal-overlay-close') === 'false' ? false : true);
		}

		// option: accessible_title
		if ( self.attr('data-modaal-accessible-title') ) {
			inline_options = true;
			options.accessible_title = self.attr('data-modaal-accessible-title');
		}

		// option: start_open
		if ( self.attr('data-modaal-start-open') ) {
			inline_options = true;
			options.start_open = (self.attr('data-modaal-start-open') === 'true' ? true : false);
		}

		// option: fullscreen
		if ( self.attr('data-modaal-fullscreen') ) {
			inline_options = true;
			options.fullscreen = (self.attr('data-modaal-fullscreen') === 'true' ? true : false);
		}

		// option: custom_class
		if ( self.attr('data-modaal-custom-class') ) {
			inline_options = true;
			options.custom_class = self.attr('data-modaal-custom-class');
		}

		// option: close_text
		if ( self.attr('data-modaal-close-text') ) {
			inline_options = true;
			options.close_text = self.attr('data-modaal-close-text');
		}

		// option: close_aria_label
		if ( self.attr('data-modaal-close-aria-label') ) {
			inline_options = true;
			options.close_aria_label = self.attr('data-modaal-close-aria-label');
		}

		// option: background_scroll
		if ( self.attr('data-modaal-background-scroll') ) {
			inline_options = true;
			options.background_scroll = (self.attr('data-modaal-background-scroll') === 'true' ? true : false);
		}

		// option: width
		if ( self.attr('data-modaal-width') ) {
			inline_options = true;
			options.width = parseInt( self.attr('data-modaal-width') );
		}

		// option: height
		if ( self.attr('data-modaal-height') ) {
			inline_options = true;
			options.height = parseInt( self.attr('data-modaal-height') );
		}

		// option: confirm_button_text
		if ( self.attr('data-modaal-confirm-button-text') ) {
			inline_options = true;
			options.confirm_button_text = self.attr('data-modaal-confirm-button-text');
		}

		// option: confirm_cancel_button_text
		if ( self.attr('data-modaal-confirm-cancel-button-text') ) {
			inline_options = true;
			options.confirm_cancel_button_text = self.attr('data-modaal-confirm-cancel-button-text');
		}

		// option: confirm_title
		if ( self.attr('data-modaal-confirm-title') ) {
			inline_options = true;
			options.confirm_title = self.attr('data-modaal-confirm-title');
		}

		// option: confirm_content
		if ( self.attr('data-modaal-confirm-content') ) {
			inline_options = true;
			options.confirm_content = self.attr('data-modaal-confirm-content');
		}

		// option: gallery_active_class
		if ( self.attr('data-modaal-gallery-active-class') ) {
			inline_options = true;
			options.gallery_active_class = self.attr('data-modaal-gallery-active-class');
		}

		// option: loading_content
		if ( self.attr('data-modaal-loading-content') ) {
			inline_options = true;
			options.loading_content = self.attr('data-modaal-loading-content');
		}

		// option: loading_class
		if ( self.attr('data-modaal-loading-class') ) {
			inline_options = true;
			options.loading_class = self.attr('data-modaal-loading-class');
		}

		// option: ajax_error_class
		if ( self.attr('data-modaal-ajax-error-class') ) {
			inline_options = true;
			options.ajax_error_class = self.attr('data-modaal-ajax-error-class');
		}

		// option: start_open
		if ( self.attr('data-modaal-instagram-id') ) {
			inline_options = true;
			options.instagram_id = self.attr('data-modaal-instagram-id');
		}

		// now set it up for the trigger, but only if inline_options is true
		if ( inline_options ) {
			self.modaal(options);
		}
	}
791701
function open()
    {
        if (!$this->_opened) {
            $win = $this->_name;
            $styles = $this->_styles;

            if (!empty($this->_ident)) {
                $identHeader = "$win.document.writeln('<th>Ident</th>')";
            } else {
                $identHeader = '';
            }

            echo <<< EOT
<script language="JavaScript">
$win = window.open('', '{$this->_name}', 'toolbar=no,scrollbars,width=600,height=400');
$win.document.writeln('<html>');
$win.document.writeln('<head>');
$win.document.writeln('<title>{$this->_title}</title>');
$win.document.writeln('<style type="text/css">');
$win.document.writeln('body { font-family: monospace; font-size: 8pt; }');
$win.document.writeln('td,th { font-size: 8pt; }');
$win.document.writeln('td,th { border-bottom: #999999 solid 1px; }');
$win.document.writeln('td,th { border-right: #999999 solid 1px; }');
$win.document.writeln('tr { text-align: left; vertical-align: top; }');
$win.document.writeln('td.l0 { $styles[0] }');
$win.document.writeln('td.l1 { $styles[1] }');
$win.document.writeln('td.l2 { $styles[2] }');
$win.document.writeln('td.l3 { $styles[3] }');
$win.document.writeln('td.l4 { $styles[4] }');
$win.document.writeln('td.l5 { $styles[5] }');
$win.document.writeln('td.l6 { $styles[6] }');
$win.document.writeln('td.l7 { $styles[7] }');
$win.document.writeln('</style>');
$win.document.writeln('<script type="text/javascript">');
$win.document.writeln('function scroll() {');
$win.document.writeln(' body = document.getElementById("{$this->_name}");');
$win.document.writeln(' body.scrollTop = body.scrollHeight;');
$win.document.writeln('}');
$win.document.writeln('<\/script>');
$win.document.writeln('</head>');
$win.document.writeln('<body id="{$this->_name}" onclick="scroll()">');
$win.document.writeln('<table border="0" cellpadding="2" cellspacing="0">');
$win.document.writeln('<tr><th>Time</th>');
$identHeader
$win.document.writeln('<th>Priority</th><th width="100%">Message</th></tr>');
</script>
EOT;
            $this->_opened = true;
        }

        return $this->_opened;
    }
569430
function() {
    
    var obj;
    
    // not that the modal viewer is no longer active
    DataSaver.updateValue('modalActive', 'false');
    modalViewer.active = false;
    
    //Add active class to modal
    $('#sg-modal-container').removeClass('active');
    
    // remove the active class from all of the checkbox items
    $('.sg-checkbox').removeClass('active');
    
    // hide the modal
    modalViewer.hide();
    
    // update the wording
    $('#sg-t-patterninfo').html("Show Pattern Info");
    
    // tell the styleguide to close
    obj = JSON.stringify({ 'event': 'patternLab.patternModalClose' });
    document.getElementById('sg-viewport').contentWindow.postMessage(obj, modalViewer.targetOrigin);
    
  }
814216
function() {
      if (this.dialog_.hasAttribute('open')) {
        throw new Error('Failed to execute \'showModal\' on dialog: The element is already open, and therefore cannot be opened modally.');
      }
      if (!document.body.contains(this.dialog_)) {
        throw new Error('Failed to execute \'showModal\' on dialog: The element is not in a Document.');
      }
      if (!dialogPolyfill.dm.pushDialog(this)) {
        throw new Error('Failed to execute \'showModal\' on dialog: There are too many open modal dialogs.');
      }
      this.show();
      this.openAsModal_ = true;

      // Optionally center vertically, relative to the current viewport.
      if (dialogPolyfill.needsCentering(this.dialog_)) {
        dialogPolyfill.reposition(this.dialog_);
        this.replacedStyleTop_ = true;
      } else {
        this.replacedStyleTop_ = false;
      }

      // Insert backdrop.
      this.backdrop_.addEventListener('click', this.backdropClick_);
      this.dialog_.parentNode.insertBefore(this.backdrop_,
          this.dialog_.nextSibling);

      // Find element with `autofocus` attribute or first form control.
      var target = this.dialog_.querySelector('[autofocus]:not([disabled])');
      if (!target) {
        // TODO: technically this is 'any focusable area'
        var opts = ['button', 'input', 'keygen', 'select', 'textarea'];
        var query = opts.map(function(el) {
          return el + ':not([disabled])';
        }).join(', ');
        target = this.dialog_.querySelector(query);
      }
      safeBlur(document.activeElement);
      target && target.focus();
    }
1233543
public static void addModal(JFrame frame, Component component,
							  ModalListener listener, Integer modalDepth) {
	addModal_(frame, component, listener, modalDepth);
  }
221175
public void show(boolean modal) {
    if (modal) {
      dialog.initModality(Modality.APPLICATION_MODAL);
      dialog.showAndWait();
    } else {
      dialog.initModality(Modality.NONE);
      dialog.show();
    }
  }
903251
function Modal(el, options) {
      _classCallCheck(this, Modal);

      var _this13 = _possibleConstructorReturn(this, (Modal.__proto__ || Object.getPrototypeOf(Modal)).call(this, Modal, el, options));

      _this13.el.M_Modal = _this13;

      /**
       * Options for the modal
       * @member Modal#options
       * @prop {Number} [opacity=0.5] - Opacity of the modal overlay
       * @prop {Number} [inDuration=250] - Length in ms of enter transition
       * @prop {Number} [outDuration=250] - Length in ms of exit transition
       * @prop {Function} onOpenStart - Callback function called before modal is opened
       * @prop {Function} onOpenEnd - Callback function called after modal is opened
       * @prop {Function} onCloseStart - Callback function called before modal is closed
       * @prop {Function} onCloseEnd - Callback function called after modal is closed
       * @prop {Boolean} [dismissible=true] - Allow modal to be dismissed by keyboard or overlay click
       * @prop {String} [startingTop='4%'] - startingTop
       * @prop {String} [endingTop='10%'] - endingTop
       */
      _this13.options = $.extend({}, Modal.defaults, options);

      /**
       * Describes open/close state of modal
       * @type {Boolean}
       */
      _this13.isOpen = false;

      _this13.id = _this13.$el.attr('id');
      _this13._openingTrigger = undefined;
      _this13.$overlay = $('<div class="modal-overlay"></div>');
      _this13.el.tabIndex = 0;
      _this13._nthModalOpened = 0;

      Modal._count++;
      _this13._setupEventHandlers();
      return _this13;
    }
243713
public function run() {
		
		$id = $this->htmlOptions['id'];

		echo CHtml::closeTag('div'); //modal-content
        	echo CHtml::closeTag('div'); //modal-dialog
        	echo CHtml::closeTag('div'); //modal

		/** @var CClientScript $cs */
		$cs = Yii::app()->getClientScript();

		$options = !empty($this->options) ? CJavaScript::encode($this->options) : '';
		$cs->registerScript(__CLASS__ . '#' . $id, "jQuery('#{$id}').modal({$options});");

		foreach ($this->events as $name => $handler) {
			$handler = CJavaScript::encode($handler);
			$cs->registerScript(__CLASS__ . '#' . $id . '_' . $name, "jQuery('#{$id}').on('{$name}', {$handler});");
		}
	}
777125
function() {
    
    // make sure the modal viewer and other options are off just in case
    modalViewer.close();

    // note it's turned on in the viewer
    DataSaver.updateValue('modalActive', 'true');
    modalViewer.active = true;

    // add an active class to the button that matches this template
    $('#sg-t-'+modalViewer.template+' .sg-checkbox').addClass('active');

    //Add active class to modal
    $('#sg-modal-container').addClass('active');
    
    // show the modal
    modalViewer.show();
    
  }
1371027
function () {
            // --------------------------------------------------- destructuring

            var cfg = this._cfg;

            var modal = cfg.modal;
            var waiAria = cfg.waiAria;

            // ------------------------------------------------------ processing

            // refreshParams ---------------------------------------------------

            var refreshParams = {
                section : "__dialog_" + this._domId,
                writerCallback : {
                    fn : this._writerCallback,
                    scope : this
                }
            };

            // popupContainer --------------------------------------------------

            var popupContainer = PopupContainerManager.createPopupContainer(cfg.container);
            this._popupContainer = popupContainer;

            // previouslyFocusedElement ----------------------------------------

            if (modal) {
                this._previouslyFocusedElement = Aria.$window.document.activeElement;
            }

            // optionsBeforeMaximize -------------------------------------------
            // store current options to reapply them when unmaximized

            this._optionsBeforeMaximize = this._createOptionsBeforeMaximize(cfg);

            // section ---------------------------------------------------------

            var section = this._context.getRefreshedSection(refreshParams);

            // popup -----------------------------------------------------------

            var popup = new ariaPopupsPopup();

            this._popup = popup;

            popup.$on({
                "onAfterOpen" : this._onAfterPopupOpen,
                "onEscape" : this._onEscape,
                "onAfterClose" : this._onAfterPopupClose,
                scope : this
            });

            if (cfg.closeOnMouseClick) {
                popup.$on({
                    "onMouseClickClose" : this._onMouseClickClose,
                    scope : this
                });
            }

            popup.open({
                section : section,
                keepSection : true,
                absolutePosition : {
                    left : cfg.xpos,
                    top : cfg.ypos
                },
                center : cfg.center,
                maximized : cfg.maximized,
                offset : cfg.maximized ? this._shadows : this._shadowsZero,
                modal : modal,
                maskCssClass : "xDialogMask",
                popupContainer : popupContainer,
                closeOnMouseClick : cfg.closeOnMouseClick,
                closeOnMouseScroll : false,
                parentDialog : this,
                zIndexKeepOpenOrder : false, // allows to re-order dialogs (dynamic z-index)
                role: modal ? "dialog" : null,
                labelId: modal ? this.__getLabelId() : null,
                waiAria: waiAria
            });

            // hiddenElements --------------------------------------------------

            if (modal && waiAria) {
                var container = popupContainer.getContainerElt();
                this._showBack = DomNavigationManager.hidingManager.hideOthers(popup.domElement, function (element) {
                     return element != null && element !== container;
                });
            }

            // -----------------------------------------------------------------

            // must be registered before we check for _cfg.maximized, to fire the event correctly after overflow change
            ariaTemplatesLayout.$on({
                "viewportResized" : this._onViewportResized,
                scope : this
            });

            // -----------------------------------------------------------------

            // in case when bound "maximized" was toggled while Dialog was not visible
            if (cfg.maximized) {
                this._setContainerOverflow("hidden");
                this._setMaximizedHeightAndWidth();
            }

            this._firstEscapeTime = null;
        }