mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 00:45:47 +01:00
closes #3634
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
/*global define, app, socket, ajaxify, RELATIVE_PATH, bootbox */
|
/*global define, app, socket, ajaxify, RELATIVE_PATH, bootbox, templates */
|
||||||
|
|
||||||
define('admin/manage/category', [
|
define('admin/manage/category', [
|
||||||
'uploader',
|
'uploader',
|
||||||
@@ -139,6 +139,7 @@ define('admin/manage/category', [
|
|||||||
return app.alertError(err.message);
|
return app.alertError(err.message);
|
||||||
}
|
}
|
||||||
$('button[data-action="removeParent"]').parent().addClass('hide');
|
$('button[data-action="removeParent"]').parent().addClass('hide');
|
||||||
|
$('button[data-action="changeParent"]').parent().addClass('hide');
|
||||||
$('button[data-action="setParent"]').removeClass('hide');
|
$('button[data-action="setParent"]').removeClass('hide');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -262,10 +263,16 @@ define('admin/manage/category', [
|
|||||||
if (err) {
|
if (err) {
|
||||||
return app.alertError(err.message);
|
return app.alertError(err.message);
|
||||||
}
|
}
|
||||||
|
var parent = categories.filter(function(category) {
|
||||||
|
return category && parseInt(category.cid, 10) === parseInt(parentCid, 10);
|
||||||
|
});
|
||||||
|
parent = parent[0];
|
||||||
|
|
||||||
modal.modal('hide');
|
modal.modal('hide');
|
||||||
$('button[data-action="removeParent"]').parent().removeClass('hide');
|
$('button[data-action="removeParent"]').parent().removeClass('hide');
|
||||||
$('button[data-action="setParent"]').addClass('hide');
|
$('button[data-action="setParent"]').addClass('hide');
|
||||||
|
var buttonHtml = '<i class="fa ' + parent.icon + '"></i> ' + parent.name;
|
||||||
|
$('button[data-action="changeParent"]').html(buttonHtml).parent().removeClass('hide');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user