I am working on laravel project with use of node.js in selectize.js.
Everything is running on Firefox Browser. but in chrome browser selectize functionality not work.
script.js
"undefined" != typeof e("#community_name").val() && "" != e("#community_name").val() && (e("#community_form").show(), e("#community_user_div").show(), e("#timezone-button").css("width", "388"), e.ajax({
url: baseUrl + "/communities/" + e("#community_name").val(),
type: "GET",
success: function(e) {
v(e)
}
})), e(document).on("change", "#community_name", function() {
var t = e(this).val();
return e("#select2-community_users-container").text("Select Community user"), "undefined" == typeof t || "" == t ? (e("#clear-form").click(), e("#community_form").hide(), e("#community_user_div").hide(), e("#community_user_form").hide(), !1) : (e("#community_id").val(t), e("#community_form").show(), e("#flash-message").hide(), e("#timezone-button").css("width", "388"), e("#community_user_div").show(), e("#community_user_form").hide(), void e.ajax({
url: baseUrl + "/communities/" + t,
type: "GET",
success: function(e) {
v(e),
window.location.reload(0),
emailSelectize('.director_email', t.community_form)
}
}))
}), e(document).on("click", "#community-update", function(t) {
t.preventDefault();
var a = e("#community_name").val();
if ("undefined" == typeof a || "" == a) return !1;
var n = e("#community").attr("action"),
i = e("#community").serialize(),
s = "";
e.ajax({
url: n,
type: "POST",
data: i,
success: function(e) {
"1" == e && alert("Community updated successfully"), window.location.reload(!0)
},
error: function(t) {
var a = e.parseJSON(t.responseText);
e.each(a, function(e, t) {
s += t + "<br/>"
}), e(".alert-message").html(s)
}
})
}),
function v(t) {
var a = t.community,
n = t.communityUsers;
e("#timezone").removeAttr("selected"), e("#community").attr("action", baseUrl + "/communities/" + a.id), e(".community-update").attr("id", "community-update"),e(".community_form").attr("id", "community_form"), e("#name").val(a.name), e("#address_line_1").val(a.address_line_1), e("#address_line_2").val(a.address_line_2), e("#city").val(a.city), e("#state").val(a.state), e("#zip").val(a.zip), e("#director_email").val(a.director_email), e("#phone").val(a.phone), e("#website").val(a.website);
if(parseInt(a.rcfe) == 0) {
e("#rcfe").val('');
} else {
e("#rcfe").val(a.rcfe);
}
var i = e("#timezone option[value =" + a.timezone + "]").text();
e("#timezone option[value =" + a.timezone + "]").attr("selected", "selected"), e(".no-left-padding .ui-selectmenu-text").text(i);
var s = '<select id="community_users" name="community_users" class="form-control">';
s += '<option value="0">Select Community user</option>', e.each(n, function(e, t) {
s += "<option value=" + t.id + ">" + t.first_name + " " + t.last_name + "</option>"
}), s += "</select>", e("#community_users").html(s)
}
I am working on laravel project with use of node.js in selectize.js.
Everything is running on Firefox Browser. but in chrome browser selectize functionality not work.
community.blade.php
<div class="form-group">
{!! Form::text('director_email',
null,
array(
'placeholder'=>'Director Email',
'id'=> 'director_email'))
!!}
</div>
I am working on laravel project with use of node.js in selectize.js. Everything is running on Firefox Browser. but in chrome browser selectize functionality not work.
I am working on laravel project with use of node.js in selectize.js. Everything is running on Firefox Browser. but in chrome browser selectize functionality not work.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire