X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FElements%2FHeaderJavascript;h=d58904d1530e35c90554478fedbc7ea6dde0180b;hp=ce0b97621c86da542a1b54b9add1fe00f8e0783e;hb=44dd00a3ff974a17999e86e64488e996edc71e3c;hpb=fc6209f398899f0211cfcedeb81a3cd65e04a941 diff --git a/rt/share/html/Elements/HeaderJavascript b/rt/share/html/Elements/HeaderJavascript index ce0b97621..d58904d15 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-2019 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -49,75 +49,29 @@ $focus => undef $onload => undef - - - - - -% if ( RT->Config->Get('MessageBoxRichText', $session{'CurrentUser'}) ) { - + +% for my $jsfile ( @js_files ) { + % } + +<%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 = map { $_ =~ m{^/} ? $_ : "/static/js/$_" } RT::Interface::Web->JSFiles(); +} +else { + my $key = RT::Interface::Web::SquishedJS()->Key; + @js_files = "/NoAuth/js/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); -% } ---> +