X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=rt%2Fshare%2Fhtml%2FElements%2FHeaderJavascript;h=3e5e9eca3252eda35d6deb6f518c1d0eea4b3079;hb=e9e0cf0989259b94d9758eceff448666a2e5a5cc;hp=ce0b97621c86da542a1b54b9add1fe00f8e0783e;hpb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c;p=freeside.git diff --git a/rt/share/html/Elements/HeaderJavascript b/rt/share/html/Elements/HeaderJavascript index ce0b97621..3e5e9eca3 100644 --- a/rt/share/html/Elements/HeaderJavascript +++ b/rt/share/html/Elements/HeaderJavascript @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -49,75 +49,39 @@ $focus => undef $onload => undef - - - - - -% if ( RT->Config->Get('MessageBoxRichText', $session{'CurrentUser'}) ) { - + +% for my $jsfile ( @js_files ) { + +% } + +% if ( $RichText and RT->Config->Get('MessageBoxRichText', $session{'CurrentUser'}) ) { + % } +<%ARGS> +$RichText => 1 + +<%INIT> -%# for this template.. - var FCKeditorEncoded = document.createElement('input'); - FCKeditorEncoded.setAttribute('type', 'hidden'); - FCKeditorEncoded.setAttribute('name', 'FCKeditorEncoded'); - FCKeditorEncoded.setAttribute('value', '1'); - textArea.parentNode.appendChild(FCKeditorEncoded); - -%# for FCKeditor.. - var typeField = document.createElement('input'); - typeField.setAttribute('type', 'hidden'); - typeField.setAttribute('name', textArea.name + 'Type'); - typeField.setAttribute('value', 'text/html'); - textArea.parentNode.appendChild(typeField); +my @js_files; +if ( RT->Config->Get('DevelMode') ) { + @js_files = RT->Config->Get('JSFiles' ); +} +else { + my $key = RT::Interface::Web::SquishedJS()->Key; + @js_files = "squished-$key.js"; +} - var oFCKeditor = new FCKeditor( textArea.name, '100%', <% RT->Config->Get('MessageBoxRichTextHeight', $session{CurrentUser} ) %> ); - oFCKeditor.BasePath = "<%RT->Config->Get('WebPath')%>/NoAuth/RichText/"; - oFCKeditor.ReplaceTextarea(); - } - } - } - doOnLoad(ReplaceAllTextareas); -% } ---> +