diff --git a/app/assets/stylesheets/admin/admin.scss b/app/assets/stylesheets/admin/admin.scss
index 4e20dde..f726386 100644
--- a/app/assets/stylesheets/admin/admin.scss
+++ b/app/assets/stylesheets/admin/admin.scss
@@ -2575,5 +2575,3 @@ h1, h2, h3, h4, h5, h6 {
-
-
diff --git a/app/assets/stylesheets/public/public.scss b/app/assets/stylesheets/public/public.scss
index 262f7f5..6864de6 100644
--- a/app/assets/stylesheets/public/public.scss
+++ b/app/assets/stylesheets/public/public.scss
@@ -8,321 +8,340 @@
*= require_tree .
*/
+
body {
padding: 0px;
margin: 0px;
font-size: 14px;
font-family: "trebuchet MS";
- color:#604435; }
- body a img {
- border: 0px; }
- body a {
+ color: #604435;
+ a {
+ img {
+ border: 0px; }
color: RGB(129, 178, 11);
- text-decoration: none; }
- body a:hover {
- text-decoration: underline; }
- body #public #menu_left h3 a {
- color: inherit; }
- body #public #menu_left ul {
- list-style: none;
- padding-left: 0px; }
- body #public #menu_left ul ul {
- padding-left: 20px; }
- body #public h1, body #public h2, body #public h3, body #public h4, body #public h5, body #public h6 {
- font-family: Georgia;
- font-weight: normal;
- margin-top: 0px; }
- body #public .menu a {
- color: RGB(100, 74, 60);
text-decoration: none;
- padding: 5px; }
- body #public .menu a:hover {
- text-decoration: underline; }
- body #public .menu a.selected {
- font-weight: bold; }
- body #public #header {
- width: 960px;
- margin: auto; }
- body #public #header #logo {
- padding: 10px 10px 10px 0px; }
- body #public #header #menu_top {
- float: right;
- margin-top: 40px; }
- body #public #bandeau {
- background: RGB(91, 67, 46);
- padding: 10px;
- width: 940px;
- margin: auto;
- margin-bottom: 10px;
- color: RGB(238, 238, 238);
- font-family: Georgia;
- font-size: 25px; }
- body #public #slider {
- position: relative;
- width: 979px;
- height: 309px;
- padding: 0px;
- margin: auto;
- margin-bottom: 10px;
- }
- body #public #slider .slide {
- background-image: url("/images/front/fond-marron.png");
- background-repeat: no-repeat;
- background-position: center center;
-
-
- width: 969px;
- height: 309px;
+ &:hover {
+ text-decoration: underline; } }
+ #public {
+ #menu_left {
+ h3 a {
+ color: inherit; }
+ ul {
+ list-style: none;
+ padding-left: 0px;
+ ul {
+ padding-left: 20px; } } }
+ h1, h2, h3, h4, h5, h6 {
+ font-family: Georgia;
+ font-weight: normal;
+ margin-top: 0px; }
+ .menu a {
+ color: RGB(100, 74, 60);
+ text-decoration: none;
+ padding: 5px;
+ &:hover {
+ text-decoration: underline; }
+ &.selected {
+ font-weight: bold; } }
+ #header {
+ width: 960px;
+ margin: auto;
+ #logo {
+ padding: 10px 10px 10px 0px; }
+ #menu_top {
+ float: right;
+ margin-top: 40px; } }
+ #bandeau {
+ background: RGB(91, 67, 46);
+ padding: 10px;
+ width: 940px;
+ margin: auto;
+ margin-bottom: 10px;
+ color: RGB(238, 238, 238);
+ font-family: Georgia;
+ font-size: 25px; }
+ #slider {
position: relative;
- margin: 0px 5px 0px 5px; }
- body #public #slider .slide a {
- color: inherit;
- text-decoration: inherit; }
-
- body #public #slider .slide a{
- color: #eeeeee;
- }
- body #public #slider .slide a:hover{
- text-decoration:none;
- }
- body #public #slider .slide .title {
- width: 486px;
- height: 46px;
- background-image: url("/images/front/en-tete-gris.png");
- background-repeat: no-repeat;
+ width: 960px;
+ height: 309px;
+ padding: 0px;
+ margin: auto;
+ margin-bottom: 10px;
+ .slide {
+ background: #6d563e;
+ width: 960px;
+ height: 309px;
+ position: relative;
+ margin: 0px 5px 0px 5px;
+ border-radius:10px;
+ -moz-border-radius:10px;
+ a {
+ color: inherit;
+ text-decoration: inherit;
+ color: #eeeeee;
+ &:hover {
+ text-decoration: none; } }
+ .title {
+ width: 448px;
+ height: 46px;
+ background:#f2f2f2;
+border:1px solid #42210b;
+ position: absolute;
+ top: 35px;
+ left: 0px;
+ z-index: 100;
+ color: #32180A;
+ font-family: Georgia;
+ padding: 10px 10px 10px 45px;
+ font-size: 19px; }
+ .cible {
+ position: absolute;
+ bottom: 30px;
+ left: 410px; }
+ .description {
+ position: absolute;
+ top: 120px;
+ left: 40px;
+ width: 470px;
+ height: 125px;
+ color: #eeeeee; }
+ .image_file {
+ position: absolute;
+ top: 20px;
+ right: 40px;
+ width: 415px;
+ height: 275px;
+ overflow: hidden;
+ img {
+ width: 415px; } }
+ .title a {
+ color: #32180A; } }
+ .left-arrow {
position: absolute;
- top: 35px;
- left: -5px;
- z-index: 100;
- color: #32180A;
- font-family: Georgia;
- padding: 10px 10px 10px 45px;
- font-size: 19px; }
- body #public #slider .slide .cible {
+ z-index: 150;
+ top: 140px;
+ left: 15px;
+ cursor: pointer; }
+ .right-arrow {
position: absolute;
- bottom: 30px;
- left: 410px; }
- body #public #slider .slide .description {
+ z-index: 150;
+ top: 140px;
+ right: 15px;
+ cursor: pointer; } }
+ #main {
+ width: 960px;
+ margin: auto;
+ margin-bottom: 10px;
+ a {
+ color: #604435;
+ text-decoration: none; }
+ .title {
+ font-family: georgia;
+ font-size: 18px;
+ text-align: center; }
+ .description {
+ text-align: justify; }
+ .column {
+ float: left;
+ min-height: 340px;
+ width: 319px;
+ border-left: 1px solid RGB(222, 236, 189);
+ position: relative;
+ .title {
+ min-height: 55px; } }
+ .column_1 {
+ border-left: 1px solid white; }
+ .column_2 {
+ padding: 10px;
+ width: 299px;
+ border-left: 1px solid white; }
+ .column_3 {
+ padding: 10px;
+ width: 299px; }
+ .column_2 .cible, .column_3 .cible {
position: absolute;
- top: 120px;
- left: 40px;
- width: 470px;
- height: 125px;
- color: #eeeeee; }
- body #public #slider .slide .image_file {
- position: absolute;
- top: 20px;
- right: 40px;
- width: 415px;
- height: 275px;
- overflow: hidden; }
- body #public #slider .slide .image_file img {
- width: 415px; }
+ bottom: 10px;
+ right: 20px; } }
+ #contact_block {
- body #public #slider .slide .title a{
- color: #32180A;
+ border: 1px solid #93c01f;
+ border-radius:10px;
+ -moz-border-radius:10px;
+ .content {
+ padding: 5px;
+ a{
+
+ text-decoration:underline;
+ &:hover{
+ color: #93c01f !important;
+ }
+ }
+}
+ .header {
+ padding: 5px;
+ font-family: georgia;
+ font-size: 18px;
+ color: white;
+ background: #93c01f;
+ &:first-child{
+ border-radius:9px 9px 0px 0px;
+ -moz-border-radius:9px 9px 0px 0px;
}
+
- body #public #slider .left-arrow {
- position: absolute;
- z-index: 150;
- top: 140px;
- left: 15px;
- cursor: pointer; }
- body #public #slider .right-arrow {
- position: absolute;
- z-index: 150;
- top: 140px;
- right: 15px;
- cursor: pointer; }
- body #public #main {
- width: 960px;
- margin: auto;
- margin-bottom: 10px; }
- body #public #main a {
- color: #604435;
- text-decoration: none; }
- body #public #main .title {
- font-family: georgia;
- font-size: 18px;
- text-align: center; }
- body #public #main .description {
- text-align: justify; }
- body #public #main .column {
- float: left;
- min-height: 340px;
- width: 319px;
- border-left: 1px solid RGB(222, 236, 189);
- position: relative; }
- body #public #main .column .title {
- min-height: 55px; }
- body #public #main .column_1 {
- border-left: 1px solid white; }
- body #public #main .column_2 {
- padding: 10px;
- width: 299px;
- border-left: 1px solid white; }
- body #public #main .column_3 {
- padding: 10px;
- width: 299px; }
- body #public #main .column_2 .cible, body #public #main .column_3 .cible {
- position: absolute;
- bottom: 10px;
- right: 20px; }
- body #public #contact_block {
- height: 360px;
- width: 319px;
- background-image: url("/images/front/fond-vert.png");
- background-repeat: no-repeat;
- position: relative;
- left: -2px; }
- body #public #contact_block .content {
- color: RGB(76, 42, 15);
- width: 297px; }
- body #public #contact_block #horaires {
- position: absolute;
- top: 20px;
- left: 20px; }
- body #public #contact_block #garde {
- position: absolute;
- top: 130px;
- left: 20px; }
- body #public #contact_block #contact {
- position: absolute;
- top: 210px;
- left: 20px; }
- body .clear {
+
+ }
+ } }
+ .clear {
clear: both; }
- body .promotion {
+ .promotion {
position: relative;
border: 1px dotted black;
margin-bottom: 10px;
- margin-left: 10px; }
- body .promotion .img {
+ margin-left: 10px;
+
+ .img {
margin: 10px;
- float: left; }
- body .promotion .img img {
- width: 120px; }
- body .promotion .label {
+ float: left;
+ img {
+ width: 120px; } }
+ .label {
position: absolute;
top: -10px;
left: -5px; }
- body .promotion .title, body .promotion .description {
+ .title, .description {
margin-left: 120px; }
- body .promotion .title {
+ .title {
margin-top: 10px;
font-family: georgia;
font-size: 18px; }
- body .promotion .description {
+ .description {
margin-top: 5px;
text-align: justify;
- padding: 0px 20px 0px 20px; }
- body .promotion .description p {
- margin: 0px; }
- body #home_promotions {
+ padding: 0px 20px 0px 20px;
+ p {
+ margin: 0px; } } }
+ #home_promotions {
width: 960px;
- margin: auto; }
- body #home_promotions .column {
- float: left;
+ margin: auto;
+ #promotions_header{
+ background: #6d563e;
+ font-family: georgia;
+ font-size: 18px;
+ color: white;
+ padding:10px;
+ margin-bottom:20px;
+ border-radius:10px;
+ -moz-border-radius:10px;
+
+ }
+ .column {
+ border-radius:10px;
+ -moz-border-radius:10px;
+
+ float: left;
min-height: 300px;
- width: 319px;
+ width: 310px;
border-left: 1px solid RGB(222, 236, 189);
position: relative;
- background-image: url("/images/front/cadre-gris.png");
- background-repeat: no-repeat;
- background-position: center top;
- text-align: center; }
- body #home_promotions .column .img {
- margin-top: 20px; }
- body #home_promotions .column .img img {
- height: 160px; }
- body #home_promotions .column .label {
+ margin-right:10px;
+ text-align: center;
+ .img {
+ margin-top: 20px;
+ img {
+ height: 160px; } }
+ .label {
position: absolute;
top: -10px;
left: -5px; }
- body #home_promotions .column .title {
+ .title {
+ background: #6d563e;
+ color:white;
+ padding:5px;
margin-top: 10px;
font-family: georgia;
- font-size: 18px; }
- body #home_promotions .column .description {
+ font-size: 18px;
+ a{
+ color:white !important;
+ }
+ }
+
+ .description {
margin-top: 5px;
text-align: justify;
- padding: 0px 20px 0px 20px; }
- body #home_promotions .column .description p {
- margin: 0px; }
- body #home_promotions .column_1 {
- border-left: 1px solid white; }
- body #home_promotions .column_2 {
- border-left: 1px solid white; }
- body #home_promotions .column_3 {
- border-left: 1px solid white; }
- body #page_main {
+ padding: 0px 20px 0px 20px;
+ p {
+ margin: 0px; } } }
+ .column_1, .column_2, .column_3 {
+ border: 1px solid #6d563e; }
+ .column_3 {
+ margin-right:0px ;}
+}
+ #page_main {
width: 960px;
- margin: auto; }
- body #page_main #sidebar {
+ margin: auto;
+ #sidebar {
float: left;
width: 240px;
position: relative;
min-height: 400px; }
- body #page_main #content {
+ #content {
float: left;
- width: 720px; }
- body #menu_bottom {
+ width: 720px; } }
+ #menu_bottom {
margin: auto;
width: 960px;
margin-top: 20px;
- margin-bottom: 20px; }
- body #menu_bottom #left_bottom {
+ margin-bottom: 20px;
+ #left_bottom {
float: left; }
- body #menu_bottom #right_bottom {
- float: right; }
- body .article {
+ #right_bottom {
+ float: right; } }
+ .article {
border: 1px solid RGB(129, 178, 11);
padding: 10px;
- margin-bottom: 10px; }
- body .article h3 {
+ margin-bottom: 10px;
+ h3 {
color: RGB(129, 178, 11); }
- body .article .image_file {
+ .image_file {
float: left;
margin-right: 10px; }
- body .article .title, body .article .description {
+ .title, .description {
margin-left: 130px; }
- body .article .title a, body .article .description a {
- color: #604435;
- text-decoration: none; }
- body .folder {
+ .title a, .description a {
+ color: #604435;
+ text-decoration: none; } }
+ .folder {
border: 1px solid RGB(91, 67, 46);
padding: 10px;
- margin-bottom: 10px; }
- body .folder h3 {
+ margin-bottom: 10px;
+ h3 {
color: RGB(91, 67, 46); }
- body .folder .image_file {
+ .image_file {
float: left;
margin-right: 10px; }
- body .folder .title, body .folder .description {
+ .title, .description {
margin-left: 130px; }
- body .folder .title a, body .folder .description a {
- color: #604435;
- text-decoration: none; }
-#flash_notice{
- border:3px solid #6bb800;
- padding:10px;
-
-}
+ .title a, .description a {
+ color: #604435;
+ text-decoration: none; } } }
+#flash_notice {
+ border: 3px solid #6bb800;
+ padding: 10px; }
#home_promotions a {
- color: #604435;
- text-decoration: #604435; }
-.portlet.table_content table {
-width: 100%;
-border-collapse: collapse; }
-.portlet.table_content table td {
-border: 1px solid black; }
-
-.portlet.block_content .two_column .column {
-float: left;
-width: 50%; }
-.portlet.block_content .two_column .column .block {
-padding: 10px; }
+ color: #604435;
+ text-decoration: #604435; }
+.portlet {
+ &.table_content table {
+ width: 100%;
+ border-collapse: collapse;
+ td {
+ border: 1px solid black; } }
+ &.block_content .two_column .column {
+ float: left;
+ width: 50%;
+ .block {
+ padding: 10px; } } }
diff --git a/app/controllers/public/prescriptions_controller.rb b/app/controllers/public/prescriptions_controller.rb
index 24082df..329c647 100644
--- a/app/controllers/public/prescriptions_controller.rb
+++ b/app/controllers/public/prescriptions_controller.rb
@@ -13,7 +13,8 @@ class Public::PrescriptionsController < ApplicationController
@title = @menu_item.name
if @prescription.save
-
+ Notification.prescription_received.deliver
+
redirect_to "/pages/ordonnances.html", :notice => "Nous avons bien enregistré votre demande, celle-ci sera traitée dans les meilleurs délais. Nous vous informerons par téléphone de la date à laquelle vous pourrez venir chercher votre commande à la pharmacie."
else
render :template => "public/menu_items/show"
diff --git a/app/mailers/notification.rb b/app/mailers/notification.rb
new file mode 100644
index 0000000..00fc7d9
--- /dev/null
+++ b/app/mailers/notification.rb
@@ -0,0 +1,15 @@
+class Notification < ActionMailer::Base
+ default :from => "admin@pharmacieboissier.com"
+
+ # Subject can be set in your I18n file at config/locales/en.yml
+ # with the following lookup:
+ #
+ # en.notification.prescription_received.subject
+ #
+ def prescription_received
+ mail(:to => "info@pharmacieboissier.com ", :subject => "Nouvelle ordonnance reçu.") do |format|
+
+ format.html { render :inline => "Une nouvelle ordonnance à été reçu sur le site de la pharmacie." }
+ end
+ end
+end
diff --git a/app/views/layouts/admin.html.haml b/app/views/layouts/admin.html.haml
index 3cda90e..791fa17 100644
--- a/app/views/layouts/admin.html.haml
+++ b/app/views/layouts/admin.html.haml
@@ -6,16 +6,23 @@
%title
Administration
-
+ :javascript
+ GENTICS_Aloha_base = "/aloha/"
+
= csrf_meta_tag
-
=javascript_include_tag "/assets/javascripts/core/jquery-1.6.1.min.js"
- =javascript_include_tag "/assets/javascripts/core/jquery-ui.min.js"
+
=javascript_include_tag "/assets/javascripts/core/jquery.reject.min.js"
=javascript_include_tag "/assets/javascripts/core/rails.js"
+
+
+
+
+ =javascript_include_tag "/assets/javascripts/core/jquery-ui.min.js"
+
=javascript_include_tag "/assets/javascripts/core/jcarousellite_1.0.1.min.js"
=javascript_include_tag "/assets/javascripts/core/jquery.easing.compatibility.js"
=javascript_include_tag "/assets/javascripts/core/jquery.prettyPhoto.js"
@@ -24,6 +31,8 @@
=javascript_include_tag "/assets/javascripts/core/jquery.fileupload-ui.js"
=javascript_include_tag "/assets/javascripts/core/tiny_mce/jquery.tinymce.js"
+
+
=javascript_include_tag '/assets/javascripts/admin/admin'
=javascript_include_tag '/assets/javascripts/admin/pane_hover'
=javascript_include_tag '/assets/javascripts/admin/menu_items'
@@ -51,8 +60,6 @@
-
-
diff --git a/app/views/portlets/dynamic_contents/_formulaire_ordonnances.html.haml b/app/views/portlets/dynamic_contents/_formulaire_ordonnances.html.haml
index 08b87f6..3b28423 100644
--- a/app/views/portlets/dynamic_contents/_formulaire_ordonnances.html.haml
+++ b/app/views/portlets/dynamic_contents/_formulaire_ordonnances.html.haml
@@ -5,15 +5,18 @@
%h2 Etape 1 : Vos coordonnées
%table
%tr
- %td
+ %td{:style => "width:100px"}
Nom * :
%td
=form.text_field :name
+ %td
+ Merci de spécifier votre nom exact.
%tr
%td
Téléphone * :
%td
=form.text_field :tel
+ %td Merci de spécifier un numéro de téléphone exact où nous pourrons vous joindre dans la journée afin de vous prévenir de la disponibilité de votre commande.
%h2 Etape 2 : Votre demande
%p.infos Si vous disposez d'un scanner vous pouvez nous envoyer directement un scan de votre ordonnance au format image (jpg ou png) en utilisant le champ suivant :
%table
@@ -26,10 +29,10 @@
%p Notes :
%p=form.text_area :notes, :style => "width:100%;"
- %h2 Valider votre demande
+ %h2 Validez votre demande
%p.infos
- Une fois que vous avez remplit les champs précédent vous pouvez nous envoyer votre ordonnance en cliquant sur le bouton ci-dessous.
+ Une fois que vous avez rempli les champs précédents vous pouvez nous envoyer votre ordonnance en cliquant sur le bouton ci-dessous.
%br
%br
- Nous vous appelerons dès que votre commande sera prête ou vous indiquer la date de livraison prévue.
+ Nous vous appellerons dès que votre commande sera prête ou pour vous indiquer la date de livraison prévue.
=form.submit "Envoyer mon ordonnance"
\ No newline at end of file
diff --git a/app/views/portlets/dynamic_contents/_promotions-list.html.haml b/app/views/portlets/dynamic_contents/_promotions-list.html.haml
index ea715ad..e2a6ac6 100644
--- a/app/views/portlets/dynamic_contents/_promotions-list.html.haml
+++ b/app/views/portlets/dynamic_contents/_promotions-list.html.haml
@@ -1,6 +1,8 @@
-%h2 Hygiène
-=render(:partial => "public/promotions/promotion", :collection => Promotion.where(:promotion_type_id => 1).order("month ASC, title ASC"))
%h2 Cosmétiques
=render(:partial => "public/promotions/promotion", :collection => Promotion.where(:promotion_type_id => 2).order("month ASC, title ASC"))
+
%h2 Bébés
-=render(:partial => "public/promotions/promotion", :collection => Promotion.where(:promotion_type_id => 3).order("month ASC, title ASC"))
\ No newline at end of file
+=render(:partial => "public/promotions/promotion", :collection => Promotion.where(:promotion_type_id => 3).order("month ASC, title ASC"))
+
+%h2 Hygiène
+=render(:partial => "public/promotions/promotion", :collection => Promotion.where(:promotion_type_id => 1).order("month ASC, title ASC"))
diff --git a/app/views/public/folders/show.html.haml b/app/views/public/folders/show.html.haml
index dbb9688..33bedbb 100644
--- a/app/views/public/folders/show.html.haml
+++ b/app/views/public/folders/show.html.haml
@@ -17,7 +17,7 @@
=@folder.title
=render @folder.block
- %h2 Tout les articles du dossier
+ %h2 Tous les articles du dossier
-@folder.articles.each do |article|
.article
.image_file
diff --git a/app/views/public/home/_slide.html.haml b/app/views/public/home/_slide.html.haml
index 9ecb0bf..8eb28d9 100644
--- a/app/views/public/home/_slide.html.haml
+++ b/app/views/public/home/_slide.html.haml
@@ -1,4 +1,4 @@
-%li#slide.slide{:id => slide.id, :style => "width:969px;height:309px;"}
+%li#slide.slide{:id => slide.id, :style => "width:960px;height:309px;"}
.title
=link_to slide.title, (slide.cible ? slide.cible.url : "") if slide.image_file
diff --git a/app/views/public/home/show.html.haml b/app/views/public/home/show.html.haml
index 75fdc7c..b6871a1 100644
--- a/app/views/public/home/show.html.haml
+++ b/app/views/public/home/show.html.haml
@@ -47,6 +47,8 @@
.clear
#home_promotions
+ #promotions_header
+ Promotions
.column_1.column
-if @home.promotion_1
diff --git a/app/views/public/shared/_contact_block.html.haml b/app/views/public/shared/_contact_block.html.haml
index ad4b92b..1030fb1 100644
--- a/app/views/public/shared/_contact_block.html.haml
+++ b/app/views/public/shared/_contact_block.html.haml
@@ -1,6 +1,8 @@
#contact_block
+ .header
+ Horaires d'ouverture
#horaires.content
- Horaire d'ouverture pour cette semaine :
+ Horaires d'ouverture pour cette semaine :
%br
-if (Date.today.cweek).to_i%2 == 0
=render :partial => "/public/shared/odd"
@@ -35,12 +37,17 @@
=link_to "- consultez la liste des pharmacie de garde", "/pages/infos-utiles/pharmacies-gardes.html"
%br
="- appelez le 3915"
+ .header
+ Coordonnées
#contact.content
- 63 route du Plan
+ 63 rue du Plan
%br
38140 RIVES
%br
%br
+ =link_to "Plan d'accès", "/pages/infos-utiles.html"
+ %br
+ %br
info@pharmacieboissier.com
%br
%br
diff --git a/public/aloha/VERSION.txt b/public/aloha/VERSION.txt
new file mode 100644
index 0000000..05d805d
--- /dev/null
+++ b/public/aloha/VERSION.txt
@@ -0,0 +1,2 @@
+0.9.3
+2010-11-26 12:56:25
\ No newline at end of file
diff --git a/public/aloha/aloha-nodeps.js b/public/aloha/aloha-nodeps.js
new file mode 100644
index 0000000..a474770
--- /dev/null
+++ b/public/aloha/aloha-nodeps.js
@@ -0,0 +1,185 @@
+/*
+* This file is part of Aloha Editor
+* Author & Copyright (c) 2010 Gentics Software GmbH, aloha@gentics.com
+* Licensed unter the terms of http://www.aloha-editor.com/license.html
+*/
+jQuery.fn.between=function(content,offset){if(this[0].nodeType!==3){if(offset>this.children().size()){offset=this.children().size()}if(offset<=0){this.prepend(content)}else{this.children().eq(offset-1).after(content)}}else{if(offset<=0){this.before(content)}else{if(offset>=this[0].length){this.after(content)}else{var fullText=this[0].data;this[0].data=fullText.substring(0,offset);this.after(fullText.substring(offset,fullText.length));this.after(content)}}}};jQuery.fn.removeCss=function(cssName){return this.each(function(){var oldstyle=jQuery(this).attr("style");var style=jQuery.grep(jQuery(this).attr("style").split(";"),function(curStyleAttr){var curStyleAttrName=curStyleAttr.split(":");if(curStyleAttrName[0]){if(curStyleAttrName[0].toUpperCase().trim().indexOf(cssName.toUpperCase())==-1){return curStyleAttr}}}).join(";").trim();jQuery(this).removeAttr("style");if(style.trim()){jQuery(this).attr("style",style)}return jQuery(this)})};jQuery.fn.contentEditable=function(b){var ce="contenteditable";if(jQuery.browser.msie&&parseInt(jQuery.browser.version)==7){ce="contentEditable"}if(b==undefined){return jQuery(this).attr(ce)}else{if(b===""){jQuery(this).removeAttr(ce)}else{if(b&&b!=="false"){b="true"}else{b="false"}jQuery(this).attr(ce,b)}}};
+/*
+* This file is part of Aloha Editor
+* Author & Copyright (c) 2010 Gentics Software GmbH, aloha@gentics.com
+* Licensed unter the terms of http://www.aloha-editor.com/license.html
+*/
+if(typeof GENTICS=="undefined"||!GENTICS){var GENTICS={}}if(typeof GENTICS.Utils=="undefined"||!GENTICS){GENTICS.Utils={}}GENTICS.Utils.applyProperties=function(target,properties){var name;for(name in properties){if(properties.hasOwnProperty(name)){target[name]=properties[name]}}};GENTICS.Utils.uniqeString4=function(){return(((1+Math.random())*65536)|0).toString(16).substring(1)};GENTICS.Utils.guid=function(){var S4=GENTICS.Utils.uniqeString4;return(S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4())};
+/*
+* This file is part of Aloha Editor
+* Author & Copyright (c) 2010 Gentics Software GmbH, aloha@gentics.com
+* Licensed unter the terms of http://www.aloha-editor.com/license.html
+*/
+if(typeof GENTICS=="undefined"||!GENTICS){var GENTICS={}}if(typeof GENTICS.Utils=="undefined"||!GENTICS){GENTICS.Utils={}}GENTICS.Utils.RangeObject=function(param){this.startContainer;this.startOffset;this.endContainer;this.endOffset;this.startParents=[];this.endParents=[];this.rangeTree=[];if(typeof param==="object"){if(param.startContainer!==undefined){this.startContainer=param.startContainer}if(param.startOffset!==undefined){this.startOffset=param.startOffset}if(param.endContainer!==undefined){this.endContainer=param.endContainer}if(param.endOffset!==undefined){this.endOffset=param.endOffset}}else{if(param===true){this.initializeFromUserSelection()}}};GENTICS.Utils.RangeObject.prototype.log=function(message,obj){if(GENTICS&&GENTICS.Aloha&&GENTICS.Aloha.Log){GENTICS.Aloha.Log.debug(this,message);return false}if(console){console.log(message);if(obj){console.log(obj)}}};GENTICS.Utils.RangeObject.prototype.isCollapsed=function(){return(!this.endContainer||(this.startContainer===this.endContainer&&this.startOffset===this.endOffset))};GENTICS.Utils.RangeObject.prototype.getCommonAncestorContainer=function(){if(this.commonAncestorContainer){return this.commonAncestorContainer}this.updateCommonAncestorContainer();return this.commonAncestorContainer};GENTICS.Utils.RangeObject.prototype.getContainerParents=function(limit,fromEnd){var container=fromEnd?this.endContainer:this.startContainer;var parentStore=fromEnd?this.endParents:this.startParents;if(!container){return false}if(typeof limit=="undefined"){limit=jQuery("body")}if(!parentStore[limit.get(0)]){var parents;if(container.nodeType==3){parents=jQuery(container).parents()}else{parents=jQuery(container).parents();for(var i=parents.length;i>0;--i){parents[i]=parents[i-1]}parents[0]=container}var limitIndex=parents.index(limit);if(limitIndex>=0){parents=parents.slice(0,limitIndex)}parentStore[limit.get(0)]=parents}return parentStore[limit.get(0)]};GENTICS.Utils.RangeObject.prototype.getStartContainerParents=function(limit){return this.getContainerParents(limit,false)};GENTICS.Utils.RangeObject.prototype.getEndContainerParents=function(limit){return this.getContainerParents(limit,true)};GENTICS.Utils.RangeObject.prototype.updateCommonAncestorContainer=function(commonAncestorContainer){var parentsStartContainer=this.getStartContainerParents();var parentsEndContainer=this.getEndContainerParents();if(!commonAncestorContainer){if(!(parentsStartContainer.length>0&&parentsEndContainer.length>0)){GENTICS.Utils.RangeObject.prototype.log("could not find commonAncestorContainer");return false}for(var i=0;i");if(this.endContainer===this.startContainer.parentNode&&GENTICS.Utils.Dom.getIndexInParent(this.startContainer)0){checkElement=container.childNodes[offset-1]}}while(checkElement&&checkElement.nodeType==3){characters+=checkElement.data.length;checkElement=checkElement.previousSibling}return{element:checkElement,characters:characters}};GENTICS.Utils.RangeObject.prototype.searchElementToRight=function(container,offset){var checkElement=undefined;var characters=0;if(container.nodeType==3){characters=container.data.length-offset;checkElement=container.nextSibling}else{if(offset0&&this.startContainer.childNodes[this.startOffset-1].nodeType==3){this.startContainer=this.startContainer.childNodes[this.startOffset-1];this.startOffset=this.startContainer.data.length;this.endContainer=this.startContainer;this.endOffset=this.startOffset;return}if(this.startOffset>0&&this.startContainer.childNodes[this.startOffset-1].nodeType==1){var adjacentTextNode=GENTICS.Utils.Dom.searchAdjacentTextNode(this.startContainer,this.startOffset,true);if(adjacentTextNode){this.startContainer=this.endContainer=adjacentTextNode;this.startOffset=this.endOffset=adjacentTextNode.data.length;return}adjacentTextNode=GENTICS.Utils.Dom.searchAdjacentTextNode(this.startContainer,this.startOffset,false);if(adjacentTextNode){this.startContainer=this.endContainer=adjacentTextNode;this.startOffset=this.endOffset=0;return}}if(this.startOffset0){checkedElement=checkedElement.childNodes[0];if(checkedElement.nodeType==3){textNode=checkedElement}}if(textNode!==false){this.startContainer=textNode;this.startOffset=0}}}}if(this.startContainer.nodeType==3&&this.startOffset==this.startContainer.data.length){var adjacentTextNode=GENTICS.Utils.Dom.searchAdjacentTextNode(this.startContainer.parentNode,GENTICS.Utils.Dom.getIndexInParent(this.startContainer)+1,false);if(adjacentTextNode){this.startContainer=adjacentTextNode;this.startOffset=0}}if(this.endContainer.nodeType==3&&this.endOffset==0){if(this.endContainer.previousSibling&&this.endContainer.previousSibling.nodeType==3){this.endContainer=this.endContainer.previousSibling;this.endOffset=this.endContainer.data.length}else{if(this.endContainer.previousSibling&&this.endContainer.previousSibling.nodeType==1&&this.endContainer.parentNode){var parentNode=this.endContainer.parentNode;for(var offset=0;offset0){this.endContainer=this.endContainer.previousSibling;this.endOffset=this.endContainer.childNodes.length}}}}if(this.endContainer.nodeType==1){if(this.endOffset>0&&this.endContainer.childNodes[this.endOffset-1].nodeType==3){this.endContainer=this.endContainer.childNodes[this.endOffset-1];this.endOffset=this.endContainer.data.length}else{if(this.endOffset>0&&this.endContainer.childNodes[this.endOffset-1].nodeType==1){var textNode=false;var checkedElement=this.endContainer.childNodes[this.endOffset-1];while(textNode===false&&checkedElement.childNodes&&checkedElement.childNodes.length>0){checkedElement=checkedElement.childNodes[checkedElement.childNodes.length-1];if(checkedElement.nodeType==3){textNode=checkedElement}}if(textNode!==false){this.endContainer=textNode;this.endOffset=this.endContainer.data.length}}}}}};GENTICS.Utils.RangeObject.prototype.clearCaches=function(){this.rangeTree=[];this.startParents=[];this.endParents=[];this.commonAncestorContainer=undefined};GENTICS.Utils.RangeObject.prototype.getRangeTree=function(root){if(typeof root=="undefined"){root=this.getCommonAncestorContainer()}if(this.rangeTree[root]){return this.rangeTree[root]}this.inselection=false;this.rangeTree[root]=this.recursiveGetRangeTree(root);return this.rangeTree[root]};GENTICS.Utils.RangeObject.prototype.recursiveGetRangeTree=function(currentObject){var jQueryCurrentObject=jQuery(currentObject);var childCount=0;var that=this;var currentElements=new Array();jQueryCurrentObject.contents().each(function(index){var type="none";var startOffset=false;var endOffset=false;var collapsedFound=false;if(that.isCollapsed()&¤tObject===that.startContainer&&that.startOffset==index){currentElements[childCount]=new GENTICS.Utils.RangeTree();currentElements[childCount].type="collapsed";currentElements[childCount].domobj=undefined;that.inselection=false;collapsedFound=true;childCount++}if(!that.inselection&&!collapsedFound){switch(this.nodeType){case 3:if(this===that.startContainer){that.inselection=true;type=that.startOffset>0?"partial":"full";startOffset=that.startOffset;endOffset=this.length}break;case 1:if(this===that.startContainer&&that.startOffset==0){that.inselection=true;type="full"}if(currentObject===that.startContainer&&that.startOffset==index){that.inselection=true;type="full"}break}}if(that.inselection&&!collapsedFound){if(type=="none"){type="full"}switch(this.nodeType){case 3:if(this===that.endContainer){that.inselection=false;if(that.endOffset0){var noneFound=false;var partialFound=false;var fullFound=false;for(var i=0;i0){path=parents.slice(0,index)}return false}});if(!path){return true}path=path.reverse();var newDom;var insertElement;for(var i=0;i=0){return true}if(jQuery.isArray(this.tags[this.children[outerNodeName]])&&jQuery.inArray(innerNodeName,this.tags[this.children[outerNodeName]])>=0){return true}return false};GENTICS.Utils.Dom.prototype.addMarkup=function(rangeObject,markup,nesting){if(rangeObject.startContainer.nodeType==3&&rangeObject.startOffset>0&&rangeObject.startOffset0&&rangeObject.endOffset0){this.recursiveAddMarkup(rangeTree[i].children,markup)}}}}}};GENTICS.Utils.Dom.prototype.findHighestElement=function(start,nodeName,limit){var testObject=start;nodeName=nodeName.toLowerCase();var isLimit=limit?function(){return limit.filter(function(){return testObject==this}).length}:function(){return false};var highestObject=undefined;while(!isLimit()&&testObject){if(testObject.nodeName.toLowerCase()==nodeName){highestObject=testObject}testObject=testObject.parentNode}return highestObject};GENTICS.Utils.Dom.prototype.removeMarkup=function(rangeObject,markup,limit){var nodeName=markup.get(0).nodeName;var startSplitLimit=this.findHighestElement(rangeObject.startContainer,nodeName,limit);var endSplitLimit=this.findHighestElement(rangeObject.endContainer,nodeName,limit);var didSplit=false;if(startSplitLimit){this.split(rangeObject,jQuery(startSplitLimit).parent(),false);didSplit=true}if(endSplitLimit){this.split(rangeObject,jQuery(endSplitLimit).parent(),true);didSplit=true}if(didSplit){rangeObject.correctRange()}var highestObject=this.findHighestElement(rangeObject.getCommonAncestorContainer(),nodeName,limit);var root=highestObject?highestObject.parentNode:undefined;var rangeTree=rangeObject.getRangeTree(root);this.recursiveRemoveMarkup(rangeTree,markup);this.doCleanup({merge:true,removeempty:true},rangeObject,root)};GENTICS.Utils.Dom.prototype.recursiveRemoveMarkup=function(rangeTree,markup){for(var i=0;i0){content.first().unwrap()}else{jQuery(rangeTree[i].domobj).remove()}}if(rangeTree[i].children){this.recursiveRemoveMarkup(rangeTree[i].children,markup)}}};GENTICS.Utils.Dom.prototype.doCleanup=function(cleanup,rangeObject,start){var that=this;if(typeof cleanup=="undefined"){cleanup={merge:true,removeempty:true}}if(typeof start=="undefined"){if(rangeObject){start=rangeObject.getCommonAncestorContainer()}}var prevNode=false;var modifiedRange=false;var startObject=jQuery(start);startObject.contents().each(function(index){switch(this.nodeType){case 1:if(prevNode&&prevNode.nodeName==this.nodeName){if(rangeObject.startContainer===startObject&&rangeObject.startOffset>index){rangeObject.startOffset-=1;modifiedRange=true}if(rangeObject.endContainer===startObject&&rangeObject.endOffset>index){rangeObject.endOffset-=1;modifiedRange=true}jQuery(prevNode).append(jQuery(this).contents());modifiedRange|=that.doCleanup(cleanup,rangeObject,prevNode);jQuery(this).remove()}else{modifiedRange|=that.doCleanup(cleanup,rangeObject,this);var removed=false;if(cleanup.removeempty){if(GENTICS.Utils.Dom.isBlockLevelElement(this)&&this.childNodes.length==0){jQuery(this).remove();removed=true}if(jQuery.inArray(this.nodeName.toLowerCase(),that.mergeableTags)>=0&&jQuery(this).text().length==0&&this.childNodes.length==0){jQuery(this).remove();removed=true}}if(!removed){if(jQuery.inArray(this.nodeName.toLowerCase(),that.mergeableTags)>=0){prevNode=this}else{prevNode=false}}}break;case 3:if(prevNode&&prevNode.nodeType==3&&cleanup.merge){if(rangeObject.startContainer===this){rangeObject.startContainer=prevNode;rangeObject.startOffset+=prevNode.length;modifiedRange=true}if(rangeObject.endContainer===this){rangeObject.endContainer=prevNode;rangeObject.endOffset+=prevNode.length;modifiedRange=true}if(rangeObject.startContainer===startObject&&rangeObject.startOffset>index){rangeObject.startOffset-=1;modifiedRange=true}if(rangeObject.endContainer===startObject&&rangeObject.endOffset>index){rangeObject.endOffset-=1;modifiedRange=true}prevNode.data+=this.data;jQuery(this).remove()}else{prevNode=this}break}});if(cleanup.removeempty&&GENTICS.Utils.Dom.isBlockLevelElement(start)&&(!start.childNodes||start.childNodes.length==0)){if(rangeObject.startContainer==start){rangeObject.startContainer=start.parentNode;rangeObject.startOffset=GENTICS.Utils.Dom.getIndexInParent(start)}if(rangeObject.endContainer==start){rangeObject.endContainer=start.parentNode;rangeObject.endOffset=GENTICS.Utils.Dom.getIndexInParent(start)}startObject.remove();modifiedRange=true}if(modifiedRange){rangeObject.clearCaches()}return modifiedRange};GENTICS.Utils.Dom.prototype.getIndexInParent=function(node){if(!node){return false}var index=0;var check=node.previousSibling;while(check){index++;check=check.previousSibling}return index};GENTICS.Utils.Dom.prototype.isBlockLevelElement=function(node){if(!node){return false}if(node.nodeType==1&&jQuery.inArray(node.nodeName.toLowerCase(),this.blockLevelElements)>=0){return true}else{return false}};GENTICS.Utils.Dom.prototype.isLineBreakElement=function(node){if(!node){return false}return node.nodeType==1&&node.nodeName.toLowerCase()=="br"};GENTICS.Utils.Dom.prototype.isListElement=function(node){if(!node){return false}return node.nodeType==1&&jQuery.inArray(node.nodeName.toLowerCase(),this.listElements)>=0};GENTICS.Utils.Dom.prototype.isSplitObject=function(el){if(el.nodeType===1){switch(el.nodeName.toLowerCase()){case"p":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":case"li":return true}}return false};GENTICS.Utils.Dom.prototype.searchAdjacentTextNode=function(parent,index,searchleft,stopat){if(!parent||parent.nodeType!=1||index<0||index>parent.childNodes.length){return false}if(typeof stopat=="undefined"){stopat={blocklevel:true,list:true,linebreak:true}}if(stopat.blocklevel=="undefined"){stopal.blocklevel=true}if(stopat.list=="undefined"){stopal.list=true}if(stopat.linebreak=="undefined"){stopal.linebreak=true}if(typeof searchleft=="undefined"){searchleft=true}var nextNode=undefined;var currentParent=parent;if(searchleft&&index>0){nextNode=parent.childNodes[index-1]}if(!searchleft&&index0){return nextNode}else{if(stopat.blocklevel&&this.isBlockLevelElement(nextNode)){return false}else{if(stopat.linebreak&&this.isLineBreakElement(nextNode)){return false}else{if(stopat.list&&this.isListElement(nextNode)){return false}else{if(nextNode.nodeType==3){nextNode=searchleft?nextNode.previousSibling:nextNode.nextSibling}else{currentParent=nextNode;nextNode=searchleft?nextNode.lastChild:nextNode.firstChild}}}}}}}};GENTICS.Utils.Dom.prototype.insertIntoDOM=function(object,range,limit,atEnd){var parentElements=range.getContainerParents(limit,atEnd);var that=this;var newParent;if(!limit){limit=jQuery(document.body)}if(parentElements.length==0){newParent=limit.get(0)}else{jQuery.each(parentElements,function(index,parent){if(that.allowsNesting(parent,object.get(0))){newParent=parent;return false}})}if(typeof newParent=="undefined"&&limit.length>0){newParent=limit.get(0)}if(typeof newParent!="undefined"){var splitParts=this.split(range,jQuery(newParent),atEnd);if(splitParts===true){var container=range.startContainer;var offset=range.startOffset;if(atEnd){container=range.endContainer;offset=range.endOffset}if(offset==0){var contents=jQuery(container).contents();if(contents.length>0){contents.eq(0).before(object)}else{jQuery(container).append(object)}return true}else{jQuery(container).contents().eq(offset-1).after(object);return true}}else{if(splitParts){splitParts.eq(0).after(object);return true}else{return false}}}else{return false}};GENTICS.Utils.Dom.prototype.removeFromDOM=function(object,range,preserveContent){if(preserveContent){var indexInParent=this.getIndexInParent(object);var numChildren=jQuery(object).contents().length;var parent=object.parentNode;if(range.startContainer==parent&&range.startOffset>indexInParent){range.startOffset+=numChildren-1}else{if(range.startContainer==object){range.startContainer=parent;range.startOffset=indexInParent+range.startOffset}}if(range.endContainer==parent&&range.endOffset>indexInParent){range.endOffset+=numChildren-1}else{if(range.endContainer==object){range.endContainer=parent;range.endOffset=indexInParent+range.endOffset}}jQuery(object).contents().unwrap();this.doCleanup({merge:true},range,parent)}else{}};GENTICS.Utils.Dom.prototype.extendToWord=function(range,fromBoundaries){var leftBoundary=this.searchWordBoundary(range.startContainer,range.startOffset,true);var rightBoundary=this.searchWordBoundary(range.endContainer,range.endOffset,false);if(!fromBoundaries){if(range.startContainer==leftBoundary.container&&range.startOffset==leftBoundary.offset){return}if(range.endContainer==rightBoundary.container&&range.endOffset==rightBoundary.offset){return}}range.startContainer=leftBoundary.container;range.startOffset=leftBoundary.offset;range.endContainer=rightBoundary.container;range.endOffset=rightBoundary.offset;range.correctRange();range.clearCaches()};GENTICS.Utils.Dom.prototype.isWordBoundaryElement=function(object){if(!object||!object.nodeName){return false}return jQuery.inArray(object.nodeName.toLowerCase(),this.nonWordBoundaryTags)==-1};GENTICS.Utils.Dom.prototype.searchWordBoundary=function(container,offset,searchleft){if(typeof searchleft=="undefined"){searchleft=true}var boundaryFound=false;while(!boundaryFound){if(container.nodeType==3){if(!searchleft){var wordBoundaryPos=container.data.substring(offset).search(/\W/);if(wordBoundaryPos!=-1){offset=offset+wordBoundaryPos;boundaryFound=true}else{offset=this.getIndexInParent(container)+1;container=container.parentNode}}else{var wordBoundaryPos=container.data.substring(0,offset).search(/\W/);var tempWordBoundaryPos=wordBoundaryPos;while(tempWordBoundaryPos!=-1){wordBoundaryPos=tempWordBoundaryPos;tempWordBoundaryPos=container.data.substring(wordBoundaryPos+1,offset).search(/\W/);if(tempWordBoundaryPos!=-1){tempWordBoundaryPos=tempWordBoundaryPos+wordBoundaryPos+1}}if(wordBoundaryPos!=-1){offset=wordBoundaryPos+1;boundaryFound=true}else{offset=this.getIndexInParent(container);container=container.parentNode}}}else{if(container.nodeType==1){if(!searchleft){if(offset0){if(this.isWordBoundaryElement(container.childNodes[offset-1])){boundaryFound=true}else{container=container.childNodes[offset-1];offset=container.nodeType==3?container.data.length:container.childNodes.length}}else{if(this.isWordBoundaryElement(container)){boundaryFound=true}else{offset=this.getIndexInParent(container);container=container.parentNode}}}}}}if(container.nodeType!=3){var textNode=this.searchAdjacentTextNode(container,offset,!searchleft);if(textNode){container=textNode;offset=searchleft?0:container.data.length}}return{container:container,offset:offset}};GENTICS.Utils.Dom.prototype.isEmpty=function(domObject){if(!domObject){return true}if(jQuery.inArray(domObject.nodeName.toLowerCase(),this.nonEmptyTags)!=-1){return false}if(domObject.nodeType==3){return domObject.data.search(/\S/)==-1}for(var i=0;i.
+*/
+/*
+* This file is part of Aloha Editor
+* Author & Copyright (c) 2010 Gentics Software GmbH, aloha@gentics.com
+* Licensed unter the terms of http://www.aloha-editor.com/license.html
+*/
+Ext.data.AlohaProxy=function(){var api={};api[Ext.data.Api.actions.read]=true;Ext.data.AlohaProxy.superclass.constructor.call(this,{api:api});this.params={queryString:null,objectTypeFilter:null,filter:null,inFolderId:null,orderBy:null,maxItems:null,skipCount:null,renditionFilter:null,repositoryId:null}};Ext.extend(Ext.data.AlohaProxy,Ext.data.DataProxy,{doRequest:function(action,rs,params,reader,cb,scope,arg){var p=this.params;jQuery.extend(p,params);try{GENTICS.Aloha.RepositoryManager.query(p,function(items){var result=reader.readRecords(items);cb.call(scope,result,arg,true)})}catch(e){this.fireEvent("loadexception",this,null,arg,e);this.fireEvent("exception",this,"response",action,arg,null,e);return false}},setObjectTypeFilter:function(otFilter){this.params.objectTypeFilter=otFilter},getObjectTypeFilter:function(){return this.params.objectTypeFilter},setParams:function(p){jQuery.extend(this.params,p)}});
+/*
+* This file is part of Aloha Editor
+* Author & Copyright (c) 2010 Gentics Software GmbH, aloha@gentics.com
+* Licensed unter the terms of http://www.aloha-editor.com/license.html
+*/
+Ext.data.AlohaObjectReader=function(meta,recordType){meta={};Ext.applyIf(meta,{idProperty:"id",root:"items",totalProperty:"results",fields:["id","url","name","type","weight","repositoryId"]});Ext.data.JsonReader.superclass.constructor.call(this,meta,meta.fields)};Ext.extend(Ext.data.AlohaObjectReader,Ext.data.JsonReader,{});
+/*
+* This file is part of Aloha Editor
+* Author & Copyright (c) 2010 Gentics Software GmbH, aloha@gentics.com
+* Licensed unter the terms of http://www.aloha-editor.com/license.html
+*/
+Ext.tree.AlohaTreeLoader=function(config){Ext.apply(this,config);Ext.tree.AlohaTreeLoader.superclass.constructor.call(this)};Ext.extend(Ext.tree.AlohaTreeLoader,Ext.tree.TreeLoader,{paramOrder:["node","id"],nodeParameter:"id",directFn:function(node,id,callback){var params={inFolderId:node.id,objectTypeFilter:this.objectTypeFilter,repositoryId:node.repositoryId};GENTICS.Aloha.RepositoryManager.getChildren(params,function(items){var response={};response={status:true,scope:this,argument:{callback:callback,node:node}};if(typeof callback=="function"){callback(items,response)}})},createNode:function(node){if(node.name){node.text=node.name}if(node.hasMoreItems){node.leaf=!node.hasMoreItems}if(node.objectType){node.cls=node.objectType}return Ext.tree.TreeLoader.prototype.createNode.call(this,node)},objectTypeFilter:null,setObjectTypeFilter:function(otFilter){this.objectTypeFilter=otFilter},getObjectTypeFilter:function(){return this.objectTypeFilter}});
+/*
+* This file is part of Aloha Editor
+* Author & Copyright (c) 2010 Gentics Software GmbH, aloha@gentics.com
+* Licensed unter the terms of http://www.aloha-editor.com/license.html
+*/
+if(typeof GENTICS=="undefined"||!GENTICS){var GENTICS={}}GENTICS.Aloha=function(){};GENTICS.Aloha.setAutobase=function(){var scriptTags=document.getElementsByTagName("script");var path=scriptTags[scriptTags.length-1].src.split("?")[0];path=path.split("/");var substitute=1;if("core"===path[path.length-2]){substitute=2}GENTICS.Aloha.prototype.autobase=path.slice(0,substitute*-1).join("/")+"/"};GENTICS.Aloha.setAutobase();GENTICS.Aloha.prototype.version="0.9.3";GENTICS.Aloha.prototype.editables=new Array();GENTICS.Aloha.prototype.activeEditable=null;GENTICS.Aloha.prototype.ready=false;GENTICS.Aloha.prototype.dictionaries={};GENTICS.Aloha.prototype.settings={};GENTICS.Aloha.prototype.OSName="Unknown";GENTICS.Aloha.prototype.readyCallbacks=new Array();GENTICS.Aloha.prototype.init=function(){if(jQuery.browser.webkit&&parseFloat(jQuery.browser.version)<532.5||jQuery.browser.mozilla&&parseFloat(jQuery.browser.version)<1.9||jQuery.browser.msie&&jQuery.browser.version<7||jQuery.browser.opera){alert("Sorry, your browser is not supported at the moment.");return}var that=this;jQuery("html").mousedown(function(){if(that.activeEditable&&!that.isMessageVisible()){that.activeEditable.blur();that.FloatingMenu.setScope("GENTICS.Aloha.empty");that.activeEditable=null}});if(typeof this.settings.base=="undefined"||!this.settings.base){this.settings.base=GENTICS.Aloha.autobase;if(typeof GENTICS_Aloha_base!="undefined"){this.settings.base=GENTICS_Aloha_base}}this.Log.init();if(!(this.settings.errorhandling==false)){window.onerror=function(msg,url,linenumber){GENTICS.Aloha.Log.error(GENTICS.Aloha,"Error message: "+msg+"\nURL: "+url+"\nLine Number: "+linenumber);return true}}if(navigator.appVersion.indexOf("Win")!=-1){this.OSName="Win"}if(navigator.appVersion.indexOf("Mac")!=-1){this.OSName="Mac"}if(navigator.appVersion.indexOf("X11")!=-1){this.OSName="Unix"}if(navigator.appVersion.indexOf("Linux")!=-1){this.OSName="Linux"}this.initI18n();this.PluginRegistry.init();this.RepositoryManager.init();this.Ribbon.init();this.FloatingMenu.init();Ext.MessageBox.buttonText.yes=GENTICS.Aloha.i18n(this,"yes");Ext.MessageBox.buttonText.no=GENTICS.Aloha.i18n(this,"no");Ext.MessageBox.buttonText.cancel=GENTICS.Aloha.i18n(this,"cancel");Ext.ux.AlohaAttributeField.prototype.listEmptyText=GENTICS.Aloha.i18n(GENTICS.Aloha,"repository.no_item_found");Ext.ux.AlohaAttributeField.prototype.loadingText=GENTICS.Aloha.i18n(GENTICS.Aloha,"repository.loading")+"...";this.ready=true;for(var i=0;i=0;i--){if(/\S/.test(str.charAt(i))){str=str.substring(0,i+1);break}}return str};GENTICS.Aloha.prototype.initI18n=function(){if(typeof this.settings.i18n=="undefined"||!this.settings.i18n){this.settings.i18n={}}if(typeof this.settings.i18n.available=="undefined"||!this.settings.i18n.available||!this.settings.i18n.available instanceof Array){this.settings.i18n.available=["en","de","fr","eo","fi","ru","it","pl"]}if((typeof this.settings.i18n.current=="undefined"||!this.settings.i18n.current)&&typeof this.settings.i18n.acceptLanguage=="string"){var acceptLanguage=[];var preferredLanugage=this.settings.i18n.acceptLanguage.split(",");for(i=0;i=0){this.settings.i18n.current=acceptLanguage[i][0];break}}}if(typeof this.settings.i18n.current=="undefined"||!this.settings.i18n.current){this.settings.i18n.current=(navigator.language?navigator.language:navigator.userLanguage)}var actualLanguage=this.getLanguage(this.settings.i18n.current,this.settings.i18n.available);if(!actualLanguage){GENTICS.Aloha.Log.error(this,"Could not determine actual language.")}else{var fileUrl=this.settings.base+"i18n/"+actualLanguage+".dict";this.loadI18nFile(fileUrl,this)}};GENTICS.Aloha.prototype.getLanguage=function(language,availableLanguages){if(!availableLanguages instanceof Array){GENTICS.Aloha.Log.error(this,"Available languages must be an Array");return null}if(typeof language=="undefined"||!language){return availableLanguages[0]}for(var i=0;i0){var key=GENTICS.Aloha.trim(entry.substring(0,equal));var value=GENTICS.Aloha.trim(entry.substring(equal+1,entry.length));value=value.replace(/\\n/g,"\n");value=value.replace(/\\\\/g,"\\");if(dictionary[key]){GENTICS.Aloha.Log.warn(component,"Found duplicate key "+key+" in dictionary file, ignoring")}else{dictionary[key]=value}}}this.dictionaries[component.toString()]=dictionary};GENTICS.Aloha.prototype.i18n=function(component,key,replacements){var value=null;if(this.dictionaries[component.toString()]){if(this.dictionaries[component.toString()][key]){value=this.dictionaries[component.toString()][key]}}if(!value&&component!=GENTICS.Aloha){if(this.dictionaries[GENTICS.Aloha.toString()]){if(this.dictionaries[GENTICS.Aloha.toString()][key]){value=this.dictionaries[GENTICS.Aloha.toString()][key]}}}if(!value){return"??? "+key+" ???"}else{if(typeof replacements!="undefined"&&replacements!=null){for(var i=0;i