diff --git a/wire/config.php b/wire/config.php index 7c43b624..32c8db0c 100644 --- a/wire/config.php +++ b/wire/config.php @@ -1003,6 +1003,7 @@ $config->pageList = array( * #property bool confirm Notify user if they attempt to navigate away from unsaved changes? * #property bool ajaxChildren Whether to load the 'children' tab via ajax * #property bool ajaxParent Whether to load the 'parent' field via ajax + * #property bool editCrumbs Whether or not breadcrumbs load page editor (false=load page list). * * @var array * @@ -1012,6 +1013,7 @@ $config->pageEdit = array( 'confirm' => true, 'ajaxChildren' => true, 'ajaxParent' => true, + 'editCrumbs' => false, ); @@ -1194,6 +1196,12 @@ $config->https = null; */ $config->ajax = false; +/** + * modal: This is automatically set to TRUE when request is in a modal window. + * + */ +$config->modal = false; + /** * external: This is automatically set to TRUE when PW is externally bootstrapped. * diff --git a/wire/core/AdminThemeFramework.php b/wire/core/AdminThemeFramework.php index 4a33ae90..457688b3 100644 --- a/wire/core/AdminThemeFramework.php +++ b/wire/core/AdminThemeFramework.php @@ -61,7 +61,6 @@ abstract class AdminThemeFramework extends AdminTheme { public function __construct() { parent::__construct(); $this->set('useAsLogin', false); - $this->wire('modules')->get('JqueryUI')->use('panel'); $this->sanitizer = $this->wire('sanitizer'); } diff --git a/wire/core/Config.php b/wire/core/Config.php index d2ad7127..41ef4adf 100644 --- a/wire/core/Config.php +++ b/wire/core/Config.php @@ -17,6 +17,7 @@ * @see /wire/config.php for more detailed descriptions of all config properties. * * @property bool $ajax If the current request is an ajax (asynchronous javascript) request, this is set to true. #pw-group-runtime + * @property bool|int $modal If the current request is in a modal window, this is set to a positive number. False if not. #pw-group-runtime * @property string $httpHost Current HTTP host name. #pw-group-HTTP-and-input * @property bool $https If the current request is an HTTPS request, this is set to true. #pw-group-runtime * @property string $version Current ProcessWire version string (i.e. "2.2.3") #pw-group-system #pw-group-runtime diff --git a/wire/core/Page.php b/wire/core/Page.php index 3fa03e24..2fc9e32f 100644 --- a/wire/core/Page.php +++ b/wire/core/Page.php @@ -2842,6 +2842,8 @@ class Page extends WireData implements \Countable, WireMatchable { $url = ($https ? 'https://' : 'http://') . $this->wire('config')->httpHost . $url; } } + $append = $this->wire('session')->getFor($this, 'appendEditUrl'); + if($append) $url .= $append; return $url; } diff --git a/wire/core/ProcessWire.php b/wire/core/ProcessWire.php index f03c359b..81bf923a 100644 --- a/wire/core/ProcessWire.php +++ b/wire/core/ProcessWire.php @@ -45,7 +45,7 @@ class ProcessWire extends Wire { * Reversion revision number * */ - const versionRevision = 56; + const versionRevision = 57; /** * Version suffix string (when applicable) @@ -258,6 +258,7 @@ class ProcessWire extends Wire { $config->ajax = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'); $config->cli = (!isset($_SERVER['SERVER_SOFTWARE']) && (php_sapi_name() == 'cli' || ($_SERVER['argc'] > 0 && is_numeric($_SERVER['argc'])))); + $config->modal = empty($_GET['modal']) ? false : abs((int) $_GET['modal']); $version = self::versionMajor . "." . self::versionMinor . "." . self::versionRevision; $config->version = $version; diff --git a/wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module b/wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module index 9fc2a78c..c19d02fa 100644 --- a/wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module +++ b/wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module @@ -452,7 +452,7 @@ class ProcessPageEdit extends Process implements WirePageEditor, ConfigurableMod $out .= $this->form->render(); // buttons with dropdowns - if(!$this->wire('input')->get('modal') && !count($this->fields)) { + if(!$this->wire('config')->modal && !count($this->fields)) { $config = $this->wire('config'); $file = $config->debug ? 'dropdown.js' : 'dropdown.min.js'; @@ -490,7 +490,7 @@ class ProcessPageEdit extends Process implements WirePageEditor, ConfigurableMod $out .= ""; } - if($viewable && !count($this->fields)) { + if($viewable && !count($this->fields) && !$this->wire('config')->modal) { // this supports code in the buildFormView() method $out .= "