Re: [Proto-Scripty] Users and Tags

2012-03-23 Thread Jennifer Mostert

Hi Everyone,

With guidance/code from Walter and Marty, I'm finally sorted. :-) My 
code had to find the tag element id and change a style on the 
corresponding user labels after the onClick event. Basically, click a 
tag and then all the people assigned to the tag will be highlighted and 
checked. Then remove the highlight and uncheck when checked = false. 
Thanks again for the help.


Jenny


document.observe('click',function(evt){
if(evt.element().hasClassName('tag')){
var status = evt.element().checked;
var identity = evt.element().identify();
if(status == true) {
var checkedTags = $$('input.tag:checked');
$$('input.user').each(function(elm){
var checked = false;
checkedTags.each(function(c){
var labelId = 'labelfor' + $(elm).identify(); if(elm.hasClassName(c.id) && status == true) {
checked = true;
$(labelId).addClassName('sel');
}
});
elm.checked = checked;
});
}
else {
var uncheckedTags = identity;
$$('input.user').each(function(elm){
var checked = true;
var labelId = 'labelfor' + $(elm).identify(); if(elm.hasClassName(uncheckedTags) && status == false) {
checked = false;
$(labelId).removeClassName('sel');
}
elm.checked = checked;
});
}
}
if(evt.element().hasClassName('user')){
$$('input.tag').each(function(elm){
elm.checked = ($$('input.' + elm.id).length == $$('input.' + elm.id + ':checked').length);
});
}
});



On 21/03/2012 5:54, Walter Lee Davis wrote:

Happy to help!

Walter

On Mar 21, 2012, at 1:31 PM, Jennifer Mostert wrote:


Hi Walter,

Thank you so much. This is fantastic.

Really appreciate the help.

Jenny

On 19/03/2012 4:09, Walter Lee Davis wrote:

Here's a slight detour from your code. Instead of the hash with the groups, 
they are added in the HTML as classnames.

http://jsbin.com/inusaz

Walter

On Mar 16, 2012, at 5:43 AM, Jenny76 wrote:


I need a Prototype script to do exactly what this one does. Anyone
interested in walking me through what changes need to be made to turn
it into Prototype? I tried on my own yesterday, and need some
guidance.

http://jsfiddle.net/8wBg7/31/

Thanks in advance,
Jenny

--
You received this message because you are subscribed to the Google Groups 
"Prototype&   script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.


--
You received this message because you are subscribed to the Google Groups 
"Prototype&  script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



--
You received this message because you are subscribed to the Google Groups "Prototype 
& script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Users and Tags

2012-03-21 Thread Walter Lee Davis
Happy to help!

Walter

On Mar 21, 2012, at 1:31 PM, Jennifer Mostert wrote:

> Hi Walter,
> 
> Thank you so much. This is fantastic.
> 
> Really appreciate the help.
> 
> Jenny
> 
> On 19/03/2012 4:09, Walter Lee Davis wrote:
>> Here's a slight detour from your code. Instead of the hash with the groups, 
>> they are added in the HTML as classnames.
>> 
>> http://jsbin.com/inusaz
>> 
>> Walter
>> 
>> On Mar 16, 2012, at 5:43 AM, Jenny76 wrote:
>> 
>>> I need a Prototype script to do exactly what this one does. Anyone
>>> interested in walking me through what changes need to be made to turn
>>> it into Prototype? I tried on my own yesterday, and need some
>>> guidance.
>>> 
>>> http://jsfiddle.net/8wBg7/31/
>>> 
>>> Thanks in advance,
>>> Jenny
>>> 
>>> -- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "Prototype&  script.aculo.us" group.
>>> To post to this group, send email to 
>>> prototype-scriptaculous@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> prototype-scriptaculous+unsubscr...@googlegroups.com.
>>> For more options, visit this group at 
>>> http://groups.google.com/group/prototype-scriptaculous?hl=en.
>>> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Prototype & script.aculo.us" group.
> To post to this group, send email to prototype-scriptaculous@googlegroups.com.
> To unsubscribe from this group, send email to 
> prototype-scriptaculous+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Users and Tags

2012-03-21 Thread Jennifer Mostert

Hi Walter,

Thank you so much. This is fantastic.

Really appreciate the help.

Jenny

On 19/03/2012 4:09, Walter Lee Davis wrote:

Here's a slight detour from your code. Instead of the hash with the groups, 
they are added in the HTML as classnames.

http://jsbin.com/inusaz

Walter

On Mar 16, 2012, at 5:43 AM, Jenny76 wrote:


I need a Prototype script to do exactly what this one does. Anyone
interested in walking me through what changes need to be made to turn
it into Prototype? I tried on my own yesterday, and need some
guidance.

http://jsfiddle.net/8wBg7/31/

Thanks in advance,
Jenny

--
You received this message because you are subscribed to the Google Groups 
"Prototype&  script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



--
You received this message because you are subscribed to the Google Groups "Prototype 
& script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Users and Tags

2012-03-19 Thread Walter Lee Davis
Here's a slight detour from your code. Instead of the hash with the groups, 
they are added in the HTML as classnames.

http://jsbin.com/inusaz

Walter

On Mar 16, 2012, at 5:43 AM, Jenny76 wrote:

> I need a Prototype script to do exactly what this one does. Anyone
> interested in walking me through what changes need to be made to turn
> it into Prototype? I tried on my own yesterday, and need some
> guidance.
> 
> http://jsfiddle.net/8wBg7/31/
> 
> Thanks in advance,
> Jenny
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Prototype & script.aculo.us" group.
> To post to this group, send email to prototype-scriptaculous@googlegroups.com.
> To unsubscribe from this group, send email to 
> prototype-scriptaculous+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.



Re: [Proto-Scripty] Users and Tags

2012-03-19 Thread Marty Amberg
I would start by making the clicks events in prototype first and then 
checking on if clicked or not.


perhaps not the best answer but I would do something like

 



Untitled Document






Group 1


Group 2


Group 3



Names:

Name 1


Name 2


Name 3


Name 4


Name 5


Name 6





On 3/16/2012 5:43 AM, Jenny76 wrote:

I need a Prototype script to do exactly what this one does. Anyone
interested in walking me through what changes need to be made to turn
it into Prototype? I tried on my own yesterday, and need some
guidance.

http://jsfiddle.net/8wBg7/31/

Thanks in advance,
Jenny



--
EdenStreet Consulting
w:978-741-7518
c:978-821-1309
Twitter: martyateden
Skype: martyateden

--
You received this message because you are subscribed to the Google Groups "Prototype 
& script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.