with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-
+----------------------8<----------------------8<----------------------
RackTables includes "Live Validator", which is licensed under
the BSD license:
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
+----------------------8<----------------------8<----------------------
RackTables includes an enhanced derivative of "Form.Element.Resize"
JavaScript class, which is licensed under the Artistic license:
Copyright (c) 2007 Edoardo Sabadelli. All rights reserved.
+
+----------------------8<----------------------8<----------------------
+
+RackTables includes Collapsible Textareas 1.0, which is licensed under
+Creative Commons Attribution 3.0 License and is copyright (c) 2007
+SiteCrafting, Inc. <service@sitecrafting.com>
$order = 'odd';
foreach ($poolInfo['rslist'] as $rsid => $rs)
{
- echo "<form action='${root}process.php'>";
+ echo "<form class=collapse_tareas action='${root}process.php'>";
echo "<input type=hidden name=page value='${pageno}'>\n";
echo "<input type=hidden name=tab value='${tabno}'>\n";
echo "<input type=hidden name=op value=updRS>";
foreach ($vslist as $vs_id => $configs)
{
$oi = getObjectInfo ($object_id);
- echo "<form action='${root}process.php'>";
+ echo "<form class=collapse_tareas action='${root}process.php'>";
echo "<input type=hidden name=page value='${pageno}'>\n";
echo "<input type=hidden name=tab value='${tabno}'>\n";
echo "<input type=hidden name=op value=updLB>";
$order = 'odd';
foreach (getVSList() as $vsid => $vsinfo)
{
- echo "<form method=post action='${root}process.php'>\n";
+ echo "<form class=collapse_tareas method=post action='${root}process.php'>\n";
echo "<input type=hidden name=page value=${pageno}>\n";
echo "<input type=hidden name=tab value=${tabno}>\n";
echo "<input type=hidden name=op value=upd>\n";
$order='odd';
foreach ($pool_list as $pool_id => $pool_info)
{
- echo "<form method=post action='${root}process.php'>\n";
+ echo "<form class=collapse_tareas method=post action='${root}process.php'>\n";
echo "<input type=hidden name=page value=${pageno}>\n";
echo "<input type=hidden name=tab value=${tabno}>\n";
echo "<input type=hidden name=op value=upd>\n";
echo "</table>\n</form>";
}
+// Disabled at the moment.
function printResizeJS ($elementid)
{
+ return;
?>
<script type="text/javascript">
new Form.Element.Resize
</style>
<script language='javascript' type='text/javascript' src='js/live_validation.js'></script>
<script language='javascript' type='text/javascript' src='js/Resize.js'></script>
+ <script language='javascript' type='text/javascript' src='js/collapsible_textareas.js'></script>
<script type="text/javascript">
function init() {
document.add_new_range.range.setAttribute('match', "^\\d\\d?\\d?\\.\\d\\d?\\d?\\.\\d\\d?\\d?\\.\\d\\d?\\d?\\/\\d\\d?$");
--- /dev/null
+/* Collapsible Textareas, version 1.0
+ * (c) 2007 SiteCrafting, Inc. <service@sitecrafting.com>
+ *
+ * Collapsible Textareas is available under the Creative Commons Attribution
+ * 3.0 License (http://creativecommons.org/licenses/by/3.0/).
+ *
+/*--------------------------------------------------------------------------*/
+
+
+// find all the forms with textareas we want to allow to collapse
+function setupTextareas() {
+ var pageForms = document.getElementsByTagName("form");
+
+ for( var j=0; j<pageForms.length; j++) {
+ var formArea = pageForms[j];
+
+ if( formArea.className.indexOf("collapse_tareas") > -1 ) {
+ var txtAreas = formArea.getElementsByTagName("textarea");
+ for( var i=0; i<txtAreas.length; i++ ) {
+ var thisTxtArea = txtAreas[i];
+
+ if( thisTxtArea.addEventListener ) {
+ thisTxtArea.addEventListener("focus", bigSmlTextarea, false);
+ thisTxtArea.addEventListener("blur", bigSmlTextarea, false);
+ } else { // IE
+ thisTxtArea.attachEvent("onfocus", bigSmlTextarea);
+ thisTxtArea.attachEvent("onblur", bigSmlTextarea);
+ }
+ }
+ }
+ }
+}
+
+// collapse or expand a textarea
+function bigSmlTextarea(e)
+{
+ var node = ( e.target ? e.target : e.srcElement );
+
+ if( node.className.indexOf("expanded") == -1 )
+ node.className += " expanded";
+ else
+ node.className = node.className.replace(/expanded/gi, "");
+}
.port_unknown {
background-color: #ff0000;
}
+
+/* Collapsible Textareas classes */
+.collapse_tareas input, .collapse_tareas textarea { font: 10pt arial, sans-serif; border: 1px solid #888; }
+.collapse_tareas textarea { height: 1.45em; }
+.collapse_tareas textarea.compact { height: 1.45em !important; }
+.collapse_tareas textarea.expanded { height: 5em !important; }