From 13b453f7b1b9b128b80362c050e8ebf56ac91525 Mon Sep 17 00:00:00 2001 From: Hector Castro Date: Fri, 30 Jan 2015 11:07:12 -0600 Subject: [PATCH 05/11] Bug 13642 [ENH] Adding new features for Dublin Core metadata New lines in script.js for OPAC - New functions of jquery for Dublin Core Modal --- koha-tmpl/opac-tmpl/bootstrap/js/script.js | 69 +++++++++++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) mode change 100644 => 100755 koha-tmpl/opac-tmpl/bootstrap/js/script.js diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/script.js b/koha-tmpl/opac-tmpl/bootstrap/js/script.js old mode 100644 new mode 100755 index de8401b..c4fa255 --- a/koha-tmpl/opac-tmpl/bootstrap/js/script.js +++ b/koha-tmpl/opac-tmpl/bootstrap/js/script.js @@ -63,4 +63,71 @@ $(document).ready(function(){ $("#members").removeAttr("style"); } }); -}); \ No newline at end of file +}); + + //JQuery for Dublin Core Exporter + $(document).ready(function(){ + $("#input-simple").click(function(){ + $(".rdfoptions").removeAttr("disabled"); + $(".xmloptions").attr("disabled","disabled"); + $("#dc-rdf").toggle(); + $("#dc-xml").hide(); + }); + }); + + $(document).ready(function(){ + $("#input-rdf").click(function(){ + $(".rdfoptions").removeAttr("disabled"); + $(".xmloptions").attr("disabled","disabled"); + $("#dc-rdf").toggle(); + $("#dc-xml").hide(); + }); + }); + + $(document).ready(function(){ + $("#input-xml").click(function(){ + $(".xmloptions").removeAttr("disabled"); + $(".rdfoptions").attr("disabled","disabled"); + if($("#root_checked").is(':checked')){ + $("#root_value").removeAttr("disabled"); + } else { + $("#root_value").attr("disabled","disabled"); + } + if($("#schema_checked").is(':checked')){ + $("#schema_value").removeAttr("disabled"); + } else { + $("#schema_value").attr("disabled","disabled"); + } + $("#dc-xml").toggle(); + $("#dc-rdf").hide(); + }); + }); + + $(document).ready(function(){ + $("#root_checked").click(function(){ + if($("#root_checked").is(':checked')){ + $("#root_value").removeAttr("disabled"); + } else { + $("#root_value").attr("disabled","disabled"); + } + }); + }); + + $(document).ready(function(){ + $("#schema_checked").click(function(){ + if($("#schema_checked").is(':checked')){ + $("#schema_value").removeAttr("disabled"); + } else { + $("#schema_value").attr("disabled","disabled"); + } + }); + }); + + $(document).ready(function(){ + $("#input-oai").click(function(){ + $(".rdfoptions").attr("disabled","disabled"); + $(".xmloptions").attr("disabled","disabled"); + $("#dc-rdf").hide(); + $("#dc-xml").hide(); + }); + }); -- 1.7.10.4