From: Moritz Bunkus Date: Mon, 16 Jan 2017 12:22:10 +0000 (+0100) Subject: Revert "kivi.call_jquery: Funktion zum Aufrufen beliebiger jQuery-Funktionen" X-Git-Tag: release-3.5.4~1705 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=b9f5d35e71de0be24781f36cb56a5806c183ab7f;p=kivitendo-erp.git Revert "kivi.call_jquery: Funktion zum Aufrufen beliebiger jQuery-Funktionen" Dies nimmt Commit 8c93869920ec0bf012a0f59175b39449c90a4d1f zurück. War kein schönes Design, und die Aufrufer wurden bereits auf andere Interfaces umgestellt. --- diff --git a/js/kivi.js b/js/kivi.js index 5ff3ce6ef..27077575d 100644 --- a/js/kivi.js +++ b/js/kivi.js @@ -313,23 +313,6 @@ namespace("kivi", function(ns) { history.back(); }; - // Call arbitrary jQuery functions on arbitrary objects with - // arbitrary arguments. The use case is to allow eval_json_result - // using code to call simple jQuery stuff without having it to wrap - // them in their own small functions. - // Example usage with ActionBar: - // call => [ 'kivi.call_jquery', '#form', 'resetForm' ], - ns.call_jquery = function(this_arg, function_name) { - var func = jQuery.fn[function_name]; - if (!func) - return; - - var args = Array.from(arguments); - args.splice(0, 2); - - return func.apply($(this_arg), args); - }; - // Return a function object by its name (a string). Works both with // global functions (e.g. "check_right_date_format") and those in // namespaces (e.g. "kivi.t8").