(id, config)
| 46 | |
| 47 | //初始化示例面板 |
| 48 | function createGalleryItem(id, config) { |
| 49 | if (!config) { |
| 50 | return; |
| 51 | } |
| 52 | if (window.isLocal && config.localIgnore) { |
| 53 | return; |
| 54 | } |
| 55 | var categoryLi = $("<li class='category' id='" + id + "'></li>"); |
| 56 | var title = utils.getLocalPairs(config, "name"); |
| 57 | if (title) { |
| 58 | createGalleryItemTitle(id, title).appendTo(categoryLi); |
| 59 | } |
| 60 | |
| 61 | if (config.content) { |
| 62 | createSubGalleryItem(config.content, id).appendTo(categoryLi); |
| 63 | } |
| 64 | return categoryLi; |
| 65 | } |
| 66 | |
| 67 | |
| 68 | function createSubGalleryItem(config, name) { |
no test coverage detected