Virtonomica: выделить все позиции товара в снабжении

Добавляет чекбокс "выделить все" для каждого товара в снабжении

目前為 2016-04-21 提交的版本,檢視 最新版本

// ==UserScript==
// @name           Virtonomica: выделить все позиции товара в снабжении
// @version        1.0
// @include        http://*virtonomic*.*/*/main/unit/view/*/supply
// @description    Добавляет чекбокс "выделить все" для каждого товара в снабжении
// @author         cobra3125
// @namespace      virtonomica
// ==/UserScript==

var run = function() {

	var win = (typeof(unsafeWindow) != 'undefined' ? unsafeWindow : top.window);
	$ = win.$;
	
	var box = $('<input type="checkbox">').click(function(){
		var row = $(this).closest('tr');
		var next = row.next();
		while (next.length > 0 && !next.hasClass('p_title')) {
			$('> td:nth-child(1) > input[type="checkbox"]', next).click();
			next = next.next();
		}
	});
	$('a:has(img[src="/img/storageClear.gif")').before(box);
}

if(window.top == window) {
    var script = document.createElement("script");
    script.textContent = '(' + run.toString() + ')();';
    document.documentElement.appendChild(script);
}

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址