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
| <input type="checkbox" class="js-filter_control js-filter_control-name_test" name="test" /> |
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
| asyncTest('Context works normaly between to instances of one class', 1, function() { | |
| var observatory = new window.WebApp.Observatory(), | |
| TestClass = function() { | |
| var count = this.count, | |
| cid; | |
| this.cid = cid = 'c' + count; | |
| this.constructor.prototype.count++ | |
| this.init = function() { |
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
| asyncTest('bind two events with name "test.a1" and "test.a2" then unbind "test" trigger "test"', 1, function() { | |
| var observatory = new window.WebApp.Observatory(); | |
| observatory.on('test', function() { | |
| equal(this.a, 1, 'context is ok'); | |
| }, { | |
| a: 1 | |
| }); | |
| start(); |
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
| var $item = $(item), | |
| tip = $item.data('popover').tip(); | |
| if ($.contains(event.currentTarget.body, tip[0]) && !$.contains(tip[0], event.target)) { | |
| $item.popover('hide'); | |
| } |
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
| maskedElement.inputmask({ | |
| autoUnmask: NO, | |
| mask: '' + mask, | |
| clearIncomplete: YES, | |
| placeholder: placeholder, | |
| clearMaskOnLostFocus: NO | |
| }); |
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
| handlebars: { | |
| compile: { | |
| options: { | |
| node: true, | |
| wrapped: true, | |
| namespace: 'App.Templates', | |
| processName: function(pathname) { | |
| var filename = pathname | |
| .split('/') | |
| .pop() |
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
| this.core | |
| .unload() | |
| .renderStream(['Header', 'PageControls', 'Panel', { | |
| name: 'Filter', | |
| params: { | |
| buttons: [{ | |
| Style: 'grey', | |
| Position: 'full', | |
| Action: 'create_template', | |
| Text: 'Создать шаблон' |
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
| #!/bin/sh | |
| echo "\nStarting Grunt tests" | |
| # Lint catalog js files with grunt.js | |
| grunt catalog | |
| RETVAL=$? | |
| [ $RETVAL -eq 0 ] && echo Success | |
| [ $RETVAL -ne 0 ] && echo Failure |
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
| // Инициализируем попапы для всех элементов что попадают под селектор и получаем конструктор | |
| // поповера | |
| var popoverConstructor = $(selector).popover({ | |
| html: true, | |
| container: '.b-container', | |
| template: 'some template...', | |
| content: function() { | |
| // Обрабатываем контент и возвращаем | |
| return content; | |
| }, |
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 transition(env, step, callback) { | |
| if (typeof(callback) !== 'function') { | |
| callback = function() {}; | |
| } | |
| // Effect | |
| switch (env.params.effect){ | |
| // No effect | |
| case "no": |