1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-09 00:06:55 +02:00

Bump version to 3.0.56 plus some other minor tweaks

This commit is contained in:
Ryan Cramer
2017-03-17 13:25:29 -04:00
parent 9c92ce5305
commit 4414a2db2b
5 changed files with 26 additions and 10 deletions

View File

@@ -488,6 +488,7 @@ abstract class AdminThemeFramework extends AdminTheme {
$navArray[] = array( $navArray[] = array(
'url' => $urls->root, 'url' => $urls->root,
'title' => $this->_('View site'), 'title' => $this->_('View site'),
'target' => '_top',
'icon' => 'eye', 'icon' => 'eye',
); );
@@ -501,6 +502,7 @@ abstract class AdminThemeFramework extends AdminTheme {
$navArray[] = array( $navArray[] = array(
'url' => $urls->admin . 'login/logout/', 'url' => $urls->admin . 'login/logout/',
'title' => $this->_('Logout'), 'title' => $this->_('Logout'),
'target' => '_top',
'icon' => 'power-off', 'icon' => 'power-off',
); );

View File

@@ -45,7 +45,7 @@ class ProcessWire extends Wire {
* Reversion revision number * Reversion revision number
* *
*/ */
const versionRevision = 55; const versionRevision = 56;
/** /**
* Version suffix string (when applicable) * Version suffix string (when applicable)

View File

@@ -20,12 +20,12 @@ function InputfieldRepeater($) {
var depthSize = 50; var depthSize = 50;
/** /**
* Whether or not AdminThemeReno is present * Whether or not AdminThemeDefault is present
* *
* @type {bool} * @type {bool}
* *
*/ */
var isReno = $('body').hasClass('AdminThemeReno'); var isAdminDefault = $('body').hasClass('AdminThemeDefault');
/** /**
* Event timer for double clicks * Event timer for double clicks
@@ -495,8 +495,8 @@ function InputfieldRepeater($) {
var prevDepth = parseInt($depth.val()); var prevDepth = parseInt($depth.val());
var left = ui.position.left; var left = ui.position.left;
// AdminThemeReno has something different going on with the left positions, so we adjust for that here // AdminThemeDefault has something different going on with the left positions, so we adjust for that here
if(isReno) left -= depthSize; if(!isAdminDefault) left -= depthSize;
if(left < 0) { if(left < 0) {
depth = prevDepth - Math.round(Math.abs(left) / depthSize); depth = prevDepth - Math.round(Math.abs(left) / depthSize);

File diff suppressed because one or more lines are too long

View File

@@ -17,6 +17,7 @@
* @method void afterLogin() #pw-hooker * @method void afterLogin() #pw-hooker
* @method void executeLogout() #pw-hooker * @method void executeLogout() #pw-hooker
* @method void afterLoginRedirect() #pw-hooker * @method void afterLoginRedirect() #pw-hooker
* @method string afterLoginURL($url) #pw-hooker
* @method string renderLoginForm() #pw-hooker * @method string renderLoginForm() #pw-hooker
* @method InputfieldForm buildLoginForm() #pw-hooker * @method InputfieldForm buildLoginForm() #pw-hooker
* *
@@ -143,7 +144,8 @@ class ProcessLogin extends Process {
public function ___execute() { public function ___execute() {
if($this->user->isLoggedin()) { if($this->user->isLoggedin()) {
if($this->loginURL) $this->wire('session')->redirect($this->loginURL); if($this->loginURL) $this->wire('session')->redirect($this->afterLoginURL($this->loginURL));
if($this->input->get('layout')) return ''; // blank placeholder page option for admin themes
$this->message($this->_("You are logged in.")); $this->message($this->_("You are logged in."));
if($this->isAdmin && $this->user->hasPermission('page-edit')) $this->afterLoginRedirect(); if($this->isAdmin && $this->user->hasPermission('page-edit')) $this->afterLoginRedirect();
// fallback if nothing set // fallback if nothing set
@@ -181,13 +183,13 @@ class ProcessLogin extends Process {
$this->session->remove('error'); $this->session->remove('error');
$this->afterLogin(); $this->afterLogin();
} }
$this->session->redirect("./?login=1" . ($this->id ? "&id={$this->id}" : '')); $url = $this->afterLoginURL("./?login=1" . ($this->id ? "&id=$this->id" : ''));
$this->session->redirect($url);
} else { } else {
$this->error($name . " - " . $this->_("Login failed")); $this->error($name . " - " . $this->_("Login failed"));
} }
return $this->renderLoginForm(); return $this->renderLoginForm();
} }
/** /**
@@ -455,7 +457,19 @@ class ProcessLogin extends Process {
* *
*/ */
protected function ___afterLoginRedirect() { protected function ___afterLoginRedirect() {
$this->session->redirect($this->pages->get($this->config->adminRootPageID)->url); $this->session->redirect($this->pages->get($this->config->adminRootPageID)->url . '?login=1');
}
/**
* #pw-hooker
* #pw-internal
*
* @param string $url
* @return string
*
*/
public function ___afterLoginURL($url) {
return $url;
} }