全面调整JS文件结构,为模块化前端做准备

This commit is contained in:
yubaolee
2016-04-11 23:46:33 +08:00
parent 4ced496da9
commit d54062bc0b
9 changed files with 456 additions and 77 deletions

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Security;
using Infrastructure.Helper;
using OpenAuth.App;
using OpenAuth.Mvc.Models;

View File

@@ -35,10 +35,15 @@ namespace OpenAuth.Mvc.Controllers
_app = AutofacExt.GetFromFac<ModuleElementManagerApp>();
}
public ActionResult Index(int id = 0)
public ActionResult Index(int id)
{
ViewBag.ModuleId = id;
return View(_app.LoadByModuleId(id));
return View();
}
public ActionResult Get(int moduleId = 0)
{
return Json(_app.LoadByModuleId(moduleId));
}
[HttpPost]
@@ -56,11 +61,12 @@ namespace OpenAuth.Mvc.Controllers
return JsonHelper.Instance.Serialize(_bjuiResponse);
}
public string DelButton(int id)
public string Del(string moduleElements)
{
try
{
_app.Delete(id);
var delObjs = JsonHelper.Instance.Deserialize<ModuleElement[]>(moduleElements);
_app.Delete(delObjs);
}
catch (Exception e)
{