x11 Posted May 23, 2020 Share Posted May 23, 2020 Получилось так. config.itemTpl = new Ext.XTemplate('<table class="tblObj">'+ '<tr>'+ '<td style="color:#2c81aa">ID {0}, ID на сайті: {13}</td>'+ '<td><input class="btnEdit" type="button" value="ClickMe" data-id="{0}"></td>' + '</tr>'+ ... ... ... } //custommob.css .tblObj { width: 100vw; padding-right: 30px; white-space: nowrap; vertical-align: middle; } .btnEdit { float: right; } Работает. Но... правильно ли я сделал или можно ещё лучше? P.S. класс кнопки я переименовал + убрал точку. Теперь просто "btnEdit". Quote Link to comment Share on other sites More sharing options...
x11 Posted May 23, 2020 Share Posted May 23, 2020 Ещё вопрос, как вместо слова ClickMe вставить значок редактирования? https://fontawesome.com/icons/edit?style=solid Quote Link to comment Share on other sites More sharing options...
x11 Posted May 23, 2020 Share Posted May 23, 2020 в этом видео показано, как можно вставить значок https://www.youtube.com/watch?v=8nSiep3XUws но у меня не получается config.itemTpl = new Ext.XTemplate('<table class="tblObj">'+ '<tr>'+ '<td style="color:#2c81aa">ID {0}, ID на сайті: {13}</td>'+ '<td><input class="btnEdit ico-edit" type="button" value="ico-edit" data-id="{0}"></td>' + Подключил css (тот что приложил к этому сообщению). Добавил "ico-edit", но на кнопке вижу только надпись "ico-edit". Да ещё и стандартные значки UniGUI перестали отображаться icons-fa.css Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 23, 2020 Share Posted May 23, 2020 On 5/22/2020 at 4:10 PM, Sherzod said: '<td><input class=".btn1" type="button" value="ClickMe" data-id="{0}"></td>' + '<td><button class="btn1" data-id="{0}"><i class="fas fa-edit"></i> ClickMe</button></td>'+ delegate: 'table button' 1 Quote Link to comment Share on other sites More sharing options...
x11 Posted May 13, 2021 Share Posted May 13, 2021 On 5/23/2020 at 9:03 PM, Sherzod said: delegate: 'table button' Подскажите пожалуйста, что может быть не так? Сделал еще одну форму и в этой в этой другой форме я использовал не table/td/tr, а DIVы в шаблоне. Кнопка на форме есть, но при нажатии на неё ничего не происходит, т.е. ajaxRequest на сервер не отправляется. Может в delegate: 'table button' дело? Спасибо. 1 Quote Link to comment Share on other sites More sharing options...
x11 Posted May 13, 2021 Share Posted May 13, 2021 16 minutes ago, x11 said: Может в delegate: 'table button' дело? Не знаю, правильно ли это, я заменил на delegate: 'button' пока что работает... 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.