Development

Changeset 8395

You must first sign up to be able to contribute.

Changeset 8395

Show
Ignore:
Timestamp:
04/10/08 18:00:00 (1 year ago)
Author:
FabianLange
Message:

added possibility to do sortable_element without ajax call. Added TIP in documentation. (closes #3308)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/helper/JavascriptHelper.php

    r8298 r8395  
    587587  /** 
    588588   * Makes the elements with the DOM ID specified by '$element_id' sortable 
    589    * by drag-and-drop and make an AJAX call whenever the sort order has 
    590    * changed. By default, the action called gets the serialized sortable 
    591    * element as parameters. 
     589   * by drag-and-drop and if an 'url' is specified make an AJAX call whenever 
     590   * the sort order has changed. By default, the action called gets the  
     591   * serialized sortable element as parameters. 
    592592   * 
    593593   * Example: 
     
    616616    } 
    617617 
    618     if (!isset($options['onUpdate'])
     618    if (!isset($options['onUpdate']) && isset($options['url'])
    619619    { 
    620620      $options['onUpdate'] = "function(){".remote_function($options)."}"; 
  • doc/branches/1.1/book/11-Ajax-Integration.txt

    r7987 r8395  
    775775  * `tag`: If the list to order is not a set of `<li>` elements, you must define which child elements of the sortable element are to be made draggable (for instance, `div` or `dl`). 
    776776 
     777>**TIP** 
     778>Since symfony 1.1 you can also use `sortable_element()` helper without the `url` option. Then no AJAX request will be made on sorting. Useful if you want to defer the AJAX call to a `save` button or similar. 
     779 
    777780### Edit in Place 
    778781 

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.