|
|
|
@ -38362,46 +38362,37 @@ $(document).on('turbolinks:load', function() {
|
|
|
|
|
;
|
|
|
|
|
$(document).on('turbolinks:load', function() {
|
|
|
|
|
if ($('body.admins-shixun-settings-index-page').length > 0) {
|
|
|
|
|
$(".shixun-settings-select").on("change", function () {
|
|
|
|
|
var s_value = $(this).val();
|
|
|
|
|
var s_name = $(this).attr("name");
|
|
|
|
|
var json = {};
|
|
|
|
|
json[s_name] = s_value;
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "/admins/shixun_settings",
|
|
|
|
|
type: "GET",
|
|
|
|
|
dataType:'script',
|
|
|
|
|
data: json
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$(".shixun-setting-form").on("change",function () {
|
|
|
|
|
var s_id = $(this).attr("data-id");
|
|
|
|
|
var s_value = $(this).val();
|
|
|
|
|
var s_name = $(this).attr("name");
|
|
|
|
|
var json = {};
|
|
|
|
|
var s_index = $(this).parent("td").siblings(".shixun-line-no").text();
|
|
|
|
|
json[s_name] = s_value;
|
|
|
|
|
json["page_no"] = s_index;
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "/admins/shixun_settings/" + s_id,
|
|
|
|
|
type: "PUT",
|
|
|
|
|
dataType:'script',
|
|
|
|
|
data: json
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function update_change(target) {
|
|
|
|
|
var s_id = $(target).attr("data-id");
|
|
|
|
|
var s_value = $(target).val();
|
|
|
|
|
var s_name = $(target).attr("name");
|
|
|
|
|
var json = {};
|
|
|
|
|
var s_index = $(target).parent("td").siblings(".shixun-line-no").text();
|
|
|
|
|
json[s_name] = s_value;
|
|
|
|
|
json["page_no"] = s_index;
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "/admins/shixun_settings/" + s_id,
|
|
|
|
|
type: "PUT",
|
|
|
|
|
dataType:'script',
|
|
|
|
|
data: json,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function select_change(target) {
|
|
|
|
|
var s_value = $(target).val();
|
|
|
|
|
var s_name = $(target).attr("name");
|
|
|
|
|
var json = {};
|
|
|
|
|
json[s_name] = s_value;
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "/admins/shixun_settings/",
|
|
|
|
|
type: "GET",
|
|
|
|
|
dataType:'script',
|
|
|
|
|
data: json,
|
|
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
;
|
|
|
|
|
$(document).on('turbolinks:load', function() {
|
|
|
|
|
$('select#tag-choosed').select2({
|
|
|
|
|
placeholder: "请选择分类",
|