From: Janusz Dobrowolski Date: Sat, 14 May 2011 08:09:31 +0000 (+0200) Subject: Added helper for catching tabbed content widget change. X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=e4079fa9509b9a17b72653a863d81886ee1adc81;p=textcart.git Added helper for catching tabbed content widget change. --- diff --git a/includes/ui/ui_controls.inc b/includes/ui/ui_controls.inc index eaaccdc..6d0ccf9 100644 --- a/includes/ui/ui_controls.inc +++ b/includes/ui/ui_controls.inc @@ -415,6 +415,15 @@ function tabbed_content_end() { div_end(); // tabs widget } +function tab_changed($name) +{ + $to = find_submit("{$name}_", false); + if (!$to) return null; + + return array('from' => $from = get_post("_{$name}_sel"), + 'to' => $to); +} + /* Table editor interfaces. Key is editor type 0 => url of editor page 1 => hotkey code