namespace('kivi', function(k){
+ "use strict";
+
k.PartPicker = function($real, options) {
// short circuit in case someone double inits us
if ($real.data("part_picker"))
if (state == STATES.PICKED) {
annotate_state();
return true
- } else if (state == STATES.UNDEFINED && $dummy.val() == '')
+ } else if (state == STATES.UNDEFINED && $dummy.val() === '')
set_item({})
else {
last_unverified_dummy = $dummy.val();
function annotate_state () {
if (state == STATES.PICKED)
$dummy.removeClass(STATES.UNDEFINED).addClass(STATES.PICKED);
- else if (state == STATES.UNDEFINED && $dummy.val() == '')
+ else if (state == STATES.UNDEFINED && $dummy.val() === '')
$dummy.removeClass(STATES.UNDEFINED).addClass(STATES.PICKED);
else {
last_unverified_dummy = $dummy.val();
}, ajax_data(function(){ var val = $('#part_picker_filter').val(); return val === undefined ? '' : val })),
success: function(data){ $('#part_picker_result').html(data) }
});
- };
+ }
function result_timer (event) {
if (!$('no_paginate').prop('checked')) {
function close_popup() {
$('#part_selection').dialog('close');
- };
+ }
function handle_changed_text(callbacks) {
$.ajax({
annotate_state();
}
});
- };
+ }
$dummy.autocomplete({
source: function(req, rsp) {
$dummy.keydown(function(event){
if (event.which == KEY.ENTER || event.which == KEY.TAB) {
// if string is empty assume they want to delete
- if ($dummy.val() == '') {
+ if ($dummy.val() === '') {
set_item({});
return true;
} else if (state == STATES.PICKED) {