RE: [Rails-spinoffs] Add new lists to existing sortables container

2006-02-18 Thread Duncan Austin


Hi Ryan,
 
You're right, the entire menu should generally be loaded upfront, but for the CMS I need to be able to create a new sub menu if the admin wants one, which means that there will be a new list that wasn't there when the page loaded. I could of course reload the page but I want it to be as seamless as possible. There must be some way to reference/set the containment of an existing list...?


Subject: RE: [Rails-spinoffs] Add new lists to existing sortables containerDate: Fri, 17 Feb 2006 09:20:36 -0600From: [EMAIL PROTECTED]To: rails-spinoffs@lists.rubyonrails.org








Hi Duncan,
 
Welcome to the list. My very first thought in this matter is that you may possibly be using AJAX where it’s not warranted. Is there a real benefit in not just creating the whole menu structure up front? Are you sending a request to the server every single time someone tried to open up a sub-menu? I would definitely argue here that you should look seriously at how and why you are using AJAX.
 
 
 




From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Duncan AustinSent: Friday, February 17, 2006 9:18 AMTo: rails-spinoffs@lists.rubyonrails.orgSubject: [Rails-spinoffs] Add new lists to existing sortables container
 
Hi All,
 
I'm using scriptaculous for the first time. I'm creating a CMS where the user can simply drag menu items to change the order. This is all simple enough. My problem comes with nested menus. The sortables are fine within their own menu but not across other new menus. The reason for this is that I'm using AJAX and only create a sub menu when it's parent is clicked on so I can't list all the containments up front for each list. 
 
I need to be able to add new sub menus to the containment of previous lists. Any one have any idea how to do this?
I see there's a Droppable.add, but I can't see how to make this work for my sortable containment ...
 
Any help much appreciated 
 
Regards
 
Duncan
 



Express yourself instantly with MSN Messenger! MSN Messenger
The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material.  Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers.Express yourself instantly with MSN Messenger! MSN Messenger
___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


[Rails-spinoffs] inPlaceEditor formatted XML

2006-02-18 Thread Ivo Toby

Hi List!

I was just wondering. I'm cooking up a all-in-one-publishing system
based on XML/XSL-translations. Without going into that in detail; i'd
like to ask; is there any way that the InPlaceEditor is able to display
XSL-translated XML on the fly? If not, where to start to build such ? Is
the inPlaceEditor a good place to start from? 


I'm thinking of the way the Bitflux inline XML-editor works.
(http://bxe.oscom.org/)

Thanks!

Ivo

___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


Re: [Rails-spinoffs] Sortable Tree Addition [PATCH]

2006-02-18 Thread Nicolas Terray
On 2/17/06, Sammi Williams <[EMAIL PROTECTED]> wrote:
> The only actual file you need to update is dragdrop.js
>
> It should be backwards compatible with your current version, but I haven't
> tested this on browsers other than Safari and Mozilla.
>
> Remember this patch will hopefully be integrated with the main code, and
> isn't a final version for use in production code.
>
> Sammi
>

Thank you for your work, I've appreciated the highlighted zones which
let me to understand how your stuff work!

Thanks,
Nicolas
___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


[Rails-spinoffs] slider not working in a table for IE 6

2006-02-18 Thread Joe Hudson
Title: slider not working in a table for IE 6






Hello, I’m trying to use the slider inside a table and am having problems.  I’m wondering if anybody can help or, if it just isn’t possible for some reason.  The following 2 entries are the exact same code (1 inside  and 1 inside ).  The div one works fine but the table one doesn’t work (using IE 6… Firefox is fine).  I don’t actually get a script error… the slider just doesn’t move (and doesn’t initialize with the “.34” value).  I’d really appreciate some help.  Thanks.



    

    

    

        new Control.Slider('handle_8499','track_8499',{

            onChange:function(v){v=v*100; $('slider_id').value=v.toFixed(2);},

            sliderValue:"0.34"});

               

        new Control.Slider('handle_8499','track_8499',{

            onChange:function(v){v=v*100; $('slider_id').value=v.toFixed(2);},

            sliderValue:"0.34"});

    ___ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


[Rails-spinoffs] Updated: window dialog script







Dialog script has been update. A demo can be seen here: http://net4visions.com/dev/dialog/dialog.htm .Please see changelog for changes.  The dialog script can be downloaded from here:http://www.net4visions.com/dev/downloads/dialog.zip 

 

 

 

 






___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


[Rails-spinoffs] Move element into view

Hello,

I am in fly-by mode as I am still more than busy, so I just dumb this
one out for anyone interested. Adapt it for your needs if you like it.

This effect is similar to ScrollTo, but scrolls the viewport
vertically the minimal amount necessary to bring the element into
view.

Usage:  new Effect.ScrollToFullView(element, {duration: 0.6, offset: 10});

Offset is the distance in pixel to the upper/lower viewport border.
You need to define window.isIE as true/false somewhere prior or change the code.

// Nur sowenig wie möglich scrollen, bis das Element sichtbar ist.
Effect.ScrollToFullView = Class.create();
Object.extend(Object.extend(Effect.ScrollToFullView.prototype,
Effect.ScrollTo.prototype), {
  setup: function() {
Position.prepare();
this.scrollStart = Position.deltaY;
var offsets = Position.cumulativeOffset(this.element);
var rand = 0;
if(this.options.offset) rand = this.options.offset;

var element_kante_oben = offsets[1];
var element_hoehe = this.element.offsetHeight;

// Länge und Position des dargestellten Ausschnitts relativ zum
gesamten Dokument
var screen_bottom, screen_height, screen_scrolled;
if (isIE){
  screen_height = document.documentElement.clientHeight;
  screen_scrolled = document.documentElement.scrollTop;
} else {
  screen_height = window.innerHeight;
  screen_scrolled = window.pageYOffset;
}
screen_bottom = screen_scrolled + screen_height;

// Obere Kante des Elements sichtbar und Position des Elements +
seine Höhe < screen_bottom
// => Element wird schon komplett dargestellt
if (element_kante_oben > screen_scrolled && element_kante_oben +
element_hoehe + rand < screen_bottom ) {
  this.delta = 0;
  return;
}

var new_top;
// Wenn Element höher als Bildschirmhöhe, dann bis zur oberen
Kante des Elements scrollen
if (element_hoehe + rand > screen_height) {
  new_top = element_kante_oben - rand;
} else {
  // Muß nach oben gescrollt werden?
  if (element_kante_oben < screen_scrolled) {
// nach oben scrollen
new_top = element_kante_oben - rand;
  } else {
// nach unten scrollen
new_top = element_kante_oben + element_hoehe + rand - screen_height;
  }
}

var max = !isIE
  ? window.height - screen_height
  : document.body.scrollHeight - screen_height;
this.delta  = (new_top > max ? max : new_top) - this.scrollStart;
  }
});
___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


Re: [Rails-spinoffs] Sorting Multiple Arrays

On 2/17/06, Jason Hummel <[EMAIL PROTECTED]> wrote:

> So for instance if I wanted to sort on
> myObject.data.line[2] the object would rearrange itself to look like:

Thant would be
myObject.data = myObject.data.sortBy( function(v){ return v.line[2] });

Bye,
  Martin
___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


RE: [Rails-spinoffs] slider not working in a table for IE 6

Hello Joe,
 
This infact is a strange IE6 bug.
 
This I think is related to the DOM implementation in IE.
 
Coming to the solution -
 
Just move the script tag outside the table and it will start working.
 
IE6 doesn't like script tags within table.
 
Hope this helps!
 
Thank you,
Mandy.
 
 



  
  
  

  
  




  new Control.Slider('handle_8499','track_8499',{
  onChange:function(v){v=v*100; $('slider_id').value=v.toFixed(2);},
  sliderValue:"0.34"});


<>___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


Re: [Rails-spinoffs] window.onresize event using Behaviour.js ?

On Friday 17 February 2006 12:04, Alex Duffield wrote:
> Does any one know how to register a window.onresize event using
> Behaviour.js
>
> I tryed
>
> var myrules = {
>   'window' : function(el){
>   el.onresize = function(){
>   alert("Window Resized")
>   }
>   },
> }
>
> Behaviour.register(myrules);

why not juse use (requires prototype.js):
Event.observe(window, 'resize', function() { alert("Window Resized"); } );


you can toss that in the same script file.

since behaviour.js uses CSS selectors to identify elements, using 'window' as 
a selector will simply look for a  tag in your DOM, which probably 
doesn't exist.

-Jeremy

-- 
Jeremy Kitchen ++ [EMAIL PROTECTED]

In the beginning was The Word and The Word was Content-type: text/plain
  -- The Word of Bob.


pgp1zpg0dsrbm.pgp
Description: PGP signature
___
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


[Rails-spinoffs] spinner not working inside a table with IE 6

Title: spinner not working inside a table with IE 6






Hello, I’m trying to use the slider inside a table and am having problems.  I’m wondering if anybody can help or, if it just isn’t possible for some reason.  The following 2 samples contain same code (1 inside  and 1 inside ).  The div one works fine but the table one doesn’t work (using IE 6… Firefox is fine).  I don’t actually get a script error… the slider just doesn’t move (and doesn’t initialize with the “.34” value).  I’d really appreciate some help.  Thanks.



    

    

    

        new Control.Slider('handle_8499','track_8499',{

            onChange:function(v){v=v*100; $('slider_id').value=v.toFixed(2);},

            sliderValue:"0.34"});

               

        new Control.Slider('handle_8499','track_8499',{

            onChange:function(v){v=v*100; $('slider_id').value=v.toFixed(2);},

            sliderValue:"0.34"});

    ___ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs


RE: [Rails-spinoffs] spinner not working inside a table with IE 6

Title: spinner not working inside a table with IE 6








I’m sorry if I sent this message
more than once.  I was having with my email and wasn’t sure if I
sent it because I never received.  I just saw a response to this so I know
I at least sent twice.  Very sorry for the spam.  Thanks very much
for the help.

 

Joe

 









From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Joe Hudson
Sent: Saturday, February 18, 2006
5:25 PM
To:
rails-spinoffs@lists.rubyonrails.org
Subject: [Rails-spinoffs] spinner
not working inside a table with IE 6



 

Hello,
I’m trying to use the slider inside a table and am having problems. 
I’m wondering if anybody can help or, if it just isn’t possible for
some reason.  The following 2 samples contain same code
(1 inside  and 1 inside ). 
The div one works fine but the table one doesn’t work (using IE 6…
Firefox is fine).  I don’t actually get a script error… the
slider just doesn’t move (and doesn’t initialize with the
“.34” value).  I’d really appreciate some help. 
Thanks.



   


   


   

        new Control.Slider('handle_8499','track_8499',{

            onChange:function(v){v=v*100; $('slider_id').value=v.toFixed(2);},

            sliderValue:"0.34"});

               

        new Control.Slider('handle_8499','track_8499',{

            onChange:function(v){v=v*100; $('slider_id').value=v.toFixed(2);},

            sliderValue:"0.34"});

    ___ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs