Sha256: 64e8cc2d6656c286b04b81bccc968befe353cafccf92e97e9098caae6c80f4fd
Contents?: true
Size: 819 Bytes
Versions: 5
Compression:
Stored size: 819 Bytes
Contents
"use strict"; var ButtonAddToCart = function(selector) { var _$btn; var _item_id; var _onClickBtn = function(e) { // console.log('<_onClickBtn>'); e.preventDefault(); var c = new AddRowToCart(_item_id).call(); if (c.result) { // com.showDouble(c.message); ButtonGotoCart.refresh_count(); com.showDouble('Продолжить покупки?'); } }; var _fInitBehaviour = function (){ if (_$btn.length <= 0) return; _$btn.on('click', _onClickBtn); }; /** * selector = "add_to_bucket_#{item.id}" * @param selector */ var _fInit = function (selector){ _$btn = $(selector); _item_id = _$btn.data('id'); _fInitBehaviour(); }; _fInit(selector); };
Version data entries
5 entries across 5 versions & 1 rubygems