Vergleich jscripts/editor.js - 1.6.10 - 1.6.11

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 125Zeile 125
		this.colors[38] = "#E6E6FA";
this.colors[39] = "#DDA0DD";
this.colors[40] = "#FFFFFF";

		this.colors[38] = "#E6E6FA";
this.colors[39] = "#DDA0DD";
this.colors[40] = "#FFFFFF";

		
// An array of video services to be shown (youtube, vimeo, etc)


// An array of video services to be shown (youtube, vimeo, etc)

		this.videos = new Object();
this.videos["dailymotion"] = this.options.lang.video_dailymotion;
this.videos["metacafe"] = this.options.lang.video_metacafe;

		this.videos = new Object();
this.videos["dailymotion"] = this.options.lang.video_dailymotion;
this.videos["metacafe"] = this.options.lang.video_metacafe;

Zeile 253Zeile 253

// Set the width/height of the area
subtract = 20;


// Set the width/height of the area
subtract = 20;

		subtract2 = 12;

		subtract2 = 8;

		areaContainer.style.height = parseInt(Element.getDimensions(this.editor).height)-this.toolbarHeight-subtract+"px";
areaContainer.style.width = parseInt(Element.getDimensions(this.editor).width)-subtract2+"px";


		areaContainer.style.height = parseInt(Element.getDimensions(this.editor).height)-this.toolbarHeight-subtract+"px";
areaContainer.style.width = parseInt(Element.getDimensions(this.editor).width)-subtract2+"px";


Zeile 369Zeile 369
		if(toolbar.lastChild.previousSibling)
toolbar.lastChild.previousSibling.className += ' toolbar_button_group_last';
},

		if(toolbar.lastChild.previousSibling)
toolbar.lastChild.previousSibling.className += ' toolbar_button_group_last';
},

	



	setElementState: function(element, state) {
element.addClassName('toolbar_'+state);

	setElementState: function(element, state) {
element.addClassName('toolbar_'+state);

		



		if(element.hasClassName('toolbar_button_group_first')) {
if(state == 'clicked') {
append = 'toolbar_clicked';

		if(element.hasClassName('toolbar_button_group_first')) {
if(state == 'clicked') {
append = 'toolbar_clicked';

Zeile 383Zeile 383
			append += '_button_group_first';
element.addClassName(append);
}

			append += '_button_group_first';
element.addClassName(append);
}

		



		if(element.hasClassName('toolbar_button_group_last')) {
if(state == 'clicked') {
append = 'toolbar_clicked';

		if(element.hasClassName('toolbar_button_group_last')) {
if(state == 'clicked') {
append = 'toolbar_clicked';

Zeile 395Zeile 395
			element.addClassName(append);
}
},

			element.addClassName(append);
}
},

	



	removeElementState: function(element, state)
{
element.removeClassName('toolbar_'+state);

	removeElementState: function(element, state)
{
element.removeClassName('toolbar_'+state);

		



		if(element.hasClassName('toolbar_button_group_first')) {
if(state == 'clicked') {
append = 'toolbar_clicked';

		if(element.hasClassName('toolbar_button_group_first')) {
if(state == 'clicked') {
append = 'toolbar_clicked';

Zeile 410Zeile 410
			append += '_button_group_first';
element.removeClassName(append);
}

			append += '_button_group_first';
element.removeClassName(append);
}

		



		if(element.hasClassName('toolbar_button_group_last')) {
if(state == 'clicked') {
append = 'toolbar_clicked';

		if(element.hasClassName('toolbar_button_group_last')) {
if(state == 'clicked') {
append = 'toolbar_clicked';

Zeile 420Zeile 420
			}
append += '_button_group_last';
element.removeClassName(append);

			}
append += '_button_group_last';
element.removeClassName(append);

		}	

		}

	},

dropDownMenuItemClick: function(e)

	},

dropDownMenuItemClick: function(e)

Zeile 430Zeile 430

if(!element)
return;


if(!element)
return;

		



		if(!element.extra)
element = element.up('li');

		if(!element.extra)
element = element.up('li');

		



		var mnu = element.up('ul');
var dropdown = this.getElementToolbarItem(mnu);
var label = dropdown.down('.editor_dropdown_label');

if(!dropdown.insertText || (dropdown.insertText != "video" && mnu.activeItem && mnu.activeItem == element))
return;

		var mnu = element.up('ul');
var dropdown = this.getElementToolbarItem(mnu);
var label = dropdown.down('.editor_dropdown_label');

if(!dropdown.insertText || (dropdown.insertText != "video" && mnu.activeItem && mnu.activeItem == element))
return;

		



		mnu.lastItemValue = element.extra;

if(this.getSelectedText($(this.textarea)))

		mnu.lastItemValue = element.extra;

if(this.getSelectedText($(this.textarea)))

Zeile 596Zeile 596
				this.setDropDownMenuActiveItem(dropdown, 0);
}.bindAsEventListener(this));
}

				this.setDropDownMenuActiveItem(dropdown, 0);
}.bindAsEventListener(this));
}

		



		$H(options.options).each(function(option)
{
if(options.draw_option)

		$H(options.options).each(function(option)
{
if(options.draw_option)

Zeile 633Zeile 633
			return;
if(!element.elementType)
element = this.getElementToolbarItem(element);

			return;
if(!element.elementType)
element = this.getElementToolbarItem(element);

		



		var mnu = $(element).down('ul');

		var mnu = $(element).down('ul');

		



		// This menu is already open, close it
if(mnu.style.display != 'none')
{

		// This menu is already open, close it
if(mnu.style.display != 'none')
{

Zeile 695Zeile 695
		{
return;
}

		{
return;
}

		



		// Internet explorer errors if you try and select an element... so just handle that by try catch
try {
var range = document.selection.createRange();

		// Internet explorer errors if you try and select an element... so just handle that by try catch
try {
var range = document.selection.createRange();

Zeile 799Zeile 799
		button.insertExtra = '';
if(typeof(options.extra) != 'undefined')
button.insertExtra = options.extra;

		button.insertExtra = '';
if(typeof(options.extra) != 'undefined')
button.insertExtra = options.extra;

		



		if(typeof(options.sprite) != 'undefined')
{
var img = document.createElement('span');

		if(typeof(options.sprite) != 'undefined')
{
var img = document.createElement('span');

Zeile 1103Zeile 1103
			this.performInsert("[img]"+image+"[/img]", "", true);
}
},

			this.performInsert("[img]"+image+"[/img]", "", true);
}
},

	



	insertVideo: function(type)
{
selectedText = this.getSelectedText($(this.textarea));

	insertVideo: function(type)
{
selectedText = this.getSelectedText($(this.textarea));

Zeile 1359Zeile 1359
		textarea.focus();
this.trackingCaret = true;
this.storeCaret();

		textarea.focus();
this.trackingCaret = true;
this.storeCaret();

		this.trackingCaret = false;		

		this.trackingCaret = false;

		return is_closed;
},


		return is_closed;
},