conga/luci/storage cylinder_select.js form-mac ...
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2007-09-25 16:49:36
Modified files:
luci/storage : cylinder_select.js form-macros
Added files:
luci/storage : popup_log.js storage_content.js
storage_probing.js storage_svs.js storage_utils.js storage_validation.js
Log message:
Extract CSS and javascript from page templates
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/popup_log.js.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/storage_content.js.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/storage_probing.js.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/storage_svs.js.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/storage_utils.js.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/storage_validation.js.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/cylinder_select.js.diff?cvsroot=cluster&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/form-macros.diff?cvsroot=cluster&r1=1.26&r2=1.27
/cvs/cluster/conga/luci/storage/popup_log.js,v --> standard output revision 1.1
- renamed from luci/storage/popup_log.js +15 -0
@@ -0,0 +1,15 @@ +function popup_log(mylink, windowname) { + //Thanks to htmlcodetutorial.com + if (!window.focus) { + return true; + } + + var href; + if (typeof(mylink) == 'string') { + href = mylink; + } else { + href = mylink.href; + } + window.open(href, windowname, 'width=500,height=500,scrollbars=yes'); + return false; +}
/cvs/cluster/conga/luci/storage/storage_content.js,v --> standard output revision 1.1
- renamed from luci/storage/storage_content.js +30 -0
@@ -0,0 +1,30 @@ +/* +** Copyright (C) 2006-2007 Red Hat, Inc. +** +** This program is free software; you can redistribute +** it and/or modify it under the terms of version 2 of the +** GNU General Public License as published by the +** Free Software Foundation. +*/ + +var replace_properties_block__old_select_value = '' + +function replace_properties_block(parent_id, select_id) { + var selem = document.getElementById(select_id); + var child_id = selem.value; + selem.value = replace_properties_block__old_select_value; + singleVisibleSpan(parent_id, child_id); +} + +function change_content(select_content_id, content_span_id) { + var content_id = document.getElementById(select_content_id).value; + singleVisibleSpan(content_span_id, content_id); +} + +function reset_bd_form(form, select_content_id, content_span_id) { + if (reset_form(form)) { + change_content(select_content_id, content_span_id); + return true; + } + return false; +}
/cvs/cluster/conga/luci/storage/storage_probing.js,v --> standard output revision 1.1
- renamed from luci/storage/storage_probing.js +47 -0
47 lines not on this page · raw message
/cvs/cluster/conga/luci/storage/storage_svs.js,v --> standard output revision 1.1
- renamed from luci/storage/storage_svs.js +23 -0
@@ -0,0 +1,23 @@ +/* +** Copyright (C) 2006-2007 Red Hat, Inc. +** +** This program is free software; you can redistribute +** it and/or modify it under the terms of version 2 of the +** GNU General Public License as published by the +** Free Software Foundation. +*/ + +function singleVisibleSpan(parent_id, child_id) { + parent = document.getElementById(parent_id); + for (var i = 0; i < parent.childNodes.length ; i++) { + var item = parent.childNodes[i]; + var item_type = item.nodeName().lower(); + if (item_type == 'span' || item_type == 'div') { + if (item.id == child_id) { + item.className = 'visible'; + } else if (item.className == 'visible') { + item.className = 'invisible'; + } + } + } +}
/cvs/cluster/conga/luci/storage/storage_utils.js,v --> standard output revision 1.1
- renamed from luci/storage/storage_utils.js +72 -0
72 lines not on this page · raw message
/cvs/cluster/conga/luci/storage/storage_validation.js,v --> standard output revision 1.1
- renamed from luci/storage/storage_validation.js +398 -0
398 lines not on this page · raw message
luci/storage/cylinder_select.js +8 -6
@@ -12,20 +12,23 @@ var ellipse_dict = [ 2, 3, 4, 5, 5, 6, 6, 7, 7, 7, 8, 8, 8, 8 ]; function ellipse(y) { - if (y > 26) + if (y > 26) { return ellipse(40 - y); - if (y > 13) + } + if (y > 13) { return 9; + } return ellipse_dict[y]; } function select_subcyl(id, h_data) { var old_selection = current_selection; unselect_cyl(old_selection, h_data); - if (id == old_selection) + if (id == old_selection) { current_selection = h_data[0][0]; - else + } else { current_selection = id; + } display_props(h_data); }
@@ -36,8 +39,7 @@ var list = h_data[i][1]; for (var j = 0 ; j < list.length ; j++) { var el = document.getElementById(list[j]); - if (el) - el.className = 'invisible'; + el.className = 'invisible'; } } }
luci/storage/form-macros +28 -657
735 lines not on this page · raw message