use of cn.cerc.summer.android.core.MainTitleMenu in project summer-android by cn-cerc.
the class RefreshMenu method execute.
@Override
public String execute(Context context, JSONObject request) throws Exception {
if (!request.has("scriptTag")) {
return "没有指定的标记参数";
}
if (!request.has("scriptFunction")) {
return "没有指定要回调的函数";
}
if (request.has("title")) {
String title = request.optString("title");
String scriptFunction = request.optString("scriptFunction");
String scriptTag = request.optString("scriptTag");
FrmMain.getInstance().mRightMenu.add(new MainTitleMenu(title, false, scriptFunction, 1, scriptTag));
FrmMain.getInstance().mRightMenuTemp.add(new MainTitleMenu(title, false, scriptFunction, 1, scriptTag));
} else {
return "没有菜单更新";
}
return "";
}
use of cn.cerc.summer.android.core.MainTitleMenu in project summer-android by cn-cerc.
the class FrmMain method clearData.
/**
* 页面发生改变时清空js上层数据
*/
public void clearData() {
list = new ArrayList<MainTitleMenu>();
for (int i = 0; i < allTitleList.get(classWebView).size(); i++) {
if (2 == allTitleList.get(classWebView).get(i).getLayerSign()) {
list.add(allTitleList.get(classWebView).get(i));
}
}
allTitleList.get(classWebView).remove(list);
for (int d = 0; d < mTitleMenu.size(); d++) {
if (2 == mTitleMenu.get(d).getLayerSign()) {
list.add(mTitleMenu.get(d));
}
}
mTitleMenu.removeAll(list);
list.clear();
for (int i = 0; i < mRightMenu.size(); i++) {
if (2 == mRightMenu.get(i).getLayerSign()) {
list.add(mRightMenu.get(i));
}
}
mRightMenu.removeAll(list);
list.clear();
initTitlePopWindow();
initPopWindow();
}
use of cn.cerc.summer.android.core.MainTitleMenu in project summer-android by cn-cerc.
the class FrmMain method CatalogWebView.
/**
* 获得右侧上级菜单
*
* @param title
* @param newUrl
*/
public void CatalogWebView(String title, String newUrl) {
mRightMenu.add(new MainTitleMenu(title, false, newUrl, 2, ""));
initPopWindow();
}
use of cn.cerc.summer.android.core.MainTitleMenu in project summer-android by cn-cerc.
the class FrmMain method CatalogTitleWebView.
/**
* 获得标题上层级菜单
*
* @param title
* @param newUrl
*/
public void CatalogTitleWebView(String title, String newUrl) {
mTitleMenu.add(new MainTitleMenu(title, false, newUrl, 2, classWebView));
initTitlePopWindow();
}
Aggregations