Example #1
0
func CustomSetting(context *GoInk.Context) {
	keys := context.Strings("key")
	values := context.Strings("value")
	for i, k := range keys {
		if len(k) < 1 {
			continue
		}
		model.SetSetting("c_"+k, values[i])
	}
	model.SyncSettings()
	Json(context, true).End()
	context.Do("setting_saved")
	return
}
Example #2
0
func NavigatorSetting(context *GoInk.Context) {
	order := context.Strings("order")
	text := context.Strings("text")
	title := context.Strings("title")
	link := context.Strings("link")
	model.SetNavigators(order, text, title, link)
	Json(context, true).End()
	context.Do("setting_saved")
	return
}