WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org
View
all threads
AW
amy wieliczka
Thu, Oct 11, 2012 7:39 PM
Hello there!
Inactive terms in dynamic term lists display as greyed out values in drop
downs. Is this configurable?
We're looking at migrating old data, and want to keep certain values
displayed in the UI for imported data, but don't want those values to
appear in the drop down lists for future selections. While it is impossible
to select an inactive greyed out term from the drop down list, for the
purposes of drop down real estate we'd prefer if those inactive values
didn't appear at all.
Thanks,
Amy
Hello there!
Inactive terms in dynamic term lists display as greyed out values in drop
downs. Is this configurable?
We're looking at migrating old data, and want to keep certain values
displayed in the UI for imported data, but don't want those values to
appear in the drop down lists for future selections. While it is impossible
to select an inactive greyed out term from the drop down list, for the
purposes of drop down real estate we'd prefer if those inactive values
didn't appear at all.
Thanks,
Amy
PS
Patrick Schmitz
Thu, Oct 11, 2012 8:18 PM
So if the current value is inactive, it must be shown, but any other
inactive values should not be shown?
This is only for term lists, not for NPTs, right?
Patrick
From: Talk [mailto:talk-bounces@lists.collectionspace.org] On Behalf Of amy
wieliczka
Sent: Thursday, October 11, 2012 12:40 PM
To: talk@lists.collectionspace.org
Subject: [Talk] Inactive terms in drop down lists
Hello there!
Inactive terms in dynamic term lists display as greyed out values in drop
downs. Is this configurable?
We're looking at migrating old data, and want to keep certain values
displayed in the UI for imported data, but don't want those values to appear
in the drop down lists for future selections. While it is impossible to
select an inactive greyed out term from the drop down list, for the purposes
of drop down real estate we'd prefer if those inactive values didn't appear
at all.
Thanks,
Amy
So if the current value is inactive, it must be shown, but any other
inactive values should not be shown?
This is only for term lists, not for NPTs, right?
Patrick
_____
From: Talk [mailto:talk-bounces@lists.collectionspace.org] On Behalf Of amy
wieliczka
Sent: Thursday, October 11, 2012 12:40 PM
To: talk@lists.collectionspace.org
Subject: [Talk] Inactive terms in drop down lists
Hello there!
Inactive terms in dynamic term lists display as greyed out values in drop
downs. Is this configurable?
We're looking at migrating old data, and want to keep certain values
displayed in the UI for imported data, but don't want those values to appear
in the drop down lists for future selections. While it is impossible to
select an inactive greyed out term from the drop down list, for the purposes
of drop down real estate we'd prefer if those inactive values didn't appear
at all.
Thanks,
Amy
CH
Chris Hoffman
Thu, Oct 11, 2012 9:12 PM
Correct, only for term lists.
Thanks,
Chris
On Oct 11, 2012, at 1:18 PM, Patrick Schmitz wrote:
So if the current value is inactive, it must be shown, but any other inactive values should not be shown?
This is only for term lists, not for NPTs, right?
Patrick
From: Talk [mailto:talk-bounces@lists.collectionspace.org] On Behalf Of amy wieliczka
Sent: Thursday, October 11, 2012 12:40 PM
To: talk@lists.collectionspace.org
Subject: [Talk] Inactive terms in drop down lists
Hello there!
Inactive terms in dynamic term lists display as greyed out values in drop downs. Is this configurable?
We're looking at migrating old data, and want to keep certain values displayed in the UI for imported data, but don't want those values to appear in the drop down lists for future selections. While it is impossible to select an inactive greyed out term from the drop down list, for the purposes of drop down real estate we'd prefer if those inactive values didn't appear at all.
Thanks,
Amy
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
Correct, only for term lists.
Thanks,
Chris
On Oct 11, 2012, at 1:18 PM, Patrick Schmitz wrote:
> So if the current value is inactive, it must be shown, but any other inactive values should not be shown?
>
> This is only for term lists, not for NPTs, right?
>
> Patrick
>
> From: Talk [mailto:talk-bounces@lists.collectionspace.org] On Behalf Of amy wieliczka
> Sent: Thursday, October 11, 2012 12:40 PM
> To: talk@lists.collectionspace.org
> Subject: [Talk] Inactive terms in drop down lists
>
> Hello there!
>
> Inactive terms in dynamic term lists display as greyed out values in drop downs. Is this configurable?
>
> We're looking at migrating old data, and want to keep certain values displayed in the UI for imported data, but don't want those values to appear in the drop down lists for future selections. While it is impossible to select an inactive greyed out term from the drop down list, for the purposes of drop down real estate we'd prefer if those inactive values didn't appear at all.
>
> Thanks,
> Amy
> _______________________________________________
> Talk mailing list
> Talk@lists.collectionspace.org
> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
JM
Jesse Martinez
Thu, Oct 11, 2012 10:44 PM
I don't know how to deactivate a term in a term list, but here's an
idea for a quick little UI widget that'll do accomplish the same
thing: (I've done something similar for MMI.)
When you create the legacy terms give them a certain ID prefix that
can be later filtered. Say, an ID of 'old:FOO42' for term string 'Foo
term 42'. Then create a widget for the UI that filters out term IDs
starting with the 'old:' prefix.
Tip: the widget must remove the terms completely from the options list
and not just deactivate or hide them with CSS as Chrome will flip out
and not adjust the height of the options list in the UI.
On Thu, Oct 11, 2012 at 5:12 PM, Chris Hoffman
chris.hoffman@berkeley.edu wrote:
Correct, only for term lists.
Thanks,
Chris
On Oct 11, 2012, at 1:18 PM, Patrick Schmitz wrote:
So if the current value is inactive, it must be shown, but any other
inactive values should not be shown?
This is only for term lists, not for NPTs, right?
Patrick
From: Talk [mailto:talk-bounces@lists.collectionspace.org] On Behalf Of amy
wieliczka
Sent: Thursday, October 11, 2012 12:40 PM
To: talk@lists.collectionspace.org
Subject: [Talk] Inactive terms in drop down lists
Hello there!
Inactive terms in dynamic term lists display as greyed out values in drop
downs. Is this configurable?
We're looking at migrating old data, and want to keep certain values
displayed in the UI for imported data, but don't want those values to appear
in the drop down lists for future selections. While it is impossible to
select an inactive greyed out term from the drop down list, for the purposes
of drop down real estate we'd prefer if those inactive values didn't appear
at all.
Thanks,
Amy
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
I don't know how to deactivate a term in a term list, but here's an
idea for a quick little UI widget that'll do accomplish the same
thing: (I've done something similar for MMI.)
When you create the legacy terms give them a certain ID prefix that
can be later filtered. Say, an ID of 'old:FOO42' for term string 'Foo
term 42'. Then create a widget for the UI that filters out term IDs
starting with the 'old:' prefix.
Tip: the widget must remove the terms completely from the options list
and not just deactivate or hide them with CSS as Chrome will flip out
and not adjust the height of the options list in the UI.
- Jesse
On Thu, Oct 11, 2012 at 5:12 PM, Chris Hoffman
<chris.hoffman@berkeley.edu> wrote:
> Correct, only for term lists.
> Thanks,
> Chris
>
>
> On Oct 11, 2012, at 1:18 PM, Patrick Schmitz wrote:
>
> So if the current value is inactive, it must be shown, but any other
> inactive values should not be shown?
>
> This is only for term lists, not for NPTs, right?
>
> Patrick
>
> ________________________________
> From: Talk [mailto:talk-bounces@lists.collectionspace.org] On Behalf Of amy
> wieliczka
> Sent: Thursday, October 11, 2012 12:40 PM
> To: talk@lists.collectionspace.org
> Subject: [Talk] Inactive terms in drop down lists
>
> Hello there!
>
> Inactive terms in dynamic term lists display as greyed out values in drop
> downs. Is this configurable?
>
> We're looking at migrating old data, and want to keep certain values
> displayed in the UI for imported data, but don't want those values to appear
> in the drop down lists for future selections. While it is impossible to
> select an inactive greyed out term from the drop down list, for the purposes
> of drop down real estate we'd prefer if those inactive values didn't appear
> at all.
>
> Thanks,
> Amy
>
> _______________________________________________
> Talk mailing list
> Talk@lists.collectionspace.org
> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
>
>
>
> _______________________________________________
> Talk mailing list
> Talk@lists.collectionspace.org
> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
>
AW
amy wieliczka
Thu, Oct 18, 2012 11:16 PM
I ended up adding a few lines to the finalInit function of TermList.js
(line 112) to modify the behavior of dynamic term lists:
cspace.termList.impl.finalInit = function (that) {
if (that.options.activestatus) {
fluid.each($("option", that.locate("termList")), function
(option, index) {
var stat = that.options.activestatus[index];
// http://issues.collectionspace.org/browse/CSPACE-4782: If
status is "",
// UI will not disable the option in dropdown (as per JIRA).
-
var selected = $(option).attr("selected");
-
if (stat && stat !== "active") {
-
if (selected !== "selected") {
-
$(option).remove();
-
} else {
-
$(option).css("color", "graytext");
-
}
-
}
});
}
that.events.ready.fire(that);
};
So if a user marks a term as 'inactive' in the admin page, the term will be
removed from the rendered drop down lists unless it is the currently
selected value (as in the case for historical data still making use of the
inactive term). In this case the term will still appear in the rendered
drop down list as a selectable value, ie: the <option> tag is not disabled,
as was previously the case. This enables the user to potentially do some
data cleanup, but if they accidentally change the value and want to change
it back to the historical value (before save), they can. To distinguish
that the currently selected value is a historical value, it is displayed
greyed out in the drop down list.
Some drawbacks:
- the term does not appear greyed out in chrome, which doesn't support the
styling of <option> tags.
- the term does not appear greyed out in the <select> tag, only once you
have clicked on the drop down's arrow to look at other options. Previously,
when a term was completely disabled, it appeared greyed out in the
<select>tag and in the
<option> list. However, completely disabling a term like this (<option
disabled="disabled">) prevented a user from undoing a change to use one of
the new terms before save. If this is not a concern, the else clause of the
snippit above could be changed to the line that was removed:
else { $(option).prop("disabled", stat && stat !== "active") }
This will also solve the chrome problem, since disabled <option> tags are
supported in chrome.
-amy
On Thu, Oct 11, 2012 at 3:44 PM, Jesse Martinez jmartinez@movingimage.uswrote:
I don't know how to deactivate a term in a term list, but here's an
idea for a quick little UI widget that'll do accomplish the same
thing: (I've done something similar for MMI.)
When you create the legacy terms give them a certain ID prefix that
can be later filtered. Say, an ID of 'old:FOO42' for term string 'Foo
term 42'. Then create a widget for the UI that filters out term IDs
starting with the 'old:' prefix.
Tip: the widget must remove the terms completely from the options list
and not just deactivate or hide them with CSS as Chrome will flip out
and not adjust the height of the options list in the UI.
On Thu, Oct 11, 2012 at 5:12 PM, Chris Hoffman
chris.hoffman@berkeley.edu wrote:
Correct, only for term lists.
Thanks,
Chris
On Oct 11, 2012, at 1:18 PM, Patrick Schmitz wrote:
So if the current value is inactive, it must be shown, but any other
inactive values should not be shown?
This is only for term lists, not for NPTs, right?
Patrick
From: Talk [mailto:talk-bounces@lists.collectionspace.org] On Behalf Of
wieliczka
Sent: Thursday, October 11, 2012 12:40 PM
To: talk@lists.collectionspace.org
Subject: [Talk] Inactive terms in drop down lists
Hello there!
Inactive terms in dynamic term lists display as greyed out values in drop
downs. Is this configurable?
We're looking at migrating old data, and want to keep certain values
displayed in the UI for imported data, but don't want those values to
in the drop down lists for future selections. While it is impossible to
select an inactive greyed out term from the drop down list, for the
of drop down real estate we'd prefer if those inactive values didn't
I ended up adding a few lines to the finalInit function of TermList.js
(line 112) to modify the behavior of dynamic term lists:
cspace.termList.impl.finalInit = function (that) {
if (that.options.activestatus) {
fluid.each($("option", that.locate("termList")), function
(option, index) {
var stat = that.options.activestatus[index];
// http://issues.collectionspace.org/browse/CSPACE-4782: If
status is "",
// UI will not disable the option in dropdown (as per JIRA).
- $(option).prop("disabled", stat && stat !== "active")
+ var selected = $(option).attr("selected");
+ if (stat && stat !== "active") {
+ if (selected !== "selected") {
+ $(option).remove();
+ } else {
+ $(option).css("color", "graytext");
+ }
+ }
});
}
that.events.ready.fire(that);
};
So if a user marks a term as 'inactive' in the admin page, the term will be
removed from the rendered drop down lists unless it is the currently
selected value (as in the case for historical data still making use of the
inactive term). In this case the term will still appear in the rendered
drop down list as a selectable value, ie: the <option> tag is not disabled,
as was previously the case. This enables the user to potentially do some
data cleanup, but if they accidentally change the value and want to change
it back to the historical value (before save), they can. To distinguish
that the currently selected value is a historical value, it is displayed
greyed out in the drop down list.
Some drawbacks:
- the term does not appear greyed out in chrome, which doesn't support the
styling of <option> tags.
- the term does not appear greyed out in the <select> tag, only once you
have clicked on the drop down's arrow to look at other options. Previously,
when a term was completely disabled, it appeared greyed out in the
<select>tag and in the
<option> list. However, completely disabling a term like this (<option
disabled="disabled">) prevented a user from undoing a change to use one of
the new terms before save. If this is not a concern, the else clause of the
snippit above could be changed to the line that was removed:
else { $(option).prop("disabled", stat && stat !== "active") }
This will also solve the chrome problem, since disabled <option> tags are
supported in chrome.
-amy
On Thu, Oct 11, 2012 at 3:44 PM, Jesse Martinez <jmartinez@movingimage.us>wrote:
> I don't know how to deactivate a term in a term list, but here's an
> idea for a quick little UI widget that'll do accomplish the same
> thing: (I've done something similar for MMI.)
>
> When you create the legacy terms give them a certain ID prefix that
> can be later filtered. Say, an ID of 'old:FOO42' for term string 'Foo
> term 42'. Then create a widget for the UI that filters out term IDs
> starting with the 'old:' prefix.
>
> Tip: the widget must remove the terms completely from the options list
> and not just deactivate or hide them with CSS as Chrome will flip out
> and not adjust the height of the options list in the UI.
>
> - Jesse
>
> On Thu, Oct 11, 2012 at 5:12 PM, Chris Hoffman
> <chris.hoffman@berkeley.edu> wrote:
> > Correct, only for term lists.
> > Thanks,
> > Chris
> >
> >
> > On Oct 11, 2012, at 1:18 PM, Patrick Schmitz wrote:
> >
> > So if the current value is inactive, it must be shown, but any other
> > inactive values should not be shown?
> >
> > This is only for term lists, not for NPTs, right?
> >
> > Patrick
> >
> > ________________________________
> > From: Talk [mailto:talk-bounces@lists.collectionspace.org] On Behalf Of
> amy
> > wieliczka
> > Sent: Thursday, October 11, 2012 12:40 PM
> > To: talk@lists.collectionspace.org
> > Subject: [Talk] Inactive terms in drop down lists
> >
> > Hello there!
> >
> > Inactive terms in dynamic term lists display as greyed out values in drop
> > downs. Is this configurable?
> >
> > We're looking at migrating old data, and want to keep certain values
> > displayed in the UI for imported data, but don't want those values to
> appear
> > in the drop down lists for future selections. While it is impossible to
> > select an inactive greyed out term from the drop down list, for the
> purposes
> > of drop down real estate we'd prefer if those inactive values didn't
> appear
> > at all.
> >
> > Thanks,
> > Amy
> >
> > _______________________________________________
> > Talk mailing list
> > Talk@lists.collectionspace.org
> >
> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
> >
> >
> >
> > _______________________________________________
> > Talk mailing list
> > Talk@lists.collectionspace.org
> >
> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
> >
>