Enqueue module assets on current page.
359984
public function enqueue_current_post_modules_assets() {

		global $more, $post;

		if ( $this->is_current_post_flexible( $post, $more ) ) {
			$layouts = $this->get_current_post_layouts( $post );

			foreach ( $layouts as $layout ) {

				if ( ! isset( $layout['acf_fc_layout'] ) || empty( $layout['acf_fc_layout'] ) ) {
					continue;
				}

				// Enqueue assets.
				$this->enqueue_module_assets( $layout['acf_fc_layout'] );
			}
		}
	}
379845
public void onModuleLoad() {
    VueGWT.init();

    // Inject JS Components
    HTMLScriptElement scriptElement =
        (HTMLScriptElement) DomGlobal.document.createElement("script");
    scriptElement.text = JsFilesResources.INSTANCE.jsComponents().getText();
    DomGlobal.document.body.appendChild(scriptElement);

    MelisandreComponentClientBundle.INSTANCE.melisandreComponentStyle().ensureInjected();
    Vue.customElement("animal-selector", AnimalSelectorComponentFactory.get());

    VueGwtExamplesService.initExamples();
  }
320175
def setup_asset_page(self, ):
        
        self.asset_asset_treev.header().setResizeMode(QtGui.QHeaderView.ResizeToContents)
        self.asset_task_tablev.horizontalHeader().setResizeMode(QtGui.QHeaderView.ResizeToContents)
673661
public static function _enqueue_assets() {
		$url    = Menu_Icons::get( 'url' );
		$suffix = kucrut_get_script_suffix();

		if ( defined( 'MENU_ICONS_SCRIPT_DEBUG' ) && MENU_ICONS_SCRIPT_DEBUG ) {
			$script_url = '//localhost:8081/';
		} else {
			$script_url = $url;
		}

		wp_enqueue_style(
			'menu-icons',
			"{$url}css/admin{$suffix}.css",
			false,
			Menu_Icons::VERSION
		);

		wp_enqueue_script(
			'menu-icons',
			"{$script_url}js/admin{$suffix}.js",
			self::$script_deps,
			Menu_Icons::VERSION,
			true
		);

		$customizer_url = add_query_arg(
			array(
				'autofocus[section]' => 'custom_css',
				'return'             => admin_url( 'nav-menus.php' ),
			),
			admin_url( 'customize.php' )
		);

		/**
		 * Allow plugins/themes to filter the settings' JS data
		 *
		 * @since 0.9.0
		 *
		 * @param array $js_data JS Data.
		 */
		$menu_current_theme = '';
		$theme              = wp_get_theme();
		if ( ! empty( $theme ) ) {
			if ( is_child_theme() ) {
				$menu_current_theme = $theme->parent()->get( 'Name' );
			} else {
				$menu_current_theme = $theme->get( 'Name' );
			}
		}
		$box_data = '<div id="menu-icons-sidebar">';
		if ( ( $menu_current_theme != 'Hestia' ) && ( $menu_current_theme != 'Hestia Pro' ) ) {

			$menu_upgrade_hestia_box_text = 'Check-out our latest FREE multi-purpose theme: <strong>Hestia</strong>';

			if ( $menu_current_theme == 'Zerif Lite' ) {
				$menu_upgrade_hestia_box_text = 'Check-out our latest FREE multi-purpose theme: <strong>Hestia</strong>, your Zerif Lite content will be imported automatically! ';
			}

			$menu_upgrade_hestia_url = add_query_arg(
				array(
					'theme' => 'hestia',
				), admin_url( 'theme-install.php' )
			);
			$box_data                .= '<div class="menu-icons-upgrade-hestia postbox new-card">';
			$box_data                .= '<p>' . wp_kses_post( $menu_upgrade_hestia_box_text ) . '</p>';
			$box_data                .= '<a class="button" href="' . $menu_upgrade_hestia_url . '" target="_blank">Preview Hestia</a>';
			$box_data                .= '</div>';
		}

		if ( ! empty( $_POST['menu_icons_mail'] ) ) {
			require( plugin_dir_path( __DIR__ ) . 'mailin.php' );
			$user_info = get_userdata( 1 );
			$mailin    = new Mailin( 'https://api.sendinblue.com/v2.0', 'cHW5sxZnzE7mhaYb' );
			$data      = array(
				'email'           => $_POST['menu_icons_mail'],
				'attributes'      => array(
					'NAME'    => $user_info->first_name,
					'SURNAME' => $user_info->last_name,
				),
				'blacklisted'     => 0,
				'listid'          => array( 145 ),
				'blacklisted_sms' => 0,
			);
			$status    = $mailin->create_update_user( $data );
			if ( $status['code'] == 'success' ) {
				update_option( 'menu_icons_subscribe', true );
			}
		}
		$email_output = '<div class="menu-icons-subscribe postbox new-card">';
		$email_output .= '<h3 class="title">' . esc_html__( 'Get Our Free Email Course', 'menu-icons' ) . '</h3>';
		$email_output .= '<div id="formdata"><p>' . esc_html__( 'Ready to learn how to reduce your website loading times by half? Come and join the 1st lesson here!', 'menu-icons' ) . ' </p><form class="menu-icons-submit-mail" method="post"><input name="menu_icons_mail" type="email" value="' . get_option( 'admin_email' ) . '" /><input id="ebutton" class="button" type="submit" value="Submit"></form></div>';
		$email_output .= '<p id="success">' . esc_html__( 'Thank you for subscribing! You have been added to the mailing list and will receive the next email information in the coming weeks. If you ever wish to unsubscribe, simply use the "Unsubscribe" link included in each newsletter.', 'menu-icons' ) . '</p>';
		$email_output .= '<p id="failiure">' . esc_html__( 'Unable to Subscribe.', 'menu-icons' ) . '</p>';
		$email_output .= '</div>';
		$email_output .= '</div>';
		$email_output .= '<script>';
		$email_output .= '$( \'#failiure\' ).hide();';
		$email_output .= '$( \'#success\' ).hide();';
		$email_output .= '$( \'form.menu-icons-submit-mail\' ).submit(function(event) {';
		$email_output .= 'event.preventDefault();';
		$email_output .= '$.ajax({';
		$email_output .= 'type: \'POST\',';
		$email_output .= 'data: $( \'form.menu-icons-submit-mail\' ).serialize(),';
		$email_output .= 'success: function(result) {';
		$email_output .= '$( \'#formdata\' ).hide();';
		$email_output .= '$( \'#success\' ).show();';
		$email_output .= '},';
		$email_output .= 'error: function(result) { $( \'#failiure\' ).show(); }';
		$email_output .= '}); });';
		$email_output .= '</script>';
		$shown        = (bool) get_option( 'menu_icons_subscribe', false );

		if ( $shown === true ) {
			$email_output = '';
		}
		$box_data .= $email_output;
		$js_data = apply_filters(
			'menu_icons_settings_js_data',
			array(
				'text'           => array(
					'title'        => __( 'Select Icon', 'menu-icons' ),
					'select'       => __( 'Select', 'menu-icons' ),
					'remove'       => __( 'Remove', 'menu-icons' ),
					'change'       => __( 'Change', 'menu-icons' ),
					'all'          => __( 'All', 'menu-icons' ),
					'preview'      => __( 'Preview', 'menu-icons' ),
					'settingsInfo' => sprintf(
						'<div> %1$s <p>' . esc_html__( 'Please note that the actual look of the icons on the front-end will also be affected by the style of your active theme. You can add your own CSS using %2$s or a plugin such as %3$s if you need to override it.', 'menu-icons' ) . '</p></div>',
						$box_data,
						sprintf(
							'<a href="%s">%s</a>',
							esc_url( $customizer_url ),
							esc_html__( 'the customizer', 'menu-icons' )
						),
						'<a target="_blank" href="https://wordpress.org/plugins/advanced-css-editor/">Advanced CSS Editor</a>'
					),
				),
				'settingsFields' => self::get_settings_fields(),
				'activeTypes'    => self::get( 'global', 'icon_types' ),
				'ajaxUrls'       => array(
					'update' => add_query_arg( 'action', 'menu_icons_update_settings', admin_url( '/admin-ajax.php' ) ),
				),
				'menuSettings'   => self::get_menu_settings( self::get_current_menu_id() ),
			)
		);

		wp_localize_script( 'menu-icons', 'menuIcons', $js_data );
	}
1323560
function BuildAssetsMiddleware (context)
{
  var grunt = context.grunt
    , options = context.options.assets;

  /**
   * Records which files have been already exported.
   * Prevents duplicate asset exports.
   * It's a map of absolute file names to boolean `true`.
   * @type {Object.<string,boolean>}
   */
  var exportedAssets = {};

  //--------------------------------------------------------------------------------------------------------------------
  // PUBLIC API
  //--------------------------------------------------------------------------------------------------------------------

  this.analyze = function (filesArray)
  {
    /* jshint unused: vars */
    // Do nothing
  };

  this.trace = function (module)
  {
    /* jshint unused: vars */
    // Do nothing.
  };

  this.build = function (targetScript)
  {
    if (!options.enabled) return;
    // Import file paths.
    var stylehseets = grunt.config (context.options.requiredStylesheets.exportToConfigProperty);
    if (!stylehseets) return; // No stylesheet sources are configured.
    var targetPath = path.dirname (targetScript);
    stylehseets.forEach (function (filePath)
    {
      var src = grunt.file.read (filePath);
      scan (path.dirname (filePath), targetPath, src);
    });

  };

  //--------------------------------------------------------------------------------------------------------------------
  // PRIVATE
  //--------------------------------------------------------------------------------------------------------------------

  /**
   * Scans a stylesheet for asset URL references and copies the assets to the build folder.
   * @private
   * @param {string} basePath
   * @param {string} targetPath
   * @param {string} sourceCode
   */
  function scan (basePath, targetPath, sourceCode)
  {
    var match;
    while ((match = MATCH_URLS.exec (sourceCode))) {
      var url = match[2];
      if (!url.match (/^http/i) && url[0] !== '/') { // Skip absolute URLs
        var absSrcPath = path.resolve (basePath, url)
          , absDestPath = path.resolve (targetPath, options.targetDir, url)
          , relDestPath = path.relative (targetPath, absDestPath);
        if (relDestPath[0] === '.')
          return util.warn ('Relative asset url falls outside the build folder: <cyan>%</cyan>%', url, util.NL);
        if (exportedAssets[absDestPath]) // skip already exported asset
          continue;
        else exportedAssets[absDestPath] = true;
        var absTargetFolder = path.dirname (absDestPath);
        grunt.file.mkdir (absTargetFolder);
        if (options.symlink)
          fs.symlinkSync (absSrcPath, absDestPath);
        else grunt.file.copy (absSrcPath, absDestPath);
      }
    }
  }

}
1016927
function (cb) {
            var self = this;

            Y.prepare([DEFAULT_THEME, themeDir], self.getProjectMeta(), function (err, opts) {
                opts.meta.title = self.data.project.name;
                opts.meta.projectRoot = './';
                opts.meta.projectAssets = './assets';
                opts.meta.projectLogo = self._resolveUrl(self.data.project.logo, opts);
                opts = self.populateClasses(opts);
                opts = self.populateModules(opts);

                var view = new Y.DocView(opts.meta);
                self.render('{{>index}}', view, opts.layouts.main, opts.partials, function (err, html) {
                    self.files++;
                    cb(html, view);
                });
            });
        }
785020
public function index()
    {
        $this->addJs('/modules/cms/assets/js/october.cmspage.js', 'core');
        $this->addJs('/modules/cms/assets/js/october.dragcomponents.js', 'core');
        $this->addJs('/modules/cms/assets/js/october.tokenexpander.js', 'core');
        $this->addCss('/modules/cms/assets/css/october.components.css', 'core');

        // Preload the code editor class as it could be needed
        // before it loads dynamically.
        $this->addJs('/modules/backend/formwidgets/codeeditor/assets/js/build-min.js', 'core');

        $this->bodyClass = 'compact-container';
        $this->pageTitle = 'cms::lang.cms.menu_label';
        $this->pageTitleTemplate = '%s '.trans($this->pageTitle);

        if (Request::ajax() && Request::input('formWidgetAlias')) {
            $this->bindFormWidgetToController();
        }
    }
28706
protected function _loadAssets()
    {
        $this->_View->Html->css('System./font-panel/fontpanel.css', ['block' => true]);
        $this->_View->Html->script('System./font-panel/fontpanel.js', ['block' => true]);
        $this->_View->Html->script('System./font-panel/font-panel-init.js', ['block' => true]);
    }
146217
private function addAssets(): void
    {
        $GLOBALS['TL_CSS'][] = Debug::uncompressedFile('bundles/codefogtags/selectize.min.css');
        $GLOBALS['TL_CSS'][] = Debug::uncompressedFile('bundles/codefogtags/backend.min.css');

        if (!\in_array('assets/jquery/js/jquery.min.js', (array) $GLOBALS['TL_JAVASCRIPT'], true)
            && !\in_array('assets/jquery/js/jquery.js', (array) $GLOBALS['TL_JAVASCRIPT'], true)
        ) {
            $GLOBALS['TL_JAVASCRIPT'][] = Debug::uncompressedFile('assets/jquery/js/jquery.min.js');
        }

        $GLOBALS['TL_JAVASCRIPT'][] = Debug::uncompressedFile('bundles/codefogtags/selectize.min.js');
        $GLOBALS['TL_JAVASCRIPT'][] = Debug::uncompressedFile('bundles/codefogtags/widget.min.js');
        $GLOBALS['TL_JAVASCRIPT'][] = Debug::uncompressedFile('bundles/codefogtags/backend.min.js');
    }
133236
public function enqueue_core() {

		// Register uix core asset.
		$this->core_assets();
		$this->enqueue_actions();
		// push assets to ui manager.
		uix()->set_assets( $this->assets );
		// done enqueuing - dpo inline or manual enqueue.
		$this->set_active_styles();
	}
616295
def create_assets_env(generator):
    """"""

    theme_static_dir = generator.settings['THEME_STATIC_DIR']
    assets_destination = os.path.join(generator.output_path, theme_static_dir)
    generator.env.assets_environment = Environment(
        assets_destination, theme_static_dir)

    if 'ASSET_CONFIG' in generator.settings:
        for item in generator.settings['ASSET_CONFIG']:
            generator.env.assets_environment.config[item[0]] = item[1]

    if 'ASSET_BUNDLES' in generator.settings:
        for name, args, kwargs in generator.settings['ASSET_BUNDLES']:
            generator.env.assets_environment.register(name, *args, **kwargs)

    if 'ASSET_DEBUG' in generator.settings:
        generator.env.assets_environment.debug = generator.settings['ASSET_DEBUG']
    elif logging.getLevelName(logger.getEffectiveLevel()) == "DEBUG":
        generator.env.assets_environment.debug = True

    for path in (generator.settings['THEME_STATIC_PATHS'] +
                 generator.settings.get('ASSET_SOURCE_PATHS', [])):
        full_path = os.path.join(generator.theme, path)
        generator.env.assets_environment.append_path(full_path)
1266416
function (scenarios) {
            var self = this;
            self.currentView = 'all';
            for (var i = 0; i < scenarios.length; i++) {
                if (scenarios[i].style.display != 'block') {
                    scenarios[i].style.display = 'block';
                }
            }
        }
539774
public function enqueue_scripts() {
		global $wp_customize;
		if ( self::$load || $wp_customize || is_customize_preview() ) {
			wp_enqueue_script( 'webfont-loader', URL::get_from_path( __DIR__ . '/assets/scripts/vendor-typekit/webfontloader.js' ), [], '3.0.28', true );
		}
	}
180687
public function enqueue() {
		parent::enqueue();

		// Enqueue the script.
		wp_enqueue_script( 'kirki-control-dimension', Dimension::get_control_path_url() . '/assets/scripts/control.js', [ 'jquery', 'customize-base', 'kirki-dynamic-control' ], Dimension::$control_ver, false );
		wp_enqueue_script( 'kirki-control-dimensions', URL::get_from_path( dirname( __DIR__ ) . '/assets/scripts/control.js' ), [ 'jquery', 'customize-base', 'kirki-dynamic-control' ], self::$control_ver, false );

		// Enqueue the style.
		wp_enqueue_style( 'kirki-control-dimensions-style', URL::get_from_path( dirname( __DIR__ ) . '/assets/styles/style.css' ), [], self::$control_ver );

		wp_localize_script(
			'kirki-control-dimensions',
			'dimensionskirkiL10n',
			[
				'left-top'       => esc_html__( 'Left Top', 'kirki' ),
				'left-center'    => esc_html__( 'Left Center', 'kirki' ),
				'left-bottom'    => esc_html__( 'Left Bottom', 'kirki' ),
				'right-top'      => esc_html__( 'Right Top', 'kirki' ),
				'right-center'   => esc_html__( 'Right Center', 'kirki' ),
				'right-bottom'   => esc_html__( 'Right Bottom', 'kirki' ),
				'center-top'     => esc_html__( 'Center Top', 'kirki' ),
				'center-center'  => esc_html__( 'Center Center', 'kirki' ),
				'center-bottom'  => esc_html__( 'Center Bottom', 'kirki' ),
				'font-size'      => esc_html__( 'Font Size', 'kirki' ),
				'font-weight'    => esc_html__( 'Font Weight', 'kirki' ),
				'line-height'    => esc_html__( 'Line Height', 'kirki' ),
				'font-style'     => esc_html__( 'Font Style', 'kirki' ),
				'letter-spacing' => esc_html__( 'Letter Spacing', 'kirki' ),
				'word-spacing'   => esc_html__( 'Word Spacing', 'kirki' ),
				'top'            => esc_html__( 'Top', 'kirki' ),
				'bottom'         => esc_html__( 'Bottom', 'kirki' ),
				'left'           => esc_html__( 'Left', 'kirki' ),
				'right'          => esc_html__( 'Right', 'kirki' ),
				'center'         => esc_html__( 'Center', 'kirki' ),
				'size'           => esc_html__( 'Size', 'kirki' ),
				'spacing'        => esc_html__( 'Spacing', 'kirki' ),
				'width'          => esc_html__( 'Width', 'kirki' ),
				'height'         => esc_html__( 'Height', 'kirki' ),
				'invalid-value'  => esc_html__( 'Invalid Value', 'kirki' ),
			]
		);
	}
175769
protected function _loadAssets()
    {
        if (Configure::read('CrudView.useAssetCompress')) {
            $this->AssetCompress->css('CrudView.crudview', ['block' => true]);
            $this->AssetCompress->script('CrudView.crudview_head', ['block' => 'headjs']);
            $this->AssetCompress->script('CrudView.crudview', ['block' => true]);

            return;
        }

        $config = Configure::read('CrudView');
        if (!$config) {
            return;
        }

        if (!empty($config['css'])) {
            $this->Html->css($config['css'], ['block' => true]);
        }

        if (!empty($config['js'])) {
            foreach ($config['js'] as $block => $scripts) {
                $this->Html->script($scripts, ['block' => $block]);
            }
        }
    }
555509
protected function render ()
  {
    $prop = $this->props;
    if (exists ($prop->src))
      $this->context->getAssetsService ()->addStylesheet ($prop->src, $this->props->prepend);
    else if ($this->hasChildren ())
      $this->context->getAssetsService ()->addInlineCss (self::getRenderingOfSet ($this->getChildren ()), $prop->name,
        $this->props->prepend);
  }
1229628
protected function scripts()
    {
        $assetService = $this->getServiceLocator()->get(AssetService::SERVICE_ID);
        $cssFiles = [
            $assetService->getAsset('css/layout.css', 'tao'),
            $assetService->getAsset('css/tao-main-style.css', 'tao'),
            $assetService->getAsset('css/tao-3.css', 'tao')
        ];

        //stylesheets to load
        \tao_helpers_Scriptloader::addCssFiles($cssFiles);

        if(\common_session_SessionManager::isAnonymous()) {
            \tao_helpers_Scriptloader::addCssFile(
                $assetService->getAsset('css/portal.css', 'tao')
            );
        }
    }