mirror of
https://github.com/processwire/processwire.git
synced 2025-08-16 03:34:33 +02:00
Various minor tweaks related to AdminThemeFramework
This commit is contained in:
@@ -24,17 +24,23 @@ var InputfieldPageAutocomplete = {
|
||||
var numFound = 0; // indicating number of pages matching during last ajax request
|
||||
var disableChars = $input.attr('data-disablechars');
|
||||
var noList = $input.hasClass('no_list');
|
||||
|
||||
var iconHeight = $icon.height();
|
||||
if(iconHeight) {
|
||||
var pHeight = $icon.parent().height();
|
||||
var iconTop = ((pHeight - iconHeight) / 2);
|
||||
$icon.css('top', iconTop + 'px');
|
||||
$icon.css('left', (iconTop / 2) + 'px');
|
||||
} else {
|
||||
// icon is not visible (in a tab or collapsed field), we'll leave it alone
|
||||
}
|
||||
|
||||
function setIconPosition($icon, side) {
|
||||
var iconHeight = $icon.height();
|
||||
if(iconHeight) {
|
||||
var pHeight = $icon.parent().height();
|
||||
var iconTop = ((pHeight - iconHeight) / 2);
|
||||
$icon.css('top', iconTop + 'px');
|
||||
if(side == 'left') {
|
||||
$icon.css('left', (iconTop / 2) + 'px');
|
||||
} else if(side == 'right') {
|
||||
$icon.css('right', (iconTop / 4) + 'px');
|
||||
}
|
||||
} else {
|
||||
// icon is not visible (in a tab or collapsed field), we'll leave it alone
|
||||
}
|
||||
}
|
||||
|
||||
function hasDisableChar(str) {
|
||||
if(!disableChars || !disableChars.length) return false;
|
||||
var disable = false;
|
||||
@@ -47,11 +53,14 @@ var InputfieldPageAutocomplete = {
|
||||
return disable;
|
||||
}
|
||||
|
||||
setIconPosition($icon, 'left');
|
||||
|
||||
if(noList) {
|
||||
// specific to single-item autocompletes, where there is no separate "selected" list
|
||||
|
||||
$input.attr('data-selectedLabel', $input.val());
|
||||
var $remove = $input.siblings('.InputfieldPageAutocompleteRemove');
|
||||
setIconPosition($remove, 'right');
|
||||
|
||||
$remove.click(function() {
|
||||
$value.val('').change();
|
||||
|
File diff suppressed because one or more lines are too long
@@ -28,7 +28,19 @@ class ProcessHome extends Process {
|
||||
}
|
||||
|
||||
public function ___execute() {
|
||||
$this->session->redirect("page/");
|
||||
$input = $this->wire('input');
|
||||
$vars = array();
|
||||
if($input->get('login')) $vars['login'] = (int) $input->get('login');
|
||||
if($input->get('layout')) $vars['layout'] = $this->wire('sanitizer')->name($input->get('layout'));
|
||||
$url = "page/";
|
||||
if(count($vars)) {
|
||||
$url .= '?';
|
||||
foreach($vars as $key => $value) {
|
||||
$url .= "$key=" . $this->wire('sanitizer')->entities($value) . "&";
|
||||
}
|
||||
$url = rtrim($url, '&');
|
||||
}
|
||||
$this->session->redirect($url);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -457,7 +457,9 @@ class ProcessLogin extends Process {
|
||||
*
|
||||
*/
|
||||
protected function ___afterLoginRedirect() {
|
||||
$this->session->redirect($this->pages->get($this->config->adminRootPageID)->url . '?login=1');
|
||||
$url = $this->wire('config')->urls->admin . 'page/?login=1';
|
||||
$url = $this->afterLoginURL($url);
|
||||
$this->wire('session')->redirect($url);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -136,7 +136,7 @@ $(document).ready(function() {
|
||||
// true when operations are occurring where we want to ignore clicks
|
||||
var ignoreClicks = false;
|
||||
|
||||
var isModal = $("body").hasClass("modal");
|
||||
var isModal = $("body").hasClass("modal") || $("body").hasClass("pw-iframe");
|
||||
|
||||
$.extend(options, customOptions);
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user