web/data/cubicweb.edition.js
branchstable
changeset 6727 2eeccd6f8abe
parent 6726 51880d28ef63
child 6746 f29a5f015fc3
equal deleted inserted replaced
6726:51880d28ef63 6727:2eeccd6f8abe
     9 
     9 
    10 //============= Eproperty form functions =====================================//
    10 //============= Eproperty form functions =====================================//
    11 /**
    11 /**
    12  * .. function:: setPropValueWidget(varname, tabindex)
    12  * .. function:: setPropValueWidget(varname, tabindex)
    13  *
    13  *
    14  * called on Eproperty key selection:
    14  * called on CWProperty key selection:
    15  * - get the selected value
    15  * - get the selected value
    16  * - get a widget according to the key by a sync query to the server
    16  * - get a widget according to the key by a sync query to the server
    17  * - fill associated div with the returned html
    17  * - fill associated div with the returned html
    18  *
    18  *
    19  * * `varname`, the name of the variable as used in the original creation form
    19  * * `varname`, the name of the variable as used in the original creation form
    64             var args = {
    64             var args = {
    65                 vid: 'unrelateddivs',
    65                 vid: 'unrelateddivs',
    66                 relation: selectedValue,
    66                 relation: selectedValue,
    67                 rql: rql_for_eid(eid),
    67                 rql: rql_for_eid(eid),
    68                 '__notemplate': 1,
    68                 '__notemplate': 1,
    69                 callback: function() {
       
    70                     _showMatchingSelect(eid, jQuery('#' + divId));
       
    71                 }
       
    72             };
    69             };
    73             jQuery('#unrelatedDivs_' + eid).loadxhtml(baseuri() + 'view', args, 'post', 'append');
    70             var d = jQuery('#unrelatedDivs_' + eid).loadxhtml(baseuri() + 'view', args, 'post', 'append');
       
    71             d.addCallback(function() {
       
    72                 _showMatchingSelect(eid, jQuery('#' + divId));
       
    73             });
    74         } else {
    74         } else {
    75             _showMatchingSelect(eid, divNode);
    75             _showMatchingSelect(eid, divNode);
    76         }
    76         }
    77     } else {
    77     } else {
    78         _showMatchingSelect(eid, null);
    78         _showMatchingSelect(eid, null);