PHP 5.3.29-pl0-gentoo
Preview: anchor.js Size: 1023 B
/home/www/idcceurope.com/www/idcceurope.com/admin/jscripts/tiny_mce/themes/advanced/js/anchor.js

tinyMCEPopup.requireLangPack();

var AnchorDialog = {
	init : function(ed) {
		var action, elm, f = document.forms[0];

		this.editor = ed;
		elm = ed.dom.getParent(ed.selection.getNode(), 'A');
		v = ed.dom.getAttrib(elm, 'name');

		if (v) {
			this.action = 'update';
			f.anchorName.value = v;
		}

		f.insert.value = ed.getLang(elm ? 'update' : 'insert');
	},

	update : function() {
		var ed = this.editor, elm, name = document.forms[0].anchorName.value;

		if (!name || !/^[a-z][a-z0-9\-\_:\.]*$/i.test(name)) {
			tinyMCEPopup.alert('advanced_dlg.anchor_invalid');
			return;
		}

		tinyMCEPopup.restoreSelection();

		if (this.action != 'update')
			ed.selection.collapse(1);

		elm = ed.dom.getParent(ed.selection.getNode(), 'A');
		if (elm)
			elm.name = name;
		else
			ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', {name : name, 'class' : 'mceItemAnchor'}, ''));

		tinyMCEPopup.close();
	}
};

tinyMCEPopup.onInit.add(AnchorDialog.init, AnchorDialog);

Directory Contents

Dirs: 0 × Files: 7

Name Size Perms Modified Actions
2.15 KB lrw-r----- 2011-10-20 21:45:49
Edit Download
1023 B lrw-r----- 2011-10-20 21:45:50
Edit Download
15.17 KB lrw-r----- 2011-10-20 21:45:52
Edit Download
13.87 KB lrw-r----- 2011-10-20 21:45:54
Edit Download
6.05 KB lrw-r----- 2011-10-20 21:45:56
Edit Download
4.77 KB lrw-r----- 2011-10-20 21:45:57
Edit Download
1.28 KB lrw-r----- 2011-10-20 21:45:59
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).