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
| define('requirejs-sandbox', [ | |
| 'requirejs-sandbox/logger', | |
| 'requirejs-sandbox/utils', | |
| 'requirejs-sandbox/plugins/css', | |
| 'requirejs-sandbox/plugins/transit' | |
| ], function(console, utils, cssPlugin, transitPlugin) { |
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
| $scope.highlightSearchResult = (-> | |
| highlightSearchResultIndex = 0 | |
| (entity) -> | |
| $('.is-selected').removeClass 'is-selected' | |
| entity | |
| .find('.g-highlight') | |
| .addClass('is-selected') | |
| )() |
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
| function load(url, sectionHeaders, data) { | |
| require(["events"], function(events) { | |
| events.trigger("pageTransition:init", [url, sectionHeaders, "POST", data]); | |
| }); | |
| } | |
| load(url, 'pageView: #GlobalContent', { | |
| serviceLogin: jData.login, | |
| servicePassword: jData.password | |
| }); |
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
| .container { | |
| top: -5000px; | |
| width: 135px; | |
| -webkit-transition: top 0ms ease-in-out 600ms, opacity 400ms ease-in-out 200ms; | |
| -moz-transition: top 0ms ease-in-out 600ms, opacity 400ms ease-in-out 200ms; | |
| -o-transition: top 0ms ease-in-out 600ms, opacity 400ms ease-in-out 200ms; | |
| transition: top 0ms ease-in-out 600ms, opacity 400ms ease-in-out 200ms; | |
| margin: 0 0 0 -68px; | |
| position: absolute; | |
| opacity: 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
| initialize: function() { | |
| _.bindAll(this, 'subscribe', 'onAuth'); // Не правильно! | |
| this.on('change:messenger', this.subscribe); | |
| }, | |
| initialize: function() { | |
| this.on('change:messenger', this.subscribe, this); // Правильно | |
| }, |
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
| // Original code | |
| $('.__select-email .textfield') | |
| .removeClass('__required __invalid') | |
| .addClass('__' + error.type) | |
| .find('input[name="email"]') | |
| .after('<label class="error">' + error.text + '</label>'); | |
| // Short method | |
| var input = $('.__select-email .textfield') |
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
| function Test(adapter, handlersCount, contextCount, eventNamesCount) { | |
| var handlers = [], | |
| contexts = [], | |
| events = [], | |
| i; | |
| function generateNum(range) { | |
| return Math.floor(Math.random() * (range || 1000)); | |
| } |
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
| $.extend(typeahead, { | |
| show: function() { | |
| var targetOffset = this.$element.offset(), | |
| targetHeight = this.$element.outerHeight(), | |
| containerOffset = container.offset(); | |
| // Корректируем позиционирование | |
| targetOffset.top -= containerOffset.top; | |
| targetOffset.top += targetHeight; | |
| targetOffset.left -= containerOffset.left; |
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
| events: { | |
| 'blur input[placeholder], textarea[placeholder]': 'processPlaceholder', | |
| 'focus input[placeholder], textarea[placeholder]': 'processPlaceholder', | |
| 'change input[placeholder], textarea[placeholder]': 'processPlaceholder' | |
| }, | |
| // Метод реализиующий правильное функционирование кастомного плейсхолдера в браузерах которые их | |
| // не поддерживают | |
| processPlaceholder: function(event) { | |
| var alowedEvents = { |
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
| ul { | |
| position: relative; | |
| width: 230px; | |
| height: 480px; | |
| margin: 0; | |
| padding: 0; | |
| overflow-x: hidden; | |
| overflow-y: scroll; | |
| list-style: none; |