[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Tabular: tracker selector not rendered on Create Import-Export Format page

"Adrien Mbuya Maloba \(@adrienmaloba\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <69ef662fd13a8_3818ee44980aa@gitlab-sidekiq-low-urgency-cpu-bound-v2-5457c646d7-4g8fg.mail>

Adrien Mbuya Maloba pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
fc49936a by UshindiG at 2026-04-27T16:27:49+03:00
[FIX] Tabular: tracker selector not rendered on Create Import-Export Format page
---
* [FIX] Tabular: fix object_selector type filter lost in AJAX query serialization

See merge request tikiwiki/tiki!9794

- - - - -


2 changed files:

- lib/jquery_tiki/tiki-jquery.js
- templates/tabular/create.tpl


Changes:

=====================================
lib/jquery_tiki/tiki-jquery.js
=====================================
@@ -1538,7 +1538,6 @@ $(document).tiki('copy')(
         return $.service(controller, action, o);
     };
 
-    $.paramsToProcessLength = 0;
     $.buildParams = function (query, prefix, suffix, _keysNamespace = []) {
         prefix = prefix || '';
         suffix = suffix || '';
@@ -1547,30 +1546,25 @@ $(document).tiki('copy')(
             return query;
         }
 
+        const isRoot = prefix === '';
         const params = [];
-        $.paramsToProcessLength = $.paramsToProcessLength || Object.keys(query).length;
 
         for (const [key, value] of Object.entries(query)) {
             if ($.isPlainObject(value) && ! $.isEmptyObject(value)) {
                 _keysNamespace.push(key);
                 const keyNamespace = _keysNamespace.at(-2);
                 const prefixInner = (keyNamespace ? `${keyNamespace}~`: '') + key + '[';
-
-                $.paramsToProcessLength += Object.keys(value).length - 1;
-
                 params.push(...$.buildParams(value, prefixInner, ']', _keysNamespace));
             } else if (Array.isArray(value)) {
                 value.forEach(function (av) {
                     params.push({[`${prefix}${key}${suffix}[]`]: av});
                 });
-                $.paramsToProcessLength--;
             } else {
                 params.push({[`${prefix}${key}${suffix}`]: value});
-                $.paramsToProcessLength--;
             }
         }
 
-        if ($.paramsToProcessLength) return params;
+        if (! isRoot) return params;
 
         return params.map(function (param) {
             const k = Object.keys(param)[0];


=====================================
templates/tabular/create.tpl
=====================================
@@ -23,7 +23,7 @@
         <div class="mb-3 row">
             <label class="col-form-label col-sm-3" for="trackerId">{tr}Tracker{/tr} <span class="text-danger"> *</span></label>
             <div class="col-sm-9">
-                {object_selector _class="form-control" type="tracker" _simplename="trackerId" _simpleid="trackerId"}
+                {object_selector _class="form-control" type="tracker" _simplename="trackerId" _simpleid="trackerId" _simplevalue=$format.trackerId}
             </div>
         </div>
         <div class="row mb-4">



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/fc49936a0f0390e2e1e32ca10dfd221c2ef2b67c

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/fc49936a0f0390e2e1e32ca10dfd221c2ef2b67c
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.