This file contains hidden or 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
| $("#price-selector").html(labels); // Замещаем статичное содержимое блока | |
| $('#price-value').html(': любая'); // Подставляем цену в поле, так как по умолчанию выбираем максимальное значение ползунка | |
| // Слайдер сделан на основе стандартного компонента jQueriUI | |
| $(function() { | |
| $("#price-selector").slider({ | |
| range: "min", | |
| value: 100, | |
| min: 0, | |
| max: 100, | |
| slide: function(event, ui) { |
This file contains hidden or 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
| # Получение коментов от фейсбука происходит через FQL, табличка comments_info | |
| # Нужен гем facebooker, у меня для третьих рельсов: | |
| gem 'facebooker', :git => "git://github.com/joren/facebooker.git", :branch => "rails3" | |
| # Делаете модуль, в котором хранятся все настройки: | |
| module Facebook | |
| CONFIG = { | |
| :app_id => "123123", | |
| :api_key => "123123", | |
| :app_secret => "123123" |
This file contains hidden or 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
| Event.observe(document, 'dom:loaded', function() { | |
| new AdminPane(); | |
| }); | |
| var AdminPane = Class.create({ | |
| initialize: function(){ | |
| if ($$('.admin-pane-wrap')[0]){ | |
| this.adminPaneWrap = $$('.admin-pane-wrap')[0]; | |
| this.adminPaneSwitcher = $$('.admin-pane-switcher')[0]; | |
This file contains hidden or 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
| $('.hint').click(function(){ | |
| var pass = ""; | |
| for (var i = 0; i < 6; i++){ | |
| pass += parseInt(Math.random() * 16).toString(16); | |
| if ( i == 7 || i == 11 || i == 15 || i == 19 ) pass += "-"; | |
| } | |
| $('.registration-editorpassword input').val(pass); | |
| }) |
NewerOlder