diff --git a/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product b/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product deleted file mode 160000 index 97cacd37..00000000 --- a/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Product +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 97cacd37ee095d66b8018c89ac072c783df36840 diff --git a/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Save b/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Save deleted file mode 160000 index c574ed11..00000000 --- a/public/javascripts/admin/aloha/plugins/com.example.aloha.plugins.Save +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c574ed110c2cb3fb2927ad2ca529b18522be2f88 diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr deleted file mode 160000 index a9b8cd6b..00000000 --- a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a9b8cd6b908016f32dcfee138d4b9eea5ed03b5e diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/examples/AlohaAbbr.css b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/examples/AlohaAbbr.css new file mode 100644 index 00000000..84f64efe --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/examples/AlohaAbbr.css @@ -0,0 +1,48 @@ +body { + font-family: sans-serif; +} + +body { + background-color: #ccc; +} + +#bodyContent { + font-size:0.9em; +} + +h1, h2, h3, h4, h5, h6 { + font-family: sans-serif; + padding-bottom:0.1em; + padding-top:0.5em; +} +h1 { + border-bottom:1px solid #AAAAAA; +} + +h1 { font-size: 188%; } +h2 { font-size: 150%; } +h3 { font-size: 132%; } +h4 { font-size: 116%; } +h5 { font-size: 100%; } +h6 { font-size: 80%; } + +#main { + width: 650px; + margin-top: 40px; + margin-left: auto ; + margin-right: auto ; + padding: 70px; + background-color: white; + border-radius: 1px; + -moz-border-radius: 1px; + box-shadow: 5px 5px rgba(0,0,0,0.3); + -webkit-box-shadow: 5px 5px rgba(0,0,0,0.3); + -moz-box-shadow: 5px 5px rgba(0,0,0,0.3); +} + +abbr, acronym +{ + border-bottom: .1em dotted; + cursor: help; +} + diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/examples/AlohaAbbr.html b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/examples/AlohaAbbr.html new file mode 100644 index 00000000..2e0b77f1 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/examples/AlohaAbbr.html @@ -0,0 +1,69 @@ + + + + +Aloha, Abbreviations ! + + + + + + + + + + + + +
+
+
+

Aloha

+

Etymology

+

The word aloha derives from the Proto-Polynesian root *qalofa. It has cognates in other Polynesian languages, such as Samoan alofa +and Māori aroha, also meaning "love."

+

AE is the word's most advanced browser based RTE made with aloha passion.

+

A folk etymology claims that it derives from a compound of the Hawaiian words alo meaning "presence", "front", "face", or "share"; and +ha, meaning "breath of life" or "essence of life." Although alo does indeed mean "presence" etc., the word for breath is spelled with a macron +or kahakō over the a (hā) whereas the word aloha does not have a long a.

+

Usage

+

Before contact with the West, the words used for greeting were welina and anoai. Today, "aloha kakahiaka" is the phrase for "good +morning." "Aloha ʻauinalā" means "good afternoon" and "aloha ahiahi" means "good evening." "Aloha kākou" is a common form of "welcome to all."

+

In modern Hawaiʻi, numerous businesses have aloha in their names, with more than 3 pages of listings in the Oʻahu phone book alone.

+

Trends

+

Recent trends are popularizing the term elsewhere in the United States. Popular entertainer, Broadway star and Hollywood actress Bette +Midler, born in Honolulu, uses the greeting frequently in national appearances. The word was also used frequently in the hit television drama +Hawaii Five-O. In the influential 1982 film comedy Fast Times at Ridgemont High, the eccentric teacher Mr. Hand makes use of the greeting. The +Aloha Spirit is a major concept in Lilo and Stitch, a very popular Disney series of movies and TV shows, set in Hawaiʻi. The drama series Lost, +shot in Hawaiʻi, has a thank you note at the end of the credits saying "We thank the people of Hawaiʻi and their Aloha Spirit". Aloha is a term +also used in the Nickelodeon program Rocket Power.

+
    +
  • Arguably the most famous historical Hawaiian song, "Aloha ʻOe" was written by the last queen of Hawaii, Liliʻuokalani.
  • +
  • The term inspired the name of the ALOHA Protocol introduced in the 1970s by the University of Hawaii.
  • +
  • In Hawaii someone can be said to have or show aloha in the way they treat others; whether family, friend, neighbor or stranger.
  • +
+
+
+
+ + \ No newline at end of file diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/i18n/de.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/i18n/de.dict new file mode 100644 index 00000000..357c67d6 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/i18n/de.dict @@ -0,0 +1,4 @@ +floatingmenu.tab.abbr=Abkürzung +button.addabbr.tooltip=Abkürzung einfügen +button.abbr.tooltip=Als Abkürzung formatieren +newabbr.defaulttext=Abb diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/i18n/en.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/i18n/en.dict new file mode 100644 index 00000000..59466c89 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/i18n/en.dict @@ -0,0 +1,4 @@ +floatingmenu.tab.abbr=Abbreviation +button.addabbr.tooltip=insert abbreviation +button.abbr.tooltip=format as abbreviation +newabbr.defaulttext=Abbr diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/plugin.js b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/plugin.js new file mode 100644 index 00000000..575a0312 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Abbr/plugin.js @@ -0,0 +1,7 @@ +/* +* Aloha Editor +* Author & Copyright (c) 2010 Gentics Software GmbH +* aloha-sales@gentics.com +* Licensed unter the terms of http://www.aloha-editor.com/license.html +*/ +GENTICS.Aloha.Abbr=new GENTICS.Aloha.Plugin("com.gentics.aloha.plugins.Abbr");GENTICS.Aloha.Abbr.languages=["en","de"];GENTICS.Aloha.Abbr.config=["abbr"];GENTICS.Aloha.Abbr.init=function(){this.createButtons();this.subscribeEvents();this.bindInteractions()};GENTICS.Aloha.Abbr.createButtons=function(){var that=this;this.formatAbbrButton=new GENTICS.Aloha.ui.Button({iconClass:"GENTICS_button GENTICS_button_abbr",size:"small",onclick:function(){that.formatAbbr()},tooltip:this.i18n("button.abbr.tooltip"),toggle:true});GENTICS.Aloha.FloatingMenu.addButton("GENTICS.Aloha.continuoustext",this.formatAbbrButton,GENTICS.Aloha.i18n(GENTICS.Aloha,"floatingmenu.tab.format"),1);this.insertAbbrButton=new GENTICS.Aloha.ui.Button({iconClass:"GENTICS_button GENTICS_button_abbr",size:"small",onclick:function(){that.insertAbbr(false)},tooltip:this.i18n("button.addabbr.tooltip"),toggle:false});GENTICS.Aloha.FloatingMenu.addButton("GENTICS.Aloha.continuoustext",this.insertAbbrButton,GENTICS.Aloha.i18n(GENTICS.Aloha,"floatingmenu.tab.insert"),1);GENTICS.Aloha.FloatingMenu.createScope(this.getUID("abbr"),"GENTICS.Aloha.continuoustext");this.abbrField=new GENTICS.Aloha.ui.AttributeField({width:320});GENTICS.Aloha.FloatingMenu.addButton(this.getUID("abbr"),this.abbrField,this.i18n("floatingmenu.tab.abbr"),1)};GENTICS.Aloha.Abbr.bindInteractions=function(){var that=this;this.abbrField.addListener("blur",function(obj,event){if(this.getValue()==""){that.removeAbbr()}});for(var i=0;i'+abbrText+"");GENTICS.Utils.Dom.insertIntoDOM(newAbbr,range,jQuery(GENTICS.Aloha.activeEditable.obj));range.startContainer=range.endContainer=newAbbr.contents().get(0);range.startOffset=0;range.endOffset=abbrText.length}else{var newAbbr=jQuery('');GENTICS.Utils.Dom.addMarkup(range,newAbbr,false)}range.select();this.abbrField.focus()};GENTICS.Aloha.Abbr.removeAbbr=function(){var range=GENTICS.Aloha.Selection.getRangeObject();var foundMarkup=this.findAbbrMarkup();if(foundMarkup){GENTICS.Utils.Dom.removeFromDOM(foundMarkup,range,true);GENTICS.Aloha.activeEditable.obj[0].focus();range.select()}};GENTICS.Aloha.Abbr.makeClean=function(obj){}; \ No newline at end of file diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format deleted file mode 160000 index c71edba4..00000000 --- a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c71edba41798a4be621197a7418747252884a34d diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/de.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/de.dict new file mode 100644 index 00000000..467b893e --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/de.dict @@ -0,0 +1,30 @@ +button.b.tooltip=Fett +button.i.tooltip=Kursiv +button.u.tooltip=Unterstrichen +button.cite.tooltip=Zitat +button.q.tooltip= +button.code.tooltip=Code +button.abbr.tooltip=Abkürzung +button.del.tooltip=Durchgestrichen +button.sub.tooltip=Tiefgestellt +button.sup.tooltip=Hochgestellt +button.p.tooltip=Absatz +button.h1.tooltip=Überschrift 1 +button.h2.tooltip=Überschrift 2 +button.h3.tooltip=Überschrift 3 +button.h4.tooltip=Überschrift 4 +button.h5.tooltip=Überschrift 5 +button.h6.tooltip=Überschrift 6 +button.pre.tooltip=Vorformatierter text +button.title.tooltip=Titel +button.removeFormat.tooltip=Formatierung entfernen +button.removeFormat.text=Formatierung entfernen +GENTICS_button_p=GENTICS_button_p_de +GENTICS_button_h1=GENTICS_button_h1_de +GENTICS_button_h2=GENTICS_button_h2_de +GENTICS_button_h3=GENTICS_button_h3_de +GENTICS_button_h4=GENTICS_button_h4_de +GENTICS_button_h5=GENTICS_button_h5_de +GENTICS_button_h6=GENTICS_button_h6_de +GENTICS_button_pre=GENTICS_button_pre_de +GENTICS_button_title=GENTICS_button_title_de \ No newline at end of file diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/en.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/en.dict new file mode 100644 index 00000000..106a1e32 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/en.dict @@ -0,0 +1,30 @@ +button.b.tooltip=Bold +button.i.tooltip=Italic +button.u.tooltip=Underline +button.cite.tooltip=Cite +button.q.tooltip= +button.code.tooltip=Code +button.abbr.tooltip=Abbreviation +button.del.tooltip=Strikethrough +button.sub.tooltip=Subscript +button.sup.tooltip=Superscript +button.p.tooltip=Paragraph +button.h1.tooltip=Heading 1 +button.h2.tooltip=Heading 2 +button.h3.tooltip=Heading 3 +button.h4.tooltip=Heading 4 +button.h5.tooltip=Heading 5 +button.h6.tooltip=Heading 6 +button.pre.tooltip=Pre formated text +button.title.tooltip=Title +button.removeFormat.tooltip=Remove formatting +button.removeFormat.text=Remove formatting +GENTICS_button_p=GENTICS_button_p +GENTICS_button_h1=GENTICS_button_h1 +GENTICS_button_h2=GENTICS_button_h2 +GENTICS_button_h3=GENTICS_button_h3 +GENTICS_button_h4=GENTICS_button_h4 +GENTICS_button_h5=GENTICS_button_h5 +GENTICS_button_h6=GENTICS_button_h6 +GENTICS_button_pre=GENTICS_button_pre +GENTICS_button_title=GENTICS_button_title \ No newline at end of file diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/eo.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/eo.dict new file mode 100644 index 00000000..4cbb70e6 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/eo.dict @@ -0,0 +1,29 @@ +button.i.tooltip=Oblikvigi +button.u.tooltip=Substreki +button.cite.tooltip=Citi +button.q.tooltip= +button.code.tooltip=Kodo +button.abbr.tooltip=Mallongigo +button.del.tooltip=Marki forviita +button.sub.tooltip=Superskripto +button.sup.tooltip=Subskripto +button.p.tooltip=Alineo +button.h1.tooltip=Titolo 1 +button.h2.tooltip=Subtitolo 2 +button.h3.tooltip=Subtitolo 3 +button.h4.tooltip=Subtitolo 4 +button.h5.tooltip=Subtitolo 5 +button.h6.tooltip=Subtitolo 6 +button.pre.tooltip=Antaformatigita teksto +button.title.tooltip=Titolo +button.removeFormat.tooltip=Forvii la formatigon +button.removeFormat.text=Forvii la formatigon +GENTICS_button_p=GENTICS_button_p +GENTICS_button_h1=GENTICS_button_h1 +GENTICS_button_h2=GENTICS_button_h2 +GENTICS_button_h3=GENTICS_button_h3 +GENTICS_button_h4=GENTICS_button_h4 +GENTICS_button_h5=GENTICS_button_h5 +GENTICS_button_h6=GENTICS_button_h6 +GENTICS_button_pre=GENTICS_button_pre +GENTICS_button_title=GENTICS_button_title \ No newline at end of file diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/fi.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/fi.dict new file mode 100644 index 00000000..ab6cdb83 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/fi.dict @@ -0,0 +1,30 @@ +button.b.tooltip=Lihavointi +button.i.tooltip=Kursiivi +button.u.tooltip=Alleviivaus +button.cite.tooltip=Lainaus +button.q.tooltip= +button.code.tooltip=Koodi +button.abbr.tooltip=Lyhennelmä +button.del.tooltip=Yliviivaus +button.sub.tooltip=Alaindeksi +button.sup.tooltip=Yläindeksi +button.p.tooltip=Tekstikappale +button.h1.tooltip=Otsikko 1 +button.h2.tooltip=Otsikko 2 +button.h3.tooltip=Otsikko 3 +button.h4.tooltip=Otsikko 4 +button.h5.tooltip=Otsikko 5 +button.h6.tooltip=Otsikko 6 +button.pre.tooltip=Muotoiltu teksti +button.title.tooltip=Otsikko +button.removeFormat.tooltip=Poista muotoilut +button.removeFormat.text=Poista muotoilut +GENTICS_button_p=GENTICS_button_p +GENTICS_button_h1=GENTICS_button_h1 +GENTICS_button_h2=GENTICS_button_h2 +GENTICS_button_h3=GENTICS_button_h3 +GENTICS_button_h4=GENTICS_button_h4 +GENTICS_button_h5=GENTICS_button_h5 +GENTICS_button_h6=GENTICS_button_h6 +GENTICS_button_pre=GENTICS_button_pre +GENTICS_button_title=GENTICS_button_title diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/fr.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/fr.dict new file mode 100644 index 00000000..be990cc5 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/fr.dict @@ -0,0 +1,30 @@ +button.b.tooltip=Gras +button.i.tooltip=Italique +button.u.tooltip=Souligner +button.cite.tooltip=Cité +button.q.tooltip=Quote +button.code.tooltip=Code +button.abbr.tooltip=Abréviation +button.del.tooltip=Barré +button.sub.tooltip=Indice +button.sup.tooltip=Exposant +button.p.tooltip=Paragraphe +button.h1.tooltip=Titre1 +button.h2.tooltip=Rubrique2 +button.h3.tooltip=Rubrique3 +button.h4.tooltip=Rubrique4 +button.h5.tooltip=Rubrique5 +button.h6.tooltip=Rubrique6 +button.pre.tooltip=texte préformaté +button.title.tooltip=Titre +button.removeFormat.tooltip=Supprimer le formatage +button.removeFormat.text=Supprimer le formatage +GENTICS_button_p=GENTICS_button_p +GENTICS_button_h1=GENTICS_button_h1 +GENTICS_button_h2=GENTICS_button_h2 +GENTICS_button_h3=GENTICS_button_h3 +GENTICS_button_h4=GENTICS_button_h4 +GENTICS_button_h5=GENTICS_button_h5 +GENTICS_button_h6=GENTICS_button_h6 +GENTICS_button_pre=GENTICS_button_pre +GENTICS_button_title=GENTICS_button_title \ No newline at end of file diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/it.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/it.dict new file mode 100644 index 00000000..f60ccbca --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/it.dict @@ -0,0 +1,30 @@ +button.b.tooltip=Grassetto +button.i.tooltip=Corsivo +button.u.tooltip=Sottolineato +button.cite.tooltip=Citazione +button.q.tooltip= +button.code.tooltip=Codice +button.abbr.tooltip=Abbreviazione +button.del.tooltip=Barrato +button.sub.tooltip=Pedice +button.sup.tooltip=Apice +button.p.tooltip=Paragrafo +button.h1.tooltip=Titolo 1 +button.h2.tooltip=Titolo 2 +button.h3.tooltip=Titolo 3 +button.h4.tooltip=Titolo 4 +button.h5.tooltip=Titolo 5 +button.h6.tooltip=Titolo 6 +button.pre.tooltip=Testo pre formattato +button.title.tooltip=Titolo +button.removeFormat.tooltip=Rimuovi formattazione +button.removeFormat.text=Rimuovi formattazione +GENTICS_button_p=GENTICS_button_p +GENTICS_button_h1=GENTICS_button_h1 +GENTICS_button_h2=GENTICS_button_h2 +GENTICS_button_h3=GENTICS_button_h3 +GENTICS_button_h4=GENTICS_button_h4 +GENTICS_button_h5=GENTICS_button_h5 +GENTICS_button_h6=GENTICS_button_h6 +GENTICS_button_pre=GENTICS_button_pre +GENTICS_button_title=GENTICS_button_title diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/pl.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/pl.dict new file mode 100644 index 00000000..eff1a8d0 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/pl.dict @@ -0,0 +1,30 @@ +button.b.tooltip=Pogrubienie +button.i.tooltip=Kursywa +button.u.tooltip=Podkreślenie +button.cite.tooltip=Cytat +button.q.tooltip= +button.code.tooltip=Kod +button.abbr.tooltip=Skrót +button.del.tooltip=Przekreślenie +button.sub.tooltip=Indeks dolny +button.sup.tooltip=Indeks górny +button.p.tooltip=Paragraf +button.h1.tooltip=Nagłówek 1 +button.h2.tooltip=Nagłówek 2 +button.h3.tooltip=Nagłówek 3 +button.h4.tooltip=Nagłówek 4 +button.h5.tooltip=Nagłówek 5 +button.h6.tooltip=Nagłówek 6 +button.pre.tooltip=Tekst preformatowany +button.title.tooltip=Tytuł +button.removeFormat.tooltip=Usuń formatowanie +button.removeFormat.text=Usuń formatowanie +GENTICS_button_p=GENTICS_button_p +GENTICS_button_h1=GENTICS_button_h1 +GENTICS_button_h2=GENTICS_button_h2 +GENTICS_button_h3=GENTICS_button_h3 +GENTICS_button_h4=GENTICS_button_h4 +GENTICS_button_h5=GENTICS_button_h5 +GENTICS_button_h6=GENTICS_button_h6 +GENTICS_button_pre=GENTICS_button_pre +GENTICS_button_title=GENTICS_button_title \ No newline at end of file diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/ru.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/ru.dict new file mode 100644 index 00000000..8e8618e4 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/i18n/ru.dict @@ -0,0 +1,30 @@ +button.b.tooltip=Полужирный +button.i.tooltip=Курсив +button.u.tooltip=Подчеркивание +button.cite.tooltip=Цитировать +button.q.tooltip=Цитата +button.code.tooltip=Код +button.abbr.tooltip=Аббривиатура +button.del.tooltip=Перечеркивание +button.sub.tooltip=Нижний индекс +button.sup.tooltip=Верхний индекс +button.p.tooltip=Параграф +button.h1.tooltip=Заголовок 1 +button.h2.tooltip=Заголовок 2 +button.h3.tooltip=Заголовок 3 +button.h4.tooltip=Заголовок 4 +button.h5.tooltip=Заголовок 5 +button.h6.tooltip=Заголовок 6 +button.pre.tooltip=Отформатированный текс +button.title.tooltip=Название +button.removeFormat.tooltip=Убрать форматирование +button.removeFormat.text=Убрать форматирование +GENTICS_button_p=GENTICS_button_p +GENTICS_button_h1=GENTICS_button_h1 +GENTICS_button_h2=GENTICS_button_h2 +GENTICS_button_h3=GENTICS_button_h3 +GENTICS_button_h4=GENTICS_button_h4 +GENTICS_button_h5=GENTICS_button_h5 +GENTICS_button_h6=GENTICS_button_h6 +GENTICS_button_pre=GENTICS_button_pre +GENTICS_button_title=GENTICS_button_title \ No newline at end of file diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/plugin.js b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/plugin.js new file mode 100644 index 00000000..fadf95a4 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Format/plugin.js @@ -0,0 +1,7 @@ +/* +* Aloha Editor +* Author & Copyright (c) 2010 Gentics Software GmbH +* aloha-sales@gentics.com +* Licensed unter the terms of http://www.aloha-editor.com/license.html +*/ +GENTICS.Aloha.Format=new GENTICS.Aloha.Plugin("com.gentics.aloha.plugins.Format");GENTICS.Aloha.Format.languages=["en","de","fr","eo","fi","ru","it","pl"];GENTICS.Aloha.Format.config=["b","i","del","sub","sup","p","title","h1","h2","h3","h4","h5","h6","pre","removeFormat"];GENTICS.Aloha.Format.init=function(){this.initButtons();var that=this;GENTICS.Aloha.EventRegistry.subscribe(GENTICS.Aloha,"editableActivated",function(e,params){that.applyButtonConfig(params.editable.obj)})};GENTICS.Aloha.Format.applyButtonConfig=function(obj){config=this.getEditableConfig(obj);for(var button in this.buttons){if(jQuery.inArray(button,config)!=-1){this.buttons[button].button.show()}else{this.buttons[button].button.hide()}}for(var i in this.multiSplitItems){if(jQuery.inArray(this.multiSplitItems[i].name,config)!=-1){this.multiSplitButton.extButton.showItem(this.multiSplitItems[i].name)}else{this.multiSplitButton.extButton.hideItem(this.multiSplitItems[i].name)}}};GENTICS.Aloha.Format.initButtons=function(){var scope="GENTICS.Aloha.continuoustext";this.buttons={};var that=this;this.multiSplitItems=new Array();this.multiSplitButton;jQuery.each(GENTICS.Aloha.Format.config,function(j,button){switch(button){case"b":case"i":case"cite":case"q":case"code":case"abbr":case"del":case"sub":case"sup":that.buttons[button]={button:new GENTICS.Aloha.ui.Button({iconClass:"GENTICS_button GENTICS_button_"+button,size:"small",onclick:function(){if(GENTICS.Aloha.activeEditable){GENTICS.Aloha.activeEditable.obj[0].focus()}var markup=jQuery("<"+button+">");var rangeObject=GENTICS.Aloha.Selection.rangeObject;var foundMarkup=rangeObject.findMarkup(function(){return this.nodeName.toLowerCase()==markup.get(0).nodeName.toLowerCase()},GENTICS.Aloha.activeEditable.obj);if(foundMarkup){if(rangeObject.isCollapsed()){GENTICS.Utils.Dom.removeFromDOM(foundMarkup,rangeObject,true)}else{GENTICS.Utils.Dom.removeMarkup(rangeObject,markup,GENTICS.Aloha.activeEditable.obj)}}else{if(rangeObject.isCollapsed()){GENTICS.Utils.Dom.extendToWord(rangeObject)}GENTICS.Utils.Dom.addMarkup(rangeObject,markup)}rangeObject.select();return false},tooltip:that.i18n("button."+button+".tooltip"),toggle:true}),markup:jQuery("<"+button+">")};GENTICS.Aloha.FloatingMenu.addButton(scope,that.buttons[button].button,GENTICS.Aloha.i18n(GENTICS.Aloha,"floatingmenu.tab.format"),1);break;case"p":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":case"pre":that.multiSplitItems.push({name:button,tooltip:that.i18n("button."+button+".tooltip"),iconClass:"GENTICS_button "+that.i18n("GENTICS_button_"+button),markup:jQuery("<"+button+">"),click:function(){if(GENTICS.Aloha.activeEditable){GENTICS.Aloha.activeEditable.obj[0].focus()}GENTICS.Aloha.Selection.changeMarkupOnSelection(jQuery("<"+button+">"))}});break;case"removeFormat":that.multiSplitItems.push({name:button,text:that.i18n("button."+button+".text"),tooltip:that.i18n("button."+button+".tooltip"),iconClass:"GENTICS_button GENTICS_button_"+button,wide:true,click:function(){GENTICS.Aloha.Format.removeFormat()}});break;default:GENTICS.Aloha.log("warn",this,'Button "'+button+'" is not defined');break}});if(this.multiSplitItems.length>0){this.multiSplitButton=new GENTICS.Aloha.ui.MultiSplitButton({items:this.multiSplitItems});GENTICS.Aloha.FloatingMenu.addButton(scope,this.multiSplitButton,GENTICS.Aloha.i18n(GENTICS.Aloha,"floatingmenu.tab.format"),3)}GENTICS.Aloha.EventRegistry.subscribe(GENTICS.Aloha,"selectionChanged",function(event,rangeObject){jQuery.each(that.buttons,function(index,button){for(var i=0;i0){var foundMultiSplit=false;for(var i=0;i

"));var formats=["b","i","cite","q","code","abbr","del","sub","sup"];var rangeObject=GENTICS.Aloha.Selection.rangeObject;var startObj=jQuery(rangeObject.startContainer);var limitObj=jQuery(rangeObject.limitObject);if(rangeObject.isCollapsed()||startObj===limitObj){return}var parent=startObj.parent();while(parent.get(0)!==limitObj.get(0)){var index=formats.indexOf(parent.get(0).nodeName.toLowerCase());parent=parent.parent();if(index!=-1){GENTICS.Aloha.Selection.changeMarkupOnSelection(jQuery("<"+formats[index]+">"));formats.splice(index,1)}}for(var i in formats){GENTICS.Aloha.Selection.changeMarkupOnSelection(jQuery("<"+formats[i]+">"));GENTICS.Aloha.Selection.changeMarkupOnSelection(jQuery("<"+formats[i]+">"))}};GENTICS.Aloha.Format.toString=function(){return"com.gentics.aloha.plugins.Format"}; \ No newline at end of file diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.HighlightEditables b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.HighlightEditables deleted file mode 160000 index 11d45d8d..00000000 --- a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.HighlightEditables +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 11d45d8df725f0e15501c1447975b84473b8c116 diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.HighlightEditables/css/HighlightEditables.css b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.HighlightEditables/css/HighlightEditables.css new file mode 100644 index 00000000..ce27e7cf --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.HighlightEditables/css/HighlightEditables.css @@ -0,0 +1,14 @@ +/*! +* Aloha Editor +* Author & Copyright (c) 2010 Gentics Software GmbH +* aloha-sales@gentics.com +* Licensed unter the terms of http://www.aloha-editor.com/license.html +*/ + +.GENTICS_editable_highlight { + outline: #FFE767 solid 5px !important; +} + +.GENTICS_editable_active, .GENTICS_editable_active[contenteditable=true]:focus { + outline: #B7D6FA solid 5px !important; +} diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.HighlightEditables/plugin.js b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.HighlightEditables/plugin.js new file mode 100644 index 00000000..ebb07b32 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.HighlightEditables/plugin.js @@ -0,0 +1,7 @@ +/* +* Aloha Editor +* Author & Copyright (c) 2010 Gentics Software GmbH +* aloha-sales@gentics.com +* Licensed unter the terms of http://www.aloha-editor.com/license.html +*/ +GENTICS.Aloha.HighlightEditables=new GENTICS.Aloha.Plugin("com.gentics.aloha.plugins.highlighteditables");GENTICS.Aloha.HighlightEditables.init=function(){var that=this;GENTICS.Utils.Position.addMouseMoveCallback(function(){for(var i=0;i-1)&&(!p.inFolderId||p.inFolderId==e.parentId))});callback.call(this,d)};GENTICS.Aloha.Repositories.LinkList.getChildren=function(p,callback){var d=[];for(e in this.folder){var l=this.folder[e].parentId;if(typeof this.folder[e]!="function"&&(this.folder[e].parentId==p.inFolderId||(!this.folder[e].parentId&&p.inFolderId==this.repositoryId))){d.push(this.folder[e])}}callback.call(this,d)};GENTICS.Aloha.Repositories.LinkList.parseUri=function(str){var o={strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},m=o.parser[o.strictMode?"strict":"loose"].exec(str),uri={},i=14;while(i--){uri[o.key[i]]=m[i]||""}uri[o.q.name]={};uri[o.key[12]].replace(o.q.parser,function($0,$1,$2){if($1){uri[o.q.name][$1]=$2}});return uri}; \ No newline at end of file diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/css/Link.css b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/css/Link.css new file mode 100644 index 00000000..4eb46564 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/css/Link.css @@ -0,0 +1,15 @@ +/*! +* Aloha Editor +* Author & Copyright (c) 2010 Gentics Software GmbH +* aloha-sales@gentics.com +* Licensed unter the terms of http://www.aloha-editor.com/license.html +*/ + +.GENTICS_link_pointer { + cursor: pointer; +} + +.GENTICS_link_text { + cursor: text; +} + diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/delicious.js b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/delicious.js new file mode 100644 index 00000000..43f61d05 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Link/delicious.js @@ -0,0 +1,7 @@ +/* +* Aloha Editor +* Author & Copyright (c) 2010 Gentics Software GmbH +* aloha-sales@gentics.com +* Licensed unter the terms of http://www.aloha-editor.com/license.html +*/ +if(!GENTICS.Aloha.Repositories){GENTICS.Aloha.Repositories={}}GENTICS.Aloha.Repositories.delicious=new GENTICS.Aloha.Repository("com.gentics.aloha.repositories.delicious");GENTICS.Aloha.Repositories.delicious.settings.username="draftkraft";GENTICS.Aloha.Repositories.delicious.settings.weight=0.35;GENTICS.Aloha.Repositories.delicious.init=function(){var that=this;if(this.settings.weight+0.15>1){this.settings.weight=1-0.15}this.deliciousURL="http://feeds.delicious.com/v2/json/";if(this.settings.username){this.deliciousURL+=this.settings.username+"/";this.repositoryName="deliciuos/"+this.settings.username;this.tags=[];jQuery.ajax({type:"GET",dataType:"jsonp",url:"http://feeds.delicious.com/v2/json/tags/"+that.settings.username,success:function(data){for(var tag in data){that.tags.push(tag)}}})}else{this.repositoryName="deliciuos/"+popular;this.deliciousURL+="tag/"}};GENTICS.Aloha.Repositories.delicious.query=function(p,callback){var that=this;if(p.objectTypeFilter&&jQuery.inArray("website",p.objectTypeFilter)==-1){callback.call(this,[])}else{var tags=[];if(this.settings.username){var queryTags=p.queryString?p.queryString.split(" "):[];for(var i=0;i0){tags.push(newtags[0])}}else{tags.push(queryTag)}}}else{tags=p.queryString.split(" ")}var folderTags=p.inFolderId?p.inFolderId.split("+"):[];jQuery.extend(tags,folderTags);if(p.queryString&&tags.length==0){callback.call(that,[]);return}jQuery.ajax({type:"GET",dataType:"jsonp",url:that.deliciousURL+tags.join("+"),success:function(data){var items=[];for(var i=0;i'+linkText+"");GENTICS.Utils.Dom.insertIntoDOM(newLink,range,jQuery(GENTICS.Aloha.activeEditable.obj));range.startContainer=range.endContainer=newLink.contents().get(0);range.startOffset=0;range.endOffset=linkText.length}else{var newLink=jQuery('');GENTICS.Utils.Dom.addMarkup(range,newLink,false)}range.select();this.hrefField.focus();this.hrefChange()};GENTICS.Aloha.Link.removeLink=function(){var range=GENTICS.Aloha.Selection.getRangeObject();var foundMarkup=this.findLinkMarkup();if(foundMarkup){GENTICS.Utils.Dom.removeFromDOM(foundMarkup,range,true);GENTICS.Aloha.activeEditable.obj[0].focus();range.select()}};GENTICS.Aloha.Link.hrefChange=function(){this.hrefField.setAttribute("target",this.target,this.targetregex,this.hrefField.getQueryValue());this.hrefField.setAttribute("class",this.cssclass,this.cssclassregex,this.hrefField.getQueryValue());if(typeof this.onHrefChange=="function"){this.onHrefChange.call(this,this.hrefField.getTargetObject(),this.hrefField.getQueryValue(),this.hrefField.getItem())}GENTICS.Aloha.EventRegistry.trigger(new GENTICS.Aloha.Event("hrefChanged",GENTICS.Aloha,{obj:this.hrefField.getTargetObject(),href:this.hrefField.getQueryValue(),item:this.hrefField.getItem()}))};GENTICS.Aloha.Link.makeClean=function(obj){obj.find("a").each(function(){jQuery(this).removeClass("GENTICS_link_pointer");jQuery(this).removeClass("GENTICS_link_text")})}; \ No newline at end of file diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker deleted file mode 160000 index b8bac9b6..00000000 --- a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b8bac9b6b11ddd2dfa141053229c17ca209425a3 diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/css/LinkChecker.css b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/css/LinkChecker.css new file mode 100644 index 00000000..797c0bea --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/css/LinkChecker.css @@ -0,0 +1,14 @@ +/*! +* Aloha Editor +* Author & Copyright (c) 2010 Gentics Software GmbH +* aloha-sales@gentics.com +* Licensed unter the terms of http://www.aloha-editor.com/license.html +*/ + +.GENTICS_link_error { + color: red !important; +} + +.GENTICS_link_warn { + color: red !important; +} diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/examples/AlohaLinkChecker.css b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/examples/AlohaLinkChecker.css new file mode 100644 index 00000000..2339c4a2 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/examples/AlohaLinkChecker.css @@ -0,0 +1,49 @@ +body { + font-family: sans-serif; +} + +body { + background-color: #ccc; +} + +#bodyContent { + font-size:0.9em; +} + +h1, h2, h3, h4, h5, h6 { + font-family: sans-serif; + padding-bottom:0.1em; + padding-top:0.5em; +} +h1 { + border-bottom:1px solid #AAAAAA; +} + +h1 { font-size: 188%; } +h2 { font-size: 150%; } +h3 { font-size: 132%; } +h4 { font-size: 116%; } +h5 { font-size: 100%; } +h6 { font-size: 80%; } + +#main { + width: 650px; + margin-top: 40px; + margin-left: auto ; + margin-right: auto ; + padding: 70px; + background-color: white; + border-radius: 1px; + -moz-border-radius: 1px; + box-shadow: 5px 5px rgba(0,0,0,0.3); + -webkit-box-shadow: 5px 5px rgba(0,0,0,0.3); + -moz-box-shadow: 5px 5px rgba(0,0,0,0.3); +} + +.GENTICS_link_error { + color: red; +} + +.GENTICS_link_warn { + color: orange; +} \ No newline at end of file diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/examples/AlohaLinkChecker.html b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/examples/AlohaLinkChecker.html new file mode 100644 index 00000000..cdc04556 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/examples/AlohaLinkChecker.html @@ -0,0 +1,82 @@ + + + + +Aloha, link checker! + + + + + + + + + + + + + +
+
+
+

Aloha

+

Etymology

+

The word aloha derives from the Proto-Polynesian root *qalofa. It has cognates in other Polynesian languages, such as Samoan alofa +and Māori aroha, also meaning "love."

+

invalid Aloha Editor is the word's most advanced browser based Editor made with aloha passion.

+

A folk etymology claims that it derives from a compound of the Hawaiian words alo meaning "presence", "front", "face", or "share"; and +ha, meaning "breath of life" or "essence of life." Although alo does indeed mean "presence" etc., the word for breath is spelled with a macron +or kahakō over the a (hā) whereas the word aloha does not have a long a.

+

Links are the web's Rocket Power.

+

Usage

+

Before contact with the West, the words used for greeting were welina and anoai. Today, "aloha kakahiaka" is the phrase for "good +morning." "Aloha ʻauinalā" means "good afternoon" and "aloha ahiahi" means "good evening." "Aloha kākou" is a common form of "welcome to all."

+

In modern Hawaiʻi, numerous businesses have aloha in their names, with more than 3 pages of listings in the Oʻahu phone book alone.

+

Trends

+

Recent trends are popularizing the term elsewhere in the United States. Popular entertainer, Broadway star and Hollywood actress Bette +Midler, born in Honolulu, uses the greeting frequently in national appearances. The word was also used frequently in the hit television drama +Hawaii Five-O. In the influential 1982 film comedy Fast Times at Ridgemont High, the eccentric teacher Mr. Hand makes use of the greeting. The +Aloha Spirit is a major concept in Lilo and Stitch, a very popular Disney series of movies and TV shows, set in Hawaiʻi. The drama series Lost, +shot in Hawaiʻi, has a thank you note at the end of the credits saying "We thank the people of Hawaiʻi and their Aloha Spirit". Aloha is a term +also used in the Nickelodeon program Rocket Power.

+
    +
  • Arguably the most famous historical Hawaiian song, "Aloha ʻOe" was written by the last queen of Hawaii, Liliʻuokalani.
  • +
  • The term inspired the name of the ALOHA Protocol introduced in the 1970s by the University of Hawaii.
  • +
  • In Hawaii someone can be said to have or show aloha in the way they treat others; whether family, friend, neighbor or stranger.
  • +
+
+
+
+ + \ No newline at end of file diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/i18n/en.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/i18n/en.dict new file mode 100644 index 00000000..1e2a22b5 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/i18n/en.dict @@ -0,0 +1,27 @@ + +error.0=An Error occurred checking this URL. +error.400=Bad Request. The request cannot be fulfilled due to bad syntax. +error.401=Unauthorized. Authentication has failed or not yet been provided. +error.402=Payment Required. +error.403=Forbidden. The request was a legal request, but the server is refusing to respond to it. +error.404=Not Found. The requested resource could not be found, but may be available in the future. +error.405=Method Not Allowed. +error.406=Not Acceptable. Your browser does not support the content. +error.407=Proxy Authentication Required. +error.408=Request Timeout. The server timed out waiting for the request. +error.409=Conflict in the request. +error.410=This resource is gone. +error.411=Length Required by server. This Link may work in the browsers. +error.412=Precondition Failed. This Link may work in the browsers. +error.413=Request Entity Too Large. The request is larger than the server is willing or able to process. +error.414=Request-URI Too Long. The URI provided was too long for the server to process. +error.415=Unsupported Media Type. The request entity has a media type which the server or resource does not support. +error.416=Requested Range Not Satisfiable. The client has asked for a portion of the file, but the server cannot supply that portion. +error.417=Expectation Failed. The server cannot meet the requirements of your browser. +error.418=I'm a teapot. ;-) +error.500=Internal Server Error. A generic error message, given when no more specific message is suitable. +error.501=Not Implemented. The server either does not recognise the request method, or it lacks the ability to fulfill the request. +error.502=Bad Gateway. The server was acting as a gateway or proxy and received an invalid response from the upstream server. +error.503=Service Unavailable. The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state. +error.504=Gateway Timeout. The server was acting as a gateway or proxy and did not receive a timely response from the upstream server. +error.505=HTTP Version Not Supported. The server does not support the HTTP protocol version used in the request. diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/plugin.js b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/plugin.js new file mode 100644 index 00000000..822ab18a --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/plugin.js @@ -0,0 +1,7 @@ +/* +* Aloha Editor +* Author & Copyright (c) 2010 Gentics Software GmbH +* aloha-sales@gentics.com +* Licensed unter the terms of http://www.aloha-editor.com/license.html +*/ +GENTICS.Aloha.LinkChecker=new GENTICS.Aloha.Plugin("com.gentics.aloha.plugins.LinkChecker");GENTICS.Aloha.LinkChecker.languages=["en"];GENTICS.Aloha.LinkChecker.errorCodes=[400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,500,501,502,503,504,505,506];GENTICS.Aloha.LinkChecker.warningCodes=[404,411,412,413,500,503,504,505];GENTICS.Aloha.LinkChecker.init=function(){this.proxyUrl=null;if(GENTICS.Aloha.LinkChecker.settings.proxyUrl!=undefined){this.proxyUrl=GENTICS.Aloha.LinkChecker.settings.proxyUrl}this.timer={};this.xhr={};var that=this;GENTICS.Aloha.EventRegistry.subscribe(GENTICS.Aloha,"editableActivated",function(jEvent,aEvent){aEvent.editable.obj.find("a").each(function(){that.checkLink(this,jQuery(this).attr("href"),0)})});GENTICS.Aloha.EventRegistry.subscribe(GENTICS.Aloha,"editableDeactivated",function(jEvent,aEvent){that.makeClean(aEvent.editable.obj)});GENTICS.Aloha.EventRegistry.subscribe(GENTICS.Aloha,"hrefChanged",function(jEvent,aEvent){that.checkLink(aEvent.obj,"hrefChanged")})};GENTICS.Aloha.LinkChecker.checkLink=function(obj,scope,delay,timeout){var that=this;var url=jQuery(obj).attr("href");var cleanUrl=url;if(typeof url=="string"&&!/^http/.test(url.toLowerCase())){this.makeCleanLink(obj);return}if(this.proxyUrl){url=this.proxyUrl+url}if(this.xhr[scope]){this.xhr[scope].abort();this.xhr[scope]=undefined}this.timer[scope]=this.urlExists(url,function(xhr){that.makeCleanLink(obj)},function(xhr){if(obj){if(jQuery.inArray(xhr.status,that.errorCodes)>=0){var e=xhr.status}else{var e="0"}var o=jQuery(obj);if(o.attr("title")&&!o.attr("data-invalid")){o.attr("data-title",o.attr("title"))}o.attr("data-invalid","true");o.attr("title",cleanUrl+". "+that.i18n("error."+e));if(jQuery.inArray(xhr.status,that.warningCodes)>=0){o.addClass("GENTICS_link_warn")}else{o.addClass("GENTICS_link_error")}}},scope,timeout,delay)};GENTICS.Aloha.LinkChecker.urlExists=function(url,successFunc,failureFunc,scope,timeout,delay){var that=this;clearTimeout(this.timer[scope]);delay=(delay!=null&&delay!=undefined)?delay:700;var newTimer=setTimeout(function(){that.xhr[scope]=jQuery.ajax({url:url,timeout:timeout?10000:timeout,type:"HEAD",complete:function(xhr){clearTimeout(newTimer);try{if(xhr.status<400){successFunc.call(this,xhr)}else{failureFunc.call(this,xhr)}}catch(e){failureFunc.call(this,{status:0})}}})},delay);return newTimer};GENTICS.Aloha.LinkChecker.makeCleanLink=function(obj){if(obj){var o=jQuery(obj);if(o.attr("data-title")){o.attr("title",o.attr("data-title"))}else{o.removeAttr("title")}o.removeAttr("data-title");o.removeAttr("data-invalid");o.removeClass("GENTICS_link_error");o.removeClass("GENTICS_link_warn")}};GENTICS.Aloha.LinkChecker.makeClean=function(editable){var that=this;editable.find("a").each(function(){that.makeCleanLink(this)})};GENTICS.Aloha.LinkChecker.urlencode=function(str){str=(str+"").toString();return encodeURIComponent(str).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A").replace(/%20/g,"+")}; \ No newline at end of file diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/proxy.php b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/proxy.php new file mode 100644 index 00000000..76208f9e --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.LinkChecker/proxy.php @@ -0,0 +1,235 @@ + 'X');}; + * https url example: https://google.com/adsense + * + */ + +// for debugging +//$_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.0'; +//$_SERVER['REQUEST_METHOD'] = 'HEAD'; +//error_reporting(E_ALL); + +$request = array( + 'method' => $_SERVER['REQUEST_METHOD'], + 'protocol' => $_SERVER['SERVER_PROTOCOL'], + 'headers' => getallheaders(), + //possibly use $HTTP_RAW_POST_DATA if available + 'payload' => http_build_query($_POST), +); + +// read url parameter +if (array_key_exists('url', $_GET)) { + $request['url'] = urldecode($_GET['url']); +} else { + header("HTTP/1.0 400 Bad Request"); + echo "Gentics AJAX Gateway failed because parameter url is missing."; + exit(); +} + +// check if link exists +$response = http_request($request); + +// Note HEAD does not always work even if specified... +// We use HEAD for Linkchecking so we do a 2nd request. +if (strtoupper($method) == 'HEAD' && (int)$response['status'] >= 400 ) { + + $request['method'] = 'GET'; + $response = http_request($request); + + //since we handle a HEAD, we don't need to proxy any contents + fclose($response['socket']); + $response['socket'] = null; +} + +// forward each returned header... +foreach ($response['headers'] as $key => $value) { + header("$key: $value"); +} + +//there is no need to specify a content length since we don't do keep +//alive, and this can cause problems for integration (e.g. gzip output, +//which would change the content length) +header('Content-Length:'); + +// output the contents if any +if (null !== $response['socket']) { + fpassthru($response['socket']); + fclose($response['socket']); +} + +exit; + +/** + * Query an HTTP(S) URL with the given request parameters and return the + * response headers and status code. The socket is returned as well and + * will point to the begining of the response payload (after all headers + * have been read), and must be closed with fclose(). + * @param $url the request URL + * @param $request the request method may optionally be overridden. + * @param $timeout connection and read timeout in seconds + */ +function http_request($request, $timeout = 5) { + + $url = $request['url']; + // Extract the hostname from url + $parts = parse_url($url); + if (array_key_exists('host', $parts)) { + $remote = $parts['host']; + } else { + return myErrorHandler("url ($url) has no host. Is it relative?"); + } + if (array_key_exists('port', $parts)) { + $port = $parts['port']; + } else { + $port = 0; + } + + // Beware that RFC2616 (HTTP/1.1) defines header fields as case-insensitive entities. + $request_headers = ""; + foreach ($request['headers'] as $name => $value) { + switch (strtolower($name)) { + //ommit some headers + case "keep-alive": + case "connection": + case "cookie": + //TPDP: we don't handle any compressions encodings. this is only + //a problem if client communication is already compressed (which + //would double compress the content, once from the remote server + //to us, and once from us to the client, but the client would + //de-compress only once). + case "accept-encoding": + break; + // correct the host parameter + case "host": + $host_info = $remote; + if ($port) { + $host_info .= ':' . $port; + } + $request_headers .= "$name: $host_info\r\n"; + break; + // forward all other headers + default: + $request_headers .= "$name: $value\r\n"; + break; + } + } + + //set fsockopen transport scheme, and the default port + switch (strtolower($parts['scheme'])) { + case 'https': + $scheme = 'ssl://'; + if ( ! $port ) $port = 443; + break; + case 'http': + $scheme = ''; + if ( ! $port ) $port = 80; + break; + default: + //some other transports are available but not really supported + //by this script: http://php.net/manual/en/transports.inet.php + $scheme = $parts['scheme'] . '://'; + if ( ! $port ) { + return myErrorHandler("Unknown scheme ($scheme) and no port."); + } + break; + } + + //we make the request with socket operations since we don't want to + //depend on the curl extension, and the higher level wrappers don't + //give us usable error information. + $sock = @fsockopen("$scheme$remote", $port, $errno, $errstr, $timeout); + if ( ! $sock ) { + return myErrorHandler("Unable to open URL ($url): $errstr"); + } + + //timeout in fsockopen is only for the connection, the following is + //for reading the content + stream_set_timeout($sock, $timeout); + + //absolute url should only be specified for proxy requests + if (array_key_exists('path', $parts)) { + $path_info = $parts['path']; + } else { + $path_info = '/'; + } + + if (array_key_exists('query', $parts)) $path_info .= '?' . $parts['query']; + if (array_key_exists('fragment', $parts)) $path_info .= '#' . $parts['fragment']; + + $out = $request["method"]." ".$path_info." ".$request["protocol"]."\r\n" + . $request_headers + . "Connection: Close\r\n\r\n"; + fwrite($sock, $out); + fwrite($sock, $request['payload']); + + $header_str = stream_get_line($sock, 1024*16, "\r\n\r\n"); + $headers = http_parse_headers($header_str); + + // get http status + preg_match('|HTTP/\d+\.\d+\s+(\d+)\s+.*|i',$headers[0],$match); + $status = $match[1]; + + return array('headers' => $headers, 'socket' => $sock, 'status' => $status); +} + +/** + * Parses a string containing multiple HTTP header lines into an array + * of key => values. + * Inspired by HTTP::Daemon (CPAN). + */ +function http_parse_headers($header_str) { + $headers = array(); + + //ignore leading blank lines + $header_str = preg_replace("/^(?:\x0D?\x0A)+/", '', $header_str); + + while (preg_match("/^([^\x0A]*?)\x0D?(?:\x0A|\$)/", $header_str, $matches)) { + $header_str = substr($header_str, strlen($matches[0])); + $header_line = $matches[1]; + + if (empty($headers)) { + // the status line + $headers[] = $header_line; + } + elseif (preg_match('/^([^:\s]+)\s*:\s*(.*)/', $header_line, $matches)) { + if (isset($key)) { + //previous header is finished (was potentially multi-line) + $headers[$key] = $val; + } + list(,$key,$val) = $matches; + } + elseif (preg_match('/^\s+(.*)/', $header_line, $matches)) { + //continue a multi-line header + $val .= " ".$matches[1]; + } + else { + //empty (possibly malformed) header signals the end of all headers + break; + } + } + if (isset($key)) { + $headers[$key] = $val; + } + return $headers; +} + +function myErrorHandler($msg) +{ + // 500 could be misleading... + // Should we return a special Error when a proxy error occurs? + header("HTTP/1.0 500 Internal Error"); + echo "Gentics Aloha Editor AJAX Gateway Error: $msg"; + exit(); +} + +//EOF diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List deleted file mode 160000 index ada3208a..00000000 --- a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ada3208a19a31251ad0a58f136bbb09fea68fd70 diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/de.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/de.dict new file mode 100644 index 00000000..cdd04e95 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/de.dict @@ -0,0 +1,2 @@ +button.createulist.tooltip=Unsortierte Liste einfügen +button.createolist.tooltip=Sortierte Liste einfügen diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/en.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/en.dict new file mode 100644 index 00000000..31847e05 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/en.dict @@ -0,0 +1,2 @@ +button.createulist.tooltip=Insert Unordered List +button.createolist.tooltip=Insert Ordered List diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/eo.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/eo.dict new file mode 100644 index 00000000..9542e0d4 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/eo.dict @@ -0,0 +1,2 @@ +button.createulist.tooltip=Enmeti senordan liston +button.createolist.tooltip=Enmeti ordan liston diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/fi.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/fi.dict new file mode 100644 index 00000000..deadc8f4 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/fi.dict @@ -0,0 +1,2 @@ +button.createulist.tooltip=Lisää järjestelemätön lista +button.createolist.tooltip=Lisää järjestelty lista diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/fr.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/fr.dict new file mode 100644 index 00000000..62568897 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/fr.dict @@ -0,0 +1,2 @@ +button.createulist.tooltip=Insérer une liste non ordonnée +button.createolist.tooltip=Insérer liste ordonnée diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/it.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/it.dict new file mode 100644 index 00000000..812df235 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/it.dict @@ -0,0 +1,2 @@ +button.createulist.tooltip=Inserisci una lista +button.createolist.tooltip=Inserisci una lista numerata diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/ru.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/ru.dict new file mode 100644 index 00000000..7b61c3bb --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/i18n/ru.dict @@ -0,0 +1,2 @@ +button.createulist.tooltip=Вставить Список +button.createolist.tooltip=Вставить Упорядоченный Список \ No newline at end of file diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/plugin.js b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/plugin.js new file mode 100644 index 00000000..b85d58c4 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.List/plugin.js @@ -0,0 +1,7 @@ +/* +* Aloha Editor +* Author & Copyright (c) 2010 Gentics Software GmbH +* aloha-sales@gentics.com +* Licensed unter the terms of http://www.aloha-editor.com/license.html +*/ +GENTICS.Aloha.ListPlugin=new GENTICS.Aloha.Plugin("com.gentics.aloha.plugins.List");GENTICS.Aloha.ListPlugin.languages=["en","de","fr","eo","fi","ru","it"];GENTICS.Aloha.ListPlugin.config=["ul","ol"];GENTICS.Aloha.ListPlugin.transformableElements={p:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,ul:true,ol:true};GENTICS.Aloha.ListPlugin.init=function(){var that=this;this.createUnorderedListButton=new GENTICS.Aloha.ui.Button({iconClass:"GENTICS_button GENTICS_button_ul",size:"small",tooltip:this.i18n("button.createulist.tooltip"),toggle:true,onclick:function(element,event){that.transformList(false)}});GENTICS.Aloha.FloatingMenu.addButton("GENTICS.Aloha.continuoustext",this.createUnorderedListButton,GENTICS.Aloha.i18n(GENTICS.Aloha,"floatingmenu.tab.format"),1);this.createOrderedListButton=new GENTICS.Aloha.ui.Button({iconClass:"GENTICS_button GENTICS_button_ol",size:"small",tooltip:this.i18n("button.createolist.tooltip"),toggle:true,onclick:function(element,event){that.transformList(true)}});GENTICS.Aloha.FloatingMenu.addButton("GENTICS.Aloha.continuoustext",this.createOrderedListButton,GENTICS.Aloha.i18n(GENTICS.Aloha,"floatingmenu.tab.format"),1);GENTICS.Aloha.EventRegistry.subscribe(GENTICS.Aloha,"selectionChanged",function(event,rangeObject){that.createUnorderedListButton.setPressed(false);that.createOrderedListButton.setPressed(false);for(var i=0;i"))){that.createUnorderedListButton.setPressed(true);break}if(GENTICS.Aloha.Selection.standardTextLevelSemanticsComparator(effectiveMarkup,jQuery("
    "))){that.createOrderedListButton.setPressed(true);break}}if(GENTICS.Aloha.activeEditable){that.applyButtonConfig(GENTICS.Aloha.activeEditable.obj)}GENTICS.Aloha.FloatingMenu.doLayout()});GENTICS.Aloha.Markup.addKeyHandler(9,function(event){return that.processTab(event)})};GENTICS.Aloha.ListPlugin.applyButtonConfig=function(obj){var config=this.getEditableConfig(obj);if(GENTICS.Aloha.Selection.rangeObject.unmodifiableMarkupAtStart[0]){if(jQuery.inArray("ul",config)!=-1&&GENTICS.Aloha.Selection.canTag1WrapTag2(GENTICS.Aloha.Selection.rangeObject.unmodifiableMarkupAtStart[0].nodeName,"ul")!=-1){this.createUnorderedListButton.show()}else{this.createUnorderedListButton.hide()}if(jQuery.inArray("ol",config)!=-1&&GENTICS.Aloha.Selection.canTag1WrapTag2(GENTICS.Aloha.Selection.rangeObject.unmodifiableMarkupAtStart[0].nodeName,"ol")!=-1){this.createOrderedListButton.show()}else{this.createOrderedListButton.hide()}}};GENTICS.Aloha.ListPlugin.processTab=function(event){switch(event.keyCode){case 9:if(event.shiftKey){return this.outdentList()}else{return this.indentList()}}return true};GENTICS.Aloha.ListPlugin.getStartingDomObjectToTransform=function(){var rangeObject=GENTICS.Aloha.Selection.rangeObject;for(var i=0;i

    "));domToTransform=this.getStartingDomObjectToTransform();if(!domToTransform){GENTICS.Aloha.Log.error(this,"Could not transform selection into a list");return}}var nodeName=domToTransform.nodeName.toLowerCase();if(nodeName=="ul"&&!ordered){var jqList=jQuery(domToTransform);var jqParentList=jqList.parent();if(jqParentList.length>0&&GENTICS.Utils.Dom.isListElement(jqParentList.get(0))){jqList.children().unwrap()}else{var jqToTransform=jQuery(domToTransform);jQuery.each(jqToTransform.children("li"),function(index,li){var newPara=GENTICS.Aloha.Markup.transformDomObject(li,"p");newPara.after(newPara.children("ol,ul"))});jqToTransform.children().unwrap()}}else{if(nodeName=="ul"&&ordered){GENTICS.Aloha.Markup.transformDomObject(domToTransform,"ol");this.mergeAdjacentLists(jQuery(domToTransform))}else{if(nodeName=="ol"&&!ordered){GENTICS.Aloha.Markup.transformDomObject(domToTransform,"ul");this.mergeAdjacentLists(jQuery(domToTransform))}else{if(nodeName=="ol"&&ordered){var jqList=jQuery(domToTransform);var jqParentList=jqList.parent();if(jqParentList.length>0&&GENTICS.Utils.Dom.isListElement(jqParentList.get(0))){jqList.children().unwrap()}else{var jqToTransform=jQuery(domToTransform);jQuery.each(jqToTransform.children("li"),function(index,li){var newPara=GENTICS.Aloha.Markup.transformDomObject(li,"p");newPara.after(newPara.children("ol,ul"))});jqToTransform.children().unwrap()}}else{var selectedSiblings=GENTICS.Aloha.Selection.rangeObject.getSelectedSiblings(domToTransform);var jqList=ordered?jQuery("
      "):jQuery("
        ");var jqNewLi=jQuery("
      • ");jqList.append(jqNewLi);jQuery(domToTransform).contents().appendTo(jqNewLi);jQuery(domToTransform).replaceWith(jqList);if(selectedSiblings){var lastLi=false;for(var i=0;i");jqList.append(lastLi)}lastLi.append(selectedSiblings[i])}}}this.mergeAdjacentLists(jqList)}}}}this.refreshSelection()};GENTICS.Aloha.ListPlugin.indentList=function(){var listItem=this.getNearestSelectedListItem();if(listItem){var jqItemBefore=jQuery(listItem).prev("li");if(jqItemBefore.length==0){return false}var jqOldList=jQuery(listItem).parent();var selectedSiblings=GENTICS.Aloha.Selection.rangeObject.getSelectedSiblings(listItem);var jqNewList=jQuery(listItem).parent().clone(false).empty();jqNewList.append(listItem);jqItemBefore.append(jqNewList);if(selectedSiblings){for(var i=0;i0&&GENTICS.Utils.Dom.isListElement(jqParentList.get(0))){var selectedSiblings=GENTICS.Aloha.Selection.rangeObject.getSelectedSiblings(listItem);if(selectedSiblings&&selectedSiblings.length>0){var lastSelected=jQuery(selectedSiblings[selectedSiblings.length-1])}else{var lastSelected=jqListItem}if(lastSelected.nextAll("li").length>0){var jqNewPostList=jqList.clone(false).empty();jqNewPostList.append(lastSelected.nextAll())}if(wrappingLi.length>0){if(typeof jqNewPostList!=="undefined"){jqListItem.append(jqNewPostList)}wrappingLi.after(jqListItem)}else{jqList.before(jqListItem)}if(selectedSiblings&&selectedSiblings.length>0){for(var i=selectedSiblings.length-1;i>=0;--i){jqListItem.after(jQuery(selectedSiblings[i]))}}if(jqList.contents("li").length==0){jqList.remove()}if(wrappingLi.length>0&&wrappingLi.contents().length==0){wrappingLi.remove()}this.refreshSelection()}return false}return true};GENTICS.Aloha.ListPlugin.refreshSelection=function(){if(GENTICS.Aloha.activeEditable){GENTICS.Aloha.activeEditable.obj[0].focus()}GENTICS.Aloha.Selection.rangeObject.update();GENTICS.Aloha.Selection.rangeObject.select();GENTICS.Aloha.Selection.updateSelection()};GENTICS.Aloha.ListPlugin.mergeAdjacentLists=function(jqList){var firstList=jqList.get(0);while(firstList.previousSibling&&firstList.previousSibling.nodeType==1&&firstList.previousSibling.nodeName==firstList.nodeName){firstList=firstList.previousSibling}jqList=jQuery(firstList);while(firstList.nextSibling&&((firstList.nextSibling.nodeType==1&&firstList.nextSibling.nodeName==firstList.nodeName)||(firstList.nextSibling.nodeType==3&&jQuery.trim(firstList.nextSibling.data).length==0))){var jqNextList=jQuery(firstList.nextSibling);if(firstList.nextSibling.nodeType==1){jqNextList.contents().appendTo(jqList)}jqNextList.remove()}}; \ No newline at end of file diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Paste b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Paste deleted file mode 160000 index 56665c88..00000000 --- a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Paste +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 56665c88d4195e303bac477a773e8fd76d5eb292 diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Paste/plugin.js b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Paste/plugin.js new file mode 100644 index 00000000..61a1c78d --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Paste/plugin.js @@ -0,0 +1,7 @@ +/* +* Aloha Editor +* Author & Copyright (c) 2010 Gentics Software GmbH +* aloha-sales@gentics.com +* Licensed unter the terms of http://www.aloha-editor.com/license.html +*/ +GENTICS.Aloha.PastePlugin=new GENTICS.Aloha.Plugin("com.gentics.aloha.plugins.Paste");GENTICS.Aloha.PastePlugin.pasteHandlers=[];GENTICS.Aloha.PastePlugin.init=function(){var that=this;this.pasteDiv=jQuery('
        ');this.pasteDiv.attr("contentEditable","true");jQuery("body").append(this.pasteDiv);GENTICS.Aloha.EventRegistry.subscribe(GENTICS.Aloha,"editableCreated",function(event,editable){if(jQuery.browser.msie){editable.obj.bind("beforepaste",function(event){that.redirectPaste()})}else{editable.obj.bind("paste",function(event){that.redirectPaste();window.setTimeout(function(){that.getPastedContent()},10)})}});if(jQuery.browser.msie){this.pasteDiv.bind("paste",function(event){window.setTimeout(function(){that.getPastedContent()},10)})}};GENTICS.Aloha.PastePlugin.redirectPaste=function(){this.currentRange=new GENTICS.Utils.RangeObject(true);this.currentEditable=GENTICS.Aloha.activeEditable;this.pasteDiv.text("");if(this.currentEditable){this.currentEditable.blur()}GENTICS.Utils.Dom.setCursorInto(this.pasteDiv.get(0));this.pasteDiv.focus()};GENTICS.Aloha.PastePlugin.getPastedContent=function(){var that=this;for(var i=0;i=0;--i){GENTICS.Utils.Dom.insertIntoDOM(jQuery(pasteDivContents.get(i)),that.currentRange,that.currentEditable.obj,false)}this.currentEditable.activate();this.currentEditable.obj.focus();if(pasteDivContents.length>0){GENTICS.Utils.Dom.setCursorAfter(pasteDivContents.get(pasteDivContents.length-1))}else{this.currentRange.select()}}this.currentRange=false;this.currentEditable=false;this.pasteDiv.text("")};GENTICS.Aloha.PastePlugin.register=function(pasteHandler){this.pasteHandlers.push(pasteHandler)};GENTICS.Aloha.PastePlugin.PasteHandler=function(){GENTICS.Aloha.PastePlugin.register(this)};GENTICS.Aloha.PastePlugin.PasteHandler.prototype.handlePaste=function(jqPasteDiv){}; \ No newline at end of file diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Paste/wordpastehandler.js b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Paste/wordpastehandler.js new file mode 100644 index 00000000..7436be39 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Paste/wordpastehandler.js @@ -0,0 +1,7 @@ +/* +* Aloha Editor +* Author & Copyright (c) 2010 Gentics Software GmbH +* aloha-sales@gentics.com +* Licensed unter the terms of http://www.aloha-editor.com/license.html +*/ +GENTICS.Aloha.PastePlugin.WordPasteHandler=new GENTICS.Aloha.PastePlugin.PasteHandler();GENTICS.Aloha.PastePlugin.WordPasteHandler.handlePaste=function(jqPasteDiv){if(this.detectWordContent(jqPasteDiv)){this.transformWordContent(jqPasteDiv)}};GENTICS.Aloha.PastePlugin.WordPasteHandler.detectWordContent=function(jqPasteDiv){var wordDetected=false;jqPasteDiv.find("*").each(function(){var style=jQuery(this).attr("style");if(style){if(style.toLowerCase().indexOf("mso")>=0){wordDetected=true;return false}}var clazz=jQuery(this).attr("class");if(clazz){if(clazz.toLowerCase().indexOf("mso")>=0){wordDetected=true;return false}}});return wordDetected};GENTICS.Aloha.PastePlugin.WordPasteHandler.isOrderedList=function(listSpan){if(listSpan.css("fontFamily")=="Wingdings"||listSpan.css("fontFamily")=="Symbol"){return false}return listSpan.text().match(/^([0-9]{1,3}\.)|([0-9]{1,3}\)|([a-zA-Z]{1,5}\.)|([a-zA-Z]{1,5}\)))$/)?true:false};GENTICS.Aloha.PastePlugin.WordPasteHandler.transformListsFromWord=function(jqPasteDiv){var that=this;var listElementClass="aloha-list-element";var bulletClass="aloha-list-bullet";var detectionFilter="p.MsoListParagraphCxSpFirst,p.MsoListParagraph,p span";var paragraphs=jqPasteDiv.find(detectionFilter);paragraphs.each(function(){var jqElem=jQuery(this);if(jqElem.hasClass("MsoListParagraphCxSpFirst")||jqElem.hasClass("MsoListParagraph")){jqElem.addClass(listElementClass)}else{if(jqElem.css("font-family").indexOf("Symbol")>=0){jqElem.closest("p").addClass(listElementClass)}else{if(jqElem.css("mso-list")!=""){jqElem.closest("p").addClass(listElementClass)}}}});detectionFilter="p span span span";var spans=jqPasteDiv.find(detectionFilter);spans.each(function(){var jqElem=jQuery(this);var innerText=jqElem.text().trim().replace(/ /g,"");if(innerText.length==0){var outerText=jqElem.parent().parent().text().trim().replace(/ /g,"");if(outerText.match(/^([0-9]{1,3}\.)|([0-9]{1,3}\)|([a-zA-Z]{1,5}\.)|([a-zA-Z]{1,5}\)))$/)){jqElem.closest("p").addClass(listElementClass);jqElem.parent().parent().addClass(bulletClass)}}});detectionFilter="p."+listElementClass;var negateDetectionFilter=":not("+detectionFilter+")";paragraphs=jqPasteDiv.find(detectionFilter);if(paragraphs.length>0){paragraphs.each(function(){var jqElem=jQuery(this);jqElem.removeClass(listElementClass);jqElem.find("font").each(function(){jQuery(this).contents().unwrap()});var nestLevel=0;var margin=parseFloat(jqElem.css("marginLeft"));var lists=[];var following=jqElem.nextUntil(negateDetectionFilter);var firstSpan=jQuery(jqElem.find("span."+bulletClass));if(firstSpan.length==0){firstSpan=jQuery(jqElem.children("span:first"))}var ordered=that.isOrderedList(firstSpan);firstSpan.remove();var jqList=jQuery(ordered?"
          ":"
            ");lists.push(jqList);var jqNewLi=jQuery("
          • ");jqList.append(jqNewLi);jqElem.contents().appendTo(jqNewLi);jqElem.replaceWith(jqList);following.each(function(){var jqElem=jQuery(this);jqElem.find("font").each(function(){jQuery(this).contents().unwrap()});var newMargin=parseFloat(jqElem.css("marginLeft"));firstSpan=jQuery(jqElem.find("span."+bulletClass));if(firstSpan.length==0){firstSpan=jQuery(jqElem.children("span:first"))}ordered=that.isOrderedList(firstSpan);firstSpan.remove();if(newMargin>margin){var jqNewList=jQuery(ordered?"
              ":"
                ");jqList.children(":last").append(jqNewList);jqList=jqNewList;lists.push(jqList);nestLevel++;margin=newMargin}else{if(newMargin0){lists.pop();nestLevel--;jqList=lists[nestLevel];margin=newMargin}}jqNewLi=jQuery("
              • ");jqList.append(jqNewLi);jqElem.contents().appendTo(jqNewLi);jqElem.remove()})})}};GENTICS.Aloha.PastePlugin.WordPasteHandler.transformTitles=function(jqPasteDiv){jqPasteDiv.find("p.MsoTitle").each(function(){GENTICS.Aloha.Markup.transformDomObject(jQuery(this),"h1")});jqPasteDiv.find("p.MsoSubtitle").each(function(){GENTICS.Aloha.Markup.transformDomObject(jQuery(this),"h2")})};GENTICS.Aloha.PastePlugin.WordPasteHandler.transformTables=function(jqPasteDiv){jqPasteDiv.find("table").each(function(){jQuery(this).removeAttr("border").removeAttr("cellspacing").removeAttr("cellpadding")});jqPasteDiv.find("td").each(function(){jQuery(this).removeAttr("width").removeAttr("height").removeAttr("valign")})};GENTICS.Aloha.PastePlugin.WordPasteHandler.transformFormattings=function(jqPasteDiv){jqPasteDiv.find("strong,em,s,u").each(function(){if(this.nodeName.toLowerCase()=="strong"){GENTICS.Aloha.Markup.transformDomObject(jQuery(this),"b")}else{if(this.nodeName.toLowerCase()=="em"){GENTICS.Aloha.Markup.transformDomObject(jQuery(this),"i")}else{if(this.nodeName.toLowerCase()=="s"){GENTICS.Aloha.Markup.transformDomObject(jQuery(this),"del")}else{if(this.nodeName.toLowerCase()=="u"){jQuery(this).contents().unwrap()}}}}})};GENTICS.Aloha.PastePlugin.WordPasteHandler.removeComments=function(jqPasteDiv){jqPasteDiv.contents().each(function(){if(this.nodeType==8){jQuery(this).remove()}})};GENTICS.Aloha.PastePlugin.WordPasteHandler.unwrapTags=function(jqPasteDiv){jqPasteDiv.find("span,font,div").each(function(){jQuery(this).contents().unwrap()})};GENTICS.Aloha.PastePlugin.WordPasteHandler.removeStyles=function(jqPasteDiv){jqPasteDiv.find("*").each(function(){jQuery(this).removeAttr("style").removeClass()})};GENTICS.Aloha.PastePlugin.WordPasteHandler.removeNamespacedElements=function(jqPasteDiv){jqPasteDiv.find("*").each(function(){var nsPrefix=this.prefix?this.prefix:(this.scopeName?this.scopeName:undefined);if(nsPrefix&&nsPrefix!="HTML"){jQuery(this).remove()}})};GENTICS.Aloha.PastePlugin.WordPasteHandler.transformWordContent=function(jqPasteDiv){this.transformListsFromWord(jqPasteDiv);this.transformTables(jqPasteDiv);this.transformTitles(jqPasteDiv);this.removeComments(jqPasteDiv);this.unwrapTags(jqPasteDiv);this.removeStyles(jqPasteDiv);this.removeNamespacedElements(jqPasteDiv);this.transformFormattings(jqPasteDiv)}; \ No newline at end of file diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.TOC b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.TOC deleted file mode 160000 index 7d622b36..00000000 --- a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.TOC +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7d622b36dc1501f993f39e74649fef64c403ba67 diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.TOC/i18n/de.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.TOC/i18n/de.dict new file mode 100644 index 00000000..0158dfaf --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.TOC/i18n/de.dict @@ -0,0 +1 @@ +button.addtoc.tooltip=Inhaltsverzeichnis \ No newline at end of file diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.TOC/i18n/en.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.TOC/i18n/en.dict new file mode 100644 index 00000000..bf726d64 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.TOC/i18n/en.dict @@ -0,0 +1 @@ +button.addtoc.tooltip=Table of contents \ No newline at end of file diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.TOC/plugin.js b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.TOC/plugin.js new file mode 100644 index 00000000..cb4eb1f1 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.TOC/plugin.js @@ -0,0 +1 @@ +(function(){var deps=GENTICS.Aloha.TOC||{jQuery:jQuery},$=deps.jQuery;function last(a){return a[a.length-1]}function head(a){return a[0]}function tail(a){return a.slice(1)}function indexOf(a,item){return detect(a,function(cmp){return cmp===item})}function detect(a,f){for(var i=0;i").attr("id",id).attr("contentEditable","false");var range=GENTICS.Aloha.Selection.getRangeObject();var tocEditable=GENTICS.Aloha.activeEditable;var $tocContainer=$(document.getElementById(tocEditable.getId()));GENTICS.Utils.Dom.insertIntoDOM($tocElement,range,$tocContainer);TOC.create(id).register($containers).update().tickTock()};TOC.spawn=function($ctx,$containers){$ctx=$ctx||$("body");$containers=$containers||TOC.editableContainers();$ctx.find("ol.toc_root").each(function(){var id=$(this).attr("id");if(!id){id=TOC.generateId("toc");$(this).attr("id",id)}TOC.create(id).register($containers).tickTock()})};TOC.create=function(id){allTocs.push(this);return{id:id,"$containers":$(),root:function(){return $(document.getElementById(this.id))},register:function($containers){var self=this;self.$containers=self.$containers.add($containers);self.$containers.filter(function(){return !$(this).data(namespace+"."+self.id+".listening")}).each(function(){var $container=$(this);$container.data(namespace+"."+self.id+".listening",true);$container.bind("blur",function(){self.cleanupIds($container.get(0));self.update($container)})});return self},tickTock:function(interval){var self=this;interval=interval||TOC.settings.updateInterval;if(!interval){return}window.setInterval(function(){self.register(TOC.editableContainers());self.update()},interval);return self},cleanupIds:function(ctx){var ids=[];TOC.headings(this.$containers).each(function(){var id=$(this).attr("id");if((id&&-1!=$.inArray(id,ids))||(ctx&&($.contains(ctx,this)||ctx===this))){$(this).attr("id",TOC.generateId(this))}ids.push(id)});return this},update:function($ctx){var self=this;$ctx=$ctx||self.$containers;var outline=TOC.outline(self.$containers);var ancestors=[self.root()];var prevSiblings=[];last(ancestors).empty();(function descend(outline){var prevSiblings=[];each(outline,function(node){var $section=head(node);var $entry=self.linkSection($section,ancestors,prevSiblings);ancestors.push($entry);descend(tail(node));ancestors.pop();prevSiblings.push($entry)})})(tail(outline));var minEntries=self.root().attr("data-TOC-minEntries")||TOC.settings.minEntries;if(self.root().find("li").length>=minEntries){self.root().show()}else{self.root().hide()}return this},linkSection:function($section,ancestors,prevSiblings){var linkId=$section.eq(0).attr("id");if(!linkId){linkId=TOC.generateId($section.get(0));$section.eq(0).attr("id",linkId)}var $root=this.root();var $entry=TOC.anchorFromLinkId($root,linkId);if(!$entry.length){$entry=$("
              • ")}$entry.find("a").attr("href","#"+linkId).text($section.eq(0).text());if(last(prevSiblings)){last(prevSiblings).after($entry)}else{if(last(ancestors).get(0)==$root.get(0)){$root.append($entry)}else{var $subToc=$("
                  ").append($entry);last(ancestors).append($subToc)}}return $entry}}}}()); \ No newline at end of file diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table deleted file mode 160000 index e7153647..00000000 --- a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e71536475f32b7ee191087f76c2d7acbadad14be diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/de.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/de.dict new file mode 100644 index 00000000..4c6c0b0d --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/de.dict @@ -0,0 +1,14 @@ +floatingmenu.tab.table=Tabelle +deleterows.confirm=Wollen Sie die ausgewählten Zeilen wirklich löschen? +deletecolumns.confirm=Wollen Sie die ausgewählten Spalten wirklich löschen? +deletetable.confirm=Wollen Sie wirklich die ganze Tabelle löschen? +Table=Tabelle +button.createtable.tooltip=Tabelle einfügen +button.addcolleft.tooltip=Spalte links einfügen +button.addcolright.tooltip=Spalte rechts einfügen +button.delcols.tooltip=Spalten löschen +button.addrowbefore.tooltip=Zeile darüber einfügen +button.addrowafter.tooltip=Zeile darunter einfügen +button.delrows.tooltip=Zeilen löschen +button.caption.tooltip=Tabellen Bezeichnung +empty.caption=Tabellen Bezeichnung \ No newline at end of file diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/en.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/en.dict new file mode 100644 index 00000000..5a4bf517 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/en.dict @@ -0,0 +1,14 @@ +floatingmenu.tab.table=Table +deleterows.confirm=Do you really want to delete the selected rows? +deletecolumns.confirm=Do you really want to delete the selected columns? +deletetable.confirm=Do you really want to delete the table? +Table=Table +button.createtable.tooltip=Insert Table +button.addcolleft.tooltip=Add Column left +button.addcolright.tooltip=Add Column right +button.delcols.tooltip=Delete Columns +button.addrowbefore.tooltip=Add Row before +button.addrowafter.tooltip=Add Row after +button.delrows.tooltip=Delete Rows +button.caption.tooltip=Table caption +empty.caption=Table caption \ No newline at end of file diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/eo.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/eo.dict new file mode 100644 index 00000000..c387eb7c --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/eo.dict @@ -0,0 +1,12 @@ +floatingmenu.tab.table=Tabelo +deleterows.confirm=u vi vere volas vii la elektitajn vicojn? +deletecolumns.confirm=u vi vere volas vii la elektitajn kolumnojn? +deletetable.confirm=u vi vere volas forvii la tabelon? +Table=Tabelo +button.createtable.tooltip=Enmeti tabelon +button.addcolleft.tooltip=Aldoni kolumnon maldekstre +button.addcolright.tooltip=Aldoni kolumnon dekstre +button.delcols.tooltip=Forvii kolumnojn +button.addrowbefore.tooltip=Aldoni vicon antae +button.addrowafter.tooltip=Aldoni vicon poste +button.delrows.tooltip=Forvii vicojn \ No newline at end of file diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/fi.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/fi.dict new file mode 100644 index 00000000..92b60250 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/fi.dict @@ -0,0 +1,12 @@ +floatingmenu.tab.table=Taulukko +deleterows.confirm=Oletko varma että haluat poistaa valitut rivit? +deletecolumns.confirm=Oletko varma että haluat poistaa valitut sarakkeet? +deletetable.confirm=Oletko varma että haluat poistaa taulukon? +Table=Taulukko +button.createtable.tooltip=Lisää taulukko +button.addcolleft.tooltip=Lisää sarake vasemmalle +button.addcolright.tooltip=Lisää sarake oikealle +button.delcols.tooltip=Poista sarakkeet +button.addrowbefore.tooltip=Lisää rivi ennen +button.addrowafter.tooltip=Lisää rivi jälkeen +button.delrows.tooltip=Poista rivit diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/fr.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/fr.dict new file mode 100644 index 00000000..c6386740 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/fr.dict @@ -0,0 +1,12 @@ +floatingmenu.tab.table=Table +deleterows.confirm=Voulez-vous vraiment supprimer les lignes sélectionnées ? +deletecolumns.confirm=Voulez-vous vraiment supprimer les colonnes sélectionnées ? +deletetable.confirm=Voulez-vous vraiment supprimer la table ? +Table=Tableau +button.createtable.tooltip=Insérer un tableau +button.addcolleft.tooltip=Ajouter une colonne à gauche +button.addcolright.tooltip=Ajouter Colonne à droite +button.delcols.tooltip=Colonnes Supprimer +button.addrowbefore.tooltip=Ajouter une ligne avant +button.addrowafter.tooltip=Ajouter une ligne après +button.delrows.tooltip=supprimer des lignes \ No newline at end of file diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/it.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/it.dict new file mode 100644 index 00000000..d357c633 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/it.dict @@ -0,0 +1,12 @@ +floatingmenu.tab.table=Tabella +deleterows.confirm=Vuoi davvero eliminare le righe selezionate? +deletecolumns.confirm=Vuoi davvero eliminare le colonne selezionate? +deletetable.confirm=Vuoi davvero eliminare la tabella? +Table=Tabella +button.createtable.tooltip=Crea una nuova tabella +button.addcolleft.tooltip=Aggiungi una colonna a sinistra +button.addcolright.tooltip=Aggiungi una colonna a destra +button.delcols.tooltip=Elimina colonne +button.addrowbefore.tooltip=Aggiungi una riga prima +button.addrowafter.tooltip=Aggiungi una riga dopo +button.delrows.tooltip=Elimina righe diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/pl.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/pl.dict new file mode 100644 index 00000000..b0741378 --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/pl.dict @@ -0,0 +1,12 @@ +floatingmenu.tab.table=Tabela +deleterows.confirm=Czy na pewno chcesz usunąć zaznaczone wiersze? +deletecolumns.confirm=Czy na pewno chcesz usunąć zaznaczone kolumny? +deletetable.confirm=Czy na pewno chcesz usunąć tabelę? +Table=Tabela +button.createtable.tooltip=Wstaw tabelę +button.addcolleft.tooltip=Dodaj kolumnę na lewo +button.addcolright.tooltip=Dodaj kolumnę na prawo +button.delcols.tooltip=Usuń kolumny +button.addrowbefore.tooltip=Dodaj wiersz przed +button.addrowafter.tooltip=Dodaj wiersz po +button.delrows.tooltip=Usuń wiersze diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/ru.dict b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/ru.dict new file mode 100644 index 00000000..21e82f7a --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/i18n/ru.dict @@ -0,0 +1,12 @@ +floatingmenu.tab.table=Таблица +deleterows.confirm=Вы действительно хотите удалить выбранные строки? +deletecolumns.confirm=Вы действительно хотите удалить выбранные колонки? +deletetable.confirm=Вы действительно хотите удалить таблицу? +Table=Таблица +button.createtable.tooltip=Вставить Таблицу +button.addcolleft.tooltip=Добавить колонку слева +button.addcolright.tooltip=Добавить колонку справа +button.delcols.tooltip=Удалить Колонки +button.addrowbefore.tooltip=Удалить пердыдущую строку +button.addrowafter.tooltip=Удалть следующую строку +button.delrows.tooltip=Удалить Строки diff --git a/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/plugin.js b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/plugin.js new file mode 100644 index 00000000..4146ff0f --- /dev/null +++ b/public/javascripts/admin/aloha/plugins/com.gentics.aloha.plugins.Table/plugin.js @@ -0,0 +1,7 @@ +/* +* Aloha Editor +* Author & Copyright (c) 2010 Gentics Software GmbH +* aloha-sales@gentics.com +* Licensed unter the terms of http://www.aloha-editor.com/license.html +*/ +GENTICS.Aloha.TablePlugin=new GENTICS.Aloha.Plugin("com.gentics.aloha.plugins.Table");GENTICS.Aloha.TablePlugin.createLayer=undefined;GENTICS.Aloha.TablePlugin.languages=["en","de","fr","eo","fi","ru","it","pl"];GENTICS.Aloha.TablePlugin.config=["table"];GENTICS.Aloha.TablePlugin.TableRegistry=new Array();GENTICS.Aloha.TablePlugin.activeTable=undefined;GENTICS.Aloha.TablePlugin.parameters={className:"GENTICS_Aloha_Table",classSelectionRow:"GENTICS_Aloha_Table_selectColumn",classSelectionColumn:"GENTICS_Aloha_Table_selectRow",classLeftUpperCorner:"GENTICS_Aloha_Table_leftUpperCorner",classTableWrapper:"GENTICS_Aloha_Table_wrapper",classCellSelected:"GENTICS_Aloha_Cell_selected",waiRed:"GENTICS_WAI_RED",waiGreen:"GENTICS_WAI_GREEN",selectionArea:10};GENTICS.Aloha.TablePlugin.init=function(){this.createLayer=new GENTICS.Aloha.Table.CreateLayer();var that=this;GENTICS.Aloha.EventRegistry.subscribe(GENTICS.Aloha,"editableCreated",function(event,editable){editable.obj.bind("mousedown",function(jqEvent){GENTICS.Aloha.TablePlugin.setFocusedTable(undefined)});editable.obj.find("table").each(function(){if(that.isEditableTable(this)){var table=new GENTICS.Aloha.Table(this);table.parentEditable=editable;GENTICS.Aloha.TablePlugin.TableRegistry.push(table)}})});this.initTableButtons();GENTICS.Aloha.EventRegistry.subscribe(GENTICS.Aloha,"selectionChanged",function(event,rangeObject){if(GENTICS.Aloha.activeEditable){var config=that.getEditableConfig(GENTICS.Aloha.activeEditable.obj);if(jQuery.inArray("table",config)!=-1&&GENTICS.Aloha.Selection.mayInsertTag("table")){that.createTableButton.show()}else{that.createTableButton.hide()}GENTICS.Aloha.TableHelper.unselectCells();var table=rangeObject.findMarkup(function(){return this.nodeName.toLowerCase()=="table"},GENTICS.Aloha.activeEditable.obj);if(table){GENTICS.Aloha.FloatingMenu.setScope(that.getUID(GENTICS.Aloha.TableHelper.selectionType))}else{if(that.activeTable){that.activeTable.focusOut()}}GENTICS.Aloha.FloatingMenu.doLayout()}});GENTICS.Aloha.EventRegistry.subscribe(GENTICS.Aloha,"editableActivated",function(event,props){props.editable.obj.find("table").each(function(){var tr=GENTICS.Aloha.TablePlugin.TableRegistry;for(var i=0;i");that.activeTable.obj.append(c);that.makeCaptionEditable(c,captionText);var cDiv=c.find("div").eq(0);var captionContent=cDiv.contents().eq(0);if(captionContent.length>0){var newRange=new GENTICS.Utils.RangeObject();newRange.startContainer=newRange.endContainer=captionContent.get(0);newRange.startOffset=0;newRange.endOffset=captionContent.text().length;that.activeTable.obj.find("div.GENTICS_Table_Cell_editable").blur();cDiv.focus();newRange.select();GENTICS.Aloha.Selection.updateSelection()}}}}});GENTICS.Aloha.FloatingMenu.addButton(this.getUID("cell"),this.captionButton,GENTICS.Aloha.i18n(this,"floatingmenu.tab.table"),1);this.summary=new GENTICS.Aloha.ui.AttributeField({width:350});this.summary.addListener("keyup",function(obj,event){that.activeTable.checkWai()});GENTICS.Aloha.FloatingMenu.addButton(this.getUID("cell"),this.summary,GENTICS.Aloha.i18n(this,"floatingmenu.tab.table"),1)};GENTICS.Aloha.TablePlugin.makeCaptionEditable=function(caption,captionText){var that=this;var cSpan=caption.children("div").eq(0);if(cSpan.length==0){cSpan=jQuery("
                  ");if(caption.contents().length>0){caption.contents().wrap(cSpan)}else{if(captionText){cSpan.text(captionText)}caption.append(cSpan)}}cSpan.contentEditable(true);cSpan.unbind("mousedown");cSpan.bind("mousedown",function(jqEvent){cSpan.focus();jqEvent.preventDefault();jqEvent.stopPropagation();return false})};GENTICS.Aloha.TablePlugin.createDialog=function(callingElement){this.createLayer.set("target",callingElement);this.createLayer.show()};GENTICS.Aloha.TablePlugin.createTable=function(cols,rows){if(GENTICS.Aloha.activeEditable!=null&&typeof GENTICS.Aloha.activeEditable.obj!="undefined"){var table=document.createElement("table");var tableId=table.id=GENTICS.Aloha.TableHelper.getNewTableID();var tbody=document.createElement("tbody");for(var i=0;i0&&GENTICS.Aloha.TableHelper.selectedCells[0].length>0){GENTICS.Aloha.TableHelper.selectedCells[0][0].firstChild.focus()}}});this.obj.bind("mousedown",function(jqEvent){if(!that.hasFocus){that.focus()}jqEvent.stopPropagation();jqEvent.preventDefault();return false});var tableWrapper=jQuery('
                  ');tableWrapper.contentEditable(false);this.obj.wrap(tableWrapper);var htmlTableWrapper=this.obj.parents("."+this.get("classTableWrapper"));htmlTableWrapper.get(0).onresizestart=function(e){return false};htmlTableWrapper.get(0).oncontrolselect=function(e){return false};this.tableWrapper=this.obj.parents("."+this.get("classTableWrapper")).get(0);jQuery(this.cells).each(function(){this.activate()});this.attachSelectionColumn();this.attachSelectionRow();this.attachLastCellEvents();this.makeCaptionEditable();this.checkWai();this.isActive=true;GENTICS.Aloha.EventRegistry.trigger(new GENTICS.Aloha.Event("tableActivated",GENTICS.Aloha,[this]))};GENTICS.Aloha.Table.prototype.makeCaptionEditable=function(){var caption=this.obj.find("caption").eq(0);if(caption){GENTICS.Aloha.TablePlugin.makeCaptionEditable(caption)}};GENTICS.Aloha.Table.prototype.checkWai=function(){var w=this.wai;w.removeClass(this.get("waiGreen"));w.removeClass(this.get("waiRed"));if(this.obj[0].summary.length>5){w.addClass(this.get("waiGreen"))}else{w.addClass(this.get("waiRed"))}};GENTICS.Aloha.Table.prototype.attachSelectionColumn=function(){var emptyCell=jQuery("");emptyCell.html("\u00a0");var that=this;var rows=this.obj.context.rows;for(var i=0;i=0){this.rowsToSelect.splice(arrayIndex,1)}else{this.rowsToSelect.push(this.clickedRowId)}}else{if(jqEvent.shiftKey){this.rowsToSelect.sort(function(a,b){return a-b});var start=this.rowsToSelect[0];var end=this.clickedRowId;if(start>end){start=end;end=this.rowsToSelect[0]}this.rowsToSelect=new Array();for(var i=start;i<=end;i++){this.rowsToSelect.push(i)}}else{this.rowsToSelect=[this.clickedRowId]}}this.selectRows();jqEvent.preventDefault();jqEvent.stopPropagation();return false};GENTICS.Aloha.Table.prototype.rowSelectionMouseOver=function(jqEvent){var rowIndex=jqEvent.currentTarget.parentNode.rowIndex;if(this.mousedown&&this.clickedRowId>=0){var indexInArray=jQuery.inArray(rowIndex,this.rowsToSelect);var start=(rowIndex");emptyCell.html("\u00a0");var numColumns=this.obj.context.rows[0].cells.length;var selectionRow=jQuery("");selectionRow.addClass(this.get("classSelectionRow"));selectionRow.css("height",this.get("selectionArea")+"px");for(var i=0;i0){this.attachColumnSelectEventsToCell(columnToInsert)}else{var columnToInsert=jQuery("").clone();columnToInsert.addClass(this.get("classLeftUpperCorner"));this.wai=jQuery("
                  ");this.wai.width(25);this.wai.height(12);this.wai.click(function(e){that.focus();GENTICS.Aloha.FloatingMenu.userActivatedTab=GENTICS.Aloha.TablePlugin.i18n("floatingmenu.tab.table");GENTICS.Aloha.FloatingMenu.doLayout();GENTICS.Aloha.TablePlugin.summary.focus();e.stopPropagation();e.preventDefault();return false});columnToInsert.append(this.wai)}selectionRow.append(columnToInsert)}jQuery(document).bind("mouseup",function(e){that.mousedown=false;that.clickedColumnId=-1;that.clickedRowId=-1});this.obj.find("tr:first").before(selectionRow)};GENTICS.Aloha.Table.prototype.attachColumnSelectEventsToCell=function(cell){var that=this;cell.unbind("mousedown");cell.unbind("mouseover");cell.get(0).onselectstart=function(){return false};cell.bind("mousedown",function(e){that.mousedown=true;that.columnSelectionMouseDown(e)});cell.bind("mouseover",function(e){if(that.mousedown){that.columnSelectionMouseOver(e)}})};GENTICS.Aloha.Table.prototype.columnSelectionMouseDown=function(jqEvent){this.focus();if(GENTICS.Aloha.TableHelper.selectedCells.length==0){this.columnsToSelect=new Array()}this.clickedColumnId=jqEvent.currentTarget.cellIndex;if(jqEvent.metaKey){var arrayIndex=jQuery.inArray(this.clickedColumnId,this.columnsToSelect);if(arrayIndex>=0){this.columnsToSelect.splice(arrayIndex,1)}else{this.columnsToSelect.push(this.clickedColumnId)}}else{if(jqEvent.shiftKey){this.columnsToSelect.sort(function(a,b){return a-b});var start=this.columnsToSelect[0];var end=this.clickedColumnId;if(start>end){start=end;end=this.columnsToSelect[0]}this.columnsToSelect=new Array();for(var i=start;i<=end;i++){this.columnsToSelect.push(i)}}else{this.columnsToSelect=[this.clickedColumnId]}}this.selectColumns();jqEvent.preventDefault();jqEvent.stopPropagation();return false};GENTICS.Aloha.Table.prototype.columnSelectionMouseOver=function(jqEvent){var colIndex=jqEvent.currentTarget.cellIndex;if(this.mousedown&&this.clickedColumnId>0){var indexInArray=jQuery.inArray(colIndex,this.columnsToSelect);var start=(colIndex0){for(var i=0;i(this.numRows-rowIDs.length)){focusRowId--}this.releaseLastCellEvents();var rows=this.obj.find("tr");var rows2delete=new Array();for(var i=0;i0){for(var i=0;i(this.numCols-colIDs.length)){focusColID--}this.releaseLastCellEvents();var rows=this.obj.find("tr");var cols2delete=new Array();for(var i=0;i=0){this.deactivate();GENTICS.Aloha.TableHelper.selectionType=undefined;GENTICS.Aloha.TablePlugin.TableRegistry.splice(i,1);var newRange=GENTICS.Aloha.Selection.rangeObject;newRange.startContainer=newRange.endContainer=this.obj.get(0).parentNode;newRange.startOffset=newRange.endOffset=GENTICS.Utils.Dom.getIndexInParent(this.obj.get(0).parentNode);newRange.clearCaches();this.obj.remove();this.parentEditable.obj.focus();newRange.correctRange();newRange.select()}};GENTICS.Aloha.Table.prototype.addRowsBefore=function(highlightNewRows){this.addRows("before",highlightNewRows)};GENTICS.Aloha.Table.prototype.addRowsAfter=function(highlightNewRows){this.addRows("after",highlightNewRows)};GENTICS.Aloha.Table.prototype.addRows=function(position,highlightNewRows){if(typeof GENTICS.Aloha.TablePlugin.activeTable!="undefined"){this.releaseLastCellEvents();var that=this;var numCols=this.numCols;var rowsToInsert=1;var rowId=1;if(GENTICS.Aloha.TableHelper.selectedCells.length>0){rowsToInsert=GENTICS.Aloha.TableHelper.selectedCells.length;switch(position){case"before":if(GENTICS.Aloha.TableHelper.selectedCells[0].length){rowId=GENTICS.Aloha.TableHelper.selectedCells[0][0].parentNode.rowIndex}break;case"after":var lastRow=GENTICS.Aloha.TableHelper.selectedCells.length-1;if(GENTICS.Aloha.TableHelper.selectedCells[lastRow].length){rowId=GENTICS.Aloha.TableHelper.selectedCells[lastRow][0].parentNode.rowIndex}break}}else{if(typeof GENTICS.Aloha.Table.Cell.lastActiveCell!="undefined"){rowId=GENTICS.Aloha.Table.Cell.lastActiveCell.obj.context.parentNode.rowIndex}}var newRowIndex=rowId;if(position=="after"){newRowIndex+=1}var rowIdArray=new Array();for(var j=0;j");var selectionColumn=jQuery("");selectionColumn.addClass(this.get("classSelectionColumn"));this.attachRowSelectionEventsToCell(selectionColumn);insertionRow.append(selectionColumn);for(i=0;i");newCol.html("\u00a0");var cell=new GENTICS.Aloha.Table.Cell(newCol.get(0),GENTICS.Aloha.TablePlugin.activeTable);cell.activate();this.cells.push(cell);insertionRow.append(cell.obj)}var currentRow=jQuery(GENTICS.Aloha.TablePlugin.activeTable.obj.find("tr").get(rowId));switch(position){case"before":currentRow.before(insertionRow);break;case"after":currentRow.after(insertionRow);break;default:this.warn(this,"Wrong call of GENTICS.Aloha.Table.prototype.addRow!")}newRowIndex++;this.numRows++}GENTICS.Aloha.TableHelper.unselectCells();this.rowsToSelect=rowIdArray;if(highlightNewRows){this.selectRows()}this.attachLastCellEvents()}};GENTICS.Aloha.Table.prototype.addColumnsRight=function(){this.addColumns("right")};GENTICS.Aloha.Table.prototype.addColumnsLeft=function(){this.addColumns("left")};GENTICS.Aloha.Table.prototype.addColumns=function(position){if(typeof GENTICS.Aloha.TablePlugin.activeTable!="undefined"){this.releaseLastCellEvents();var that=this;var columnsToInsert=1;var colId=1;if(GENTICS.Aloha.TableHelper.selectedCells.length>0){columnsToInsert=GENTICS.Aloha.TableHelper.selectedCells[0].length;switch(position){case"left":if(GENTICS.Aloha.TableHelper.selectedCells[0].length){colId=GENTICS.Aloha.TableHelper.selectedCells[0][0].cellIndex}break;case"right":var lastColumn=GENTICS.Aloha.TableHelper.selectedCells[0].length-1;if(GENTICS.Aloha.TableHelper.selectedCells[0].length){colId=GENTICS.Aloha.TableHelper.selectedCells[0][lastColumn].cellIndex}break}}else{if(typeof GENTICS.Aloha.Table.Cell.lastActiveCell!="undefined"){colId=GENTICS.Aloha.Table.Cell.lastActiveCell.obj.context.cellIndex}}var newColId=colId;var emptyCell=jQuery("");var rows=this.obj.find("tr");var colIdArray=new Array();for(var i=0;i");var wrapper=this.obj.children("div").eq(0);wrapper.contentEditable(true);wrapper.addClass("GENTICS_Table_Cell_editable");var that=this;wrapper.bind("focus",function(jqEvent){if(jqEvent.currentTarget){jqEvent.currentTarget.indexOf=function(){return -1}}that.editableFocus(jqEvent)});wrapper.bind("mousedown",function(jqEvent){if(jqEvent.currentTarget){jqEvent.currentTarget.indexOf=function(){return -1}}that.editableMouseDown(jqEvent)});wrapper.bind("blur",function(jqEvent){that.editableBlur(jqEvent)});wrapper.bind("keyup",function(jqEvent){that.editableKeyUp(jqEvent)});wrapper.bind("keydown",function(jqEvent){that.editableKeyDown(jqEvent)});wrapper.GENTICS_contentEditableSelectionChange(function(event){GENTICS.Aloha.Selection.onChange(wrapper,event);return wrapper});this.obj.bind("mousedown",function(jqEvent){setTimeout(function(){that.wrapper.trigger("focus")},1);GENTICS.Aloha.TableHelper.unselectCells();jqEvent.stopPropagation()});this.obj.get(0).onselectstart=function(jqEvent){return false};this.wrapper=this.obj.children();this.wrapper.get(0).onselectstart=function(){window.event.cancelBubble=true};return this};GENTICS.Aloha.Table.Cell.prototype.deactivate=function(){var wrapper=this.obj.children(".GENTICS_Table_Cell_editable");if(wrapper.length){var innerHtml=wrapper.html();wrapper.unbind();wrapper.remove();this.obj.unbind("click");if(GENTICS.Aloha.trim(this.obj.attr("class"))==""){this.obj.removeAttr("class")}this.obj.html(innerHtml)}};GENTICS.Aloha.Table.Cell.prototype.toString=function(){return"GENTICS.Aloha.Table.Cell"};GENTICS.Aloha.Table.Cell.prototype.selectAll=function(editableNode){var e=(editableNode.jquery)?editableNode.get(0):editableNode;if(!jQuery.browser.msie){var s=window.getSelection();if(s.setBaseAndExtent){s.setBaseAndExtent(e,0,e,e.innerText.length-1)}else{if(window.opera&&e.innerHTML.substring(e.innerHTML.length-4)=="
                  "){e.innerHTML=e.innerHTML+" "}var r=document.createRange();r.selectNodeContents(e);s.removeAllRanges();s.addRange(r)}}else{if(document.getSelection){var s=document.getSelection();var r=document.createRange();r.selectNodeContents(e);s.removeAllRanges();s.addRange(r)}else{if(document.selection){var r=document.body.createTextRange();r.moveToElementText(e);r.select()}}}GENTICS.Aloha.Selection.updateSelection(editableNode)};GENTICS.Aloha.Table.Cell.prototype.editableMouseDown=function(jqEvent){GENTICS.Aloha.TableHelper.unselectCells();if(this.tableObj.hasFocus){jqEvent.stopPropagation()}};GENTICS.Aloha.Table.Cell.prototype.editableKeyUp=function(jqEvent){this.checkForEmptyEvent(jqEvent)};GENTICS.Aloha.Table.Cell.prototype.editableKeyDown=function(jqEvent){this.checkForEmptyEvent(jqEvent);if(!jqEvent.ctrlKey&&!jqEvent.shiftKey){if(GENTICS.Aloha.TableHelper.selectedCells.length>0&&GENTICS.Aloha.TableHelper.selectedCells[0].length>0){GENTICS.Aloha.TableHelper.selectedCells[0][0].firstChild.focus();GENTICS.Aloha.TableHelper.unselectCells();jqEvent.stopPropagation()}}else{if(jqEvent.shiftKey&&GENTICS.Aloha.TableHelper.selectedCells.length>0){var KEYCODE_ARROWLEFT=37;var KEYCODE_ARROWUP=38;var KEYCODE_ARROWRIGHT=39;var KEYCODE_ARROWDOWN=40;switch(GENTICS.Aloha.TableHelper.selectionType){case"row":switch(jqEvent.keyCode){case KEYCODE_ARROWUP:var firstSelectedRow=GENTICS.Aloha.TableHelper.selectedCells[0][0].parentNode.rowIndex;if(firstSelectedRow>1){this.tableObj.rowsToSelect.push(firstSelectedRow-1)}break;case KEYCODE_ARROWDOWN:var lastRowIndex=GENTICS.Aloha.TableHelper.selectedCells.length-1;var lastSelectedRow=GENTICS.Aloha.TableHelper.selectedCells[lastRowIndex][0].parentNode.rowIndex;if(lastSelectedRow1){this.tableObj.columnsToSelect.push(firstColSelected-1)}break;case KEYCODE_ARROWRIGHT:var lastColIndex=GENTICS.Aloha.TableHelper.selectedCells[0].length-1;var lastColSelected=GENTICS.Aloha.TableHelper.selectedCells[0][lastColIndex].cellIndex;if(lastColSelected0){return}var text=this.wrapper.text();if(text==""){this.wrapper.text("\u00a0");this.wrapper.get(0).blur();this.wrapper.get(0).focus()}};GENTICS.Aloha.Table.CreateLayer=function(){};GENTICS.Aloha.Table.CreateLayer.prototype.parameters={elemId:"GENTICS_Aloha_Table_createLayer",className:"GENTICS_Table_Createdialog",numX:10,numY:10,layer:undefined,target:undefined};GENTICS.Aloha.Table.CreateLayer.prototype.config=new Object();GENTICS.Aloha.Table.CreateLayer.prototype.visible=false;GENTICS.Aloha.Table.CreateLayer.prototype.show=function(){var layer=this.get("layer");if(layer==null){this.create()}else{this.setPosition(layer);layer.find("td").removeClass("hover");layer.show()}this.visible=true};GENTICS.Aloha.Table.CreateLayer.prototype.create=function(){var that=this;var layer=jQuery("
                  ");layer.id=this.get("elemId");layer.addClass(this.get("className"));var table=jQuery("
                  ");table.css("width",(this.get("numX")+6)*15);var tr;var td;for(var i=0;i");for(var j=0;j\u00a0");if(i==0&&j==0){td.addClass("hover")}td.bind("mouseover",{rowId:i,colId:j},function(e){that.handleMouseOver(e,table)});td.bind("click",{rowId:i,colId:j},function(e){var rows=e.data.rowId+1;var cols=e.data.colId+1;GENTICS.Aloha.TablePlugin.createTable(cols,rows);that.hide()});tr.append(td)}table.append(tr)}layer.append(table);this.set("layer",layer);this.setPosition();layer.bind("click",function(e){e.stopPropagation()}).mousedown(function(e){e.stopPropagation()});jQuery("body").append(layer).bind("click",function(e){if(e.target!=that.get("target")&&that.visible){that.hide()}})};GENTICS.Aloha.Table.CreateLayer.prototype.handleMouseOver=function(e,table){var rowId=e.data.rowId;var colId=e.data.colId;var innerRows=table.find("tr");for(var n=0;n<=innerRows.length;n++){var innerCells=jQuery(innerRows[n]).find("td");for(var k=0;k<=innerCells.length;k++){if(n<=rowId&&k<=colId){jQuery(innerCells[k]).addClass("hover")}else{jQuery(innerCells[k]).removeClass("hover")}}}};GENTICS.Aloha.Table.CreateLayer.prototype.setPosition=function(){var targetObj=jQuery(this.get("target"));var pos=targetObj.offset();this.get("layer").css("left",pos.left+"px");this.get("layer").css("top",(pos.top+targetObj.height())+"px")};GENTICS.Aloha.Table.CreateLayer.prototype.hide=function(){this.get("layer").hide();this.visible=false};GENTICS.Aloha.Table.CreateLayer.prototype.get=function(property){if(this.config[property]){return this.config[property]}if(this.parameters[property]){return this.parameters[property]}return undefined};GENTICS.Aloha.Table.CreateLayer.prototype.set=function(key,value){if(this.config[key]){this.config[key]=value}else{this.parameters[key]=value}};GENTICS.Aloha.TableHelper=function(){};GENTICS.Aloha.TableHelper.prototype.selectionType=undefined;GENTICS.Aloha.TableHelper.prototype.selectedCells=new Array();GENTICS.Aloha.TableHelper.prototype.unselectCells=function(){if(this.selectedCells.length>0){for(var i=0;i