| Name | Size | Mode | Actions |
|---|---|---|---|
| filemanager/ | - | 0755 | rm |
| image/ | - | 0755 | rm |
| link/ | - | 0755 | rm |
| media/ | - | 0755 | rm |
| autolink.js | 3625 | 0644 | editdlrm |
| autosave.js | 2410 | 0644 | editdlrm |
| charmap.js | 1704 | 0644 | editdlrm |
| fullpage.js | 4589 | 0644 | editdlrm |
| image.js | 14403 | 0644 | editdlrm |
| importcss.js | 9392 | 0644 | editdlrm |
| jquery_initialization.js | 794 | 0644 | editdlrm |
| jquery_plugin.js | 2468 | 0644 | editdlrm |
| legacyoutput.js | 2593 | 0644 | editdlrm |
| link.js | 4206 | 0644 | editdlrm |
| lists.js | 51763 | 0644 | editdlrm |
| media.js | 7136 | 0644 | editdlrm |
| noneditable.js | 1369 | 0644 | editdlrm |
| paste.js | 111338 | 0644 | editdlrm |
| paste_images.js | 4899 | 0644 | editdlrm |
| paste_smart.js | 3351 | 0644 | editdlrm |
| searchreplace.js | 4148 | 0644 | editdlrm |
| spellchecker.js | 2700 | 0644 | editdlrm |
| table.js | 51834 | 0644 | editdlrm |
| textpattern.js | 2659 | 0644 | editdlrm |
| wordcount.js | 1878 | 0644 | editdlrm |
/home/aqcert/public_html/admin/tinymce/tests/plugins/link.js (4206B)
( |
]+>)<\/p>$/, '');
}
function fillAndSubmitWindowForm(data) {
var win = Utils.getFrontmostWindow();
win.fromJSON(data);
win.find('form')[0].submit();
win.close();
}
test('Default link dialog on empty editor', function() {
editor.setContent('');
editor.execCommand('mceLink', true);
deepEqual(Utils.getFrontmostWindow().toJSON(), {
"href": "",
"target": "",
"text": "",
"title": ""
});
fillAndSubmitWindowForm({
"href": "href",
"target": "_blank",
"text": "text",
"title": "title"
});
equal(
cleanHtml(editor.getContent()),
'
abc
'); Utils.setSelection('p', 1, 'p', 2); editor.execCommand('mceLink', true); deepEqual(Utils.getFrontmostWindow().toJSON(), { "href": "", "target": "", "text": "b", "title": "" }); fillAndSubmitWindowForm({ "href": "href", "target": "_blank", "title": "title" }); equal( cleanHtml(editor.getContent()), 'abc
' ); }); test('Default link dialog on non pure text selection', function() { editor.setContent('a
bc
'); Utils.setSelection('p:nth-child(1)', 0, 'p:nth-child(2)', 2); editor.execCommand('mceLink', true); deepEqual(Utils.getFrontmostWindow().toJSON(), { "href": "", "target": "", "title": "" }); fillAndSubmitWindowForm({ "href": "href", "target": "_blank", "title": "title" }); equal( cleanHtml(editor.getContent()), '' + '' ); }); test('All lists link dialog on empty editor', function() { editor.settings.link_list = [ {title: 'link1', value: 'link1'}, {title: 'link2', value: 'link2'} ]; editor.settings.link_class_list = [ {title: 'class1', value: 'class1'}, {title: 'class2', value: 'class2'} ]; editor.settings.target_list = [ {title: 'target1', value: 'target1'}, {title: 'target2', value: 'target2'} ]; editor.settings.rel_list = [ {title: 'rel1', value: 'rel1'}, {title: 'rel2', value: 'rel2'} ]; editor.setContent(''); editor.execCommand('mceLink', true); deepEqual(Utils.getFrontmostWindow().toJSON(), { "class": "class1", "href": "", "rel": "rel1", "target": "target1", "text": "", "title": "" }); fillAndSubmitWindowForm({ "href": "href", "text": "text", "title": "title" }); equal( cleanHtml(editor.getContent()), '' ); }); //Since there's no capability to use the confirm dialog with unit tests, simply test the regex we're using test('Test new regex for non relative link setting ftp', function() { equal(nonRelativeRegex.test('ftp://testftp.com'), true); }); test('Test new regex for non relative link setting http', function() { equal(nonRelativeRegex.test('http://testhttp.com'), true); }); test('Test new regex for non relative link setting relative', function() { equal(nonRelativeRegex.test('testhttp.com'), false); }); test('Test new regex for non relative link setting relative base', function() { equal(nonRelativeRegex.test('/testjpg.jpg'), false); }); })();