mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-19 18:28:39 +01:00
Properly change device after resizing left nav
Summary: Also allow left nav to hide. Test Plan: # Resize left nav. # Shrink browser width to switch device. # Increase the width again. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3383
This commit is contained in:
parent
6c5a23d85c
commit
8d7f5eefae
3 changed files with 13 additions and 7 deletions
|
@ -1032,7 +1032,7 @@ celerity_register_resource_map(array(
|
||||||
),
|
),
|
||||||
'javelin-behavior-device' =>
|
'javelin-behavior-device' =>
|
||||||
array(
|
array(
|
||||||
'uri' => '/res/37669d1a/rsrc/js/application/core/behavior-device.js',
|
'uri' => '/res/7f09d952/rsrc/js/application/core/behavior-device.js',
|
||||||
'type' => 'js',
|
'type' => 'js',
|
||||||
'requires' =>
|
'requires' =>
|
||||||
array(
|
array(
|
||||||
|
@ -1517,7 +1517,7 @@ celerity_register_resource_map(array(
|
||||||
),
|
),
|
||||||
'javelin-behavior-phabricator-nav' =>
|
'javelin-behavior-phabricator-nav' =>
|
||||||
array(
|
array(
|
||||||
'uri' => '/res/15ceb59f/rsrc/js/application/core/behavior-phabricator-nav.js',
|
'uri' => '/res/575be3cd/rsrc/js/application/core/behavior-phabricator-nav.js',
|
||||||
'type' => 'js',
|
'type' => 'js',
|
||||||
'requires' =>
|
'requires' =>
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -32,7 +32,7 @@ JX.behavior('device', function(config) {
|
||||||
JX.DOM.alterClass(e, 'device-tablet', (device == 'tablet'));
|
JX.DOM.alterClass(e, 'device-tablet', (device == 'tablet'));
|
||||||
JX.DOM.alterClass(e, 'device-desktop', (device == 'desktop'));
|
JX.DOM.alterClass(e, 'device-desktop', (device == 'desktop'));
|
||||||
|
|
||||||
JX.Stratcom.invoke('phabricator-device-change', device);
|
JX.Stratcom.invoke('phabricator-device-change', null, device);
|
||||||
}
|
}
|
||||||
|
|
||||||
JX.Stratcom.listen('resize', null, onresize);
|
JX.Stratcom.listen('resize', null, onresize);
|
||||||
|
|
|
@ -151,7 +151,7 @@ JX.behavior('phabricator-nav', function(config) {
|
||||||
scale: 1,
|
scale: 1,
|
||||||
|
|
||||||
width: JX.Vector.getDim(local).x,
|
width: JX.Vector.getDim(local).x,
|
||||||
minWidth: 38,
|
minWidth: 1,
|
||||||
minScale: 1
|
minScale: 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -213,10 +213,16 @@ JX.behavior('phabricator-nav', function(config) {
|
||||||
|
|
||||||
// - Navigation Reset ----------------------------------------------------------
|
// - Navigation Reset ----------------------------------------------------------
|
||||||
|
|
||||||
JX.Stratcom.listen('phabricator-device-change', null, function(device) {
|
JX.Stratcom.listen('phabricator-device-change', null, function(event) {
|
||||||
app.style.left = '';
|
app.style.left = '';
|
||||||
local && (local.style.left = '');
|
if (local) {
|
||||||
content.style.left = '';
|
local.style.left = '';
|
||||||
|
local.style.width = '';
|
||||||
|
}
|
||||||
|
if (drag) {
|
||||||
|
drag.style.left = '';
|
||||||
|
}
|
||||||
|
content.style.marginLeft = '';
|
||||||
|
|
||||||
select_button(2);
|
select_button(2);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue