(name, toolDefinition)
| 54 | */ |
| 55 | // name and toolDefinition to add into the tools available to be added on the toolbar |
| 56 | function registerTextAngularTool(name, toolDefinition){ |
| 57 | if(!name || name === '' || taTools.hasOwnProperty(name)) throw('textAngular Error: A unique name is required for a Tool Definition'); |
| 58 | if( |
| 59 | (toolDefinition.display && (toolDefinition.display === '' || !validElementString(toolDefinition.display))) || |
| 60 | (!toolDefinition.display && !toolDefinition.buttontext && !toolDefinition.iconclass) |
| 61 | ) |
| 62 | throw('textAngular Error: Tool Definition for "' + name + '" does not have a valid display/iconclass/buttontext value'); |
| 63 | taTools[name] = toolDefinition; |
| 64 | } |
| 65 | |
| 66 | angular.module('textAngularSetup', []) |
| 67 | .constant('taRegisterTool', registerTextAngularTool) |
nothing calls this directly
no test coverage detected
searching dependent graphs…