[TikiWiki-commits] [Git][tikiwiki/tiki][27.x] Revert "[BP][REF] Tracker Icon Field: use BS Modal for picking icons instead jQuery UI Dialog"
"luci \(@luciash\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <699781a610683_3b1876bc914f0@gitlab-sidekiq-low-urgency-cpu-bound-v2-787cb4fd49-wfjzn.mail> |
luci pushed to branch 27.x at Tiki Wiki CMS Groupware / Tiki
Commits:
c8c22a6e by luci at 2026-02-19T21:25:33+00:00
Revert "[BP][REF] Tracker Icon Field: use BS Modal for picking icons instead jQuery UI Dialog"
---
* Revert "[BP][REF] Tracker Icon Field: use BS Modal for picking icons instead jQuery UI Dialog"
This reverts merge request !9613
See merge request tikiwiki/tiki!9616
- - - - -
1 changed file:
- templates/trackerinput/icon.tpl
Changes:
=====================================
templates/trackerinput/icon.tpl
=====================================
@@ -1,6 +1,6 @@
<div class="icon-selector-container">
<input type="hidden" name="{$field.ins_id|escape}" value="{$field.value|escape}">
- <img class="icon" src="{$field.value|escape}" role="button" alt="{tr}Select Icon{/tr}">
+ <img class="icon" src="{$field.value|escape}" alt="{tr}Select Icon{/tr}">
<div class="selector" style="display: none;">
<div class="sections" style="float: left; width: 25%;">
<ul class="list-group pe-3">
@@ -19,44 +19,48 @@
{jq}
{literal}
$('.icon-selector-container').removeClass('icon-selector-container').each(function () {
- const icon = $('.icon', this);
- const field = $(':input', this);
- let jqxhr;
- icon.on("click", () => {
- $.openModal({
+ var icon = $('.icon', this).button();
+ var field = $(':input', this);
+ var jqxhr;
+ var selector = $('.selector', this)
+ .dialog({
title: icon.attr('alt'),
- size: 'modal-lg',
- dialogVariants: ['scrollable'],
- content: $('.selector', this).html(),
- open: function () {
- const contents = $('.contents', this);
- $('.sections a', this).css('display', 'block').on("click",function () {
- contents.empty().append($('{/literal}{icon name='spinner' iclass='fa-spin'}{literal}'));
- if (jqxhr) {
- jqxhr.abort();
- }
- jqxhr = $.getJSON($(this).attr('href'), function (data) {
- jqxhr = null;
- contents.empty();
- $.each(data.result, function (k, v) {
- const link = $(v.link);
- link.attr('title', tr(v.title));
- link.empty().append($('<img/>').attr('src', link.attr('href')));
- link.on("click", function () {
- field.val($(this).attr('href'));
- icon.attr('src', $(this).attr('href'));
- $.closeModal();
- return false;
- });
-
- link.appendTo(contents);
+ width: 600,
+ autoOpen: false,
+ modal: true,
+ open: function () { $(document).trigger('iconsloaded'); }
+ })
+ .each(function () {
+ var contents = $('.contents', this);
+ $('.buttons', this).buttonset();
+ $('.sections a', this).css('display', 'block').on("click",function () {
+ contents.empty().append($('{/literal}{icon name='spinner' iclass='fa-spin'}{literal}'));
+ if (jqxhr) {
+ jqxhr.abort();
+ }
+ jqxhr = $.getJSON($(this).attr('href'), function (data) {
+ jqxhr = null;
+ contents.empty();
+ $.each(data.result, function (k, v) {
+ var link = $(v.link);
+ link.attr('title', tr(v.title));
+ link.empty().append($('<img/>').attr('src', link.attr('href')));
+ link.on("click", function () {
+ field.val($(this).attr('href'));
+ icon.attr('src', $(this).attr('href'));
+ selector.dialog('close');
+ return false;
});
+
+ link.appendTo(contents);
});
- return false;
});
- $('.sections a:first', this).trigger("click");
- }
- })
+ return false;
+ });
+ $('.sections a:first', this).trigger("click");
+ });
+ icon.on("click", function () {
+ selector.dialog('open');
});
});
{/literal}
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/c8c22a6eed427bedb441c46d5325db024758b433
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/c8c22a6eed427bedb441c46d5325db024758b433
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs