Bug 32071: Compiled CSS
[koha-ffzg.git] / Koha / FrameworkPlugin.pm
index 39bb5ed..2331bfa 100644 (file)
@@ -4,18 +4,18 @@ package Koha::FrameworkPlugin;
 #
 # This file is part of Koha.
 #
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 3 of the License, or (at your option) any later
-# version.
+# Koha is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
 #
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+# Koha is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License along
-# with Koha; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# You should have received a copy of the GNU General Public License
+# along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 =head1 NAME
 
@@ -115,7 +115,6 @@ use Modern::Perl;
 use base qw(Class::Accessor);
 
 use C4::Context;
-use C4::Biblio qw/GetMarcFromKohaField/;
 
 __PACKAGE__->mk_ro_accessors( qw|
     name path errstr javascript noclick
@@ -156,7 +155,7 @@ sub new {
     Generate html and javascript by calling the builder sub of the plugin.
 
     Params is a hashref supporting keys: id (=html id for the input field),
-    record (MARC record or undef), dbh (database handle), tagslib, tabloop.
+    record (MARC record or undef), dbh (database handle), tagslib.
     Note that some of these parameters are not used in most (if not all)
     plugins and may be obsoleted in the future (kept for now to provide
     backward compatibility).
@@ -256,7 +255,7 @@ sub _load {
 }
 
 sub _valuebuilderpath {
-    return C4::Context->intranetdir . "/cataloguing/value_builder";
+    return C4::Context->config('intranetdir') . "/cataloguing/value_builder";
     #Formerly, intranetdir/cgi-bin was tested first.
     #But the intranetdir from koha-conf already includes cgi-bin for
     #package installs, single and standard installs.
@@ -277,7 +276,7 @@ sub _generate_js {
 
     my @params = $self->{oldschool}//0 ?
         ( $params->{dbh}, $params->{record}, $params->{tagslib},
-            $params->{id}, $params->{tabloop} ):
+            $params->{id} ):
         ( $params );
     my @rv = &$sub( @params );
     return $self->_error( 'Builder sub failed: ' . $@ ) if $@;
@@ -376,8 +375,7 @@ sub _merge_script {
     my ( $id, $script, $bind ) = @_;
     chomp ($script, $bind);
     return <<HERE;
-<script type="text/javascript">
-//<![CDATA[
+<script>
 $script
 function BindEvents$id() {
 $bind
@@ -385,7 +383,6 @@ $bind
 \$(document).ready(function() {
     BindEvents$id();
 });
-//]]>
 </script>
 HERE
 }