This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Useful tools. | |
Author: venom | |
Date: 22.01.2009 | |
*/ | |
// Merging two objects | |
Object.prototype.extend = function(extended) { | |
for (var key in (extended || {})) this[key] = extended[key]; | |
return this; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" src="scripts/utils.js"></script> | |
<a href="/visit_shop.html" onclick="Utils.popup({ url : this.href }); return false;">Заглянуть в магазин</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var table = new Element('table'); | |
var tbody = new Element('tbody').inject(table) | |
var tr = new Element('tr').inject(tbody); | |
new Element('td').set('text', 'some').inject(tr) | |
table.inject(document.body) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
checkbox.addEvent('change', function() { | |
alert('I have succeeded?'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
checkbox.addEvent('click', function() { | |
alert('I have succeeded!'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ChainExample = new Class({ | |
Implements : Chain | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Добавляем события к кнопкам. Нажатие кнопки приведет | |
* к закрытию всех панелей до того, как будет показана | |
* панель, соответствующая нажатой кнопке. | |
*/ | |
var ChainExample = new Class({ | |
Implements : Chain, | |
// Определяем ID кнопок и соответствующих им панелей. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VBoxManage setextradata kubuntu "VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/HostPort" 8888 | |
VBoxManage setextradata kubuntu "VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/GuestPort" 80 | |
VBoxManage setextradata kubuntu "VBoxInternal/Devices/pcnet/0/LUN#0/Config/apache/Protocol" TCP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VBoxManage setextradata kubuntu "VBoxInternal/Devices/pcnet/0/LUN#0/Config/mongrel/HostPort" 3000 | |
VBoxManage setextradata kubuntu "VBoxInternal/Devices/pcnet/0/LUN#0/Config/mongrel/GuestPort" 3000 | |
VBoxManage setextradata kubuntu "VBoxInternal/Devices/pcnet/0/LUN#0/Config/mongrel/Protocol" TCP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VBoxManage setextradata kubuntu "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/HostPort" 2222 | |
VBoxManage setextradata kubuntu "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort" 22 | |
VBoxManage setextradata kubuntu "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/Protocol" TCP |
OlderNewer