Edgewall Software

Changes between Initial Version and Version 3 of Ticket #10714


Ignore:
Timestamp:
Jun 7, 2012, 11:55:48 PM (8 years ago)
Author:
Christian Boos
Comment:

Ok, so here's a proof of concept, it works but can certainly be improved in many ways.

In 60fd4cd/cboos.git, I added an updateData() method which changes the data associated with a selector and tries to update all sub-elements which have specified to be updated. The specification is done in a very simple way, using classes. It's probably even too simple (what if an element wants to be updated for more than one data?).

Basically, it works like this. An element specifies that it wants to react on a change, and how:

<th colspan="$num_cols" class="colspan= trac_num_cols">
  • colspan="$num_cols" is the initial value (Genshi data).
  • class="colspan= trac_num_cols" means: set the colspan attribute to the value of the data trac_num_cols when it is updated via a call to updateData()

The latter happens when the batch modification Javascript code is activated:

var new_trac_num_cols = /* compute new value */;
$("table.listing").updateData('trac_num_cols', new_trac_num_cols);
  • $("table.listing") is the element containing the data 'trac_num_cols'
  • the way the new_trac_num_cols value is computed is a bit complex, i.e. we need to either propagate the initial value from the server via add_script_data or we look at the effective number of cols; it would be much more convenient if we could rely on the initial value being directly associated with the element when it's built, and this is what 3c99d5d/cboos.git hints at…

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10714

    • Property Keywords bitesized added
    • Property Version0.13dev
    • Property Milestone0.13
  • Ticket #10714 – Description

    initial v3  
    77
    88Only displayed tickets are changed (and not the rest of the header).
     9
     10----
     11=== Related branches
     12 - repos:cboos.git:t525/cosmetic-fixes
     13 - repos:cboos.git:ticket10714/updateData-colspan