You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by tv...@apache.org on 2013/03/22 23:54:41 UTC
[14/21] git commit: [#4299] ticket:281 Show notification when invalid
option is chosen
[#4299] ticket:281 Show notification when invalid option is chosen
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/3c5a73bb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/3c5a73bb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/3c5a73bb
Branch: refs/heads/master
Commit: 3c5a73bb9c98ad8816d2422cb667b44db37e42d9
Parents: a41db53
Author: Igor Bondarenko <je...@gmail.com>
Authored: Tue Mar 5 10:24:44 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Fri Mar 22 21:55:16 2013 +0000
----------------------------------------------------------------------
Allura/allura/lib/widgets/resources/js/combobox.js | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3c5a73bb/Allura/allura/lib/widgets/resources/js/combobox.js
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/resources/js/combobox.js b/Allura/allura/lib/widgets/resources/js/combobox.js
index 557a14e..c1e6ee0 100644
--- a/Allura/allura/lib/widgets/resources/js/combobox.js
+++ b/Allura/allura/lib/widgets/resources/js/combobox.js
@@ -54,6 +54,10 @@
$(element).val('');
select.val('');
input.data('autocomplete').term = '';
+ wrapper.children('.error').fadeIn('fast');
+ setTimeout(function() {
+ wrapper.children('.error').fadeOut('fast');
+ }, 2500);
}
}
@@ -126,6 +130,12 @@
.appendTo(wrapper)
.addClass('ui-combobox-toggle')
.click(openDropdown);
+
+ $('<div>')
+ .hide()
+ .addClass('error')
+ .text('Choose a valid option')
+ .appendTo(wrapper);
},
_destroy: function() {