summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/js.inc.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-10-25 14:05:30 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-10-25 14:05:30 +0000
commit7fa38045c733627b7d528c5722dc2ffa702c862c (patch)
treed2634b9fab8cbf3645a8e5e0b349bcb64912d326 /frontends/php/include/js.inc.php
parentbb7db0ed62417d62c21d55c0518304c25805af91 (diff)
downloadzabbix-7fa38045c733627b7d528c5722dc2ffa702c862c.tar.gz
zabbix-7fa38045c733627b7d528c5722dc2ffa702c862c.tar.xz
zabbix-7fa38045c733627b7d528c5722dc2ffa702c862c.zip
- [DEV-56] added better item selection in screens (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@4913 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/js.inc.php')
-rw-r--r--frontends/php/include/js.inc.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/frontends/php/include/js.inc.php b/frontends/php/include/js.inc.php
index 04c04bf0..781bc987 100644
--- a/frontends/php/include/js.inc.php
+++ b/frontends/php/include/js.inc.php
@@ -139,4 +139,33 @@ function Alert($msg){
//-->
</script>';
}
+
+function insert_js_function($fnct_name){
+ switch($fnct_name){
+ case 'add_item_variable':
+ echo '<script type="text/javascript">
+ <!--
+ function add_item_variable(s_formname,x_value){
+ if(add_variable(null, "itemid[]", x_value, s_formname, window.opener.document)){
+ var o_form;
+
+ if( !(o_form = window.opener.document.forms[s_formname]) )
+ throw "Missed form with name ["+s_formname+"].";
+
+ var element = o_form.elements["itemid"];
+ if(element) element.name = "itemid[]";
+
+ o_form.submit();
+ }
+
+ close_window();
+ return true;
+ }
+ -->
+ </script>';
+ break;
+ default:
+ break;
+ }
+}
?>