mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-04 12:17:42 +02:00
Menu Plugin: general js refactoring
This commit is contained in:
23
plugins/box/menu/js/menu.js
Normal file
23
plugins/box/menu/js/menu.js
Normal file
@@ -0,0 +1,23 @@
|
||||
if (typeof $.monstra == 'undefined') $.monstra = {};
|
||||
|
||||
$.monstra.menu = {
|
||||
|
||||
init: function() { },
|
||||
|
||||
selectPage: function (slug, title) {
|
||||
$('input[name=menu_item_link]').val(slug);
|
||||
$('input[name=menu_item_name]').val(title);
|
||||
$('#selectPageModal').modal('hide');
|
||||
},
|
||||
|
||||
selectCategory: function (name) {
|
||||
$('input[name=menu_item_category]').val(name);
|
||||
$('#selectCategoryModal').modal('hide');
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
$.monstra.menu.init();
|
||||
});
|
Reference in New Issue
Block a user