Skip to content

Commit 2eb6cff

Browse files
Merge branch 'totaljs:master' into master
2 parents 1b1ed42 + c86f67c commit 2eb6cff

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

j-Directory/component.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ COMPONENT('directory', 'minwidth:200;create:Create', function(self, config, cls)
2020

2121
Thelpers.ui_directory_helper = function(val) {
2222
var t = this;
23-
return self.opt.templatecompiled ? self.opt.templatecompiled(this) : t.template ? (typeof(t.template) === 'string' ? t.template.indexOf('{{') === -1 ? t.template : Tangular.render(t.template, this) : t.render(this, val)) : self.opt.render ? self.opt.render(this, val) : val;
23+
return self.opt.templatecompiled ? self.opt.templatecompiled(this) : t.template ? (typeof(t.template) === 'string' ? t.template.includes('{{') ? Tangular.render(t.template, this) : t.template : t.render(this, val)) : self.opt.render ? self.opt.render(this, val) : val;
2424
};
2525

2626
self.template = Tangular.compile(template);
@@ -336,11 +336,22 @@ COMPONENT('directory', 'minwidth:200;create:Create', function(self, config, cls)
336336
if (self.opt.checked)
337337
item.selected = self.opt.checked.indexOf(item.id) !== -1;
338338

339+
var c = '';
340+
341+
if (item.selected)
342+
c += (c ? ' ' : 'selected current');
343+
344+
if (item.classname)
345+
c += (c ? ' ' : item.classname);
346+
347+
if (item.disabled)
348+
c += (c ? ' ' : 'ui-disabled');
349+
350+
indexer.classes = c;
339351
indexer.index = i;
340352
indexer.search = item[key] ? item[key].replace(regstrip, '') : '';
341353
indexer.checkbox = self.opt.checkbox === true;
342354
resultscount++;
343-
344355
builder.push(self.opt.ta(item, indexer));
345356
}
346357

j-Directory/component.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"datecreated": "2019-01-26T12:36:00.000Z",
3-
"dateupdated": "2025-11-16T18:09:00.000Z",
3+
"dateupdated": "2025-11-25T15:26:00.000Z",
44
"name": "j-Directory",
55
"jcomponent": "19|20",
66
"color": "transparent",

0 commit comments

Comments
 (0)