Merge pull request #197 from ONLYOFFICE/feature/mobile-settings

Feature/mobile settings
This commit is contained in:
Julia Radzhabova 2019-06-25 17:44:23 +03:00 committed by GitHub
commit 0326152908
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 1572 additions and 39 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View file

@ -1,7 +1,8 @@
// Container
.phone.ios {
.container-edit,
.container-collaboration {
.container-collaboration,
.container-filter {
.navbar {
.hairline(top, @toolbarBorderColor);
}
@ -17,7 +18,8 @@
.container-edit,
.container-add,
.container-settings,
.container-collaboration {
.container-collaboration,
.container-filter {
&.popover {
width: 360px;
}

View file

@ -2,7 +2,8 @@
.phone.android {
.container-edit,
.container-collaboration {
.container-collaboration,
.container-filter {
.page-content {
.list-block:first-child {
@ -15,7 +16,8 @@
.container-edit,
.container-add,
.container-settings,
.container-collaboration {
.container-collaboration,
.container-filter {
&.popover {
width: 360px;
}

View file

@ -83,7 +83,7 @@
<a id="settings-advanced" class="item-link" data-page="#settings-advanced-view">
<div class="item-content">
<div class="item-media">
<i class="icon icon-settings"></i>
<i class="icon icon-app-settings"></i>
</div>
<div class="item-inner">
<div class="item-title"><%= scope.textAdvancedSettings %></div>

View file

@ -5845,7 +5845,8 @@ html:not(.phone) #editor-navbar.navbar .left a + a {
margin-left: 10px;
}
.phone.ios .container-edit .navbar:before,
.phone.ios .container-collaboration .navbar:before {
.phone.ios .container-collaboration .navbar:before,
.phone.ios .container-filter .navbar:before {
content: '';
position: absolute;
left: 0;
@ -5861,23 +5862,27 @@ html:not(.phone) #editor-navbar.navbar .left a + a {
transform-origin: 50% 0%;
}
html.pixel-ratio-2 .phone.ios .container-edit .navbar:before,
html.pixel-ratio-2 .phone.ios .container-collaboration .navbar:before {
html.pixel-ratio-2 .phone.ios .container-collaboration .navbar:before,
html.pixel-ratio-2 .phone.ios .container-filter .navbar:before {
-webkit-transform: scaleY(0.5);
transform: scaleY(0.5);
}
html.pixel-ratio-3 .phone.ios .container-edit .navbar:before,
html.pixel-ratio-3 .phone.ios .container-collaboration .navbar:before {
html.pixel-ratio-3 .phone.ios .container-collaboration .navbar:before,
html.pixel-ratio-3 .phone.ios .container-filter .navbar:before {
-webkit-transform: scaleY(0.33);
transform: scaleY(0.33);
}
.phone.ios .container-edit .page-content .list-block:first-child,
.phone.ios .container-collaboration .page-content .list-block:first-child {
.phone.ios .container-collaboration .page-content .list-block:first-child,
.phone.ios .container-filter .page-content .list-block:first-child {
margin-top: -1px;
}
.container-edit.popover,
.container-add.popover,
.container-settings.popover,
.container-collaboration.popover {
.container-collaboration.popover,
.container-filter.popover {
width: 360px;
}
.settings.popup .list-block ul,
@ -6844,6 +6849,11 @@ i.icon.icon-delete-change {
height: 24px;
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9.5%201H9V1.5V3H5H4H2V4H4V21V22H5H19H20V21V4H22V3H20H19H15V1.5V1H14.5H9.5ZM14%203V2H10V3H14ZM5%204H19V21H5V4ZM7%206H8V19H7V6ZM11%206H10V19H11V6ZM13%206H14V19H13V6ZM17%206H16V19H17V6Z%22%20fill%3D%22%23446995%22%2F%3E%3C%2Fsvg%3E");
}
i.icon.icon-app-settings {
width: 24px;
height: 24px;
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M7%2014H16C18.2091%2014%2020%2015.7909%2020%2018C20%2020.2091%2018.2091%2022%2016%2022H7C4.79086%2022%203%2020.2091%203%2018C3%2015.7909%204.79086%2014%207%2014ZM16%2013C18.7614%2013%2021%2015.2386%2021%2018C21%2020.7614%2018.7614%2023%2016%2023H7C4.23858%2023%202%2020.7614%202%2018C2%2015.2386%204.23858%2013%207%2013H16Z%22%20fill%3D%22%23446995%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M16%2020C14.8954%2020%2014%2019.1046%2014%2018C14%2016.8954%2014.8954%2016%2016%2016C17.1046%2016%2018%2016.8954%2018%2018C18%2019.1046%2017.1046%2020%2016%2020ZM16%2021C14.3431%2021%2013%2019.6569%2013%2018C13%2016.3431%2014.3431%2015%2016%2015C17.6569%2015%2019%2016.3431%2019%2018C19%2019.6569%2017.6569%2021%2016%2021Z%22%20fill%3D%22%23446995%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M16%203H7C4.79086%203%203%204.79086%203%207C3%209.20914%204.79086%2011%207%2011H16C18.2091%2011%2020%209.20914%2020%207C20%204.79086%2018.2091%203%2016%203ZM7%202C4.23858%202%202%204.23858%202%207C2%209.76142%204.23858%2012%207%2012H16C18.7614%2012%2021%209.76142%2021%207C21%204.23858%2018.7614%202%2016%202H7Z%22%20fill%3D%22%23446995%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M7%209C8.10457%209%209%208.10457%209%207C9%205.89543%208.10457%205%207%205C5.89543%205%205%205.89543%205%207C5%208.10457%205.89543%209%207%209ZM7%2010C8.65685%2010%2010%208.65685%2010%207C10%205.34315%208.65685%204%207%204C5.34315%204%204%205.34315%204%207C4%208.65685%205.34315%2010%207%2010Z%22%20fill%3D%22%23446995%22%2F%3E%3C%2Fsvg%3E");
}
.label-switch input[type="checkbox"]:checked + .checkbox {
background: #446995;
}

View file

@ -5629,13 +5629,15 @@ a.item-link,
opacity: 1;
}
.phone.android .container-edit .page-content .list-block:first-child,
.phone.android .container-collaboration .page-content .list-block:first-child {
.phone.android .container-collaboration .page-content .list-block:first-child,
.phone.android .container-filter .page-content .list-block:first-child {
margin-top: -1px;
}
.container-edit.popover,
.container-add.popover,
.container-settings.popover,
.container-collaboration.popover {
.container-collaboration.popover,
.container-filter.popover {
width: 360px;
}
.settings.popup .list-block,
@ -6327,6 +6329,11 @@ i.icon.icon-delete-change {
height: 24px;
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M9.5%201H9V1.5V3H5H4H2V4H4V21V22H5H19H20V21V4H22V3H20H19H15V1.5V1H14.5H9.5ZM14%203V2H10V3H14ZM5%204H19V21H5V4ZM7%206H8V19H7V6ZM11%206H10V19H11V6ZM13%206H14V19H13V6ZM17%206H16V19H17V6Z%22%20fill%3D%22%23446995%22%2F%3E%3C%2Fsvg%3E");
}
i.icon.icon-app-settings {
width: 24px;
height: 24px;
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M7%2014H16C18.2091%2014%2020%2015.7909%2020%2018C20%2020.2091%2018.2091%2022%2016%2022H7C4.79086%2022%203%2020.2091%203%2018C3%2015.7909%204.79086%2014%207%2014ZM16%2013C18.7614%2013%2021%2015.2386%2021%2018C21%2020.7614%2018.7614%2023%2016%2023H7C4.23858%2023%202%2020.7614%202%2018C2%2015.2386%204.23858%2013%207%2013H16Z%22%20fill%3D%22%23446995%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M16%2020C14.8954%2020%2014%2019.1046%2014%2018C14%2016.8954%2014.8954%2016%2016%2016C17.1046%2016%2018%2016.8954%2018%2018C18%2019.1046%2017.1046%2020%2016%2020ZM16%2021C14.3431%2021%2013%2019.6569%2013%2018C13%2016.3431%2014.3431%2015%2016%2015C17.6569%2015%2019%2016.3431%2019%2018C19%2019.6569%2017.6569%2021%2016%2021Z%22%20fill%3D%22%23446995%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M16%203H7C4.79086%203%203%204.79086%203%207C3%209.20914%204.79086%2011%207%2011H16C18.2091%2011%2020%209.20914%2020%207C20%204.79086%2018.2091%203%2016%203ZM7%202C4.23858%202%202%204.23858%202%207C2%209.76142%204.23858%2012%207%2012H16C18.7614%2012%2021%209.76142%2021%207C21%204.23858%2018.7614%202%2016%202H7Z%22%20fill%3D%22%23446995%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M7%209C8.10457%209%209%208.10457%209%207C9%205.89543%208.10457%205%207%205C5.89543%205%205%205.89543%205%207C5%208.10457%205.89543%209%207%209ZM7%2010C8.65685%2010%2010%208.65685%2010%207C10%205.34315%208.65685%204%207%204C5.34315%204%204%205.34315%204%207C4%208.65685%205.34315%2010%207%2010Z%22%20fill%3D%22%23446995%22%2F%3E%3C%2Fsvg%3E");
}
.navbar i.icon.icon-undo {
width: 22px;
height: 22px;

View file

@ -446,4 +446,9 @@ i.icon {
height: 24px;
.encoded-svg-background('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.5 1H9V1.5V3H5H4H2V4H4V21V22H5H19H20V21V4H22V3H20H19H15V1.5V1H14.5H9.5ZM14 3V2H10V3H14ZM5 4H19V21H5V4ZM7 6H8V19H7V6ZM11 6H10V19H11V6ZM13 6H14V19H13V6ZM17 6H16V19H17V6Z" fill="@{themeColor}"/></svg>');
}
&.icon-app-settings {
width: 24px;
height: 24px;
.encoded-svg-background('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 14H16C18.2091 14 20 15.7909 20 18C20 20.2091 18.2091 22 16 22H7C4.79086 22 3 20.2091 3 18C3 15.7909 4.79086 14 7 14ZM16 13C18.7614 13 21 15.2386 21 18C21 20.7614 18.7614 23 16 23H7C4.23858 23 2 20.7614 2 18C2 15.2386 4.23858 13 7 13H16Z" fill="@{themeColor}"/><path fill-rule="evenodd" clip-rule="evenodd" d="M16 20C14.8954 20 14 19.1046 14 18C14 16.8954 14.8954 16 16 16C17.1046 16 18 16.8954 18 18C18 19.1046 17.1046 20 16 20ZM16 21C14.3431 21 13 19.6569 13 18C13 16.3431 14.3431 15 16 15C17.6569 15 19 16.3431 19 18C19 19.6569 17.6569 21 16 21Z" fill="@{themeColor}"/><path fill-rule="evenodd" clip-rule="evenodd" d="M16 3H7C4.79086 3 3 4.79086 3 7C3 9.20914 4.79086 11 7 11H16C18.2091 11 20 9.20914 20 7C20 4.79086 18.2091 3 16 3ZM7 2C4.23858 2 2 4.23858 2 7C2 9.76142 4.23858 12 7 12H16C18.7614 12 21 9.76142 21 7C21 4.23858 18.7614 2 16 2H7Z" fill="@{themeColor}"/><path fill-rule="evenodd" clip-rule="evenodd" d="M7 9C8.10457 9 9 8.10457 9 7C9 5.89543 8.10457 5 7 5C5.89543 5 5 5.89543 5 7C5 8.10457 5.89543 9 7 9ZM7 10C8.65685 10 10 8.65685 10 7C10 5.34315 8.65685 4 7 4C5.34315 4 4 5.34315 4 7C4 8.65685 5.34315 10 7 10Z" fill="@{themeColor}"/></svg>');
}
}

View file

@ -373,6 +373,11 @@ i.icon {
height: 24px;
.encoded-svg-background('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.5 1H9V1.5V3H5H4H2V4H4V21V22H5H19H20V21V4H22V3H20H19H15V1.5V1H14.5H9.5ZM14 3V2H10V3H14ZM5 4H19V21H5V4ZM7 6H8V19H7V6ZM11 6H10V19H11V6ZM13 6H14V19H13V6ZM17 6H16V19H17V6Z" fill="@{themeColor}"/></svg>');
}
&.icon-app-settings {
width: 24px;
height: 24px;
.encoded-svg-background('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 14H16C18.2091 14 20 15.7909 20 18C20 20.2091 18.2091 22 16 22H7C4.79086 22 3 20.2091 3 18C3 15.7909 4.79086 14 7 14ZM16 13C18.7614 13 21 15.2386 21 18C21 20.7614 18.7614 23 16 23H7C4.23858 23 2 20.7614 2 18C2 15.2386 4.23858 13 7 13H16Z" fill="@{themeColor}"/><path fill-rule="evenodd" clip-rule="evenodd" d="M16 20C14.8954 20 14 19.1046 14 18C14 16.8954 14.8954 16 16 16C17.1046 16 18 16.8954 18 18C18 19.1046 17.1046 20 16 20ZM16 21C14.3431 21 13 19.6569 13 18C13 16.3431 14.3431 15 16 15C17.6569 15 19 16.3431 19 18C19 19.6569 17.6569 21 16 21Z" fill="@{themeColor}"/><path fill-rule="evenodd" clip-rule="evenodd" d="M16 3H7C4.79086 3 3 4.79086 3 7C3 9.20914 4.79086 11 7 11H16C18.2091 11 20 9.20914 20 7C20 4.79086 18.2091 3 16 3ZM7 2C4.23858 2 2 4.23858 2 7C2 9.76142 4.23858 12 7 12H16C18.7614 12 21 9.76142 21 7C21 4.23858 18.7614 2 16 2H7Z" fill="@{themeColor}"/><path fill-rule="evenodd" clip-rule="evenodd" d="M7 9C8.10457 9 9 8.10457 9 7C9 5.89543 8.10457 5 7 5C5.89543 5 5 5.89543 5 7C5 8.10457 5.89543 9 7 9ZM7 10C8.65685 10 10 8.65685 10 7C10 5.34315 8.65685 4 7 4C5.34315 4 4 5.34315 4 7C4 8.65685 5.34315 10 7 10Z" fill="@{themeColor}"/></svg>');
}
}
// Overwrite color for toolbar

View file

@ -53,7 +53,7 @@
<a id="settings-application" class="item-link">
<div class="item-content">
<div class="item-media">
<i class="icon icon-print"></i>
<i class="icon icon-app-settings"></i>
</div>
<div class="item-inner">
<div class="item-title"><%= scope.textApplicationSettings %></div>

View file

@ -5845,7 +5845,8 @@ html:not(.phone) #editor-navbar.navbar .left a + a {
margin-left: 10px;
}
.phone.ios .container-edit .navbar:before,
.phone.ios .container-collaboration .navbar:before {
.phone.ios .container-collaboration .navbar:before,
.phone.ios .container-filter .navbar:before {
content: '';
position: absolute;
left: 0;
@ -5861,23 +5862,27 @@ html:not(.phone) #editor-navbar.navbar .left a + a {
transform-origin: 50% 0%;
}
html.pixel-ratio-2 .phone.ios .container-edit .navbar:before,
html.pixel-ratio-2 .phone.ios .container-collaboration .navbar:before {
html.pixel-ratio-2 .phone.ios .container-collaboration .navbar:before,
html.pixel-ratio-2 .phone.ios .container-filter .navbar:before {
-webkit-transform: scaleY(0.5);
transform: scaleY(0.5);
}
html.pixel-ratio-3 .phone.ios .container-edit .navbar:before,
html.pixel-ratio-3 .phone.ios .container-collaboration .navbar:before {
html.pixel-ratio-3 .phone.ios .container-collaboration .navbar:before,
html.pixel-ratio-3 .phone.ios .container-filter .navbar:before {
-webkit-transform: scaleY(0.33);
transform: scaleY(0.33);
}
.phone.ios .container-edit .page-content .list-block:first-child,
.phone.ios .container-collaboration .page-content .list-block:first-child {
.phone.ios .container-collaboration .page-content .list-block:first-child,
.phone.ios .container-filter .page-content .list-block:first-child {
margin-top: -1px;
}
.container-edit.popover,
.container-add.popover,
.container-settings.popover,
.container-collaboration.popover {
.container-collaboration.popover,
.container-filter.popover {
width: 360px;
}
.settings.popup .list-block ul,
@ -6731,6 +6736,11 @@ i.icon.icon-collaboration {
height: 24px;
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M15.9912%206C15.9912%208.34102%2015.4074%2010.1346%2014.6055%2011.3121C13.7983%2012.4974%2012.8249%2013%2011.9912%2013C11.1575%2013%2010.1841%2012.4974%209.37695%2011.3121C8.57501%2010.1346%207.99121%208.34102%207.99121%206C7.99121%203.61508%209.96974%202%2011.9912%202C14.0127%202%2015.9912%203.61508%2015.9912%206ZM14.5015%2012.9506C13.7365%2013.6361%2012.8649%2014%2011.9912%2014C11.1195%2014%2010.2499%2013.6378%209.48619%2012.9554C7.78363%2013.6081%206.36015%2014.2591%205.26963%2014.9224C3.55256%2015.9667%203%2016.8326%203%2017.5C3%2018.2545%203.4257%2019.0877%204.82302%2019.7879C6.25015%2020.5031%208.57272%2020.9999%2012%2021C15.4273%2021%2017.7499%2020.5031%2019.177%2019.7879C20.5743%2019.0877%2021%2018.2545%2021%2017.5C21%2016.8326%2020.4474%2015.9667%2018.7304%2014.9224C17.6372%2014.2575%2016.2095%2013.605%2014.5015%2012.9506ZM15.2272%2012.1594C16.2765%2010.7825%2016.9912%208.67814%2016.9912%206C16.9912%203%2014.5%201%2011.9912%201C9.48242%201%206.99121%203%206.99121%206C6.99121%208.68159%207.70777%2010.7879%208.75931%2012.1647C4.60309%2013.7964%202%2015.4951%202%2017.5C2%2019.9852%205%2021.9999%2012%2022C19%2022%2022%2019.9852%2022%2017.5C22%2015.4929%2019.3913%2013.7927%2015.2272%2012.1594Z%22%20fill%3D%22%23aa5252%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
}
i.icon.icon-app-settings {
width: 24px;
height: 24px;
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M7%2014H16C18.2091%2014%2020%2015.7909%2020%2018C20%2020.2091%2018.2091%2022%2016%2022H7C4.79086%2022%203%2020.2091%203%2018C3%2015.7909%204.79086%2014%207%2014ZM16%2013C18.7614%2013%2021%2015.2386%2021%2018C21%2020.7614%2018.7614%2023%2016%2023H7C4.23858%2023%202%2020.7614%202%2018C2%2015.2386%204.23858%2013%207%2013H16Z%22%20fill%3D%22%23aa5252%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M16%2020C14.8954%2020%2014%2019.1046%2014%2018C14%2016.8954%2014.8954%2016%2016%2016C17.1046%2016%2018%2016.8954%2018%2018C18%2019.1046%2017.1046%2020%2016%2020ZM16%2021C14.3431%2021%2013%2019.6569%2013%2018C13%2016.3431%2014.3431%2015%2016%2015C17.6569%2015%2019%2016.3431%2019%2018C19%2019.6569%2017.6569%2021%2016%2021Z%22%20fill%3D%22%23aa5252%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M16%203H7C4.79086%203%203%204.79086%203%207C3%209.20914%204.79086%2011%207%2011H16C18.2091%2011%2020%209.20914%2020%207C20%204.79086%2018.2091%203%2016%203ZM7%202C4.23858%202%202%204.23858%202%207C2%209.76142%204.23858%2012%207%2012H16C18.7614%2012%2021%209.76142%2021%207C21%204.23858%2018.7614%202%2016%202H7Z%22%20fill%3D%22%23aa5252%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M7%209C8.10457%209%209%208.10457%209%207C9%205.89543%208.10457%205%207%205C5.89543%205%205%205.89543%205%207C5%208.10457%205.89543%209%207%209ZM7%2010C8.65685%2010%2010%208.65685%2010%207C10%205.34315%208.65685%204%207%204C5.34315%204%204%205.34315%204%207C4%208.65685%205.34315%2010%207%2010Z%22%20fill%3D%22%23aa5252%22%2F%3E%3C%2Fsvg%3E");
}
.label-switch input[type="checkbox"]:checked + .checkbox {
background: #aa5252;
}

View file

@ -5629,13 +5629,15 @@ a.item-link,
opacity: 1;
}
.phone.android .container-edit .page-content .list-block:first-child,
.phone.android .container-collaboration .page-content .list-block:first-child {
.phone.android .container-collaboration .page-content .list-block:first-child,
.phone.android .container-filter .page-content .list-block:first-child {
margin-top: -1px;
}
.container-edit.popover,
.container-add.popover,
.container-settings.popover,
.container-collaboration.popover {
.container-collaboration.popover,
.container-filter.popover {
width: 360px;
}
.settings.popup .list-block,
@ -6266,6 +6268,11 @@ i.icon.icon-collaboration {
height: 24px;
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M15.9912%206C15.9912%208.34102%2015.4074%2010.1346%2014.6055%2011.3121C13.7983%2012.4974%2012.8249%2013%2011.9912%2013C11.1575%2013%2010.1841%2012.4974%209.37695%2011.3121C8.57501%2010.1346%207.99121%208.34102%207.99121%206C7.99121%203.61508%209.96974%202%2011.9912%202C14.0127%202%2015.9912%203.61508%2015.9912%206ZM14.5015%2012.9506C13.7365%2013.6361%2012.8649%2014%2011.9912%2014C11.1195%2014%2010.2499%2013.6378%209.48619%2012.9554C7.78363%2013.6081%206.36015%2014.2591%205.26963%2014.9224C3.55256%2015.9667%203%2016.8326%203%2017.5C3%2018.2545%203.4257%2019.0877%204.82302%2019.7879C6.25015%2020.5031%208.57272%2020.9999%2012%2021C15.4273%2021%2017.7499%2020.5031%2019.177%2019.7879C20.5743%2019.0877%2021%2018.2545%2021%2017.5C21%2016.8326%2020.4474%2015.9667%2018.7304%2014.9224C17.6372%2014.2575%2016.2095%2013.605%2014.5015%2012.9506ZM15.2272%2012.1594C16.2765%2010.7825%2016.9912%208.67814%2016.9912%206C16.9912%203%2014.5%201%2011.9912%201C9.48242%201%206.99121%203%206.99121%206C6.99121%208.68159%207.70777%2010.7879%208.75931%2012.1647C4.60309%2013.7964%202%2015.4951%202%2017.5C2%2019.9852%205%2021.9999%2012%2022C19%2022%2022%2019.9852%2022%2017.5C22%2015.4929%2019.3913%2013.7927%2015.2272%2012.1594Z%22%20fill%3D%22%23aa5252%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
}
i.icon.icon-app-settings {
width: 24px;
height: 24px;
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M7%2014H16C18.2091%2014%2020%2015.7909%2020%2018C20%2020.2091%2018.2091%2022%2016%2022H7C4.79086%2022%203%2020.2091%203%2018C3%2015.7909%204.79086%2014%207%2014ZM16%2013C18.7614%2013%2021%2015.2386%2021%2018C21%2020.7614%2018.7614%2023%2016%2023H7C4.23858%2023%202%2020.7614%202%2018C2%2015.2386%204.23858%2013%207%2013H16Z%22%20fill%3D%22%23aa5252%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M16%2020C14.8954%2020%2014%2019.1046%2014%2018C14%2016.8954%2014.8954%2016%2016%2016C17.1046%2016%2018%2016.8954%2018%2018C18%2019.1046%2017.1046%2020%2016%2020ZM16%2021C14.3431%2021%2013%2019.6569%2013%2018C13%2016.3431%2014.3431%2015%2016%2015C17.6569%2015%2019%2016.3431%2019%2018C19%2019.6569%2017.6569%2021%2016%2021Z%22%20fill%3D%22%23aa5252%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M16%203H7C4.79086%203%203%204.79086%203%207C3%209.20914%204.79086%2011%207%2011H16C18.2091%2011%2020%209.20914%2020%207C20%204.79086%2018.2091%203%2016%203ZM7%202C4.23858%202%202%204.23858%202%207C2%209.76142%204.23858%2012%207%2012H16C18.7614%2012%2021%209.76142%2021%207C21%204.23858%2018.7614%202%2016%202H7Z%22%20fill%3D%22%23aa5252%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M7%209C8.10457%209%209%208.10457%209%207C9%205.89543%208.10457%205%207%205C5.89543%205%205%205.89543%205%207C5%208.10457%205.89543%209%207%209ZM7%2010C8.65685%2010%2010%208.65685%2010%207C10%205.34315%208.65685%204%207%204C5.34315%204%204%205.34315%204%207C4%208.65685%205.34315%2010%207%2010Z%22%20fill%3D%22%23aa5252%22%2F%3E%3C%2Fsvg%3E");
}
.navbar i.icon.icon-undo {
width: 22px;
height: 22px;

View file

@ -405,4 +405,9 @@ i.icon {
height: 24px;
.encoded-svg-background('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g><path fill-rule="evenodd" clip-rule="evenodd" d="M15.9912 6C15.9912 8.34102 15.4074 10.1346 14.6055 11.3121C13.7983 12.4974 12.8249 13 11.9912 13C11.1575 13 10.1841 12.4974 9.37695 11.3121C8.57501 10.1346 7.99121 8.34102 7.99121 6C7.99121 3.61508 9.96974 2 11.9912 2C14.0127 2 15.9912 3.61508 15.9912 6ZM14.5015 12.9506C13.7365 13.6361 12.8649 14 11.9912 14C11.1195 14 10.2499 13.6378 9.48619 12.9554C7.78363 13.6081 6.36015 14.2591 5.26963 14.9224C3.55256 15.9667 3 16.8326 3 17.5C3 18.2545 3.4257 19.0877 4.82302 19.7879C6.25015 20.5031 8.57272 20.9999 12 21C15.4273 21 17.7499 20.5031 19.177 19.7879C20.5743 19.0877 21 18.2545 21 17.5C21 16.8326 20.4474 15.9667 18.7304 14.9224C17.6372 14.2575 16.2095 13.605 14.5015 12.9506ZM15.2272 12.1594C16.2765 10.7825 16.9912 8.67814 16.9912 6C16.9912 3 14.5 1 11.9912 1C9.48242 1 6.99121 3 6.99121 6C6.99121 8.68159 7.70777 10.7879 8.75931 12.1647C4.60309 13.7964 2 15.4951 2 17.5C2 19.9852 5 21.9999 12 22C19 22 22 19.9852 22 17.5C22 15.4929 19.3913 13.7927 15.2272 12.1594Z" fill="@{themeColor}"/></g></svg>');
}
&.icon-app-settings {
width: 24px;
height: 24px;
.encoded-svg-background('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 14H16C18.2091 14 20 15.7909 20 18C20 20.2091 18.2091 22 16 22H7C4.79086 22 3 20.2091 3 18C3 15.7909 4.79086 14 7 14ZM16 13C18.7614 13 21 15.2386 21 18C21 20.7614 18.7614 23 16 23H7C4.23858 23 2 20.7614 2 18C2 15.2386 4.23858 13 7 13H16Z" fill="@{themeColor}"/><path fill-rule="evenodd" clip-rule="evenodd" d="M16 20C14.8954 20 14 19.1046 14 18C14 16.8954 14.8954 16 16 16C17.1046 16 18 16.8954 18 18C18 19.1046 17.1046 20 16 20ZM16 21C14.3431 21 13 19.6569 13 18C13 16.3431 14.3431 15 16 15C17.6569 15 19 16.3431 19 18C19 19.6569 17.6569 21 16 21Z" fill="@{themeColor}"/><path fill-rule="evenodd" clip-rule="evenodd" d="M16 3H7C4.79086 3 3 4.79086 3 7C3 9.20914 4.79086 11 7 11H16C18.2091 11 20 9.20914 20 7C20 4.79086 18.2091 3 16 3ZM7 2C4.23858 2 2 4.23858 2 7C2 9.76142 4.23858 12 7 12H16C18.7614 12 21 9.76142 21 7C21 4.23858 18.7614 2 16 2H7Z" fill="@{themeColor}"/><path fill-rule="evenodd" clip-rule="evenodd" d="M7 9C8.10457 9 9 8.10457 9 7C9 5.89543 8.10457 5 7 5C5.89543 5 5 5.89543 5 7C5 8.10457 5.89543 9 7 9ZM7 10C8.65685 10 10 8.65685 10 7C10 5.34315 8.65685 4 7 4C5.34315 4 4 5.34315 4 7C4 8.65685 5.34315 10 7 10Z" fill="@{themeColor}"/></svg>');
}
}

View file

@ -375,6 +375,11 @@ i.icon {
height: 24px;
.encoded-svg-background('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g><path fill-rule="evenodd" clip-rule="evenodd" d="M15.9912 6C15.9912 8.34102 15.4074 10.1346 14.6055 11.3121C13.7983 12.4974 12.8249 13 11.9912 13C11.1575 13 10.1841 12.4974 9.37695 11.3121C8.57501 10.1346 7.99121 8.34102 7.99121 6C7.99121 3.61508 9.96974 2 11.9912 2C14.0127 2 15.9912 3.61508 15.9912 6ZM14.5015 12.9506C13.7365 13.6361 12.8649 14 11.9912 14C11.1195 14 10.2499 13.6378 9.48619 12.9554C7.78363 13.6081 6.36015 14.2591 5.26963 14.9224C3.55256 15.9667 3 16.8326 3 17.5C3 18.2545 3.4257 19.0877 4.82302 19.7879C6.25015 20.5031 8.57272 20.9999 12 21C15.4273 21 17.7499 20.5031 19.177 19.7879C20.5743 19.0877 21 18.2545 21 17.5C21 16.8326 20.4474 15.9667 18.7304 14.9224C17.6372 14.2575 16.2095 13.605 14.5015 12.9506ZM15.2272 12.1594C16.2765 10.7825 16.9912 8.67814 16.9912 6C16.9912 3 14.5 1 11.9912 1C9.48242 1 6.99121 3 6.99121 6C6.99121 8.68159 7.70777 10.7879 8.75931 12.1647C4.60309 13.7964 2 15.4951 2 17.5C2 19.9852 5 21.9999 12 22C19 22 22 19.9852 22 17.5C22 15.4929 19.3913 13.7927 15.2272 12.1594Z" fill="@{themeColor}"/></g></svg>');
}
&.icon-app-settings {
width: 24px;
height: 24px;
.encoded-svg-background('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 14H16C18.2091 14 20 15.7909 20 18C20 20.2091 18.2091 22 16 22H7C4.79086 22 3 20.2091 3 18C3 15.7909 4.79086 14 7 14ZM16 13C18.7614 13 21 15.2386 21 18C21 20.7614 18.7614 23 16 23H7C4.23858 23 2 20.7614 2 18C2 15.2386 4.23858 13 7 13H16Z" fill="@{themeColor}"/><path fill-rule="evenodd" clip-rule="evenodd" d="M16 20C14.8954 20 14 19.1046 14 18C14 16.8954 14.8954 16 16 16C17.1046 16 18 16.8954 18 18C18 19.1046 17.1046 20 16 20ZM16 21C14.3431 21 13 19.6569 13 18C13 16.3431 14.3431 15 16 15C17.6569 15 19 16.3431 19 18C19 19.6569 17.6569 21 16 21Z" fill="@{themeColor}"/><path fill-rule="evenodd" clip-rule="evenodd" d="M16 3H7C4.79086 3 3 4.79086 3 7C3 9.20914 4.79086 11 7 11H16C18.2091 11 20 9.20914 20 7C20 4.79086 18.2091 3 16 3ZM7 2C4.23858 2 2 4.23858 2 7C2 9.76142 4.23858 12 7 12H16C18.7614 12 21 9.76142 21 7C21 4.23858 18.7614 2 16 2H7Z" fill="@{themeColor}"/><path fill-rule="evenodd" clip-rule="evenodd" d="M7 9C8.10457 9 9 8.10457 9 7C9 5.89543 8.10457 5 7 5C5.89543 5 5 5.89543 5 7C5 8.10457 5.89543 9 7 9ZM7 10C8.65685 10 10 8.65685 10 7C10 5.34315 8.65685 4 7 4C5.34315 4 4 5.34315 4 7C4 8.65685 5.34315 10 7 10Z" fill="@{themeColor}"/></svg>');
}
}
// Overwrite color for toolbar

View file

@ -134,6 +134,7 @@ require([
,'AddOther'
,'AddLink'
,'Collaboration'
,'FilterOptions'
]
});
@ -205,6 +206,7 @@ require([
,'spreadsheeteditor/mobile/app/controller/add/AddOther'
,'spreadsheeteditor/mobile/app/controller/add/AddLink'
,'spreadsheeteditor/mobile/app/controller/Collaboration'
,'spreadsheeteditor/mobile/app/controller/FilterOptions'
], function() {
window.compareVersions = true;
app.start();

View file

@ -145,6 +145,7 @@ require([
,'AddOther'
,'AddLink'
,'Collaboration'
,'FilterOptions'
]
});
@ -216,6 +217,7 @@ require([
,'spreadsheeteditor/mobile/app/controller/add/AddOther'
,'spreadsheeteditor/mobile/app/controller/add/AddLink'
,'spreadsheeteditor/mobile/app/controller/Collaboration'
,'spreadsheeteditor/mobile/app/controller/FilterOptions'
], function() {
app.start();
});

View file

@ -88,6 +88,9 @@ define([
setMode: function (mode) {
_isEdit = mode.isEdit;
if (_isEdit) {
this.api.asc_registerCallback('asc_onSetAFDialog', _.bind(this.onApiFilterOptions, this));
}
},
// When our application is ready, lets get started
@ -351,6 +354,16 @@ define([
this.isDisconnected = true;
},
onApiFilterOptions: function(config) {
if(_isEdit) {
var rect = config.asc_getCellCoord(),
posX = rect.asc_getX() + rect.asc_getWidth() - 9,
posY = rect.asc_getY() + rect.asc_getHeight() - 9;
SSE.getController('FilterOptions').showModal(posX,posY);
}
},
warnMergeLostData: 'Operation can destroy data in the selected cells.<br>Continue?',
menuCopy: 'Copy',
menuCut: 'Cut',

View file

@ -0,0 +1,381 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
/**
* FilterOptions.js
* Spreadsheet Editor
*
* Created by Julia Svinareva on 13/6/19
* Copyright (c) 2019 Ascensio System SIA. All rights reserved.
*
*/
define([
'core',
'jquery',
'underscore',
'backbone',
'spreadsheeteditor/mobile/app/view/FilterOptions'
], function (core, $, _, Backbone) {
'use strict';
SSE.Controllers.FilterOptions = Backbone.Controller.extend(_.extend((function() {
// Private
var rootView,
dataFilter,
indChecked = [],
modalView;
return {
models: [],
collections: [],
views: [
'FilterOptions'
],
initialize: function() {
var me = this;
me.addListeners({
'FilterOptions': {
'page:show' : me.onPageShow
}
});
},
setApi: function(api) {
this.api = api;
this.api.asc_registerCallback('asc_onSetAFDialog', _.bind(this.setSettings, this));
},
onLaunch: function () {
this.createView('FilterOptions').render();
},
setMode: function(mode) {
this.appConfig = mode;
},
showModal: function(posX,posY) {
var me = this,
isAndroid = Framework7.prototype.device.android === true,
mainView = SSE.getController('Editor').getView('Editor').f7View;
uiApp.closeModal();
if (Common.SharedSettings.get('phone')) {
modalView = $$(uiApp.pickerModal(
'<div class="picker-modal settings container-filter">' +
'<div class="view filter-root-view navbar-through">' +
this.getView('FilterOptions').rootLayout() +
'</div>' +
'</div>'
)).on('opened', function () {
if (_.isFunction(me.api.asc_OnShowContextMenu)) {
me.api.asc_OnShowContextMenu()
}
}).on('close', function (e) {
mainView.showNavbar();
me.isValidChecked();
}).on('closed', function () {
if (_.isFunction(me.api.asc_OnHideContextMenu)) {
me.api.asc_OnHideContextMenu()
}
});
mainView.hideNavbar();
} else {
var popoverHTML =
'<div class="popover settings container-filter">' +
'<div class="popover-angle"></div>' +
'<div class="popover-inner">' +
'<div class="content-block">' +
'<div class="view popover-view filter-root-view navbar-through">' +
this.getView('FilterOptions').rootLayout() +
'</div>' +
'</div>' +
'</div>' +
'</div>';
var $target = $('#context-menu-target')
.css({left: posX, top: Math.max(0, posY)});
modalView = uiApp.popover(popoverHTML, $target);
$$(modalView).on('close', function (e) {
me.isValidChecked();
});
if (Common.SharedSettings.get('android')) {
Common.Utils.androidMenuTop($(modalView), $target);
}
}
if (Framework7.prototype.device.android === true) {
$$('.view.filter-root-view.navbar-through').removeClass('navbar-through').addClass('navbar-fixed');
$$('.view.filter-root-view .navbar').prependTo('.view.filter-root-view > .pages > .page');
}
rootView = uiApp.addView('.filter-root-view', {
dynamicNavbar: true,
domCache: true
});
Common.NotificationCenter.trigger('filtercontainer:show');
this.onPageShow(this.getView('FilterOptions'));
SSE.getController('Toolbar').getView('Toolbar').hideSearch();
},
isValidChecked: function () {
var me = this,
isValid = true;
if (indChecked.length === indChecked.filter(function (item) {return item === false;}).length) {
isValid = false;
}
if(!isValid) {
uiApp.modal({
title : me.textErrorTitle,
text : me.textErrorMsg,
buttons: [
{
text: 'OK',
}
]
});
}
},
rootView : function() {
return rootView;
},
onPageShow: function(view, pageId) {
var me = this;
var $clearFilter = $("#btn-clear-filter"),
$deleteFilter = $("#btn-delete-filter");
this.setClearDisable();
$clearFilter.single('click', _.bind(me.onClickClearFilter, me));
$deleteFilter.single('click', _.bind(me.onClickDeleteFilter, me));
$('.sortdown').single('click', _.bind(me.onClickSort, me, 'down'));
$('.sortup').single('click', _.bind(me.onClickSort, me, 'up'));
this.setDataFilterCells();
},
setSettings: function(config) {
dataFilter = config;
},
hideModal: function() {
if (modalView) {
uiApp.closeModal(modalView);
}
},
onClickSort: function(type) {
this.api.asc_sortColFilter(type == 'down' ? Asc.c_oAscSortOptions.Ascending : Asc.c_oAscSortOptions.Descending, '', dataFilter.asc_getCellId(), dataFilter.asc_getDisplayName(),true);
},
onClickClearFilter: function () {
var me = this;
if (me.api)
me.api.asc_clearFilter();
for(var i=0; i<indChecked.length; i++) {
indChecked[i] = true;
}
setTimeout(function () {
me.updateCell();
},20);
$('[name="filter-cell"]').prop('checked', true);
$('[name="filter-cell-all"]').prop('checked', true);
},
onClickDeleteFilter: function () {
var formatTableInfo = this.api.asc_getCellInfo().asc_getFormatTableInfo();
var tablename = (formatTableInfo) ? formatTableInfo.asc_getTableName() : undefined;
if (this.api)
this.api.asc_changeAutoFilter(tablename, Asc.c_oAscChangeFilterOptions.filter, false);
this.hideModal();
},
setClearDisable: function() {
var $clearFilter = $("#btn-clear-filter");
var arr = dataFilter.asc_getValues();
var lenCheck = arr.filter(function (item) {
return item.visible == true;
}).length;
if (lenCheck == arr.length) {
$clearFilter.addClass("disabled");
} else {
$clearFilter.removeClass("disabled");
}
},
setDataFilterCells: function() {
function isNumeric(value) {
return !isNaN(parseFloat(value)) && isFinite(value);
}
var me = this,
isnumber, value,
index = 0, throughIndex = 0,
selectedCells = 0,
arrCells = [],
idxs = [];
dataFilter.asc_getValues().forEach(function (item) {
value = item.asc_getText();
isnumber = isNumeric(value);
if (idxs[throughIndex]==undefined) {
idxs[throughIndex] = item.asc_getVisible();
}
arrCells.push({
id : index++,
selected : false,
allowSelected : true,
cellvalue : value ? value : me.textEmptyItem,
value : isnumber ? value : (value.length > 0 ? value: me.textEmptyItem),
intval : isnumber ? parseFloat(value) : undefined,
strval : !isnumber ? value : '',
groupid : '1',
check : idxs[throughIndex],
throughIndex : throughIndex
});
if (idxs[throughIndex]) selectedCells++;
++throughIndex;
});
indChecked = idxs;
if(arrCells.length > 0) {
var templateItemCell = _.template([
'<% _.each(cells, function (cell) { %>',
'<li>' +
'<label class="label-radio item-content">' +
'<input id="<%= cell.throughIndex %>" type="checkbox" name="filter-cell" value="<%= cell.cellvalue%>"/>' +
'<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>' +
'<div class="item-inner">' +
'<div class="item-title"><%= cell.cellvalue%></div>' +
'</div>' +
'</label>' +
'</li>',
'<% }); %>'].join(''));
var templateListCells = _.template(
'<ul>' +
'<li>' +
'<label class="label-radio item-content">' +
'<input type="checkbox" name="filter-cell-all" />' +
'<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>' +
'<div class="item-inner">' +
'<div class="item-title"><%= textSelectAll %></div>' +
'</div>' +
'</label>' +
'</li>' +
templateItemCell({cells: arrCells, android: Framework7.prototype.device.android}) +
'</ul>');
$('#list-cells').html(templateListCells({textSelectAll: this.textSelectAll, android: Framework7.prototype.device.android}));
var $filterCell = $('[name="filter-cell"]'),
$filterCellAll = $('[name="filter-cell-all"]');
$filterCell.single('change', _.bind(me.updateCell, me));
$filterCellAll.single('change', _.bind(me.updateCell, me));
if(selectedCells == arrCells.length) {
$filterCellAll.prop('checked', true);
$filterCell.prop('checked', true);
} else {
for(var i=0; i<arrCells.length; i++) {
$filterCell.eq(i).prop('checked', idxs[i]);
}
}
}
},
updateCell: function(e) {
var me = this;
// Checkbox change
var $filterCell = $('[name="filter-cell"]'),
$filterCellAll = $('[name="filter-cell-all"]'),
filterCellChecked = $('[name="filter-cell"]:checked').length,
filterCellCheckedAll = $('[name="filter-cell"]').length,
isValid = true;
if(e) {
if (e.target.name == "filter-cell") {
if (filterCellChecked < filterCellCheckedAll) {
$filterCellAll.prop('checked', false);
} else if (filterCellChecked === filterCellCheckedAll) {
$filterCellAll.prop('checked', true);
}
indChecked[e.target.id] = e.target.checked;
}
// Select All change
if (e.target.name == "filter-cell-all") {
var checkAll = false;
if (e.target.checked) {
$filterCell.prop('checked', true);
checkAll = true;
} else {
$filterCell.prop('checked', false);
checkAll = false;
isValid = false;
filterCellChecked = 0;
}
for (var i = 0; i < indChecked.length; i++) {
indChecked[i] = checkAll;
}
}
}
if(filterCellChecked === 0) {
isValid = false;
} else {
isValid = true;
}
if(isValid) {
var arrCells = dataFilter.asc_getValues();
arrCells.forEach(function (item, index) {
item.asc_setVisible(indChecked[index]);
});
dataFilter.asc_getFilterObj().asc_setType(Asc.c_oAscAutoFilterTypes.Filters);
this.api.asc_applyAutoFilter(dataFilter);
}
me.setClearDisable();
},
textEmptyItem: '{Blanks}',
textSelectAll: 'Select All',
textErrorTitle: 'Warning',
textErrorMsg: 'You must choose at least one value'
}
})(), SSE.Controllers.FilterOptions || {}))
});

View file

@ -222,8 +222,12 @@ define([
me.appOptions.canPlugins = false;
me.plugins = me.editorConfig.plugins;
if (me.editorConfig.lang)
me.api.asc_setLocale((me.editorConfig.lang) ? parseInt(Common.util.LanguageInfo.getLocalLanguageCode(me.editorConfig.lang)) : 0x0409);
var value = Common.localStorage.getItem("sse-settings-regional");
if (value!==null)
this.api.asc_setLocale(parseInt(value));
else {
this.api.asc_setLocale((this.editorConfig.lang) ? parseInt(Common.util.LanguageInfo.getLocalLanguageCode(this.editorConfig.lang)) : 0x0409);
}
if (me.appOptions.location == 'us' || me.appOptions.location == 'ca')
Common.Utils.Metric.setDefaultMetric(Common.Utils.Metric.c_MetricUnits.inch);
@ -558,6 +562,11 @@ define([
uiApp.closeModal('.document-menu.modal-in');
});
//R1C1 reference style
value = Common.localStorage.getBool('sse-settings-r1c1', false);
this.api.asc_setR1C1Mode(value);
$(document).on('contextmenu', _.bind(me.onContextMenu, me));
Common.Gateway.documentReady();
},

View file

@ -86,7 +86,39 @@ define([
{ value: 'ru', displayValue: 'Russian', exampleValue: ' СУММ; МИН; МАКС; СЧЁТ' },
{ value: 'pl', displayValue: 'Polish', exampleValue: ' SUMA; MIN; MAX; ILE.LICZB' }
],
_indexLang = 0;
_indexLang = 0,
_regdata = [
{ code: 0x042C, name: ["az-Latn-AZ", "Azərbaycan­ılı (Azərbaycan)", "Azeri (Latin, Azerbaijan)"]},
{ code: 0x0402, name: ["bg-BG", "Български (България)", "Bulgarian (Bulgaria)"] },
{ code: 0x0405, name: ["cs-CZ", "Čeština (Česká republika)", "Czech (Czech Republic)"]},
{ code: 0x0407, name: ["de-DE", "Deutsch (Deutschland)", "German (Germany)"]},
{ code: 0x0807, name: ["de-CH", "Deutsch (Schweiz)", "German (Switzerland)"]},
{ code: 0x0408, name: ["el-GR", "Ελληνικά (Ελλάδα)", "Greek (Greece)"]},
{ code: 0x0C09, name: ["en-AU", "English (Australia)", "English (Australia)"]},
{ code: 0x0809, name: ["en-GB", "English (United Kingdom)", "English (United Kingdom)"]},
{ code: 0x0409, name: ["en-US", "English (United States)", "English (United States)"]},
{ code: 0x0C0A, name: ["es-ES", "Español (España, alfabetización internacional)", "Spanish (Spain)"]},
{ code: 0x080A, name: ["es-MX", "Español (México)", "Spanish (Mexico)"]},
{ code: 0x040B, name: ["fi-FI", "Suomi (Suomi)", "Finnish (Finland)"]},
{ code: 0x040C, name: ["fr-FR", "Français (France)", "French (France)"]},
{ code: 0x0410, name: ["it-IT", "Italiano (Italia)", "Italian (Italy)"]},
{ code: 0x0411, name: ["ja-JP", "日本語 (日本)", "Japanese (Japan)"]},
{ code: 0x0412, name: ["ko-KR", "한국어 (대한민국)", "Korean (Korea)"]},
{ code: 0x0426, name: ["lv-LV", "Latviešu (Latvija)", "Latvian (Latvia)"]},
{ code: 0x0413, name: ["nl-NL", "Nederlands (Nederland)", "Dutch (Netherlands)"]},
{ code: 0x0415, name: ["pl-PL", "Polski (Polska)", "Polish (Poland)"]},
{ code: 0x0416, name: ["pt-BR", "Português (Brasil)", "Portuguese (Brazil)"]},
{ code: 0x0816, name: ["pt-PT", "Português (Portugal)", "Portuguese (Portugal)"]},
{ code: 0x0419, name: ["ru-RU", "Русский (Россия)", "Russian (Russia)"]},
{ code: 0x041B, name: ["sk-SK", "Slovenčina (Slovenská republika)", "Slovak (Slovakia)"]},
{ code: 0x0424, name: ["sl-SI", "Slovenski (Slovenija)", "Slovenian (Slovenia)"]},
{ code: 0x081D, name: ["sv-FI", "Svenska (Finland)", "Swedish (Finland)"]},
{ code: 0x041D, name: ["sv-SE", "Svenska (Sverige)", "Swedish (Sweden)"]},
{ code: 0x041F, name: ["tr-TR", "Türkçe (Türkiye)", "Turkish (Turkey)"]},
{ code: 0x0422, name: ["uk-UA", "Українська (Україна)", "Ukrainian (Ukraine)"]},
{ code: 0x042A, name: ["vi-VN", "Tiếng Việt (Việt Nam)", "Vietnamese (Vietnam)"]},
{ code: 0x0804, name: ["zh-CN", "中文(中华人民共和国)", "Chinese (People's Republic of China)"]}
];
var mm2Cm = function(mm) {
return parseFloat((mm/10.).toFixed(2));
@ -179,6 +211,22 @@ define([
domCache: true
});
if (!Common.SharedSettings.get('phone')) {
this.picker = $$(modalView);
var $overlay = $('.modal-overlay');
$$(this.picker).on('opened', function () {
$overlay.on('removeClass', function () {
if (!$overlay.hasClass('modal-overlay-visible')) {
$overlay.addClass('modal-overlay-visible')
}
});
}).on('close', function () {
$overlay.off('removeClass');
$overlay.removeClass('modal-overlay-visible')
});
}
Common.NotificationCenter.trigger('settingscontainer:show');
this.onPageShow(this.getView('Settings'));
},
@ -217,6 +265,8 @@ define([
me.initSpreadsheetMargins();
} else if ('#language-formula-view' == pageId) {
me.initFormulaLang();
} else if ('#regional-settings-view' == pageId) {
me.initRegSettings();
} else {
var _userCount = SSE.getController('Main').returnUserCount();
if (_userCount > 0) {
@ -225,6 +275,20 @@ define([
}
},
initRegSettings: function() {
var value = Number(Common.localStorage.getItem('sse-settings-regional'));
this.getView('Settings').renderRegSettings(value ? value : 0x0409, _regdata);
$('.page[data-page=regional-settings-view] input:radio[name=region-settings]').single('change', _.bind(this.onRegSettings, this));
Common.Utils.addScrollIfNeed('.page[data-page=regional-settings-view]', '.page[data-page=regional-settings-view] .page-content');
},
onRegSettings: function(e) {
var regCode = $(e.currentTarget).val();
Common.localStorage.setItem("sse-settings-regional", regCode);
this.initPageApplicationSettings();
if (regCode!==null) this.api.asc_setLocale(parseInt(regCode));
},
initFormulaLang: function() {
var value = Common.localStorage.getItem('sse-settings-func-lang');
var item = _.findWhere(_dataLang, {value: value});
@ -485,6 +549,36 @@ define([
var $pageLang = $('#language-formula');
$pageLang.find('.item-title').text(item.displayValue);
$pageLang.find('.item-example').text(item.exampleValue);
//init regional settings
value = Number(Common.localStorage.getItem('sse-settings-regional'));
var item = _.findWhere(_regdata, {code: value});
if(!item) {
item = _.findWhere(_regdata, {code: 0x0409});
}
var $regSettings = $('#regional-settings');
$regSettings.find('.item-title').text(item.name[1]);
var info = new Asc.asc_CFormatCellsInfo();
info.asc_setType(Asc.c_oAscNumFormatType.None);
info.asc_setSymbol(value);
var arr = this.api.asc_getFormatCells(info);
var text = this.api.asc_getLocaleExample(arr[4], 1000.01, value);
text = text + ' ' + this.api.asc_getLocaleExample(arr[5], Asc.cDate().getExcelDateWithTime(), value);
text = text + ' ' + this.api.asc_getLocaleExample(arr[6], Asc.cDate().getExcelDateWithTime(), value);
$regSettings.find('.item-example').text(text);
//init r1c1 reference
value = Common.localStorage.getBool('sse-settings-r1c1');
var $r1c1Style = $('.page[data-page=settings-application-view] #r1-c1-style input');
$r1c1Style.prop('checked',value);
$r1c1Style.single('change', _.bind(me.clickR1C1Style, me));
},
clickR1C1Style: function(e) {
var $target = $(e.currentTarget),
checked = $target.prop('checked');
Common.localStorage.setBool('sse-settings-r1c1', checked);
this.api.asc_setR1C1Mode(checked);
},
unitMeasurementChange: function (e) {

View file

@ -69,6 +69,7 @@ define([
setApi: function (api) {
var me = this;
me.api = api;
me.api.asc_registerCallback('asc_onError', _.bind(me.onError, me));
// me.api.asc_registerCallback('asc_onInitEditorFonts', _.bind(onApiLoadFonts, me));
@ -128,7 +129,7 @@ define([
},
onInsertSort: function(type) {
this.api.asc_sortColFilter(type == 'down' ? Asc.c_oAscSortOptions.Ascending : Asc.c_oAscSortOptions.Descending, '');
this.api.asc_sortColFilter(type == 'down' ? Asc.c_oAscSortOptions.Ascending : Asc.c_oAscSortOptions.Descending, '', undefined, undefined, true);
},
onInsertFilter: function(checked) {
@ -139,6 +140,12 @@ define([
this.api.asc_changeAutoFilter(tablename, Asc.c_oAscChangeFilterOptions.filter, checked);
},
onError: function(id, level, errData) {
if(id === Asc.c_oAscError.ID.AutoFilterDataRangeError) {
this.getView('AddOther').optionAutofilter(false);
}
},
textEmptyImgUrl : 'You need to specify image URL.',
txtNotUrl: 'This field should be a URL in the format \"http://www.example.com\"'
}

View file

@ -0,0 +1,51 @@
<!-- Root view -->
<div id="filter-root-view">
<div class="navbar">
<div class="navbar-inner">
<div class="center sliding"><%= scope.textFilter %></div>
<div class="right sliding close-filter"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="pages">
<div class="page" data-page="filter-root-view">
<div class="page-content">
<div class="list-block">
<ul><li>
<div class="item-content buttons">
<div class="item-inner">
<div class="row">
<a class="button no-ripple"><i class="icon sortdown"></i></a>
<a class="button no-ripple"><i class="icon sortup"></i></a>
</div>
</div>
</div>
</li></ul>
</div>
<div class="list-block list-center">
<ul>
<li id="btn-clear-filter">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textClearFilter %></div>
</div>
</div>
</li>
<li id="btn-delete-filter">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textDeleteFilter %></div>
</div>
</div>
</li>
</ul>
</div>
<div id="list-cells" class="list-block">
</div>
</div>
</div>
</div>
</div>

View file

@ -41,7 +41,7 @@
<a id="settings-spreadsheet" class="item-link">
<div class="item-content">
<div class="item-media">
<i class="icon icon-print"></i>
<i class="icon icon-table-settings"></i>
</div>
<div class="item-inner">
<div class="item-title"><%= scope.textSpreadsheetSettings %></div>
@ -53,7 +53,7 @@
<a id="settings-application" class="item-link">
<div class="item-content">
<div class="item-media">
<i class="icon icon-print"></i>
<i class="icon icon-app-settings"></i>
</div>
<div class="item-inner">
<div class="item-title"><%= scope.textApplicationSettings %></div>
@ -430,6 +430,38 @@
</li>
</ul>
</div>
<div class="list-block">
<ul>
<li id="r1-c1-style">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textR1C1Style %></div>
<div class="item-after">
<label class="label-switch">
<input type="checkbox">
<div class="checkbox"></div>
</label>
</div>
</div>
</div>
</li>
</ul>
</div>
<div class="content-block-title"><%= scope.textRegionalSettings %></div>
<div class="list-block">
<ul>
<li class="media-item">
<a id="regional-settings" class="item-link item-content" data-page="#regional-settings-view">
<div class="item-inner">
<div class="item-title-row">
<div class="item-title"><%= scope.textCustom %></div>
</div>
<div class="item-subtitle"><%= scope.textExample + ": "%><span class="item-example"><%= scope.textCustomSize %></span></div>
</div>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
@ -658,6 +690,26 @@
</div>
</div>
<!-- Regional Settings View --->
<div id="regional-settings-view">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"> <i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textRegionalSettings %></div>
</div>
</div>
<div class="pages">
<div class="page" data-page="regional-settings-view">
<div class="page-content">
<div class="list-block">
<ul>
</ul>
</div>
</div>
</div>
</div>
</div>
<!-- Language Formula View --->
<div id="language-formula-view">
<div class="navbar">

View file

@ -0,0 +1,146 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
/**
* FilterOptions.js
* Spreadsheet Editor
*
* Created by Julia Svinareva on 13/6/19
* Copyright (c) 2019 Ascensio System SIA. All rights reserved.
*
*/
define([
'text!spreadsheeteditor/mobile/app/template/FilterOptions.template',
'jquery',
'underscore',
'backbone'
], function (settingsTemplate, $, _, Backbone) {
'use strict';
SSE.Views.FilterOptions = Backbone.View.extend(_.extend((function() {
// private
return {
template: _.template(settingsTemplate),
events: {
//
},
initialize: function() {
Common.NotificationCenter.on('filtercontainer:show', _.bind(this.initEvents, this));
this.on('page:show', _.bind(this.updateItemHandlers, this));
},
initEvents: function () {
var me = this;
Common.Utils.addScrollIfNeed('.view[data-page=filter-root-view] .pages', '.view[data-page=filter-root-view] .page');
me.updateItemHandlers();
},
initControls: function() {
//
},
// Render layout
render: function() {
this.layout = $('<div/>').append(this.template({
android : Common.SharedSettings.get('android'),
phone : Common.SharedSettings.get('phone'),
orthography: Common.SharedSettings.get('sailfish'),
scope : this
}));
return this;
},
updateItemHandlers: function () {
var selectorsDynamicPage = [
'.page[data-page=filter-root-view]'
].map(function (selector) {
return selector + ' a.item-link[data-page]';
}).join(', ');
$(selectorsDynamicPage).single('click', _.bind(this.onItemClick, this));
},
onItemClick: function (e) {
var $target = $(e.currentTarget),
page = $target.data('page');
if (page && page.length > 0 ) {
this.showPage(page);
}
},
rootLayout: function () {
if (this.layout) {
var $layour = this.layout.find('#filter-root-view'),
isPhone = Common.SharedSettings.get('phone');
return $layour.html();
}
return '';
},
showPage: function(templateId, animate) {
var rootView = SSE.getController('FilterOptions').rootView();
if (rootView && this.layout) {
var $content = this.layout.find(templateId);
// Android fix for navigation
if (Framework7.prototype.device.android) {
$content.find('.page').append($content.find('.navbar'));
}
rootView.router.load({
content: $content.html(),
animatePages: animate !== false
});
this.fireEvent('page:show', [this, templateId]);
}
},
textFilter: 'Filter Options',
textClearFilter: 'Clear Filter',
textDeleteFilter: 'Delete Filter'
}
})(), SSE.Views.FilterOptions || {}))
});

View file

@ -169,6 +169,7 @@ define([
showSetApp: function() {
this.showPage('#settings-application-view');
$('#language-formula').single('click', _.bind(this.showFormulaLanguage, this));
$('#regional-settings').single('click', _.bind(this.showRegionalSettings, this));
},
showFormulaLanguage: function () {
@ -179,6 +180,10 @@ define([
this.showPage('#color-schemes-view');
},
showRegionalSettings: function () {
this.showPage('#regional-settings-view');
},
showSetSpreadsheet: function () {
this.showPage('#settings-spreadsheet-view');
$('#color-schemes').single('click', _.bind(this.showColorSchemes, this));
@ -298,6 +303,37 @@ define([
$list.html(items.join(''));
},
renderRegSettings: function(regCode, regions) {
var $pageLang = $('.page[data-page=regional-settings-view]'),
$list = $pageLang.find('ul'),
items = [];
_.each(regions, function (reg) {
var itemTemplate = [
'<li>',
'<label class="label-radio item-content">',
'<input type="radio" name="region-settings" value="<%= item.code %>" <% if (item.code == selectReg) { %>checked="checked"<% } %> >',
'<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>',
'<div class="item-inner">',
'<div class="item-title-row">',
'<i class="icon lang-flag <%= item.name[0]%>"></i>',
'<div class="item-title"><%= item.name[1] %></div>',
'</div>',
'</div>',
'</label>',
'</li>'
].join('');
items.push(_.template(itemTemplate)({
android: Framework7.prototype.device.android,
item: reg,
selectReg: regCode,
}));
});
$list.html(items);
},
unknownText: 'Unknown',
textFindAndReplace: 'Find and Replace',
textSettings: 'Settings',
@ -343,7 +379,9 @@ define([
textRight: 'Right',
textCollaboration: 'Collaboration',
textFormulaLanguage: 'Formula Language',
textExample: 'Example'
textExample: 'Example',
textR1C1Style: 'R1C1 Reference Style',
textRegionalSettings: 'Regional Settings'
}
})(), SSE.Views.Settings || {}))
});

View file

@ -188,10 +188,6 @@ define([
$('.settings .sortdown').single('click', function (e) {me.fireEvent('insert:sort',['down']);});
$('.settings .sortup').single('click', function (e) {me.fireEvent('insert:sort',['up']);});
// temporary hidden
// TODO: make filter's options menu
$('.settings #other-chb-insfilter').parents('.list-block').hide();
$('.settings #other-chb-insfilter input:checkbox').single('change', function (e) {
var $checkbox = $(e.currentTarget);
me.fireEvent('insert:filter', [$checkbox.is(':checked')]);

View file

@ -301,6 +301,10 @@
"SSE.Controllers.Toolbar.leaveButtonText": "Leave this Page",
"SSE.Controllers.Toolbar.stayButtonText": "Stay on this Page",
"SSE.Controllers.Collaboration.textEditUser": "Document is currently being edited by several users.",
"SSE.Controllers.FilterOptions.textEmptyItem": "{Blanks}",
"SSE.Controllers.FilterOptions.textSelectAll": "Select All",
"SSE.Controllers.FilterOptions.textErrorTitle": "Warning",
"SSE.Controllers.FilterOptions.textErrorMsg": "You must choose at least one value",
"SSE.Views.AddFunction.sCatDateAndTime": "Date and time",
"SSE.Views.AddFunction.sCatEngineering": "Engineering",
"SSE.Views.AddFunction.sCatFinancial": "Financial",
@ -549,9 +553,14 @@
"SSE.Views.Settings.textFormulaLanguage": "Formula Language",
"SSE.Views.Settings.textExample": "Example",
"SSE.Views.Settings.textCollaboration": "Collaboration",
"SSE.Views.Settings.textR1C1Style": "R1C1 Reference Style",
"SSE.Views.Settings.textRegionalSettings": "Regional Settings",
"SSE.Views.Toolbar.textBack": "Back",
"SSE.Views.Collaboration.textCollaboration": "Collaboration",
"SSE.Views.Collaboration.textСomments": "Сomments",
"SSE.Views.Collaboration.textBack": "Back",
"SSE.Views.Collaboration.textEditUsers": "Users"
"SSE.Views.Collaboration.textEditUsers": "Users",
"SSE.Views.FilterOptions.textFilter": "Filter Options",
"SSE.Views.FilterOptions.textClearFilter": "Clear Filter",
"SSE.Views.FilterOptions.textDeleteFilter": "Delete Filter"
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -221,4 +221,101 @@ input, textarea {
ul:before {
content: none;
}
}
//Filter Options
.filter-root-view {
.list-center .item-title {
text-align: center;
width: 100%;
}
#btn-delete-filter {
color: @red;
}
}
//Regional Settings
[data-page="regional-settings-view"] {
.list-block .item-title-row {
justify-content: start;
align-items: center;
display: flex;
}
.item-title {
margin-left: 20px;
font-weight: 500;
white-space: normal;
}
}
@common-image-path: "../../../../common/mobile/resources/img";
@img-flags-width: 48px;
.icon.lang-flag {
width: 16px;
height: 12px;
background-image: data-uri(%("%s",'@{common-image-path}/controls/flags.png'));
background-repeat: no-repeat;
background-size: auto;
@media
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and (min-resolution: 2dppx),
only screen and (min-resolution: 192dpi) {
background-image: data-uri(%("%s",'@{common-image-path}/controls/flags@2x.png'));
background-size: @img-flags-width auto;
}
}
.lang-flag {
background-position: -16px -108px;
&.ca, &.ca-ES {background-position: 0 0;}
&.cs, &.cs-CZ {background-position: -16px 0;}
&.da, &.da-DK {background-position: -32px 0;}
&.de, &.de-DE {background-position: 0 -12px;}
&.el, &.el-GR {background-position: -16px -12px;}
&.en, &.en-US {background-position: -32px -12px;}
&.fr, &.fr-FR {background-position: 0 -24px;}
&.hu, &.hu-HU {background-position: -16px -24px;}
&.it, &.it-IT {background-position: -32px -24px;}
&.ko, &.ko-KR {background-position: 0 -36px;}
&.nl, &.nl-NL {background-position: -16px -36px;}
&.nb, &.nb-NO, &.nn, &.nn-NO {background-position: -32px -36px;}
&.pl, &.pl-PL {background-position: 0 -48px;}
&.pt, &.pt-BR {background-position: -16px -48px;}
&.ro, &.ro-RO {background-position: -32px -48px;}
&.ru, &.ru-RU {background-position: 0 -60px;}
&.sv, &.sv-SE {background-position: -32px -60px;}
&.tr, &.tr-TR {background-position: 0 -72px;}
&.uk, &.uk-UA {background-position: -16px -72px;}
&.lv, &.lv-LV {background-position: -32px -72px;}
&.lt, &.lt-LT {background-position: 0 -84px;}
&.vi, &.vi-VN {background-position: -16px -84px;}
&.de-CH {background-position: -32px -84px;}
&.pt-PT {background-position: -16px -96px;}
&.de-AT {background-position: -32px -96px;}
&.es, &.es-ES {background-position: 0 -108px;}
&.en-GB {background-position: -32px -108px;}
&.en-AU {background-position: 0 -120px;}
&.az-Latn-AZ {background-position: -16px -120px;}
&.id, &.id-ID {background-position: -32px -120px;}
&.bg, &.bg-BG {background-position: 0 -132px;}
&.ca-ES-valencia {background-position: -16px -132px;}
&.en-CA {background-position: -32px -132px;}
&.en-ZA {background-position: 0 -144px;}
&.eu, &.eu-ES {background-position: -16px -144px;}
&.gl, &.gl-ES {background-position: -32px -144px;}
&.hr, &.hr-HR {background-position: 0 -156px;}
&.lb, &.lb-LU {background-position: -16px -156px;}
&.mn, &.mn-MN {background-position: -32px -156px;}
&.sl, &.sl-SI {background-position: 0 -168px;}
&.sr, &.sr-Cyrl-RS, &.sr-Latn-RS {background-position: -16px -168px;}
&.sk, &.sk-SK {background-position: -32px -168px;}
&.kk, &.kk-KZ {background-position: 0 -180px;}
&.fi, &.fi-FI, &.sv-FI {background-position: -16px -180px;}
&.zh, &.zh-CN {background-position: -32px -180px;}
&.ja, &.ja-JP {background-position: 0 -192px;}
&.es-MX {background-position: -16px -192px;}
}

View file

@ -207,4 +207,102 @@ input, textarea {
ul:before {
content: none;
}
}
//Filter Options
.filter-root-view {
.list-center .item-title {
text-align: center;
width: 100%;
}
#btn-delete-filter {
color: @red;
}
}
//Regional Settings
[data-page="regional-settings-view"] {
.list-block .item-title-row {
justify-content: space-between;
align-items: center;
display: flex;
width: 100%;
}
.item-title {
font-weight: 400;
white-space: normal;
order: 1;
}
}
@common-image-path: "../../../../common/mobile/resources/img";
@img-flags-width: 48px;
.icon.lang-flag {
order: 2;
width: 16px;
height: 12px;
background-image: data-uri(%("%s",'@{common-image-path}/controls/flags.png'));
background-repeat: no-repeat;
background-size: auto;
@media
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and (min-resolution: 2dppx),
only screen and (min-resolution: 192dpi) {
background-image: data-uri(%("%s",'@{common-image-path}/controls/flags@2x.png'));
background-size: @img-flags-width auto;
}
}
.lang-flag {
background-position: -16px -108px;
&.ca, &.ca-ES {background-position: 0 0;}
&.cs, &.cs-CZ {background-position: -16px 0;}
&.da, &.da-DK {background-position: -32px 0;}
&.de, &.de-DE {background-position: 0 -12px;}
&.el, &.el-GR {background-position: -16px -12px;}
&.en, &.en-US {background-position: -32px -12px;}
&.fr, &.fr-FR {background-position: 0 -24px;}
&.hu, &.hu-HU {background-position: -16px -24px;}
&.it, &.it-IT {background-position: -32px -24px;}
&.ko, &.ko-KR {background-position: 0 -36px;}
&.nl, &.nl-NL {background-position: -16px -36px;}
&.nb, &.nb-NO, &.nn, &.nn-NO {background-position: -32px -36px;}
&.pl, &.pl-PL {background-position: 0 -48px;}
&.pt, &.pt-BR {background-position: -16px -48px;}
&.ro, &.ro-RO {background-position: -32px -48px;}
&.ru, &.ru-RU {background-position: 0 -60px;}
&.sv, &.sv-SE {background-position: -32px -60px;}
&.tr, &.tr-TR {background-position: 0 -72px;}
&.uk, &.uk-UA {background-position: -16px -72px;}
&.lv, &.lv-LV {background-position: -32px -72px;}
&.lt, &.lt-LT {background-position: 0 -84px;}
&.vi, &.vi-VN {background-position: -16px -84px;}
&.de-CH {background-position: -32px -84px;}
&.pt-PT {background-position: -16px -96px;}
&.de-AT {background-position: -32px -96px;}
&.es, &.es-ES {background-position: 0 -108px;}
&.en-GB {background-position: -32px -108px;}
&.en-AU {background-position: 0 -120px;}
&.az-Latn-AZ {background-position: -16px -120px;}
&.id, &.id-ID {background-position: -32px -120px;}
&.bg, &.bg-BG {background-position: 0 -132px;}
&.ca-ES-valencia {background-position: -16px -132px;}
&.en-CA {background-position: -32px -132px;}
&.en-ZA {background-position: 0 -144px;}
&.eu, &.eu-ES {background-position: -16px -144px;}
&.gl, &.gl-ES {background-position: -32px -144px;}
&.hr, &.hr-HR {background-position: 0 -156px;}
&.lb, &.lb-LU {background-position: -16px -156px;}
&.mn, &.mn-MN {background-position: -32px -156px;}
&.sl, &.sl-SI {background-position: 0 -168px;}
&.sr, &.sr-Cyrl-RS, &.sr-Latn-RS {background-position: -16px -168px;}
&.sk, &.sk-SK {background-position: -32px -168px;}
&.kk, &.kk-KZ {background-position: 0 -180px;}
&.fi, &.fi-FI, &.sv-FI {background-position: -16px -180px;}
&.zh, &.zh-CN {background-position: -32px -180px;}
&.ja, &.ja-JP {background-position: 0 -192px;}
&.es-MX {background-position: -16px -192px;}
}

View file

@ -358,6 +358,16 @@ i.icon {
height: 24px;
.encoded-svg-background('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g><path fill-rule="evenodd" clip-rule="evenodd" d="M15.9912 6C15.9912 8.34102 15.4074 10.1346 14.6055 11.3121C13.7983 12.4974 12.8249 13 11.9912 13C11.1575 13 10.1841 12.4974 9.37695 11.3121C8.57501 10.1346 7.99121 8.34102 7.99121 6C7.99121 3.61508 9.96974 2 11.9912 2C14.0127 2 15.9912 3.61508 15.9912 6ZM14.5015 12.9506C13.7365 13.6361 12.8649 14 11.9912 14C11.1195 14 10.2499 13.6378 9.48619 12.9554C7.78363 13.6081 6.36015 14.2591 5.26963 14.9224C3.55256 15.9667 3 16.8326 3 17.5C3 18.2545 3.4257 19.0877 4.82302 19.7879C6.25015 20.5031 8.57272 20.9999 12 21C15.4273 21 17.7499 20.5031 19.177 19.7879C20.5743 19.0877 21 18.2545 21 17.5C21 16.8326 20.4474 15.9667 18.7304 14.9224C17.6372 14.2575 16.2095 13.605 14.5015 12.9506ZM15.2272 12.1594C16.2765 10.7825 16.9912 8.67814 16.9912 6C16.9912 3 14.5 1 11.9912 1C9.48242 1 6.99121 3 6.99121 6C6.99121 8.68159 7.70777 10.7879 8.75931 12.1647C4.60309 13.7964 2 15.4951 2 17.5C2 19.9852 5 21.9999 12 22C19 22 22 19.9852 22 17.5C22 15.4929 19.3913 13.7927 15.2272 12.1594Z" fill="@{themeColor}"/></g></svg>');
}
&.icon-app-settings {
width: 24px;
height: 24px;
.encoded-svg-background('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 14H16C18.2091 14 20 15.7909 20 18C20 20.2091 18.2091 22 16 22H7C4.79086 22 3 20.2091 3 18C3 15.7909 4.79086 14 7 14ZM16 13C18.7614 13 21 15.2386 21 18C21 20.7614 18.7614 23 16 23H7C4.23858 23 2 20.7614 2 18C2 15.2386 4.23858 13 7 13H16Z" fill="@{themeColor}"/><path fill-rule="evenodd" clip-rule="evenodd" d="M16 20C14.8954 20 14 19.1046 14 18C14 16.8954 14.8954 16 16 16C17.1046 16 18 16.8954 18 18C18 19.1046 17.1046 20 16 20ZM16 21C14.3431 21 13 19.6569 13 18C13 16.3431 14.3431 15 16 15C17.6569 15 19 16.3431 19 18C19 19.6569 17.6569 21 16 21Z" fill="@{themeColor}"/><path fill-rule="evenodd" clip-rule="evenodd" d="M16 3H7C4.79086 3 3 4.79086 3 7C3 9.20914 4.79086 11 7 11H16C18.2091 11 20 9.20914 20 7C20 4.79086 18.2091 3 16 3ZM7 2C4.23858 2 2 4.23858 2 7C2 9.76142 4.23858 12 7 12H16C18.7614 12 21 9.76142 21 7C21 4.23858 18.7614 2 16 2H7Z" fill="@{themeColor}"/><path fill-rule="evenodd" clip-rule="evenodd" d="M7 9C8.10457 9 9 8.10457 9 7C9 5.89543 8.10457 5 7 5C5.89543 5 5 5.89543 5 7C5 8.10457 5.89543 9 7 9ZM7 10C8.65685 10 10 8.65685 10 7C10 5.34315 8.65685 4 7 4C5.34315 4 4 5.34315 4 7C4 8.65685 5.34315 10 7 10Z" fill="@{themeColor}"/></svg>');
}
&.icon-table-settings {
width: 24px;
height: 24px;
.encoded-svg-background('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M1 2H22V21H1V2ZM12 3H21V8H12V3ZM12 9H21V14H12V9ZM11 14V9H2V14H11ZM2 15V20H11V15H2ZM12 15H21V20H12V15ZM11 3V8H2V3H11Z" fill="@{themeColor}"/></svg>');
}
}
.chart-types .thumb {

File diff suppressed because one or more lines are too long