public static function show_title_dialog($title, $post_action = null)
 {
     $defs = array();
     //        ControlFactory::add_vgap($defs, 50);
     ControlFactory::add_custom_close_dialog_and_apply_buffon($defs, 'apply_subscription', 'OK', 300, $post_action);
     return self::show_dialog($title, $defs);
 }
 public static function show_default_filter_selecor_modal($modalTitle, &$plugin_cookies, $post_action = null)
 {
     $defs = array();
     $movieFilters = array("all" => "All", "unwatched" => "Unwatched", "newest" => "Recently Released", "recentlyAdded" => "Recently Added", "recentlyViewed" => "Recently Viewed", "onDeck" => "On Deck", "collection" => "By Collection", "genre" => "By Genre", "year" => "By Year", "decade" => "By Decade", "director" => "By Director", "actor" => "By Starring Actor", "country" => "By Country", "contentRating" => "By Content Rating", "rating" => "By Rating", "resolution" => "By Resolution", "firstCharacter" => "By First Letter", "folder" => "By Folder");
     $showFilters = array("all" => "All", "unwatched" => "Unwatched", "newest" => "Recently Aired", "recentlyAdded" => "Recently Added", "recentlyViewed" => "Recently Viewed Episodes", "recentlyViewedShows" => "Recently Viewed Shows", "onDeck" => "On Deck", "collection" => "By Collection", "firstCharacter" => "By First Letter", "genre" => "By Genre", "year" => "By Year", "contentRating" => "By Content Rating", "folder" => "By Folder");
     $artistFilters = array("all" => "All Artists", "albums" => "By Album", "genre" => "By Genre", "decade" => "By Decade", "year" => "By Year", "collection" => "By Collection", "recentlyAdded" => "Recently Added", "folder" => "By Folder");
     ControlFactory::add_combobox($defs, null, null, $name = 'defaultMovieFilter', $title = 'Default movie filter', $initial_value = isset($plugin_cookies->defaultMovieFilter) ? $plugin_cookies->defaultMovieFilter : 'all', $value_caption_pairs = $movieFilters, $width = 600, $need_confirm = false, $need_apply = false);
     ControlFactory::add_combobox($defs, null, null, $name = 'defaultShowFilter', $title = 'Default show filter', $initial_value = isset($plugin_cookies->defaultShowFilter) ? $plugin_cookies->defaultShowFilter : 'all', $value_caption_pairs = $showFilters, $width = 600, $need_confirm = false, $need_apply = false);
     ControlFactory::add_combobox($defs, null, null, $name = 'defaultArtistFilter', $title = 'Default music filter', $initial_value = isset($plugin_cookies->defaultArtistFilter) ? $plugin_cookies->defaultArtistFilter : 'all', $value_caption_pairs = $artistFilters, $width = 600, $need_confirm = false, $need_apply = false);
     ControlFactory::add_custom_close_dialog_and_apply_buffon($defs, 'saveDefaultFilters', 'save', 200, $post_action);
     return ActionFactory::show_dialog($modalTitle, $defs);
 }
 public function showSearchScreen($key, $title, &$plugin_cookies)
 {
     hd_print(__METHOD__);
     // $base_url = EmplexerConfig::getInstance()->getPlexBaseUrl($plugin_cookies, $this);
     $url = $this->base_url . $key;
     $defs = array();
     ControlFactory::add_text_field($defs, null, null, $name = 'query', $title = $title, $initial_value = "", $numeric = false, $password = false, $has_osk = false, $always_active = 0, $width = 500);
     $params['key'] = $key;
     $searchAction = UserInputHandlerRegistry::create_action($this, 'search', $params);
     ControlFactory::add_custom_close_dialog_and_apply_buffon($defs, 'search', 'Search', 100, $searchAction);
     $dialog = ActionFactory::show_dialog('Search', $defs);
     // hd_print("search = " . print_r($dialog, true));
     return $dialog;
 }