Sha256: b7176902651822f72653cf9a02f8d36e2290b5c23becd57d6abe335a3a912850
Contents?: true
Size: 1.09 KB
Versions: 62
Compression:
Stored size: 1.09 KB
Contents
/** * @namespace WORKAREA.optionButtons */ WORKAREA.registerModule('optionButtons', (function () { 'use strict'; var replaceProductDetails = function (event) { var $link = $(event.delegateTarget), newUrl = $link.attr('href'); event.preventDefault(); $.get(newUrl, function (html) { var $newDetails = $(html) .find('.product-details') .addBack('.product-details'); $link.closest('.product-details').replaceWith($newDetails); if (_.isEmpty($newDetails.closest('.ui-dialog'))) { window.history.replaceState(null, null, newUrl); } WORKAREA.initModules($newDetails); }); }, /** * @method * @name init * @memberof WORKAREA.optionButtons */ init = function ($scope) { $('[data-option-button]', $scope).on('click', replaceProductDetails); }; return { init: init }; }()));
Version data entries
62 entries across 62 versions & 1 rubygems