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

Just some small updates in 3.0.77, mostly related to AdminThemeUikit updates

This commit is contained in:
Ryan Cramer
2017-09-29 12:18:34 -04:00
parent 73d7e997fe
commit 5a39c9efc9
5 changed files with 33 additions and 13 deletions

View File

@@ -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');
@@ -720,7 +722,7 @@ abstract class AdminThemeFramework extends AdminTheme {
$f->collapsed = Inputfield::collapsedBlank;
if($this->get('useAsLogin')) $f->attr('checked', 'checked');
$inputfields->add($f);
if($f->attr('checked') && $this->input->requestMethod('GET')) {
$class = $this->className();
foreach($this->modules->findByPrefix('AdminTheme') as $name) {

View File

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

View File

@@ -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,11 +794,17 @@ 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']++;

View File

@@ -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');

File diff suppressed because one or more lines are too long