|
|
|
@ -112,7 +112,6 @@ $(function() {
@@ -112,7 +112,6 @@ $(function() {
|
|
|
|
|
$temp.val($(target).html()).select(); |
|
|
|
|
document.execCommand("copy"); |
|
|
|
|
$temp.remove(); |
|
|
|
|
//$(target).fadeOut( 100 ).delay( 100 ).fadeIn( 100 );
|
|
|
|
|
$(target).fadeTo(100, 0).delay(100).fadeTo(100, 1); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
@ -136,7 +135,6 @@ $(function() {
@@ -136,7 +135,6 @@ $(function() {
|
|
|
|
|
// set status to multiple items
|
|
|
|
|
var target = $(event.delegateTarget); |
|
|
|
|
var selects = $(".o3-data-edit-multiple select"); |
|
|
|
|
console.log(target.attr("data-multi-value")) |
|
|
|
|
selects.val(target.attr("data-multi-value")) |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
@ -178,7 +176,40 @@ $(function() {
@@ -178,7 +176,40 @@ $(function() {
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
$('label.o3-form-copy').attr('title', 'copy to clipboard'); |
|
|
|
|
$("label.o3-form-copy").attr("title", "copy to clipboard"); |
|
|
|
|
|
|
|
|
|
$(".o3-vendor").on("blur", function(event) { |
|
|
|
|
// autocorrect vendor
|
|
|
|
|
var target = $(event.delegateTarget); |
|
|
|
|
var input_value = target.val() |
|
|
|
|
var url = target.attr("data-url") |
|
|
|
|
$.post( url, { vendor: input_value }, function( data ) { |
|
|
|
|
var corrected_name = data["name"]; |
|
|
|
|
if (data["found"] && (corrected_name != input_value)) { |
|
|
|
|
info = $('.o3-vendor-cancel') |
|
|
|
|
if( info.length) { |
|
|
|
|
info.find("a").text('"' + input_value + '"') |
|
|
|
|
} else { |
|
|
|
|
info = $('<span>'); |
|
|
|
|
info.addClass("o3-vendor-cancel col-sm-9 offset-sm-3 small text-secondary"); |
|
|
|
|
info.html('Use <a href="#">"' + input_value + '"</a> instead.'); |
|
|
|
|
target.parent().append(info); |
|
|
|
|
link = info.find("a"); |
|
|
|
|
link.on("click", function() { |
|
|
|
|
var link_text = link.text(); |
|
|
|
|
var vendor = link_text.substring(1, link_text.length-1); |
|
|
|
|
target.val(vendor) |
|
|
|
|
info.remove() |
|
|
|
|
return false; |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
target.val(corrected_name); |
|
|
|
|
} else { |
|
|
|
|
var info = $('.o3-vendor-cancel'); |
|
|
|
|
info.remove(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
var infinite = new Waypoint.Infinite({ |
|
|
|
|
element: $('.infinite-container')[0] |
|
|
|
|