namespace('kivi', function(k){
+ "use strict";
+
k.ProjectPicker = function($real, options) {
// short circuit in case someone double inits us
if ($real.data("project_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 = $('#project_picker_filter').val(); return val === undefined ? '' : val })),
success: function(data){ $('#project_picker_result').html(data) }
});
- };
+ }
function result_timer (event) {
if (!$('no_paginate').prop('checked')) {
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) {