/* * Copyright (c) 2012-2014 Kaarle Ritvanen * See LICENSE file for license details */ define(["jquery", "jquery-bbq"], function($) { function href() { return $("").attr({href: "javascript:void(0);"}); } return { href: href, objectRef: function(value, el) { el = el || href(); if (value) { el.click(function() { $.bbq.pushState("#" + value); }).text("Show"); } return el; }, makeRow: function(el) { if (el.is("td")) return $("").html(el); return el; }, setStatus: function(el, status) { el.prop("class", status); } }; });