2013-04-08 12:37:12 +03:00
|
|
|
/**
|
2013-08-29 12:30:04 +03:00
|
|
|
* Админка
|
|
|
|
*
|
|
|
|
* @module ls/admin
|
|
|
|
*
|
|
|
|
* @license GNU General Public License, version 2
|
|
|
|
* @copyright 2013 OOO "ЛС-СОФТ" {@link http://livestreetcms.com}
|
|
|
|
* @author Denis Shakhov <denis.shakhov@gmail.com>
|
2013-04-08 12:37:12 +03:00
|
|
|
*/
|
2013-08-29 12:30:04 +03:00
|
|
|
|
|
|
|
var ls = ls || {};
|
2014-06-26 19:35:00 +03:00
|
|
|
ls.admin = ls.admin || {};
|
2013-08-29 12:30:04 +03:00
|
|
|
|
2014-06-26 19:35:00 +03:00
|
|
|
ls.admin.blogCategories = (function ($) {
|
|
|
|
this.showForm = function( url, form ) {
|
|
|
|
ls.ajax.submit( url, form, function( result ) {
|
2013-04-08 12:37:12 +03:00
|
|
|
if (result.bStateError) {
|
2014-06-26 19:35:00 +03:00
|
|
|
ls.msg.error(result.sMsgTitle, result.sMsg);
|
2013-04-08 12:37:12 +03:00
|
|
|
} else {
|
2014-06-26 19:35:00 +03:00
|
|
|
window.location.href = window.location.href;
|
2013-04-08 12:37:12 +03:00
|
|
|
}
|
2014-06-26 19:35:00 +03:00
|
|
|
});
|
2013-04-08 12:37:12 +03:00
|
|
|
};
|
|
|
|
|
2014-06-26 19:35:00 +03:00
|
|
|
this.showFormAdd = function( form ) {
|
|
|
|
this.showForm( aRouter.admin + 'blogcategory/add/', form );
|
|
|
|
};
|
2013-04-08 12:37:12 +03:00
|
|
|
|
2014-06-26 19:35:00 +03:00
|
|
|
this.showFormEdit = function( form ) {
|
|
|
|
this.showForm( aRouter.admin + 'blogcategory/edit/', form );
|
2013-04-08 12:37:12 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
return this;
|
2014-06-26 19:35:00 +03:00
|
|
|
}).call( ls.admin.blogCategories || {}, jQuery );
|