Sherzod Posted November 19, 2021 Share Posted November 19, 2021 Soon... 1 2 Quote Link to comment Share on other sites More sharing options...
x11 Posted November 19, 2021 Share Posted November 19, 2021 Сделайте заодно и пример, как программно листать внутренние панели вперед-назад. Чтобы на главной панели было 2 кнопки (вперед-назад) и пользователь листает внутренние панели этими двумя кнопками. Это будет полезно для организации галереи, т.к. в uniGUI пока что отсутствует компонента-галерея. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 26, 2021 Author Share Posted November 26, 2021 1 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 26, 2021 Author Share Posted November 26, 2021 /** * A version of Accordion layout, than is horizontal rather than vertical. * @author Westy * https://fiddle.sencha.com/#fiddle/297&view/editor */ Ext.define('Ext.ux.layout.container.HorizontalAccordion', { extend: 'Ext.layout.container.Accordion', alias: ['layout.horizontal-accordion'], vertical: false, defaultAnimatePolicy: { x: true, width: true } }, function() { Ext.require(['Ext.layout.container.HBox'], function() { Ext.ux.layout.container.HorizontalAccordion.borrow( Ext.layout.container.HBox, ['type', 'direction', 'horizontal', 'names', 'sizePolicy']); }); } ); function beforeInit(sender, config) { config.layout = { type: 'horizontal-accordion', titleCollapse: false, animate: true }; config.defaults = { bodyStyle: 'padding: 15px', headerPosition: 'left', titleRotation: 2, //0,1,2 titleAlign: 'right', titlePosition: 1 } } 1 Quote Link to comment Share on other sites More sharing options...
x11 Posted November 26, 2021 Share Posted November 26, 2021 @Sherzod неудобство в том, что кнопки ооочень маленькие и расположены между собой далеко. Было бы значительно удобнее вот так: с большими кнопками, которые расположены рядом. Юзабилити же! 1 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 26, 2021 Author Share Posted November 26, 2021 On 11/19/2021 at 6:49 PM, x11 said: Чтобы на главной панели было 2 кнопки (вперед-назад) и пользователь листает внутренние панели этими двумя кнопками. Еще не успел проверить. Выложу чуть позже. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 26, 2021 Author Share Posted November 26, 2021 36 minutes ago, x11 said: Было бы значительно удобнее вот так: с большими кнопками, которые расположены рядом. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 26, 2021 Author Share Posted November 26, 2021 52 minutes ago, x11 said: Было бы значительно удобнее вот так: с большими кнопками, которые расположены рядом. Можно и с кнопками. Quote Link to comment Share on other sites More sharing options...
x11 Posted November 26, 2021 Share Posted November 26, 2021 я верю, а почему вы не хотите показать как? на примере Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 26, 2021 Author Share Posted November 26, 2021 Ещё не подготовил, и не сделано до конца 😐 Quote Link to comment Share on other sites More sharing options...
Franco Grech Posted November 28, 2021 Share Posted November 28, 2021 Hello Sherzod, I'd like to ask you something, Regarding this thread, how did you do that the other panels collapsed by automatically? I try to find out but I couldn't. Thank you for your help! Franco Quote Link to comment Share on other sites More sharing options...
x11 Posted January 26, 2022 Share Posted January 26, 2022 On 11/26/2021 at 8:39 AM, Sherzod said: Ext.define('Ext.ux.layout.container.HorizontalAccordion', { а где скачать примеры, а куда вставлять код? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 26, 2022 Author Share Posted January 26, 2022 1 hour ago, x11 said: а где скачать примеры, а куда вставлять код? Ну, на данный момент нет готового примера. Но, выше, дана последовательность, что и куда вставлять и как собрать работающий пример. Quote Link to comment Share on other sites More sharing options...
x11 Posted January 27, 2022 Share Posted January 27, 2022 так в том-то и дело, что непонятно, куда вставлять это On 11/26/2021 at 8:39 AM, Sherzod said: Ext.define('Ext.ux.layout.container.HorizontalAccordion', { extend: 'Ext.layout.container.Accordion', alias: ['layout.horizontal-accordion'], vertical: false, defaultAnimatePolicy: { x: true, width: true } }, function() { Ext.require(['Ext.layout.container.HBox'], function() { Ext.ux.layout.container.HorizontalAccordion.borrow( Ext.layout.container.HBox, ['type', 'direction', 'horizontal', 'names', 'sizePolicy']); }); } ); Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 27, 2022 Author Share Posted January 27, 2022 27 minutes ago, x11 said: так в том-то и дело, что непонятно, куда вставлять это Okay. (Не обещаю, но постараюсь сделать тестовые примеры...) Наверное, Вы не до конца смотрели видео: 1 Quote Link to comment Share on other sites More sharing options...
x11 Posted January 27, 2022 Share Posted January 27, 2022 Как я уже писал ранее, проблема в том, что ОЧЕНЬ неудобно, что нужно нажимать только на эти маленькие кнопки. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 27, 2022 Author Share Posted January 27, 2022 45 minutes ago, x11 said: Как я уже писал ранее, проблема в том, что ОЧЕНЬ неудобно, что нужно нажимать только на эти маленькие кнопки. 46 minutes ago, x11 said: Здесь все показано: 1 Quote Link to comment Share on other sites More sharing options...
x11 Posted January 27, 2022 Share Posted January 27, 2022 ... Quote Link to comment Share on other sites More sharing options...
x11 Posted January 27, 2022 Share Posted January 27, 2022 config.expandPrevItem = function() { var _break = false; sender.layout.getLayoutItems().forEach(function(pnl, i) { if (!pnl.collapsed && i > 0 && _break == false) { _break = true; sender.layout.getLayoutItems()[i - 1].expand(); } }) }; config.expandNextItem = function() { var _break = false; sender.layout.getLayoutItems().forEach(function(pnl, i) { if (!pnl.collapsed && sender.layout.activeItemCount - 1 && _break == false) { _break = true; sender.layout.getLayoutItems()[i + 1].expand(); } }) }; надеюсь правильно набрал текст кода Quote Link to comment Share on other sites More sharing options...
x11 Posted January 28, 2022 Share Posted January 28, 2022 On 11/26/2021 at 8:39 AM, Sherzod said: extend: 'Ext.layout.container.Accordion', Посмотрите, пожалуйста ошибку: http://forums.unigui.com/index.php?/topic/18637-ошибка-not-found-extlayoutcontaineraccordionjs/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.