mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 08:17:12 +02:00
Just some small updates in 3.0.77, mostly related to AdminThemeUikit updates
This commit is contained in:
@@ -301,8 +301,10 @@ abstract class AdminThemeFramework extends AdminTheme {
|
||||
|
||||
if($this->isSuperuser) return true;
|
||||
|
||||
$allow = false;
|
||||
$pageViewable = $p->viewable();
|
||||
if(!$pageViewable) return false;
|
||||
|
||||
$allow = false;
|
||||
$numChildren = count($children);
|
||||
|
||||
if($p->process == 'ProcessPageAdd') {
|
||||
@@ -580,7 +582,7 @@ abstract class AdminThemeFramework extends AdminTheme {
|
||||
*/
|
||||
public function renderNotices($notices, array $options = array()) {
|
||||
|
||||
if(!count($notices)) return '';
|
||||
// if(!count($notices)) return '';
|
||||
|
||||
if($this->isLoggedIn && $this->wire('modules')->isInstalled('SystemNotifications')) {
|
||||
$systemNotifications = $this->wire('modules')->get('SystemNotifications');
|
||||
|
@@ -45,7 +45,7 @@ class ProcessWire extends Wire {
|
||||
* Reversion revision number
|
||||
*
|
||||
*/
|
||||
const versionRevision = 76;
|
||||
const versionRevision = 77;
|
||||
|
||||
/**
|
||||
* Version suffix string (when applicable)
|
||||
|
@@ -769,12 +769,22 @@ class WireHooks {
|
||||
}
|
||||
|
||||
if(is_null($toObject)) {
|
||||
if(!is_callable($toMethod) && strpos($toMethod, "\\") === false && __NAMESPACE__) {
|
||||
$_toMethod = "\\" . __NAMESPACE__ . "\\$toMethod";
|
||||
// if(!is_callable($_toMethod)) $_toMethod = "\\$toMethod";
|
||||
$toMethod = $_toMethod;
|
||||
$toMethodCallable = is_callable($toMethod);
|
||||
if(!$toMethodCallable && strpos($toMethod, "\\") === false && __NAMESPACE__) {
|
||||
$_toMethod = $toMethod;
|
||||
$toMethod = "\\" . __NAMESPACE__ . "\\$toMethod";
|
||||
$toMethodCallable = is_callable($toMethod);
|
||||
if(!$toMethodCallable) {
|
||||
$toMethod = "\\$_toMethod";
|
||||
$toMethodCallable = is_callable($toMethod);
|
||||
}
|
||||
}
|
||||
if($toMethodCallable) {
|
||||
$returnValue = $toMethod($event);
|
||||
} else {
|
||||
// hook fail, not callable
|
||||
$returnValue = null;
|
||||
}
|
||||
$toMethod($event);
|
||||
} else {
|
||||
/** @var Wire $toObject */
|
||||
if($hook['toPublic']) {
|
||||
@@ -784,12 +794,18 @@ class WireHooks {
|
||||
// protected or private
|
||||
$returnValue = $toObject->_callMethod($toMethod, array($event));
|
||||
}
|
||||
// @todo allow for use of $returnValue as alternative to $event->return
|
||||
if($returnValue) {}
|
||||
$toMethodCallable = true;
|
||||
}
|
||||
|
||||
if($returnValue !== null) {
|
||||
// hook method/func had an explicit return statement with a value
|
||||
// allow for use of $returnValue as alternative to $event->return?
|
||||
}
|
||||
|
||||
if($profilerEvent) $profiler->stop($profilerEvent);
|
||||
|
||||
if(!$toMethodCallable) continue;
|
||||
|
||||
$result['numHooksRun']++;
|
||||
|
||||
if($event->cancelHooks === true) $cancelHooks = true;
|
||||
|
@@ -222,7 +222,9 @@ var pwPanels = {
|
||||
}
|
||||
|
||||
if(typeof text != "undefined" && text.length) {
|
||||
$btn.children('.ui-button-text').text(text);
|
||||
var $btnText = $btn.children('.ui-button-text');
|
||||
var $text = $("<span />").text(text);
|
||||
$btnText.html('<span>' + $text.text() + '</span>');
|
||||
$btn.addClass('pw-panel-button-text');
|
||||
btnExtraPx = 7;
|
||||
//$btn.css(btnPos, (-1 * ($btn.height() + 7)) + 'px');
|
||||
|
2
wire/modules/Jquery/JqueryUI/panel.min.js
vendored
2
wire/modules/Jquery/JqueryUI/panel.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user