Sha256: 9b00729b9a6eba41581913f788469ac5c60fe14ebb1ba9443f3495b12e59ff61
Contents?: true
Size: 1.09 KB
Versions: 62
Compression:
Stored size: 1.09 KB
Contents
/** * @namespace WORKAREA.bookmarks */ WORKAREA.registerModule('bookmarks', (function () { 'use strict'; var findBookmarkName = function () { return $('head title').text(); }, findBookmarkPath = function () { return window.location.pathname + window.location.search; }, createBookmark = function (event) { var form = JST['workarea/admin/templates/bookmark_form']({ url: WORKAREA.routes.admin.bookmarksPath(), csrfParam: $('meta[name=csrf-param]').attr('content'), csrfToken: $('meta[name=csrf-token]').attr('content'), name: findBookmarkName(), path: findBookmarkPath() }); event.preventDefault(); $(form).hide().appendTo('body').submit(); }, /** * @method * @name init * @memberof WORKAREA.bookmarks */ init = function ($scope) { $('[data-bookmark]', $scope).on('click', createBookmark); }; return { init: init }; }()));
Version data entries
62 entries across 62 versions & 1 rubygems