Added helper for catching tabbed content widget change.
authorJanusz Dobrowolski <janusz@frontaccouting.eu>
Sat, 14 May 2011 08:09:31 +0000 (10:09 +0200)
committerJanusz Dobrowolski <janusz@frontaccouting.eu>
Sat, 14 May 2011 08:09:31 +0000 (10:09 +0200)
includes/ui/ui_controls.inc

index eaaccdca31110b3494c0651cd5ee025a083e8f3e..6d0ccf99b3ab0018a9a358bf7a336475e6873de7 100644 (file)
@@ -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