Skip to content

Commit 3e39ac3

Browse files
committed
update
1 parent 3d86bbc commit 3e39ac3

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

public/assets/backend/js/behaviour/general.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,28 @@ var App = function () {
174174
e.attr('pwdshow','1');
175175
}
176176

177+
function editableSortNumber(container,url){
178+
$(container).find('td.editable').each(function(){
179+
var inputType='number', pk=$(this).data('id');
180+
$(this).children('span').editable({
181+
url: BACKEND_URL+url,
182+
type: inputType,
183+
pk: pk, name: 'sort',
184+
title: App.t('修改排序'),
185+
ajaxOptions:{
186+
dataType: 'json',
187+
success: function(r){
188+
if(r.Code!=1) return App.message({text:r.Info,class_name:'danger'});
189+
return App.message({text:r.Info,class_name:'success'});
190+
},
191+
error: function(xhr){
192+
return App.message({text:xhr.responseText,class_name:'danger'});
193+
}
194+
}
195+
});
196+
});
197+
}
198+
177199
var cachedLang = null, previousPlotPoint = null;
178200
return {
179201
clientID: {},
@@ -2221,6 +2243,7 @@ var App = function () {
22212243
if(condition) return $(elem).show();
22222244
return $(elem).hide();
22232245
},
2246+
editableSortNumber: editableSortNumber,
22242247
showUpgradeInfo: function(version){
22252248
var upgradeModal=$('#self-upgrade-modal');
22262249
if(upgradeModal.length<1)return;

0 commit comments

Comments
 (0)