Skip to content

Commit

Permalink
Merge pull request #353 from /issues/335@v1
Browse files Browse the repository at this point in the history
Fix comments for bem-jsd
  • Loading branch information
veged committed Jan 23, 2014
2 parents 623d276 + fa1b9e5 commit e6371da
Show file tree
Hide file tree
Showing 17 changed files with 178 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ provide(inherit(Collection, null, /** @lends BEMDOMCollection */{
}
}));

});
});
35 changes: 21 additions & 14 deletions common.blocks/i-bem/__dom/_collection/i-bem__dom_collection_yes.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
/**
* Overrides BEM.DOM.findBlocks* methods
* that they return i-bem__collection_type_dom
* @module i-bem__dom
* @description Overrides BEM.DOM.findBlocks* methods that they return i-bem__collection_type_dom
*/

modules.define('i-bem__dom', ['i-bem__collection_type_dom'], function(provide, Collection, DOM) {
modules.define('i-bem__dom', ['i-bem__collection_type_dom'], function(provide, Collection, BEMDOM) {

provide(DOM.decl('i-bem__dom', (function() {
var decl = {},
wrapMethod = function() {
return Collection.create(this.__base.apply(this, arguments));
};
provide(
/**
* @class BEMDOM
* @augments BEMDOM
* @exports
*/
BEMDOM.decl('i-bem__dom', (function() {
var decl = {},
wrapMethod = function() {
return Collection.create(this.__base.apply(this, arguments));
};

['findBlocksInside', 'findBlocksOutside', 'findBlocksOn']
.forEach(function(method) {
decl[method] = wrapMethod;
});
['findBlocksInside', 'findBlocksOutside', 'findBlocksOn']
.forEach(function(method) {
decl[method] = wrapMethod;
});

return decl;
}())));
return decl;
}()))
);

});
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @module i-bem__dom_elem-instances_yes
* @module i-bem__dom
*/

modules.define(
Expand Down
3 changes: 1 addition & 2 deletions common.blocks/i-bem/__dom/_init/i-bem__dom_init_auto.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/**
* @module i-bem__dom
* @description Auto initialization on DOM ready
* Auto initialization on DOM ready
*/

modules.require(['i-bem__dom', 'jquery'], function(DOM, $) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @module i-bem_elem-instances_yes
* @module i-bem
*/

modules.define(
Expand Down
3 changes: 1 addition & 2 deletions common.blocks/idle/_start/idle_start_auto.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/**
* @module idle_start_auto
* @description Automatically starts idle module
* Automatically starts idle module
*/

modules.require(['idle'], function(idle) {
Expand Down
8 changes: 6 additions & 2 deletions common.blocks/jquery/__config/jquery__config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
/**
* @module jquery__config
* @description Configuration for jQuery
*/

modules.define('jquery__config', function(provide) {

provide({
provide(/** @exports */{
/**
* URL for loading jQuery if it does not exist
*/
url : '//yandex.st/jquery/2.0.3/jquery.min.js'
});

});
});
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
* @see http://www.benalman.com/news/2010/03/jquery-special-events/
* @see http://api.jquery.com/category/events/event-object/
*
* @modules pointerevents
*
* @author Kir Belevich <kir@soulshine.in>
* @copyright Kir Belevich 2013
* @license MIT
Expand Down Expand Up @@ -356,4 +354,4 @@ addSpecialEvent('release', function(specialEvent, pointerEventType) {

provide($);

});
});
19 changes: 15 additions & 4 deletions common.blocks/querystring/__uri/querystring__uri.vanilla.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* @module querystring__uri
* @description A set of helpers to work with URI
*/

modules.define('querystring__uri', function(provide) {
Expand All @@ -10,7 +11,7 @@ var map = { '%D0' : '%D0%A0', '%C0' : '%D0%90', '%C1' : '%D0%91', '%C2' : '%D0%9
function convert(str) {
// Symbol code in cp1251 (hex) : symbol code in utf8)
return str.replace(
/%.{2}/g,
/%.{2}/g,
function($0) {
return map[$0];
});
Expand All @@ -31,14 +32,24 @@ function decode(fn, str) {
return res;
}

provide({
provide(/** @exports */{
/**
* Decodes URI string
* @param {String} str
* @returns {String}
*/
decodeURI : function(str) {
return decode(decodeURI, str);
},
},

/**
* Decodes URI component string
* @param {String} str
* @returns {String}
*/
decodeURIComponent : function(str) {
return decode(decodeURIComponent, str);
}
});

});
});
3 changes: 1 addition & 2 deletions common.blocks/tick/_start/tick_start_auto.vanilla.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/**
* @module idle_start_auto
* @description Automatically starts tick module
* Automatically starts tick module
*/

modules.require(['tick'], function(tick) {
Expand Down
3 changes: 2 additions & 1 deletion desktop.blocks/jquery/__config/jquery__config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/**
* @module jquery__config
* @description Configuration for jQuery
*/

modules.define(
Expand All @@ -16,4 +17,4 @@ provide(
}) :
base);

});
});
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/**
* @modules jquery__event_type_pointerclick
* @version 1.0.2
* @author Filatov Dmitry <dfilatov@yandex-team.ru>
* @module jquery
*/

modules.define('jquery', function(provide, $) {
Expand All @@ -26,4 +24,4 @@ var event = $.event.special.pointerclick = {

provide($);

});
});
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @modules jquery__event_type_winresize
* @module jquery
*/

modules.define('jquery', ['ua'], function(provide, ua, $) {
Expand Down Expand Up @@ -27,4 +27,4 @@ if(ua.ie) { // TODO: investigate for which version of IE we need this workaround

provide($);

});
});
7 changes: 6 additions & 1 deletion desktop.blocks/ua/ua.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* @module ua
* @description inspired by http://code.jquery.com/jquery-migrate-1.1.1.js
* @description Detect some user agent features (works like jQuery.browser in jQuery 1.8)
* @see http://code.jquery.com/jquery-migrate-1.1.1.js
*/

modules.define('ua', function(provide) {
Expand Down Expand Up @@ -29,6 +30,10 @@ if(browser.chrome) {
browser.safari = true;
}

/**
* @exports
* @type Object
*/
provide(browser);

});
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
/**
* FastClick to jQuery module wrapper.
* @see https://github.com/ftlabs/fastclick
*
* @modules fastclick
*/
modules.define('jquery', function(provide, $) {

/**
* @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.
* FastClick: polyfill to remove click delays on browsers with touch UIs.
*
* @version 0.6.11
* @codingstandard ftlabs-jsv2
* @copyright The Financial Times Limited [All Rights Reserved]
* @license MIT License (see LICENSE.txt)
*/

/**
* @class FastClick
*/

/**
* Instantiate fast-clicking listeners on the specificed layer.
*
Expand Down
15 changes: 12 additions & 3 deletions touch.blocks/ua/__dom/ua__dom.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
modules.define('i-bem__dom', ['ua'], function(provide, ua, DOM) {
/**
* @module i-bem__dom
* @description Use ua module for provide user agent features by modifiers and update some on orient change
*/
modules.define('i-bem__dom', ['ua'], function(provide, ua, BEMDOM) {

DOM.decl('ua', {
/**
* @exports i-bem__dom:blocks.ua
* @class ua
* @bem
*/
BEMDOM.decl('ua', {
onSetMod : {
'js' : {
'inited' : function() {
Expand Down Expand Up @@ -36,6 +45,6 @@ DOM.decl('ua', {
},
ua);

provide(DOM);
provide(BEMDOM);

});
Loading

0 comments on commit e6371da

Please sign in to comment.