Sha256: e98c0b68251fd1cd258ab69d5b1153d34dfd04fe14fbb08edae17b4cc5e022e3

Contents?: true

Size: 1.91 KB

Versions: 36

Compression:

Stored size: 1.91 KB

Contents

{I"
class:ETI"BundledAsset;FI"logical_path;TI")tinymce/themes/advanced/js/anchor.js;TI"
pathname;TI"{D:/Ruby215/lib/ruby/gems/2.1.0/gems/tinymce-rails-3.5.9/vendor/assets/javascripts/tinymce/themes/advanced/js/anchor.js;TI"content_type;TI"application/javascript;TI"
mtime;Tl+щçTI"length;Ti¢I"digest;TI"%31ffe5cf592733819f7982165a7f7924;FI"source;TI"¢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') || ed.dom.getAttrib(elm, 'id');

		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, attribName;

		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);

		var aRule = ed.schema.getElementRule('a');
		if (!aRule || aRule.attributes.name) {
			attribName = 'name';
		} else {
			attribName = 'id';
		}

		elm = ed.dom.getParent(ed.selection.getNode(), 'A');
		if (elm) {
			elm.setAttribute(attribName, name);
			elm[attribName] = name;
			ed.undoManager.add();
		} else {
			// create with zero-sized nbsp so that in Webkit where anchor is on last line by itself caret cannot be placed after it
			var attrs =  {'class' : 'mceItemAnchor'};
			attrs[attribName] = name;
			ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', attrs, '\uFEFF'));
			ed.nodeChanged();
		}

		tinyMCEPopup.close();
	}
};

tinyMCEPopup.onInit.add(AnchorDialog.init, AnchorDialog);
;TI"required_assets_digest;TI"%b6b4ce0b3d48f78b9f10fc996c884772;FI"
_version;TI"%64e62ddc273c2f5847f30d698ca14b67;F

Version data entries

36 entries across 18 versions & 1 rubygems

Version Path
optimacms-0.1.36 test/dummy/tmp/cache/assets/development/sprockets/09549f0ab8c0b81364f8bb260ca91db1
optimacms-0.1.36 test/dummy/tmp/cache/assets/development/sprockets/58be0cc335e388af2f963cc4925a9ef0
optimacms-0.1.34 test/dummy/tmp/cache/assets/development/sprockets/09549f0ab8c0b81364f8bb260ca91db1
optimacms-0.1.34 test/dummy/tmp/cache/assets/development/sprockets/58be0cc335e388af2f963cc4925a9ef0
optimacms-0.1.32 test/dummy/tmp/cache/assets/development/sprockets/09549f0ab8c0b81364f8bb260ca91db1
optimacms-0.1.32 test/dummy/tmp/cache/assets/development/sprockets/58be0cc335e388af2f963cc4925a9ef0
optimacms-0.1.31 test/dummy/tmp/cache/assets/development/sprockets/58be0cc335e388af2f963cc4925a9ef0
optimacms-0.1.31 test/dummy/tmp/cache/assets/development/sprockets/09549f0ab8c0b81364f8bb260ca91db1
optimacms-0.1.28 test/dummy/tmp/cache/assets/development/sprockets/58be0cc335e388af2f963cc4925a9ef0
optimacms-0.1.28 test/dummy/tmp/cache/assets/development/sprockets/09549f0ab8c0b81364f8bb260ca91db1
optimacms-0.1.27 test/dummy/tmp/cache/assets/development/sprockets/09549f0ab8c0b81364f8bb260ca91db1
optimacms-0.1.27 test/dummy/tmp/cache/assets/development/sprockets/58be0cc335e388af2f963cc4925a9ef0
optimacms-0.1.25 test/dummy/tmp/cache/assets/development/sprockets/58be0cc335e388af2f963cc4925a9ef0
optimacms-0.1.25 test/dummy/tmp/cache/assets/development/sprockets/09549f0ab8c0b81364f8bb260ca91db1
optimacms-0.1.24 test/dummy/tmp/cache/assets/development/sprockets/09549f0ab8c0b81364f8bb260ca91db1
optimacms-0.1.24 test/dummy/tmp/cache/assets/development/sprockets/58be0cc335e388af2f963cc4925a9ef0
optimacms-0.1.23 test/dummy/tmp/cache/assets/development/sprockets/09549f0ab8c0b81364f8bb260ca91db1
optimacms-0.1.23 test/dummy/tmp/cache/assets/development/sprockets/58be0cc335e388af2f963cc4925a9ef0
optimacms-0.1.21 test/dummy/tmp/cache/assets/development/sprockets/09549f0ab8c0b81364f8bb260ca91db1
optimacms-0.1.21 test/dummy/tmp/cache/assets/development/sprockets/58be0cc335e388af2f963cc4925a9ef0