web/data/cubicweb.js
changeset 9821 2077c8da1893
parent 9815 12e6d911027a
parent 9784 790956c311ef
child 9990 c84ad981fc4a
equal deleted inserted replaced
9819:95902c0b991b 9821:2077c8da1893
    98         // No metadata found, use cell content as sort key
    98         // No metadata found, use cell content as sort key
    99         if (sortvalue === undefined) {
    99         if (sortvalue === undefined) {
   100             return $node.text();
   100             return $node.text();
   101         }
   101         }
   102         return cw.evalJSON(sortvalue);
   102         return cw.evalJSON(sortvalue);
   103     }
   103     },
       
   104 
   104 });
   105 });
   105 
   106 
   106 
   107 
   107 cw.utils = new Namespace('cw.utils');
   108 cw.utils = new Namespace('cw.utils');
   108 jQuery.extend(cw.utils, {
   109 jQuery.extend(cw.utils, {
   334     strFuncCall: function(fname /* ...*/) {
   335     strFuncCall: function(fname /* ...*/) {
   335 	    return (fname + '(' +
   336 	    return (fname + '(' +
   336 		    $.map(cw.utils.sliceList(arguments, 1), JSON.stringify).join(',')
   337 		    $.map(cw.utils.sliceList(arguments, 1), JSON.stringify).join(',')
   337 		    + ')'
   338 		    + ')'
   338 		    );
   339 		    );
       
   340     },
       
   341 
       
   342     callAddOrDeleteThenReload: function (add_or_delete, rtype, subjeid, objeid) {
       
   343         var d = asyncRemoteExec(add_or_delete, rtype, subjeid, objeid);
       
   344         d.addCallback(function() {
       
   345             window.location.reload();
       
   346         });
   339     }
   347     }
       
   348 
   340 
   349 
   341 });
   350 });
   342 
   351 
   343 /** DOM factories ************************************************************/
   352 /** DOM factories ************************************************************/
   344 A = cw.utils.createDomFunction('a');
   353 A = cw.utils.createDomFunction('a');