Skip to content
Snippets Groups Projects
Commit 555d20af authored by xamgore's avatar xamgore
Browse files

FIX: cross sign disappears after switching a faculty

The cross sign and an ability to drop the selected item are restored.

Improves usability.
parent f8ae0a97
Branches
Tags
No related merge requests found
......@@ -30,6 +30,7 @@ $(function() {
var jProto = $($.parseHTML("<option></option>"));
selectSubject.html("");
selectSubject.append($.parseHTML("<option></option>"));
$.each(data, function (key, cur) {
jProto.html(cur.Title).val(cur.ID);
selectSubject.append(jProto.clone());
......@@ -38,6 +39,8 @@ $(function() {
).always(
function(success)
{
if (selectSubject.children().first().is(":selected"))
selectSubject.select2({placeholder: "Выберите предмет", allowClear: true});
selectSubject.removeAttr("disabled");
}
);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment