mirror of
https://github.com/processwire/processwire.git
synced 2025-08-24 15:23:11 +02:00
Minor adjustment per remaining button in issue in processwire/processwire-issues#84
This commit is contained in:
@@ -16,4 +16,5 @@ $(document).ready(function() {
|
||||
// detect whether or not it's a touch device
|
||||
var touch = (('ontouchstart' in window) || (navigator.MaxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0));
|
||||
$("#login_touch").val(touch ? 1 : 0);
|
||||
$("#login_width").val($(window).width());
|
||||
});
|
@@ -1 +1 @@
|
||||
$(document).ready(function(){if(window.devicePixelRatio>1){var a=true}else{var b="(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)";var a=window.matchMedia&&window.matchMedia(b).matches}$("#login_hidpi").val(a?1:0);var c=(("ontouchstart" in window)||(navigator.MaxTouchPoints>0)||(navigator.msMaxTouchPoints>0));$("#login_touch").val(c?1:0)});
|
||||
$(document).ready(function(){if(window.devicePixelRatio>1){var a=true}else{var b="(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)";var a=window.matchMedia&&window.matchMedia(b).matches}$("#login_hidpi").val(a?1:0);var c=(("ontouchstart" in window)||(navigator.MaxTouchPoints>0)||(navigator.msMaxTouchPoints>0));$("#login_touch").val(c?1:0);$("#login_width").val($(window).width())});
|
@@ -177,6 +177,7 @@ class ProcessLogin extends Process {
|
||||
if($this->isAdmin) {
|
||||
$this->session->set('hidpi', $this->wire('input')->post->login_hidpi ? true : false);
|
||||
$this->session->set('touch', $this->wire('input')->post->login_touch ? true : false);
|
||||
$this->session->set('clientWidth', (int) $this->wire('input')->post('login_width'));
|
||||
$this->session->remove('error');
|
||||
$this->afterLogin();
|
||||
}
|
||||
@@ -386,6 +387,12 @@ class ProcessLogin extends Process {
|
||||
$f->attr('id+name', 'login_touch');
|
||||
$f->attr('value', 0);
|
||||
$this->form->add($f);
|
||||
|
||||
// detect touch device login (populated from js)
|
||||
$f = $this->modules->get('InputfieldHidden');
|
||||
$f->attr('id+name', 'login_width');
|
||||
$f->attr('value', 0);
|
||||
$this->form->add($f);
|
||||
}
|
||||
|
||||
return $this->form;
|
||||
|
@@ -731,7 +731,11 @@ class ProcessPageEdit extends Process implements WirePageEditor, ConfigurableMod
|
||||
$submit2->attr('id', 'submit_save_unpublished');
|
||||
$submit2->showInHeader();
|
||||
$submit2->setSecondary();
|
||||
$submit2->attr('value', $this->_('Save + Keep Unpublished')); // Button: save unpublished
|
||||
if($this->wire('session')->clientWidth > 900) {
|
||||
$submit2->attr('value', $this->_('Save + Keep Unpublished')); // Button: save unpublished
|
||||
} else {
|
||||
$submit2->attr('value', $saveLabel); // Button: save unpublished
|
||||
}
|
||||
}
|
||||
|
||||
if($this->page->publishable()) {
|
||||
|
Reference in New Issue
Block a user