(editor, menu, opt)
| 1448 | |
| 1449 | // 定义构造函数 |
| 1450 | var DropList = function (editor, menu, opt) { |
| 1451 | this.editor = editor; |
| 1452 | this.menu = menu; |
| 1453 | |
| 1454 | // list 的数据源,格式 {'commandValue': 'title', ...} |
| 1455 | this.data = opt.data; |
| 1456 | // 要为每个item自定义的模板 |
| 1457 | this.tpl = opt.tpl; |
| 1458 | // 为了执行 editor.commandForElem 而传入的elem查询方式 |
| 1459 | this.selectorForELemCommand = opt.selectorForELemCommand; |
| 1460 | |
| 1461 | // 执行事件前后的钩子 |
| 1462 | this.beforeEvent = opt.beforeEvent; |
| 1463 | this.afterEvent = opt.afterEvent; |
| 1464 | |
| 1465 | // 初始化 |
| 1466 | this.init(); |
| 1467 | }; |
| 1468 | |
| 1469 | DropList.fn = DropList.prototype; |
| 1470 |
nothing calls this directly
no outgoing calls
no test coverage detected