Gets the modal content loading in the rte on editor load all in async, fixes an issue with valtogglemsg when used in a modal to ensure we unsubscribe from the events when the modal element is destroyed.

This commit is contained in:
Shannon
2013-09-25 14:29:59 +10:00
parent 6c9fe2ebd0
commit 06400f8db5
7 changed files with 82 additions and 46 deletions

View File

@@ -14,12 +14,11 @@ describe('macro service tests', function () {
var result = macroService.parseMacroSyntax("<?UMBRACO_MACRO macroAlias='Map' test1=\"asdf\" test2='hello' />");
expect(result).not.toBeNull();
expect(result.alias).toBe("Map");
expect(result.params.length).toBe(2);
expect(result.params[0].alias).toBe("test1");
expect(result.params[0].value).toBe("asdf");
expect(result.params[1].alias).toBe("test2");
expect(result.params[1].value).toBe("hello");
expect(result.macroAlias).toBe("Map");
expect(result.marcoParamsDictionary.test1).not.toBeUndefined();
expect(result.marcoParamsDictionary.test1).toBe("asdf");
expect(result.marcoParamsDictionary.test2).not.toBeUndefined();
expect(result.marcoParamsDictionary.test2).toBe("hello");
});
@@ -29,12 +28,11 @@ describe('macro service tests', function () {
var result = macroService.parseMacroSyntax("<?UMBRACO_MACRO macroAlias='Map' test1=\"asdf\" test2='hello' ><img src='blah.jpg'/></?UMBRACO_MACRO>");
expect(result).not.toBeNull();
expect(result.alias).toBe("Map");
expect(result.params.length).toBe(2);
expect(result.params[0].alias).toBe("test1");
expect(result.params[0].value).toBe("asdf");
expect(result.params[1].alias).toBe("test2");
expect(result.params[1].value).toBe("hello");
expect(result.macroAlias).toBe("Map");
expect(result.marcoParamsDictionary.test1).not.toBeUndefined();
expect(result.marcoParamsDictionary.test1).toBe("asdf");
expect(result.marcoParamsDictionary.test2).not.toBeUndefined();
expect(result.marcoParamsDictionary.test2).toBe("hello");
});