Release 2.0.1 #79
|
@ -1,5 +1,11 @@
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## 2.0.1
|
||||||
|
### Fixed
|
||||||
|
- fix #78: Top menu is broken - invisible apps are shown
|
||||||
|
- fix #77: Update personal settings - HTTP error 412 (Precondition Failed)
|
||||||
|
- fix js error on the personal settings page (undefined sortable)
|
||||||
|
|
||||||
## 2.0.0
|
## 2.0.0
|
||||||
### Fixed
|
### Fixed
|
||||||
- fix #66: removing usage of setInterval
|
- fix #66: removing usage of setInterval
|
||||||
|
|
|
@ -26,7 +26,7 @@ If you like this application and if you want to support the development:
|
||||||
* [Donate with liberapay](https://liberapay.com/deblan)
|
* [Donate with liberapay](https://liberapay.com/deblan)
|
||||||
* [Leave a comment](https://apps.nextcloud.com/apps/side_menu#comments)
|
* [Leave a comment](https://apps.nextcloud.com/apps/side_menu#comments)
|
||||||
]]></description>
|
]]></description>
|
||||||
<version>2.0.0</version>
|
<version>2.0.1</version>
|
||||||
<licence>agpl</licence>
|
<licence>agpl</licence>
|
||||||
<author mail="contact@deblan.fr" homepage="https://www.deblan.io/">Simon Vieille</author>
|
<author mail="contact@deblan.fr" homepage="https://www.deblan.io/">Simon Vieille</author>
|
||||||
<namespace>SideMenu</namespace>
|
<namespace>SideMenu</namespace>
|
||||||
|
|
|
@ -54,6 +54,7 @@ class PersonalSettingController extends Controller
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @NoAdminRequired
|
* @NoAdminRequired
|
||||||
|
* @NoCSRFRequired
|
||||||
*
|
*
|
||||||
* @param mixed $name
|
* @param mixed $name
|
||||||
* @param mixed $value
|
* @param mixed $value
|
||||||
|
|
26
src/admin.js
26
src/admin.js
|
@ -21,16 +21,17 @@ const selector = '#side-menu-message'
|
||||||
|
|
||||||
const userConfig = (name, value, callbacks) => {
|
const userConfig = (name, value, callbacks) => {
|
||||||
const url = OC.generateUrl('/apps/side_menu/personalSetting/valueSet')
|
const url = OC.generateUrl('/apps/side_menu/personalSetting/valueSet')
|
||||||
const formData = new FormData()
|
const formData = []
|
||||||
formData.append('name', name)
|
|
||||||
formData.append('value', value)
|
formData.push('name=' + encodeURIComponent(name))
|
||||||
|
formData.push('value=' + encodeURIComponent(value))
|
||||||
|
|
||||||
fetch(url, {
|
fetch(url, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/x-www-form-urlencoded',
|
'Content-Type': 'application/x-www-form-urlencoded',
|
||||||
},
|
},
|
||||||
body: formData
|
body: formData.join('&')
|
||||||
})
|
})
|
||||||
.then(callbacks.success)
|
.then(callbacks.success)
|
||||||
.catch(callbacks.error)
|
.catch(callbacks.error)
|
||||||
|
@ -190,13 +191,16 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||||
placeholderClass: 'side-menu-setting-list-drop'
|
placeholderClass: 'side-menu-setting-list-drop'
|
||||||
})
|
})
|
||||||
|
|
||||||
sortable('#categories-list .side-menu-setting-list')[0].addEventListener('sortstop', (e) => {
|
try {
|
||||||
let value = []
|
sortable('#categories-list .side-menu-setting-list')[0].addEventListener('sortstop', (e) => {
|
||||||
|
let value = []
|
||||||
|
|
||||||
for (let item of document.querySelectorAll('#categories-list .side-menu-setting-list-item')) {
|
for (let item of document.querySelectorAll('#categories-list .side-menu-setting-list-item')) {
|
||||||
value.push(item.getAttribute('data-id'))
|
value.push(item.getAttribute('data-id'))
|
||||||
}
|
}
|
||||||
|
|
||||||
document.querySelector('input[name="categories-order"]').value = JSON.stringify(value)
|
document.querySelector('input[name="categories-order"]').value = JSON.stringify(value)
|
||||||
})
|
})
|
||||||
|
} catch (e) {
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -103,7 +103,6 @@ const updateTopMenu = function() {
|
||||||
let k = 0
|
let k = 0
|
||||||
let notInHeader = 0
|
let notInHeader = 0
|
||||||
|
|
||||||
|
|
||||||
for (let app of appShown) {
|
for (let app of appShown) {
|
||||||
const name = app.getAttribute('data-id')
|
const name = app.getAttribute('data-id')
|
||||||
const li = querySelector('#apps li[data-id=' + name + '].app-external-site')
|
const li = querySelector('#apps li[data-id=' + name + '].app-external-site')
|
||||||
|
@ -199,8 +198,8 @@ const updateTopMenu = function() {
|
||||||
menuCache = menu.innerHTML + menu.nextSibling.innerHTML
|
menuCache = menu.innerHTML + menu.nextSibling.innerHTML
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let timeout of [300, 500, 700, 900, 1100]) {
|
for (let i = 0; i < 3000; i+= 100) {
|
||||||
setTimeout(updateTopMenu, timeout)
|
setTimeout(updateTopMenu, i)
|
||||||
}
|
}
|
||||||
|
|
||||||
let resizeTimeout = null;
|
let resizeTimeout = null;
|
||||||
|
|
|
@ -40,7 +40,6 @@ $choicesSizes = [
|
||||||
];
|
];
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div id="side-menu-section">
|
<div id="side-menu-section">
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<h2>
|
<h2>
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
vendor_script('side_menu', 'html5sortable.min');
|
||||||
script('side_menu', 'admin');
|
script('side_menu', 'admin');
|
||||||
style('side_menu', 'admin');
|
style('side_menu', 'admin');
|
||||||
|
|
||||||
|
@ -25,8 +26,6 @@ $choicesYesNo = [
|
||||||
];
|
];
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<div id="side-menu-section">
|
<div id="side-menu-section">
|
||||||
<?php if ($_['force']): ?>
|
<?php if ($_['force']): ?>
|
||||||
<div class="section">
|
<div class="section">
|
||||||
|
|
Loading…
Reference in a new issue