avatar.set_up_file_input returns object now

The set_up_file_input() function now returns an object to the user
with a clear field.  This object will grow soon.

(imported from commit 7b3761eafddb392bd2c84a1685aa8d1811028a0f)
This commit is contained in:
Steve Howell
2013-07-31 11:07:34 -04:00
parent 784cab9df2
commit d505d494c8
2 changed files with 6 additions and 2 deletions

View File

@@ -105,7 +105,11 @@ exports.set_up_file_input = function (
e.preventDefault();
});
return clear;
return {
// Call back to clear() in situations like adding bots, when
// we want to use the same widget over and over again.
clear: clear
};
};
return exports;

View File

@@ -44,7 +44,7 @@ $(function () {
"Please only use characters that are valid in an email address");
var clear_bot_avatar_file_input = avatar.set_up_avatar_logic_for_creating_bots();
var clear_bot_avatar_file_input = avatar.set_up_avatar_logic_for_creating_bots().clear;
$('#create_bot_form').validate({
errorClass: 'text-error',